smbls 3.14.847 → 3.14.849

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/core.js +6 -0
  3. package/dist/smbls.cjs +46 -46
  4. package/dist/smbls.cjs.map +3 -3
  5. package/dist/smbls.core.chunk-7SZUGO5L.esm.js +36 -0
  6. package/dist/smbls.core.chunk-7SZUGO5L.esm.js.map +1 -0
  7. package/dist/smbls.core.chunk-CCELIELA.esm.js +2 -0
  8. package/dist/smbls.core.chunk-CCELIELA.esm.js.map +1 -0
  9. package/dist/smbls.core.chunk-DF7QFXYQ.esm.js +36 -0
  10. package/dist/smbls.core.chunk-DF7QFXYQ.esm.js.map +1 -0
  11. package/dist/smbls.core.chunk-PJSRIWW6.esm.js +7 -0
  12. package/dist/smbls.core.chunk-PJSRIWW6.esm.js.map +6 -0
  13. package/dist/{smbls.core.dropdown-MZ3W3DXX.esm.js → smbls.core.dropdown-WHTRDSTC.esm.js} +2 -2
  14. package/dist/smbls.core.esm.js +1 -1
  15. package/dist/smbls.core.fetch-MDXDXO47.esm.js +2 -0
  16. package/dist/smbls.core.fetch-MDXDXO47.esm.js.map +1 -0
  17. package/dist/{smbls.core.inspect-RUKGR5EW.esm.js → smbls.core.inspect-2Y3VVWKT.esm.js} +2 -2
  18. package/dist/{smbls.core.sync-Q2XHZCCY.esm.js → smbls.core.sync-CFCAWBC2.esm.js} +2 -2
  19. package/dist/{smbls.core.windows-FPJLEOZB.esm.js → smbls.core.windows-ICMSWA7V.esm.js} +2 -2
  20. package/dist/smbls.embed.iife.js +1 -1
  21. package/dist/smbls.embed.iife.js.map +1 -1
  22. package/dist/smbls.esm.js +46 -46
  23. package/dist/smbls.esm.js.map +1 -6
  24. package/dist/smbls.iife-string.js +2 -2
  25. package/dist/smbls.iife.js +1 -1
  26. package/dist/smbls.iife.js.map +1 -1
  27. package/dist/smbls.server-utils.esm.js +6 -6
  28. package/dist/smbls.server-utils.esm.js.map +1 -1
  29. package/dist/smbls.tree-shake.json +113 -1
  30. package/index.js +11 -0
  31. package/package.json +7 -6
  32. package/dist/smbls.core.chunk-463ZMXSP.esm.js +0 -7
  33. package/dist/smbls.core.chunk-463ZMXSP.esm.js.map +0 -6
  34. package/dist/smbls.core.chunk-CHOPXIH6.esm.js +0 -36
  35. package/dist/smbls.core.chunk-CHOPXIH6.esm.js.map +0 -6
  36. package/dist/smbls.core.chunk-L5L4R3IM.esm.js +0 -36
  37. package/dist/smbls.core.chunk-L5L4R3IM.esm.js.map +0 -6
  38. package/dist/smbls.core.chunk-YN5FXJKZ.esm.js +0 -2
  39. package/dist/smbls.core.chunk-YN5FXJKZ.esm.js.map +0 -6
  40. package/dist/smbls.core.fetch-RYVOUPSO.esm.js +0 -2
  41. package/dist/smbls.core.fetch-RYVOUPSO.esm.js.map +0 -6
  42. /package/dist/{smbls.core.dropdown-MZ3W3DXX.esm.js.map → smbls.core.dropdown-WHTRDSTC.esm.js.map} +0 -0
  43. /package/dist/{smbls.core.inspect-RUKGR5EW.esm.js.map → smbls.core.inspect-2Y3VVWKT.esm.js.map} +0 -0
  44. /package/dist/{smbls.core.sync-Q2XHZCCY.esm.js.map → smbls.core.sync-CFCAWBC2.esm.js.map} +0 -0
  45. /package/dist/{smbls.core.windows-FPJLEOZB.esm.js.map → smbls.core.windows-ICMSWA7V.esm.js.map} +0 -0
package/dist/smbls.cjs CHANGED
@@ -1,40 +1,40 @@
1
- "use strict";var B3=Object.create;var dp=Object.defineProperty;var j3=Object.getOwnPropertyDescriptor;var U3=Object.getOwnPropertyNames;var V3=Object.getPrototypeOf,H3=Object.prototype.hasOwnProperty;var D=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Yb=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},F=(t,e)=>{for(var n in e)dp(t,n,{get:e[n],enumerable:!0})},RT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of U3(e))!H3.call(t,o)&&o!==n&&dp(t,o,{get:()=>e[o],enumerable:!(r=j3(e,o))||r.enumerable});return t};var PT=(t,e,n)=>(n=t!=null?B3(V3(t)):{},RT(e||!t||!t.__esModule?dp(n,"default",{value:t,enumerable:!0}):n,t)),z3=t=>RT(dp({},"__esModule",{value:!0}),t);var r_={};F(r_,{WRITE_JOURNAL:()=>el,batch:()=>ol,countUntrackedReads:()=>q3,createComputed:()=>G3,createEffect:()=>Y3,createSignal:()=>Fn,getObserver:()=>t_,journalWrite:()=>rl,noteUntrackedRead:()=>Le,setObserver:()=>W3,settled:()=>n_,untrack:()=>K3});function K3(t){let e=Zt;if(!e)return t();Zt=null;try{return t()}finally{Zt=e}}function Le(){Xb!==0&&pp++}function q3(t){let e=pp;Xb++;let n;try{t()}finally{n=pp-e,--Xb===0&&(pp=0)}return n}function Fn(t){let e=new Set;function n(){return Zt&&(e.add(Zt),Zt._sources.add(s)),t}function r(i){i!==t&&(t=i,n4(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function G3(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){Qb(o);let s=Zt;Zt=o;try{e=t(),n=!1}finally{Zt=s}},_notify(){n=!0,r.size>0&&MT(r)},get(){return Zt&&(r.add(Zt),Zt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function rl(t){el.push(t),el.length>32&&el.shift()}function Y3(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;Qb(r);let o=Zt;Zt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Zt=o}},_notify(){r._disposed||(Qc>0?tl.push(r):hp>0?Jb.push(r):e_(r))},dispose(){r._disposed=!0,Qb(r)}};return r._execute(),r}function ol(t){Qc++;try{t()}finally{Qc--,Qc===0&&e4()}}function DT(){return typeof performance<"u"?performance.now():Date.now()}function e_(t){Ge.add(t),!mp&&(gp||(gp=!0,queueMicrotask(IT)))}function Q3(){if(Ge.size===1){let[e]=Ge;return Ge.clear(),e._disposed?0:(e._execute(),1)}Fi.length=0;for(let e of Ge)Fi.push(e);Ge.clear(),Fi.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<Fi.length;e++){let n=Fi[e];n._disposed||(n._execute(),t++)}return Fi.length=0,t}function IT(t=0,e=0){if(gp=!1,Ge.size===0){nl.length&&Zb();return}mp=!0;let n=DT(),r=!1;try{for(;Ge.size>0;){if(++t>LT){let o=new Map;for(let c of Ge){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of el)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",LT,"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>"),Ge.clear();break}if(e+=Q3(),Ge.size>0&&(e>=J3||t>=Z3)&&DT()-n>X3){r=!0,setTimeout(()=>IT(t,e),0);break}}}finally{r||(mp=!1,nl.length&&Zb())}}function t4(){return Ge.size===0&&!gp&&!mp&&tl.length===0&&Qc===0}function Zb(){if(nl.length===0||!t4())return;let t=nl.splice(0);for(let e=0;e<t.length;e++)t[e]()}function n_(){return new Promise(t=>{nl.push(t),queueMicrotask(Zb)})}function e4(){for(let t=0;t<tl.length;t++)e_(tl[t]);tl.length=0}function MT(t){hp++;try{for(let e of t)e._notify()}finally{if(hp--,hp===0&&Jb.length>0){let e=Jb.splice(0);for(let n=0;n<e.length;n++)e_(e[n])}}}function n4(t){MT(t)}function Qb(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Zt,Qc,tl,t_,W3,Xb,pp,hp,Jb,Ge,gp,el,mp,LT,X3,J3,Z3,Fi,nl,o_=D(()=>{Zt=null,Qc=0,tl=[],t_=()=>Zt,W3=t=>{Zt=t};Xb=0,pp=0;hp=0,Jb=[];Ge=new Set,gp=!1,el=[];mp=!1,LT=1e3,X3=8,J3=256,Z3=4;Fi=[];nl=[]});var f_={};F(f_,{RESERVED_STORE_METHODS:()=>sl,STORE_METHOD_NAMES:()=>l_,__resetStateShadowWarnings:()=>r4,createScopeStore:()=>a4,createStore:()=>bp,getSignals:()=>i4,isStore:()=>s4,warnStateKeyShadowsMethod:()=>c_});function c_(t,e){let n=(e||"")+"::"+t;if(a_.has(n))return;a_.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: ${l_.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function r4(){a_.clear()}function Sp(t,e,n){if(t===e)return!0;if(n>o4)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(!Sp(t[r],e[r],n+1))return!1;return!0}if(wp(t)&&wp(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)||!Sp(t[s],e[s],n+1))return!1;return!0}return!1}function bp(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=b=>{if(!r||!e||typeof e.isDataOnlyKey!="function")return!1;let w=r.indexOf(".");return!!e.isDataOnlyKey(w===-1?r:r.slice(0,w),b)},c=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}sl.has(b)&&!a(b)&&c_(b,r);let w=t[b];n<c&&w&&typeof w=="object"&&!i_(w)?(s[b]=w,o[b]=Fn(bp(w,e,n+1,s_(r,b)))):(s[b]=w,o[b]=Fn(w))}let l=new Proxy(s,{get(b,w){if(w===bn)return!0;if(w===_p)return o;if(w==="__raw")return b;if(w==="$update")return u;if(w==="$parse")return g;if(w==="$clean")return h;if(w==="$keys")return m;if(w==="$values")return y;if(w==="$replace")return x;if(w==="$add")return E;if(w==="$remove")return C;if(w==="$destroy")return _;if(w==="$quietUpdate")return d;if(w==="$settled")return p;if(sl.has(w)&&!Object.prototype.hasOwnProperty.call(o,w))switch(w){case"update":return u;case"parse":return g;case"clean":return h;case"keys":return m;case"values":return y;case"replace":return x;case"add":return E;case"remove":return C;case"destroy":return _;case"quietUpdate":return d}if(w==="__element")return b.__element;if(w==="parent")return b.parent;if(w==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,w)){let A=o[w].get();if(A!==void 0||!(w!=="root"&&b.root&&b.root!==l))return A}if(b[w]!==void 0)return typeof w=="string"&&Le(),b[w];let S=typeof w=="string"&&!w.startsWith("__")&&w!=="then"&&w!=="constructor"&&t_()!=null;if(w!=="root"&&b.root&&b.root!==l){let A=b.root[w];return S&&!Object.prototype.hasOwnProperty.call(o,w)&&(o[w]=Fn(void 0),o[w].get()),A}if(S)return o[w]=Fn(void 0),o[w].get();typeof w=="string"&&w.charCodeAt(0)===95&&w.charCodeAt(1)===95&&Le()},set(b,w,S){if(w==="__proto__")return!1;if(w==="__element"||w==="parent"||w==="root"||typeof w=="string"&&w.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,w))return b[w]=S,!0;sl.has(w)&&!a(w)&&c_(w,r);let A=s_(r,w);if(Object.prototype.hasOwnProperty.call(o,w))if(S&&typeof S=="object"&&!i_(S)){if(S===b[w])return!0;let T=o[w].peek(),O=T&&T[bn]?T.$parse():T;if(Sp(S,O,0))return!0;b[w]=S,rl(A),o[w].set(bp(S,e,n+1,A))}else{if(Array.isArray(S)&&S!==b[w]&&Array.isArray(o[w].peek())&&Sp(S,o[w].peek(),0))return!0;o[w].peek()!==S&&rl(A),b[w]=S,o[w].set(S)}else b[w]=S,S&&typeof S=="object"&&!i_(S)?o[w]=Fn(bp(S,e,n+1,A)):o[w]=Fn(S);return!0},has(b,w){return Le(),typeof w=="string"&&w.charCodeAt(0)===36&&sl.has(w.slice(1))?!0:w in b},ownKeys(b){return Le(),Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,w){return Le(),i(w)?{enumerable:!0,configurable:!0,value:o[w].peek()}:Object.getOwnPropertyDescriptor(b,w)},deleteProperty(b,w){if(Object.prototype.hasOwnProperty.call(o,w)){let S=o[w];S.peek()!==void 0&&rl(s_(r,w)),S.set(void 0),S._subscribers.size===0&&delete o[w]}return delete b[w],!0}});function f(b,w){let S=s.__element;return!S||typeof S.onBeforeStateUpdate!="function"||w?.preventBeforeStateUpdateListener?!0:S.onBeforeStateUpdate(S,l,S.context,{changes:b,options:w})!==!1}function u(b,w){if(b&&typeof b=="object"&&!f(b,w))return l;ol(()=>{for(let A in b)A!=="__proto__"&&(l[A]=b[A])});let S=s.__element;return S&&S.onUpdate&&!w?.quiet&&S.onUpdate(S,l,S.context),l}function d(b){return u(b,{quiet:!0})}function p(){return n_().then(()=>l)}function g(b){if(Le(),b||(b=new Set),b.has(l))return"[Circular]";b.add(l);let w={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,S))continue;let A=o[S].peek();A&&A[bn]?w[S]=A.$parse(b):w[S]=A}return w}function h(){return ol(()=>{for(let b in o)delete l[b]}),l}function m(){return Le(),Object.keys(o).filter(i)}function y(){return Le(),Object.keys(o).filter(i).map(b=>o[b].peek())}function x(b,w){return b&&typeof b=="object"&&!f(b,w)||ol(()=>{for(let S in o)S in b||delete l[S];for(let S in b)S!=="__proto__"&&(l[S]=b[S])}),l}function E(b,w){let S=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(S))return l[b]=[...S,w],l;if(S&&typeof S=="object"&&!Array.isArray(S)){if(wp(w))S[bn]?S.$update(w):l[b]={...S,...w};else{let A=String(Object.keys(S).length);S[bn]?S.$update({[A]:w}):l[b]={...S,[A]:w}}return l}return l[b]=w,l}function C(b){return delete l[b],l}function _(){h(),s.__element=null,s.parent=null}return l}function s4(t){return t&&t[bn]===!0}function i4(t){return t[_p]}function a4(t,e){let n={},r={};if(t&&typeof t=="object")for(let a in t)r[a]=t[a],n[a]=Fn(t[a]);let o=a=>{if(Object.prototype.hasOwnProperty.call(n,a))return n;let c=e;for(;c;){let l=c[_p];if(l&&Object.prototype.hasOwnProperty.call(l,a))return l;c=c[bn]?c[yp]:null}return null},s=()=>{let a=e;for(;a&&a[bn];)a=a[yp];return a&&typeof a=="object"?a:null};return new Proxy(r,{get(a,c){return c===bn?!0:c===_p?n:c===yp?e:c==="__raw"?a:Object.prototype.hasOwnProperty.call(n,c)?n[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:a[c]},set(a,c,l){let f=o(c);if(f)return f===n&&(a[c]=l),f[c].set(l),!0;let u=s();return u&&Object.prototype.hasOwnProperty.call(u,c)?(u[c]=l,!0):(a[c]=l,n[c]=Fn(l),!0)},has(a,c){if(Le(),c in n||c in a)return!0;let l=e;for(;l;){if(c in l)return!0;l=l[bn]?l[yp]:null}return!1},ownKeys(){return Le(),Object.keys(n)},getOwnPropertyDescriptor(a,c){return Le(),c in n?{enumerable:!0,configurable:!0,value:n[c].peek()}:Object.getOwnPropertyDescriptor(a,c)}})}var bn,_p,l_,sl,a_,s_,i_,o4,wp,yp,NT=D(()=>{o_();bn=Symbol("store"),_p=Symbol("signals"),l_=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],sl=new Set(l_),a_=new Set,s_=(t,e)=>t?t+"."+e:String(e);i_=t=>!t||typeof t!="object"||Array.isArray(t)||t[bn]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!wp(t),o4=12,wp=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};yp=Symbol("scope.parent")});var Go,xp=D(()=>{Go="3.14.790"});var Bi,ji,u_,d_=D(()=>{xp();Bi="__SMBLS_SIGNAL_INSTANCES__",ji=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Bi]||(r[Bi]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Go),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},u_=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Bi]}});var Ui,$T,p_,FT=D(()=>{xp();d_();Ui="__SMBLS_SIGNAL_ENGINE__",$T=(t,e,n)=>{let r=e||Go,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[Ui];return s&&s.engine&&s.version===r?(ji(r,o,!0),s.engine):(s||(o[Ui]={version:r,engine:t}),ji(r,o,!1),t)},p_=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ui]}});var $t,_n,BT,K,kp,De,il,Yo,Ep,vp,ar,Ap,Et,jT,UT,VT,Cp,HT,zT,WT=D(()=>{o_();NT();FT();xp();d_();$t=$T({...r_,...f_,VERSION:Go},Go),_n=$t.createSignal,BT=$t.createComputed,K=$t.createEffect,kp=$t.batch,De=$t.getObserver,il=$t.setObserver,Yo=$t.untrack||(t=>{let e=$t.getObserver();if(!e)return t();$t.setObserver(null);try{return t()}finally{$t.setObserver(e)}}),Ep=$t.settled||(()=>Promise.resolve()),vp=$t.countUntrackedReads||(t=>(t(),0)),ar=$t.createStore,Ap=$t.createScopeStore,Et=$t.isStore,jT=$t.getSignals,UT=$t.STORE_METHOD_NAMES,VT=$t.RESERVED_STORE_METHODS,Cp=$t.warnStateKeyShadowsMethod,HT=$t.__resetStateShadowWarnings,zT=$t.VERSION});var al={};F(al,{RESERVED_STORE_METHODS:()=>VT,SIGNAL_ENGINE_KEY:()=>Ui,SIGNAL_INSTANCES_KEY:()=>Bi,STORE_METHOD_NAMES:()=>UT,VERSION:()=>zT,__resetSignalEngine:()=>p_,__resetSignalInstances:()=>u_,__resetStateShadowWarnings:()=>HT,batch:()=>kp,countUntrackedReads:()=>vp,createComputed:()=>BT,createEffect:()=>K,createScopeStore:()=>Ap,createSignal:()=>_n,createStore:()=>ar,getObserver:()=>De,getSignals:()=>jT,isStore:()=>Et,registerSignalInstance:()=>ji,setObserver:()=>il,settled:()=>Ep,untrack:()=>Yo,warnStateKeyShadowsMethod:()=>Cp});var Mt=D(()=>{WT()});var g_,m_,R,kt,ll=D(()=>{"use strict";g_=globalThis,m_=globalThis,R=globalThis,kt=R.document});var fr,fl,he,ul=D(()=>{"use strict";ll();fr=t=>(typeof Node=="object"?t instanceof R.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,fl=t=>(typeof HTMLElement=="object"?t instanceof R.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,he=t=>t===null||typeof t!="object"?!1:typeof R<"u"&&(R.Node&&t instanceof R.Node||R.Window&&t instanceof R.Window||t===R||kt!==void 0&&t===kt)});var k,v,ge,L,Tp,Op,I,Rp,V,Ut,Yt,dl,me,y_,Wt=D(()=>{"use strict";ul();k=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,v=t=>typeof t=="string",ge=t=>typeof t=="number",L=t=>typeof t=="function",Tp=t=>t===!0||t===!1,Op=t=>t===null,I=t=>Array.isArray(t),Rp=t=>t instanceof Date,V=t=>t===null?!1:typeof t=="object",Ut=t=>t!==void 0,Yt=t=>t===void 0,dl={boolean:Tp,array:I,object:k,string:v,date:Rp,number:ge,null:Op,function:L,objectLike:V,node:fr,htmlElement:fl,defined:Ut},me=t=>(...e)=>e.some(n=>dl[n](t)),y_=t=>(...e)=>!e.some(n=>dl[n](t))});var b_,__,w_,S_,zi,pl,x_,k_,hl,E_,v_,A_,C_,T_,O_,R_,Wi,gl,Ki=D(()=>{"use strict";Bn();Wt();b_=(t,e)=>e.every(n=>t.includes(n)),__=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},w_=(t,e)=>{if(v(e)&&(e=parseInt(e)),ge(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},S_=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},zi=(...t)=>[].concat(...t),pl=(t,e=[])=>t.reduce((n,r)=>bt(n,pt(r,{exclude:e}),e),{}),x_=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},k_=(t,e)=>{if(!I(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},hl=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},E_=(t,e)=>t.filter(n=>n!==e),v_=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},A_=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},C_=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},T_=(t,e)=>t.filter(n=>!e.includes(n)),O_=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},R_=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},Wi=t=>I(t)?[...new Set(t)]:t,gl=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Xt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!u4(this,t))return t;let i=f4[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let p=u.trim();if(d){let g=c?.context,h=g?.functions?.[d]||g?.utils?.[d]||g?.methods?.[d]||g?.snippets?.[d]||c?.[d];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,h=a;for(let y=0;y<g;y++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let m=ml(h,p);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=ml(a,p);if(g!=null&&typeof g!="object")return String(g);let h=c?.context?.polyglot;if(h?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||h.defaultLang||"en",y=h.translations[m];if(y){let E=ml(y,p);if(E!=null&&typeof E!="object")return String(E);for(let C in y){let _=y[C];if(_&&typeof _=="object"&&!Array.isArray(_)){let b=ml(_,p);if(b!=null&&typeof b!="object")return String(b)}}}let x=ml(h.translations,p);if(x!=null&&typeof x!="object")return String(x)}return""}})}var P_,yl,L_,f4,ml,u4,Jo,D_,d4,I_,M_,N_,p4,$_,F_,bl=D(()=>{"use strict";P_=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),yl=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},L_=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},f4={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},ml=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),u4=(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};Jo=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,D_=(t,e)=>{let n=t.split(`
2
- `),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},d4=/\\([0-7]{1,3})/g,I_=t=>t.replace(d4,(e,n)=>String.fromCharCode(parseInt(n,8))),M_=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),N_=t=>t.replace(/\/\/\/\/\/n/g,`
3
- `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),p4=/[^a-zA-Z0-9\s]/g,$_=t=>t.replace(p4,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),F_=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Jr,_l,B_,Zo,Zr,Qr,j_,qi,Qo,wl,U_,ts=D(()=>{"use strict";Jr=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),_l=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),B_=["ref","parent","__element","__depends","__ref","__children","root"],Zo=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"]),Zr=new Set(["update","__element"]),Qr=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","whenConnected","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"]),j_=t=>Qr.has(t),qi=new Set(["log","warn","error","verbose"]),Qo=t=>Qr.has(t)&&!qi.has(t),wl=new Set(["node","context","extends","__element","__ref",...Qr,...Zo,...Zr]),U_=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var H_,z_,h4,W_,V_,g4,m4,y4,Gi,Pp,Sl,K_=D(()=>{"use strict";H_=["$R?.scope ?? $R?.context?.globalScope ?? {}","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { try { Object.setPrototypeOf(s, g) } catch (_) {} } return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? {}; })()","(() => { const r = $R; const s = r?.scope; const g = r?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? (r && typeof r === 'object' && r !== globalThis ? r : {}); })()"],z_=(t,e)=>t.split("$R").join(e),h4=H_.map(t=>[z_(t,"this"),t]),W_=t=>z_(H_[H_.length-1],t),V_="const __scope = ",g4=/^\(globalThis\[Symbol\.for\('smbls\.libraryScope'\)\] \|\| \(\(_, v\) => v\)\)\("(?:[^"\\]|\\.)*", /,m4=/^\s*(?:async\s*)?(?:\(([^()[\]{}'"`/]*)\)|([A-Za-z_$][\w$]*))\s*=>\s*\{\s*/,y4=/^[A-Za-z_$][\w$]*$/,Gi=(t,e)=>typeof t=="string"&&new RegExp("^"+e+"\\d*$").test(t),Pp=(t,e)=>{if(t.length>=2&&Gi(t[0],"el"))return t[0];if(t.length>=2&&Gi(t[1],"el"))return t[1];if(t.length>=1&&Gi(t[0],"el")||Gi(t[0],"element")||Gi(t[0],"node"))return t[0];if(typeof e=="function"){let n=e();if(n&&t.includes(n))return n}return t.find(n=>Gi(n,"element"))||null},Sl=t=>{if(typeof t!="string"||t.indexOf(V_)===-1||t.indexOf("this")===-1)return t;let e=m4.exec(t);if(!e)return t;let n=e[0].length;if(!t.startsWith(V_,n))return t;n+=V_.length;let r=g4.exec(t.slice(n,n+400));r&&(n+=r[0].length);let o=h4.find(([l])=>t.startsWith(l,n));if(!o)return t;let s=n+o[0].length;if(t[s]!==(r?")":";"))return t;let a=(e[1]!==void 0?e[1]:e[2]).split(",").map(l=>l.split("=")[0].trim()).filter(Boolean);if(a.some(l=>!y4.test(l)))return t;let c=Pp(a);return c?t.slice(0,n)+z_(o[1],c)+t.slice(s):t}});var b4,jn,xl=D(()=>{"use strict";b4=Symbol.for("smbls.serverUtils"),jn=(t,e)=>{let n=globalThis[b4];return typeof n!="function"?Promise.reject(new Error(`[smbls] ${t} is server-only in this build and no smbls runtime registered its loader`)):n().then(r=>r[t](...e))}});function D4(){let t=es.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var KT,ns,St,G_,Lt,bt,t1,Y_,pt,El,_4,w4,qT,vl,S4,x4,k4,oe,e1,E4,Lp,n1,q_,es,v4,A4,C4,T4,O4,GT,R4,YT,P4,XT,Dp,L4,I4,M4,N4,JT,X_,Ie,rs,$4,F4,ye,r1,o1,s1,i1,a1,c1,l1,Al,Cl,Yi,os,ZT,kl,QT,ss,J_,Z_,Ip,Q_,tw,Tl,is,se,Mp,B4,ew,nw,Np,rw,ow,sw,iw,aw,cw,lw,Bn=D(()=>{"use strict";ll();Wt();Ki();bl();ul();ts();K_();xl();KT="production",ns=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,St=(t,e,n,r)=>{if(L(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&&(I(t)||k(t)&&!he(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 St(i,e,n,r)}}return t},G_=(t,e,n)=>{for(let r in e)t[r]=St(e[r],n)},Lt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(ns(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},bt=(t,e,n=wl)=>t1(t,e,n,null),t1=(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)||ns(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(V(i)&&V(a)){let c=r||[];c.push(t,e),t1(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Y_=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(ns(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},pt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!V(t)||he(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=u=>a?a.has(u):n.includes(u),l=I(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||ns(p)||p==="__proto__"||c(p))continue;let g=u[p];if(!(r&&g===void 0)&&!(o&&g===null)){if(he(g)){d[p]=g;continue}if(i&&p==="extends"&&I(g)){d[p]=pl(g,n);continue}if(L(g)){d[p]=g;continue}if(V(g))if(s.has(g))d[p]=s.get(g);else{let h=I(g)?[]:{};s.set(g,h),d[p]=h,f.push([g,h])}else d[p]=g}}}return l},El=(t,e={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("deepStringifyFunctions",[t,e]);(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let n in t){let r=t[n];if(L(r))e[n]=r.toString();else if(k(r))e[n]={},El(r,e[n]);else if(I(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];k(i)?(o[s]={},El(i,o[s])):L(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},_4=/^[A-Za-z_$][A-Za-z0-9_$]*$/,w4=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,qT=t=>{let e=String(t);return yl(e,[`
4
- `,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},vl=(t={},e=0)=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("objectToString",[t,e]);if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let n=!1;for(let s in t){n=!0;break}if(!n)return"{}";let r=" ".repeat(e),o=`{
5
- `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=_4.test(s)?s:w4(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(I(i)){o+=`[
1
+ "use strict";var G3=Object.create;var gp=Object.defineProperty;var Y3=Object.getOwnPropertyDescriptor;var X3=Object.getOwnPropertyNames;var J3=Object.getPrototypeOf,Z3=Object.prototype.hasOwnProperty;var D=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var Qb=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},F=(t,e)=>{for(var n in e)gp(t,n,{get:e[n],enumerable:!0})},NT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of X3(e))!Z3.call(t,o)&&o!==n&&gp(t,o,{get:()=>e[o],enumerable:!(r=Y3(e,o))||r.enumerable});return t};var $T=(t,e,n)=>(n=t!=null?G3(J3(t)):{},NT(e||!t||!t.__esModule?gp(n,"default",{value:t,enumerable:!0}):n,t)),Q3=t=>NT(gp({},"__esModule",{value:!0}),t);var a_={};F(a_,{WRITE_JOURNAL:()=>rl,batch:()=>il,countUntrackedReads:()=>n4,createComputed:()=>r4,createEffect:()=>o4,createSignal:()=>Bn,getObserver:()=>o_,journalWrite:()=>sl,noteUntrackedRead:()=>De,setObserver:()=>t4,settled:()=>i_,untrack:()=>e4});function e4(t){let e=Qt;if(!e)return t();Qt=null;try{return t()}finally{Qt=e}}function De(){t_!==0&&mp++}function n4(t){let e=mp;t_++;let n;try{t()}finally{n=mp-e,--t_===0&&(mp=0)}return n}function Bn(t){let e=new Set;function n(){return Qt&&(e.add(Qt),Qt._sources.add(s)),t}function r(i){i!==t&&(t=i,u4(e))}function o(){return t}let s={get:n,set:r,peek:o,_subscribers:e,_type:"signal"};return s}function r4(t){let e,n=!0,r=new Set,o={_sources:new Set,_type:"computed",_subscribers:r,_execute(){r_(o);let s=Qt;Qt=o;try{e=t(),n=!1}finally{Qt=s}},_notify(){n=!0,r.size>0&&UT(r)},get(){return Qt&&(r.add(Qt),Qt._sources.add(o)),n&&o._execute(),e},peek(){return n&&o._execute(),e}};return o._execute(),o}function sl(t){rl.push(t),rl.length>32&&rl.shift()}function o4(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;r_(r);let o=Qt;Qt=r;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{Qt=o}},_notify(){r._disposed||(el>0?nl.push(r):yp>0?e_.push(r):s_(r))},dispose(){r._disposed=!0,r_(r)}};return r._execute(),r}function il(t){el++;try{t()}finally{el--,el===0&&f4()}}function BT(){return typeof performance<"u"?performance.now():Date.now()}function s_(t){Ye.add(t),!_p&&(bp||(bp=!0,queueMicrotask(jT)))}function c4(){if(Ye.size===1){let[e]=Ye;return Ye.clear(),e._disposed?0:(e._execute(),1)}ji.length=0;for(let e of Ye)ji.push(e);Ye.clear(),ji.sort((e,n)=>e._depth-n._depth);let t=0;for(let e=0;e<ji.length;e++){let n=ji[e];n._disposed||(n._execute(),t++)}return ji.length=0,t}function jT(t=0,e=0){if(bp=!1,Ye.size===0){ol.length&&n_();return}_p=!0;let n=BT(),r=!1;try{for(;Ye.size>0;){if(++t>FT){let o=new Map;for(let c of Ye){let l=c._label;if(typeof l=="function")try{l=l()}catch{l="<label error>"}if(l=l||"<unlabeled>",o.set(l,(o.get(l)||0)+1),o.size>=12)break}let s=[...o.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", "),i=new Map;for(let c of rl)i.set(c,(i.get(c)||0)+1);let a=[...i.entries()].map(([c,l])=>l>1?`${c} \xD7${l}`:c).join(", ");console.error("[smbls] reactive effect cascade exceeded",FT,"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>"),Ye.clear();break}if(e+=c4(),Ye.size>0&&(e>=i4||t>=a4)&&BT()-n>s4){r=!0,setTimeout(()=>jT(t,e),0);break}}}finally{r||(_p=!1,ol.length&&n_())}}function l4(){return Ye.size===0&&!bp&&!_p&&nl.length===0&&el===0}function n_(){if(ol.length===0||!l4())return;let t=ol.splice(0);for(let e=0;e<t.length;e++)t[e]()}function i_(){return new Promise(t=>{ol.push(t),queueMicrotask(n_)})}function f4(){for(let t=0;t<nl.length;t++)s_(nl[t]);nl.length=0}function UT(t){yp++;try{for(let e of t)e._notify()}finally{if(yp--,yp===0&&e_.length>0){let e=e_.splice(0);for(let n=0;n<e.length;n++)s_(e[n])}}}function u4(t){UT(t)}function r_(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Qt,el,nl,o_,t4,t_,mp,yp,e_,Ye,bp,rl,_p,FT,s4,i4,a4,ji,ol,c_=D(()=>{Qt=null,el=0,nl=[],o_=()=>Qt,t4=t=>{Qt=t};t_=0,mp=0;yp=0,e_=[];Ye=new Set,bp=!1,rl=[];_p=!1,FT=1e3,s4=8,i4=256,a4=4;ji=[];ol=[]});var h_={};F(h_,{RESERVED_STORE_METHODS:()=>al,STORE_METHOD_NAMES:()=>p_,__resetStateShadowWarnings:()=>d4,createScopeStore:()=>m4,createStore:()=>Sp,getSignals:()=>g4,isStore:()=>h4,warnStateKeyShadowsMethod:()=>d_});function d_(t,e){let n=(e||"")+"::"+t;if(u_.has(n))return;u_.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: ${p_.join(", ")}.`;typeof console<"u"&&console.warn&&console.warn(o)}function d4(){u_.clear()}function Ep(t,e,n){if(t===e)return!0;if(n>p4)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(!Ep(t[r],e[r],n+1))return!1;return!0}if(kp(t)&&kp(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)||!Ep(t[s],e[s],n+1))return!1;return!0}return!1}function Sp(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=b=>{if(!r||!e||typeof e.isDataOnlyKey!="function")return!1;let w=r.indexOf(".");return!!e.isDataOnlyKey(w===-1?r:r.slice(0,w),b)},c=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}al.has(b)&&!a(b)&&d_(b,r);let w=t[b];n<c&&w&&typeof w=="object"&&!f_(w)?(s[b]=w,o[b]=Bn(Sp(w,e,n+1,l_(r,b)))):(s[b]=w,o[b]=Bn(w))}let l=new Proxy(s,{get(b,w){if(w===_n)return!0;if(w===xp)return o;if(w==="__raw")return b;if(w==="$update")return u;if(w==="$parse")return g;if(w==="$clean")return h;if(w==="$keys")return m;if(w==="$values")return y;if(w==="$replace")return x;if(w==="$add")return E;if(w==="$remove")return C;if(w==="$destroy")return _;if(w==="$quietUpdate")return d;if(w==="$settled")return p;if(al.has(w)&&!Object.prototype.hasOwnProperty.call(o,w))switch(w){case"update":return u;case"parse":return g;case"clean":return h;case"keys":return m;case"values":return y;case"replace":return x;case"add":return E;case"remove":return C;case"destroy":return _;case"quietUpdate":return d}if(w==="__element")return b.__element;if(w==="parent")return b.parent;if(w==="root")return b.root;if(Object.prototype.hasOwnProperty.call(o,w)){let A=o[w].get();if(A!==void 0||!(w!=="root"&&b.root&&b.root!==l))return A}if(b[w]!==void 0)return typeof w=="string"&&De(),b[w];let S=typeof w=="string"&&!w.startsWith("__")&&w!=="then"&&w!=="constructor"&&o_()!=null;if(w!=="root"&&b.root&&b.root!==l){let A=b.root[w];return S&&!Object.prototype.hasOwnProperty.call(o,w)&&(o[w]=Bn(void 0),o[w].get()),A}if(S)return o[w]=Bn(void 0),o[w].get();typeof w=="string"&&w.charCodeAt(0)===95&&w.charCodeAt(1)===95&&De()},set(b,w,S){if(w==="__proto__")return!1;if(w==="__element"||w==="parent"||w==="root"||typeof w=="string"&&w.startsWith("__")&&!Object.prototype.hasOwnProperty.call(o,w))return b[w]=S,!0;al.has(w)&&!a(w)&&d_(w,r);let A=l_(r,w);if(Object.prototype.hasOwnProperty.call(o,w))if(S&&typeof S=="object"&&!f_(S)){if(S===b[w])return!0;let T=o[w].peek(),O=T&&T[_n]?T.$parse():T;if(Ep(S,O,0))return!0;b[w]=S,sl(A),o[w].set(Sp(S,e,n+1,A))}else{if(Array.isArray(S)&&S!==b[w]&&Array.isArray(o[w].peek())&&Ep(S,o[w].peek(),0))return!0;o[w].peek()!==S&&sl(A),b[w]=S,o[w].set(S)}else b[w]=S,S&&typeof S=="object"&&!f_(S)?o[w]=Bn(Sp(S,e,n+1,A)):o[w]=Bn(S);return!0},has(b,w){return De(),typeof w=="string"&&w.charCodeAt(0)===36&&al.has(w.slice(1))?!0:w in b},ownKeys(b){return De(),Object.keys(o).filter(i)},getOwnPropertyDescriptor(b,w){return De(),i(w)?{enumerable:!0,configurable:!0,value:o[w].peek()}:Object.getOwnPropertyDescriptor(b,w)},deleteProperty(b,w){if(Object.prototype.hasOwnProperty.call(o,w)){let S=o[w];S.peek()!==void 0&&sl(l_(r,w)),S.set(void 0),S._subscribers.size===0&&delete o[w]}return delete b[w],!0}});function f(b,w){let S=s.__element;return!S||typeof S.onBeforeStateUpdate!="function"||w?.preventBeforeStateUpdateListener?!0:S.onBeforeStateUpdate(S,l,S.context,{changes:b,options:w})!==!1}function u(b,w){if(b&&typeof b=="object"&&!f(b,w))return l;il(()=>{for(let A in b)A!=="__proto__"&&(l[A]=b[A])});let S=s.__element;return S&&S.onUpdate&&!w?.quiet&&S.onUpdate(S,l,S.context),l}function d(b){return u(b,{quiet:!0})}function p(){return i_().then(()=>l)}function g(b){if(De(),b||(b=new Set),b.has(l))return"[Circular]";b.add(l);let w={};for(let S in o){if(S==="parent"||S==="root"||S.startsWith("__")||!Object.prototype.hasOwnProperty.call(s,S))continue;let A=o[S].peek();A&&A[_n]?w[S]=A.$parse(b):w[S]=A}return w}function h(){return il(()=>{for(let b in o)delete l[b]}),l}function m(){return De(),Object.keys(o).filter(i)}function y(){return De(),Object.keys(o).filter(i).map(b=>o[b].peek())}function x(b,w){return b&&typeof b=="object"&&!f(b,w)||il(()=>{for(let S in o)S in b||delete l[S];for(let S in b)S!=="__proto__"&&(l[S]=b[S])}),l}function E(b,w){let S=Object.prototype.hasOwnProperty.call(o,b)?o[b].peek():s[b];if(Array.isArray(S))return l[b]=[...S,w],l;if(S&&typeof S=="object"&&!Array.isArray(S)){if(kp(w))S[_n]?S.$update(w):l[b]={...S,...w};else{let A=String(Object.keys(S).length);S[_n]?S.$update({[A]:w}):l[b]={...S,[A]:w}}return l}return l[b]=w,l}function C(b){return delete l[b],l}function _(){h(),s.__element=null,s.parent=null}return l}function h4(t){return t&&t[_n]===!0}function g4(t){return t[xp]}function m4(t,e){let n={},r={};if(t&&typeof t=="object")for(let a in t)r[a]=t[a],n[a]=Bn(t[a]);let o=a=>{if(Object.prototype.hasOwnProperty.call(n,a))return n;let c=e;for(;c;){let l=c[xp];if(l&&Object.prototype.hasOwnProperty.call(l,a))return l;c=c[_n]?c[wp]:null}return null},s=()=>{let a=e;for(;a&&a[_n];)a=a[wp];return a&&typeof a=="object"?a:null};return new Proxy(r,{get(a,c){return c===_n?!0:c===xp?n:c===wp?e:c==="__raw"?a:Object.prototype.hasOwnProperty.call(n,c)?n[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:a[c]},set(a,c,l){let f=o(c);if(f)return f===n&&(a[c]=l),f[c].set(l),!0;let u=s();return u&&Object.prototype.hasOwnProperty.call(u,c)?(u[c]=l,!0):(a[c]=l,n[c]=Bn(l),!0)},has(a,c){if(De(),c in n||c in a)return!0;let l=e;for(;l;){if(c in l)return!0;l=l[_n]?l[wp]:null}return!1},ownKeys(){return De(),Object.keys(n)},getOwnPropertyDescriptor(a,c){return De(),c in n?{enumerable:!0,configurable:!0,value:n[c].peek()}:Object.getOwnPropertyDescriptor(a,c)}})}var _n,xp,p_,al,u_,l_,f_,p4,kp,wp,VT=D(()=>{c_();_n=Symbol("store"),xp=Symbol("signals"),p_=["update","parse","clean","keys","values","replace","add","remove","destroy","quietUpdate"],al=new Set(p_),u_=new Set,l_=(t,e)=>t?t+"."+e:String(e);f_=t=>!t||typeof t!="object"||Array.isArray(t)||t[_n]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName||!kp(t),p4=12,kp=t=>{if(!t||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};wp=Symbol("scope.parent")});var Yo,vp=D(()=>{Yo="3.14.790"});var Ui,Vi,g_,m_=D(()=>{vp();Ui="__SMBLS_SIGNAL_INSTANCES__",Vi=(t,e,n)=>{let r=e||(typeof globalThis<"u"?globalThis:null);if(!r)return null;let o=r[Ui]||(r[Ui]={versions:[],engines:0,reported:!1});return typeof o.engines!="number"&&(o.engines=o.versions.length),o.versions.push(t||Yo),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},g_=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[Ui]}});var zi,zT,y_,HT=D(()=>{vp();m_();zi="__SMBLS_SIGNAL_ENGINE__",zT=(t,e,n)=>{let r=e||Yo,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[zi];return s&&s.engine&&s.version===r?(Vi(r,o,!0),s.engine):(s||(o[zi]={version:r,engine:t}),Vi(r,o,!1),t)},y_=t=>{let e=t||(typeof globalThis<"u"?globalThis:null);e&&delete e[zi]}});var $t,wn,WT,K,Ap,Ie,cl,Xo,Cp,Tp,lr,Op,Et,KT,qT,GT,Rp,YT,y4,XT=D(()=>{c_();VT();HT();vp();m_();$t=zT({...a_,...h_,VERSION:Yo},Yo),wn=$t.createSignal,WT=$t.createComputed,K=$t.createEffect,Ap=$t.batch,Ie=$t.getObserver,cl=$t.setObserver,Xo=$t.untrack||(t=>{let e=$t.getObserver();if(!e)return t();$t.setObserver(null);try{return t()}finally{$t.setObserver(e)}}),Cp=$t.settled||(()=>Promise.resolve()),Tp=$t.countUntrackedReads||(t=>(t(),0)),lr=$t.createStore,Op=$t.createScopeStore,Et=$t.isStore,KT=$t.getSignals,qT=$t.STORE_METHOD_NAMES,GT=$t.RESERVED_STORE_METHODS,Rp=$t.warnStateKeyShadowsMethod,YT=$t.__resetStateShadowWarnings,y4=$t.VERSION});var ll={};F(ll,{RESERVED_STORE_METHODS:()=>GT,SIGNAL_ENGINE_KEY:()=>zi,SIGNAL_INSTANCES_KEY:()=>Ui,STORE_METHOD_NAMES:()=>qT,VERSION:()=>y4,__resetSignalEngine:()=>y_,__resetSignalInstances:()=>g_,__resetStateShadowWarnings:()=>YT,batch:()=>Ap,countUntrackedReads:()=>Tp,createComputed:()=>WT,createEffect:()=>K,createScopeStore:()=>Op,createSignal:()=>wn,createStore:()=>lr,getObserver:()=>Ie,getSignals:()=>KT,isStore:()=>Et,registerSignalInstance:()=>Vi,setObserver:()=>cl,settled:()=>Cp,untrack:()=>Xo,warnStateKeyShadowsMethod:()=>Rp});var Mt=D(()=>{XT()});var __,w_,R,kt,ul=D(()=>{"use strict";__=globalThis,w_=globalThis,R=globalThis,kt=R.document});var dr,dl,ge,pl=D(()=>{"use strict";ul();dr=t=>(typeof Node=="object"?t instanceof R.Node:t&&typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.nodeName=="string")||!1,dl=t=>(typeof HTMLElement=="object"?t instanceof R.HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string")||!1,ge=t=>t===null||typeof t!="object"?!1:typeof R<"u"&&(R.Node&&t instanceof R.Node||R.Window&&t instanceof R.Window||t===R||kt!==void 0&&t===kt)});var k,v,me,L,Pp,Lp,I,Dp,V,Ut,Xt,hl,ye,S_,Wt=D(()=>{"use strict";pl();k=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,v=t=>typeof t=="string",me=t=>typeof t=="number",L=t=>typeof t=="function",Pp=t=>t===!0||t===!1,Lp=t=>t===null,I=t=>Array.isArray(t),Dp=t=>t instanceof Date,V=t=>t===null?!1:typeof t=="object",Ut=t=>t!==void 0,Xt=t=>t===void 0,hl={boolean:Pp,array:I,object:k,string:v,date:Dp,number:me,null:Lp,function:L,objectLike:V,node:dr,htmlElement:dl,defined:Ut},ye=t=>(...e)=>e.some(n=>hl[n](t)),S_=t=>(...e)=>!e.some(n=>hl[n](t))});var x_,k_,E_,v_,Ki,gl,A_,C_,ml,T_,O_,R_,P_,L_,D_,I_,qi,yl,Gi=D(()=>{"use strict";jn();Wt();x_=(t,e)=>e.every(n=>t.includes(n)),k_=(t,e)=>{let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n},E_=(t,e)=>{if(v(e)&&(e=parseInt(e)),me(e)){if(e<0||e>=t.length||isNaN(e))throw new Error("Invalid index");t.splice(e,1)}else throw new Error("Invalid index");return t},v_=(t,e,n)=>{e<0||n<0||e>=t.length||n>=t.length||([t[e],t[n]]=[t[n],t[e]])},Ki=(...t)=>[].concat(...t),gl=(t,e=[])=>t.reduce((n,r)=>bt(n,pt(r,{exclude:e}),e),{}),A_=(t,e)=>{let n=t.indexOf(e);return n!==-1?t.slice(0,n):t},C_=(t,e)=>{if(!I(t))return;let n=t.indexOf(e);return n!==-1?t.slice(n+1):t},ml=(t,e)=>{let n=t.indexOf(e);if(n>-1){let r=[...t];return r.splice(n,1),r}return t},T_=(t,e)=>t.filter(n=>n!==e),O_=(t,e)=>{let n=[];for(let r=0;r<t.length;r++)n.push(t[r]),r<t.length-1&&n.push(e);return n},R_=(t,e,n)=>{let r=[...t],o=r.indexOf(e),s=r.indexOf(n);if(o!==-1&&s!==-1){let i=r.splice(o,1)[0],a=s<o?s:s+1;r.splice(a,0,i)}return r},P_=(t,e)=>{if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},L_=(t,e)=>t.filter(n=>!e.includes(n)),D_=(t,e)=>{let n=new Set(e);return t.filter(r=>!n.has(r))},I_=(t,e)=>{if(!t)return 0;let n=0;for(let r=0;r<e.length;r++)t.includes(e[r])&&n++;return n},qi=t=>I(t)?[...new Set(t)]:t,yl=(t,e)=>{for(let n in e)Object.defineProperty(t,n,{value:e[n],enumerable:!1,configurable:!0,writable:!0})}});function Jt(t,e,n={}){let{bracketsLength:r=2,authored:o=!1}=n,s=r===3?"{{{":"{{";if(!t.includes(s)||o!==!0&&!S4(this,t))return t;let i=w4[r],a=e||this.state||{},c=this;return t.replace(i,(l,f,u,d)=>{let p=u.trim();if(d){let g=c?.context,h=g?.functions?.[d]||g?.utils?.[d]||g?.methods?.[d]||g?.snippets?.[d]||c?.[d];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(f){let g=(f.match(/\.\.\//g)||[]).length,h=a;for(let y=0;y<g;y++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let m=bl(h,p);return m!=null&&typeof m=="object"?"":String(m??"")}else{let g=bl(a,p);if(g!=null&&typeof g!="object")return String(g);let h=c?.context?.polyglot;if(h?.translations){let m=a?.root?.lang||a?.lang||c?.context?.state?.lang||h.defaultLang||"en",y=h.translations[m];if(y){let E=bl(y,p);if(E!=null&&typeof E!="object")return String(E);for(let C in y){let _=y[C];if(_&&typeof _=="object"&&!Array.isArray(_)){let b=bl(_,p);if(b!=null&&typeof b!="object")return String(b)}}}let x=bl(h.translations,p);if(x!=null&&typeof x!="object")return String(x)}return""}})}var M_,_l,N_,w4,bl,S4,Zo,$_,x4,F_,B_,j_,k4,U_,V_,wl=D(()=>{"use strict";M_=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_l=(t,e)=>{for(let n of e)if(t.includes(n))return!0;return!1},N_=(t,e)=>{let n=new RegExp(`[${e.join("\\")}]`,"g");return t.replace(n,"")},w4={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},bl=(t,e)=>e.split(".").reduce((n,r)=>n?.[r],t),S4=(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};Zo=t=>`${t.charAt(0).toLowerCase()}${t.slice(1)}`,$_=(t,e)=>{let n=t.split(`
2
+ `),r=-1,o=-1,s=-1,i=-1,a=new RegExp(`\\b${e}\\b\\s*:\\s*`),c=0,l=!1;for(let f=0;f<n.length;f++)if(a.test(n[f])&&!l){if(l=!0,r=f+1,s=n[f].indexOf(e)+1,n[f].includes("{}")){o=r,i=n[f].indexOf("{}")+3;break}let u=n[f].slice(s+e.length);if(u.includes("{")||u.includes("["))c=1;else{o=f+1,i=n[f].length+1;break}}else if(l&&(c+=(n[f].match(/{/g)||[]).length,c+=(n[f].match(/\[/g)||[]).length,c-=(n[f].match(/}/g)||[]).length,c-=(n[f].match(/]/g)||[]).length,c===0)){o=f+1,i=n[f].lastIndexOf("}")!==-1?n[f].lastIndexOf("}")+2:n[f].length+1;break}return{startColumn:s,endColumn:i,startLineNumber:r,endLineNumber:o}},x4=/\\([0-7]{1,3})/g,F_=t=>t.replace(x4,(e,n)=>String.fromCharCode(parseInt(n,8))),B_=t=>t.replace(/\n/g,"/////n").replace(/`/g,"/////tilde").replace(/\$/g,"/////dlrsgn"),j_=t=>t.replace(/\/\/\/\/\/n/g,`
3
+ `).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),k4=/[^a-zA-Z0-9\s]/g,U_=t=>t.replace(k4,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),V_=t=>t.replace(/%[0-9A-Fa-f]{2}/g,e=>String.fromCharCode(parseInt(e.slice(1),16)))});var Qr,Sl,z_,Qo,to,eo,H_,Yi,ts,xl,W_,es=D(()=>{"use strict";Qr=new Set(["attr","style","text","html","content","data","classlist","state","scope","root","deps","extend","extends","$router","routes","children","childExtend","childExtends","childExtendRecursive","childExtendsRecursive","props","if","define","__name","__ref","__hash","__text","key","tag","query","parent","node","variables","on","fetch","component","context","preventContentUpdate","preventContentRecreate"]),Sl=new Set(["attr","style","text","html","content","data","class","state","scope","children","props","if","key","tag","query","on","context"]),z_=["ref","parent","__element","__depends","__ref","__children","root"],Qo=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"]),to=new Set(["update","__element"]),eo=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","whenConnected","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"]),H_=t=>eo.has(t),Yi=new Set(["log","warn","error","verbose"]),ts=t=>eo.has(t)&&!Yi.has(t),xl=new Set(["node","context","extends","__element","__ref",...eo,...Qo,...to]),W_=new Set(["init","beforeClassAssign","render","renderRouter","attachNode","stateInit","stateCreated","beforeStateUpdate","stateUpdate","beforeUpdate","done","create","complete","frame","update","fetchError","fetchComplete"])});var q_,G_,E4,Y_,K_,v4,A4,C4,Xi,Ip,kl,X_=D(()=>{"use strict";q_=["$R?.scope ?? $R?.context?.globalScope ?? {}","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) Object.setPrototypeOf(s, g); return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { try { Object.setPrototypeOf(s, g) } catch (_) {} } return s ?? g ?? {}; })()","(() => { const s = $R?.scope; const g = $R?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? {}; })()","(() => { const r = $R; const s = r?.scope; const g = r?.context?.globalScope; if (s && g && s !== g && Object.getPrototypeOf(s) !== g) { let __p = g, __cyc = false; while (__p) { if (__p === s) { __cyc = true; break } __p = Object.getPrototypeOf(__p) } if (!__cyc) { try { Object.setPrototypeOf(s, g) } catch (_) {} } } return s ?? g ?? (r && typeof r === 'object' && r !== globalThis ? r : {}); })()"],G_=(t,e)=>t.split("$R").join(e),E4=q_.map(t=>[G_(t,"this"),t]),Y_=t=>G_(q_[q_.length-1],t),K_="const __scope = ",v4=/^\(globalThis\[Symbol\.for\('smbls\.libraryScope'\)\] \|\| \(\(_, v\) => v\)\)\("(?:[^"\\]|\\.)*", /,A4=/^\s*(?:async\s*)?(?:\(([^()[\]{}'"`/]*)\)|([A-Za-z_$][\w$]*))\s*=>\s*\{\s*/,C4=/^[A-Za-z_$][\w$]*$/,Xi=(t,e)=>typeof t=="string"&&new RegExp("^"+e+"\\d*$").test(t),Ip=(t,e)=>{if(t.length>=2&&Xi(t[0],"el"))return t[0];if(t.length>=2&&Xi(t[1],"el"))return t[1];if(t.length>=1&&Xi(t[0],"el")||Xi(t[0],"element")||Xi(t[0],"node"))return t[0];if(typeof e=="function"){let n=e();if(n&&t.includes(n))return n}return t.find(n=>Xi(n,"element"))||null},kl=t=>{if(typeof t!="string"||t.indexOf(K_)===-1||t.indexOf("this")===-1)return t;let e=A4.exec(t);if(!e)return t;let n=e[0].length;if(!t.startsWith(K_,n))return t;n+=K_.length;let r=v4.exec(t.slice(n,n+400));r&&(n+=r[0].length);let o=E4.find(([l])=>t.startsWith(l,n));if(!o)return t;let s=n+o[0].length;if(t[s]!==(r?")":";"))return t;let a=(e[1]!==void 0?e[1]:e[2]).split(",").map(l=>l.split("=")[0].trim()).filter(Boolean);if(a.some(l=>!C4.test(l)))return t;let c=Ip(a);return c?t.slice(0,n)+G_(o[1],c)+t.slice(s):t}});var T4,Un,El=D(()=>{"use strict";T4=Symbol.for("smbls.serverUtils"),Un=(t,e)=>{let n=globalThis[T4];return typeof n!="function"?Promise.reject(new Error(`[smbls] ${t} is server-only in this build and no smbls runtime registered its loader`)):n().then(r=>r[t](...e))}});function z4(){let t=ns.get(this);return t?t.src.trim():Function.prototype.toString.call(this)}var JT,rs,St,Z_,Lt,bt,sO,Q_,pt,Al,O4,R4,ZT,Cl,P4,L4,D4,se,iO,I4,Mp,aO,J_,ns,M4,N4,$4,F4,B4,QT,j4,tO,U4,eO,Np,V4,H4,W4,K4,nO,tw,Me,os,q4,G4,be,cO,lO,fO,uO,dO,pO,hO,Tl,Ol,Ji,ss,rO,vl,oO,is,ew,nw,$p,rw,ow,Rl,as,ie,Fp,Y4,sw,iw,Bp,aw,cw,lw,fw,uw,dw,pw,jn=D(()=>{"use strict";ul();Wt();Gi();wl();pl();es();X_();El();JT="production",rs=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,St=(t,e,n,r)=>{if(L(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&&(I(t)||k(t)&&!ge(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 St(i,e,n,r)}}return t},Z_=(t,e,n)=>{for(let r in e)t[r]=St(e[r],n)},Lt=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(rs(o)||(r?n.has(o):n.includes(o))||t[o]===void 0&&(t[o]=e[o]));return t},bt=(t,e,n=xl)=>sO(t,e,n,null),sO=(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)||rs(s)||s==="constructor"||s==="prototype"||(o?n.has(s):n.includes(s)))continue;let i=t[s],a=e[s];if(V(i)&&V(a)){let c=r||[];c.push(t,e),sO(i,a,n,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},Q_=(t,e=[])=>{let n=e instanceof Set,r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(rs(o)||(n?e.has(o):e.includes(o))||(r[o]=t[o]));return r},pt=(t,e={})=>{let{exclude:n=[],cleanUndefined:r=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!V(t)||ge(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=u=>a?a.has(u):n.includes(u),l=I(t)?[]:{};s.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||rs(p)||p==="__proto__"||c(p))continue;let g=u[p];if(!(r&&g===void 0)&&!(o&&g===null)){if(ge(g)){d[p]=g;continue}if(i&&p==="extends"&&I(g)){d[p]=gl(g,n);continue}if(L(g)){d[p]=g;continue}if(V(g))if(s.has(g))d[p]=s.get(g);else{let h=I(g)?[]:{};s.set(g,h),d[p]=h,f.push([g,h])}else d[p]=g}}}return l},Al=(t,e={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("deepStringifyFunctions",[t,e]);(t.node||t.__ref||t.parent||t.__element||t.parse)&&((t.__element||t.parent?.__element).warn("Trying to clone element or state at",t),t=t.parse?.());for(let n in t){let r=t[n];if(L(r))e[n]=r.toString();else if(k(r))e[n]={},Al(r,e[n]);else if(I(r)){let o=e[n]=[];for(let s=0;s<r.length;s++){let i=r[s];k(i)?(o[s]={},Al(i,o[s])):L(i)?o[s]=i.toString():o[s]=i}}else e[n]=r}return e},O4=/^[A-Za-z_$][A-Za-z0-9_$]*$/,R4=t=>`'${String(t).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r").replace(/\n/g,"\\n")}'`,ZT=t=>{let e=String(t);return _l(e,[`
4
+ `,"'"])?"`"+e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${")+"`":"'"+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\r/g,"\\r")+"'"},Cl=(t={},e=0)=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("objectToString",[t,e]);if(t===null||typeof t!="object"||t instanceof RegExp)return String(t);let n=!1;for(let s in t){n=!0;break}if(!n)return"{}";let r=" ".repeat(e),o=`{
5
+ `;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=t[s],a=O4.test(s)?s:R4(s);if(o+=`${r} ${a}: `,i instanceof RegExp)o+=String(i);else if(I(i)){o+=`[
6
6
  `;for(let c of i)c instanceof RegExp?o+=`${r} ${String(c)},
7
- `:V(c)&&c!==null?o+=`${r} ${vl(c,e+2)},
8
- `:v(c)?o+=`${r} ${qT(c)},
7
+ `:V(c)&&c!==null?o+=`${r} ${Cl(c,e+2)},
8
+ `:v(c)?o+=`${r} ${ZT(c)},
9
9
  `:o+=`${r} ${c},
10
- `;o+=`${r} ]`}else V(i)?o+=vl(i,e+1):v(i)?o+=qT(i):o+=i;o+=`,
11
- `}return o+=`${r}}`,o},S4=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],x4=/^["[{]/,k4=/^(export|import)\s/,oe=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let n=e.includes("=>");if(!n&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||k4.test(e)||!S4.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||x4.test(e)&&!n)},e1=t=>(0,eval)(t),E4=(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,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
10
+ `;o+=`${r} ]`}else V(i)?o+=Cl(i,e+1):v(i)?o+=ZT(i):o+=i;o+=`,
11
+ `}return o+=`${r}}`,o},P4=[/^\(\s*\{[^}]*\}\s*\)\s*=>/,/^(\([^)]*\)|[^=]*)\s*=>/,/^function[\s(]/,/^async\s+/,/^\(\s*function/,/^[a-zA-Z_$][a-zA-Z0-9_$]*\s*=>/,/^(?:\*\s*)?[a-zA-Z_$][\w$]*\s*\((?:[^()]|\([^()]*\))*\)\s*\{[\s\S]*\}$/],L4=/^["[{]/,D4=/^(export|import)\s/,se=t=>{if(!t)return!1;let e=t.trim();if(e===""||e==="{}"||e==="[]")return!1;let n=e.includes("=>");if(!n&&e.charCodeAt(0)!==40&&!e.startsWith("function")&&!e.startsWith("async")&&!(e.charCodeAt(e.length-1)===125&&e.includes("("))||D4.test(e)||!P4.some(s=>s.test(e)))return!1;let o=e.charCodeAt(0);return!(o===123&&!n||o===91||L4.test(e)&&!n)},iO=t=>(0,eval)(t),I4=(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,l=new RegExp("^(?:const|let|var)\\s+"+e+"\\b");for(;s<c&&i>0;){let u=t[s];if(u==="/"&&t[s+1]==="/"){let d=t.indexOf(`
12
12
  `,s);s=d===-1?c:d;continue}if(u==="/"&&t[s+1]==="*"){let d=t.indexOf("*/",s+2);s=d===-1?c:d+2;continue}if(u==='"'||u==="'"||u==="`"){let d=u;for(s++;s<c;){if(t[s]==="\\"){s+=2;continue}if(t[s]===d){s++;break}if(d==="`"&&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(u==="{"){i++,s++;continue}if(u==="}"){i--,s++;continue}if(i===1&&l.test(t.slice(s))){let d=s,p=0,g=s;for(;g<c;){let h=t[g];if(h==='"'||h==="'"||h==="`"){let m=h;for(g++;g<c;){if(t[g]==="\\"){g+=2;continue}if(t[g]===m){g++;break}g++}continue}if(h==="("||h==="["||h==="{"){p++,g++;continue}if(h===")"||h==="]"||h==="}"){if(p===0)break;p--,g++;continue}if(p===0&&(h===";"||h===`
13
- `)){g++;break}g++}o.push([d,g]),s=g;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},Lp=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;t=Sl(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),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let p=E4(f,u);if(!p||p===f)break;f=p;try{l=n.window.eval("("+f+")");break}catch(g){let h=/Identifier '([^']+)' has already been declared/.exec(g&&g.message||String(g));if(!h||h[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=n.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(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+`.
14
- First 200 chars of source: `+String(t).slice(0,200)),t)}},n1=1,q_=2,es=new WeakMap,v4=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,A4=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,C4=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,T4=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,O4=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),GT=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,R4=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!GT(t.charCodeAt(r-1)))&&(o>=t.length||!GT(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},YT=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},P4=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=v4.exec(e);if(r){if(r[2]||YT(e)!==125)return null;let o=r[3]||"";return o&&R4(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?q_:n1,async:!!r[1],fn:void 0}}return r=A4.exec(e)||C4.exec(e),r?{src:t,name:"",kind:q_,async:!!r[1],fn:void 0}:(r=T4.exec(e),r&&!O4.has(r[2])&&YT(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:q_,async:!!r[1],fn:void 0}:null)},XT=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Dp=t=>{let e=Lp(t.src,XT(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: ${XT(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
15
- First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},L4=(t,e,n)=>Reflect.construct(t,e,n);I4={length:{get(){let t=es.get(this);if(!t)return 0;let e=t.fn===void 0?Dp(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=es.get(this);return t?t.name:""},configurable:!0},toString:{value:D4,writable:!0,configurable:!0}},M4=Object.getPrototypeOf(async function(){}),N4=t=>{let e;return t.kind===n1?e=function(){let n=t.fn===void 0?Dp(t):t.fn;return n===null?t.value:new.target?L4(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?Dp(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,es.set(e,t),Object.defineProperties(e,I4),t.async&&Object.setPrototypeOf(e,M4),e},JT=(t,e,n,r)=>{let o=P4(t);return o?(o.key=e,o.index=n,o.opts=r,N4(o)):Lp(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},X_=t=>typeof t=="function"&&es.has(t),Ie=t=>{let e=es.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},rs=t=>{let e=typeof t=="function"?es.get(t):void 0;return e?(e.fn===void 0?Dp(e):e.fn)===null:!1},$4=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),F4={window:{eval:e1}},ye=(t,e={},n=F4)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:e1}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?$4.has(c):l),i=[[t,e,r]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(v(u))oe(u)?c[f]=l?JT(u,f,-1,n):Lp(u,`"${f}"`,n):c[f]=u;else if(I(u)){let d=c[f]=[],p=s(a,f,l);for(let g=0;g<u.length;g++){let h=u[g];if(v(h))d.push(oe(h)?p?JT(h,f,g,n):Lp(h,`array index ${g} (prop "${f}")`,n):h);else if(k(h)){let m=QT(h);if(m!==null)d.push(m);else{let y={};d.push(y),i.push([h,y,p])}}else d.push(h)}}else if(k(u)){let d=QT(u);if(d!==null){c[f]=d;continue}let p=c[f]&&typeof c[f]=="object"&&!I(c[f])?c[f]:c[f]={};i.push([u,p,s(a,f,l)])}else c[f]=u}}return Yi(e)},r1="Set",o1="Map",s1="RegExp",i1="WeakMap",a1="WeakSet",c1="String",l1=t=>{if(!t||typeof t!="object"||t.__type!==c1||!v(t.value))return!1;let e=Object.keys(t);return e.length===2&&e.includes("value")},Al=l1,Cl=Symbol.for("smbls.revived"),Yi=t=>{if(t&&typeof t=="object")try{t[Cl]=!0}catch{}return t},os=t=>!!(t&&typeof t=="object"&&t[Cl]===!0),ZT=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},kl=(t,e)=>{if(!t||typeof t!="object")return t;if(l1(t))return t.value;let n=s=>kl(s,e||(e=new WeakMap));if(t.__type===r1&&I(t.values))return new Set(t.values.map(n));if(t.__type===o1&&I(t.entries))return new Map(t.entries.map(s=>I(s)?[n(s[0]),n(s[1])]:s));if(t.__type===i1&&ZT(t))return new WeakMap;if(t.__type===a1&&ZT(t))return new WeakSet;if(t.__type===s1&&v(t.source))try{return new RegExp(t.source,v(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(I(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=kl(t[i],e),s[i]!==t[i]&&(r=!0);return r||e.set(t,t),r?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=kl(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},QT=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==s1&&e!==r1&&e!==o1&&e!==i1&&e!==a1&&e!==c1)return null;let n=kl(t);return n===t?null:n},ss=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];v(a)&&oe(a)?n.push([i,a]):e[i]=kl(a)}if(n.length===0)return e;let r=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=n.filter(([i])=>r(i)),s=Object.keys(e).filter(r).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
13
+ `)){g++;break}g++}o.push([d,g]),s=g;continue}s++}if(!o.length)return null;let f=t;for(let u=o.length-1;u>=0;u--)f=f.slice(0,o[u][0])+f.slice(o[u][1]);return f},Mp=(t,e,n,r)=>{let o=String(t).trimStart();if(/^(export|import)\s/.test(o))return t;t=kl(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),l=null;if(a){let f=String(t).trim();if(/^function[\s(]/.test(f))try{l=n.window.eval("(async "+f+")")}catch{}}else if(c){let f=String(t),u=c[1];for(let d=0;d<5;d++){let p=I4(f,u);if(!p||p===f)break;f=p;try{l=n.window.eval("("+f+")");break}catch(g){let h=/Identifier '([^']+)' has already been declared/.exec(g&&g.message||String(g));if(!h||h[1]!==u)break}}}if(!l&&/Unexpected (token '\{'|identifier)/.test(i))try{let f=n.window.eval("({"+t+"})");if(f&&typeof f=="object"){let u=Object.keys(f);u.length===1&&typeof f[u[0]]=="function"&&(l=f[u[0]])}}catch{}return l||(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+`.
14
+ First 200 chars of source: `+String(t).slice(0,200)),t)}},aO=1,J_=2,ns=new WeakMap,M4=/^(async\s+)?function(?![\w$])\s*(\*)?\s*([A-Za-z_$][\w$]*)?\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,N4=/^(async\s+)?[A-Za-z_$][\w$]*\s*=>/,$4=/^(async\s*)?\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*=>/,F4=/^(async\s+)?([A-Za-z_$][\w$]*)\s*\((?:[^()'"`/]|\([^()'"`/]*\))*\)\s*\{/,B4=new Set(["if","for","while","switch","catch","with","do","return","typeof","void","delete","new","in","of","instanceof","function","class","const","let","var","await","yield","import","export","try","else","throw","case","default","break","continue","debugger","finally","super","this","null","true","false","async","get","set","static"]),QT=t=>t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===36||t===95,j4=(t,e,n)=>{let r=t.indexOf(e,n);for(;r!==-1;){let o=r+e.length;if((r===0||!QT(t.charCodeAt(r-1)))&&(o>=t.length||!QT(t.charCodeAt(o))))return!0;r=t.indexOf(e,o)}return!1},tO=t=>{let e=t.length-1;for(;e>=0&&t.charCodeAt(e)<=32;)e--;return e<0?-1:t.charCodeAt(e)},U4=t=>{let e=t,n=0;for(;n<e.length&&e.charCodeAt(n)<=32;)n++;n&&(e=e.slice(n));let r=M4.exec(e);if(r){if(r[2]||tO(e)!==125)return null;let o=r[3]||"";return o&&j4(e,o,r[0].indexOf("("))||e.indexOf("arguments.callee")!==-1?null:{src:t,name:o,kind:r[1]?J_:aO,async:!!r[1],fn:void 0}}return r=N4.exec(e)||$4.exec(e),r?{src:t,name:"",kind:J_,async:!!r[1],fn:void 0}:(r=F4.exec(e),r&&!B4.has(r[2])&&tO(e)===125?e.indexOf("arguments.callee")!==-1?null:{src:t,name:r[2],kind:J_,async:!!r[1],fn:void 0}:null)},eO=t=>t.index===-1?`"${t.key}"`:`array index ${t.index} (prop "${t.key}")`,Np=t=>{let e=Mp(t.src,eO(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: ${eO(t)} did not evaluate to a function \u2014 the lazily revived function returns that value.
15
+ First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},V4=(t,e,n)=>Reflect.construct(t,e,n);H4={length:{get(){let t=ns.get(this);if(!t)return 0;let e=t.fn===void 0?Np(t):t.fn;return e?e.length:0},configurable:!0},name:{get(){let t=ns.get(this);return t?t.name:""},configurable:!0},toString:{value:z4,writable:!0,configurable:!0}},W4=Object.getPrototypeOf(async function(){}),K4=t=>{let e;return t.kind===aO?e=function(){let n=t.fn===void 0?Np(t):t.fn;return n===null?t.value:new.target?V4(n,arguments,new.target):n.apply(this,arguments)}:e={lazy(){let n=t.fn===void 0?Np(t):t.fn;return n===null?t.value:n.apply(this,arguments)}}.lazy,ns.set(e,t),Object.defineProperties(e,H4),t.async&&Object.setPrototypeOf(e,W4),e},nO=(t,e,n,r)=>{let o=U4(t);return o?(o.key=e,o.index=n,o.opts=r,K4(o)):Mp(t,n===-1?`"${e}"`:`array index ${n} (prop "${e}")`,r)},tw=t=>typeof t=="function"&&ns.has(t),Me=t=>{let e=ns.get(t);return e?e.src.trim():Function.prototype.toString.call(t)},os=t=>{let e=typeof t=="function"?ns.get(t):void 0;return e?(e.fn===void 0?Np(e):e.fn)===null:!1},q4=new Set(["components","pages","functions","methods","snippets","app","globalScope"]),G4={window:{eval:iO}},be=(t,e={},n=G4)=>{if(!t||typeof t!="object")return e;(!n||!n.window||typeof n.window.eval!="function")&&(n={...n,window:{eval:iO}});let r=n.lazy===!0,o=n.lazy==="context",s=(a,c,l)=>r||o&&(a===t?q4.has(c):l),i=[[t,e,r]];for(;i.length;){let[a,c,l]=i.pop();for(let f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;let u=a[f];if(v(u))se(u)?c[f]=l?nO(u,f,-1,n):Mp(u,`"${f}"`,n):c[f]=u;else if(I(u)){let d=c[f]=[],p=s(a,f,l);for(let g=0;g<u.length;g++){let h=u[g];if(v(h))d.push(se(h)?p?nO(h,f,g,n):Mp(h,`array index ${g} (prop "${f}")`,n):h);else if(k(h)){let m=oO(h);if(m!==null)d.push(m);else{let y={};d.push(y),i.push([h,y,p])}}else d.push(h)}}else if(k(u)){let d=oO(u);if(d!==null){c[f]=d;continue}let p=c[f]&&typeof c[f]=="object"&&!I(c[f])?c[f]:c[f]={};i.push([u,p,s(a,f,l)])}else c[f]=u}}return Ji(e)},cO="Set",lO="Map",fO="RegExp",uO="WeakMap",dO="WeakSet",pO="String",hO=t=>{if(!t||typeof t!="object"||t.__type!==pO||!v(t.value))return!1;let e=Object.keys(t);return e.length===2&&e.includes("value")},Tl=hO,Ol=Symbol.for("smbls.revived"),Ji=t=>{if(t&&typeof t=="object")try{t[Ol]=!0}catch{}return t},ss=t=>!!(t&&typeof t=="object"&&t[Ol]===!0),rO=t=>{let e=Object.keys(t);return e.length===1&&e[0]==="__type"},vl=(t,e)=>{if(!t||typeof t!="object")return t;if(hO(t))return t.value;let n=s=>vl(s,e||(e=new WeakMap));if(t.__type===cO&&I(t.values))return new Set(t.values.map(n));if(t.__type===lO&&I(t.entries))return new Map(t.entries.map(s=>I(s)?[n(s[0]),n(s[1])]:s));if(t.__type===uO&&rO(t))return new WeakMap;if(t.__type===dO&&rO(t))return new WeakSet;if(t.__type===fO&&v(t.source))try{return new RegExp(t.source,v(t.flags)?t.flags:"")}catch{return t}if(e||(e=new WeakMap),e.has(t))return e.get(t);let r=!1;if(I(t)){let s=new Array(t.length);e.set(t,s);for(let i=0;i<t.length;i++)s[i]=vl(t[i],e),s[i]!==t[i]&&(r=!0);return r||e.set(t,t),r?s:t}let o={};e.set(t,o);for(let s of Object.keys(t))o[s]=vl(t[s],e),o[s]!==t[s]&&(r=!0);return r||e.set(t,t),r?o:t},oO=t=>{if(!t||typeof t!="object")return null;let e=t.__type;if(e!==fO&&e!==cO&&e!==lO&&e!==uO&&e!==dO&&e!==pO)return null;let n=vl(t);return n===t?null:n},is=t=>{if(!t||typeof t!="object")return t;let e={},n=[];for(let i of Object.keys(t)){let a=t[i];v(a)&&se(a)?n.push([i,a]):e[i]=vl(a)}if(n.length===0)return e;let r=i=>/^[A-Za-z_$][\w$]*$/.test(i),o=n.filter(([i])=>r(i)),s=Object.keys(e).filter(r).map(i=>`var ${i} = __gs__[${JSON.stringify(i)}];`).join(`
16
16
  `);try{let i=o.map(([l,f])=>`var ${l} = (${f});`).join(`
17
17
  `),a="{ "+o.map(([l])=>`${JSON.stringify(l)}: ${l}`).join(", ")+" }",c=R.eval(`(function(__gs__) { ${s}
18
18
  ${i}
19
19
  return ${a}; })`)(e);Object.assign(e,c)}catch{for(let[a,c]of o)try{let l=Object.keys(e).filter(r).map(f=>`var ${f} = __gs__[${JSON.stringify(f)}];`).join(`
20
20
  `);e[a]=R.eval(`(function(__gs__) { ${l}
21
- return (${c}); })`)(e)}catch{try{e[a]=R.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=R.eval(`(${a})`)}catch{e[i]=a}return e},J_=(t,e={verbose:!0})=>{try{return t?R.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},Z_=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),Ip=t=>{for(let e in t)return!1;return!0},Q_=t=>k(t)&&Ip(t),tw=()=>Object.create(null),Tl=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&ns(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},is=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)ns(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},se=(t,e,n={},r=new WeakMap)=>{if(!V(t)||!V(e)||he(t)||he(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&ns(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];he(l)?t[a]=l:V(c)&&V(l)?t[a]=se(c,l,n,r):l!==void 0&&(t[a]=l)}return t},Mp=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Mp(t[i],e[i],n))return!1}return!0},B4=new Set(["node","__ref"]),ew=(t,e,n=B4)=>{if(t===e)return!0;if(!V(t)||!V(e)||he(t)||he(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(he(l)||he(f)){if(l!==f)return!1}else if(V(l)&&V(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},nw=(t,e)=>{if(e==null)return t;if(me(e)("string","number"))delete t[e];else if(I(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Np=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=Np(t[n]));return e},rw=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},ow=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},sw=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},iw=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},aw=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(KT==="test"||KT==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},cw=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},lw=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var Ol,Rl,Pl,$p=D(()=>{"use strict";Bn();Ol=(function(){let t=0;function e(){return t++,t}return e})(),Rl=Ol,Pl=(t,e,n)=>(St(n,t)||n||t.key||Ol()).toString()});var wn,fw,to,Fp,uw,dw,pw,eo,hw,ur,tt,Ll=D(()=>{"use strict";wn="production",fw=wn,to=(t=wn)=>t==="production",Fp=(t=wn)=>t==="testing"||t==="test",uw=Fp,dw=(t=wn)=>t==="staging",pw=(t=wn)=>t==="local",eo=(t=wn)=>t==="development"||t==="dev"||t==="local",hw=(t,e=wn)=>e[t],ur=(t=wn)=>!to(t),tt=t=>{if(!t&&globalThis.__SMBLS_DEV_DIAGNOSTICS_OFF__===!0)return!1;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}});function Dl(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function yw(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var gw,mw,j4,Xi,Ji,Zi,no,Qi=D(()=>{"use strict";gw=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},mw=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},j4=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Xi=t=>j4.test(t),Ji=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},Zi=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},no=(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 bw,f1=D(()=>{"use strict";Wt();Bn();bw=(t,e)=>{let{__ref:n}=t,r=t.if;if(L(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?St(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var _w,ww,u1=D(()=>{"use strict";_w=(t,...e)=>{t&&e.map(n=>console.log(n))},ww=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function vw(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Aw(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var Sw,xw,kw,Ew,d1=D(()=>{"use strict";Wt();ll();Sw=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),xw=(t,e,n=365)=>{if(Yt(kt)||Yt(kt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;kt.cookie=`${t}=${e};${o};path=/`},kw=t=>{if(Yt(kt)||Yt(kt.cookie))return;let e=`${t}=`,r=decodeURIComponent(kt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Ew=t=>{Yt(kt)||Yt(kt.cookie)||(kt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var ta,p1,Cw,Tw=D(()=>{"use strict";ta={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},p1=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Cw=t=>ta.body.has(t)});var Ow,h1,ea,Ye,na,Nl,Un,Rw,Bp,$l,Pw,Fl,jp,Up,Bl,Vp,ra,U4,Vn,g1,Il,jl,Lw,Ml,Dw,Iw,Hp,zp,Wp,Kp,qp,Gp,m1,Yp=D(()=>{"use strict";Ki();Mw();Bn();Wt();Ow="production",h1=t=>t.sourcemap!==!1&&Ow!=="production",ea=t=>{if(!t)return[];let e=[],n=t.extends;n&&(I(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(I(r)?e.push(...r):e.push(r)),e},Ye=t=>{if(!I(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(I(r)?Ye(r):r)}return e},na=t=>{if(t.includes("+"))return t.split("+").filter(Hn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Hn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Nl=(t,e,n)=>{let r=[],o=na(n);o&&(r=[...o]);let s=Ye(ea(t));return s.length&&(r=[...r,...s]),r},Un=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Rw=(t,e)=>{if(!t)return e;let{extends:n}=e,r=I(n)?n:[n],o=I(t)?t:[t];return{...e,extends:zi(o,r)}},Bp=()=>Math.random().toString(36).substring(2),$l={},Pw={},Fl=t=>$l[t.__hash],jp=(t,e)=>{let n=Bp();return v(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&($l[n]=e),e},Up=(t,e)=>t.__hash?e.concat(Fl(t)):jp(t,e),Bl=(t,e,n,r=new Set,o,s)=>{for(let i of t)I(i)?Bl(i,e,n,r,o,s):ra(i,e,n,r,o,void 0,s);return e},Vp=(t,e,n,r=new Set,o,s,i)=>{let a=ea(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&ra(Ye(a),e,n,r,o,s,i),e},ra=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(I(t))return Bl(t,e,n,r,o,i);let a=s;return v(t)?(a=t,t=jl(t,n)):i&&k(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?Vp(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},U4=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),Vn=(t,e,n,r,o)=>{e=pt(e);for(let s in e){if(U4.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?k(a)&&!I(a)?(n[s]=n[s]||{},g1(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(k(i)&&k(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];Hn(s)?t[s]=Vn(i,a,c,r,l):Vn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(I(i)&&I(a))t[s]=i.concat(a);else if(I(i)&&k(a)){let c=Vn({},i);t[s]=Vn(c,a)}}}}return t},g1=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];k(s)&&!I(s)?(t[o]=t[o]||{},g1(t[o],s,n,r)):t[o]=n}}},Il=(t,e,n)=>t.reduce((r,o,s)=>{let i=pt(o),a=n?n[s]:void 0;return Vn(r,i,e,a)},{}),jl=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(v(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Ow==="test"||Ow==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Lw=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),Ml=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return Fl(t)||[];let s=ra(t,[],e,new Set,n,void 0,r);return n?s:Up(t,s)},Dw=(t,e)=>{if(!t)return e;let n=I(t)?t:[t];return zi(n,e)},Iw=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(Hn(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},Hp=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=ea(t);if(i.length){let a=Ye(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Un([f,...l],t):Un(a,t)}return zp(t,e,n),Wp(t,e,n),Kp(t,e,n),t.component&&Un(Ye(St(t.component,t)),t),o.defaultExtends&&Un(Ye(o.defaultExtends),t),Wi(r.__extends)},zp=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Un(Ye(e.childProps.extends),t),r.__extends},Wp=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Un(Ye(s),t),r.__extends},Kp=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Un(Ye(o),t),r.__extends},qp=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=h1(n),a=i?[...r.__extends]:null,c=Wi(r.__extends.map((l,f)=>jl(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],g=a[d];p&&k(p)&&v(g)&&l.set(p,g)}let f=[],u=Ml(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=Ml(c,o);r.__extendsStack=l}return r.__extendsStack},Gp=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(h1(n)){let s={},i=r.__extendsNames||[],a=Il(o,s,i),c={};Vn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Il(o);Vn(t,s)}return t},m1=(t,e,n={})=>(Hp(t,e,n),qp(t,e,n),Gp(t,e,n),t)});function Nw(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function $w(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Fw(t,e,n){let{context:r}=e||{},[o]=na(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var Hn,Mw=D(()=>{"use strict";Yp();Wt();Hn=t=>{if(!v(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function y1(t,e){let{props:n,on:r}=e,o=Jo(t.split("on")[1]),s=r[o],i=n[t];L(s)?r[o]=(...a)=>{if(s(...a)!==!1&&L(i))return i(...a)}:r[o]=i}var b1=D(()=>{"use strict";bl();Wt()});function Xp(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(L(o)||o!=null&&Ji(this.context))){let g=Jo(r.slice(2));t.on&&(t.on[g]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=k(a)||L(a),f=k(c)||L(c);if(l||f)continue;let u=r.charAt(0);if(w1.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=Bw.test(r)||_1.test(r)||H4(o),p=Jr.has(r);!d&&!p&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function Jp(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=L(o)||o!=null&&Ji(this.context);if(s&&i){y1(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(w1.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=k(c)||L(c),u=k(l)||L(l),d=Bw.test(r)||_1.test(r),p=Jr.has(r);(d||p||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function Zp(t=this){let e=[];return Xp.call(this,t,{cachedKeys:e}),Jp.call(this,t,{cachedKeys:e}),t}function jw(t={}){return t.on||(t.on={}),t.props||(t.props={}),Zp.call(this,t)}function Vw(t,e){this.__element.update({props:t},e)}function Wl(t){let e={update:Vw.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var Bw,_1,w1,V4,H4,Hl,Ul,Uw,zl,Kl,ql,Qp,Vl,Hw,zw,Ww=D(()=>{"use strict";ts();b1();Bn();Wt();bl();Qi();Bw=/^[A-Z]/,_1=/^\d+$/,w1=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),V4=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),H4=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(V4.has(e)||Bw.test(e))return!0;return!1},Hl=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return V(r)?{...r}:(o.__propsStack.push(r),{})};Ul=t=>me(t)("string","number")?{inheritedString:t}:t,Uw=(t,e)=>!t||!e.length?!1:e.includes(t),zl=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=Ul(i);r.unshift(c)}if(s){let c=Ul(s);r.unshift(c)}return r};Kl=t=>{let e=new Set;return t.filter(n=>!n||Zr.has(n)||e.has(n)?!1:(e.add(n),!0))},ql=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(Zr.has(o))return r;for(;L(o);)o=St(o,e);return bt(r,pt(o,{exclude:Zr}))},{}),Wl(e),e.props),Qp=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...zl(t,e)]),k(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),I(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=Kl(o),r.__propsStack},Vl=(t,e)=>{let{__ref:n}=t,r=Qp(t,e);r.length?ql(r,t):(n.__propsStack=[],t.props={})},Hw=function(t,e,n){let{__ref:r}=t;if(r.__if)Vl(t,e);else try{Vl(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return Wl(t),t},zw=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=zl(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=Kl(s),r.__propsStack.length&&ql(r.__propsStack,e),e}});var S1,th,eh,nh,rh,Kw,oh,sh,ih,qw,x1=D(()=>{"use strict";Yp();$p();ul();Ww();Tw();Wt();S1="production",th=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=ta.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},eh=(t,e,n)=>{if(t===void 0)return(S1==="test"||S1==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:me(t)("string","number")?th(t,e,n):L(t)?{props:t}:t},nh=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},rh=(t,e,n,r,o)=>{if(!e)return o;if(fr(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},Kw=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},oh=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},sh=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),ih=(t,e,n)=>{let r=nh(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Nl(t,e,n),r.path=oh(t,e,n),r},qw=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:eh(t,e,n);if(!i)return;let a=rh(i,e,n,r,o),c=Pl(i,a,n);ih(i,a,c);let l=Hl(i,a,c),f=sh(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Gw,ah,ch,lh,fh,Yw,uh,Xw,Jw,Zw,dh,k1,z4,A1,ro,Qw,E1,oo,as,v1,C1,T1,Gl,zn,O1=D(()=>{"use strict";Ki();ts();Ll();Bn();Wt();Gw=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return me(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},ah=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},ch=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},lh=(t,e,n={})=>{let r=v(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},fh=(t,e,n={})=>{let o=t.__ref.__state;if(!uh(t))return;let s=ah(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=ch(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return lh(o,i,n)},Yw=(t,e)=>{let n=t.__ref,r=fh(t,e);if(r===void 0)return t.state;if(me(r)("object","array"))return pt(r);if(me(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},uh=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&me(n)("number","string","boolean"))},Xw=function(t){return V(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},Jw=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},Zw=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=pt(r,Zo),s={[t.key]:o},i=k(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?gl(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},dh=new Set(["parent","root"]),k1=new Set,z4=t=>{k1.has(t)||(k1.add(t),tt()&&console.warn(`[smbls/state] the declared state key "${t}" names a state bookkeeping slot (parent / root) and was NOT copied into the state. Rename the key (e.g. "`+t.split(".").pop()+'Data").'))},A1=(t,e,n,r)=>{if(t===e)return t;for(let o=0;o<r.length;o+=2)if(r[o]===t&&r[o+1]===e)return t;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o.charCodeAt(0)===95&&o.charCodeAt(1)===95||o==="constructor"||o==="prototype")continue;let s=n?n+"."+o:o;if(dh.has(o)){z4(s);continue}let i=t[o],a=e[o];V(i)&&V(a)?(r.push(t,e),A1(i,a,s,r),r.length-=2):i===void 0&&(t[o]=a)}return t},ro=(t,e)=>!V(t)||!V(e)?t:A1(t,e,"",[]),Qw=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){bt(t,e,Zo);return}(o?is:se)(t,e,Zo)},E1="__polyglotSeededKeys",oo=t=>{if(!k(t))return new Set;let e=t[E1];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,E1,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},as=(t,e,n)=>oo(t).has(e)?!0:!k(n)||n[e]===void 0,v1="__polyglotSeededValues",C1=t=>{if(!k(t))return new Map;let e=t[v1];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,v1,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},T1=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Gl=(t,e,n)=>{if(!oo(t).has(e))return!1;let r=C1(t);if(!r.has(e))return!0;let o=k(n)||Array.isArray(n)?n[e]:void 0,s=T1(o);return s!==null&&s===r.get(e)},zn=(t,e,...n)=>(oo(t).add(e),n.length&&C1(t).set(e,T1(n[0])),e)});var W4,tS,R1=D(()=>{"use strict";W4=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},tS=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!W4(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var P1,ph,dr,hh,eS,nS=D(()=>{"use strict";Wt();Qi();P1=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},ph=(t,e,n,r,o)=>{if(t=Zi(t,e),!!L(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},dr=(t,e,n)=>{if(!e)throw new Error("Element is required");no(t,e,n);let r=P1(t,e);if(r){let{state:o,context:s}=e;return ph(r,e,o,s,n)}},hh=(t,e,n,r,o,s)=>{if(t=Zi(t,n),!!L(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},eS=(t,e,n,r)=>{no(t,n,e,r);let o=P1(t,n);if(o){let{state:s,context:i}=n;return hh(o,e,n,s,i,r)}}});var rS,Yl,oS=D(()=>{"use strict";rS={},Yl={}});var so,sS=D(()=>{"use strict";so=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0}});var io,ls,fs,iS,Wn,aS,L1,D1,cS,lS,I1,Xl,M1,K4,fS,q4,uS,cs,N1,gh,dS,$1,F1,B1,oa=D(()=>{"use strict";M();sS();io="@symbo.ls/fetch:EARLY",ls=3e4,fs=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},iS=t=>{if(t==null)return!0;if(typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&e!==null)return!1;for(let n in t){let r=t[n];if(!(r===void 0||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&isFinite(r)))return!1}return!0},Wn=()=>Symbol.for(io),aS=(t,e)=>{let n=[];for(let r in t||{}){let o=r.toLowerCase(),s={name:r,header:o,param:t[r],found:!1,value:void 0};for(let i in e||{})i.toLowerCase()===o&&(s.found=!0,s.value=e[i]);n.push(s)}return n},L1=(t,e)=>{if(!t||typeof t!="object"||!e||typeof e!="object")return t;let n={...t};return n.query===void 0&&e.query!==void 0&&(n.query=e.query),n.rpc===void 0&&e.rpc!==void 0&&(n.rpc=e.rpc),n},D1=(t,e,n)=>{let r=Wn();if(K4(n),!t||typeof t!="object"){let i=globalThis[r];return i&&i.seeded?{carried:{},rpc:!1,maxAge:ls,seeded:!0}:null}globalThis[r]||(globalThis[r]={entries:{}});let o={};for(let{header:i,found:a,value:c}of aS(t.query,e))a&&(o[i]=c);let s=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:ls;return{carried:o,rpc:t.rpc==="get",maxAge:s,seeded:!!globalThis[r].seeded}},cS=(t,e=ls,n)=>{let r=globalThis[Wn()],o=r&&r.entries&&r.entries[t];return!o||(delete r.entries[t],!(Date.now()-o.time<=e))?null:o.seeded?(r.stale&&n&&(o.seeded.taken=uS(r,t,n())),Promise.resolve(o.seeded)):Promise.resolve(o.answer).then(s=>s&&s.ok&&!s.bodyUsed?s:null,()=>null)},lS=()=>{let t=globalThis[Wn()];t&&t.entries&&(t.entries={})},I1=t=>(Array.isArray(t)?t:[]).filter(e=>e&&typeof e.url=="string"&&typeof e.body=="string").map(e=>({k:fs(e.url,e.lang||""),s:e.status||200,t:e.type||"application/json",b:e.body})),Xl='script[type="application/json"][data-fetch-seed]',M1=t=>{let e=I1(t);return e.length?'<script type="application/json" data-fetch-seed>'+ao(e)+"<\/script>":""},K4=t=>{let e=pr(globalThis.document,Xl,{remove:!0}),n=t===!1?null:e&&e.value;if(!Array.isArray(n)||!n.length){let c=globalThis[Wn()];c&&c.stale||(cs=null);return}let r=Wn(),o=globalThis[r]||(globalThis[r]={entries:{}});o.entries||(o.entries={}),o.seeded=!0;let s=Date.now();for(let c of n)!c||typeof c.k!="string"||typeof c.b!="string"||o.entries[c.k]||(o.entries[c.k]={time:s,seeded:{seeded:!0,status:c.s||200,type:c.t||"application/json",body:c.b}});let i=us(globalThis.document)||{stamp:null,time:null},a=q4(t,i.stamp,i.time);a?(o.stale=a,o.seedConfig=t&&typeof t=="object"?t:null):cs=null},fS="data-smbls-stale",q4=(t,e,n)=>{let r=globalThis.document&&globalThis.document.documentElement;if(r&&typeof r.hasAttribute=="function"&&r.hasAttribute(fS))return!0;if(!t||typeof t!="object")return!1;if(t.maxAge!=null&&n!==null){let o=so(t.maxAge);if(o>0&&Date.now()-n>o)return!0}if(typeof t.isStale!="function")return!1;try{let o=t.isStale(e,{time:n});return o&&typeof o.then=="function"?Promise.resolve(o).then(Boolean,()=>!1):!!o}catch{return!1}},uS=(t,e,n)=>{let r={key:e,again:n,result:null,cacheKey:null};if((t.taken||(t.taken=[])).push(r),cs){let o=cs;cs=null;for(let s of o)try{s()}catch{}}return r},cs=null,N1=t=>{let e=globalThis[Wn()];return e&&e.seeded&&!e.stale||e&&e.stale&&e.revalidated?!1:e&&e.stale&&e.taken&&e.taken.length?(t(),!0):((cs||(cs=new Set)).add(t),!0)},gh=(t,e)=>{let n=globalThis[Wn()];!n||!t||typeof t!="object"||(e.result=t,(n.results||(n.results=new WeakMap)).set(t,e))},dS=(t,e)=>{let n=globalThis[Wn()],r=n&&n.results&&t?n.results.get(t):null;r&&(r.cacheKey=e)},$1=()=>{let t=globalThis[Wn()];return!!(t&&t.stale&&!t.revalidated)},F1=async()=>{let t=globalThis[Wn()];if(!t||!t.stale||t.revalidated)return null;t.revalidated=!0;let e=await t.stale,n=t.taken||[];return t.taken=[],t.results=null,e?{taken:n,config:t.seedConfig||{}}:null},B1=t=>{let e=I1(t);if(!e.length)return"";let n=ao(e);return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(io)+"),r=globalThis[k]||(globalThis[k]={entries:{}}),t=Date.now(),l="+n+';r.seeded=true;r.entries=r.entries||{};for(var i=0;i<l.length;i++){var e=l[i];r.entries[e.k]={time:t,answer:Promise.resolve(new Response(e.b,{status:e.s,headers:{"content-type":e.t}}))}}}catch(e){}})()<\/script>'}});var j1,U1,V1,pS=D(()=>{"use strict";oa();j1=()=>globalThis[Symbol.for(io)],U1=(t,e=ls,n,r)=>{let o=j1(),s=o&&o.entries&&o.entries[t];if(!s||!s.seeded||!(Date.now()-s.time<=e))return null;let i=r(s.seeded);return i?(delete o.entries[t],o.stale&&n&&gh(i,uS(o,t,n())),i):null},V1=()=>{let t=j1();if(t&&t.seeded){for(let n in t.entries)if(t.entries[n]&&t.entries[n].seeded)return!0;return!1}let e=globalThis.document;return!!(e&&typeof e.querySelector=="function"&&e.querySelector(Xl))}});var H1,mh,z1,W1,K1,q1,hS=D(()=>{"use strict";H1=Symbol.for("@symbo.ls/fetch:IN_FLIGHT"),mh=()=>globalThis[H1]||(globalThis[H1]={count:0,waiters:[]}),z1=()=>{mh().count++},W1=()=>{let t=mh();if(t.count=t.count>0?t.count-1:0,t.count===0&&t.waiters.length){let e=t.waiters;t.waiters=[];for(let n of e)n()}},K1=()=>mh().count,q1=()=>{let t=mh();return t.count===0?Promise.resolve():new Promise(e=>{t.waiters.push(e)})}});var G4,G1,Y1=D(()=>{"use strict";oa();G4=(t,e)=>{let n=new URL(t);return n.searchParams.delete("limit"),n.searchParams.sort(),n.toString()+" "+(e||"")},G1=(t,e,n,r=ls)=>{let o=globalThis[Symbol.for(io)],s=o&&o.slices&&o.slices[G4(t,e)];if(!s||!(n>0))return null;for(let i=0;i<s.length;i++){let a=s[i],c=o.entries&&o.entries[a];if(!(!c||!(c.limit>=n)))return s.splice(i,1),delete o.entries[a],Date.now()-c.time<=r?Promise.resolve(c.answer).then(l=>{if(!l||!l.ok||l.bodyUsed)return null;let f=l.headers&&l.headers.get("content-type")||"application/json";return l.json().then(u=>Array.isArray(u)?{seeded:!0,status:l.status,type:f,body:JSON.stringify(u.slice(0,n))}:null)}).catch(()=>null):null}return null}});var bS={};F(bS,{buildUrl:()=>Jl,headerEntries:()=>tO,restAdapter:()=>yh,selectQuery:()=>mS,setup:()=>o5,withQuery:()=>Zl});var Jl,mS,J1,yS,Y4,X4,J4,X1,Z1,Xe,Q1,Z4,Q4,tO,gS,t5,e5,n5,r5,Zl,o5,yh,eO=D(()=>{"use strict";oa();pS();hS();Y1();Jl=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},mS=({params:t,select:e,limit:n,offset:r,order:o,single:s})=>{let i={...t};return e&&(i.select=e),n&&(i.limit=n),r&&(i.offset=r),s&&(i.single=!0),o&&(typeof o=="string"?i.order=o:Array.isArray(o)?i.order=o.map(a=>`${a.by}:${a.asc===!1?"desc":"asc"}`).join(","):o.by&&(i.order=`${o.by}:${o.asc===!1?"desc":"asc"}`)),i},J1=t=>Object.prototype.toString.call(t).slice(8,-1),yS=["auto","json","text","blob","arrayBuffer","stream","response"],Y4={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},X4=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},J4=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},X1=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,Z1=(t,e)=>{let n=t.body,r=e==="json"||e==="auto"&&/json/i.test(t.type);if(!r&&e!=="auto"&&e!=="text")return null;let o;try{o=r?n?JSON.parse(n):null:n}catch{return!1}return{data:o,error:null,status:t.status}},Xe=async(t,e,n,r)=>{let o=n??"auto";if(!yS.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${yS.join(", ")}`);z1();try{return await Q1(t,e,o,r)}finally{W1()}},Q1=async(t,e,n,r)=>{let o=r?await r:null;if(o&&o.seeded===!0){let i=Z1(o,n);if(o.taken&&i!==!1){let a=i||await Q1(t,e,n,Promise.resolve(new Response(o.body,{status:o.status,headers:{"content-type":o.type}})));return gh(a,o.taken),a}if(i)return i;o=i===!1?null:new Response(o.body,{status:o.status,headers:{"content-type":o.type}})}let s=o||await globalThis.fetch(t,e);if(n==="auto"){let i=await X4(s);return{data:i,error:s.ok?null:X1(i,s),status:s.status}}if(!s.ok){let i=await J4(n==="response"?s.clone():s);return{data:n==="response"?s:i,error:X1(i,s),status:s.status}}return{data:await Y4[n](s),error:null,status:s.status}},Z4=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],Q4=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||Z4.includes(J1(t))),tO=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),gS=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of tO(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},t5={"Content-Type":"application/json"},e5={"Content-Type":void 0},n5=t=>{if(!t||typeof t!="object")return null;let e={};for(let{header:n,param:r}of aS(t.query))e[n]=r;return{params:e,rpc:t.rpc==="get"}},r5="content-type",Zl=(t,e)=>{let n=Object.keys(e);if(!n.length)return t;let r=new URL(t);for(let o of n)r.searchParams.set(o,e[o]);return r.toString()},o5=async({url:t,headers:e,auth:n,fetchOptions:r,early:o,reads:s,seed:i})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return yh(t,e,n,r,o,s,i)},yh=(t,e={},n,r={},o,s,i)=>{let a=n?.token||null,c=D1(L1(o,s),e,i),l=n5(s),f=_=>{if(!l)return null;let b={},w={},S={};for(let A in _){let T=A.toLowerCase();if(T==="authorization")return null;if(T===r5)continue;w[A]=_[A];let O=l.params[T];O?S[O]=_[A]:b[A]=_[A]}return{headers:b,adoptHeaders:w,query:S}},u=(_,b,w)=>{if(!c)return null;let S="";for(let A in b){let T=A.toLowerCase();if(T==="accept-language")S=String(b[A]);else if(c.carried[T]!==b[A])return null}try{let A=_();return cS(fs(A,S),c.maxAge)||(w>0?G1(A,S,w,c.maxAge):null)}catch{return null}},d=(_,b,w,S,A,T,O)=>{if(!c||!c.seeded)return null;let B="";for(let $ in b){let N=$.toLowerCase();if(N==="accept-language")B=String(b[$]);else if(N!=="accept")return null}try{return cS(fs(_,B),c.maxAge,()=>g(w,S,A,_,T,O))}catch{return null}},p=(_,b,w,S,A,T,O)=>{if(!c||!c.seeded)return null;let B="";for(let N in b){let G=N.toLowerCase();if(G==="accept-language")B=String(b[N]);else if(G!=="accept")return null}let $=O??"auto";if(!yS.includes($))return null;try{return U1(fs(_,B),c.maxAge,()=>g(w,S,A,_,T,O),N=>Z1(N,$)||null)}catch{return null}},g=(_,b,w,S,A,T)=>({method:_,from:b,params:w,send:()=>Xe(S,A,T,null)}),h=()=>a?{Authorization:`Bearer ${a}`}:null,m=_=>gS(e,h(),_),y=_=>({...r,..._}),x=(_,b,w)=>{if(!Q4(b))return y({method:_,headers:gS(e,h(),t5,w),body:JSON.stringify(b)});let S={method:_,headers:gS(e,h(),e5,w),body:b};return J1(b)==="ReadableStream"&&(S.duplex="half"),y(S)},E=(_,b)=>{let w=b||t;if(_&&(_.startsWith("http://")||_.startsWith("https://")))return _;let S=_&&!_.startsWith("/")?"/":"";return`${w}${S}${_||""}`};return{name:"rest",setToken:_=>{a=_},getSession:async()=>{if(!n?.sessionUrl)return a?{token:a}:null;let _=await Xe(E(n.sessionUrl,n.baseUrl),y({headers:m()}));return _.error?null:_.data},signIn:async _=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let b=await Xe(E(n.signInUrl,n.baseUrl),x("POST",_));return b.data?.token&&(a=b.data.token),b},signOut:async()=>(n?.signOutUrl&&await Xe(E(n.signOutUrl,n.baseUrl),y({method:"POST",headers:m()})),a=null,{error:null}),select:({from:_,params:b,select:w,limit:S,offset:A,order:T,single:O,headers:B,baseUrl:$,responseType:N})=>{let G=Jl($||t,_||"",mS({params:b,select:w,limit:S,offset:A,order:T,single:O})),Y=!A&&!O&&Number(S)>0?Number(S):0,nt=m(B),ot=f(nt);if(ot){let Z=y({headers:ot.headers}),J=Zl(G,ot.query);return Xe(J,Z,N,d(J,ot.headers,"select",_,b,Z,N)||u(()=>G,ot.adoptHeaders,Y))}let st=y({headers:nt});return Xe(G,st,N,d(G,st.headers,"select",_,b,st,N)||u(()=>G,st.headers,Y))},seeded:({method:_,from:b,params:w,select:S,limit:A,offset:T,order:O,single:B,headers:$,baseUrl:N,responseType:G,read:Y})=>{if(!c||!c.seeded)return null;if(_==="select"){let nt=Jl(N||t,b||"",mS({params:w,select:S,limit:A,offset:T,order:O,single:B})),ot=m($),st=f(ot);if(st){let J=y({headers:st.headers});return p(Zl(nt,st.query),st.headers,"select",b,w,J,G)}let Z=y({headers:ot});return p(nt,Z.headers,"select",b,w,Z,G)}if(_==="rpc"){if(!(Y===!0&&l&&l.rpc&&iS(w)))return null;let nt=f(m($));if(!nt)return null;let ot;try{ot=Jl(N||t,`rpc/${b}`,w)}catch{return null}let st=y({method:"GET",headers:nt.headers});return p(Zl(ot,nt.query),nt.headers,"rpc",b,w,st,G)}return null},rpc:async({from:_,params:b,headers:w,baseUrl:S,responseType:A,read:T})=>{let O=iS(b),B=()=>Jl(S||t,`rpc/${_}`,b),$=Z=>Xe(E(`rpc/${_}`,S),x("POST",b,w),A,Z),N=m(w),G=T===!0&&l&&l.rpc&&O?f(N):null,Y=null;if(G)try{Y=B()}catch{Y=null}if(!Y)return $(c&&c.rpc&&O?u(B,N):null);let nt=y({method:"GET",headers:G.headers}),ot=Zl(Y,G.query),st=await Xe(ot,nt,A,d(ot,G.headers,"rpc",_,b,nt,A)||u(()=>Y,G.adoptHeaders));return st.status===405?$(null):st},insert:({from:_,data:b,headers:w,baseUrl:S,responseType:A})=>Xe(E(_,S),x("POST",b,w),A),update:({from:_,data:b,params:w,method:S,headers:A,baseUrl:T,responseType:O})=>{let B=w?.id||b?.id,$=B?`${_}/${B}`:_;return Xe(E($,T),x(S||"PATCH",b,A),O)},upsert:({from:_,data:b,params:w,method:S,headers:A,baseUrl:T,responseType:O})=>{let B=w?.id||b?.id,$=B?`${_}/${B}`:_;return Xe(E($,T),x(S||"PUT",b,A),O)},delete:({from:_,params:b,headers:w,baseUrl:S,responseType:A})=>{let T=b?.id,O=T?`${_}/${T}`:_;return Xe(E(O,S),y({method:"DELETE",headers:m(w)}),A)}}}});var rO={};F(rO,{localAdapter:()=>nO,setup:()=>i5});var bh,s5,i5,nO,oO=D(()=>{"use strict";bh=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},s5=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},i5=async({data:t,...e})=>nO(t,e),nO=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,p)=>{let g=r[f];if(g)for(let h of g)h(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let g=i(f).filter(h=>bh(h,u));return s5(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of g)c(f,"INSERT",h,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),g=[];for(let h=0;h<p.length;h++)if(bh(p[h],d)){let m={...p[h]};Object.assign(p[h],u),g.push(p[h]),c(f,"UPDATE",p[h],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),g=Array.isArray(u)?u:[u],h=[];for(let m of g){let y=d||(m.id!==void 0?{id:m.id}:null),x=y?p.findIndex(E=>bh(E,y)):-1;if(x>-1){let E={...p[x]};Object.assign(p[x],m),h.push(p[x]),c(f,"UPDATE",p[x],E)}else{let E={id:m.id||++l,...m};p.push(E),h.push(E),c(f,"INSERT",E,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let g=d.length-1;g>=0;g--)bh(d[g],u)&&(p.push(d[g]),d.splice(g,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let p=(g,h,m)=>{u&&u!=="*"&&u!==m.event||d(g,h,m)};return r[f].push(p),()=>{let g=r[f].indexOf(p);g>-1&&r[f].splice(g,1)}}}}});var la={};F(la,{EARLY_KEY:()=>io,SEED_BLOCK:()=>Xl,STALE_ATTRIBUTE:()=>fS,createAdapter:()=>d5,createEarlySeedBlock:()=>M1,createEarlySeedScript:()=>B1,default:()=>D5,earlyKey:()=>fs,executeFetch:()=>LS,fetchFunctions:()=>O5,fetchPlugin:()=>L5,hasAdapter:()=>u5,initAdapterAuth:()=>kh,parseDuration:()=>so,queryClient:()=>T5,registerAdapter:()=>f5,requestsInFlight:()=>K1,resolveDb:()=>uO,revalidateSeed:()=>R5,seedFromPage:()=>xO,seedIsStale:()=>$1,whenRequestsIdle:()=>q1,whenSeedTaken:()=>N1});var a5,fO,_h,ds,wh,xS,c5,l5,f5,u5,d5,uO,OS,dO,Sn,sO,Je,Ah,_S,Ch,aa,ia,xh,kS,Eh,pO,Th,hO,p5,Sh,h5,iO,wS,gO,mO,sa,aO,g5,ES,m5,yO,Oh,ca,tf,nf,ps,RS,kh,PS,xn,Kn,Ql,rf,y5,vS,hr,vh,AS,gr,cO,bO,mr,b5,_5,w5,S5,SS,ef,x5,Rh,_O,CS,TS,wO,SO,k5,E5,v5,A5,xO,C5,LS,T5,lO,O5,R5,P5,L5,D5,Ph=D(()=>{"use strict";M();Mt();oa();pS();sS();eO();oa();hS();a5=["select","rpc","insert","update","upsert","delete","subscribe"],fO={rest:()=>Promise.resolve(bS),local:()=>Promise.resolve().then(()=>(oO(),rO))},_h=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ds=(()=>{if(typeof globalThis<"u"&&globalThis[_h])return globalThis[_h];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,_h,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[_h]}catch{}return t})(),wh=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),xS=(()=>{if(typeof globalThis<"u"&&globalThis[wh])return globalThis[wh];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,wh,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[wh]}catch{}return t})(),c5=5e3,l5=t=>new Promise(e=>{if(ds[t])return e(ds[t]);let n=xS[t]||=[],r=!1,o=()=>{r||(r=!0,e(ds[t]||null))};n.push(o),setTimeout(o,c5)}),f5=(t,e)=>{ds[t]=e;let n=xS[t];if(n&&n.length){xS[t]=[];for(let r of n)r()}},u5=t=>typeof t=="string"&&!!(ds[t]||fO[t]),d5=t=>{let e={};for(let n of a5)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},uO=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=ds[r]||fO[r];if(!o&&(o=await l5(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},OS=t=>!!t&&!!t.isolateFetchCache,dO=()=>({cache:new Map,subscribers:new Map,active:new Map,invalidatedAt:new Map,mounted:new Set}),Sn=dO(),sO=new WeakMap,Je=t=>{if(!OS(t))return Sn;let e=sO.get(t);return e||sO.set(t,e=dO()),e},Ah=0,_S=new WeakMap,Ch=(t,e,n,r,o=t.page,s=t.cursor)=>{if(t.cache?.key)return t.cache.key;let{from:i,method:a,infinite:c}=t,l=n?`${n}:`:"",f=r?`:${r}`:"",u=o?":p"+JSON.stringify(o):"",d=s!=null?":c"+JSON.stringify(s):"";return`${i}:${a}:${l}${JSON.stringify(e||"")}${c?":infinite":""}${u}${d}${f}`},aa=(t,e)=>t.cache.get(e)||null,ia=(t,e,n,r,o=++Ah,s=!1)=>{let i={data:n,error:r,time:Date.now(),stale:s,seq:o};t.cache.set(e,i);let a=t.subscribers.get(e);if(a)for(let c of a)L(c)&&c(i);return i},xh=(t,e,n)=>{let r=e?t.cache.get(e):null;return r&&!r.error&&r.seq>n?r:null},kS=(t,e,n)=>(t.invalidatedAt.get(e)||0)>n,Eh=(t,e)=>{t.invalidatedAt.set(e,++Ah)},pO=(t,e)=>{t.cache.delete(e),Eh(t,e)},Th=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:v(t)?{staleTime:so(t),gcTime:3e5}:{staleTime:so(t.stale||t.staleTime)||6e4,gcTime:so(t.gc||t.gcTime||t.expire)||3e5,key:t.key},hO=t=>!!t.ref&&t.element.__ref===t.ref,p5=({config:t,element:e,context:n})=>{try{return RS(t,e,n)}catch{return null}},Sh=null,h5=()=>{Sh||(Sh=setInterval(()=>{let t=Date.now(),{cache:e,subscribers:n,active:r,invalidatedAt:o,mounted:s}=Sn;for(let[i,a]of e){let c=n.get(i);!(c&&c.size>0)&&t-a.time>(a.gcTime||3e5)&&e.delete(i)}for(let[i]of o)!e.has(i)&&!r.has(i)&&o.delete(i);for(let i of s)hO(i)||s.delete(i)},3e4),Sh.unref&&Sh.unref())};h5();iO=3,wS=t=>Math.min(1e3*2**t,3e4),gO=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:iO,delay:wS}:typeof n=="number"?{count:n,delay:wS}:{count:n.count??iO,delay:L(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:wS}},mO=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=L(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=L(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},sa={focus:new Set,online:new Set},aO=!1,g5=()=>{if(aO||typeof window>"u")return;aO=!0;let t=()=>{for(let n of sa.focus)n()},e=()=>{for(let n of sa.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},ES=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(v(t))return{from:t,method:"select",query:!0,on:"create"};if(k(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},m5=["insert","update","upsert","delete"],yO=t=>m5.includes(t),Oh=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,ca=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},tf=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},nf=(t,e,n)=>{let r;if(!t)r=void 0;else if(L(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=L(s)?s(e,e.state):s}}return r},ps=(t,e)=>L(t)?t(e,e.state):t,RS=(t,e,n)=>Ch(t,nf(t.params,e,n),tf(e,n),ca(e,n),ps(t.page,e),ps(t.cursor,e)),kh=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},PS=async(t,e)=>{if(L(t.select))return t.auth!==!1&&await kh(t,e),t;if(t.__resolved)return t.auth!==!1&&await kh(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=uO(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await kh(n,e),n):null},xn=(t,e,...n)=>{let r=L(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Kn=(t,e,n,...r)=>{let o=t&&L(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},Ql=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},rf=t=>t.responseType==="stream"||t.responseType==="response",y5=["Blob","File","ArrayBuffer","ReadableStream","Response"],vS=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||y5.includes(Object.prototype.toString.call(t).slice(8,-1))),hr=(t,e,n,r={})=>{if(!n&&vS(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!vS(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},vh=Object.freeze({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),AS=t=>({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:t,status:"error",fetchStatus:"idle"}),gr=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},cO=(t,e,n)=>{let r=t.__pages&&t.__pages.length?t.__pages:[n];L(e.getNextPageParam)&&(t.__nextPageParam=e.getNextPageParam(r[r.length-1],r),t.__hasNextPage=t.__nextPageParam!=null),L(e.getPreviousPageParam)&&(t.__prevPageParam=e.getPreviousPageParam(r[0],r),t.__hasPreviousPage=t.__prevPageParam!=null)},bO=(t,e,n,r,o,s)=>{let{from:i,single:a,limit:c,offset:l,order:f,headers:u,baseUrl:d,responseType:p}=t,g={from:i,select:e,params:n,single:a,limit:c,offset:l,order:f,headers:u,baseUrl:d};if(p!==void 0&&(g.responseType=p),r&&(g.headers={...g.headers,"Accept-Language":r}),o!==void 0){if(k(o))o.offset!==void 0&&(g.offset=o.offset),o.limit!==void 0&&(g.limit=o.limit),o.cursor!==void 0&&(g.params={...g.params,cursor:o.cursor});else if(typeof o=="number"){let h=t.pageSize||c||20;g.offset=(o-1)*h,g.limit=h}}return s!==void 0&&(g.params={...g.params,cursor:s}),g},mr=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=tf(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&tf(e,n)===i;if(t.enabled===!1||L(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||L(t.skip)&&t.skip(e,e.state))return;let l=await PS(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:y,fields:x,as:E,limit:C,offset:_,order:b,headers:w,baseUrl:S,responseType:A,page:T,cursor:O,infinite:B,placeholderData:$,initialData:N,select:G,keepPreviousData:Y}=t,nt=z=>(L(G)&&(z=G(z,e,e.state)),h&&(z=h(z,e,e.state)),z),ot=z=>{gr(e,AS(z)),xn(e,"onFetchError",z),Kn(t,e,"onFetchError",z)},st=v(G)?G:void 0;if(d&&L(e.getQuery)){let z=e.getQuery(l.name||"paths");z&&(st=z.select||z.length&&z.join(",")||st)}let Z=nf(p,e,n),J=ps(T,e),Q=ps(O,e),it=Oh(t),rt=rf(t)||it?null:Th(g),gt=gO(t,it||yO(u)),q=ca(e,n),W=rt?Ch(t,Z,i,q,J,Q):null,Rt=Je(n);if(!s.__fetchInitialized&&W&&(s.__fetchInitialized=!0,N!==void 0)){let z=L(N)?N():N;ia(Rt,W,z,null)}if((u==="select"||u==="rpc")&&W&&rt&&!r.refresh&&!r.force){let z=aa(Rt,W);if(z&&!z.error){let Tt=Date.now()-z.time,X=z.stale||Tt>(rt.staleTime||0);B&&I(z.data)&&!s.__pages&&(s.__pages=[z.data],cO(s,t,z.data));let at=nt(z.data);if(!c())return;if(!X){gr(e,vh),hr(e,at,E),s.__seededOnCreate===W&&(s.__seededOnCreate=null,xn(e,"onFetchComplete",at),Kn(t,e,"onFetchComplete",at));return}hr(e,at,E)}else if($!==void 0){let Tt=L($)?$(e,e.state):$;Tt!==void 0&&hr(e,Tt,E)}}let yt=W&&!r.force?Rt.active.get(W):null;if(yt&&!kS(Rt,W,_S.get(yt)||0)){try{let z=await Promise.race([yt,new Promise((Tt,X)=>setTimeout(()=>X("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(z?.error)ot(z.error);else if(z?.data!==void 0){let Tt=!B&&xh(Rt,W,_S.get(yt)||0),X=nt(Tt?Tt.data:z.data);if(!c())return;hr(e,X,E),xn(e,"onFetchComplete",X),Kn(t,e,"onFetchComplete",X)}}catch(z){if(!c())return;z!=="DEDUP_TIMEOUT"&&ot(z)}return}let jt=!aa(Rt,W)?.data;gr(e,{isFetching:!0,isLoading:jt,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xn(e,"onFetchStart"),Kn(t,e,"onFetchStart");let Ct=n?.analyze?.emitNetwork,Pt=Ct?typeof performance<"u"?performance.now():Date.now():0;Ct&&Ct({phase:"start",mode:"query",from:f,method:u,cacheKey:W,lang:q});let Ke=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let X=await l.getSession();if(!c())return;if(y===!0&&!X){let at={message:"Not authenticated"};return ot(at),{data:null,error:at}}}let z=l[u];if(!L(z))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let Tt=bO(t,st,Z,ca(e,n),J,Q);if(u==="insert"||u==="update"||u==="upsert"){let X;if(x===!0||t.on==="submit")X=Ql(e);else if(I(x)){let at=Ql(e);X={};for(let qe of x)X[qe]=at[qe]}else e.state?.parse?X=e.state.parse():k(e.state)&&(X={...e.state});h&&(X=h(X,e,e.state)),Tt.data=X}if(u==="rpc"){let X=Z;if(t.on==="submit"){let at=Ql(e);X=t.transformParams?t.transformParams(at,e,e.state):at}Tt.params=X,Tt.read=!it&&t.read!==!1}if(u==="subscribe"){if(L(s.__unsubscribe)){let at=s.__unsubscribe;s.__unsubscribe=null;try{at()}catch{}}let X=l.subscribe({from:f,params:Z,on:t.subscribeOn},(at,qe,Gb)=>{c()&&(hr(e,at,E),xn(e,"onFetchComplete",at),Kn(t,e,"onFetchComplete",at))});return c()?(s.__unsubscribe=X,{data:null,error:null,subscribed:!0}):(L(X)&&X(),{data:null,error:null,subscribed:!0})}return z(Tt)},It=++Ah,Pe=mO(Ke,gt);_S.set(Pe,It),W&&Rt.active.set(W,Pe);try{let z=await Pe;if(W&&z&&!it&&dS(z,W),it&&t.invalidates&&z&&!z.error&&!z.subscribed&&_O(Rt,t.invalidates,f),!c()||z?.subscribed)return;let{data:Tt,error:X}=z||{};if(X){W&&!xh(Rt,W,It)&&ia(Rt,W,null,X,It),ot(X),Ct&&Ct({phase:"error",mode:"query",from:f,method:u,cacheKey:W,error:X.message||X,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt});return}if(Tt!==void 0){let at=Tt;if((u==="select"||u==="rpc")&&W){let Gb=!B&&xh(Rt,W,It);if(Gb)at=Gb.data;else{let F3=ia(Rt,W,Tt,null,It,kS(Rt,W,It));F3.gcTime=rt?.gcTime||3e5}}let qe=at;if(B&&I(Tt)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(Tt):s.__pages.push(Tt),qe=s.__pages.flat(),cO(s,t,Tt)),qe=nt(qe),!c())return;gr(e,vh),(!Y||qe!==void 0)&&hr(e,qe,E),xn(e,"onFetchComplete",qe),Kn(t,e,"onFetchComplete",qe),Ct&&Ct({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:W,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt})}}catch(z){if(!c())return;ot(z),Ct&&Ct({phase:"error",mode:"query",from:f,method:u,cacheKey:W,error:z.message||String(z),durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt})}finally{W&&Rt.active.get(W)===Pe&&Rt.active.delete(W)}},b5=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||mr;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&_5(t,e,n,s)},_5=(t,e,n,r)=>{let o=e.__ref,s,i=K(()=>{let a;try{a=JSON.stringify([nf(t.params,e,n)??null,L(t.enabled)?!!t.enabled(e,e.state):t.enabled!==!1,L(t.skip)?!!t.skip(e,e.state):t.skip===!0,ps(t.page,e)??null])}catch{return}if(s===void 0){s=a;return}a!==s&&(s=a,queueMicrotask(()=>r(t,e,n)))});Array.isArray(o.__effects)?o.__effects.push(i):o.__fetchListeners.push(()=>i.dispose())},w5=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),g5();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:so(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&mr(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=rf(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=RS(t,e,n),f=aa(Je(n),l),u=Th(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&mr(t,e,n,{force:!0})};sa.focus.add(c),r.__fetchCleanups.push(()=>sa.focus.delete(c))}if(a){let c=()=>mr(t,e,n,{force:!0});sa.online.add(c),r.__fetchCleanups.push(()=>sa.online.delete(c))}},S5=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():k(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=L(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&hr(t,i,o),s},SS=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(hr(t,r,e.as),delete n.__optimisticSnapshot)},ef=t=>{if(!t)return()=>!0;if(v(t))return e=>e.includes(t);if(I(t)){let e=t.join(":");return n=>n.includes(e)}return t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):L(t)?e=>{try{return!!t(e)}catch{return!1}}:()=>!1},x5=(t,e)=>{let n=[];for(let r of t.mounted){if(!hO(r)){t.mounted.delete(r);continue}let o=p5(r);o&&e(o)&&n.push(mr(r.config,r.element,r.context,{refresh:!0}))}return Promise.allSettled(n).then(()=>{})},Rh=(t,e)=>{lS();for(let[n,r]of t.cache)e(n)&&(r.stale=!0,Eh(t,n));for(let[n]of t.active)!t.cache.has(n)&&e(n)&&Eh(t,n);return x5(t,e)},_O=(t,e,n)=>{let r=(I(e)?e:[e]).map(o=>o===!0||o==="*"?s=>s.startsWith(n+":"):o?ef(o):()=>!1);return Rh(t,o=>r.some(s=>s(o)))},CS=(t,e)=>{for(let[n]of t.cache)e(n)&&pO(t,n);for(let[n]of t.active)e(n)&&Eh(t,n)},TS=()=>!0,wO=(t,e)=>aa(t,e)?.data??void 0,SO=(t,e,n)=>{let r=aa(t,e),o=L(n)?n(r?.data):n;ia(t,e,o,null)},k5=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await PS(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:g,responseType:h,invalidates:m,optimistic:y,onMutate:x,onSuccess:E,onError:C,onSettled:_}=t,b;if(c===!0||u==="submit")b=Ql(e);else if(I(c)){let T=Ql(e);b={};for(let O of c)b[O]=T[O]}else e.state?.parse?b=e.state.parse():k(e.state)&&(b={...e.state});l&&(b=l(b,e,e.state)),L(x)&&x(b,e,e.state);let w=y?S5(e,t,b):null;gr(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),xn(e,"onFetchStart"),Kn(t,e,"onFetchStart");let S=n?.analyze?.emitNetwork,A=S?typeof performance<"u"?performance.now():Date.now():0;S&&S({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let nt=await o.getSession();if(d===!0&&!nt){w!==void 0&&SS(e,t);let ot={message:"Not authenticated"};xn(e,"onFetchError",ot),Kn(t,e,"onFetchError",ot);return}}let T=o[i];if(!L(T))return;let O={from:a,data:b,headers:p,baseUrl:g};h!==void 0&&(O.responseType=h),t.params&&(O.params=nf(t.params,e,n));let B=ca(e,n);B&&(O.headers={...O.headers,"Accept-Language":B});let $=gO(t,!0),N=await mO(()=>T(O),$),{data:G,error:Y}=N||{};if(Y){w!==void 0&&SS(e,t),gr(e,AS(Y)),xn(e,"onFetchError",Y),L(C)&&C(Y,b,e),L(_)&&_(null,Y,b,e),S&&S({phase:"error",mode:"mutation",from:a,method:i,error:Y.message||String(Y),durationMs:(typeof performance<"u"?performance.now():Date.now())-A});return}if(delete s.__optimisticSnapshot,gr(e,vh),G!==void 0&&(f||!vS(G))){let nt=f?{[f]:G}:G;e.state?.update&&e.state.update(nt,{preventFetch:!0})}xn(e,"onFetchComplete",G),Kn(t,e,"onFetchComplete",G),L(E)&&E(G,b,e),L(_)&&_(G,null,b,e),S&&S({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-A}),m&&_O(Je(n),m,a)}catch(T){w!==void 0&&SS(e,t),gr(e,AS(T)),xn(e,"onFetchError",T),Kn(t,e,"onFetchError",T),L(C)&&C(T,b,e),L(_)&&_(null,T,b,e),S&&S({phase:"error",mode:"mutation",from:a,method:i,error:T.message||String(T),durationMs:(typeof performance<"u"?performance.now():Date.now())-A})}finally{s.__fetching=!1}},E5=t=>{let e=n=>{try{n()}catch{}};for(let n of t.__fetchCleanups||[])e(n);for(let n of t.__fetchListeners||[])e(n);L(t.__unsubscribe)&&e(t.__unsubscribe);for(let n of t.__fetchMounted||[])Je(n.context).mounted.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},v5=(t,e)=>{if(!t)return null;if(L(t.select))return t;if(t.__resolved)return t.__resolved;if(t.__resolving)return null;let n=typeof t.adapter=="string"?t.adapter:null;if(n!=="rest"||ds[n]||!t.url)return null;let{adapter:r,...o}=t,s=yh(o.url,o.headers,o.auth,o.fetchOptions,o.early,o.reads,o.seed);return s.auth=t.auth,s.url=t.url,s.key=t.key,t.__resolved=s,e.fetch=s,s},A5=t=>t.on==="create"&&(t.method==="select"||t.method==="rpc")&&!Oh(t)&&!t.infinite&&!rf(t),xO=t=>{let e=t&&t.context;if(!e||!e.fetch||OS(e))return;let n=t.__ref;if(!n||!t.fetch||!V1())return;let r;try{r=St(t.fetch,t)}catch{return}if(!r)return;let o=I(r)?r:[r];for(let s of o){let i;try{i=ES(St(s,t),t)}catch{continue}if(!i||!A5(i)||i.enabled===!1||i.skip===!0)continue;try{if(L(i.enabled)&&!i.enabled(t,t.state)||L(i.skip)&&i.skip(t,t.state))continue}catch{continue}let a=Th(i.cache);if(!a)continue;let c=v5(e.fetch,e);if(!c||!L(c.seeded))return;C5(i,a,c,t,e,n)}},C5=(t,e,n,r,o,s)=>{let i=v(t.select)?t.select:void 0,a,c,l,f,u;try{if(t.query&&L(r.getQuery)){let x=r.getQuery(n.name||"paths");x&&(i=x.select||x.length&&x.join(",")||i)}a=nf(t.params,r,o),c=ps(t.page,r),l=ps(t.cursor,r);let y=ca(r,o);f=Ch(t,a,tf(r,o),y,c,l),u=bO(t,i,a,y,c,l)}catch{return}let d=Je(o),p=aa(d,f);if(p&&!p.error)return;t.method==="rpc"&&(u.read=t.read!==!1);let g=n.seeded({method:t.method,...u});if(!g||g.error||g.data===void 0)return;let h=ia(d,f,g.data,null);h.gcTime=e.gcTime||3e5,dS(g,f),s.__fetchInitialized=!0;let m=g.data;try{L(t.select)&&(m=t.select(m,r,r.state)),t.transform&&(m=t.transform(m,r,r.state))}catch{return}gr(r,vh),hr(r,m,t.as),s.__seededOnCreate=f},LS=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=St(t,e);if(!s)return;let i=I(s)?s.map(f=>ES(St(f,e),e)).filter(Boolean):[ES(s,e)].filter(Boolean),a=e.__ref,c=Je(r);if(a.__fetchMounted)for(let f of a.__fetchMounted)c.mounted.delete(f);a.__fetchMounted=[],!a.__fetchDisposer&&I(a.__effects)&&(a.__fetchDisposer={dispose:()=>E5(a)},a.__effects.push(a.__fetchDisposer));let l=!OS(r);for(let f of i){let u=yO(f.method),d=u?k5:mr,p=!u&&!Oh(f)&&f.method!=="subscribe";if(f.on==="create"?d(f,e,r):queueMicrotask(()=>b5({...f,__runner:d},e,r)),p&&f.on==="create"&&(l&&(f.refetchInterval||f.refetchOnWindowFocus!==!1||f.refetchOnReconnect!==!1)&&w5(f,e,r),!rf(f))){let g={element:e,ref:a,config:f,context:r};c.mounted.add(g),a.__fetchMounted.push(g)}}a.refetch=f=>{for(let u of i)mr(u,e,r,{force:!0,...f})},a.fetchNextPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__nextPageParam;if(u==null)return;let d={...f,cursor:u};mr(d,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__prevPageParam;if(u==null)return;let d={...f,cursor:u};mr(d,e,r,{direction:"previous",force:!0})}},T5={invalidateQueries:t=>Rh(Sn,ef(t)),removeQueries:t=>{CS(Sn,t?ef(t):TS)},getQueryData:t=>wO(Sn,t),setQueryData:(t,e)=>{SO(Sn,t,e)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=Je(e),o=await PS(n,e);if(!o)return;let s=t.method||"select",i=tf(null,e),a=ca(null,e),c=Ch({...t,method:s},t.params,i,a),l=o[s];if(!L(l))return;let f={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};a&&(f.headers={...f.headers,"Accept-Language":a}),t.responseType!==void 0&&(f.responseType=t.responseType),s==="rpc"&&(f.read=!Oh(t)&&t.read!==!1);let u=++Ah,d=await l(f);if(d?.data!==void 0&&!d?.error&&!rf(t)&&!xh(r,c,u)){let p=ia(r,c,d.data,null,u,kS(r,c,u));p.gcTime=Th(t.cache)?.gcTime||3e5}return d},getCache:()=>Sn.cache,clear:()=>CS(Sn,TS),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of Sn.cache)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||pO(Sn,n))}},lO=(t,e)=>k(t)?RS({method:"select",...t},e,e?.context):t,O5={invalidateQueries(t){return Rh(Je(this?.context),ef(t))},removeQueries(t){CS(Je(this?.context),t?ef(t):TS)},getQueryData(t){return wO(Je(this?.context),lO(t,this))},setQueryData(t,e){SO(Je(this?.context),lO(t,this),e)}},R5=async t=>{let e=await F1();if(!e)return null;let{taken:n,config:r}=e,o=new Set,s=[];for(let c of n)c.cacheKey?o.add(c.cacheKey):s.push(c);lS();let i=[],a=async c=>{try{let l=await c.again.send();if(!l||l.error)return;let f=c.result?c.result.data:void 0;if(P5(l.data,f))return;let{method:u,from:d,params:p}=c.again;i.push({method:u,from:d,params:p,data:l.data,previous:f})}catch{}};if(await Promise.all([o.size?Rh(Sn,c=>o.has(c)):null,...s.map(a)]),i.length&&L(r.onRefresh))try{r.onRefresh(i,t)}catch(c){console.error("[@symbo.ls/fetch] seed.onRefresh failed:",c)}return{queries:o.size,reads:s.length,changed:i.length}},P5=(t,e)=>{if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}},L5={name:"fetch",init(t){t.fetch&&xO(t)},create(t){let e=t.fetch;e&&(t.parent||Je(t.context).active.clear(),LS(e,t,t.state,t.context))}},D5=LS});function sf(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 IS(t){let e=this,{parent:n}=e;if(L(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function MS(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(L(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function NS(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(L(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function Ih(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(k(r)&&o)Ih.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function EO(t){let e=this;if(dr("beforeRemove",e,t)===!1)return e;L(e.node.remove)?e.node.remove():to()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=hl(e.parent.__ref.__children,e.key)),dr("remove",e,t)}function $S(t){return this[t]}function FS(t,e){let n=this;if(t)return n.update(t,e),n}function BS(t){return t?this.__ref&&this.__ref[t]:this.__ref}function jS(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function af(){return this.getRef().path}function lf(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=L(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 ff(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 uf(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function df(t){let e=this.getRoot()?.context;return t?e[t]:e}function pf(t){let e=this.context;return t?e[t]:e}function Mh(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||Jr.has(n)&&!_l.has(n)||e.push(n);return e}function Nh(t=[]){let e=this,n={},r=Mh.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=L(c&&c.parse)?c.parse():c;n[a]=L(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else Ut(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function of(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=Nh.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>V(a)?of.call(a,t,e):a):V(i)&&(r[s]=of.call(i,t,e))}return r}function ua(...t){if(co!=="test"&&co!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
22
- `,"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 VS(...t){(co==="test"||co==="development")&&console.log(...t)}function hf(...t){(co==="test"||co==="development")&&console.warn(...t)}function hs(...t){if(co==="test"||co==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&ua.call(this),new Error(...t)}}function gf(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function mf(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 yf(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,pt(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)}}}function HS(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!rs(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{hs.call(this,s)}),o}catch(o){if(hs.call(this,o),n?.strictMode)throw o}}async function bf(){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 Lh();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Lh();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=Lh().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 Lh();await o(r,t.context)}return r}function _f(t){let e=this,n=t||Yl.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if(DS(e,r),n===!0)return r;let o=U5[n];return o?o(r):r}function zS(t,e){return!!(Qr.has(t)||e?.context?.methods?.[t])}var co,Dh,cf,fa,kO,US,I5,Lh,DS,M5,vO,N5,$5,F5,B5,j5,U5,AO=D(()=>{"use strict";nS();ts();Wt();Bn();Ll();Ki();oS();co="production";Dh=null,cf=t=>{Dh=t||null},fa=(t,e)=>{t&&e&&Dh===t&&(Dh=e)},kO=()=>Dh||null;US=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});I5="[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.",Lh=()=>Promise.resolve().then(()=>(Ph(),la)).catch(t=>{throw new Error(I5,{cause:t})});DS=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&M5(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&DS(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&DS(i,e)},M5=(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])}},vO=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
23
- ${vO(i,e+1)}
21
+ return (${c}); })`)(e)}catch{try{e[a]=R.eval(`(${c})`)}catch{e[a]=c}}}for(let[i,a]of n)if(!r(i))try{e[i]=R.eval(`(${a})`)}catch{e[i]=a}return e},ew=(t,e={verbose:!0})=>{try{return t?R.eval("("+t+")"):{}}catch(n){e.verbose&&console.warn(n)}},nw=(t,...e)=>Object.prototype.hasOwnProperty.call(t,...e),$p=t=>{for(let e in t)return!1;return!0},rw=t=>k(t)&&$p(t),ow=()=>Object.create(null),Rl=(t,e,n={})=>{let r=n.exclude||[],o=n.preventUnderscore;for(let s in e)r.includes(s)||!o&&rs(s)||s==="constructor"||s==="prototype"||e[s]!==void 0&&(t[s]=e[s]);return t},as=(t,e,n=[])=>{let r=n instanceof Set;for(let o in e)rs(o)||o==="constructor"||o==="prototype"||(r?n.has(o):n.includes(o))||(t[o]=e[o]);return t},ie=(t,e,n={},r=new WeakMap)=>{if(!V(t)||!V(e)||ge(t)||ge(e))return e;if(r.has(t))return r.get(t);r.set(t,t);let o=n.exclude,s=o?o instanceof Set?o:new Set(o):null,i=!n.preventForce;for(let a in e){if(!Object.prototype.hasOwnProperty.call(e,a)||s&&s.has(a)||i&&rs(a)||a==="constructor"||a==="prototype")continue;let c=t[a],l=e[a];ge(l)?t[a]=l:V(c)&&V(l)?t[a]=ie(c,l,n,r):l!==void 0&&(t[a]=l)}return t},Fp=(t,e,n=new Set)=>{if(typeof t!="object"||typeof e!="object"||t===null||e===null)return t===e;if(n.has(t)||n.has(e))return!0;n.add(t),n.add(e);let r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(let s=0;s<r.length;s++){let i=r[s];if(!Object.prototype.hasOwnProperty.call(e,i)||!Fp(t[i],e[i],n))return!1}return!0},Y4=new Set(["node","__ref"]),sw=(t,e,n=Y4)=>{if(t===e)return!0;if(!V(t)||!V(e)||ge(t)||ge(e))return t===e;let r=n instanceof Set?n:new Set(n),o=new WeakSet;function s(i,a){if(o.has(a))return!0;o.add(a);for(let c in a){if(!Object.prototype.hasOwnProperty.call(a,c)||r.has(c))continue;if(!Object.prototype.hasOwnProperty.call(i,c))return!1;let l=a[c],f=i[c];if(ge(l)||ge(f)){if(l!==f)return!1}else if(V(l)&&V(f)){if(!s(f,l))return!1}else if(l!==f)return!1}return!0}return s(t,e)},iw=(t,e)=>{if(e==null)return t;if(ye(e)("string","number"))delete t[e];else if(I(e))for(let n=0;n<e.length;n++)delete t[e[n]];else throw new Error("Invalid input: props must be a string or an array of strings");return t},Bp=t=>{if(t===null||typeof t!="object")return t;let e=Object.create(null);for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=Bp(t[n]));return e},aw=(t,e)=>{if(t.length===0)return e;let n={},r=n;for(let o=0;o<t.length;o++)o===t.length-1&&e?r[t[o]]=e:(r[t[o]]={},r=r[t[o]]);return n},cw=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let o=0;o<e.length-1;o++){if(n[e[o]]===void 0)return;n=n[e[o]]}let r=e[e.length-1];n&&Object.prototype.hasOwnProperty.call(n,r)&&delete n[r]},lw=(t,e,n)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let r=t;for(let o=0;o<e.length-1;o++)(!r[e[o]]||typeof r[e[o]]!="object")&&(r[e[o]]={}),r=r[e[o]];return r[e[e.length-1]]=n,t},fw=(t,e)=>{if(!Array.isArray(e))throw new Error("Path must be an array.");let n=t;for(let r=0;r<e.length;r++){if(n==null)return;n=n[e[r]]}return n},uw=t=>{let n=[],r=0;for(let o=0;o<t.length;o++)if(n.length<2)n.push(t[o]);else if(t[o]===n[o%2]?r++:(n=[t[o-1],t[o]],r=1),r>=20)return(JT==="test"||JT==="development")&&console.warn("Warning: Potential infinite loop detected due to repeated sequence:",n),!0},dw=t=>{let e=new WeakSet;function n(r){if(r&&typeof r=="object"){if(e.has(r))return!0;e.add(r);for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&n(r[o]))return console.log(r,"cycle at "+o),!0}return!1}return n(t)},pw=(t,e)=>{let n=e instanceof Set?e:new Set(e),r={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&!n.has(o)&&(r[o]=t[o]);return r}});var Pl,Ll,Dl,jp=D(()=>{"use strict";jn();Pl=(function(){let t=0;function e(){return t++,t}return e})(),Ll=Pl,Dl=(t,e,n)=>(St(n,t)||n||t.key||Pl()).toString()});var Sn,hw,no,Up,gw,mw,yw,ro,bw,pr,tt,Il=D(()=>{"use strict";Sn="production",hw=Sn,no=(t=Sn)=>t==="production",Up=(t=Sn)=>t==="testing"||t==="test",gw=Up,mw=(t=Sn)=>t==="staging",yw=(t=Sn)=>t==="local",ro=(t=Sn)=>t==="development"||t==="dev"||t==="local",bw=(t,e=Sn)=>e[t],pr=(t=Sn)=>!no(t),tt=t=>{if(!t&&globalThis.__SMBLS_DEV_DIAGNOSTICS_OFF__===!0)return!1;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}});function Ml(t,e,n){let r;return function(){let o=this,s=arguments,i=function(){r=null,n||t.apply(o,s)},a=n&&!r;clearTimeout(r),r=setTimeout(i,e),a&&t.apply(o,s)}}function Sw(t,e=window){let n=function(){return t.apply(e,arguments)};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}var _w,ww,X4,Zi,Qi,ta,oo,ea=D(()=>{"use strict";_w=(t,e,n=300)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(t,o)},n)}},ww=t=>{let e={};return(...n)=>{let r=n[0];if(r in e)return e[r];{let o=t(r);return e[r]=o,o}}},X4=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Zi=t=>X4.test(t),Qi=t=>{let e=t?.plugins;if(!e||!e.length)return!1;for(let n of e)if(n.resolveHandler)return!0;return!1},ta=(t,e)=>{if(typeof t=="function")return t;let n=e?.context?.plugins;if(!n)return t;for(let r of n)if(r.resolveHandler){let o=r.resolveHandler(t,e);if(typeof o=="function")return o}return t},oo=(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 xw,gO=D(()=>{"use strict";Wt();jn();xw=(t,e)=>{let{__ref:n}=t,r=t.if;if(L(r)){let o;try{o=r(t,t.state,t.context)}catch(s){typeof console<"u"&&console.warn("[DOMQL] if condition error:",s),delete n.__if;return}o?n.__if=!0:delete n.__if}else r!=null&&typeof r=="object"?St(r,t)?n.__if=!0:delete n.__if:n.__if=!0}});var kw,Ew,mO=D(()=>{"use strict";kw=(t,...e)=>{t&&e.map(n=>console.log(n))},Ew=(t,e,...n)=>{t&&(console.group(e),n.map(r=>console.log(r)),console.groupEnd(e))}});function Ow(t){let e;try{if(!window.localStorage)return;e=window.localStorage.getItem(t)}catch{return}if(e!==null)try{return JSON.parse(e)}catch{return}}function Rw(t,e){if(e!=null)try{if(!window.localStorage)return;let n=typeof e=="object"?JSON.stringify(e):e;window.localStorage.setItem(t,n)}catch{}}var vw,Aw,Cw,Tw,yO=D(()=>{"use strict";Wt();ul();vw=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent),Aw=(t,e,n=365)=>{if(Xt(kt)||Xt(kt.cookie))return;let r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);let o=`expires=${r.toUTCString()}`;kt.cookie=`${t}=${e};${o};path=/`},Cw=t=>{if(Xt(kt)||Xt(kt.cookie))return;let e=`${t}=`,r=decodeURIComponent(kt.cookie).split(";");for(let o=0;o<r.length;o++){let s=r[o];for(;s.charAt(0)===" ";)s=s.substring(1);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return""},Tw=t=>{Xt(kt)||Xt(kt.cookie)||(kt.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}});var na,bO,Pw,Lw=D(()=>{"use strict";na={root:["body","html"],head:["title","base","meta","style","noscript","script"],body:new Set(["string","style","fragment","a","abbr","acronym","address","applet","area","article","aside","audio","b","basefont","bdi","bdo","big","blockquote","br","button","canvas","caption","center","cite","code","search","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","hgroup","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","template","hgroup","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"])},bO=new Set(["svg","path","circle","ellipse","line","polygon","polyline","rect","g","defs","symbol","use","text","tspan","image","clipPath","mask","pattern","marker","linearGradient","radialGradient","stop","filter","feGaussianBlur","feOffset","feMerge","feMergeNode","feBlend","feColorMatrix","feFlood","feComposite","foreignObject"]),Pw=t=>na.body.has(t)});var Dw,_O,ra,Xe,oa,Fl,Vn,Iw,Vp,Bl,Mw,jl,zp,Hp,Ul,Wp,sa,J4,zn,wO,Nl,Vl,Nw,$l,$w,Fw,Kp,qp,Gp,Yp,Xp,Jp,SO,Zp=D(()=>{"use strict";Gi();Bw();jn();Wt();Dw="production",_O=t=>t.sourcemap!==!1&&Dw!=="production",ra=t=>{if(!t)return[];let e=[],n=t.extends;n&&(I(n)?e.push(...n):e.push(n));let r=t.extend;return r&&(I(r)?e.push(...r):e.push(r)),e},Xe=t=>{if(!I(t))return t;let e=[];for(let n=t.length-1;n>=0;n--){let r=t[n];e.push(I(r)?Xe(r):r)}return e},oa=t=>{if(t.includes("+"))return t.split("+").filter(Hn);if(t.includes("_")){let[e]=t.split("_");return[e]}if(t.includes(".")&&!Hn(t.split(".")[1])){let[e]=t.split(".");return[e]}return[t]},Fl=(t,e,n)=>{let r=[],o=oa(n);o&&(r=[...o]);let s=Xe(ra(t));return s.length&&(r=[...r,...s]),r},Vn=(t,e)=>{let{__ref:n}=e,{__extends:r}=n;if(!t)return r;let o=e.variant,s=e.context;if(o&&s?.components&&!Array.isArray(t)&&typeof t=="string"){let i=`${t}.${o}`;s.components[i]&&(t=i)}return r.includes(t)||(r=Array.isArray(t)?[...r,...t]:[...r,t],n.__extends=r),r},Iw=(t,e)=>{if(!t)return e;let{extends:n}=e,r=I(n)?n:[n],o=I(t)?t:[t];return{...e,extends:Ki(o,r)}},Vp=()=>Math.random().toString(36).substring(2),Bl={},Mw={},jl=t=>Bl[t.__hash],zp=(t,e)=>{let n=Vp();return v(t)||(t.__hash=n),n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(Bl[n]=e),e},Hp=(t,e)=>t.__hash?e.concat(jl(t)):zp(t,e),Ul=(t,e,n,r=new Set,o,s)=>{for(let i of t)I(i)?Ul(i,e,n,r,o,s):sa(i,e,n,r,o,void 0,s);return e},Wp=(t,e,n,r=new Set,o,s,i)=>{let a=ra(t),c={...t};delete c.extends,delete c.extend;let l=!1;for(let f in c){l=!0;break}return l&&(e.push(c),o&&o.push(s)),a.length&&sa(Xe(a),e,n,r,o,s,i),e},sa=(t,e,n,r=new Set,o,s,i)=>{if(!t||r.has(t))return e;if(I(t))return Ul(t,e,n,r,o,i);let a=s;return v(t)?(a=t,t=Vl(t,n)):i&&k(t)&&i.has(t)&&(a=i.get(t)),r.has(t)||(r.add(t),t?.extends||t?.extend?Wp(t,e,n,r,o,a,i):t&&(e.push(t),o&&o.push(a))),e},J4=new Set(["parent","node","__ref","__proto__","extends","extend","childExtends","childExtendsRecursive"]),zn=(t,e,n,r,o)=>{e=pt(e);for(let s in e){if(J4.has(s))continue;let i=t[s],a=e[s];if(a!==void 0&&Object.prototype.hasOwnProperty.call(e,s)&&s!=="__proto__"&&s!=="constructor"&&s!=="prototype"){if(i===void 0)t[s]=a,n&&r?k(a)&&!I(a)?(n[s]=n[s]||{},wO(n[s],a,r)):n[s]=r:n&&o?.[s]&&(n[s]=o[s]);else if(k(i)&&k(a)){let c=n?n[s]=n[s]||{}:void 0,l=o?.[s];Hn(s)?t[s]=zn(i,a,c,r,l):zn(i,a,c,r,l)}if(s==="extends"||s==="childExtends"||s==="childExtendsRecursive"){if(I(i)&&I(a))t[s]=i.concat(a);else if(I(i)&&k(a)){let c=zn({},i);t[s]=zn(c,a)}}}}return t},wO=(t,e,n,r)=>{if(r||(r=new WeakSet),!r.has(e)){r.add(e);for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o==="__proto__"||o==="constructor"||o==="prototype")continue;let s=e[o];k(s)&&!I(s)?(t[o]=t[o]||{},wO(t[o],s,n,r)):t[o]=n}}},Nl=(t,e,n)=>t.reduce((r,o,s)=>{let i=pt(o),a=n?n[s]:void 0;return zn(r,i,e,a)},{}),Vl=(t,e,n={},r)=>{let o=e?.components||n.components,s=e?.pages||n.pages;if(v(t)){let i=o&&(o[t+"."+r]||o[t]||o["smbls."+t]),a=s&&t.charCodeAt(0)===47&&s[t];if(i)return i;if(a)return a;n.verbose&&(Dw==="test"||Dw==="development")&&console.warn("Extend is string but component was not found:",t);return}return t},Nw=(t,e)=>[].concat(t.slice(0,1)).concat(e.slice(0,1)).concat(t.slice(1)).concat(e.slice(1)),$l=(t,e,n,r)=>{if(!t)return[];if(t.__hash)return jl(t)||[];let s=sa(t,[],e,new Set,n,void 0,r);return n?s:Hp(t,s)},$w=(t,e)=>{if(!t)return e;let n=I(t)?t:[t];return Ki(n,e)},Fw=t=>{let e=[];function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(Hn(o)&&e.push(o),o==="extends"&&(typeof r[o]=="string"?e.push(r[o]):Array.isArray(r[o])&&(e=e.concat(r[o]))),typeof r[o]=="object"&&r[o]!==null&&n(r[o]))}return n(t),e},Kp=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=ra(t);if(i.length){let a=Xe(i),[c,...l]=a,f=typeof c=="string"&&s&&o?.components?`${c}.${s}`:null;f&&o.components[f]?Vn([f,...l],t):Vn(a,t)}return qp(t,e,n),Gp(t,e,n),Yp(t,e,n),t.component&&Vn(Xe(St(t.component,t)),t),o.defaultExtends&&Vn(Xe(o.defaultExtends),t),qi(r.__extends)},qp=(t,e,n={})=>{let{__ref:r}=t;return n.ignoreChildExtends||t.ignoreChildExtends||e.childProps?.extends&&Vn(Xe(e.childProps.extends),t),r.__extends},Gp=(t,e,n={})=>{let{__ref:r}=t,o=n.ignoreChildExtends||t.ignoreChildExtends,s=e.childExtends;return!o&&s&&Vn(Xe(s),t),r.__extends},Yp=(t,e,n={})=>{let{__ref:r}=t,o=e.childExtendsRecursive,s=n.ignoreChildExtendsRecursive||t.ignoreChildExtendsRecursive,i=t.key==="__text";return o&&!i&&!s&&Vn(Xe(o),t),r.__extends},Xp=(t,e,n={})=>{let{__ref:r}=t,o=t.context||e.context,s=t.variant,i=_O(n),a=i?[...r.__extends]:null,c=qi(r.__extends.map((l,f)=>Vl(l,o,n,f===0&&s)));if(i){let l=new WeakMap;for(let d=0;d<c.length;d++){let p=c[d],g=a[d];p&&k(p)&&v(g)&&l.set(p,g)}let f=[],u=$l(c,o,f,l);r.__extendsStack=u,r.__extendsNames=f}else{let l=$l(c,o);r.__extendsStack=l}return r.__extendsStack},Jp=(t,e,n={})=>{let{__ref:r}=t,{__extendsStack:o}=r;if(_O(n)){let s={},i=r.__extendsNames||[],a=Nl(o,s,i),c={};zn(t,a,c,void 0,s),r.__sourcemap=c}else{let s=Nl(o);zn(t,s)}return t},SO=(t,e,n={})=>(Kp(t,e,n),Xp(t,e,n),Jp(t,e,n),t)});function jw(t){return Object.keys(t).filter(e=>/^[A-Z]/.test(e))}function Uw(t){return Object.keys(t).filter(e=>/^\d+$/.test(e))}function Vw(t,e,n){let{context:r}=e||{},[o]=oa(n),s=n||o;return r?.components?.[s]||r?.pages?.[s]}var Hn,Bw=D(()=>{"use strict";Zp();Wt();Hn=t=>{if(!v(t)||!t.length)return!1;let e=t.charCodeAt(0);return e>=65&&e<=90}});function xO(t,e){let{props:n,on:r}=e,o=Zo(t.split("on")[1]),s=r[o],i=n[t];L(s)?r[o]=(...a)=>{if(s(...a)!==!1&&L(i))return i(...a)}:r[o]=i}var kO=D(()=>{"use strict";wl();Wt()});function Qp(t,e={}){let n=e.cachedKeys||[];for(let r in t){let o=t[r];if(r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r[2]===r[2].toUpperCase()&&(L(o)||o!=null&&Qi(this.context))){let g=Zo(r.slice(2));t.on&&(t.on[g]=o),delete t[r];continue}if(r==="childProps"){t.props[r]=o,delete t[r],n.push(r);continue}let a=this.define?.[r],c=this.context?.define?.[r],l=k(a)||L(a),f=k(c)||L(c);if(l||f)continue;let u=r.charAt(0);if(vO.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=zw.test(r)||EO.test(r)||Q4(o),p=Qr.has(r);!d&&!p&&(r in t.props||(t.props[r]=o),delete t[r],n.push(r))}return t}function th(t=this,e){let n=e.cachedKeys||[];for(let r in t.props){let o=t.props[r],s=r.length>2&&r.charCodeAt(0)===111&&r.charCodeAt(1)===110,i=L(o)||o!=null&&Qi(this.context);if(s&&i){xO(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(vO.has(a))continue;let c=this.define?.[r],l=this.context?.define?.[r],f=k(c)||L(c),u=k(l)||L(l),d=zw.test(r)||EO.test(r),p=Qr.has(r);(d||p||f||u)&&(t[r]===void 0||o===null)&&(t[r]=o,t.props&&delete t.props[r])}return t}function eh(t=this){let e=[];return Qp.call(this,t,{cachedKeys:e}),th.call(this,t,{cachedKeys:e}),t}function Hw(t={}){return t.on||(t.on={}),t.props||(t.props={}),eh.call(this,t)}function Kw(t,e){this.__element.update({props:t},e)}function ql(t){let e={update:Kw.bind(t.props),__element:t};Object.setPrototypeOf(t.props,e)}var zw,EO,vO,Z4,Q4,Wl,zl,Ww,Kl,Gl,Yl,nh,Hl,qw,Gw,Yw=D(()=>{"use strict";es();kO();jn();Wt();wl();ea();zw=/^[A-Z]/,EO=/^\d+$/,vO=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),Z4=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),Q4=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(Z4.has(e)||zw.test(e))return!0;return!1},Wl=(t,e,n)=>{let{props:r,__ref:o}=t;if(o.__propsStack=[],r)o.__initialProps=r;else return{};return V(r)?{...r}:(o.__propsStack.push(r),{})};zl=t=>ye(t)("string","number")?{inheritedString:t}:t,Ww=(t,e)=>!t||!e.length?!1:e.includes(t),Kl=(t,e)=>{let{__ref:n}=t,r=n.__propsStack||[],o=e.props;if(!o)return r;let s=o[t.key],i=o.childProps||e.childProps,a=t.props?.ignoreChildProps;if(i&&!a){let c=zl(i);r.unshift(c)}if(s){let c=zl(s);r.unshift(c)}return r};Gl=t=>{let e=new Set;return t.filter(n=>!n||to.has(n)||e.has(n)?!1:(e.add(n),!0))},Yl=(t,e,n)=>(e.props=t.reduce((r,o)=>{if(to.has(o))return r;for(;L(o);)o=St(o,e);return bt(r,pt(o,{exclude:to}))},{}),ql(e),e.props),nh=(t,e)=>{let{props:n,__ref:r}=t,o=r.__propsStack||[];if(e?.props&&(o=[...Kl(t,e)]),k(n)?o.push(n):n==="inherit"&&e?.props?o.push(e.props):n&&o.push(n),I(r.__extendsStack))for(let s=0;s<r.__extendsStack.length;s++){let i=r.__extendsStack[s];i.props&&i.props!==n&&o.push(i.props)}return r.__propsStack=Gl(o),r.__propsStack},Hl=(t,e)=>{let{__ref:n}=t,r=nh(t,e);r.length?Yl(r,t):(n.__propsStack=[],t.props={})},qw=function(t,e,n){let{__ref:r}=t;if(r.__if)Hl(t,e);else try{Hl(t,e)}catch(o){t.context?.designSystem?.verbose&&console.warn("initProps error at",r.path?.join("."),o),t.props={},r.__propsStack=[]}return ql(t),t},Gw=(t,e,n)=>{let{__ref:r}=e,s=[...r.__propsStack||[]],i=Kl(e,n);return i.length&&(s=[...i,...s]),t&&(s=[t,...s]),r.__propsStack=Gl(s),r.__propsStack.length&&Yl(r.__propsStack,e),e}});var AO,rh,oh,sh,ih,Xw,ah,ch,lh,Jw,CO=D(()=>{"use strict";Zp();jp();pl();Yw();Lw();Wt();AO="production",rh=(t,e,n)=>{let r=e.childExtends&&e.childExtends.tag,o=e.childProps&&e.childProps.tag,s=na.body.has(n)&&n;return{text:t,tag:r||o||s||"string"}},oh=(t,e,n)=>{if(t===void 0)return(AO==="test"||AO==="development")&&console.warn(n,"element is undefined in",e?.__ref?.path),{};if(t!==null)return t===!0?{}:ye(t)("string","number")?rh(t,e,n):L(t)?{props:t}:t},sh=(t,e)=>{let n={};return n.origin=t,n.parent=e,n},ih=(t,e,n,r,o)=>{if(!e)return o;if(dr(e)){let s={key:":root",node:e};return o[`${n}_parent`]=s,s}return e},Xw=(t,e)=>{let{__ref:n}=t,{__ref:r}=e,o=e&&e.key===":root";n?.root||(n.root=o?t:r?.root)},ah=(t,e,n)=>{let{__ref:r}=e;return r||(r=e.ref={}),r.path||(r.path=[]),r.path.concat(n)},ch=(t,e,n,r,o)=>(r.context&&!o.context&&!t.context&&(o.context=r.context),r.context||e.context||o.context||t.context),lh=(t,e,n)=>{let r=sh(t,e);return t.__ref=r,r.__defineCache||(r.__defineCache={}),r.__exec||(r.__exec={}),r.__execProps||(r.__execProps={}),r.__class||(r.__class={}),r.__classNames||(r.__classNames={}),r.__attr||(r.__attr={}),r.__changes||(r.__changes=[]),r.__children||(r.__children=[]),r.__extends=Fl(t,e,n),r.path=ah(t,e,n),r},Jw=(t,e,n,r,o)=>{let i=t?.__hash?{extends:[t]}:oh(t,e,n);if(!i)return;let a=ih(i,e,n,r,o),c=Dl(i,a,n);lh(i,a,c);let l=Wl(i,a,c),f=ch(i,a,c,r,o),u=i.on||{};return{...i,key:c,props:l,parent:a,context:f,on:u}}});var Zw,fh,uh,dh,ph,Qw,hh,tS,eS,nS,gh,TO,t5,PO,so,rS,OO,io,cs,RO,LO,DO,Xl,Wn,IO=D(()=>{"use strict";Gi();es();Il();jn();Wt();Zw=t=>{let{state:e,props:n,__ref:r}=t,o=n?.state||e;return ye(o)("string","number")?(r.__state=o,{value:o}):o===!0?(r.__state=t.key,{}):o?(r.__hasRootState=!0,o):!1},fh=(t,e)=>{if(!t.includes("~/"))return;if(t.split("~/").length>1)return e.root},uh=(t,e)=>{if(!t.includes("../"))return;let r=t.split("../").length-1;for(let o=0;o<r;o++){if(!e.parent)return null;e=e.parent}return e},dh=(t,e,n={})=>{let r=v(t)?t.split("/"):[t],o=r.length-1;for(let s=0;s<o;s++){let i=r[s],a=r[s+1];if(i==="__proto__"||a==="__proto__")return;let c=e[i];c||(c=e[i]={}),c[a]||(c[a]={}),t=a,e=c}return n.returnParent?e:e[t]},ph=(t,e,n={})=>{let o=t.__ref.__state;if(!hh(t))return;let s=fh(o,e.state),i=e.state;if(s)i=s,o=o.replaceAll("~/","");else{let a=uh(o,e.state);a&&(i=a,o=o.replaceAll("../",""))}if(i)return dh(o,i,n)},Qw=(t,e)=>{let n=t.__ref,r=ph(t,e);if(r===void 0)return t.state;if(ye(r)("object","array"))return pt(r);if(ye(r)("string","number","boolean"))return n.__stateType=typeof r,{value:r};console.warn(n.__state,"is not present. Replacing with",{})},hh=t=>{let{__ref:e}=t,n=e?.__state;return!!(n&&ye(n)("number","string","boolean"))},tS=function(t){return V(t)?!!(t.update&&t.parse&&t.clean&&t.create&&t.parent&&t.destroy&&t.rootUpdate&&t.parentUpdate&&t.keys&&t.values&&t.toggle&&t.replace&&t.quietUpdate&&t.quietReplace&&t.add&&t.apply&&t.applyReplace&&t.setByPath&&t.setPathCollection&&t.removeByPath&&t.removePathCollection&&t.getByPath&&t.applyFunction&&t.__element&&t.__children):!1},eS=(t,e)=>{if(!t)return e||{};let n=t.split("/"),r={},o=r,s=n.length-1;for(let i=0;i<=s;i++)o[n[i]]=i===s?e||{}:{},o=o[n[i]];return r},nS=(t,e)=>{let{__element:n}=e,r=n?.state;if(!r)return;let o=pt(r,Qo),s={[t.key]:o},i=k(r.__depends)?{...r.__depends,...s}:s;return Array.isArray(r)?yl(r,{...Object.getPrototypeOf(r),__depends:i}):Object.setPrototypeOf(r,{...Object.getPrototypeOf(r),__depends:i}),o},gh=new Set(["parent","root"]),TO=new Set,t5=t=>{TO.has(t)||(TO.add(t),tt()&&console.warn(`[smbls/state] the declared state key "${t}" names a state bookkeeping slot (parent / root) and was NOT copied into the state. Rename the key (e.g. "`+t.split(".").pop()+'Data").'))},PO=(t,e,n,r)=>{if(t===e)return t;for(let o=0;o<r.length;o+=2)if(r[o]===t&&r[o+1]===e)return t;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||o.charCodeAt(0)===95&&o.charCodeAt(1)===95||o==="constructor"||o==="prototype")continue;let s=n?n+"."+o:o;if(gh.has(o)){t5(s);continue}let i=t[o],a=e[o];V(i)&&V(a)?(r.push(t,e),PO(i,a,s,r),r.length-=2):i===void 0&&(t[o]=a)}return t},so=(t,e)=>!V(t)||!V(e)?t:PO(t,e,"",[]),rS=(t,e,n={})=>{let{overwrite:r}=n;if(!r)return;let o=r==="shallow";if(r==="merge"){bt(t,e,Qo);return}(o?as:ie)(t,e,Qo)},OO="__polyglotSeededKeys",io=t=>{if(!k(t))return new Set;let e=t[OO];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,OO,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},cs=(t,e,n)=>io(t).has(e)?!0:!k(n)||n[e]===void 0,RO="__polyglotSeededValues",LO=t=>{if(!k(t))return new Map;let e=t[RO];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,RO,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},DO=t=>{if(t===null||typeof t!="object")return typeof t+":"+String(t);try{return"json:"+JSON.stringify(t)}catch{return null}},Xl=(t,e,n)=>{if(!io(t).has(e))return!1;let r=LO(t);if(!r.has(e))return!0;let o=k(n)||Array.isArray(n)?n[e]:void 0,s=DO(o);return s!==null&&s===r.get(e)},Wn=(t,e,...n)=>(io(t).add(e),n.length&&LO(t).set(e,DO(n[0])),e)});var e5,oS,MO=D(()=>{"use strict";e5=(t,e)=>{let n=e;for(;n;){if(n===t)return!0;n=Object.getPrototypeOf(n)}return!1},oS=(t,e)=>{let{__ref:n}=t,r=t.context||e.context||n.root?.context;r&&!r.globalScope&&(r.globalScope={});let o=e.scope||n.root?.scope,s=r?.globalScope;if(!t.scope)o?t.scope=o:s?t.scope=Object.create(s):t.scope={};else if(typeof t.scope=="object"&&t.scope!==null&&Object.getPrototypeOf(t.scope)===Object.prototype){let i=o||s;i&&!e5(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var NO,mh,hr,yh,sS,iS=D(()=>{"use strict";Wt();ea();NO=(t,e)=>{let n="on"+t.charAt(0).toUpperCase()+t.slice(1);return e[n]},mh=(t,e,n,r,o)=>{if(t=ta(t,e),!!L(t))try{let s=t.call(e,e,n||e.state,r||e.context,o);return s&&typeof s.then=="function"&&s.catch(i=>{e.error=i,i instanceof ReferenceError?console.warn("[DOMQL] Async event warning:",i.message):console.error("[DOMQL] Async event error:",i)}),s}catch(s){if(e.error=s,s instanceof ReferenceError?console.warn("[DOMQL] Event handler warning:",s.message):console.error("[DOMQL] Event handler error:",s),e.context?.strictMode)throw s}},hr=(t,e,n)=>{if(!e)throw new Error("Element is required");oo(t,e,n);let r=NO(t,e);if(r){let{state:o,context:s}=e;return mh(r,e,o,s,n)}},yh=(t,e,n,r,o,s)=>{if(t=ta(t,n),!!L(t))try{let i=t.call(n,e,n,r||n.state,o||n.context,s);return i&&typeof i.then=="function"&&i.catch(a=>{n.error=a,console.error("[DOMQL] Async event update error:",a)}),i}catch(i){if(n.error=i,console.error("[DOMQL] Event update error:",i),n.context?.strictMode)throw i}},sS=(t,e,n,r)=>{oo(t,n,e,r);let o=NO(t,n);if(o){let{state:s,context:i}=n;return yh(o,e,n,s,i,r)}}});var aS,Jl,cS=D(()=>{"use strict";aS={},Jl={}});var ao,lS=D(()=>{"use strict";ao=t=>{if(!t)return 0;if(typeof t=="number")return t;let e=t.match(/^(\d+)(ms|s|m|h)$/);if(!e)return 0;let n=parseInt(e[1]),r=e[2];return r==="ms"?n:r==="s"?n*1e3:r==="m"?n*6e4:r==="h"?n*36e5:0}});var co,fs,us,fS,Kn,uS,$O,FO,dS,pS,BO,Zl,jO,n5,hS,r5,gS,ls,UO,bh,mS,VO,zO,HO,ia=D(()=>{"use strict";M();lS();co="@symbo.ls/fetch:EARLY",fs=3e4,us=(t,e)=>{let n=new URL(t);return n.searchParams.sort(),n.toString()+" "+(e||"")},fS=t=>{if(t==null)return!0;if(typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&e!==null)return!1;for(let n in t){let r=t[n];if(!(r===void 0||typeof r=="string"||typeof r=="boolean")&&!(typeof r=="number"&&isFinite(r)))return!1}return!0},Kn=()=>Symbol.for(co),uS=(t,e)=>{let n=[];for(let r in t||{}){let o=r.toLowerCase(),s={name:r,header:o,param:t[r],found:!1,value:void 0};for(let i in e||{})i.toLowerCase()===o&&(s.found=!0,s.value=e[i]);n.push(s)}return n},$O=(t,e)=>{if(!t||typeof t!="object"||!e||typeof e!="object")return t;let n={...t};return n.query===void 0&&e.query!==void 0&&(n.query=e.query),n.rpc===void 0&&e.rpc!==void 0&&(n.rpc=e.rpc),n},FO=(t,e,n)=>{let r=Kn();if(n5(n),!t||typeof t!="object"){let i=globalThis[r];return i&&i.seeded?{carried:{},rpc:!1,maxAge:fs,seeded:!0}:null}globalThis[r]||(globalThis[r]={entries:{}});let o={};for(let{header:i,found:a,value:c}of uS(t.query,e))a&&(o[i]=c);let s=typeof t.maxAge=="number"&&t.maxAge>=0?t.maxAge:fs;return{carried:o,rpc:t.rpc==="get",maxAge:s,seeded:!!globalThis[r].seeded}},dS=(t,e=fs,n)=>{let r=globalThis[Kn()],o=r&&r.entries&&r.entries[t];return!o||(delete r.entries[t],!(Date.now()-o.time<=e))?null:o.seeded?(r.stale&&n&&(o.seeded.taken=gS(r,t,n())),Promise.resolve(o.seeded)):Promise.resolve(o.answer).then(s=>s&&s.ok&&!s.bodyUsed?s:null,()=>null)},pS=()=>{let t=globalThis[Kn()];t&&t.entries&&(t.entries={})},BO=t=>(Array.isArray(t)?t:[]).filter(e=>e&&typeof e.url=="string"&&typeof e.body=="string").map(e=>({k:us(e.url,e.lang||""),s:e.status||200,t:e.type||"application/json",b:e.body})),Zl='script[type="application/json"][data-fetch-seed]',jO=t=>{let e=BO(t);return e.length?'<script type="application/json" data-fetch-seed>'+gr(e)+"<\/script>":""},n5=t=>{let e=qn(globalThis.document,Zl,{remove:!0}),n=t===!1?null:e&&e.value;if(!Array.isArray(n)||!n.length){let c=globalThis[Kn()];c&&c.stale||(ls=null);return}let r=Kn(),o=globalThis[r]||(globalThis[r]={entries:{}});o.entries||(o.entries={}),o.seeded=!0;let s=Date.now();for(let c of n)!c||typeof c.k!="string"||typeof c.b!="string"||o.entries[c.k]||(o.entries[c.k]={time:s,seeded:{seeded:!0,status:c.s||200,type:c.t||"application/json",body:c.b}});let i=ds(globalThis.document)||{stamp:null,time:null},a=r5(t,i.stamp,i.time);a?(o.stale=a,o.seedConfig=t&&typeof t=="object"?t:null):ls=null},hS="data-smbls-stale",r5=(t,e,n)=>{let r=globalThis.document&&globalThis.document.documentElement;if(r&&typeof r.hasAttribute=="function"&&r.hasAttribute(hS))return!0;if(!t||typeof t!="object")return!1;if(t.maxAge!=null&&n!==null){let o=ao(t.maxAge);if(o>0&&Date.now()-n>o)return!0}if(typeof t.isStale!="function")return!1;try{let o=t.isStale(e,{time:n});return o&&typeof o.then=="function"?Promise.resolve(o).then(Boolean,()=>!1):!!o}catch{return!1}},gS=(t,e,n)=>{let r={key:e,again:n,result:null,cacheKey:null};if((t.taken||(t.taken=[])).push(r),ls){let o=ls;ls=null;for(let s of o)try{s()}catch{}}return r},ls=null,UO=t=>{let e=globalThis[Kn()];return e&&e.seeded&&!e.stale||e&&e.stale&&e.revalidated?!1:e&&e.stale&&e.taken&&e.taken.length?(t(),!0):((ls||(ls=new Set)).add(t),!0)},bh=(t,e)=>{let n=globalThis[Kn()];!n||!t||typeof t!="object"||(e.result=t,(n.results||(n.results=new WeakMap)).set(t,e))},mS=(t,e)=>{let n=globalThis[Kn()],r=n&&n.results&&t?n.results.get(t):null;r&&(r.cacheKey=e)},VO=()=>{let t=globalThis[Kn()];return!!(t&&t.stale&&!t.revalidated)},zO=async()=>{let t=globalThis[Kn()];if(!t||!t.stale||t.revalidated)return null;t.revalidated=!0;let e=await t.stale,n=t.taken||[];return t.taken=[],t.results=null,e?{taken:n,config:t.seedConfig||{}}:null},HO=t=>{let e=BO(t);if(!e.length)return"";let n=gr(e);return"<script>(function(){try{var k=Symbol.for("+JSON.stringify(co)+"),r=globalThis[k]||(globalThis[k]={entries:{}}),t=Date.now(),l="+n+';r.seeded=true;r.entries=r.entries||{};for(var i=0;i<l.length;i++){var e=l[i];r.entries[e.k]={time:t,answer:Promise.resolve(new Response(e.b,{status:e.s,headers:{"content-type":e.t}}))}}}catch(e){}})()<\/script>'}});var WO,KO,qO,yS=D(()=>{"use strict";ia();WO=()=>globalThis[Symbol.for(co)],KO=(t,e=fs,n,r)=>{let o=WO(),s=o&&o.entries&&o.entries[t];if(!s||!s.seeded||!(Date.now()-s.time<=e))return null;let i=r(s.seeded);return i?(delete o.entries[t],o.stale&&n&&bh(i,gS(o,t,n())),i):null},qO=()=>{let t=WO();if(t&&t.seeded){for(let n in t.entries)if(t.entries[n]&&t.entries[n].seeded)return!0;return!1}let e=globalThis.document;return!!(e&&typeof e.querySelector=="function"&&e.querySelector(Zl))}});var GO,_h,YO,XO,JO,ZO,bS=D(()=>{"use strict";GO=Symbol.for("@symbo.ls/fetch:IN_FLIGHT"),_h=()=>globalThis[GO]||(globalThis[GO]={count:0,waiters:[]}),YO=()=>{_h().count++},XO=()=>{let t=_h();if(t.count=t.count>0?t.count-1:0,t.count===0&&t.waiters.length){let e=t.waiters;t.waiters=[];for(let n of e)n()}},JO=()=>_h().count,ZO=()=>{let t=_h();return t.count===0?Promise.resolve():new Promise(e=>{t.waiters.push(e)})}});var o5,QO,t1=D(()=>{"use strict";ia();o5=(t,e)=>{let n=new URL(t);return n.searchParams.delete("limit"),n.searchParams.sort(),n.toString()+" "+(e||"")},QO=(t,e,n,r=fs)=>{let o=globalThis[Symbol.for(co)],s=o&&o.slices&&o.slices[o5(t,e)];if(!s||!(n>0))return null;for(let i=0;i<s.length;i++){let a=s[i],c=o.entries&&o.entries[a];if(!(!c||!(c.limit>=n)))return s.splice(i,1),delete o.entries[a],Date.now()-c.time<=r?Promise.resolve(c.answer).then(l=>{if(!l||!l.ok||l.bodyUsed)return null;let f=l.headers&&l.headers.get("content-type")||"application/json";return l.json().then(u=>Array.isArray(u)?{seeded:!0,status:l.status,type:f,body:JSON.stringify(u.slice(0,n))}:null)}).catch(()=>null):null}return null}});var xS={};F(xS,{buildUrl:()=>Ql,headerEntries:()=>s1,restAdapter:()=>wh,selectQuery:()=>wS,setup:()=>h5,withQuery:()=>tf});var Ql,wS,n1,SS,s5,i5,a5,e1,r1,Je,o1,c5,l5,s1,_S,f5,u5,d5,p5,tf,h5,wh,i1=D(()=>{"use strict";ia();yS();bS();t1();Ql=(t,e,n)=>{let r=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${r}${e}`);if(n)for(let s in n){let i=n[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},wS=({params:t,select:e,limit:n,offset:r,order:o,single:s})=>{let i={...t};return e&&(i.select=e),n&&(i.limit=n),r&&(i.offset=r),s&&(i.single=!0),o&&(typeof o=="string"?i.order=o:Array.isArray(o)?i.order=o.map(a=>`${a.by}:${a.asc===!1?"desc":"asc"}`).join(","):o.by&&(i.order=`${o.by}:${o.asc===!1?"desc":"asc"}`)),i},n1=t=>Object.prototype.toString.call(t).slice(8,-1),SS=["auto","json","text","blob","arrayBuffer","stream","response"],s5={json:async t=>{let e=await t.text();return e?JSON.parse(e):null},text:t=>t.text(),blob:t=>t.blob(),arrayBuffer:t=>t.arrayBuffer(),stream:t=>t.body,response:t=>t},i5=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},a5=async t=>{let e=await t.text(),n=t.headers.get("content-type");if(e&&n&&n.includes("json"))try{return JSON.parse(e)}catch{}return e},e1=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,r1=(t,e)=>{let n=t.body,r=e==="json"||e==="auto"&&/json/i.test(t.type);if(!r&&e!=="auto"&&e!=="text")return null;let o;try{o=r?n?JSON.parse(n):null:n}catch{return!1}return{data:o,error:null,status:t.status}},Je=async(t,e,n,r)=>{let o=n??"auto";if(!SS.includes(o))throw new TypeError(`@symbo.ls/fetch rest: unknown responseType "${o}" \u2014 use one of: ${SS.join(", ")}`);YO();try{return await o1(t,e,o,r)}finally{XO()}},o1=async(t,e,n,r)=>{let o=r?await r:null;if(o&&o.seeded===!0){let i=r1(o,n);if(o.taken&&i!==!1){let a=i||await o1(t,e,n,Promise.resolve(new Response(o.body,{status:o.status,headers:{"content-type":o.type}})));return bh(a,o.taken),a}if(i)return i;o=i===!1?null:new Response(o.body,{status:o.status,headers:{"content-type":o.type}})}let s=o||await globalThis.fetch(t,e);if(n==="auto"){let i=await i5(s);return{data:i,error:s.ok?null:e1(i,s),status:s.status}}if(!s.ok){let i=await a5(n==="response"?s.clone():s);return{data:n==="response"?s:i,error:e1(i,s),status:s.status}}return{data:await s5[n](s),error:null,status:s.status}},c5=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],l5=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||c5.includes(n1(t))),s1=t=>Array.isArray(t)?t:typeof t.entries=="function"?t.entries():Object.entries(t),_S=(...t)=>{let e={},n=new Map;for(let r of t)if(r)for(let[o,s]of s1(r)){let i=o.toLowerCase();if(n.has(i)&&delete e[n.get(i)],s==null){n.delete(i);continue}n.set(i,o),e[o]=s}return e},f5={"Content-Type":"application/json"},u5={"Content-Type":void 0},d5=t=>{if(!t||typeof t!="object")return null;let e={};for(let{header:n,param:r}of uS(t.query))e[n]=r;return{params:e,rpc:t.rpc==="get"}},p5="content-type",tf=(t,e)=>{let n=Object.keys(e);if(!n.length)return t;let r=new URL(t);for(let o of n)r.searchParams.set(o,e[o]);return r.toString()},h5=async({url:t,headers:e,auth:n,fetchOptions:r,early:o,reads:s,seed:i})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return wh(t,e,n,r,o,s,i)},wh=(t,e={},n,r={},o,s,i)=>{let a=n?.token||null,c=FO($O(o,s),e,i),l=d5(s),f=_=>{if(!l)return null;let b={},w={},S={};for(let A in _){let T=A.toLowerCase();if(T==="authorization")return null;if(T===p5)continue;w[A]=_[A];let O=l.params[T];O?S[O]=_[A]:b[A]=_[A]}return{headers:b,adoptHeaders:w,query:S}},u=(_,b,w)=>{if(!c)return null;let S="";for(let A in b){let T=A.toLowerCase();if(T==="accept-language")S=String(b[A]);else if(c.carried[T]!==b[A])return null}try{let A=_();return dS(us(A,S),c.maxAge)||(w>0?QO(A,S,w,c.maxAge):null)}catch{return null}},d=(_,b,w,S,A,T,O)=>{if(!c||!c.seeded)return null;let B="";for(let $ in b){let N=$.toLowerCase();if(N==="accept-language")B=String(b[$]);else if(N!=="accept")return null}try{return dS(us(_,B),c.maxAge,()=>g(w,S,A,_,T,O))}catch{return null}},p=(_,b,w,S,A,T,O)=>{if(!c||!c.seeded)return null;let B="";for(let N in b){let G=N.toLowerCase();if(G==="accept-language")B=String(b[N]);else if(G!=="accept")return null}let $=O??"auto";if(!SS.includes($))return null;try{return KO(us(_,B),c.maxAge,()=>g(w,S,A,_,T,O),N=>r1(N,$)||null)}catch{return null}},g=(_,b,w,S,A,T)=>({method:_,from:b,params:w,send:()=>Je(S,A,T,null)}),h=()=>a?{Authorization:`Bearer ${a}`}:null,m=_=>_S(e,h(),_),y=_=>({...r,..._}),x=(_,b,w)=>{if(!l5(b))return y({method:_,headers:_S(e,h(),f5,w),body:JSON.stringify(b)});let S={method:_,headers:_S(e,h(),u5,w),body:b};return n1(b)==="ReadableStream"&&(S.duplex="half"),y(S)},E=(_,b)=>{let w=b||t;if(_&&(_.startsWith("http://")||_.startsWith("https://")))return _;let S=_&&!_.startsWith("/")?"/":"";return`${w}${S}${_||""}`};return{name:"rest",setToken:_=>{a=_},getSession:async()=>{if(!n?.sessionUrl)return a?{token:a}:null;let _=await Je(E(n.sessionUrl,n.baseUrl),y({headers:m()}));return _.error?null:_.data},signIn:async _=>{if(!n?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let b=await Je(E(n.signInUrl,n.baseUrl),x("POST",_));return b.data?.token&&(a=b.data.token),b},signOut:async()=>(n?.signOutUrl&&await Je(E(n.signOutUrl,n.baseUrl),y({method:"POST",headers:m()})),a=null,{error:null}),select:({from:_,params:b,select:w,limit:S,offset:A,order:T,single:O,headers:B,baseUrl:$,responseType:N})=>{let G=Ql($||t,_||"",wS({params:b,select:w,limit:S,offset:A,order:T,single:O})),Y=!A&&!O&&Number(S)>0?Number(S):0,nt=m(B),ot=f(nt);if(ot){let Z=y({headers:ot.headers}),J=tf(G,ot.query);return Je(J,Z,N,d(J,ot.headers,"select",_,b,Z,N)||u(()=>G,ot.adoptHeaders,Y))}let st=y({headers:nt});return Je(G,st,N,d(G,st.headers,"select",_,b,st,N)||u(()=>G,st.headers,Y))},seeded:({method:_,from:b,params:w,select:S,limit:A,offset:T,order:O,single:B,headers:$,baseUrl:N,responseType:G,read:Y})=>{if(!c||!c.seeded)return null;if(_==="select"){let nt=Ql(N||t,b||"",wS({params:w,select:S,limit:A,offset:T,order:O,single:B})),ot=m($),st=f(ot);if(st){let J=y({headers:st.headers});return p(tf(nt,st.query),st.headers,"select",b,w,J,G)}let Z=y({headers:ot});return p(nt,Z.headers,"select",b,w,Z,G)}if(_==="rpc"){if(!(Y===!0&&l&&l.rpc&&fS(w)))return null;let nt=f(m($));if(!nt)return null;let ot;try{ot=Ql(N||t,`rpc/${b}`,w)}catch{return null}let st=y({method:"GET",headers:nt.headers});return p(tf(ot,nt.query),nt.headers,"rpc",b,w,st,G)}return null},rpc:async({from:_,params:b,headers:w,baseUrl:S,responseType:A,read:T})=>{let O=fS(b),B=()=>Ql(S||t,`rpc/${_}`,b),$=Z=>Je(E(`rpc/${_}`,S),x("POST",b,w),A,Z),N=m(w),G=T===!0&&l&&l.rpc&&O?f(N):null,Y=null;if(G)try{Y=B()}catch{Y=null}if(!Y)return $(c&&c.rpc&&O?u(B,N):null);let nt=y({method:"GET",headers:G.headers}),ot=tf(Y,G.query),st=await Je(ot,nt,A,d(ot,G.headers,"rpc",_,b,nt,A)||u(()=>Y,G.adoptHeaders));return st.status===405?$(null):st},insert:({from:_,data:b,headers:w,baseUrl:S,responseType:A})=>Je(E(_,S),x("POST",b,w),A),update:({from:_,data:b,params:w,method:S,headers:A,baseUrl:T,responseType:O})=>{let B=w?.id||b?.id,$=B?`${_}/${B}`:_;return Je(E($,T),x(S||"PATCH",b,A),O)},upsert:({from:_,data:b,params:w,method:S,headers:A,baseUrl:T,responseType:O})=>{let B=w?.id||b?.id,$=B?`${_}/${B}`:_;return Je(E($,T),x(S||"PUT",b,A),O)},delete:({from:_,params:b,headers:w,baseUrl:S,responseType:A})=>{let T=b?.id,O=T?`${_}/${T}`:_;return Je(E(O,S),y({method:"DELETE",headers:m(w)}),A)}}}});var c1={};F(c1,{localAdapter:()=>a1,setup:()=>m5});var Sh,g5,m5,a1,l1=D(()=>{"use strict";Sh=(t,e)=>{if(!e)return!0;for(let n in e){let r=e[n];if(r===null){if(t[n]!==null&&t[n]!==void 0)return!1}else if(Array.isArray(r)){if(!r.includes(t[n]))return!1}else if(typeof r=="object"){for(let o in r)if(o==="gt"&&!(t[n]>r[o])||o==="gte"&&!(t[n]>=r[o])||o==="lt"&&!(t[n]<r[o])||o==="lte"&&!(t[n]<=r[o])||o==="neq"&&t[n]===r[o]||o==="like"&&!String(t[n]).includes(r[o]))return!1}else if(t[n]!==r)return!1}return!0},g5=(t,{order:e,limit:n,offset:r,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,l)=>c[i]<l[i]?a?-1:1:c[i]>l[i]?a?1:-1:0)}return r&&(s=s.slice(r)),n&&(s=s.slice(0,n)),o?{data:s[0]||null,error:null}:{data:s,error:null}},m5=async({data:t,...e})=>a1(t,e),a1=(t={},e={})=>{let n={},r={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!n[f])if(o)try{let u=localStorage.getItem(s+f);n[f]=u?JSON.parse(u):t[f]||[]}catch{n[f]=t[f]||[]}else n[f]=t[f]||[];return n[f]},a=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(n[f]))}catch{}},c=(f,u,d,p)=>{let g=r[f];if(g)for(let h of g)h(d,p,{event:u,table:f})},l=Date.now();return{name:"local",store:n,select:async({from:f,params:u,...d})=>{let g=i(f).filter(h=>Sh(h,u));return g5(g,d)},insert:async({from:f,data:u})=>{let d=i(f),g=(Array.isArray(u)?u:[u]).map(h=>{let m={id:h.id||++l,...h};return d.push(m),m});a(f);for(let h of g)c(f,"INSERT",h,null);return{data:Array.isArray(u)?g:g[0],error:null}},update:async({from:f,data:u,params:d})=>{let p=i(f),g=[];for(let h=0;h<p.length;h++)if(Sh(p[h],d)){let m={...p[h]};Object.assign(p[h],u),g.push(p[h]),c(f,"UPDATE",p[h],m)}return a(f),{data:g,error:null}},upsert:async({from:f,data:u,params:d})=>{let p=i(f),g=Array.isArray(u)?u:[u],h=[];for(let m of g){let y=d||(m.id!==void 0?{id:m.id}:null),x=y?p.findIndex(E=>Sh(E,y)):-1;if(x>-1){let E={...p[x]};Object.assign(p[x],m),h.push(p[x]),c(f,"UPDATE",p[x],E)}else{let E={id:m.id||++l,...m};p.push(E),h.push(E),c(f,"INSERT",E,null)}}return a(f),{data:Array.isArray(u)?h:h[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),p=[];for(let g=d.length-1;g>=0;g--)Sh(d[g],u)&&(p.push(d[g]),d.splice(g,1),c(f,"DELETE",null,p[p.length-1]));return a(f),{data:p,error:null}},subscribe:({from:f,on:u},d)=>{r[f]||(r[f]=[]);let p=(g,h,m)=>{u&&u!=="*"&&u!==m.event||d(g,h,m)};return r[f].push(p),()=>{let g=r[f].indexOf(p);g>-1&&r[f].splice(g,1)}}}}});var ua={};F(ua,{EARLY_KEY:()=>co,SEED_BLOCK:()=>Zl,STALE_ATTRIBUTE:()=>hS,createAdapter:()=>x5,createEarlySeedBlock:()=>jO,createEarlySeedScript:()=>HO,default:()=>z5,earlyKey:()=>us,executeFetch:()=>NS,fetchFunctions:()=>B5,fetchPlugin:()=>V5,hasAdapter:()=>S5,initAdapterAuth:()=>Ah,parseDuration:()=>ao,queryClient:()=>F5,registerAdapter:()=>w5,requestsInFlight:()=>JO,resolveDb:()=>m1,revalidateSeed:()=>j5,seedFromPage:()=>C1,seedIsStale:()=>VO,whenRequestsIdle:()=>ZO,whenSeedTaken:()=>UO});var y5,g1,xh,ps,kh,AS,b5,_5,w5,S5,x5,m1,DS,y1,xn,f1,Ze,Oh,kS,Rh,la,ca,vh,CS,Ch,b1,Ph,_1,k5,Eh,E5,u1,ES,w1,S1,aa,d1,v5,TS,A5,x1,Lh,fa,nf,of,hs,IS,Ah,MS,kn,Gn,ef,sf,C5,OS,mr,Th,RS,yr,p1,k1,br,T5,O5,R5,P5,vS,rf,L5,Dh,E1,PS,LS,v1,A1,D5,I5,M5,N5,C1,$5,NS,F5,h1,B5,j5,U5,V5,z5,Ih=D(()=>{"use strict";M();Mt();ia();yS();lS();i1();ia();bS();y5=["select","rpc","insert","update","upsert","delete","subscribe"],g1={rest:()=>Promise.resolve(xS),local:()=>Promise.resolve().then(()=>(l1(),c1))},xh=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),ps=(()=>{if(typeof globalThis<"u"&&globalThis[xh])return globalThis[xh];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,xh,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[xh]}catch{}return t})(),kh=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),AS=(()=>{if(typeof globalThis<"u"&&globalThis[kh])return globalThis[kh];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,kh,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[kh]}catch{}return t})(),b5=5e3,_5=t=>new Promise(e=>{if(ps[t])return e(ps[t]);let n=AS[t]||=[],r=!1,o=()=>{r||(r=!0,e(ps[t]||null))};n.push(o),setTimeout(o,b5)}),w5=(t,e)=>{ps[t]=e;let n=AS[t];if(n&&n.length){AS[t]=[];for(let r of n)r()}},S5=t=>typeof t=="string"&&!!(ps[t]||g1[t]),x5=t=>{let e={};for(let n of y5)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},m1=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...n}=t,r=typeof e=="string"?e:typeof t=="string"?t:null;if(!r)return null;let o=ps[r]||g1[r];if(!o&&(o=await _5(r),!o))throw new Error(`Unknown db adapter: "${r}". Use registerAdapter() for adapters with optional deps.`);let s=await o();if(!s||typeof s.setup!="function")throw new Error(`Adapter "${r}" loader returned a module without a setup() function. Got keys: [${Object.keys(s||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return s.setup(n)},DS=t=>!!t&&!!t.isolateFetchCache,y1=()=>({cache:new Map,subscribers:new Map,active:new Map,invalidatedAt:new Map,mounted:new Set}),xn=y1(),f1=new WeakMap,Ze=t=>{if(!DS(t))return xn;let e=f1.get(t);return e||f1.set(t,e=y1()),e},Oh=0,kS=new WeakMap,Rh=(t,e,n,r,o=t.page,s=t.cursor)=>{if(t.cache?.key)return t.cache.key;let{from:i,method:a,infinite:c}=t,l=n?`${n}:`:"",f=r?`:${r}`:"",u=o?":p"+JSON.stringify(o):"",d=s!=null?":c"+JSON.stringify(s):"";return`${i}:${a}:${l}${JSON.stringify(e||"")}${c?":infinite":""}${u}${d}${f}`},la=(t,e)=>t.cache.get(e)||null,ca=(t,e,n,r,o=++Oh,s=!1)=>{let i={data:n,error:r,time:Date.now(),stale:s,seq:o};t.cache.set(e,i);let a=t.subscribers.get(e);if(a)for(let c of a)L(c)&&c(i);return i},vh=(t,e,n)=>{let r=e?t.cache.get(e):null;return r&&!r.error&&r.seq>n?r:null},CS=(t,e,n)=>(t.invalidatedAt.get(e)||0)>n,Ch=(t,e)=>{t.invalidatedAt.set(e,++Oh)},b1=(t,e)=>{t.cache.delete(e),Ch(t,e)},Ph=t=>!t&&t!==!1?{staleTime:6e4,gcTime:3e5}:t===!1?null:t===!0?{staleTime:6e4,gcTime:3e5}:typeof t=="number"?{staleTime:t,gcTime:Math.max(t*5,3e5)}:v(t)?{staleTime:ao(t),gcTime:3e5}:{staleTime:ao(t.stale||t.staleTime)||6e4,gcTime:ao(t.gc||t.gcTime||t.expire)||3e5,key:t.key},_1=t=>!!t.ref&&t.element.__ref===t.ref,k5=({config:t,element:e,context:n})=>{try{return IS(t,e,n)}catch{return null}},Eh=null,E5=()=>{Eh||(Eh=setInterval(()=>{let t=Date.now(),{cache:e,subscribers:n,active:r,invalidatedAt:o,mounted:s}=xn;for(let[i,a]of e){let c=n.get(i);!(c&&c.size>0)&&t-a.time>(a.gcTime||3e5)&&e.delete(i)}for(let[i]of o)!e.has(i)&&!r.has(i)&&o.delete(i);for(let i of s)_1(i)||s.delete(i)},3e4),Eh.unref&&Eh.unref())};E5();u1=3,ES=t=>Math.min(1e3*2**t,3e4),w1=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:u1,delay:ES}:typeof n=="number"?{count:n,delay:ES}:{count:n.count??u1,delay:L(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:ES}},S1=async(t,e)=>{let{count:n,delay:r}=e,o;for(let s=0;s<=n;s++)try{let i=await t();if(i?.error){if(o=i.error,s<n){let a=L(r)?r(s,o):r;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<n){let a=L(r)?r(s,i):r;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},aa={focus:new Set,online:new Set},d1=!1,v5=()=>{if(d1||typeof window>"u")return;d1=!0;let t=()=>{for(let n of aa.focus)n()},e=()=>{for(let n of aa.online)n()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},TS=(t,e)=>{let n=e.__ref;if(t===!0)return{from:n.__state||e.key,method:"select",query:!0,on:"create"};if(v(t))return{from:t,method:"select",query:!0,on:"create"};if(k(t)){let r={...t};return r.from=r.from||n.__state||e.key,r.method=r.method||"select",r.on=r.on||"create",r.query===void 0&&(r.query=!0),r}return null},A5=["insert","update","upsert","delete"],x1=t=>A5.includes(t),Lh=t=>t.mutation===!0?!0:t.mutation===!1||t.method!=="rpc"?!1:t.on==="submit"||t.on==="click"||t.invalidates!=null,fa=(t,e)=>{let n=t?.state?.root||e?.state?.root;if(n?.lang)return n.lang},nf=(t,e)=>{let r=(t?.state?.root||e?.state?.root)?.__fetchScope;return r?String(r):void 0},of=(t,e,n)=>{let r;if(!t)r=void 0;else if(L(t))r=t(e,e.state);else{r={};for(let o in t){let s=t[o];r[o]=L(s)?s(e,e.state):s}}return r},hs=(t,e)=>L(t)?t(e,e.state):t,IS=(t,e,n)=>Rh(t,of(t.params,e,n),nf(e,n),fa(e,n),hs(t.page,e),hs(t.cursor,e)),Ah=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let n=(r,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:r,session:o,loading:!1}})};try{let r=await t.getSession();n(r?.user||null,r)}catch(r){console.warn("[fetch] Failed to restore auth session:",r.message)}t.onAuthStateChange&&t.onAuthStateChange((r,o)=>{n(o?.user||null,o)})},MS=async(t,e)=>{if(L(t.select))return t.auth!==!1&&await Ah(t,e),t;if(t.__resolved)return t.auth!==!1&&await Ah(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=m1(t);let n=await t.__resolving;return delete t.__resolving,n?(n.auth=t.auth,n.url=t.url,n.key=t.key,t.__resolved=n,e.fetch=n,t.auth!==!1&&await Ah(n,e),n):null},kn=(t,e,...n)=>{let r=L(t[e])?t[e]:null;r&&r.call(t,...n,t,t.state,t.context)},Gn=(t,e,n,...r)=>{let o=t&&L(t[n])?t[n]:null;o&&o.call(e,...r,e,e.state,e.context)},ef=t=>{let e={},n=t.node;if(!n)return e;if(n.tagName==="FORM"){let o=new FormData(n);for(let[s,i]of o.entries())e[s]=i;return e}let r=n.querySelectorAll("input, textarea, select");for(let o=0;o<r.length;o++){let s=r[o],i=s.name||s.getAttribute("name");i&&(s.type==="checkbox"?e[i]=s.checked:s.type==="file"?e[i]=s.files:e[i]=s.value)}return e},sf=t=>t.responseType==="stream"||t.responseType==="response",C5=["Blob","File","ArrayBuffer","ReadableStream","Response"],OS=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||C5.includes(Object.prototype.toString.call(t).slice(8,-1))),mr=(t,e,n,r={})=>{if(!n&&OS(e))return;let o=n&&n.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=n.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&!OS(e)&&i in e?s.update(e,{preventFetch:!0,...r}):s.update({[i]:e},{preventFetch:!0,...r})}else{let i=n?{[n]:e}:e;s.update(i,{preventFetch:!0,...r})}},Th=Object.freeze({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),RS=t=>({isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:t,status:"error",fetchStatus:"idle"}),yr=(t,e)=>{let n=t?.__ref;n&&(n.__fetchStatus={...e,isError:!!e.error},n.__fetching=e.isFetching,n.__fetchError=e.error)},p1=(t,e,n)=>{let r=t.__pages&&t.__pages.length?t.__pages:[n];L(e.getNextPageParam)&&(t.__nextPageParam=e.getNextPageParam(r[r.length-1],r),t.__hasNextPage=t.__nextPageParam!=null),L(e.getPreviousPageParam)&&(t.__prevPageParam=e.getPreviousPageParam(r[0],r),t.__hasPreviousPage=t.__prevPageParam!=null)},k1=(t,e,n,r,o,s)=>{let{from:i,single:a,limit:c,offset:l,order:f,headers:u,baseUrl:d,responseType:p}=t,g={from:i,select:e,params:n,single:a,limit:c,offset:l,order:f,headers:u,baseUrl:d};if(p!==void 0&&(g.responseType=p),r&&(g.headers={...g.headers,"Accept-Language":r}),o!==void 0){if(k(o))o.offset!==void 0&&(g.offset=o.offset),o.limit!==void 0&&(g.limit=o.limit),o.cursor!==void 0&&(g.params={...g.params,cursor:o.cursor});else if(typeof o=="number"){let h=t.pageSize||c||20;g.offset=(o-1)*h,g.limit=h}}return s!==void 0&&(g.params={...g.params,cursor:s}),g},br=async(t,e,n,r={})=>{let o=n?.fetch;if(!o||!e||!e.__ref)return;let s=e.__ref,i=nf(e,n);(!s.__fetchScopeOwner||s.__fetchScopeOwner.scope!==i)&&(s.__fetchScopeOwner={scope:i});let a=s.__fetchScopeOwner,c=()=>e.__ref===s&&s.__fetchScopeOwner===a&&nf(e,n)===i;if(t.enabled===!1||L(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||L(t.skip)&&t.skip(e,e.state))return;let l=await MS(o,n);if(!l||!c())return;let{from:f,method:u,query:d,params:p,cache:g,transform:h,single:m,auth:y,fields:x,as:E,limit:C,offset:_,order:b,headers:w,baseUrl:S,responseType:A,page:T,cursor:O,infinite:B,placeholderData:$,initialData:N,select:G,keepPreviousData:Y}=t,nt=H=>(L(G)&&(H=G(H,e,e.state)),h&&(H=h(H,e,e.state)),H),ot=H=>{yr(e,RS(H)),kn(e,"onFetchError",H),Gn(t,e,"onFetchError",H)},st=v(G)?G:void 0;if(d&&L(e.getQuery)){let H=e.getQuery(l.name||"paths");H&&(st=H.select||H.length&&H.join(",")||st)}let Z=of(p,e,n),J=hs(T,e),Q=hs(O,e),it=Lh(t),rt=sf(t)||it?null:Ph(g),gt=w1(t,it||x1(u)),q=fa(e,n),W=rt?Rh(t,Z,i,q,J,Q):null,Rt=Ze(n);if(!s.__fetchInitialized&&W&&(s.__fetchInitialized=!0,N!==void 0)){let H=L(N)?N():N;ca(Rt,W,H,null)}if((u==="select"||u==="rpc")&&W&&rt&&!r.refresh&&!r.force){let H=la(Rt,W);if(H&&!H.error){let Tt=Date.now()-H.time,X=H.stale||Tt>(rt.staleTime||0);B&&I(H.data)&&!s.__pages&&(s.__pages=[H.data],p1(s,t,H.data));let at=nt(H.data);if(!c())return;if(!X){yr(e,Th),mr(e,at,E),s.__seededOnCreate===W&&(s.__seededOnCreate=null,kn(e,"onFetchComplete",at),Gn(t,e,"onFetchComplete",at));return}mr(e,at,E)}else if($!==void 0){let Tt=L($)?$(e,e.state):$;Tt!==void 0&&mr(e,Tt,E)}}let yt=W&&!r.force?Rt.active.get(W):null;if(yt&&!CS(Rt,W,kS.get(yt)||0)){try{let H=await Promise.race([yt,new Promise((Tt,X)=>setTimeout(()=>X("DEDUP_TIMEOUT"),15e3))]);if(!c())return;if(H?.error)ot(H.error);else if(H?.data!==void 0){let Tt=!B&&vh(Rt,W,kS.get(yt)||0),X=nt(Tt?Tt.data:H.data);if(!c())return;mr(e,X,E),kn(e,"onFetchComplete",X),Gn(t,e,"onFetchComplete",X)}}catch(H){if(!c())return;H!=="DEDUP_TIMEOUT"&&ot(H)}return}let jt=!la(Rt,W)?.data;yr(e,{isFetching:!0,isLoading:jt,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),kn(e,"onFetchStart"),Gn(t,e,"onFetchStart");let Ct=n?.analyze?.emitNetwork,Pt=Ct?typeof performance<"u"?performance.now():Date.now():0;Ct&&Ct({phase:"start",mode:"query",from:f,method:u,cacheKey:W,lang:q});let qe=async()=>{if(!c())return;if(y!==!1&&l.auth!==!1&&l.getSession){let X=await l.getSession();if(!c())return;if(y===!0&&!X){let at={message:"Not authenticated"};return ot(at),{data:null,error:at}}}let H=l[u];if(!L(H))return{data:null,error:{message:`Method "${u}" not found on adapter`}};let Tt=k1(t,st,Z,fa(e,n),J,Q);if(u==="insert"||u==="update"||u==="upsert"){let X;if(x===!0||t.on==="submit")X=ef(e);else if(I(x)){let at=ef(e);X={};for(let Ge of x)X[Ge]=at[Ge]}else e.state?.parse?X=e.state.parse():k(e.state)&&(X={...e.state});h&&(X=h(X,e,e.state)),Tt.data=X}if(u==="rpc"){let X=Z;if(t.on==="submit"){let at=ef(e);X=t.transformParams?t.transformParams(at,e,e.state):at}Tt.params=X,Tt.read=!it&&t.read!==!1}if(u==="subscribe"){if(L(s.__unsubscribe)){let at=s.__unsubscribe;s.__unsubscribe=null;try{at()}catch{}}let X=l.subscribe({from:f,params:Z,on:t.subscribeOn},(at,Ge,Zb)=>{c()&&(mr(e,at,E),kn(e,"onFetchComplete",at),Gn(t,e,"onFetchComplete",at))});return c()?(s.__unsubscribe=X,{data:null,error:null,subscribed:!0}):(L(X)&&X(),{data:null,error:null,subscribed:!0})}return H(Tt)},It=++Oh,Le=S1(qe,gt);kS.set(Le,It),W&&Rt.active.set(W,Le);try{let H=await Le;if(W&&H&&!it&&mS(H,W),it&&t.invalidates&&H&&!H.error&&!H.subscribed&&E1(Rt,t.invalidates,f),!c()||H?.subscribed)return;let{data:Tt,error:X}=H||{};if(X){W&&!vh(Rt,W,It)&&ca(Rt,W,null,X,It),ot(X),Ct&&Ct({phase:"error",mode:"query",from:f,method:u,cacheKey:W,error:X.message||X,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt});return}if(Tt!==void 0){let at=Tt;if((u==="select"||u==="rpc")&&W){let Zb=!B&&vh(Rt,W,It);if(Zb)at=Zb.data;else{let q3=ca(Rt,W,Tt,null,It,CS(Rt,W,It));q3.gcTime=rt?.gcTime||3e5}}let Ge=at;if(B&&I(Tt)&&((!s.__pages||!r.direction)&&(s.__pages=[]),r.direction==="previous"?s.__pages.unshift(Tt):s.__pages.push(Tt),Ge=s.__pages.flat(),p1(s,t,Tt)),Ge=nt(Ge),!c())return;yr(e,Th),(!Y||Ge!==void 0)&&mr(e,Ge,E),kn(e,"onFetchComplete",Ge),Gn(t,e,"onFetchComplete",Ge),Ct&&Ct({phase:"success",mode:"query",ok:!0,from:f,method:u,cacheKey:W,durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt})}}catch(H){if(!c())return;ot(H),Ct&&Ct({phase:"error",mode:"query",from:f,method:u,cacheKey:W,error:H.message||String(H),durationMs:(typeof performance<"u"?performance.now():Date.now())-Pt})}finally{W&&Rt.active.get(W)===Le&&Rt.active.delete(W)}},T5=(t,e,n)=>{let r=t.on,o=e.__ref;if(!o)return;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||br;if(r==="submit"){let i=c=>{c.preventDefault(),s(t,e,n)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(r==="click"){let i=()=>s(t,e,n),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else r==="stateChange"&&O5(t,e,n,s)},O5=(t,e,n,r)=>{let o=e.__ref,s,i=K(()=>{let a;try{a=JSON.stringify([of(t.params,e,n)??null,L(t.enabled)?!!t.enabled(e,e.state):t.enabled!==!1,L(t.skip)?!!t.skip(e,e.state):t.skip===!0,hs(t.page,e)??null])}catch{return}if(s===void 0){s=a;return}a!==s&&(s=a,queueMicrotask(()=>r(t,e,n)))});Array.isArray(o.__effects)?o.__effects.push(i):o.__fetchListeners.push(()=>i.dispose())},R5=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),v5();let o=t.refetchInterval;if(o){let c=typeof o=="number"?o:ao(o);if(c>0){let l=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&br(t,e,n,{force:!0})},c);r.__fetchCleanups.push(()=>clearInterval(l))}}let s=sf(t),i=t.refetchOnWindowFocus===void 0?!s:t.refetchOnWindowFocus!==!1,a=t.refetchOnReconnect===void 0?!s:t.refetchOnReconnect!==!1;if(i){let c=()=>{let l=IS(t,e,n),f=la(Ze(n),l),u=Ph(t.cache);(!f||f.stale||Date.now()-f.time>(u?.staleTime||0))&&br(t,e,n,{force:!0})};aa.focus.add(c),r.__fetchCleanups.push(()=>aa.focus.delete(c))}if(a){let c=()=>br(t,e,n,{force:!0});aa.online.add(c),r.__fetchCleanups.push(()=>aa.online.delete(c))}},P5=(t,e,n)=>{if(!e.optimistic)return null;let r=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():k(t.state)?{...t.state}:t.state;r.__optimisticSnapshot=s;let i=L(e.optimistic)?e.optimistic(n,s,t):e.optimistic;return i!==void 0&&mr(t,i,o),s},vS=(t,e)=>{let n=t.__ref;if(!n||!e.optimistic)return;let r=n.__optimisticSnapshot;r!==void 0&&(mr(t,r,e.as),delete n.__optimisticSnapshot)},rf=t=>{if(!t)return()=>!0;if(v(t))return e=>e.includes(t);if(I(t)){let e=t.join(":");return n=>n.includes(e)}return t instanceof RegExp?e=>(t.lastIndex=0,t.test(e)):L(t)?e=>{try{return!!t(e)}catch{return!1}}:()=>!1},L5=(t,e)=>{let n=[];for(let r of t.mounted){if(!_1(r)){t.mounted.delete(r);continue}let o=k5(r);o&&e(o)&&n.push(br(r.config,r.element,r.context,{refresh:!0}))}return Promise.allSettled(n).then(()=>{})},Dh=(t,e)=>{pS();for(let[n,r]of t.cache)e(n)&&(r.stale=!0,Ch(t,n));for(let[n]of t.active)!t.cache.has(n)&&e(n)&&Ch(t,n);return L5(t,e)},E1=(t,e,n)=>{let r=(I(e)?e:[e]).map(o=>o===!0||o==="*"?s=>s.startsWith(n+":"):o?rf(o):()=>!1);return Dh(t,o=>r.some(s=>s(o)))},PS=(t,e)=>{for(let[n]of t.cache)e(n)&&b1(t,n);for(let[n]of t.active)e(n)&&Ch(t,n)},LS=()=>!0,v1=(t,e)=>la(t,e)?.data??void 0,A1=(t,e,n)=>{let r=la(t,e),o=L(n)?n(r?.data):n;ca(t,e,o,null)},D5=async(t,e,n)=>{let r=n?.fetch;if(!r)return;let o=await MS(r,n);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:l,as:f,on:u,auth:d,headers:p,baseUrl:g,responseType:h,invalidates:m,optimistic:y,onMutate:x,onSuccess:E,onError:C,onSettled:_}=t,b;if(c===!0||u==="submit")b=ef(e);else if(I(c)){let T=ef(e);b={};for(let O of c)b[O]=T[O]}else e.state?.parse?b=e.state.parse():k(e.state)&&(b={...e.state});l&&(b=l(b,e,e.state)),L(x)&&x(b,e,e.state);let w=y?P5(e,t,b):null;yr(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),kn(e,"onFetchStart"),Gn(t,e,"onFetchStart");let S=n?.analyze?.emitNetwork,A=S?typeof performance<"u"?performance.now():Date.now():0;S&&S({phase:"start",mode:"mutation",from:a,method:i});try{if(d!==!1&&o.auth!==!1&&o.getSession){let nt=await o.getSession();if(d===!0&&!nt){w!==void 0&&vS(e,t);let ot={message:"Not authenticated"};kn(e,"onFetchError",ot),Gn(t,e,"onFetchError",ot);return}}let T=o[i];if(!L(T))return;let O={from:a,data:b,headers:p,baseUrl:g};h!==void 0&&(O.responseType=h),t.params&&(O.params=of(t.params,e,n));let B=fa(e,n);B&&(O.headers={...O.headers,"Accept-Language":B});let $=w1(t,!0),N=await S1(()=>T(O),$),{data:G,error:Y}=N||{};if(Y){w!==void 0&&vS(e,t),yr(e,RS(Y)),kn(e,"onFetchError",Y),L(C)&&C(Y,b,e),L(_)&&_(null,Y,b,e),S&&S({phase:"error",mode:"mutation",from:a,method:i,error:Y.message||String(Y),durationMs:(typeof performance<"u"?performance.now():Date.now())-A});return}if(delete s.__optimisticSnapshot,yr(e,Th),G!==void 0&&(f||!OS(G))){let nt=f?{[f]:G}:G;e.state?.update&&e.state.update(nt,{preventFetch:!0})}kn(e,"onFetchComplete",G),Gn(t,e,"onFetchComplete",G),L(E)&&E(G,b,e),L(_)&&_(G,null,b,e),S&&S({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-A}),m&&E1(Ze(n),m,a)}catch(T){w!==void 0&&vS(e,t),yr(e,RS(T)),kn(e,"onFetchError",T),Gn(t,e,"onFetchError",T),L(C)&&C(T,b,e),L(_)&&_(null,T,b,e),S&&S({phase:"error",mode:"mutation",from:a,method:i,error:T.message||String(T),durationMs:(typeof performance<"u"?performance.now():Date.now())-A})}finally{s.__fetching=!1}},I5=t=>{let e=n=>{try{n()}catch{}};for(let n of t.__fetchCleanups||[])e(n);for(let n of t.__fetchListeners||[])e(n);L(t.__unsubscribe)&&e(t.__unsubscribe);for(let n of t.__fetchMounted||[])Ze(n.context).mounted.delete(n);t.__fetchCleanups=[],t.__fetchListeners=[],t.__unsubscribe=null,t.__fetchMounted=[]},M5=(t,e)=>{if(!t)return null;if(L(t.select))return t;if(t.__resolved)return t.__resolved;if(t.__resolving)return null;let n=typeof t.adapter=="string"?t.adapter:null;if(n!=="rest"||ps[n]||!t.url)return null;let{adapter:r,...o}=t,s=wh(o.url,o.headers,o.auth,o.fetchOptions,o.early,o.reads,o.seed);return s.auth=t.auth,s.url=t.url,s.key=t.key,t.__resolved=s,e.fetch=s,s},N5=t=>t.on==="create"&&(t.method==="select"||t.method==="rpc")&&!Lh(t)&&!t.infinite&&!sf(t),C1=t=>{let e=t&&t.context;if(!e||!e.fetch||DS(e))return;let n=t.__ref;if(!n||!t.fetch||!qO())return;let r;try{r=St(t.fetch,t)}catch{return}if(!r)return;let o=I(r)?r:[r];for(let s of o){let i;try{i=TS(St(s,t),t)}catch{continue}if(!i||!N5(i)||i.enabled===!1||i.skip===!0)continue;try{if(L(i.enabled)&&!i.enabled(t,t.state)||L(i.skip)&&i.skip(t,t.state))continue}catch{continue}let a=Ph(i.cache);if(!a)continue;let c=M5(e.fetch,e);if(!c||!L(c.seeded))return;$5(i,a,c,t,e,n)}},$5=(t,e,n,r,o,s)=>{let i=v(t.select)?t.select:void 0,a,c,l,f,u;try{if(t.query&&L(r.getQuery)){let x=r.getQuery(n.name||"paths");x&&(i=x.select||x.length&&x.join(",")||i)}a=of(t.params,r,o),c=hs(t.page,r),l=hs(t.cursor,r);let y=fa(r,o);f=Rh(t,a,nf(r,o),y,c,l),u=k1(t,i,a,y,c,l)}catch{return}let d=Ze(o),p=la(d,f);if(p&&!p.error)return;t.method==="rpc"&&(u.read=t.read!==!1);let g=n.seeded({method:t.method,...u});if(!g||g.error||g.data===void 0)return;let h=ca(d,f,g.data,null);h.gcTime=e.gcTime||3e5,mS(g,f),s.__fetchInitialized=!0;let m=g.data;try{L(t.select)&&(m=t.select(m,r,r.state)),t.transform&&(m=t.transform(m,r,r.state))}catch{return}yr(r,Th),mr(r,m,t.as),s.__seededOnCreate=f},NS=(t,e,n,r)=>{if(!t||!r?.fetch)return;let s=St(t,e);if(!s)return;let i=I(s)?s.map(f=>TS(St(f,e),e)).filter(Boolean):[TS(s,e)].filter(Boolean),a=e.__ref,c=Ze(r);if(a.__fetchMounted)for(let f of a.__fetchMounted)c.mounted.delete(f);a.__fetchMounted=[],!a.__fetchDisposer&&I(a.__effects)&&(a.__fetchDisposer={dispose:()=>I5(a)},a.__effects.push(a.__fetchDisposer));let l=!DS(r);for(let f of i){let u=x1(f.method),d=u?D5:br,p=!u&&!Lh(f)&&f.method!=="subscribe";if(f.on==="create"?d(f,e,r):queueMicrotask(()=>T5({...f,__runner:d},e,r)),p&&f.on==="create"&&(l&&(f.refetchInterval||f.refetchOnWindowFocus!==!1||f.refetchOnReconnect!==!1)&&R5(f,e,r),!sf(f))){let g={element:e,ref:a,config:f,context:r};c.mounted.add(g),a.__fetchMounted.push(g)}}a.refetch=f=>{for(let u of i)br(u,e,r,{force:!0,...f})},a.fetchNextPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__nextPageParam;if(u==null)return;let d={...f,cursor:u};br(d,e,r,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let f=i[0];if(!f||!f.infinite)return;let u=a.__prevPageParam;if(u==null)return;let d={...f,cursor:u};br(d,e,r,{direction:"previous",force:!0})}},F5={invalidateQueries:t=>Dh(xn,rf(t)),removeQueries:t=>{PS(xn,t?rf(t):LS)},getQueryData:t=>v1(xn,t),setQueryData:(t,e)=>{A1(xn,t,e)},prefetchQuery:async(t,e)=>{let n=e?.fetch;if(!n)return;let r=Ze(e),o=await MS(n,e);if(!o)return;let s=t.method||"select",i=nf(null,e),a=fa(null,e),c=Rh({...t,method:s},t.params,i,a),l=o[s];if(!L(l))return;let f={from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single,headers:t.headers,baseUrl:t.baseUrl};a&&(f.headers={...f.headers,"Accept-Language":a}),t.responseType!==void 0&&(f.responseType=t.responseType),s==="rpc"&&(f.read=!Lh(t)&&t.read!==!1);let u=++Oh,d=await l(f);if(d?.data!==void 0&&!d?.error&&!sf(t)&&!vh(r,c,u)){let p=ca(r,c,d.data,null,u,CS(r,c,u));p.gcTime=Ph(t.cache)?.gcTime||3e5}return d},getCache:()=>xn.cache,clear:()=>PS(xn,LS),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[n]of xn.cache)n.match(/:([a-z]{2,3})$/i)&&(n.endsWith(e)||b1(xn,n))}},h1=(t,e)=>k(t)?IS({method:"select",...t},e,e?.context):t,B5={invalidateQueries(t){return Dh(Ze(this?.context),rf(t))},removeQueries(t){PS(Ze(this?.context),t?rf(t):LS)},getQueryData(t){return v1(Ze(this?.context),h1(t,this))},setQueryData(t,e){A1(Ze(this?.context),h1(t,this),e)}},j5=async t=>{let e=await zO();if(!e)return null;let{taken:n,config:r}=e,o=new Set,s=[];for(let c of n)c.cacheKey?o.add(c.cacheKey):s.push(c);pS();let i=[],a=async c=>{try{let l=await c.again.send();if(!l||l.error)return;let f=c.result?c.result.data:void 0;if(U5(l.data,f))return;let{method:u,from:d,params:p}=c.again;i.push({method:u,from:d,params:p,data:l.data,previous:f})}catch{}};if(await Promise.all([o.size?Dh(xn,c=>o.has(c)):null,...s.map(a)]),i.length&&L(r.onRefresh))try{r.onRefresh(i,t)}catch(c){console.error("[@symbo.ls/fetch] seed.onRefresh failed:",c)}return{queries:o.size,reads:s.length,changed:i.length}},U5=(t,e)=>{if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}},V5={name:"fetch",init(t){t.fetch&&C1(t)},create(t){let e=t.fetch;e&&(t.parent||Ze(t.context).active.clear(),NS(e,t,t.state,t.context))}},z5=NS});function cf(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 FS(t){let e=this,{parent:n}=e;if(L(t))return n.state&&t(n,n.state,n.context)?n:n.parent?n.lookup(t):void 0;if(e[t])return e[t];for(;n.param!==t;){if(n[t])return n[t];if(n=n.parent,!n)return}return n}function BS(t){let e=this,{__ref:n}=e,r=n?.__children;if(r)for(let o=0;o<r.length;o++){let s=r[o],i=e[s];if(s===t)return i;if(L(t)){let c=t(i,i.state,i.context);if(i.state&&c)return i}let a=i?.lookdown?.(t);if(a)return a}}function jS(t,e=[]){let n=this,{__ref:r}=n,o=r?.__children;if(o){for(let s=0;s<o.length;s++){let i=o[s],a=n[i];if(i===t)e.push(a);else if(L(t)){let c=t(a,a.state,a.context);a.state&&c&&e.push(a)}a?.lookdownAll?.(t,e)}return e.length?e:void 0}}function $h(t={}){let e=this;if(e.node?.style){for(let n in t){let r=t[n],o=e[n];if(k(r)&&o)$h.call(o,r);else if(r!=null){let s=n.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),i=String(r).replace(/\s*!important\s*$/,"");e.node.style.setProperty(s,i,"important")}}return e}}function O1(t){let e=this;if(hr("beforeRemove",e,t)===!1)return e;L(e.node.remove)?e.node.remove():no()||(console.warn("This item cant be removed"),e.log()),delete e.parent[e.key],e.parent.__ref&&(e.parent.__ref.__children=ml(e.parent.__ref.__children,e.key)),hr("remove",e,t)}function US(t){return this[t]}function VS(t,e){let n=this;if(t)return n.update(t,e),n}function zS(t){return t?this.__ref&&this.__ref[t]:this.__ref}function HS(){let t=this.getRef("__children");return Array.isArray(t)?t.map(e=>this[e]):[]}function lf(){return this.getRef().path}function uf(t){let e=null,n=r=>r.__element&&r.root?.isRootState;if(!this)e=T1();else if(n(this))e=this.root;else if(this.__ref&&this.__ref.path){let r=this.state&&n(this.state),o=L(this.state)&&this.parent.state&&n(this.parent.state);(r||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=T1()),t?e?.[t]:e}function df(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 pf(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function hf(t){let e=this.getRoot()?.context;return t?e[t]:e}function gf(t){let e=this.context;return t?e[t]:e}function Fh(){let t=this,e=[];for(let n in t)!Object.prototype.hasOwnProperty.call(t,n)||Qr.has(n)&&!Sl.has(n)||e.push(n);return e}function Bh(t=[]){let e=this,n={},r=Fh.call(e),o=r.includes("children"),s=t.length?new Set(t):null;for(let i=0;i<r.length;i++){let a=r[i];if(s&&s.has(a)||!Object.prototype.hasOwnProperty.call(e,a)||o&&a==="content")continue;let c=e[a];if(a==="state"){if(e.__ref&&!e.__ref.__hasRootState)continue;let l=L(c&&c.parse)?c.parse():c;n[a]=L(l)?l:JSON.parse(JSON.stringify(l||{}))}else if(a==="scope"){if(e.__ref&&!e.__ref.__hasRootScope)continue;n[a]=JSON.parse(JSON.stringify(c||{}))}else if(a==="props"){let{__element:l,update:f,...u}=e[a];n[a]=u}else Ut(c)&&Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=c)}return n}function af(t=[],e=new WeakSet){let n=this;if(e.has(n))return;e.add(n);let r=Bh.call(n,t),o=t.length?new Set(t):null;for(let s in r){if(o&&o.has(s)||!Object.prototype.hasOwnProperty.call(n,s))continue;let i=r[s];Array.isArray(i)?r[s]=i.map(a=>V(a)?af.call(a,t,e):a):V(i)&&(r[s]=af.call(i,t,e))}return r}function pa(...t){if(lo!=="test"&&lo!=="development")return;let e=this,{__ref:n}=e;return console.groupCollapsed(e.key),t.length?t.forEach(r=>console.log(`%c${r}:
22
+ `,"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 KS(...t){(lo==="test"||lo==="development")&&console.log(...t)}function mf(...t){(lo==="test"||lo==="development")&&console.warn(...t)}function gs(...t){if(lo==="test"||lo==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&pa.call(this),new Error(...t)}}function yf(){let t=this,{key:e,parent:n}=t,{__children:r}=n.__ref,o=r.indexOf(e),s=r[o+1];return n[s]}function bf(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 _f(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,pt(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)}}}function qS(t,...e){let n=this.context,r=n.utils?.[t]||n.functions?.[t]||n.methods?.[t]||n.snippets?.[t];if(r&&!os(r))try{let o=r.call(this,...e);return o&&typeof o.then=="function"&&o.catch(s=>{gs.call(this,s)}),o}catch(o){if(gs.call(this,o),n?.strictMode)throw o}}async function wf(){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 Mh();await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Mh();await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let n=Mh().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 Mh();await o(r,t.context)}return r}function Sf(t){let e=this,n=t||Jl.useStateQuery||e.context?.useStateQuery;if(!n)return null;let r={};if($S(e,r),n===!0)return r;let o=J5[n];return o?o(r):r}function GS(t,e){return!!(eo.has(t)||e?.context?.methods?.[t])}var lo,Nh,ff,da,T1,WS,H5,Mh,$S,W5,R1,K5,q5,G5,Y5,X5,J5,P1=D(()=>{"use strict";iS();es();Wt();jn();Il();Gi();cS();lo="production";Nh=null,ff=t=>{Nh=t||null},da=(t,e)=>{t&&e&&Nh===t&&(Nh=e)},T1=()=>Nh||null;WS=(t,e,n,r)=>Object.defineProperty(t,e,{get:n,set:r});H5="[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.",Mh=()=>Promise.resolve().then(()=>(Ih(),ua)).catch(t=>{throw new Error(H5,{cause:t})});$S=(t,e)=>{let n=t.__ref;if(!n)return;let r=n.__state;r&&typeof r=="string"&&W5(e,r);let o=n.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&$S(c,e)}let s=n.contentElementKey||"content",i=t[s];i&&i.__ref&&$S(i,e)},W5=(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])}},R1=(t,e=0)=>{let n=" ".repeat(e),r=Object.entries(t);return r.length?r.map(([s,i])=>i===!0?`${n}${s}`:`${n}${s} {
23
+ ${R1(i,e+1)}
24
24
  ${n}}`).join(`
25
- `):""},N5=t=>`{
26
- ${vO(t,1)}
27
- }`,$5=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},F5=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.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("&")},B5=(t,e)=>{let n=[],r=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&r.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let p in f)f[p]===!0?n.push(`${u}.${p}`):s(f[p],p,u)},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(", "):"*",l=r.length?`
25
+ `):""},K5=t=>`{
26
+ ${R1(t,1)}
27
+ }`,q5=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},G5=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let l=e(s[c]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),a.push(f.length?`${c}(${f.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("&")},Y5=(t,e)=>{let n=[],r=[],o=new Set,s=(f,u,d)=>{o.add(u),d&&r.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let p in f)f[p]===!0?n.push(`${u}.${p}`):s(f[p],p,u)},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(", "):"*",l=r.length?`
28
28
  `+r.join(`
29
29
  `):"";return`SELECT ${c}
30
- FROM ${a}${l}`},j5=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},U5={graphql:N5,"json-api":$5,odata:F5,sql:B5,paths:j5}});var V5,WS,CO=D(()=>{"use strict";$p();V5={snapshotId:Rl},WS=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=V5.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var $h,KS,TO=D(()=>{$h=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),KS=t=>typeof t=="string"&&$h.has(t)});var Fh,da,yr,kn,Bh,jh,Uh,gs,ms,qS,OO=D(()=>{"use strict";xl();Fh="smbls_lang",da=t=>t&&t.storageLangKey||Fh,yr=(t,e)=>t||e&&e.defaultLang||"en",kn=(t,e=!0)=>{let n=t&&t.languages;if(typeof n=="function")try{n=n(t)}catch{n=null}return Array.isArray(n)&&n.length?n.filter(r=>typeof r=="string"):e?Object.keys(t&&t.translations||{}):[]},Bh=(t,e)=>{if(!e)return null;let n=kn(e),r=/^\/([^/?#]+)/.exec(String(t||""));if(!r)return null;let o=r[1].toLowerCase();for(let s of n)if(typeof s=="string"&&s.toLowerCase()===o)return s;return null},jh=(t,e)=>{let n=kn(t),r=t&&t.addressLang,o=r&&typeof r=="object"&&!Array.isArray(r),s=o?r.mode:r,i={languages:n,address:s===!1?!1:s==="fallback"||s==="strict"?s:!0,fallback:yr(e,t)},a=o&&Array.isArray(r.except)?r.except.filter(c=>typeof c=="string"&&c):[];return a.length&&(i.except=a),i},Uh=(t,e,n)=>{if(t&&t.except&&t.except.length){let o=String(e||"").split(/[?#]/)[0].split("/").filter(Boolean);for(let s=0;s<t.except.length;s++){let i=String(t.except[s]).split("/").filter(Boolean);if(i[i.length-1]==="*"&&i.pop(),i.length>o.length)continue;let a=!0;for(let c=0;c<i.length&&a;c++)i[c].charAt(0)!==":"&&i[c]!==o[c]&&(a=!1);if(a){t={languages:t.languages,address:t.address!==!1,fallback:t.fallback};break}}}let r=null;if(t&&t.address!==!1){let o=/^\/([^/?#]+)/.exec(String(e||"")),s=t&&t.languages||[];if(o){let i=o[1].toLowerCase();for(let a=0;a<s.length&&!r;a++)String(s[a]).toLowerCase()===i&&(r=s[a])}}return r&&(t.address!=="fallback"||!n)?r:t&&t.address==="strict"?t.fallback||"":n||t&&t.fallback||""},gs=({polyglot:t,pathname:e,stored:n,stateLang:r}={})=>Uh(jh(t,r),e,n),ms=t=>{try{let e=t&&t.location||typeof globalThis<"u"&&globalThis.location;return e&&typeof e.pathname=="string"?e.pathname:""}catch{return""}},qS=({polyglot:t,translations:e,lang:n,pathname:r,attrs:o=""}={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("polyglotStartupScript",[{polyglot:t,translations:e,lang:n,pathname:r,attrs:o}]);if(!e||typeof e!="object")return"";let s=t&&t.storagePrefix||"",i=t&&t.storageLangKey||"",a=[];for(let c in e){let l=e[c];l&&typeof l=="object"&&a.push(`localStorage.setItem(${JSON.stringify(s+c)},${JSON.stringify(JSON.stringify(l))})`)}if(i){let c=n||Bh(r,t)||yr(void 0,t);a.push(`if(!localStorage.getItem(${JSON.stringify(i)}))localStorage.setItem(${JSON.stringify(i)},${JSON.stringify(c)})`)}return a.length?`<script${o}>try{${a.join(";")}}catch(e){}<\/script>`:""}});async function GS(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var RO=D(()=>{"use strict"});var pa,ha,wf,Ze,lo,ga,Sf,En,Vh,H5,fo,z5,ys,bs,YS,PO=D(()=>{"use strict";xl();pa=t=>t!=="latest"?`@${t}`:"",ha=t=>t?`/${t}`:"",wf=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let n=e.split("/"),r=e.startsWith("@")?2:1;return{name:n.slice(0,r).join("/"),subpath:n.slice(r).join("/")}},Ze={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Ze.skypack.url}/${t}${pa(e)}${ha(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Ze.esmsh.url}/${t}${pa(e)}${ha(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Ze.unpkg.url}/${t}${pa(e)}${ha(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Ze.jsdelivr.url}/${t}${pa(e)}${ha(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Ze.symbols.url}/${t}${pa(e)}${ha(n)}/+esm`}},lo={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},ga=(t={})=>{let{packageManager:e}=t;return lo[e]||null},Sf=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},En=(t,e="latest",n="esmsh")=>{let r=Ze[n]||Ze.esmsh,{name:o,subpath:s}=wf(t);return r.formatUrl(o||t,Sf(e),s)},Vh=(t,e="latest",n="esmsh")=>{let r=Ze[n]||Ze.esmsh,o=Sf(e),{name:s,subpath:i}=wf(t);return`${r.url}/${s||t}${pa(o)}${ha(i)}/`},H5=/^node:|^@symbo-ls\//,fo=t=>typeof t=="string"&&H5.test(t),z5=/[<>…]/,ys=t=>typeof t=="string"&&z5.test(t),bs=t=>!!t&&typeof t=="object"&&!Array.isArray(t),YS=(t,e="skypack",n={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("getImportMapScript",[t,e,n]);let r=t.dependencies;if(!bs(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(fo(f)||ys(f))continue;let u=s[f]||r[f]||"latest";i[f]=En(f,u,e),f.endsWith("/")||(i[f+"/"]=Vh(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
30
+ FROM ${a}${l}`},X5=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},J5={graphql:K5,"json-api":q5,odata:G5,sql:Y5,paths:X5}});var Z5,YS,L1=D(()=>{"use strict";jp();Z5={snapshotId:Ll},YS=(t,e)=>{let n=t.__ref,{currentSnapshot:r,calleeElement:o}=e;if(!o||o===t){let a=Z5.snapshotId();return n.__currentSnapshot=a,[a,t]}let i=o.__ref.__currentSnapshot;return r<i?[i,o,!0]:[i,o]}});var jh,XS,D1=D(()=>{jh=new Set(["__proto__","constructor","prototype","_id","__v","id","createdAt","updatedAt","schema"]),XS=t=>typeof t=="string"&&jh.has(t)});var Uh,ha,_r,En,Vh,zh,Hh,ms,ys,JS,I1=D(()=>{"use strict";El();Uh="smbls_lang",ha=t=>t&&t.storageLangKey||Uh,_r=(t,e)=>t||e&&e.defaultLang||"en",En=(t,e=!0)=>{let n=t&&t.languages;if(typeof n=="function")try{n=n(t)}catch{n=null}return Array.isArray(n)&&n.length?n.filter(r=>typeof r=="string"):e?Object.keys(t&&t.translations||{}):[]},Vh=(t,e)=>{if(!e)return null;let n=En(e),r=/^\/([^/?#]+)/.exec(String(t||""));if(!r)return null;let o=r[1].toLowerCase();for(let s of n)if(typeof s=="string"&&s.toLowerCase()===o)return s;return null},zh=(t,e)=>{let n=En(t),r=t&&t.addressLang,o=r&&typeof r=="object"&&!Array.isArray(r),s=o?r.mode:r,i={languages:n,address:s===!1?!1:s==="fallback"||s==="strict"?s:!0,fallback:_r(e,t)},a=o&&Array.isArray(r.except)?r.except.filter(c=>typeof c=="string"&&c):[];return a.length&&(i.except=a),i},Hh=(t,e,n)=>{if(t&&t.except&&t.except.length){let o=String(e||"").split(/[?#]/)[0].split("/").filter(Boolean);for(let s=0;s<t.except.length;s++){let i=String(t.except[s]).split("/").filter(Boolean);if(i[i.length-1]==="*"&&i.pop(),i.length>o.length)continue;let a=!0;for(let c=0;c<i.length&&a;c++)i[c].charAt(0)!==":"&&i[c]!==o[c]&&(a=!1);if(a){t={languages:t.languages,address:t.address!==!1,fallback:t.fallback};break}}}let r=null;if(t&&t.address!==!1){let o=/^\/([^/?#]+)/.exec(String(e||"")),s=t&&t.languages||[];if(o){let i=o[1].toLowerCase();for(let a=0;a<s.length&&!r;a++)String(s[a]).toLowerCase()===i&&(r=s[a])}}return r&&(t.address!=="fallback"||!n)?r:t&&t.address==="strict"?t.fallback||"":n||t&&t.fallback||""},ms=({polyglot:t,pathname:e,stored:n,stateLang:r}={})=>Hh(zh(t,r),e,n),ys=t=>{try{let e=t&&t.location||typeof globalThis<"u"&&globalThis.location;return e&&typeof e.pathname=="string"?e.pathname:""}catch{return""}},JS=({polyglot:t,translations:e,lang:n,pathname:r,attrs:o=""}={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("polyglotStartupScript",[{polyglot:t,translations:e,lang:n,pathname:r,attrs:o}]);if(!e||typeof e!="object")return"";let s=t&&t.storagePrefix||"",i=t&&t.storageLangKey||"",a=[];for(let c in e){let l=e[c];l&&typeof l=="object"&&a.push(`localStorage.setItem(${JSON.stringify(s+c)},${JSON.stringify(JSON.stringify(l))})`)}if(i){let c=n||Vh(r,t)||_r(void 0,t);a.push(`if(!localStorage.getItem(${JSON.stringify(i)}))localStorage.setItem(${JSON.stringify(i)},${JSON.stringify(c)})`)}return a.length?`<script${o}>try{${a.join(";")}}catch(e){}<\/script>`:""}});async function ZS(t){if(document.fullscreenElement)await document.exitFullscreen();else try{await(this.node||document).requestFullscreen()}catch(e){console.warn(`Error attempting to enable fullscreen mode: ${e.message} (${e.name})`)}}var M1=D(()=>{"use strict"});var ga,ma,xf,Qe,fo,ya,kf,vn,Wh,Q5,uo,t6,bs,_s,QS,N1=D(()=>{"use strict";El();ga=t=>t!=="latest"?`@${t}`:"",ma=t=>t?`/${t}`:"",xf=t=>{let e=typeof t=="string"?t.replace(/\/+$/,""):"";if(!e)return{name:"",subpath:""};let n=e.split("/"),r=e.startsWith("@")?2:1;return{name:n.slice(0,r).join("/"),subpath:n.slice(r).join("/")}},Qe={skypack:{url:"https://cdn.skypack.dev",formatUrl:(t,e,n)=>`${Qe.skypack.url}/${t}${ga(e)}${ma(n)}`},esmsh:{url:"https://esm.sh",formatUrl:(t,e,n)=>`${Qe.esmsh.url}/${t}${ga(e)}${ma(n)}`},unpkg:{url:"https://unpkg.com",formatUrl:(t,e,n)=>`${Qe.unpkg.url}/${t}${ga(e)}${ma(n)}?module`},jsdelivr:{url:"https://cdn.jsdelivr.net/npm",formatUrl:(t,e,n)=>`${Qe.jsdelivr.url}/${t}${ga(e)}${ma(n)}/+esm`},symbols:{url:"https://pkg.symbo.ls",formatUrl:(t,e,n)=>`${Qe.symbols.url}/${t}${ga(e)}${ma(n)}/+esm`}},fo={"esm.sh":"esmsh",unpkg:"unpkg",skypack:"skypack",jsdelivr:"jsdelivr","pkg.symbo.ls":"symbols"},ya=(t={})=>{let{packageManager:e}=t;return fo[e]||null},kf=t=>{if(typeof t!="string")return t;let e=t.trim().match(/^[\^~](\d.*)$/);return e?e[1]:t},vn=(t,e="latest",n="esmsh")=>{let r=Qe[n]||Qe.esmsh,{name:o,subpath:s}=xf(t);return r.formatUrl(o||t,kf(e),s)},Wh=(t,e="latest",n="esmsh")=>{let r=Qe[n]||Qe.esmsh,o=kf(e),{name:s,subpath:i}=xf(t);return`${r.url}/${s||t}${ga(o)}${ma(i)}/`},Q5=/^node:|^@symbo-ls\//,uo=t=>typeof t=="string"&&Q5.test(t),t6=/[<>…]/,bs=t=>typeof t=="string"&&t6.test(t),_s=t=>!!t&&typeof t=="object"&&!Array.isArray(t),QS=(t,e="skypack",n={})=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("getImportMapScript",[t,e,n]);let r=t.dependencies;if(!_s(r))return"";let o=Object.keys(r);if(!o.length)return"";let s=n.pin||{},i={};for(let f of o){if(uo(f)||bs(f))continue;let u=s[f]||r[f]||"latest";i[f]=vn(f,u,e),f.endsWith("/")||(i[f+"/"]=Wh(f,u,e))}if(!Object.keys(i).length)return"";let a='<script type="importmap">',c="<\/script>",l=`{
31
31
  "imports": ${JSON.stringify(i,null,2)}
32
- }`;return`${a}${l}${c}`}});var XS,LO=D(()=>{"use strict";XS=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var JS,DO=D(()=>{"use strict";JS=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var ZS,IO=D(()=>{"use strict";ZS=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var QS,MO=D(()=>{"use strict";QS=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function ma(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function sx(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var tx,ex,nx,rx,ox,NO=D(()=>{"use strict";tx=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),ex=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),nx=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},rx=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),ox=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});var $O,vn,ix=D(()=>{"use strict";$O=new Set,vn=t=>{$O.has(t)||($O.add(t),!(typeof console>"u"||!console.error)&&console.error(`[smbls] ${t}: this build has no shared-library support \u2014 \`smbls build\` found no shared library in the project (sharedLibraries.js, symbols.json sharedLibraries), so it left that code out. Declare the library there, or remove symbols.json build.treeShakeLibraries.`))}});function ws(t){let e=String(t||"").trim();if(!e)return{owner:ax,key:"",full:""};let n=null,r=e;if(e.includes("/")){let s=e.indexOf("/");n=e.slice(0,s),r=e.slice(s+1)}r=r.replace(/\.symbo\.ls$/iu,""),n||(n=ax);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function wa(t,e={}){if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("fetchLibraryData"),null;if((e.provider||"kv")==="api")return GO(t,e);let r=await k6(t,e);return r||GO(t,e)}async function k6(t,e={}){let n=e.kvBaseUrl||W5,r=e.env||"production",o=`${n}/kv/${encodeURIComponent(t)}?env=${r}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function GO(t,e={}){let n=e.apiBaseUrl||K5,{key:r}=ws(t);try{let o=`${n}/core/projects/libraries/available?search=${encodeURIComponent(r)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(p=>{let{key:g}=ws(p?.key);return g.toLowerCase()===r.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${n}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function YO(t,e={}){if(k(t))return t;if(v(t)){let{full:n}=ws(t);if(!n)return null;try{let r=await wa(n,e);return r||console.warn(`[smbls] Shared library "${n}" not found`),r}catch(r){return console.warn(`[smbls] Failed to fetch shared library "${n}":`,r.message),null}}return null}async function Of(t,e={}){return!t||!t.length?[]:globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__?(vn("resolveSharedLibraries"),[]):(await Promise.all(t.map(async r=>{if(Me(r)){let o=await YO(QO(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return YO(r,e)}))).filter(Boolean)}var ax,W5,K5,ya,XO,q5,G5,FO,Hh,BO,JO,Y5,ZO,X5,Ef,fx,Me,QO,cx,ux,J5,Z5,dx,px,tR,jO,_s,hx,Q5,uo,t6,eR,nR,UO,e6,n6,r6,o6,VO,zh,s6,rR,lx,i6,a6,HO,c6,l6,f6,u6,Wh,gx,d6,p6,h6,zO,vf,g6,kf,Kh,ba,_a,WO,qh,xf,m6,y6,KO,qO,Af,b6,_6,w6,S6,x6,oR,sR,Cf,Ss,Tf,Gh=D(()=>{"use strict";Wt();ts();Ll();Bn();ix();ax="system",W5="https://smbls-kv.nika-980.workers.dev",K5="https://api.symbols.app";ya=(t,e,n,r)=>{for(let o in e){let s=r?`${r}/${o}`:o;n&&n.has(s)||(o in t?k(t[o])&&k(e[o])&&ya(t[o],e[o],n,s):t[o]=e[o])}},XO=(t,e,n)=>{if(!k(t)||!e.size)return t;let r=`${n}/`,o=!1;for(let i of e)if(i.startsWith(r)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${n}/${i}`;e.has(a)||(s[i]=XO(t[i],e,a))}return s},q5=new Set,G5=new Set(["components","pages","functions","snippets","methods"]),FO=(t,e)=>e===""&&G5.has(t),Hh=["fontFamily","fontfamily","font_family","FONT_FAMILY"],BO=t=>{let e=new Map;if(!k(t))return e;for(let n of Hh){let r=t[n];if(k(r))for(let o in r)!k(r[o])||!r[o].isDefault||(e.has(n)||e.set(n,new Set),e.get(n).add(o))}return e},JO=(t,e)=>{for(let n of Hh){let r=t[n];if(!k(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];if(!k(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...r}),s[i]=c}s&&(t[n]=s)}},Y5=t=>{let e=new Map;if(!k(t))return e;for(let n of Hh){let r=t[n];k(r)&&e.set(n,new Set(Object.keys(r)))}return e},ZO=(t,e)=>{if(k(t))for(let n of Hh){let r=t[n];if(!k(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];!k(a)||a.isSharedLibrary||o&&o.has(i)||(s||(s={...r}),s[i]={...a,isSharedLibrary:!0})}s&&(t[n]=s)}},X5=t=>t.replace(/\.js$/iu,""),Ef=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!v(n))continue;let r=n.split("/").map(o=>X5(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},fx=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Me=t=>k(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),QO=t=>t.library!==void 0?t.library:t.key??t.name,cx=new Set,ux=()=>{cx.clear()},J5=(t,e)=>{let n=e.filter(r=>!cx.has(r));if(n.length){for(let r of n)cx.add(r);tt()&&console.warn(`[smbls] shared library "${t}" ships ${n.map(r=>`methods.${r}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},Z5=(t,e,n)=>{let r=null;for(let o in t)if(Qo(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)Qo(s)||(r[s]=t[s])}return r||t},dx=(t,e)=>{let n=Ef(t.sharedLibIgnore);return t.sharePages===!1&&n.add("pages"),n.size?new Set([...e,...n]):e},px=["functions","methods","snippets"],tR=["components","pages"],jO=Symbol.for("smbls.libraryScope"),_s="__libraryScopes",hx=new Map,Q5=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),uo=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t6=/const __scope = |const __peers_* = |const _s_* = el\?\.scope|\?\.context\?\.globalScope\?\./,eR=t=>{try{return Ie(t)}catch{return null}},nR=t=>{if(typeof t!="function")return null;let e=eR(t);return v(e)&&t6.test(e)&&oe(e)?e:null},UO=t=>v(t)&&oe(t)||nR(t)!==null,e6=t=>{let e=t.globalScope;return k(e)&&Object.keys(e).some(n=>UO(e[n]))?!0:px.some(n=>{let r=t[n];return!!r&&typeof r=="object"&&Object.keys(r).some(o=>UO(r[o]))})},n6=(t,e,n)=>{let r=t.globalScope,o=e.globalScope;if(n.has("globalScope")||!k(r)||!k(o)||!e6(e))return 0;let s=0;for(let i of Object.keys(o))n.has(`globalScope/${i}`)||uo(r,i)&&s++;return s},r6=[[/const __scope = (\(\(\) => \{ const r = [\s\S]*?\}\)\(\));/g,"const __scope = $RESOLVE($1);"],[/const __scope = this \?\? \{\};/g,"const __scope = $RESOLVE(this ?? {});"],[/const (__peers_*) = (this && this !== globalThis && this\.context && this\.context\.globalScope \? this\.scope \?\? this\.context\.globalScope : this);/g,"const $1 = $RESOLVE($2);"],[/const (_s_*) = (el\?\.scope \?\? el\?\.context\?\.globalScope \?\? \{\});/g,"const $1 = $RESOLVE($2);"],[/(?<![\w$.])(this|[A-Za-z_$][\w$]*)\?\.context\?\.globalScope\?\./g,"$RESOLVE($1?.context?.globalScope)?."]],o6=t=>{let e=t.split(""),n=[],r=0,o=0,s=(a,c)=>{for(let l=a;l<c;l++)e[l]!==`
32
+ }`;return`${a}${l}${c}`}});var tx,$1=D(()=>{"use strict";tx=t=>{if(!t)return"";let e=new Date(t),n=new Intl.DateTimeFormat("en",{year:"numeric"}).format(e),r=new Intl.DateTimeFormat("en",{month:"short"}).format(e);return`${new Intl.DateTimeFormat("en",{day:"2-digit"}).format(e)} ${r}, ${n}`}});var ex,F1=D(()=>{"use strict";ex=(t,e)=>{let n=setTimeout(()=>{let{props:r}=t;if(!e.clientHeight){let{node:{clientHeight:o}}=t;o&&(e.clientHeight=o)}if(e.active){if(r.height==="auto")return;t.update({height:e.clientHeight},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});let o=setTimeout(()=>{t.update({height:"auto"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0}),clearTimeout(o)},450)}else t.update({height:"0"},{preventBeforeUpdateListener:!0,preventChildrenUpdate:!0});clearTimeout(n)})}});var nx,B1=D(()=>{"use strict";nx=function(e){let n=[0,1];for(let r=2;r<=e;r++)n[r]=n[r-1]+n[r-2];return n[e]}});var rx,j1=D(()=>{"use strict";rx=t=>["jpeg","gif","jpg","png","tiff","woff"].includes(t)});function ba(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`script[src="${t}"]`);if(i)return o(i);let a=r.createElement("script");a.src=t,a.async=e.async===!0,a.type=e.type||"text/javascript",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load script: ${t}`))},r.head.appendChild(a)})}async function lx(t,e={}){let{window:n=globalThis}=e,{document:r=n.document}=e;return new Promise((o,s)=>{let i=r.querySelector(`link[href="${t}"]`);if(i)return o(i);let a=r.createElement("link");a.href=t,a.rel=e.rel||"stylesheet",a.type="text/css",a.media=e.media||"all",e.id&&(a.id=e.id),e.integrity&&(a.integrity=e.integrity),e.crossOrigin&&(a.crossOrigin=e.crossOrigin),a.onload=()=>{a.onerror=a.onload=null,o(a)},a.onerror=()=>{a.onerror=a.onload=null,s(new Error(`Failed to load stylesheet: ${t}`))},r.head.appendChild(a)})}var ox,sx,ix,ax,cx,U1=D(()=>{"use strict";ox=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("script");i.type=r,i.async=e,i.src=t,i.addEventListener("load",a=>{o({status:!0})}),i.addEventListener("error",a=>{s(new Error({status:!1,message:`Failed to load the script ${t}`}))}),n.body.appendChild(i)}catch(i){s(i)}}),sx=(t,e=document,n="text/javascript")=>new Promise((r,o)=>{let s=e.createElement("script");s.type=n,s.src=t;let i=e.createElement("div");i.style.cssText="position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(255,255,255,0.8);z-index:9999;",e.body.appendChild(i),s.onload=()=>{console.log(`Successfully loaded: ${t}`),e.body.removeChild(i),r()},s.onerror=()=>{e.body.removeChild(i),o(new Error(`Failed to load: ${t}`))},e.body.appendChild(s)}),ix=(t,e=document,n,r="text/javascript")=>{let o=new window.XMLHttpRequest;if(o.open("GET",t,!1),o.send(),o.status===200){let s=e.createElement("script");s.type=r,s.text=o.responseText,e.body.appendChild(s),typeof n=="function"&&n()}else throw new Error(`Failed to load the script ${t}`)},ax=(t,e=!1,n=document,r="text/javascript")=>new Promise((o,s)=>{try{let i=n.createElement("link");i.rel="stylesheet",i.href=t,i.addEventListener("load",a=>{o({status:!0})}),n.head.appendChild(i)}catch(i){s(i)}}),cx=(t,e=!1,n=document,r="text/javascript",o="smbls-script")=>{try{let s=n.createElement("script");s.type=r,s.async=e,s.id=o,s.innerHTML=t,n.body.appendChild(s)}catch(s){console.warn(s)}}});var V1,An,fx=D(()=>{"use strict";V1=new Set,An=t=>{V1.has(t)||(V1.add(t),!(typeof console>"u"||!console.error)&&console.error(`[smbls] ${t}: this build has no shared-library support \u2014 \`smbls build\` found no shared library in the project (sharedLibraries.js, symbols.json sharedLibraries), so it left that code out. Declare the library there, or remove symbols.json build.treeShakeLibraries.`))}});function Ss(t){let e=String(t||"").trim();if(!e)return{owner:ux,key:"",full:""};let n=null,r=e;if(e.includes("/")){let s=e.indexOf("/");n=e.slice(0,s),r=e.slice(s+1)}r=r.replace(/\.symbo\.ls$/iu,""),n||(n=ux);let o=r?`${n}/${r}`:"";return{owner:n,key:r,full:o}}async function xa(t,e={}){if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("fetchLibraryData"),null;let n=e.provider||"kv";if(n==="same-origin")return M6(t,e);if(n==="api")return Q1(t,e);let r=await I6(t,e);return r||Q1(t,e)}async function I6(t,e={}){let n=e.kvBaseUrl||e6,r=e.env||"production",o=`${n}/kv/${encodeURIComponent(t)}?env=${r}`;try{let s=await fetch(o,{method:"GET"});return s.ok&&(await s.json())?.value||null}catch{return null}}async function M6(t,e={}){let n=e.sameOriginBase;if(!n)return null;let r=`${n}${r6}${encodeURIComponent(t)}`;try{let o=await fetch(r,{method:"GET"});return o.ok?await o.json():null}catch{return null}}async function Q1(t,e={}){let n=e.apiBaseUrl||n6,{key:r}=Ss(t);try{let o=`${n}/core/projects/libraries/available?search=${encodeURIComponent(r)}&limit=10`,s=await fetch(o,{method:"GET"});if(!s.ok)return null;let i=await s.json(),c=(i?.items||i?.data||(Array.isArray(i)?i:[])).find(p=>{let{key:g}=Ss(p?.key);return g.toLowerCase()===r.toLowerCase()});if(!c?.id&&!c?._id)return null;let l=c.id||c._id,f=`${n}/core/projects/${encodeURIComponent(l)}/data?branch=main`,u=await fetch(f,{method:"GET"});if(!u.ok)return null;let d=await u.json();return d?.data||d||null}catch{return null}}async function tR(t,e={}){if(k(t))return t;if(v(t)){let{full:n}=Ss(t);if(!n)return null;try{let r=await xa(n,e);return r||console.warn(`[smbls] Shared library "${n}" not found`),r}catch(r){return console.warn(`[smbls] Failed to fetch shared library "${n}":`,r.message),null}}return null}async function Pf(t,e={}){return!t||!t.length?[]:globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__?(An("resolveSharedLibraries"),[]):(await Promise.all(t.map(async r=>{if(Ne(r)){let o=await tR(oR(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return tR(r,e)}))).filter(Boolean)}var ux,e6,n6,r6,_a,eR,o6,s6,z1,Kh,H1,nR,i6,rR,a6,Af,hx,Ne,oR,dx,gx,c6,l6,mx,yx,sR,W1,ws,bx,f6,po,u6,iR,aR,K1,d6,p6,h6,g6,q1,qh,m6,cR,px,y6,b6,G1,_6,w6,S6,x6,Gh,_x,k6,E6,v6,Y1,Cf,A6,vf,Yh,wa,Sa,X1,Xh,Ef,C6,T6,J1,Z1,Tf,O6,R6,P6,L6,D6,lR,fR,Of,xs,Rf,Jh=D(()=>{"use strict";Wt();es();Il();jn();fx();ux="system",e6="https://smbls-kv.nika-980.workers.dev",n6="https://api.symbols.app",r6="/v1/library-icons/";_a=(t,e,n,r)=>{for(let o in e){let s=r?`${r}/${o}`:o;n&&n.has(s)||(o in t?k(t[o])&&k(e[o])&&_a(t[o],e[o],n,s):t[o]=e[o])}},eR=(t,e,n)=>{if(!k(t)||!e.size)return t;let r=`${n}/`,o=!1;for(let i of e)if(i.startsWith(r)){o=!0;break}if(!o)return t;let s={};for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let a=`${n}/${i}`;e.has(a)||(s[i]=eR(t[i],e,a))}return s},o6=new Set,s6=new Set(["components","pages","functions","snippets","methods"]),z1=(t,e)=>e===""&&s6.has(t),Kh=["fontFamily","fontfamily","font_family","FONT_FAMILY"],H1=t=>{let e=new Map;if(!k(t))return e;for(let n of Kh){let r=t[n];if(k(r))for(let o in r)!k(r[o])||!r[o].isDefault||(e.has(n)||e.set(n,new Set),e.get(n).add(o))}return e},nR=(t,e)=>{for(let n of Kh){let r=t[n];if(!k(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];if(!k(a)||!a.isDefault||o&&o.has(i))continue;let c={...a};delete c.isDefault,s||(s={...r}),s[i]=c}s&&(t[n]=s)}},i6=t=>{let e=new Map;if(!k(t))return e;for(let n of Kh){let r=t[n];k(r)&&e.set(n,new Set(Object.keys(r)))}return e},rR=(t,e)=>{if(k(t))for(let n of Kh){let r=t[n];if(!k(r))continue;let o=e.get(n),s=null;for(let i in r){let a=r[i];!k(a)||a.isSharedLibrary||o&&o.has(i)||(s||(s={...r}),s[i]={...a,isSharedLibrary:!0})}s&&(t[n]=s)}},a6=t=>t.replace(/\.js$/iu,""),Af=t=>{let e=new Set;if(!Array.isArray(t))return e;for(let n of t){if(!v(n))continue;let r=n.split("/").map(o=>a6(o.trim())).filter(Boolean).join("/");r&&e.add(r)}return e},hx=(t,e={})=>({library:t,ignoreList:Array.isArray(e.ignoreList)?e.ignoreList:[]}),Ne=t=>k(t)&&Array.isArray(t.ignoreList)&&("library"in t||"key"in t||"name"in t),oR=t=>t.library!==void 0?t.library:t.key??t.name,dx=new Set,gx=()=>{dx.clear()},c6=(t,e)=>{let n=e.filter(r=>!dx.has(r));if(n.length){for(let r of n)dx.add(r);tt()&&console.warn(`[smbls] shared library "${t}" ships ${n.map(r=>`methods.${r}`).join(", ")} \u2014 named like a built-in element method. Refused: the built-in wins; a library cannot replace an element method on the consuming app. If the app wants this version, declare it in the app's OWN methods.`)}},l6=(t,e,n)=>{let r=null;for(let o in t)if(ts(o)&&(e.has(`methods/${o}`)||n.push(o),!r)){r={};for(let s in t)ts(s)||(r[s]=t[s])}return r||t},mx=(t,e)=>{let n=Af(t.sharedLibIgnore);return t.sharePages===!1&&n.add("pages"),n.size?new Set([...e,...n]):e},yx=["functions","methods","snippets"],sR=["components","pages"],W1=Symbol.for("smbls.libraryScope"),ws="__libraryScopes",bx=new Map,f6=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),po=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),u6=/const __scope = |const __peers_* = |const _s_* = el\?\.scope|\?\.context\?\.globalScope\?\./,iR=t=>{try{return Me(t)}catch{return null}},aR=t=>{if(typeof t!="function")return null;let e=iR(t);return v(e)&&u6.test(e)&&se(e)?e:null},K1=t=>v(t)&&se(t)||aR(t)!==null,d6=t=>{let e=t.globalScope;return k(e)&&Object.keys(e).some(n=>K1(e[n]))?!0:yx.some(n=>{let r=t[n];return!!r&&typeof r=="object"&&Object.keys(r).some(o=>K1(r[o]))})},p6=(t,e,n)=>{let r=t.globalScope,o=e.globalScope;if(n.has("globalScope")||!k(r)||!k(o)||!d6(e))return 0;let s=0;for(let i of Object.keys(o))n.has(`globalScope/${i}`)||po(r,i)&&s++;return s},h6=[[/const __scope = (\(\(\) => \{ const r = [\s\S]*?\}\)\(\));/g,"const __scope = $RESOLVE($1);"],[/const __scope = this \?\? \{\};/g,"const __scope = $RESOLVE(this ?? {});"],[/const (__peers_*) = (this && this !== globalThis && this\.context && this\.context\.globalScope \? this\.scope \?\? this\.context\.globalScope : this);/g,"const $1 = $RESOLVE($2);"],[/const (_s_*) = (el\?\.scope \?\? el\?\.context\?\.globalScope \?\? \{\});/g,"const $1 = $RESOLVE($2);"],[/(?<![\w$.])(this|[A-Za-z_$][\w$]*)\?\.context\?\.globalScope\?\./g,"$RESOLVE($1?.context?.globalScope)?."]],g6=t=>{let e=t.split(""),n=[],r=0,o=0,s=(a,c)=>{for(let l=a;l<c;l++)e[l]!==`
33
33
  `&&(e[l]="~")},i=()=>{let a=r;for(;r<t.length;){let c=t[r];if(c==="\\"){r+=2;continue}if(c==="`"){s(a,r),r++;return}if(c==="$"&&t[r+1]==="{"){s(a,r),r+=2,n.push(o),o++;return}r++}s(a,r)};for(;r<t.length;){let a=t[r];if(a==="/"&&t[r+1]==="/"){let c=t.indexOf(`
34
34
  `,r),l=c===-1?t.length:c;s(r,l),r=l;continue}if(a==="/"&&t[r+1]==="*"){let c=t.indexOf("*/",r+2),l=c===-1?t.length:c+2;s(r,l),r=l;continue}if(a==='"'||a==="'"){let c=a,l=++r;for(;r<t.length&&t[r]!==c&&t[r]!==`
35
- `;)t[r]==="\\"&&r++,r++;s(l,r),r++;continue}if(a==="`"){r++,i();continue}if(a==="{"){o++,r++;continue}if(a==="}"){if(o--,n.length&&o===n[n.length-1]){n.pop(),r++,i();continue}r++;continue}r++}return e.join("")},VO=(t,e)=>{if(!v(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!/const _s_* = /.test(t)&&!t.includes("?.context?.globalScope?.")||!oe(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of r6){let i=o6(r);r=r.replace(o,(...a)=>{let c=a[a.length-2];return i[c]==="~"||i[c]!==r[c]?a[0]:s.replace(/\$RESOLVE\(/g,n).replace(/\$(\d)/g,(l,f)=>a[Number(f)])})}return r},zh=(t,e)=>{if(v(t))return VO(t,e);let n=nR(t);return n===null?t:VO(n,e)},s6={lazy:!0,window:globalThis},rR=(t,e)=>{let n=zh(t,e);if(n===t||!v(n))return n;try{let r=ye({v:n},{},s6).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},lx=t=>{if(!t||typeof t!="object")return!1;if(Array.isArray(t))return!0;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},i6=(t,e)=>{let n=new WeakMap,r=o=>{if(v(o)||typeof o=="function")return rR(o,e);if(Al(o)||!lx(o))return o;if(n.has(o))return n.get(o);let s=Array.isArray(o)?[]:Object.getPrototypeOf(o)===null?Object.create(null):{};n.set(o,s);for(let i of Object.keys(o))s[i]=r(o[i]);return s};return r(t)},a6=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=zh(t.globalScope[o],e);n.globalScope=r;for(let o of px){let s=t[o];if(!lx(s))continue;let i={};for(let a of Object.keys(s))i[a]=rR(s[a],e);n[o]=i}for(let o of tR)lx(t[o])&&(n[o]=i6(t[o],e));return n},HO=new WeakMap,c6=(t,e,n)=>{let r=HO.get(t);r||HO.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>uo(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||uo(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return uo(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!uo(i,a)&&uo(e,a)?(e[a]=c,!0):Reflect.set(i,a,c)},has:(i,a)=>Reflect.has(i,a)||a in e}),r.set(e,o),o},l6=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",f6=(t,e)=>{let n=hx.get(t);return n?e===n.consumerGs?n.libGs:l6(e)?c6(e,n.libGs,n.consumerGs):e:e},u6=()=>{typeof globalThis[jO]!="function"&&Object.defineProperty(globalThis,jO,{value:f6,configurable:!0})},Wh=t=>{let e=t[_s];return Array.isArray(e)?e:null},gx=t=>Me(t)?t.library:t,d6=(t,e,n)=>{let r=Wh(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&v(o.id)&&p6(t,o.id))},p6=(t,e)=>{let n=JSON.stringify(e),r=new Set,o=s=>{if(v(s))return s.includes(n);if(!s||typeof s!="object"||r.has(s))return!1;r.add(s);for(let i in s)if(o(s[i]))return!0;return!1};for(let s of["globalScope",...px,...tR])if(o(t[s]))return!0;return!1},h6=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=zh(t[r],e);return n},zO=new WeakMap,vf=(t,e=null)=>{let n=t&&Wh(t);if(!n||!n.length)return 0;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("bindLibraryGlobalScopes"),0;let r=t.globalScope;if(!k(r))return 0;let o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[],s=zO.get(r);s||zO.set(r,s=new Set),u6();let i=0;for(let a of n){if(!a||!v(a.id)||s.has(a.id))continue;let c=gx(o[a.index]);if(!c||!k(c.globalScope)||a.key&&c.key!==a.key)continue;let l=p=>typeof p=="function"?eR(p):p,f=(p,g)=>{if(p===g)return!0;let h=l(p),m=l(g);return v(h)||v(m)?h===m:JSON.stringify(p)===JSON.stringify(g)},u=k(e)?(Array.isArray(a.landed)?a.landed:[]).filter(p=>v(p)&&uo(c.globalScope,p)&&uo(e,p)&&f(e[p],zh(c.globalScope[p],a.id))):[],d=ss(h6(c.globalScope,a.id));Object.setPrototypeOf(d,r),hx.set(a.id,{libGs:d,consumerGs:r});for(let p of u)r[p]=d[p];s.add(a.id),i++}return i},g6=/^@symbo[-.]ls\//,kf=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Kh=t=>[`@symbo-ls/${t}`,`@symbo.ls/${t}`],ba=(t,e)=>{let n=[];if(!Array.isArray(t)||!t.length)return n;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("libraryPackageSpecs"),n;let r=new Map,o=(i,a,c)=>{for(let l of Kh(i)){let f=r.get(l);if(f===void 0){r.set(l,a),n.push([l,a]);continue}f!==a&&c&&typeof e=="function"&&e({spec:l,kept:f,refused:a})}},s=[];for(let i of t){let a=gx(i);if(!a||typeof a!="object"||a.__isStub)continue;let c=a.key||a.name||a.__libraryKey,l=[];for(let f of[a.key,a.name,a.__libraryKey,a.__libraryName]){if(typeof f!="string"||!f||f!==c&&!g6.test(f))continue;let u=kf(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&kf(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},_a=({spec:t,kept:e,refused:n})=>{typeof console>"u"||console.warn(`[smbls] shared library "${n&&n.key}" also claims ${t}, which "${e&&e.key}" already owns; ${t} stays with "${e&&e.key}".`)},WO=["functions","methods","snippets"],qh=Symbol.for("smbls.libraryPackages"),xf=new WeakMap,m6=t=>!!t&&typeof t=="object"&&!Array.isArray(t),y6=t=>({get globalScope(){return t()}}),KO=(t,e,n)=>{let r={};for(let o of Object.keys(t))r[o]=t[o];return Object.defineProperty(r,"context",{configurable:!0,enumerable:!1,writable:!0,value:y6(e)}),xf.set(r,n),r},qO=t=>!m6(t)||!xf.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),Af=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of WO){let o=t[r];qO(o)||xf.get(o)===t||(t[r]=KO(o,e,t))}if(!globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__&&Array.isArray(t.sharedLibraries)){let r=Wh(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=Me(o)&&o&&"library"in o,a=gx(o);if(!a||typeof a!="object"||a.__isStub||xf.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&hx.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of WO)qO(a[u])||(f[u]=KO(a[u],l,t));return xf.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of ba(t.sharedLibraries,_a))r[o]=s;try{Object.defineProperty(n,qh,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},b6=(t,e,n,r="library",o=-1)=>{let s=dx(e,n),i=!d6(t,o,e)&&n6(t,e,s)>0?`${r}#${Q5()}`:null,a=i?a6(e,i):e,c=i?new Set(Object.keys(t.globalScope)):null,l=[];for(let f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&!(f==="sharePages"||f==="sharedLibIgnore")&&f!==_s&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(k(a[f])&&k(t[f])){if(f==="designSystem")ya(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&Qo(u)){u in t[f]||l.push(u);continue}u in t[f]?FO(f,t[f][u])&&!FO(f,a[f][u])&&(t[f][u]=a[f][u]):t[f][u]=a[f][u]}}else if(!(f in t)){let u=a[f],d=f==="methods"&&u&&typeof u=="object"?Z5(u,s,l):u;t[f]=XO(d,s,f)}}i&&(Wh(t)||(t[_s]=[]),t[_s].push({id:i,index:o,key:v(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&J5(r,l)},_6=(t,e,n)=>{if(t!==e){let r=QO(t);if(v(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},w6=`${ax}/default`,S6=t=>v(t)&&t!==""&&ws(t).full===w6,x6=(t,e)=>{if(v(e.key)&&e.key)return e.key;if(t!==e){if(v(t.key)&&t.key)return t.key;if(v(t.name)&&t.name)return t.name}return null},oR=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=q5;if(Me(s)&&(i=Ef(s.ignoreList),s=s.library),!k(s))continue;let a={entry:o,lib:s,ignore:i,index:r};S6(x6(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},sR=(t,e,n)=>{let r=e(),o=BO(r),s=Y5(r),{linked:i,bases:a}=oR(t);for(let f of i)n(f);let c=!o.size&&a.length?BO(e()):null;for(let f of a)n(f);return{claims:o.size?o:c&&c.size?c:null,ownFamilies:s}},Cf=(t,e)=>{if(!e||!e.length)return;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("mergeSharedLibraries");let n=t.designSystem,{claims:r,ownFamilies:o}=sR(e,()=>t.designSystem,({entry:s,lib:i,ignore:a,index:c})=>b6(t,i,a,_6(s,i,c),c));t.designSystem!==n&&(t.designSystem={...t.designSystem}),ZO(t.designSystem,o),r&&JO(t.designSystem,r)},Ss=(t,e)=>{let n=k(t)?t:null;if(!Array.isArray(e)||!e.length)return n||{};if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("sharedLibraryFiles"),n||{};let r=n?{...n}:{},{linked:o,bases:s}=oR(e);for(let{lib:i,ignore:a}of[...o,...s]){let c=dx(i,a);if(c.has("files"))continue;let l=i.files;if(k(l))for(let f in l)Object.prototype.hasOwnProperty.call(l,f)&&(c.has(`files/${f}`)||f in r||(r[f]=l[f]))}return r},Tf=(t,e,n=ya)=>{if(!k(t)||!Array.isArray(e)||!e.length)return t;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("mergeSharedLibraryDesignSystems"),t;let{claims:r,ownFamilies:o}=sR(e,()=>t,({lib:s,ignore:i})=>{let a=s.designSystem;if(!a||typeof a!="object")return;let c=dx(s,i);c.has("designSystem")||n(t,a,c,"designSystem")});return ZO(t,o),r&&JO(t,r),t}});function Es(t,e){if(!e||typeof e!="object")return t;let n=o=>!R6(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:Xh(e[o])||o,r={...t};for(let[o,s]of Object.entries(r))P6.has(o)?r[o]=Array.isArray(s)?s.map(i=>aR(i,n)):aR(s,n):typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function mx(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function L6(t,e){let n=mx(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!Xi(n))return n}function D6(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[n?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let p=L6(d,u);if(p!==void 0)return p}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(p,g,h)=>{let m=g.trim();if(h==="polyglot")return a[m]??mx(a,m)??p;if(h==="getLocalStateLang")return l(m+s)??p;let y=l(m);return y!==void 0?y:a[m]??mx(a,m)??p}));return f}function cR(t){if(!k(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}Xi(r)&&delete e[n]}return e}function kx(t,e,n,{isProduction:r=!1,channel:o="production"}={}){if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("getPageMetadata",[t,e,n,{isProduction:r,channel:o}]);let s=t.pages?.[e],i=k(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=cR(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=cR(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let m=t.name||t.key;m?r?d.title=m:o==="development"?d.title=`${m} / dev:symbo.ls`:o==="staging"?d.title=`${m} / staging:symbo.ls`:d.title=`${m} / symbo.ls`:d.title="Symbols demo"}d=D6(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let p=l.has("og:url")?d["og:url"]:l.has("url")?d.url:void 0,g=n?.actualPathname||e;if(p)d["og:url"]=p;else if(d["og:url"]||d.url){let m=(d["og:url"]||d.url||"").replace(/\/$/,"");if(m&&g&&g!=="/"){let y=g.startsWith("/")?g:"/"+g;d["og:url"]=m+y}}d=Es(d,Ss(t.files,t.sharedLibraries));let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[m,y]of Object.entries(d))if(typeof y=="string"&&y.includes("{{")){let x=y.replace(/\{\{[^}]*\}\}/g,"").trim();x?d[m]=x:m==="title"?d[m]=h:delete d[m]}return d}var U,ao,pr,Pf,yx,Lf,Df,If,E6,bx,_x,Yh,wx,us,v6,Sx,iR,An,A6,C6,Sa,xs,po,ks,T6,O6,xx,R6,Rf,Xh,P6,aR,lR=D(()=>{"use strict";Wt();Qi();Gh();xl();U=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},ao=t=>JSON.stringify(t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),pr=(t,e,{remove:n=!1,warn:r}={})=>{if(!t||typeof t.querySelector!="function")return null;let o=null;try{o=t.querySelector(e)}catch{return null}if(!o)return null;n&&o.parentNode&&o.parentNode.removeChild(o);let s;try{s=JSON.parse(o.textContent||"")}catch(i){r&&r(i)}return{value:s,block:o}},Pf='script[type="application/json"][data-brender="registry"]',yx=t=>'<script type="application/json" data-brender="registry">'+ao(t)+"<\/script>",Lf='link[rel="preload"][data-smbls="design-system"]',Df='meta[name="smbls-design-system"][data-smbls="design-system"]',If='script[type="application/json"][data-smbls="design-system"]',E6=t=>k(t)&&k(t.config)&&Array.isArray(t.rules),bx=(t,e)=>e&&e.defer===!0?'<meta name="smbls-design-system" content="'+U(t)+'" data-smbls="design-system">':'<link rel="preload" href="'+U(t)+'" as="fetch" crossorigin="anonymous" data-smbls="design-system">',_x=t=>E6(t)?'<script type="application/json" data-smbls="design-system">'+ao(t)+"<\/script>":"",Yh='meta[name="brender-stamp"]',wx=({stamp:t,time:e}={})=>'<meta name="brender-stamp" content="'+U(t)+'" data-time="'+(typeof e=="number"&&isFinite(e)?Math.round(e):"")+'">',us=t=>{if(!t||typeof t.querySelector!="function")return null;let e=null;try{e=t.querySelector(Yh)}catch{return null}if(!e)return null;let n=parseInt(e.getAttribute("data-time"),10);return{stamp:e.getAttribute("content")||"",time:isFinite(n)?n:null}},v6=/<script\b(?:[^>"']|"[^"]*"|'[^']*')*\btype\s*=\s*["']?importmap["']?(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/script\s*>/gi,Sx=(t,e)=>{let n=-1;for(let r of String(t).matchAll(v6))n=r.index+r[0].length;return n===-1?null:t.slice(0,n)+`
36
- `+e+t.slice(n)},iR=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${U(n)}"`).join(" "),An=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},A6=new Set(["jsonLd","styles","scripts"]),C6=new Set(["source"]),Sa=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${An(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${An(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${U(o)}"`),r||(n.type&&s.push(`type="${U(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${U(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${U(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${U(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${U(o||An(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},xs=t=>`${t.hreflang||""}|${t.href||""}`,po=t=>k(t)?An(JSON.stringify(t)):String(t),ks=t=>k(t)?An(JSON.stringify(t)):String(t),T6=(t,e,n)=>t==="favicons"?Array.isArray(e)&&(typeof n=="string"||k(n))?` data-smbls-favicon="${U(po(n))}"`:"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${U(e)}"`:"",O6=t=>k(t)?` data-smbls-alternate="${U(xs(t))}"`:"",xx=(t,e)=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return jn("generateMetaTags",[t,e]);e||(t={...t,robots:"noindex"});let n=!1,r=Object.entries(t).reduce((o,[s,i])=>{if(!i&&i!==0&&i!==!1||A6.has(s)||C6.has(s))return o;if(s==="title")return o.push(`<title>${U(i)}</title>`),o;if(s==="canonical")return o.push(`<link rel="canonical" href="${U(i)}">`),o;if(s==="manifest")return o.push(`<link rel="manifest" href="${U(i)}">`),o;if(s==="favicon"||s==="favicons"||s==="icon"||s==="icons")return(Array.isArray(i)?i:[i]).forEach(u=>{let d=T6(s,i,u);if(typeof u=="string")o.push(`<link rel="icon" href="${U(u)}"${d}>`);else if(typeof u=="object"){let p=iR(u);/rel=/.test(p)?o.push(`<link ${p}${d}>`):o.push(`<link rel="icon" ${p}${d}>`)}}),o;if(s==="alternate")return(Array.isArray(i)?i:[i]).forEach(u=>{if(u&&typeof u=="object"){let d=Object.entries(u).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${U(g)}"`).join(" ");o.push(`<link rel="alternate" ${d}${O6(u)}>`)}}),o;if(s==="theme-color"&&Array.isArray(i))return i.forEach(f=>{if(!k(f))return;let u=iR({name:"theme-color",content:f.content,media:f.media});o.push(`<meta ${u} data-smbls-theme-color="${U(ks(f))}">`)}),o;let a=(f,u,d="name")=>{if(typeof u=="string"||typeof u=="number"||typeof u=="boolean")o.push(`<meta ${d}="${U(f)}" content="${U(u)}">`);else if(Array.isArray(u))u.forEach(p=>{if(typeof p=="string"||typeof p=="number"||typeof p=="boolean")o.push(`<meta ${d}="${U(f)}" content="${U(p)}">`);else if(typeof p=="object"){let g=Object.entries(p).filter(([h,m])=>m!==void 0).map(([h,m])=>`${h}="${U(m)}"`).join(" ");o.push(`<meta ${g}>`)}});else if(typeof u=="object"){let p=Object.entries(u).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${U(h)}"`).join(" ");o.push(`<meta ${p}>`)}};if(s.startsWith("http-equiv:")){let f=s.replace("http-equiv:","");return a(f,i,"http-equiv"),o}if(s.startsWith("itemprop:")){let f=s.replace("itemprop:","");return a(f,i,"itemprop"),o}let l=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(f=>s.startsWith(f));if(l){let f=s.replace(l,"");return a(`${l.replace(":","")}:${f}`,i,l==="twitter:"||l==="DC:"||l==="DCTERMS:"?"name":"property"),o}if(s.startsWith("apple:")||s.startsWith("msapplication:")){let f=s.startsWith("apple:")?"apple-":"msapplication-",u=s.replace(/^apple:|^msapplication:/,"");return a(`${f}${u}`,i,"name"),o}return s==="viewport"&&(n=!0),a(s,i),o},['<meta charset="UTF-8">']);return n||r.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),r.push(...Sa(t)),r.join(`
37
- `)},R6=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),Rf=t=>typeof t=="string"&&t.length>0,Xh=t=>{if(!t||typeof t!="object")return null;if(Rf(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:Rf(e.src)?e.src:Rf(e.storageUrl)?e.storageUrl:null},P6=new Set(["icon","favicon","icons","favicons"]),aR=(t,e)=>{if(typeof t=="string")return e(t);if(!k(t))return t;let n={...t};return Rf(n.href)&&(n.href=e(n.href)),Rf(n.src)&&(n.src=e(n.src)),n}});var Jh,Ex,fR=D(()=>{"use strict";Wt();Jh=(t,e)=>(I(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Ex=(t,e)=>(t=parseFloat(t),k(e)&&(e=Object.values(e)),Jh(t,e))});var vx,Ax,Cx,br,Tx,Mf,Ox,vs,Rx=D(()=>{"use strict";Wt();vx=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Ax=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Cx=t=>t.replace(/[^a-zA-Z0-9_]/g,""),br=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,"")),Tx=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Mf=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Ox=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},vs=t=>{if(I(t))return t;if(v(t))return t.split(" ");if(k(t))return Object.values(t);if(ge(t))return[t]}});var uR,dR,I6,hR,pR,M6,Zh,N6,Qh,Px,Lx,tg,Nf,gR=D(()=>{"use strict";Wt();Gh();Rx();ix();uR=/[A-Za-z_$][A-Za-z0-9_$-]*/g,dR=/[A-Za-z_$][A-Za-z0-9_$]*(?: [A-Za-z0-9_$]+){1,5}/g,I6=(t,e)=>{uR.lastIndex=0;let n;for(;n=uR.exec(t);){let o=n[0];if(e.add(o),o.indexOf("-")!==-1)for(let s of o.split("-"))s&&e.add(s)}dR.lastIndex=0;let r;for(;r=dR.exec(t);){let o=r[0].split(" ");for(let s=0;s<o.length-1;s++)for(let i=2;i<=6&&s+i<=o.length;i++)e.add(br(o.slice(s,s+i).join(" ")))}return e},hR=t=>Me(t)?t.library:t,pR=["components","pages","snippets"],M6=["name","icon"],Zh=t=>{if(!k(t))return null;let e=t.key;if(!e)return null;let n=t.owner,r=k(n)?n.slug:n;return r?`${r}/${e}`:String(e)},N6=/^\s*(?:async\s+)?(?:function\b|\(|[A-Za-z_$][A-Za-z0-9_$]*\s*=>)/,Qh=t=>{let e=new Set,n=r=>{if(Array.isArray(r)){for(let o of r)if(n(o))return!0;return!1}if(!k(r)||e.has(r))return!1;e.add(r);for(let o of M6){let s=r[o];if(typeof s=="string"&&N6.test(s))return!0}for(let o of Object.keys(r))if(n(r[o]))return!0;return!1};for(let r of pR)if(n(t[r]))return!0;for(let r of t.sharedLibraries||[]){let o=hR(r);if(k(o)){for(let s of pR)if(n(o[s]))return!0}}return!1},Px=t=>{if(!k(t)||!Array.isArray(t.sharedLibraries))return null;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return t.sharedLibraries.length&&vn("planLibraryIconPrune"),null;let e=k(t.settings)?t.settings.libraryIconPrune:void 0;if(e===!1||e!==!0&&Qh(t))return null;let n=[];for(let u of t.sharedLibraries){let d=hR(u),p=k(d)&&d.designSystem,g=k(p)&&p.icons;if(!k(g))continue;let h=Zh(d);h&&n.push({id:h,icons:g,designSystem:p})}if(!n.length)return null;let r=new Set(n.map(u=>u.designSystem)),o=JSON.stringify(t,function(u,d){if(u!=="__ssr"&&!(u==="icons"&&r.has(this)))return d});if(typeof o!="string")return null;let s=I6(o,new Set),i=new Map,a=[],c=0,l=0,f=0;for(let u of n){let d=[];for(let p of Object.keys(u.icons)){if(s.has(p)){l++;continue}d.push(p);let g=u.icons[p];f+=p.length+(typeof g=="string"?g.length:0)}d.length&&(c+=d.length,i.set(u.icons,new Set(d)),a.push({id:u.id,icons:d}))}return c?{drops:i,prune:{libraries:a},report:{icons:c,kept:l,bytes:f}}:null},Lx=t=>function(e,n){let r=t.get(this);if(!(r&&r.has(e)))return n},tg=(t,e={})=>{let n=new Map;for(let s of t&&t.libraries||[])if(!(!s||!s.id||!Array.isArray(s.icons)))for(let i of s.icons)n.has(i)||n.set(i,s.id);if(!n.size)return null;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return vn("createPrunedLibraryIconLoader"),null;let r=new Map,o=s=>{let i=r.get(s);return i||(i=Promise.resolve().then(()=>wa(s,e)).then(a=>{let c=k(a)&&k(a.designSystem)&&a.designSystem.icons;return k(c)?c:null}),r.set(s,i)),i};return s=>{let i=n.get(s);return i?o(i):null}},Nf=(t,e={})=>{if(!k(t))return!1;let n=t.__libraryIconPrune;if(!k(n))return!1;let r=t.designSystem;if(!k(r)||r.iconsLoader)return!1;let o=tg(n,e);return o?(r.iconsLoader=o,!0):!1}});var Dx,mR=D(()=>{"use strict";Dx=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var be,xa,$f,Ff,yR=D(()=>{"use strict";be=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},xa=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},$f=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return xa(e,{keepOneX:!1})},Ff=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:xa(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=xa(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var Bf={};F(Bf,{BRENDER_REGISTRY_BLOCK:()=>Pf,BRENDER_STAMP_META:()=>Yh,CDN_PROVIDERS:()=>Ze,DESIGN_SYSTEM_BLOCK:()=>If,DESIGN_SYSTEM_DEFERRED:()=>Df,DESIGN_SYSTEM_LINK:()=>Lf,DOMQL_EVENTS:()=>U_,DOMQ_PROPERTIES:()=>Jr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>qi,ENV:()=>fw,HTML_TAGS:()=>ta,LIBRARY_PACKAGES:()=>qh,LIBRARY_SCOPES_KEY:()=>_s,METHODS:()=>Qr,METHODS_EXL:()=>wl,NODE_ENV:()=>wn,OPTIONS:()=>Yl,PACKAGE_MANAGER_TO_CDN:()=>lo,PARSED_DOMQ_PROPERTIES:()=>_l,POLYGLOT_LANG_STORAGE_KEY:()=>Fh,PROPS_METHODS:()=>Zr,REVIVED_MARK:()=>Cl,STATE_DATA_MERGE_EXL:()=>dh,STATE_METHODS:()=>Zo,STATE_PROPERTIES:()=>B_,SVG_TAGS:()=>p1,TYPES:()=>dl,UNIVERSAL_RESERVED_KEYS:()=>$h,__resetBuiltinMethodWarnings:()=>ux,addCaching:()=>ih,addContext:()=>sh,addExtend:()=>Dw,addExtends:()=>Un,addItemAfterEveryElement:()=>v_,addProtoToArray:()=>gl,addRef:()=>nh,alternateLinkKey:()=>xs,applyDependentState:()=>Zw,applyEvent:()=>ph,applyEventUpdate:()=>hh,applyExtends:()=>m1,applyProps:()=>Vl,arrayContainsOtherArray:()=>b_,arraysEqual:()=>C_,arrayzeValue:()=>vs,bareLibraryKey:()=>kf,bindLibraryGlobalScopes:()=>vf,brenderRegistryBlock:()=>yx,brenderStampMeta:()=>wx,buildImgSrcset:()=>$f,buildSourcesAndImg:()=>Ff,cache:()=>rS,call:()=>HS,captureSnapshot:()=>WS,checkForStateTypes:()=>Gw,checkIfInherits:()=>uh,checkIfStringIsInArray:()=>R_,clone:()=>Y_,cloneAndMergeArrayExtend:()=>Il,cloneFunction:()=>yw,collectExtendsList:()=>ea,concatAddExtends:()=>Rw,copyJavaScriptToClipboard:()=>Ax,copyStringToClipboard:()=>vx,createBasedOnType:()=>eh,createElement:()=>qw,createElementExtends:()=>Hp,createExtends:()=>Nl,createExtendsFromKeys:()=>na,createExtendsStack:()=>qp,createIfConditionFlag:()=>bw,createInheritedState:()=>Yw,createKey:()=>Pl,createNestedObject:()=>rw,createNestedObjectByKeyPath:()=>Jw,createObjectWithoutPrototype:()=>Np,createParent:()=>rh,createPath:()=>oh,createProps:()=>Hl,createPropsStack:()=>Qp,createPrunedLibraryIconLoader:()=>tg,createRoot:()=>Kw,createScope:()=>tS,createSnapshotId:()=>Rl,currentPathname:()=>ms,customDecodeURIComponent:()=>F_,customEncodeURIComponent:()=>$_,cutArrayAfterValue:()=>k_,cutArrayBeforeValue:()=>x_,debounce:()=>Dl,debounceOnContext:()=>gw,decodeNewlines:()=>N_,deepClone:()=>pt,deepContains:()=>ew,deepDefaults:()=>ya,deepDestringifyFunctions:()=>ye,deepExtend:()=>Vp,deepMerge:()=>bt,deepMergeExtends:()=>Vn,deepStringifyFunctions:()=>El,defineSetter:()=>US,designSystemBlock:()=>_x,designSystemLink:()=>bx,destringifyGlobalScope:()=>ss,detectHeightOnInit:()=>JS,detectInfiniteLoop:()=>aw,document:()=>kt,encodeNewlines:()=>M_,error:()=>hs,escapeHtml:()=>U,escapeRegExp:()=>P_,excludeKeysFromObject:()=>lw,exec:()=>St,exposeBagGlobalScopes:()=>Af,extendCachedRegistry:()=>Pw,extendStackRegistry:()=>$l,extractArrayExtend:()=>Bl,faviconLinkKey:()=>po,fetchLibraryData:()=>wa,fibonacciNumberByIndex:()=>ZS,fileEntryUrl:()=>Xh,filterArrays:()=>T_,filterArraysFast:()=>O_,finalizeExtends:()=>Gp,findClosestNumber:()=>Jh,findClosestNumberInFactory:()=>Ex,findInheritedState:()=>fh,findKeyPosition:()=>D_,flattenExtend:()=>ra,formatDate:()=>XS,generateHash:()=>Bp,generateHeadArrayTags:()=>Sa,generateKey:()=>Ol,generateMetaTags:()=>xx,get:()=>$S,getCDNDirUrl:()=>Vh,getCDNUrl:()=>En,getCapitalCaseKeys:()=>Nw,getCdnProviderFromConfig:()=>ga,getChildStateInKey:()=>lh,getChildren:()=>jS,getContext:()=>pf,getCookie:()=>kw,getDB:()=>bf,getEmotionStylesheet:()=>Dx,getExtendsInElement:()=>Iw,getExtendsStack:()=>Ml,getExtendsStackRegistry:()=>Up,getFrequencyInArray:()=>__,getFunctionSource:()=>Ie,getHashedExtend:()=>Fl,getImportMapScript:()=>YS,getInObjectByPath:()=>iw,getLocalStorage:()=>vw,getNev:()=>hw,getPageMetadata:()=>kx,getParentStateInKey:()=>ch,getPath:()=>af,getQuery:()=>_f,getRef:()=>BS,getRoot:()=>ff,getRootContext:()=>df,getRootData:()=>uf,getRootState:()=>lf,getRootStateInKey:()=>ah,getSpreadChildren:()=>$w,global:()=>g_,hasFunction:()=>oe,hasHandlerPlugin:()=>Ji,hasOwnProperty:()=>Z_,hashContent:()=>An,inheritChildExtends:()=>Wp,inheritChildPropsExtends:()=>zp,inheritParentProps:()=>zl,inheritRecursiveChildExtends:()=>Kp,initProps:()=>Hw,insertAfterImportMap:()=>Sx,installPrunedLibraryIconLoader:()=>Nf,is:()=>me,isArray:()=>I,isBoolean:()=>Tp,isBuiltinElementMethod:()=>j_,isContextComponent:()=>Fw,isCyclic:()=>cw,isDOMNode:()=>he,isDate:()=>Rp,isDefined:()=>Ut,isDevelopment:()=>eo,isEmpty:()=>Ip,isEmptyObject:()=>Q_,isEqualDeep:()=>Mp,isFailedRevival:()=>rs,isFunction:()=>L,isHtmlElement:()=>fl,isLazyFunction:()=>X_,isLocal:()=>pw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>ys,isMethod:()=>zS,isMobile:()=>Sw,isNode:()=>fr,isNot:()=>y_,isNotProduction:()=>ur,isNull:()=>Op,isNumber:()=>ge,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>QS,isPolyglotRetranslatableKey:()=>Gl,isPolyglotWritableKey:()=>as,isProduction:()=>to,isProtectedElementMethod:()=>Qo,isRevived:()=>os,isStaging:()=>dw,isState:()=>Xw,isString:()=>v,isStringFunction:()=>Xi,isStringTag:()=>Al,isTest:()=>Fp,isTesting:()=>uw,isUndefined:()=>Yt,isUniversallyReservedKey:()=>KS,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>bs,isValidHtmlTag:()=>Cw,isWrappedLibrary:()=>Me,joinArrays:()=>zi,jointStacks:()=>Lw,jsonForScript:()=>ao,keys:()=>Mh,libraryIconPruneReplacer:()=>Lx,libraryIdentifier:()=>Zh,libraryPackageSpecs:()=>ba,librarySpecsFor:()=>Kh,loadCssFile:()=>rx,loadJavascript:()=>ox,loadJavascriptFile:()=>tx,loadJavascriptFileEmbedSync:()=>nx,loadJavascriptFileSync:()=>ex,loadRemoteCSS:()=>sx,loadRemoteScript:()=>ma,log:()=>VS,logGroupIf:()=>ww,logIf:()=>_w,lookdown:()=>MS,lookdownAll:()=>NS,lookup:()=>IS,lowercaseFirstLetter:()=>Jo,makeObjectWithoutPrototype:()=>tw,map:()=>G_,mapStringsWithContextComponents:()=>jl,markPolyglotSeeded:()=>zn,markRevived:()=>Yi,matchesComponentNaming:()=>Hn,memoize:()=>mw,merge:()=>Lt,mergeSharedLibraries:()=>Cf,mergeSharedLibraryDesignSystems:()=>Tf,mergeStateData:()=>ro,nextElement:()=>gf,normalizeIgnoreList:()=>Ef,normalizeLibraryKey:()=>ws,objectToString:()=>vl,objectizeStringProperty:()=>Ul,overwrite:()=>Tl,overwriteDeep:()=>se,overwriteShallow:()=>is,overwriteState:()=>Qw,parse:()=>Nh,parseDeep:()=>of,payloadHasComputedIconName:()=>Qh,pickStartLang:()=>Uh,pickupElementFromProps:()=>Jp,pickupPropsFromElement:()=>Xp,planLibraryIconPrune:()=>Px,polyglotAddressLang:()=>Bh,polyglotFallbackLang:()=>yr,polyglotLangStorageKey:()=>da,polyglotLanguages:()=>kn,polyglotSeededKeys:()=>oo,polyglotStartLang:()=>gs,polyglotStartRule:()=>jh,polyglotStartupScript:()=>qS,previousElement:()=>mf,promoteActiveRootState:()=>fa,propExists:()=>Uw,propertizeElement:()=>Zp,propertizeUpdate:()=>jw,readBrenderStamp:()=>us,readJsonDataBlock:()=>pr,remove:()=>EO,removeChars:()=>Cx,removeCookie:()=>Ew,removeDuplicateProps:()=>Kl,removeDuplicatesInArray:()=>Wi,removeFromArray:()=>w_,removeFromObject:()=>nw,removeNestedKeyByPath:()=>ow,removeValueFromArray:()=>hl,removeValueFromArrayAll:()=>E_,reorderArrayByValues:()=>A_,repairLegacyArrowScopePreamble:()=>Sl,replaceLiteralsWithObjectFields:()=>Xt,replaceOctalEscapeSequences:()=>I_,resolveAsset:()=>be,resolveFileReferences:()=>Es,resolveHandler:()=>Zi,resolveSharedLibraries:()=>Of,returnValueAsText:()=>th,runPluginHook:()=>no,scopeElementParam:()=>Pp,scopeReceiverExpression:()=>W_,self:()=>m_,setActiveRootState:()=>cf,setCookie:()=>xw,setHashedExtend:()=>jp,setInObjectByPath:()=>sw,setLocalStorage:()=>Aw,setNodeStyles:()=>Ih,setProps:()=>FS,setPropsPrototype:()=>Wl,sharedLibrary:()=>fx,sharedLibraryFiles:()=>Ss,splitPackageSpecifier:()=>wf,spotByPath:()=>sf,srcsetFor:()=>xa,stringIncludesAny:()=>yl,stringToObject:()=>J_,stripVersionRangePrefix:()=>Sf,swapItemsInArray:()=>S_,syncProps:()=>ql,themeColorKey:()=>ks,toCamelCase:()=>br,toDashCase:()=>Mf,toDescriptionCase:()=>Ox,toPriorityOrder:()=>Ye,toTitleCase:()=>Tx,toggleFullscreen:()=>GS,triggerEventOn:()=>dr,triggerEventOnUpdate:()=>eS,trimStringFromSymbols:()=>L_,unstackArrayOfObjects:()=>pl,update:()=>Vw,updateProps:()=>zw,variables:()=>yf,verbose:()=>ua,warn:()=>hf,warnLibraryAliasCollision:()=>_a,window:()=>R});var M=D(()=>{"use strict";$p();Ll();Wt();Bn();Qi();Ki();ul();f1();u1();bl();ll();d1();Tw();Mw();Ww();Yp();x1();O1();ts();R1();AO();oS();CO();nS();TO();K_();OO();RO();PO();LO();DO();IO();MO();NO();lR();fR();Gh();gR();Rx();mR();yR()});var Nn,Ud,Vd,hb=D(()=>{Nn=Object.create(null);Nn.open="0";Nn.close="1";Nn.ping="2";Nn.pong="3";Nn.message="4";Nn.upgrade="5";Nn.noop="6";Ud=Object.create(null);Object.keys(Nn).forEach(t=>{Ud[Nn[t]]=t});Vd={type:"error",data:"parser error"}});function BF(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function HF(t,e){if(jF&&t.data instanceof Blob)return t.data.arrayBuffer().then(BF).then(e);if(UF&&(t.data instanceof ArrayBuffer||VF(t.data)))return e(BF(t.data));Hd(t,!1,n=>{yC||(yC=new TextEncoder),e(yC.encode(n))})}var jF,UF,VF,Hd,FF,yC,zF=D(()=>{hb();jF=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",UF=typeof ArrayBuffer=="function",VF=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Hd=({type:t,data:e},n,r)=>jF&&e instanceof Blob?n?r(e):FF(e,r):UF&&(e instanceof ArrayBuffer||VF(e))?n?r(e):FF(new Blob([e]),r):r(Nn[t]+(e||"")),FF=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var WF,zd,KF,qF=D(()=>{WF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<WF.length;t++)zd[WF.charCodeAt(t)]=t;KF=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=zd[t.charCodeAt(r)],i=zd[t.charCodeAt(r+1)],a=zd[t.charCodeAt(r+2)],c=zd[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l}});var hq,Wd,gq,GF,YF=D(()=>{hb();qF();hq=typeof ArrayBuffer=="function",Wd=(t,e)=>{if(typeof t!="string")return{type:"message",data:GF(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:gq(t.substring(1),e)}:Ud[n]?t.length>1?{type:Ud[n],data:t.substring(1)}:{type:Ud[n]}:Vd},gq=(t,e)=>{if(hq){let n=KF(t);return GF(n,e)}else return{base64:!0,data:t}},GF=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function QF(){return new TransformStream({transform(t,e){HF(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}function gb(t){return t.reduce((e,n)=>e+n.length,0)}function mb(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function tB(t,e){bC||(bC=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(gb(n)<1)break;let c=mb(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(gb(n)<2)break;let c=mb(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(gb(n)<8)break;let c=mb(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Vd);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(gb(n)<o)break;let c=mb(n,o);a.enqueue(Wd(s?c:bC.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(Vd);break}}}})}var XF,JF,ZF,bC,_C,Uc=D(()=>{zF();YF();hb();XF="",JF=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Hd(s,!1,a=>{r[i]=a,++o===n&&e(r.join(XF))})})},ZF=(t,e)=>{let n=t.split(XF),r=[];for(let o=0;o<n.length;o++){let s=Wd(n[o],e);if(r.push(s),s.type==="error")break}return r};_C=4});function At(t){if(t)return mq(t)}function mq(t){for(var e in At.prototype)t[e]=At.prototype[e];return t}var ki=D(()=>{At.prototype.on=At.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};At.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};At.prototype.off=At.prototype.removeListener=At.prototype.removeAllListeners=At.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};At.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};At.prototype.emitReserved=At.prototype.emit;At.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};At.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var zr,de,eB,Ei=D(()=>{zr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),de=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),eB="arraybuffer"});function yb(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function Wr(t,e){e.useNativeTimers?(t.setTimeoutFn=yq.bind(de),t.clearTimeoutFn=bq.bind(de)):(t.setTimeoutFn=de.setTimeout.bind(de),t.clearTimeoutFn=de.clearTimeout.bind(de))}function nB(t){return typeof t=="string"?wq(t):Math.ceil((t.byteLength||t.size)*_q)}function wq(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function bb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var yq,bq,_q,vi=D(()=>{Ei();yq=de.setTimeout,bq=de.clearTimeout;_q=1.33});function rB(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function oB(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var wC=D(()=>{});var _b,Kr,Kd=D(()=>{Uc();ki();vi();wC();_b=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Kr=class extends At{constructor(e){super(),this.writable=!1,Wr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new _b(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Wd(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=rB(e);return n.length?"?"+n:""}}});var Vc,SC=D(()=>{Kd();vi();Uc();Vc=class extends Kr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};ZF(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,JF(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=bb()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var sB,iB,aB=D(()=>{sB=!1;try{sB=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}iB=sB});function Sq(){}function cB(){for(let t in zo.requests)zo.requests.hasOwnProperty(t)&&zo.requests[t].abort()}function lB(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||iB))return new XMLHttpRequest}catch{}if(!e)try{return new de[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var xC,zo,xq,qr,wb=D(()=>{SC();ki();vi();Ei();aB();xC=class extends Vc{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},zo=class t extends At{constructor(e,n,r){super(),this.createRequest=e,Wr(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=yb(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Sq,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};zo.requestsCount=0;zo.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cB);else if(typeof addEventListener=="function"){let t="onpagehide"in de?"pagehide":"unload";addEventListener(t,cB,!1)}}xq=(function(){let t=lB({xdomain:!1});return t&&t.responseType!==null})(),qr=class extends xC{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=xq&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new zo(lB,this.uri(),e)}}});var fB,EC,kC,Gr,Sb=D(()=>{Kd();vi();Uc();Ei();fB=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",EC=class extends Kr{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=fB?{}:yb(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;Hd(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&zr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=bb()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},kC=de.WebSocket||de.MozWebSocket,Gr=class extends EC{createSocket(e,n,r){return fB?new kC(e,n,r):n?new kC(e,n):new kC(e)}doWrite(e,n){this.ws.send(n)}}});var Ai,vC=D(()=>{Kd();Ei();Uc();Ai=class extends Kr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=tB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=QF();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&zr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var AC,CC=D(()=>{wb();Sb();vC();AC={websocket:Gr,webtransport:Ai,polling:qr}});function Hc(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=kq.exec(t||""),s={},i=14;for(;i--;)s[Eq[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=vq(s,s.path),s.queryKey=Aq(s,s.query),s}function vq(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Aq(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var kq,Eq,TC=D(()=>{kq=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Eq=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var OC,xb,Ci,kb,zc,RC=D(()=>{CC();vi();wC();TC();ki();Uc();Ei();OC=typeof addEventListener=="function"&&typeof removeEventListener=="function",xb=[];OC&&addEventListener("offline",()=>{xb.forEach(t=>t())},!1);Ci=class t extends At{constructor(e,n){if(super(),this.binaryType=eB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=Hc(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Hc(n.host).host);Wr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=oB(this.opts.query)),OC&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},xb.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=_C,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=nB(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,zr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),OC&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=xb.indexOf(this._offlineEventListener);r!==-1&&xb.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};Ci.protocol=_C;kb=class extends Ci{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Ci.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ci.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},zc=class extends kb{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>AC[o]).filter(o=>!!o)),super(e,r)}}});var qd,uB=D(()=>{SC();qd=class extends Vc{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(n=>this.onData(n))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,n){this._fetch(e).then(r=>{if(!r.ok)return this.onError("fetch write error",r.status,r);n()}).catch(r=>{this.onError("fetch write error",r)})}_fetch(e){var n;let r=e!==void 0,o=new Headers(this.opts.extraHeaders);return r&&o.set("content-type","text/plain;charset=UTF-8"),(n=this.socket._cookieJar)===null||n===void 0||n.appendCookies(o),fetch(this.uri(),{method:r?"POST":"GET",body:r?e:null,headers:o,credentials:this.opts.withCredentials?"include":"omit"}).then(s=>{var i;return(i=this.socket._cookieJar)===null||i===void 0||i.parseCookies(s.headers.getSetCookie()),s})}}});var ypt,Eb=D(()=>{RC();RC();Kd();CC();vi();TC();Ei();uB();wb();wb();Sb();Sb();vC();ypt=zc.protocol});function dB(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Hc(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var pB=D(()=>{Eb()});function Yd(t){return Cq&&(t instanceof ArrayBuffer||Tq(t))||Oq&&t instanceof Blob||Rq&&t instanceof File}function Gd(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Gd(t[n]))return!0;return!1}if(Yd(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Gd(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Gd(t[n]))return!0;return!1}var Cq,Tq,hB,Oq,Rq,PC=D(()=>{Cq=typeof ArrayBuffer=="function",Tq=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,hB=Object.prototype.toString,Oq=typeof Blob=="function"||typeof Blob<"u"&&hB.call(Blob)==="[object BlobConstructor]",Rq=typeof File=="function"||typeof File<"u"&&hB.call(File)==="[object FileConstructor]"});function gB(t){let e=[],n=t.data,r=t;return r.data=LC(n,e),r.attachments=e.length,{packet:r,buffers:e}}function LC(t,e){if(!t)return t;if(Yd(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=LC(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=LC(t[r],e));return n}return t}function mB(t,e){return t.data=DC(t.data,e),delete t.attachments,t}function DC(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=DC(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=DC(t[n],e));return t}var yB=D(()=>{PC()});var _B=Yb((Npt,bB)=>{var Wc=1e3,Kc=Wc*60,qc=Kc*60,Ti=qc*24,Pq=Ti*7,Lq=Ti*365.25;bB.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Dq(t);if(n==="number"&&isFinite(t))return e.long?Mq(t):Iq(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Dq(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Lq;case"weeks":case"week":case"w":return n*Pq;case"days":case"day":case"d":return n*Ti;case"hours":case"hour":case"hrs":case"hr":case"h":return n*qc;case"minutes":case"minute":case"mins":case"min":case"m":return n*Kc;case"seconds":case"second":case"secs":case"sec":case"s":return n*Wc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Iq(t){var e=Math.abs(t);return e>=Ti?Math.round(t/Ti)+"d":e>=qc?Math.round(t/qc)+"h":e>=Kc?Math.round(t/Kc)+"m":e>=Wc?Math.round(t/Wc)+"s":t+"ms"}function Mq(t){var e=Math.abs(t);return e>=Ti?vb(t,e,Ti,"day"):e>=qc?vb(t,e,qc,"hour"):e>=Kc?vb(t,e,Kc,"minute"):e>=Wc?vb(t,e,Wc,"second"):t+" ms"}function vb(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var SB=Yb(($pt,wB)=>{function Nq(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=_B(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,p,g;function h(...m){if(!h.enabled)return;let y=h,x=Number(new Date),E=x-(u||x);y.diff=E,y.prev=u,y.curr=x,u=x,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let C=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(b,w)=>{if(b==="%%")return"%";C++;let S=n.formatters[w];if(typeof S=="function"){let A=m[C];b=S.call(y,A),m.splice(C,1),C--}return b}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return h.namespace=f,h.useColors=n.useColors(),h.color=n.selectColor(f),h.extend=r,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==n.namespaces&&(p=n.namespaces,g=n.enabled(f)),g),set:m=>{d=m}}),typeof n.init=="function"&&n.init(h),h}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,p=0,g=-1,h=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(g=p,h=d,p++):(d++,p++);else if(g!==-1)p=g+1,h++,d=h;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}wB.exports=Nq});var xB=Yb((Oe,Ab)=>{Oe.formatArgs=Fq;Oe.save=Bq;Oe.load=jq;Oe.useColors=$q;Oe.storage=Uq();Oe.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Oe.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function $q(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Fq(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ab.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}Oe.log=console.debug||console.log||(()=>{});function Bq(t){try{t?Oe.storage.setItem("debug",t):Oe.storage.removeItem("debug")}catch{}}function jq(){let t;try{t=Oe.storage.getItem("debug")||Oe.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Uq(){try{return localStorage}catch{}}Ab.exports=SB()(Oe);var{formatters:Vq}=Ab.exports;Vq.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var BC={};F(BC,{Decoder:()=>NC,Encoder:()=>MC,PacketType:()=>et,isPacketValid:()=>Kq,protocol:()=>FC});function Hq(t){return typeof t=="string"}function zq(t){return t===void 0||vB(t)}function Cb(t){return Object.prototype.toString.call(t)==="[object Object]"}function Wq(t,e){switch(t){case et.CONNECT:return e===void 0||Cb(e);case et.DISCONNECT:return e===void 0;case et.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&EB.indexOf(e[0])===-1);case et.ACK:return Array.isArray(e);case et.CONNECT_ERROR:return typeof e=="string"||Cb(e);default:return!1}}function Kq(t){return Hq(t.nsp)&&zq(t.id)&&Wq(t.type,t.data)}var kB,IC,EB,FC,et,MC,NC,$C,vB,Tb=D(()=>{ki();yB();PC();kB=PT(xB(),1),IC=(0,kB.default)("socket.io-parser"),EB=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],FC=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));MC=class{constructor(e){this.replacer=e}encode(e){return IC("encoding packet %j",e),(e.type===et.EVENT||e.type===et.ACK)&&Gd(e)?this.encodeAsBinary({type:e.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===et.BINARY_EVENT||e.type===et.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),IC("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=gB(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},NC=class t extends At{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new $C(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Yd(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!vB(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return IC("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case et.CONNECT:return Cb(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||Cb(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&EB.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},$C=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=mB(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};vB=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function ze(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var jC=D(()=>{});var qq,Oi,UC=D(()=>{Tb();jC();ki();qq=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Oi=class extends At{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[ze(e,"open",this.onopen.bind(this)),ze(e,"packet",this.onpacket.bind(this)),ze(e,"error",this.onerror.bind(this)),ze(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(qq.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:et.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case et.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(e);break;case et.ACK:case et.BINARY_ACK:this.onack(e);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:et.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}}});function Ri(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}var AB=D(()=>{Ri.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Ri.prototype.reset=function(){this.attempts=0};Ri.prototype.setMin=function(t){this.ms=t};Ri.prototype.setMax=function(t){this.max=t};Ri.prototype.setJitter=function(t){this.jitter=t}});var Pi,CB=D(()=>{Eb();UC();Tb();jC();AB();ki();Pi=class extends At{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Wr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ri({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||BC;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new zc(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=ze(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=ze(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(ze(e,"ping",this.onping.bind(this)),ze(e,"data",this.ondata.bind(this)),ze(e,"error",this.onerror.bind(this)),ze(e,"close",this.onclose.bind(this)),ze(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){zr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Oi(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});var TB={};F(TB,{Fetch:()=>qd,Manager:()=>Pi,NodeWebSocket:()=>Gr,NodeXHR:()=>qr,Socket:()=>Oi,WebSocket:()=>Gr,WebTransport:()=>Ai,XHR:()=>qr,connect:()=>Ob,default:()=>Ob,io:()=>Ob,protocol:()=>FC});function Ob(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=dB(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Xd[o]&&s in Xd[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Pi(r,e):(Xd[o]||(Xd[o]=new Pi(r,e)),c=Xd[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Xd,OB=D(()=>{pB();CB();UC();Tb();Eb();Xd={};Object.assign(Ob,{Manager:Pi,Socket:Oi,io:Ob,connect:Ob})});var OT={};F(OT,{ANIMATION_PROPS:()=>bk,ARIA_ROLES:()=>fz,ATTR_TRANSFORMS:()=>To,BARE_SEQUENCE_TOKEN_RE:()=>On,BLOCK_PROPS:()=>_k,BREAKPOINTS_CONTAINER_NAME:()=>nL,BREAKPOINT_PROPS:()=>Ck,BRENDER_REGISTRY_BLOCK:()=>Pf,BRENDER_STAMP_META:()=>Yh,CDN_PROVIDERS:()=>Ze,COMPOUND_CSS_KEYWORDS:()=>Cs,CONFIG:()=>Ps,CONFIG_MERGE_EXL:()=>ie,CSS_LONGHAND_SHORTHANDS:()=>sn,CSS_NAMED_COLOR_HEX:()=>Ea,CSS_NATIVE_COLOR_REGEX:()=>_r,CSS_PROPS_REGISTRY:()=>xt,CSS_SHORTHAND_LONGHANDS:()=>vt,CSS_UNITS:()=>Hi,DEFAULT_CONFIG:()=>si,DEFAULT_CSS_PROPERTIES_LIST:()=>Bt,DELEGATED_EVENTS:()=>Ja,DESIGN_SYSTEM_BLOCK:()=>If,DESIGN_SYSTEM_DEFERRED:()=>Df,DESIGN_SYSTEM_LINK:()=>Lf,DESIGN_SYSTEM_OPTIONS:()=>QC,DOMQL_EVENTS:()=>U_,DOMQ_PROPERTIES:()=>Jr,DOM_EVENTS:()=>WL,ELEMENT_METHOD_OVERRIDE_POINTS:()=>qi,ENV:()=>fw,FACTORY:()=>Ne,FLEX_PROPS:()=>Ek,FONT_PROPS:()=>wk,GRID_PROPS:()=>vk,HOST_REGISTERED_PACKAGES:()=>x3,HTML_ATTRIBUTES:()=>Mr,HTML_TAGS:()=>ta,LIBRARY_PACKAGES:()=>qh,LIBRARY_SCOPES_KEY:()=>_s,LIFECYCLE_EVENTS:()=>Yn,LIVE_KEYS:()=>F0,METHODS:()=>Qr,METHODS_EXL:()=>wl,MISC_PROPS:()=>Sk,MIXINS:()=>Qg,NODE_ENV:()=>wn,OPTIONS:()=>Yl,PACKAGE_MANAGER_TO_CDN:()=>lo,PARSED_DOMQ_PROPERTIES:()=>_l,POLYGLOT_LANG_STORAGE_KEY:()=>Fh,POSITION_PROPS:()=>xk,PREPARED_FORMAT:()=>Ha,PROPS_METHODS:()=>Zr,REGISTRY:()=>qt,RESERVED_STORE_METHODS:()=>VT,REVIVED_MARK:()=>Cl,ROUTER_OPTIONS:()=>Nb,SIGNAL_ENGINE_KEY:()=>Ui,SIGNAL_INSTANCES_KEY:()=>Bi,STANDARD_SCHEME_QUERIES:()=>vg,STATE_DATA_MERGE_EXL:()=>dh,STATE_PROPERTIES:()=>B_,STORE_METHOD_NAMES:()=>UT,SVG_TAGS:()=>oc,THEME_PROPS:()=>kk,TILING_POSITION_KEYWORDS:()=>Au,TILING_SIZE_KEYWORDS:()=>vu,TIMING_PROPS:()=>Uu,TYPES:()=>dl,UNIVERSAL_RESERVED_KEYS:()=>$h,VALUE_TRANSFORMERS:()=>Fg,VERSION:()=>zT,__resetBuiltinMethodWarnings:()=>ux,__resetSignalEngine:()=>p_,__resetSignalInstances:()=>u_,__resetSkinWarnings:()=>I0,__resetStateShadowWarnings:()=>HT,activateConfig:()=>xR,addCaching:()=>ih,addContext:()=>sh,addDelegatedEvent:()=>$u,addExtend:()=>Dw,addExtends:()=>Un,addItemAfterEveryElement:()=>v_,addMethods:()=>cc,addProtoToArray:()=>gl,addRef:()=>nh,adoptPrepared:()=>wA,aliasCaseVariants:()=>La,alternateLinkKey:()=>xs,animation:()=>o0,appendSVGSprite:()=>Su,appendSvgIconsSprite:()=>Vs,applyAttrTransforms:()=>Zk,applyCSS:()=>xA,applyDependentState:()=>Zw,applyDocument:()=>wu,applyEvent:()=>ph,applyEventUpdate:()=>hh,applyExtends:()=>ec,applyHeadings:()=>Rg,applyInitialState:()=>bm,applyMediaSequenceVars:()=>yo,applyProps:()=>Vl,applyReset:()=>xu,applySequenceGlobalVars:()=>ru,applySequenceVars:()=>vr,applySkins:()=>ku,applySpacingSequence:()=>cu,applyStateMethods:()=>ve,applyThemeRoot:()=>Ou,applyTimingSequence:()=>_u,applyTrueProps:()=>Lk,applyTypographySequence:()=>mu,arrayContainsOtherArray:()=>b_,arraysEqual:()=>C_,arrayzeValue:()=>vs,assertEmitIntegrity:()=>nk,atSchemes:()=>wo,bareLibraryKey:()=>kf,batch:()=>kp,bindLibraryGlobalScopes:()=>vf,breakpoints:()=>n0,breakpointsContainerName:()=>um,brenderRegistryBlock:()=>yx,brenderStampMeta:()=>wx,buildImgSrcset:()=>$f,buildSkinVarStyles:()=>Hs,buildSourcesAndImg:()=>Ff,buildThemeVarStyles:()=>xy,cache:()=>rS,cacheNode:()=>Ao,call:()=>HS,callStateMethod:()=>qu,camelToAttr:()=>Nr,camelToLowerAttr:()=>YL,captureSnapshot:()=>WS,changeGlobalTheme:()=>Bg,changeLightness:()=>Bx,checkAttributeByTagName:()=>dn,checkEventFunctions:()=>Jk,checkForStateTypes:()=>Gw,checkIfBoxSize:()=>au,checkIfInherits:()=>uh,checkIfStringIsInArray:()=>R_,class:()=>l0,clone:()=>Y_,cloneAndMergeArrayExtend:()=>Il,cloneFunction:()=>yw,collectExtendsList:()=>ea,color:()=>Yx,colorPairSchemes:()=>iu,colorStringToRgbaArray:()=>Qe,components:()=>Rc,compositeOverBackdrop:()=>Os,compoundLayers:()=>Aa,concatAddExtends:()=>Rw,containerBreakpointQuery:()=>Ak,contrastRatio:()=>Ta,convertSvgToSymbol:()=>su,copyJavaScriptToClipboard:()=>Ax,copyStringToClipboard:()=>vx,countUntrackedReads:()=>vp,create:()=>vT,createAsync:()=>cX,createBasedOnType:()=>eh,createComputed:()=>BT,createConfig:()=>Xf,createDefine:()=>fj,createDomqlElement:()=>ap,createEffect:()=>K,createElement:()=>qw,createElementExtends:()=>Hp,createExtends:()=>Nl,createExtendsFromKeys:()=>na,createExtendsStack:()=>qp,createHTMLNode:()=>rc,createIfConditionFlag:()=>bw,createInheritedState:()=>Yw,createKey:()=>Pl,createNestedObject:()=>rw,createNestedObjectByKeyPath:()=>Jw,createObjectWithoutPrototype:()=>Np,createParent:()=>rh,createPath:()=>oh,createPristineConfig:()=>Sg,createProps:()=>Hl,createPropsStack:()=>Qp,createPrunedLibraryIconLoader:()=>tg,createRoot:()=>Kw,createScope:()=>tS,createScopeStore:()=>Ap,createSignal:()=>_n,createSkeleton:()=>fX,createSnapshotId:()=>Rl,createState:()=>Wk,createStore:()=>ar,createSync:()=>lX,css:()=>je,cssCamelName:()=>Iu,cssMediaVars:()=>_g,cssPropName:()=>ke,cssShorthandDepth:()=>za,cssShorthandStatesLonghand:()=>Wa,cssShorthandStatesThemeLonghand:()=>Ru,cssVars:()=>bg,currentPathname:()=>ms,customDecodeURIComponent:()=>F_,customEncodeURIComponent:()=>$_,cutArrayAfterValue:()=>k_,cutArrayBeforeValue:()=>x_,debounce:()=>Dl,debounceOnContext:()=>gw,decodeNewlines:()=>N_,deepClone:()=>pt,deepContains:()=>ew,deepDefaults:()=>ya,deepDestringifyFunctions:()=>ye,deepExtend:()=>Vp,deepMerge:()=>bt,deepMergeExtends:()=>Vn,deepStringifyFunctions:()=>El,defaultDefine:()=>Yc,defineResolvedThemeSignal:()=>mo,defineSetter:()=>US,defineThemeSignal:()=>go,designSystemBlock:()=>_x,designSystemLink:()=>bx,destringifyGlobalScope:()=>ss,destroy:()=>Li,detectHeightOnInit:()=>JS,detectInfiniteLoop:()=>aw,detectTag:()=>Jn,devices:()=>r0,dispose:()=>un,effectiveGlobalTheme:()=>ky,encodeNewlines:()=>M_,error:()=>hs,escapeHtml:()=>U,escapeRegExp:()=>P_,excludeKeysFromObject:()=>lw,exec:()=>St,executeAttr:()=>_z,exetuteClassPerComponent:()=>VH,exposeBagGlobalScopes:()=>Af,extendCachedRegistry:()=>Pw,extendStackRegistry:()=>$l,extractArrayExtend:()=>Bl,extractConditionalAttrs:()=>Qk,faviconLinkKey:()=>po,fetchLibraryData:()=>wa,fibonacciNumberByIndex:()=>ZS,fileEntryUrl:()=>Xh,filterArrays:()=>T_,filterArraysFast:()=>O_,filterAttributesByTagName:()=>bz,finalizeExtends:()=>Gp,findClosestNumber:()=>Jh,findClosestNumberInFactory:()=>Ex,findHeadingLetter:()=>kg,findHeadings:()=>nu,findInheritedState:()=>fh,findKeyPosition:()=>D_,flattenExtend:()=>ra,font:()=>Hx,fontFace:()=>Kx,fontFamily:()=>zx,fontFamilyTypes:()=>Wx,forcedScheme:()=>Fs,formatDate:()=>XS,generateHash:()=>Bp,generateHeadArrayTags:()=>Sa,generateKey:()=>Ol,generateMetaTags:()=>xx,generateSequence:()=>_e,generateSequencePosition:()=>b0,generateSprite:()=>ou,generateSubSequence:()=>tu,get:()=>$S,getActiveConfig:()=>P,getActiveDocument:()=>Gn,getActiveLang:()=>$i,getCDNDirUrl:()=>Vh,getCDNUrl:()=>En,getCacheSize:()=>ak,getCapitalCaseKeys:()=>Nw,getCdnProviderFromConfig:()=>ga,getChildStateInKey:()=>lh,getChildren:()=>jS,getColor:()=>dt,getColorShade:()=>sg,getContext:()=>pf,getCookie:()=>kw,getDB:()=>bf,getDefaultOrFirstKey:()=>Sr,getEmitStats:()=>Jg,getEmotionStylesheet:()=>Dx,getExtendsInElement:()=>Iw,getExtendsStack:()=>Ml,getExtendsStackRegistry:()=>Up,getFnPrefixAndValue:()=>Er,getFontFace:()=>Ux,getFontFaceEach:()=>Rs,getFontFaceEachString:()=>hg,getFontFaceString:()=>Wf,getFontFamily:()=>gu,getFontFormat:()=>dg,getFontSizeByKey:()=>yu,getFrequencyInArray:()=>__,getFunctionSource:()=>Ie,getHashedExtend:()=>Fl,getImportMapScript:()=>YS,getInObjectByPath:()=>iw,getLanguages:()=>tp,getLocalStateLang:()=>op,getLocalStorage:()=>vw,getMediaBorder:()=>uu,getMediaColor:()=>Kt,getMediaTheme:()=>on,getNev:()=>hw,getObserver:()=>De,getPageMetadata:()=>kx,getParentStateInKey:()=>ch,getPath:()=>af,getPendingLang:()=>Qd,getQuery:()=>_f,getRef:()=>BS,getResolvedThemeSignal:()=>SR,getRgbTone:()=>Tn,getRoot:()=>ff,getRootContext:()=>df,getRootData:()=>uf,getRootState:()=>lf,getRootStateInKey:()=>ah,getSafeInk:()=>Tg,getSafeInkInfo:()=>E0,getSequenceValue:()=>Ls,getSequenceValueBySymbols:()=>eu,getSequenceValuePropertyPair:()=>qn,getShadow:()=>fu,getShapeByKey:()=>bu,getSignals:()=>jT,getSizeValue:()=>Da,getSpacingBasedOnRatio:()=>$e,getSpacingByKey:()=>Vt,getSpreadChildren:()=>$w,getSubratio:()=>Qf,getSubratioDifference:()=>Zf,getSystemGlobalTheme:()=>le,getTheme:()=>T0,getThemeSignal:()=>wR,getTimingByKey:()=>we,getTimingFunction:()=>Fe,global:()=>g_,gradient:()=>Xx,grid:()=>c0,hasFunction:()=>oe,hasHandlerPlugin:()=>Ji,hasOwnProperty:()=>Z_,hashContent:()=>An,hexToRgb:()=>Mx,hexToRgbArray:()=>eg,hexToRgba:()=>$x,hslToRgb:()=>og,icons:()=>Qx,inForcedColors:()=>Ds,inheritChildExtends:()=>Wp,inheritChildPropsExtends:()=>zp,inheritParentProps:()=>zl,inheritRecursiveChildExtends:()=>Kp,init:()=>ir,initPolyglot:()=>Bb,initProps:()=>Hw,injectGlobal:()=>Ot,insertAfterImportMap:()=>Sx,installPrunedLibraryIconLoader:()=>Nf,is:()=>me,isArray:()=>I,isBoolean:()=>Tp,isBuiltinElementMethod:()=>j_,isCSSVar:()=>Ft,isContextComponent:()=>Fw,isCyclic:()=>cw,isDOMNode:()=>he,isDate:()=>Rp,isDefined:()=>Ut,isDevelopment:()=>eo,isDomDocument:()=>cr,isEmpty:()=>Ip,isEmptyObject:()=>Q_,isEnumeratedTrueFalseAttr:()=>Qs,isEqualDeep:()=>Mp,isFailedRevival:()=>rs,isForcedColorsQuery:()=>Is,isFunction:()=>L,isGoogleFontsUrl:()=>Oa,isHostObject:()=>lr,isHtmlElement:()=>fl,isInertCompoundValue:()=>ag,isIntendedSystemColorWord:()=>Ms,isLazyFunction:()=>X_,isLocal:()=>pw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>ys,isMethod:()=>zS,isMobile:()=>Sw,isNativeColorToken:()=>Ts,isNode:()=>fr,isNot:()=>y_,isNotProduction:()=>ur,isNull:()=>Op,isNumber:()=>ge,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>QS,isPlainColor:()=>_o,isPolyglotRetranslatableKey:()=>Gl,isPolyglotWritableKey:()=>as,isProduction:()=>to,isProtectedElementMethod:()=>Qo,isRawUnitValue:()=>cl,isResolvedColor:()=>tn,isRevived:()=>os,isScalingUnit:()=>Xo,isStaging:()=>dw,isState:()=>Xw,isStore:()=>Et,isString:()=>v,isStringFunction:()=>Xi,isStringTag:()=>Al,isSvgTag:()=>Ir,isTest:()=>Fp,isTesting:()=>uw,isTracking:()=>qk,isUndefined:()=>Yt,isUniversallyReservedKey:()=>KS,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>bs,isValidHtmlTag:()=>Cw,isValidTag:()=>nc,isWasmLoaded:()=>A2,isWrappedLibrary:()=>Me,isWritableFamilyBucket:()=>h_,joinArrays:()=>zi,joinCompoundLayers:()=>Ca,jointStacks:()=>Lw,jsonForScript:()=>ao,keyframes:()=>Xa,keys:()=>Mh,libraryIconPruneReplacer:()=>Lx,libraryIdentifier:()=>Zh,libraryPackageSpecs:()=>ba,librarySpecsFor:()=>Kh,linearChannelToSrgb:()=>lg,literalPairCompound:()=>Bs,literalSchemeMap:()=>Cr,loadCssFile:()=>rx,loadJavascript:()=>ox,loadJavascriptFile:()=>tx,loadJavascriptFileEmbedSync:()=>nx,loadJavascriptFileSync:()=>ex,loadRemoteCSS:()=>sx,loadRemoteScript:()=>ma,loadTranslations:()=>Ni,loadWasm:()=>v2,log:()=>VS,logGroupIf:()=>ww,logIf:()=>_w,lookdown:()=>MS,lookdownAll:()=>NS,lookup:()=>IS,lowercaseFirstLetter:()=>Jo,makeObjectWithoutPrototype:()=>tw,map:()=>G_,mapStringsWithContextComponents:()=>jl,markPolyglotSeeded:()=>zn,markRevived:()=>Yi,matchesComponentNaming:()=>Hn,media:()=>qx,memoize:()=>mw,merge:()=>Lt,mergeSharedLibraries:()=>Cf,mergeSharedLibraryDesignSystems:()=>Tf,mergeStateData:()=>ro,mixTwoColors:()=>Ix,mixTwoRgb:()=>Fx,mixTwoRgba:()=>ig,nextElement:()=>gf,normalizeIgnoreList:()=>Ef,normalizeLibraryKey:()=>ws,numToLetterMap:()=>nn,objectToString:()=>vl,objectizeStringProperty:()=>Ul,oklabToLinearSrgb:()=>fg,oklabToOklch:()=>Vf,oklchToGamutSafeSrgb:()=>Hf,oklchToOklab:()=>ug,opacify:()=>va,overwrite:()=>Tl,overwriteDeep:()=>se,overwriteShallow:()=>is,overwriteState:()=>Qw,parkHostObject:()=>Xr,parse:()=>Nh,parseColorToken:()=>Qt,parseDeep:()=>of,payloadHasComputedIconName:()=>Qh,pickStartLang:()=>Uh,pickupElementFromProps:()=>Jp,pickupPropsFromElement:()=>Xp,planLibraryIconPrune:()=>Px,polyglotAddressLang:()=>Bh,polyglotFallbackLang:()=>yr,polyglotFunctions:()=>sp,polyglotLangStorageKey:()=>da,polyglotLanguages:()=>kn,polyglotPlugin:()=>Zc,polyglotSeededKeys:()=>oo,polyglotStartLang:()=>gs,polyglotStartRule:()=>jh,polyglotStartupScript:()=>qS,popConfig:()=>ht,popStaticCssPass:()=>fm,prepareContext:()=>kT,previousElement:()=>mf,promoteActiveRootState:()=>fa,propExists:()=>Uw,propertizeElement:()=>Zp,propertizeUpdate:()=>jw,pushConfig:()=>mt,pushStaticCssPass:()=>lm,quietColorProbe:()=>Ns,quietSequenceProbe:()=>kr,readBrenderStamp:()=>us,readJsonDataBlock:()=>pr,recordRules:()=>Mu,refreshContextProto:()=>lc,registerEvent:()=>Qa,registerHostPackages:()=>k3,registerSignalInstance:()=>ji,reinit:()=>SA,relativeLuminance:()=>As,remove:()=>ac,removeChars:()=>Cx,removeCookie:()=>Ew,removeDelegatedEvent:()=>Fu,removeDuplicateProps:()=>Kl,removeDuplicatesInArray:()=>Wi,removeFromArray:()=>w_,removeFromObject:()=>nw,removeNestedKeyByPath:()=>ow,removeValueFromArray:()=>hl,removeValueFromArrayAll:()=>E_,reorderArrayByValues:()=>A_,repairLegacyArrowScopePreamble:()=>Sl,replaceLiteralsWithObjectFields:()=>Xt,replaceOctalEscapeSequences:()=>I_,replayRules:()=>Nu,resetEmitStats:()=>ek,resolveAsset:()=>be,resolveBorderValue:()=>ae,resolveColorRgb:()=>$s,resolveColorsInGradient:()=>xo,resolveCompoundWords:()=>wr,resolveConfigDocument:()=>Vi,resolveDesignSystemClass:()=>fL,resolveFileReferences:()=>Es,resolveFileSource:()=>Xk,resolveFileUrl:()=>en,resolveGridTracks:()=>eL,resolveHandler:()=>Zi,resolvePropValue:()=>Co,resolveShadowNonColorWord:()=>Ma,resolveShadowValue:()=>js,resolveSharedLibraries:()=>Of,resolveStyleBlockTokens:()=>Ik,returnSubThemeOrDefault:()=>jx,returnValueAsText:()=>th,reviveConfig:()=>Vg,rgbArrayToHex:()=>ng,rgbToHSL:()=>rg,rgbToHex:()=>Nx,runPluginHook:()=>no,runThroughMedia:()=>Og,schemeGuardSelector:()=>Cg,schemeMediaQuery:()=>Ag,scopeElementParam:()=>Pp,scopeReceiverExpression:()=>W_,scratchDefaultConfig:()=>Pa,scratchSystem:()=>Ba,scratchUtils:()=>bo,self:()=>m_,semanticIcons:()=>t0,sequence:()=>xr,serializeAttrValue:()=>tr,serializeConfig:()=>Ug,set:()=>Ws,setActiveConfig:()=>wg,setActiveDocument:()=>tk,setActiveRootState:()=>cf,setAdaptiveSchemeVar:()=>So,setClass:()=>VK,setClassname:()=>HH,setColor:()=>Ar,setCookie:()=>xw,setCssEngineHook:()=>Sy,setCustomFont:()=>zf,setCustomFontMedia:()=>ho,setEach:()=>Tu,setFont:()=>hu,setFontFamily:()=>$a,setFontImport:()=>Ra,setGradient:()=>Ia,setHashedExtend:()=>jp,setInCustomFontMedia:()=>pg,setInObjectByPath:()=>sw,setLang:()=>np,setLocalStorage:()=>Aw,setMediaTheme:()=>Na,setNodeStyles:()=>Ih,setObserver:()=>il,setProps:()=>FS,setPropsPrototype:()=>Wl,setSVG:()=>Fa,setScalingVar:()=>Jf,setShadow:()=>ko,setSubScalingVar:()=>xg,setSvgIcon:()=>Us,setTheme:()=>du,setValue:()=>$0,setVariables:()=>_0,setWasmEngine:()=>Du,settled:()=>Ep,shadow:()=>Zx,shape:()=>d0,sharedLibrary:()=>fx,sharedLibraryFiles:()=>Ss,sizes:()=>u0,skins:()=>p0,spacing:()=>Gx,splitCompoundWords:()=>jf,splitPackageSpecifier:()=>wf,splitSelectorList:()=>Lr,splitSpacedValue:()=>lu,splitTopLevelCommas:()=>Cn,splitTopLevelSpaces:()=>ut,splitTransition:()=>$g,spotByPath:()=>sf,srcsetFor:()=>xa,srgbChannelToLinear:()=>cg,srgbToOklab:()=>Uf,stringIncludesAny:()=>yl,stringToObject:()=>J_,stripVersionRangePrefix:()=>Sf,svg:()=>s0,svgData:()=>gg,svg_data:()=>i0,swapItemsInArray:()=>S_,syncProps:()=>ql,templates:()=>a0,theme:()=>Jx,themeColorKey:()=>ks,timing:()=>e0,toCamel:()=>Yf,toCamelCase:()=>br,toDashCase:()=>Mf,toDescriptionCase:()=>Ox,toLinearChannel:()=>ka,toPriorityOrder:()=>Ye,toTitleCase:()=>Tx,toggleFullscreen:()=>GS,transformBackgroundImage:()=>Ig,transformBorder:()=>Pg,transformBorderRadius:()=>Tr,transformBoxShadow:()=>Eu,transformClassname:()=>dL,transformDuration:()=>Cu,transformGridTemplate:()=>Ng,transformShadow:()=>Dg,transformSize:()=>Nt,transformSizeRatio:()=>j,transformTextStroke:()=>Lg,transformTilingValue:()=>zs,transformTransition:()=>N0,transformersByPrefix:()=>Dk,transfromGap:()=>Mg,translate:()=>ep,triggerEventOn:()=>dr,triggerEventOnUpdate:()=>eS,trimStringFromSymbols:()=>L_,typography:()=>Kf,unit:()=>Vx,unstackArrayOfObjects:()=>pl,untrack:()=>Yo,update:()=>ic,updateProps:()=>zw,updateVars:()=>UK,upsertTranslation:()=>rp,useCssInProps:()=>te,useHostState:()=>Kk,usePropsAsCSS:()=>lL,useSelectorsAsCSS:()=>uL,variables:()=>yf,vars:()=>f0,verbose:()=>ua,viewTransition:()=>h0,warn:()=>hf,warnLibraryAliasCollision:()=>_a,warnStateKeyShadowsMethod:()=>Cp,window:()=>R,wrapHoverRule:()=>Pr});module.exports=z3(OT);Mt();var Zg={};F(Zg,{CSS_LONGHAND_SHORTHANDS:()=>sn,CSS_SHORTHAND_LONGHANDS:()=>vt,assertEmitIntegrity:()=>nk,css:()=>je,cssCamelName:()=>Iu,cssPropName:()=>ke,cssShorthandDepth:()=>za,cssShorthandStatesLonghand:()=>Wa,cssShorthandStatesThemeLonghand:()=>Ru,getActiveDocument:()=>Gn,getCacheSize:()=>ak,getEmitStats:()=>Jg,injectGlobal:()=>Ot,keyframes:()=>Xa,recordRules:()=>Mu,replayRules:()=>Nu,reset:()=>PP,resetEmitStats:()=>ek,setActiveDocument:()=>tk,setWasmEngine:()=>Du,splitSelectorList:()=>Lr,wrapHoverRule:()=>Pr});var B0={};F(B0,{BARE_SEQUENCE_TOKEN_RE:()=>On,COMPOUND_CSS_KEYWORDS:()=>Cs,CONFIG:()=>Ps,CONFIG_MERGE_EXL:()=>ie,CSS_NAMED_COLOR_HEX:()=>Ea,CSS_NATIVE_COLOR_REGEX:()=>_r,CSS_UNITS:()=>Hi,FACTORY:()=>Ne,LIVE_KEYS:()=>F0,PREPARED_FORMAT:()=>Ha,STANDARD_SCHEME_QUERIES:()=>vg,TILING_POSITION_KEYWORDS:()=>Au,TILING_SIZE_KEYWORDS:()=>vu,VALUE_TRANSFORMERS:()=>Fg,__resetSkinWarnings:()=>I0,activateConfig:()=>xR,aliasCaseVariants:()=>La,animation:()=>o0,appendSVGSprite:()=>Su,appendSvgIconsSprite:()=>Vs,applyDocument:()=>wu,applyHeadings:()=>Rg,applyMediaSequenceVars:()=>yo,applyReset:()=>xu,applySequenceGlobalVars:()=>ru,applySequenceVars:()=>vr,applySkins:()=>ku,applySpacingSequence:()=>cu,applyThemeRoot:()=>Ou,applyTimingSequence:()=>_u,applyTypographySequence:()=>mu,atSchemes:()=>wo,breakpoints:()=>n0,buildSkinVarStyles:()=>Hs,changeGlobalTheme:()=>Bg,changeLightness:()=>Bx,checkIfBoxSize:()=>au,class:()=>l0,color:()=>Yx,colorPairSchemes:()=>iu,colorStringToRgbaArray:()=>Qe,compositeOverBackdrop:()=>Os,compoundLayers:()=>Aa,contrastRatio:()=>Ta,convertSvgToSymbol:()=>su,createConfig:()=>Xf,createPristineConfig:()=>Sg,cssMediaVars:()=>_g,cssVars:()=>bg,defineResolvedThemeSignal:()=>mo,defineThemeSignal:()=>go,devices:()=>r0,document:()=>bR,findHeadingLetter:()=>kg,findHeadings:()=>nu,font:()=>Hx,fontFace:()=>Kx,fontFamily:()=>zx,fontFamilyTypes:()=>Wx,forcedScheme:()=>Fs,generateSequence:()=>_e,generateSequencePosition:()=>b0,generateSprite:()=>ou,generateSubSequence:()=>tu,getActiveConfig:()=>P,getColor:()=>dt,getColorShade:()=>sg,getDefaultOrFirstKey:()=>Sr,getFnPrefixAndValue:()=>Er,getFontFace:()=>Ux,getFontFaceEach:()=>Rs,getFontFaceEachString:()=>hg,getFontFaceString:()=>Wf,getFontFamily:()=>gu,getFontFormat:()=>dg,getFontSizeByKey:()=>yu,getMediaBorder:()=>uu,getMediaColor:()=>Kt,getMediaTheme:()=>on,getResolvedThemeSignal:()=>SR,getRgbTone:()=>Tn,getSafeInk:()=>Tg,getSafeInkInfo:()=>E0,getSequenceValue:()=>Ls,getSequenceValueBySymbols:()=>eu,getSequenceValuePropertyPair:()=>qn,getShadow:()=>fu,getShapeByKey:()=>bu,getSizeValue:()=>Da,getSpacingBasedOnRatio:()=>$e,getSpacingByKey:()=>Vt,getSubratio:()=>Qf,getSubratioDifference:()=>Zf,getTheme:()=>T0,getThemeSignal:()=>wR,getTimingByKey:()=>we,getTimingFunction:()=>Fe,gradient:()=>Xx,grid:()=>c0,hexToRgb:()=>Mx,hexToRgbArray:()=>eg,hexToRgba:()=>$x,hslToRgb:()=>og,icons:()=>Qx,inForcedColors:()=>Ds,isCSSVar:()=>Ft,isDomDocument:()=>cr,isForcedColorsQuery:()=>Is,isGoogleFontsUrl:()=>Oa,isHostObject:()=>lr,isInertCompoundValue:()=>ag,isIntendedSystemColorWord:()=>Ms,isNativeColorToken:()=>Ts,isPlainColor:()=>_o,isRawUnitValue:()=>cl,isResolvedColor:()=>tn,isScalingUnit:()=>Xo,isWritableFamilyBucket:()=>h_,joinCompoundLayers:()=>Ca,linearChannelToSrgb:()=>lg,literalPairCompound:()=>Bs,literalSchemeMap:()=>Cr,media:()=>qx,mixTwoColors:()=>Ix,mixTwoRgb:()=>Fx,mixTwoRgba:()=>ig,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>fg,oklabToOklch:()=>Vf,oklchToGamutSafeSrgb:()=>Hf,oklchToOklab:()=>ug,opacify:()=>va,parkHostObject:()=>Xr,parseColorToken:()=>Qt,popConfig:()=>ht,pushConfig:()=>mt,quietColorProbe:()=>Ns,quietSequenceProbe:()=>kr,relativeLuminance:()=>As,reset:()=>_R,resolveBorderValue:()=>ae,resolveColorRgb:()=>$s,resolveColorsInGradient:()=>xo,resolveCompoundWords:()=>wr,resolveConfigDocument:()=>Vi,resolveFileUrl:()=>en,resolveShadowNonColorWord:()=>Ma,resolveShadowValue:()=>js,returnSubThemeOrDefault:()=>jx,reviveConfig:()=>Vg,rgbArrayToHex:()=>ng,rgbToHSL:()=>rg,rgbToHex:()=>Nx,runThroughMedia:()=>Og,schemeGuardSelector:()=>Cg,schemeMediaQuery:()=>Ag,scratchDefaultConfig:()=>Pa,scratchSystem:()=>Ba,scratchUtils:()=>bo,semanticIcons:()=>t0,sequence:()=>xr,serializeConfig:()=>Ug,set:()=>Ws,setActiveConfig:()=>wg,setAdaptiveSchemeVar:()=>So,setColor:()=>Ar,setCustomFont:()=>zf,setCustomFontMedia:()=>ho,setEach:()=>Tu,setFont:()=>hu,setFontFamily:()=>$a,setFontImport:()=>Ra,setGradient:()=>Ia,setInCustomFontMedia:()=>pg,setMediaTheme:()=>Na,setSVG:()=>Fa,setScalingVar:()=>Jf,setShadow:()=>ko,setSubScalingVar:()=>xg,setSvgIcon:()=>Us,setTheme:()=>du,setValue:()=>$0,setVariables:()=>_0,shadow:()=>Zx,shape:()=>d0,sizes:()=>u0,skins:()=>p0,spacing:()=>Gx,splitCompoundWords:()=>jf,splitSpacedValue:()=>lu,splitTopLevelCommas:()=>Cn,splitTopLevelSpaces:()=>ut,splitTransition:()=>$g,srgbChannelToLinear:()=>cg,srgbToOklab:()=>Uf,svg:()=>s0,svgData:()=>gg,svg_data:()=>i0,templates:()=>a0,theme:()=>Jx,timing:()=>e0,toCamel:()=>Yf,toLinearChannel:()=>ka,transformBackgroundImage:()=>Ig,transformBorder:()=>Pg,transformBorderRadius:()=>Tr,transformBoxShadow:()=>Eu,transformDuration:()=>Cu,transformGridTemplate:()=>Ng,transformShadow:()=>Dg,transformSize:()=>Nt,transformSizeRatio:()=>j,transformTextStroke:()=>Lg,transformTilingValue:()=>zs,transformTransition:()=>N0,transfromGap:()=>Mg,typography:()=>Kf,unit:()=>Vx,vars:()=>f0,viewTransition:()=>h0});var bo={};F(bo,{BARE_SEQUENCE_TOKEN_RE:()=>On,COMPOUND_CSS_KEYWORDS:()=>Cs,CSS_NAMED_COLOR_HEX:()=>Ea,CSS_NATIVE_COLOR_REGEX:()=>_r,CSS_UNITS:()=>Hi,applyMediaSequenceVars:()=>yo,applySequenceGlobalVars:()=>ru,applySequenceVars:()=>vr,changeLightness:()=>Bx,colorStringToRgbaArray:()=>Qe,compositeOverBackdrop:()=>Os,compoundLayers:()=>Aa,contrastRatio:()=>Ta,convertSvgToSymbol:()=>su,findHeadingLetter:()=>kg,findHeadings:()=>nu,generateSequence:()=>_e,generateSequencePosition:()=>b0,generateSprite:()=>ou,generateSubSequence:()=>tu,getColorShade:()=>sg,getDefaultOrFirstKey:()=>Sr,getFnPrefixAndValue:()=>Er,getFontFace:()=>Ux,getFontFaceEach:()=>Rs,getFontFaceEachString:()=>hg,getFontFaceString:()=>Wf,getFontFormat:()=>dg,getRgbTone:()=>Tn,getSequenceValue:()=>Ls,getSequenceValueBySymbols:()=>eu,getSequenceValuePropertyPair:()=>qn,getSizeValue:()=>Da,getSubratio:()=>Qf,getSubratioDifference:()=>Zf,hexToRgb:()=>Mx,hexToRgbArray:()=>eg,hexToRgba:()=>$x,hslToRgb:()=>og,isCSSVar:()=>Ft,isDomDocument:()=>cr,isGoogleFontsUrl:()=>Oa,isHostObject:()=>lr,isInertCompoundValue:()=>ag,isNativeColorToken:()=>Ts,isRawUnitValue:()=>cl,isResolvedColor:()=>tn,isScalingUnit:()=>Xo,isWritableFamilyBucket:()=>h_,joinCompoundLayers:()=>Ca,linearChannelToSrgb:()=>lg,mixTwoColors:()=>Ix,mixTwoRgb:()=>Fx,mixTwoRgba:()=>ig,numToLetterMap:()=>nn,oklabToLinearSrgb:()=>fg,oklabToOklch:()=>Vf,oklchToGamutSafeSrgb:()=>Hf,oklchToOklab:()=>ug,opacify:()=>va,parkHostObject:()=>Xr,parseColorToken:()=>Qt,quietSequenceProbe:()=>kr,relativeLuminance:()=>As,resolveCompoundWords:()=>wr,resolveConfigDocument:()=>Vi,resolveFileUrl:()=>en,returnSubThemeOrDefault:()=>jx,rgbArrayToHex:()=>ng,rgbToHSL:()=>rg,rgbToHex:()=>Nx,setCustomFont:()=>zf,setCustomFontMedia:()=>ho,setFontImport:()=>Ra,setInCustomFontMedia:()=>pg,setScalingVar:()=>Jf,setSubScalingVar:()=>xg,setVariables:()=>_0,splitCompoundWords:()=>jf,splitTopLevelCommas:()=>Cn,splitTopLevelSpaces:()=>ut,srgbChannelToLinear:()=>cg,srgbToOklab:()=>Uf,toLinearChannel:()=>ka});var cr=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),lr=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},h_=t=>t!==null&&typeof t=="object"&&!lr(t),Xr=(t,e,n)=>{if(!t)return;if(cr(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},Vi=t=>t?cr(t.__domDocument)?t.__domDocument:cr(t.document)?t.document:null:null;var Xo=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Hi=["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"],c4=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l4=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Hi.filter(t=>t!=="auto").map(c4).join("|")})$`),cl=t=>l4.test(String(t).trim());M();var Ea={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"},Qe=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Ea[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&&kt&&R){let n=kt.body.appendChild(kt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){kt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return kt.body.removeChild(n),[0,0,0,0];t=R.getComputedStyle(n).color,kt.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]},Ix=(t,e,n=.5)=>(t=Qe(t),e=Qe(e),ig(t,e,n)),Mx=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},eg=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},Nx=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),ng=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),$x=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},Fx=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},Bx=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},rg=(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]},og=(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)],sg=(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)},ig=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},va=(t,e)=>{let n=Qe(t);if(!n){ur()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},Ft=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Cs=new Set(["currentcolor","transparent","thin","medium","thick"]),_r=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,$6=/^(?:#[0-9a-f]{3,8}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\([\s\S]*\))$/i,Ts=t=>$6.test(t),jf=t=>t.indexOf("(")===-1?t.split(/\s+/):ut(t),ag=(t,e)=>{let n=t.length,r=0,o=0;for(let s=0;s<=n;s++){let i=s<n?t.charCodeAt(s):32;if(i===40){r++;continue}if(i===41){r>0&&r--;continue}if(!(r>0||!(i<=32||i===44||i>127&&/\s/.test(t[s])))){if(s>o&&!F6(t,o,s,e))return!1;o=s+1}}return!0},F6=(t,e,n,r)=>{let o=t.charCodeAt(e);if(o>=48&&o<=57)return!0;let s=t.slice(e,n);return Ts(s)||r!==void 0&&r.has(s)},Aa=(t,e)=>e?Cn(t).map(n=>jf(n.trim())):[jf(t)],Ca=t=>{let e=t[0].join(" ");for(let n=1;n<t.length;n++)e+=", "+t[n].join(" ");return e},wr=(t,e,{commas:n,keywords:r},o,s)=>{let i=_r.test(t);if(i&&ag(t,r))return t;let a=Aa(t,n),c=!1;try{for(let l of a)for(let f=0;f<l.length;f++){let u=l[f],d=B6(u,e,r,o,s);d!==u&&(l[f]=d,c=!0)}}catch(l){if(i)return t;throw l}return i&&!c?t:Ca(a)},B6=(t,e,n,r,o)=>t?Ft(t)?`var(${t})`:Ts(t)||n!==void 0&&n.has(t)?t:e(t,r,o):"",j6=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,Qt=t=>{if(!v(t))return null;if(_r.test(t))return{passthrough:t};if(Ft(t))return{cssVar:t};let e=t.match(j6);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}},tn=t=>v(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Cn=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},ut=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},ka=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),As=t=>.2126*ka(t[0])+.7152*ka(t[1])+.0722*ka(t[2]),Ta=(t,e)=>{let n=As(t)+.05,r=As(e)+.05;return n>r?n/r:r/n},cg=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),lg=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Uf=([t,e,n])=>{let[r,o,s]=[t,e,n].map(cg),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},fg=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Vf=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},ug=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},Hf=(t,e,n,r=24)=>{let o=a=>fg(ug([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>lg(Math.max(0,Math.min(1,a))))},Os=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),Tn=(t,e)=>{v(t)&&t.includes("rgb")&&(t=Qe(t).join(", ")),v(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),ge(e)&&(e+="");let n=ng(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=sg(n,parseFloat(e));return eg(o).join(", ")}else{let[o,s,i]=t,[a,c]=rg(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return og(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var jx=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var en=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},Sr=(t,e)=>{if(!t)return;if(e!=null&&e!==""&&e!=="default"){let s=t[e];return s&&typeof s=="object"?s.value:void 0}let r=()=>Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value&&!t[s].isSystemFallback&&!t[s].isSharedLibrary);if(t.__defaultKey){let s=t[t.__defaultKey];if(s&&s.isSystemFallback){let i=r();if(i)return t[i].value}if(s)return s.value}let o=r()||Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value);return o&&t[o]&&t[o].value},dg=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Oa=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),Ra=t=>`@import url('${t}');`,pg=t=>`@font-face { ${t} }`,zf=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=dg(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
35
+ `;)t[r]==="\\"&&r++,r++;s(l,r),r++;continue}if(a==="`"){r++,i();continue}if(a==="{"){o++,r++;continue}if(a==="}"){if(o--,n.length&&o===n[n.length-1]){n.pop(),r++,i();continue}r++;continue}r++}return e.join("")},q1=(t,e)=>{if(!v(t)||!t.includes("__scope = ")&&!t.includes("__peers")&&!/const _s_* = /.test(t)&&!t.includes("?.context?.globalScope?.")||!se(t))return t;let n=`(globalThis[Symbol.for('smbls.libraryScope')] || ((_, v) => v))(${JSON.stringify(e)}, `,r=t;for(let[o,s]of h6){let i=g6(r);r=r.replace(o,(...a)=>{let c=a[a.length-2];return i[c]==="~"||i[c]!==r[c]?a[0]:s.replace(/\$RESOLVE\(/g,n).replace(/\$(\d)/g,(l,f)=>a[Number(f)])})}return r},qh=(t,e)=>{if(v(t))return q1(t,e);let n=aR(t);return n===null?t:q1(n,e)},m6={lazy:!0,window:globalThis},cR=(t,e)=>{let n=qh(t,e);if(n===t||!v(n))return n;try{let r=be({v:n},{},m6).v;return typeof r!="function"?n:(Object.defineProperty(r,"toJSON",{value:()=>n,configurable:!0}),r)}catch{return n}},px=t=>{if(!t||typeof t!="object")return!1;if(Array.isArray(t))return!0;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},y6=(t,e)=>{let n=new WeakMap,r=o=>{if(v(o)||typeof o=="function")return cR(o,e);if(Tl(o)||!px(o))return o;if(n.has(o))return n.get(o);let s=Array.isArray(o)?[]:Object.getPrototypeOf(o)===null?Object.create(null):{};n.set(o,s);for(let i of Object.keys(o))s[i]=r(o[i]);return s};return r(t)},b6=(t,e)=>{let n={...t},r={};for(let o of Object.keys(t.globalScope))r[o]=qh(t.globalScope[o],e);n.globalScope=r;for(let o of yx){let s=t[o];if(!px(s))continue;let i={};for(let a of Object.keys(s))i[a]=cR(s[a],e);n[o]=i}for(let o of sR)px(t[o])&&(n[o]=y6(t[o],e));return n},G1=new WeakMap,_6=(t,e,n)=>{let r=G1.get(t);r||G1.set(t,r=new Map);let o=r.get(e);if(o)return o;let s=(i,a)=>po(n,i)&&n[i]===a;return o=new Proxy(t,{get(i,a){if(typeof a=="symbol"||po(i,a))return Reflect.get(i,a);let c=Reflect.get(i,a);return po(e,a)&&(c===void 0||s(a,c))||c===void 0?e[a]:c},set(i,a,c){return typeof a!="symbol"&&!po(i,a)&&po(e,a)?(e[a]=c,!0):Reflect.set(i,a,c)},has:(i,a)=>Reflect.has(i,a)||a in e}),r.set(e,o),o},w6=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",S6=(t,e)=>{let n=bx.get(t);return n?e===n.consumerGs?n.libGs:w6(e)?_6(e,n.libGs,n.consumerGs):e:e},x6=()=>{typeof globalThis[W1]!="function"&&Object.defineProperty(globalThis,W1,{value:S6,configurable:!0})},Gh=t=>{let e=t[ws];return Array.isArray(e)?e:null},_x=t=>Ne(t)?t.library:t,k6=(t,e,n)=>{let r=Gh(t);return!!r&&r.some(o=>o&&o.index===e&&(!o.key||o.key===n.key)&&v(o.id)&&E6(t,o.id))},E6=(t,e)=>{let n=JSON.stringify(e),r=new Set,o=s=>{if(v(s))return s.includes(n);if(!s||typeof s!="object"||r.has(s))return!1;r.add(s);for(let i in s)if(o(s[i]))return!0;return!1};for(let s of["globalScope",...yx,...sR])if(o(t[s]))return!0;return!1},v6=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=qh(t[r],e);return n},Y1=new WeakMap,Cf=(t,e=null)=>{let n=t&&Gh(t);if(!n||!n.length)return 0;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("bindLibraryGlobalScopes"),0;let r=t.globalScope;if(!k(r))return 0;let o=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[],s=Y1.get(r);s||Y1.set(r,s=new Set),x6();let i=0;for(let a of n){if(!a||!v(a.id)||s.has(a.id))continue;let c=_x(o[a.index]);if(!c||!k(c.globalScope)||a.key&&c.key!==a.key)continue;let l=p=>typeof p=="function"?iR(p):p,f=(p,g)=>{if(p===g)return!0;let h=l(p),m=l(g);return v(h)||v(m)?h===m:JSON.stringify(p)===JSON.stringify(g)},u=k(e)?(Array.isArray(a.landed)?a.landed:[]).filter(p=>v(p)&&po(c.globalScope,p)&&po(e,p)&&f(e[p],qh(c.globalScope[p],a.id))):[],d=is(v6(c.globalScope,a.id));Object.setPrototypeOf(d,r),bx.set(a.id,{libGs:d,consumerGs:r});for(let p of u)r[p]=d[p];s.add(a.id),i++}return i},A6=/^@symbo[-.]ls\//,vf=t=>t.includes("/")?t.slice(t.indexOf("/")+1):t,Yh=t=>[`@symbo-ls/${t}`,`@symbo.ls/${t}`],wa=(t,e)=>{let n=[];if(!Array.isArray(t)||!t.length)return n;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("libraryPackageSpecs"),n;let r=new Map,o=(i,a,c)=>{for(let l of Yh(i)){let f=r.get(l);if(f===void 0){r.set(l,a),n.push([l,a]);continue}f!==a&&c&&typeof e=="function"&&e({spec:l,kept:f,refused:a})}},s=[];for(let i of t){let a=_x(i);if(!a||typeof a!="object"||a.__isStub)continue;let c=a.key||a.name||a.__libraryKey,l=[];for(let f of[a.key,a.name,a.__libraryKey,a.__libraryName]){if(typeof f!="string"||!f||f!==c&&!A6.test(f))continue;let u=vf(f);u&&!l.includes(u)&&l.push(u)}l.forEach((f,u)=>{u===0&&c&&vf(c)===f?o(f,a,!1):s.push([f,a])})}for(let[i,a]of s)o(i,a,!0);return n},Sa=({spec:t,kept:e,refused:n})=>{typeof console>"u"||console.warn(`[smbls] shared library "${n&&n.key}" also claims ${t}, which "${e&&e.key}" already owns; ${t} stays with "${e&&e.key}".`)},X1=["functions","methods","snippets"],Xh=Symbol.for("smbls.libraryPackages"),Ef=new WeakMap,C6=t=>!!t&&typeof t=="object"&&!Array.isArray(t),T6=t=>({get globalScope(){return t()}}),J1=(t,e,n)=>{let r={};for(let o of Object.keys(t))r[o]=t[o];return Object.defineProperty(r,"context",{configurable:!0,enumerable:!1,writable:!0,value:T6(e)}),Ef.set(r,n),r},Z1=t=>!C6(t)||!Ef.has(t)&&Object.prototype.hasOwnProperty.call(t,"context"),Tf=t=>{if(!t||typeof t!="object")return;let e=()=>t.globalScope;for(let r of X1){let o=t[r];Z1(o)||Ef.get(o)===t||(t[r]=J1(o,e,t))}if(!globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__&&Array.isArray(t.sharedLibraries)){let r=Gh(t)||[];t.sharedLibraries=t.sharedLibraries.map((o,s)=>{let i=Ne(o)&&o&&"library"in o,a=_x(o);if(!a||typeof a!="object"||a.__isStub||Ef.get(a)===t)return o;let c=r.find(u=>u&&u.index===s&&(!u.key||u.key===a.key)),l=()=>{let u=c&&bx.get(c.id);return u&&u.consumerGs===t.globalScope?u.libGs:t.globalScope},f={...a};for(let u of X1)Z1(a[u])||(f[u]=J1(a[u],l,t));return Ef.set(f,t),i?{...o,library:f}:f})}let n=t.globalScope;if(n&&typeof n=="object"){let r={};for(let[o,s]of wa(t.sharedLibraries,Sa))r[o]=s;try{Object.defineProperty(n,Xh,{configurable:!0,enumerable:!1,writable:!0,value:r})}catch{}}},O6=(t,e,n,r="library",o=-1)=>{let s=mx(e,n),i=!k6(t,o,e)&&p6(t,e,s)>0?`${r}#${f6()}`:null,a=i?b6(e,i):e,c=i?new Set(Object.keys(t.globalScope)):null,l=[];for(let f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&!(f==="sharePages"||f==="sharedLibIgnore")&&f!==ws&&!f.startsWith("__")&&f!=="app"&&!s.has(f)){if(k(a[f])&&k(t[f])){if(f==="designSystem")_a(t[f],a[f],s,f);else for(let u in a[f])if(!s.has(`${f}/${u}`)){if(f==="methods"&&ts(u)){u in t[f]||l.push(u);continue}u in t[f]?z1(f,t[f][u])&&!z1(f,a[f][u])&&(t[f][u]=a[f][u]):t[f][u]=a[f][u]}}else if(!(f in t)){let u=a[f],d=f==="methods"&&u&&typeof u=="object"?l6(u,s,l):u;t[f]=eR(d,s,f)}}i&&(Gh(t)||(t[ws]=[]),t[ws].push({id:i,index:o,key:v(e.key)?e.key:null,landed:Object.keys(a.globalScope).filter(f=>!c.has(f))})),l.length&&c6(r,l)},R6=(t,e,n)=>{if(t!==e){let r=oR(t);if(v(r)&&r)return r;if(t.key||t.name)return t.key||t.name}return e&&(e.key||e.name)||`sharedLibraries[${n}]`},P6=`${ux}/default`,L6=t=>v(t)&&t!==""&&Ss(t).full===P6,D6=(t,e)=>{if(v(e.key)&&e.key)return e.key;if(t!==e){if(v(t.key)&&t.key)return t.key;if(v(t.name)&&t.name)return t.name}return null},lR=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=o6;if(Ne(s)&&(i=Af(s.ignoreList),s=s.library),!k(s))continue;let a={entry:o,lib:s,ignore:i,index:r};L6(D6(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},fR=(t,e,n)=>{let r=e(),o=H1(r),s=i6(r),{linked:i,bases:a}=lR(t);for(let f of i)n(f);let c=!o.size&&a.length?H1(e()):null;for(let f of a)n(f);return{claims:o.size?o:c&&c.size?c:null,ownFamilies:s}},Of=(t,e)=>{if(!e||!e.length)return;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("mergeSharedLibraries");let n=t.designSystem,{claims:r,ownFamilies:o}=fR(e,()=>t.designSystem,({entry:s,lib:i,ignore:a,index:c})=>O6(t,i,a,R6(s,i,c),c));t.designSystem!==n&&(t.designSystem={...t.designSystem}),rR(t.designSystem,o),r&&nR(t.designSystem,r)},xs=(t,e)=>{let n=k(t)?t:null;if(!Array.isArray(e)||!e.length)return n||{};if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("sharedLibraryFiles"),n||{};let r=n?{...n}:{},{linked:o,bases:s}=lR(e);for(let{lib:i,ignore:a}of[...o,...s]){let c=mx(i,a);if(c.has("files"))continue;let l=i.files;if(k(l))for(let f in l)Object.prototype.hasOwnProperty.call(l,f)&&(c.has(`files/${f}`)||f in r||(r[f]=l[f]))}return r},Rf=(t,e,n=_a)=>{if(!k(t)||!Array.isArray(e)||!e.length)return t;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("mergeSharedLibraryDesignSystems"),t;let{claims:r,ownFamilies:o}=fR(e,()=>t,({lib:s,ignore:i})=>{let a=s.designSystem;if(!a||typeof a!="object")return;let c=mx(s,i);c.has("designSystem")||n(t,a,c,"designSystem")});return rR(t,o),r&&nR(t,r),t}});function vs(t,e){if(!e||typeof e!="object")return t;let n=o=>!z6(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:tg(e[o])||o,r={...t};for(let[o,s]of Object.entries(r))H6.has(o)?r[o]=Array.isArray(s)?s.map(i=>dR(i,n)):dR(s,n):typeof s=="string"?r[o]=n(s):Array.isArray(s)&&(r[o]=s.map(i=>typeof i=="string"?n(i):i));return r}function wx(t,e){if(!t||!e)return;let n=e.split("."),r=t;for(let o of n){if(r==null||typeof r!="object")return;r=r[o]}return r}function W6(t,e){let n=wx(t,e);if(typeof n=="number")return Number.isFinite(n)?n:void 0;if(typeof n=="string"&&!Zi(n))return n}function K6(t,e,n){let o=(e.config||e.settings||{}).polyglot||e.polyglot,s=n?.lang||o?.defaultLang||"en",a=(o?.translations||{})[s]||{},c=[n?.state,e.state].filter(u=>u&&typeof u=="object"),l=u=>{for(let d of c){let p=W6(d,u);if(p!==void 0)return p}},f={...t};for(let[u,d]of Object.entries(f))typeof d!="string"||!d.includes("{{")||(f[u]=d.replace(/\{\{\s*([^|{}]+?)\s*(?:\|\s*(\w+)\s*)?\}\}/g,(p,g,h)=>{let m=g.trim();if(h==="polyglot")return a[m]??wx(a,m)??p;if(h==="getLocalStateLang")return l(m+s)??p;let y=l(m);return y!==void 0?y:a[m]??wx(a,m)??p}));return f}function pR(t){if(!k(t))return{};let e={...t};for(let[n,r]of Object.entries(e))if(typeof r=="function"){let o=r.toString(),s=o.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | getLocalStateLang }}`;continue}let i=o.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(i){e[n]=`{{ ${i[1]} | polyglot }}`;continue}let a=o.match(/s\.(\w+(?:\.\w+)+)/);if(a){e[n]=`{{ ${a[1]} }}`;continue}delete e[n]}else if(typeof r=="string"){let o=r.match(/el\.call\(\s*["']getLocalStateLang["']\s*,\s*["']([^"']+)["']\s*\)/);if(o){e[n]=`{{ ${o[1]} | getLocalStateLang }}`;continue}let s=r.match(/el\.call\(\s*["']polyglot["']\s*,\s*["']([^"']+)["']\s*\)/);if(s){e[n]=`{{ ${s[1]} | polyglot }}`;continue}if(r.includes("=>")&&r.includes("s.")){let i=r.match(/s\.(\w+(?:\.\w+)+)/);if(i){e[n]=`{{ ${i[1]} }}`;continue}}Zi(r)&&delete e[n]}return e}function Tx(t,e,n,{isProduction:r=!1,channel:o="production"}={}){if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("getPageMetadata",[t,e,n,{isProduction:r,channel:o}]);let s=t.pages?.[e],i=k(s?.state)&&s?.state,a=s?.metadata||s?.helmet||i||{},c=pR(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=pR(f),d={};if(t.integrations?.seo?d={...t.integrations.seo,...u,...c}:Object.keys(u).length?d={...u,...c}:d={...c},!d.title){let m=t.name||t.key;m?r?d.title=m:o==="development"?d.title=`${m} / dev:symbo.ls`:o==="staging"?d.title=`${m} / staging:symbo.ls`:d.title=`${m} / symbo.ls`:d.title="Symbols demo"}d=K6(d,t,n),d.title&&(l.has("title")||!d["og:title"])&&(l.has("og:title")||(d["og:title"]=d.title)),d.description&&(l.has("description")||!d["og:description"])&&(l.has("og:description")||(d["og:description"]=d.description)),d.title&&!d["twitter:title"]&&(d["twitter:title"]=d.title),d.description&&!d["twitter:description"]&&(d["twitter:description"]=d.description);let p=l.has("og:url")?d["og:url"]:l.has("url")?d.url:void 0,g=n?.actualPathname||e;if(p)d["og:url"]=p;else if(d["og:url"]||d.url){let m=(d["og:url"]||d.url||"").replace(/\/$/,"");if(m&&g&&g!=="/"){let y=g.startsWith("/")?g:"/"+g;d["og:url"]=m+y}}d=vs(d,xs(t.files,t.sharedLibraries));let h=t.name||t.app?.metadata?.title||t.app?.name||"";for(let[m,y]of Object.entries(d))if(typeof y=="string"&&y.includes("{{")){let x=y.replace(/\{\{[^}]*\}\}/g,"").trim();x?d[m]=x:m==="title"?d[m]=h:delete d[m]}return d}var U,gr,qn,Df,Sx,If,N6,Zh,Mf,xx,Nf,$f,Ff,$6,kx,Ex,Qh,vx,ds,F6,Ax,uR,Cn,B6,j6,ka,ks,ho,Es,U6,V6,Cx,z6,Lf,tg,H6,dR,hR=D(()=>{"use strict";Wt();ea();Jh();El();U=t=>{if(t==null)return"";let e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return t.toString().replace(/[&<>"']/g,n=>e[n])},gr=t=>JSON.stringify(t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),qn=(t,e,{remove:n=!1,warn:r}={})=>{if(!t||typeof t.querySelector!="function")return null;let o=null;try{o=t.querySelector(e)}catch{return null}if(!o)return null;n&&o.parentNode&&o.parentNode.removeChild(o);let s;try{s=JSON.parse(o.textContent||"")}catch(i){r&&r(i)}return{value:s,block:o}},Df='script[type="application/json"][data-brender="registry"]',Sx=t=>'<script type="application/json" data-brender="registry">'+gr(t)+"<\/script>",If='script[type="application/json"][data-brender="registry-tree"]',N6=/^br-(0|[1-9]\d*)$/,Zh=t=>{if(!k(t))return null;let e=new Map,n=[],r=0,o=0;for(let s in t){let i=t[s],a=typeof i=="string"?N6.exec(i):null;if(!a)return null;let c=Number(a[1]),l=0,f=s;for(let u=s.lastIndexOf(".");u>0;u=s.lastIndexOf(".",u-1)){let d=s.slice(0,u);if(e.has(d)){l=r-e.get(d),f=s.slice(u+1);break}}n.push(l,f,c-o),e.set(s,r),o=c,r++}return{f:"tree",e:n}},Mf=t=>{if(!k(t)||t.f!=="tree"||!Array.isArray(t.e)||t.e.length%3)return null;let e=t.e,n=[],r={},o=0;for(let s=0,i=0;s<e.length;s+=3,i++){let a=e[s],c=e[s+1],l=e[s+2];if(!Number.isInteger(a)||a<0||a>i||typeof c!="string"||!Number.isInteger(l))return null;let f=a?n[i-a]+"."+c:c;o+=l,n.push(f),r[f]="br-"+o}return r},xx=t=>{let e=Zh(t);return e?'<script type="application/json" data-brender="registry-tree">'+gr(e)+"<\/script>":""},Nf='link[rel="preload"][data-smbls="design-system"]',$f='meta[name="smbls-design-system"][data-smbls="design-system"]',Ff='script[type="application/json"][data-smbls="design-system"]',$6=t=>k(t)&&k(t.config)&&Array.isArray(t.rules),kx=(t,e)=>e&&e.defer===!0?'<meta name="smbls-design-system" content="'+U(t)+'" data-smbls="design-system">':'<link rel="preload" href="'+U(t)+'" as="fetch" crossorigin="anonymous" data-smbls="design-system">',Ex=t=>$6(t)?'<script type="application/json" data-smbls="design-system">'+gr(t)+"<\/script>":"",Qh='meta[name="brender-stamp"]',vx=({stamp:t,time:e}={})=>'<meta name="brender-stamp" content="'+U(t)+'" data-time="'+(typeof e=="number"&&isFinite(e)?Math.round(e):"")+'">',ds=t=>{if(!t||typeof t.querySelector!="function")return null;let e=null;try{e=t.querySelector(Qh)}catch{return null}if(!e)return null;let n=parseInt(e.getAttribute("data-time"),10);return{stamp:e.getAttribute("content")||"",time:isFinite(n)?n:null}},F6=/<script\b(?:[^>"']|"[^"]*"|'[^']*')*\btype\s*=\s*["']?importmap["']?(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/script\s*>/gi,Ax=(t,e)=>{let n=-1;for(let r of String(t).matchAll(F6))n=r.index+r[0].length;return n===-1?null:t.slice(0,n)+`
36
+ `+e+t.slice(n)},uR=t=>Object.entries(t||{}).filter(([e,n])=>n!==void 0).map(([e,n])=>`${e}="${U(n)}"`).join(" "),Cn=t=>{let e=5381,n=String(t);for(let r=0;r<n.length;r++)e=(e*33^n.charCodeAt(r))>>>0;return e.toString(36)},B6=new Set(["jsonLd","styles","scripts"]),j6=new Set(["source"]),ka=t=>{let e=[];if(Array.isArray(t.jsonLd))for(let n of t.jsonLd){if(n==null)continue;let r=typeof n=="string"?n:JSON.stringify(n),o=String(r).replace(/<\/script/gi,"<\\/script");e.push(`<script type="application/ld+json" data-smbls-jsonld="${Cn(r)}">${o}<\/script>`)}if(Array.isArray(t.styles))for(let n of t.styles){if(n==null||!String(n).trim())continue;let r=String(n).replace(/<\/style/gi,"<\\/style");e.push(`<style data-smbls-style="${Cn(r)}">${r}</style>`)}if(Array.isArray(t.scripts))for(let n of t.scripts){if(!n)continue;let r=typeof n=="string",o=r?n:n.src;if(!o&&!n.body)continue;let s=[];o&&s.push(`src="${U(o)}"`),r||(n.type&&s.push(`type="${U(n.type)}"`),n.async&&s.push("async"),n.defer&&s.push("defer"),n.integrity&&s.push(`integrity="${U(n.integrity)}"`),n.crossorigin&&s.push(`crossorigin="${U(n.crossorigin)}"`),n.referrerpolicy&&s.push(`referrerpolicy="${U(n.referrerpolicy)}"`),n.nomodule&&s.push("nomodule"));let i=` data-smbls-script="${U(o||Cn(n.body||""))}"`;if(!r&&n.body){let a=String(n.body).replace(/<\/script/gi,"<\\/script");e.push(`<script ${s.join(" ")}${i}>${a}<\/script>`)}else e.push(`<script ${s.join(" ")}${i}><\/script>`)}return e},ks=t=>`${t.hreflang||""}|${t.href||""}`,ho=t=>k(t)?Cn(JSON.stringify(t)):String(t),Es=t=>k(t)?Cn(JSON.stringify(t)):String(t),U6=(t,e,n)=>t==="favicons"?Array.isArray(e)&&(typeof n=="string"||k(n))?` data-smbls-favicon="${U(ho(n))}"`:"":(t==="icon"||t==="favicon")&&typeof e=="string"?` data-smbls-single-icon="${U(e)}"`:"",V6=t=>k(t)?` data-smbls-alternate="${U(ks(t))}"`:"",Cx=(t,e)=>{if(globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__)return Un("generateMetaTags",[t,e]);e||(t={...t,robots:"noindex"});let n=!1,r=Object.entries(t).reduce((o,[s,i])=>{if(!i&&i!==0&&i!==!1||B6.has(s)||j6.has(s))return o;if(s==="title")return o.push(`<title>${U(i)}</title>`),o;if(s==="canonical")return o.push(`<link rel="canonical" href="${U(i)}">`),o;if(s==="manifest")return o.push(`<link rel="manifest" href="${U(i)}">`),o;if(s==="favicon"||s==="favicons"||s==="icon"||s==="icons")return(Array.isArray(i)?i:[i]).forEach(u=>{let d=U6(s,i,u);if(typeof u=="string")o.push(`<link rel="icon" href="${U(u)}"${d}>`);else if(typeof u=="object"){let p=uR(u);/rel=/.test(p)?o.push(`<link ${p}${d}>`):o.push(`<link rel="icon" ${p}${d}>`)}}),o;if(s==="alternate")return(Array.isArray(i)?i:[i]).forEach(u=>{if(u&&typeof u=="object"){let d=Object.entries(u).filter(([p,g])=>g!==void 0).map(([p,g])=>`${p}="${U(g)}"`).join(" ");o.push(`<link rel="alternate" ${d}${V6(u)}>`)}}),o;if(s==="theme-color"&&Array.isArray(i))return i.forEach(f=>{if(!k(f))return;let u=uR({name:"theme-color",content:f.content,media:f.media});o.push(`<meta ${u} data-smbls-theme-color="${U(Es(f))}">`)}),o;let a=(f,u,d="name")=>{if(typeof u=="string"||typeof u=="number"||typeof u=="boolean")o.push(`<meta ${d}="${U(f)}" content="${U(u)}">`);else if(Array.isArray(u))u.forEach(p=>{if(typeof p=="string"||typeof p=="number"||typeof p=="boolean")o.push(`<meta ${d}="${U(f)}" content="${U(p)}">`);else if(typeof p=="object"){let g=Object.entries(p).filter(([h,m])=>m!==void 0).map(([h,m])=>`${h}="${U(m)}"`).join(" ");o.push(`<meta ${g}>`)}});else if(typeof u=="object"){let p=Object.entries(u).filter(([g,h])=>h!==void 0).map(([g,h])=>`${g}="${U(h)}"`).join(" ");o.push(`<meta ${p}>`)}};if(s.startsWith("http-equiv:")){let f=s.replace("http-equiv:","");return a(f,i,"http-equiv"),o}if(s.startsWith("itemprop:")){let f=s.replace("itemprop:","");return a(f,i,"itemprop"),o}let l=["og:","twitter:","fb:","article:","profile:","book:","business:","music:","product:","video:","DC:","DCTERMS:"].find(f=>s.startsWith(f));if(l){let f=s.replace(l,"");return a(`${l.replace(":","")}:${f}`,i,l==="twitter:"||l==="DC:"||l==="DCTERMS:"?"name":"property"),o}if(s.startsWith("apple:")||s.startsWith("msapplication:")){let f=s.startsWith("apple:")?"apple-":"msapplication-",u=s.replace(/^apple:|^msapplication:/,"");return a(`${f}${u}`,i,"name"),o}return s==="viewport"&&(n=!0),a(s,i),o},['<meta charset="UTF-8">']);return n||r.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),r.push(...ka(t)),r.join(`
37
+ `)},z6=t=>typeof t=="string"&&t.length>0&&!t.startsWith("/")&&!t.startsWith("http"),Lf=t=>typeof t=="string"&&t.length>0,tg=t=>{if(!t||typeof t!="object")return null;if(Lf(t.src))return t.src;let e=t.content;return!e||typeof e!="object"?null:Lf(e.src)?e.src:Lf(e.storageUrl)?e.storageUrl:null},H6=new Set(["icon","favicon","icons","favicons"]),dR=(t,e)=>{if(typeof t=="string")return e(t);if(!k(t))return t;let n={...t};return Lf(n.href)&&(n.href=e(n.href)),Lf(n.src)&&(n.src=e(n.src)),n}});var eg,Ox,gR=D(()=>{"use strict";Wt();eg=(t,e)=>(I(e)?e:Object.values(e)).reduce((n,r)=>Math.abs(r-t)<Math.abs(n-t)?r:n),Ox=(t,e)=>(t=parseFloat(t),k(e)&&(e=Object.values(e)),eg(t,e))});var Rx,Px,Lx,wr,Dx,Bf,Ix,As,Mx=D(()=>{"use strict";Wt();Rx=async t=>{try{await navigator.clipboard.writeText(t)}catch(e){console.warn("Failed to copy text: ",e)}},Px=async t=>{try{let e=new Blob([t],{type:"text/javascript"}),n=new window.ClipboardItem({"text/plain":e});await navigator.clipboard.write([n]),console.log("JavaScript code copied to clipboard as text/javascript")}catch(e){console.error("Failed to copy JavaScript code: ",e)}},Lx=t=>t.replace(/[^a-zA-Z0-9_]/g,""),wr=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,"")),Dx=t=>t&&t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),Bf=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Ix=(t="")=>{if(typeof t!="string")return;let e=t.replace(/([A-Z])/g," $1");return e.charAt(0).toUpperCase()+e.slice(1)},As=t=>{if(I(t))return t;if(v(t))return t.split(" ");if(k(t))return Object.values(t);if(me(t))return[t]}});var mR,yR,q6,_R,bR,G6,ng,Y6,rg,Nx,$x,og,jf,wR=D(()=>{"use strict";Wt();Jh();Mx();fx();mR=/[A-Za-z_$][A-Za-z0-9_$-]*/g,yR=/[A-Za-z_$][A-Za-z0-9_$]*(?: [A-Za-z0-9_$]+){1,5}/g,q6=(t,e)=>{mR.lastIndex=0;let n;for(;n=mR.exec(t);){let o=n[0];if(e.add(o),o.indexOf("-")!==-1)for(let s of o.split("-"))s&&e.add(s)}yR.lastIndex=0;let r;for(;r=yR.exec(t);){let o=r[0].split(" ");for(let s=0;s<o.length-1;s++)for(let i=2;i<=6&&s+i<=o.length;i++)e.add(wr(o.slice(s,s+i).join(" ")))}return e},_R=t=>Ne(t)?t.library:t,bR=["components","pages","snippets"],G6=["name","icon"],ng=t=>{if(!k(t))return null;let e=t.key;if(!e)return null;let n=t.owner,r=k(n)?n.slug:n;return r?`${r}/${e}`:String(e)},Y6=/^\s*(?:async\s+)?(?:function\b|\(|[A-Za-z_$][A-Za-z0-9_$]*\s*=>)/,rg=t=>{let e=new Set,n=r=>{if(Array.isArray(r)){for(let o of r)if(n(o))return!0;return!1}if(!k(r)||e.has(r))return!1;e.add(r);for(let o of G6){let s=r[o];if(typeof s=="string"&&Y6.test(s))return!0}for(let o of Object.keys(r))if(n(r[o]))return!0;return!1};for(let r of bR)if(n(t[r]))return!0;for(let r of t.sharedLibraries||[]){let o=_R(r);if(k(o)){for(let s of bR)if(n(o[s]))return!0}}return!1},Nx=t=>{if(!k(t)||!Array.isArray(t.sharedLibraries))return null;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return t.sharedLibraries.length&&An("planLibraryIconPrune"),null;let e=k(t.settings)?t.settings.libraryIconPrune:void 0;if(e===!1||e!==!0&&rg(t))return null;let n=[];for(let u of t.sharedLibraries){let d=_R(u),p=k(d)&&d.designSystem,g=k(p)&&p.icons;if(!k(g))continue;let h=ng(d);h&&n.push({id:h,icons:g,designSystem:p})}if(!n.length)return null;let r=new Set(n.map(u=>u.designSystem)),o=JSON.stringify(t,function(u,d){if(u!=="__ssr"&&!(u==="icons"&&r.has(this)))return d});if(typeof o!="string")return null;let s=q6(o,new Set),i=new Map,a=[],c=0,l=0,f=0;for(let u of n){let d=[];for(let p of Object.keys(u.icons)){if(s.has(p)){l++;continue}d.push(p);let g=u.icons[p];f+=p.length+(typeof g=="string"?g.length:0)}d.length&&(c+=d.length,i.set(u.icons,new Set(d)),a.push({id:u.id,icons:d}))}return c?{drops:i,prune:{libraries:a},report:{icons:c,kept:l,bytes:f}}:null},$x=t=>function(e,n){let r=t.get(this);if(!(r&&r.has(e)))return n},og=(t,e={})=>{let n=new Map;for(let a of t&&t.libraries||[])if(!(!a||!a.id||!Array.isArray(a.icons)))for(let c of a.icons)n.has(c)||n.set(c,a.id);if(!n.size)return null;if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__)return An("createPrunedLibraryIconLoader"),null;let r=t&&typeof t.sameOriginBase=="string"&&t.sameOriginBase,o=r?{...e,provider:"same-origin",sameOriginBase:r}:e,s=new Map,i=a=>{let c=s.get(a);return c||(c=Promise.resolve().then(()=>xa(a,o)).then(l=>{let f=k(l)&&k(l.designSystem)&&l.designSystem.icons;return k(f)?f:null}),s.set(a,c)),c};return a=>{let c=n.get(a);return c?i(c):null}},jf=(t,e={})=>{if(!k(t))return!1;let n=t.__libraryIconPrune;if(!k(n))return!1;let r=t.designSystem;if(!k(r)||r.iconsLoader)return!1;let o=og(n,e);return o?(r.iconsLoader=o,!0):!1}});var Fx,SR=D(()=>{"use strict";Fx=()=>{let t=document.styleSheets[0],e="";if(t)try{let n=t.cssRules||t.rules;for(let r=0;r<n.length;r++)e+=n[r].cssText}catch(n){console.error("Unable to access CSS rules. This may be due to CORS restrictions:",n)}else console.log("No stylesheets found in document.styleSheets[0].");return e}});var _e,Ea,Uf,Vf,xR=D(()=>{"use strict";_e=t=>{let e=t&&t.src;if(!e||typeof e!="string")return null;let n=t.context;if(!n)return null;let r=n.assets&&n.assets[e]||n.files&&n.files[e];if(!r)return null;if(typeof r=="string")return{src:r,type:null,variants:null};if(typeof r=="object"){if(typeof r.src=="string")return r;let o=r.content,s=o&&o.src;if(typeof s=="string")return{...r,src:s,type:r.type??o.type??null,variants:r.variants??o.variants??null}}return null},Ea=(t,{keepOneX:e=!0}={})=>{if(!Array.isArray(t)||!t.length)return"";let n=t.some(o=>typeof o.width=="number"),r=[];for(let o of t)n&&typeof o.width=="number"?r.push(`${o.src} ${o.width}w`):n||(o.scale===1&&e?r.push(o.src):o.scale&&o.scale!==1&&r.push(`${o.src} ${o.scale}x`));return r.join(", ")},Uf=t=>{if(!t||!Array.isArray(t.variants))return"";let e=t.variants.filter(n=>n.format===t.type);return Ea(e,{keepOneX:!1})},Vf=(t,e)=>{if(!t||typeof t!="object"||typeof t.src!="string")return[];if(!Array.isArray(t.variants)||!t.variants.length)return[{tag:"img",attr:{src:t.src,alt:e||""}}];let n=new Map;for(let a of t.variants)n.has(a.format)||n.set(a.format,[]),n.get(a.format).push(a);let r=[];for(let[a,c]of n)a!==t.type&&r.push({tag:"source",attr:{type:a,srcset:Ea(c,{keepOneX:!0})}});let o=n.get(t.type)||[],s=Ea(o,{keepOneX:!1}),i={src:t.src,alt:e||""};return s&&(i.srcset=s),[...r,{tag:"img",attr:i}]}});var zf={};F(zf,{BRENDER_REGISTRY_BLOCK:()=>Df,BRENDER_REGISTRY_TREE_BLOCK:()=>If,BRENDER_STAMP_META:()=>Qh,CDN_PROVIDERS:()=>Qe,DESIGN_SYSTEM_BLOCK:()=>Ff,DESIGN_SYSTEM_DEFERRED:()=>$f,DESIGN_SYSTEM_LINK:()=>Nf,DOMQL_EVENTS:()=>W_,DOMQ_PROPERTIES:()=>Qr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Yi,ENV:()=>hw,HTML_TAGS:()=>na,LIBRARY_PACKAGES:()=>Xh,LIBRARY_SCOPES_KEY:()=>ws,METHODS:()=>eo,METHODS_EXL:()=>xl,NODE_ENV:()=>Sn,OPTIONS:()=>Jl,PACKAGE_MANAGER_TO_CDN:()=>fo,PARSED_DOMQ_PROPERTIES:()=>Sl,POLYGLOT_LANG_STORAGE_KEY:()=>Uh,PROPS_METHODS:()=>to,REVIVED_MARK:()=>Ol,STATE_DATA_MERGE_EXL:()=>gh,STATE_METHODS:()=>Qo,STATE_PROPERTIES:()=>z_,SVG_TAGS:()=>bO,TYPES:()=>hl,UNIVERSAL_RESERVED_KEYS:()=>jh,__resetBuiltinMethodWarnings:()=>gx,addCaching:()=>lh,addContext:()=>ch,addExtend:()=>$w,addExtends:()=>Vn,addItemAfterEveryElement:()=>O_,addProtoToArray:()=>yl,addRef:()=>sh,alternateLinkKey:()=>ks,applyDependentState:()=>nS,applyEvent:()=>mh,applyEventUpdate:()=>yh,applyExtends:()=>SO,applyProps:()=>Hl,arrayContainsOtherArray:()=>x_,arraysEqual:()=>P_,arrayzeValue:()=>As,bareLibraryKey:()=>vf,bindLibraryGlobalScopes:()=>Cf,brenderRegistryBlock:()=>Sx,brenderRegistryTreeBlock:()=>xx,brenderStampMeta:()=>vx,buildImgSrcset:()=>Uf,buildSourcesAndImg:()=>Vf,cache:()=>aS,call:()=>qS,captureSnapshot:()=>YS,checkForStateTypes:()=>Zw,checkIfInherits:()=>hh,checkIfStringIsInArray:()=>I_,clone:()=>Q_,cloneAndMergeArrayExtend:()=>Nl,cloneFunction:()=>Sw,collectExtendsList:()=>ra,concatAddExtends:()=>Iw,copyJavaScriptToClipboard:()=>Px,copyStringToClipboard:()=>Rx,createBasedOnType:()=>oh,createElement:()=>Jw,createElementExtends:()=>Kp,createExtends:()=>Fl,createExtendsFromKeys:()=>oa,createExtendsStack:()=>Xp,createIfConditionFlag:()=>xw,createInheritedState:()=>Qw,createKey:()=>Dl,createNestedObject:()=>aw,createNestedObjectByKeyPath:()=>eS,createObjectWithoutPrototype:()=>Bp,createParent:()=>ih,createPath:()=>ah,createProps:()=>Wl,createPropsStack:()=>nh,createPrunedLibraryIconLoader:()=>og,createRoot:()=>Xw,createScope:()=>oS,createSnapshotId:()=>Ll,currentPathname:()=>ys,customDecodeURIComponent:()=>V_,customEncodeURIComponent:()=>U_,cutArrayAfterValue:()=>C_,cutArrayBeforeValue:()=>A_,debounce:()=>Ml,debounceOnContext:()=>_w,decodeBrenderRegistry:()=>Mf,decodeNewlines:()=>j_,deepClone:()=>pt,deepContains:()=>sw,deepDefaults:()=>_a,deepDestringifyFunctions:()=>be,deepExtend:()=>Wp,deepMerge:()=>bt,deepMergeExtends:()=>zn,deepStringifyFunctions:()=>Al,defineSetter:()=>WS,designSystemBlock:()=>Ex,designSystemLink:()=>kx,destringifyGlobalScope:()=>is,detectHeightOnInit:()=>ex,detectInfiniteLoop:()=>uw,document:()=>kt,encodeBrenderRegistry:()=>Zh,encodeNewlines:()=>B_,error:()=>gs,escapeHtml:()=>U,escapeRegExp:()=>M_,excludeKeysFromObject:()=>pw,exec:()=>St,exposeBagGlobalScopes:()=>Tf,extendCachedRegistry:()=>Mw,extendStackRegistry:()=>Bl,extractArrayExtend:()=>Ul,faviconLinkKey:()=>ho,fetchLibraryData:()=>xa,fibonacciNumberByIndex:()=>nx,fileEntryUrl:()=>tg,filterArrays:()=>L_,filterArraysFast:()=>D_,finalizeExtends:()=>Jp,findClosestNumber:()=>eg,findClosestNumberInFactory:()=>Ox,findInheritedState:()=>ph,findKeyPosition:()=>$_,flattenExtend:()=>sa,formatDate:()=>tx,generateHash:()=>Vp,generateHeadArrayTags:()=>ka,generateKey:()=>Pl,generateMetaTags:()=>Cx,get:()=>US,getCDNDirUrl:()=>Wh,getCDNUrl:()=>vn,getCapitalCaseKeys:()=>jw,getCdnProviderFromConfig:()=>ya,getChildStateInKey:()=>dh,getChildren:()=>HS,getContext:()=>gf,getCookie:()=>Cw,getDB:()=>wf,getEmotionStylesheet:()=>Fx,getExtendsInElement:()=>Fw,getExtendsStack:()=>$l,getExtendsStackRegistry:()=>Hp,getFrequencyInArray:()=>k_,getFunctionSource:()=>Me,getHashedExtend:()=>jl,getImportMapScript:()=>QS,getInObjectByPath:()=>fw,getLocalStorage:()=>Ow,getNev:()=>bw,getPageMetadata:()=>Tx,getParentStateInKey:()=>uh,getPath:()=>lf,getQuery:()=>Sf,getRef:()=>zS,getRoot:()=>df,getRootContext:()=>hf,getRootData:()=>pf,getRootState:()=>uf,getRootStateInKey:()=>fh,getSpreadChildren:()=>Uw,global:()=>__,hasFunction:()=>se,hasHandlerPlugin:()=>Qi,hasOwnProperty:()=>nw,hashContent:()=>Cn,inheritChildExtends:()=>Gp,inheritChildPropsExtends:()=>qp,inheritParentProps:()=>Kl,inheritRecursiveChildExtends:()=>Yp,initProps:()=>qw,insertAfterImportMap:()=>Ax,installPrunedLibraryIconLoader:()=>jf,is:()=>ye,isArray:()=>I,isBoolean:()=>Pp,isBuiltinElementMethod:()=>H_,isContextComponent:()=>Vw,isCyclic:()=>dw,isDOMNode:()=>ge,isDate:()=>Dp,isDefined:()=>Ut,isDevelopment:()=>ro,isEmpty:()=>$p,isEmptyObject:()=>rw,isEqualDeep:()=>Fp,isFailedRevival:()=>os,isFunction:()=>L,isHtmlElement:()=>dl,isLazyFunction:()=>tw,isLocal:()=>yw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>bs,isMethod:()=>GS,isMobile:()=>vw,isNode:()=>dr,isNot:()=>S_,isNotProduction:()=>pr,isNull:()=>Lp,isNumber:()=>me,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>rx,isPolyglotRetranslatableKey:()=>Xl,isPolyglotWritableKey:()=>cs,isProduction:()=>no,isProtectedElementMethod:()=>ts,isRevived:()=>ss,isStaging:()=>mw,isState:()=>tS,isString:()=>v,isStringFunction:()=>Zi,isStringTag:()=>Tl,isTest:()=>Up,isTesting:()=>gw,isUndefined:()=>Xt,isUniversallyReservedKey:()=>XS,isUnresolvableDependency:()=>uo,isValidDependencyMap:()=>_s,isValidHtmlTag:()=>Pw,isWrappedLibrary:()=>Ne,joinArrays:()=>Ki,jointStacks:()=>Nw,jsonForScript:()=>gr,keys:()=>Fh,libraryIconPruneReplacer:()=>$x,libraryIdentifier:()=>ng,libraryPackageSpecs:()=>wa,librarySpecsFor:()=>Yh,loadCssFile:()=>ax,loadJavascript:()=>cx,loadJavascriptFile:()=>ox,loadJavascriptFileEmbedSync:()=>ix,loadJavascriptFileSync:()=>sx,loadRemoteCSS:()=>lx,loadRemoteScript:()=>ba,log:()=>KS,logGroupIf:()=>Ew,logIf:()=>kw,lookdown:()=>BS,lookdownAll:()=>jS,lookup:()=>FS,lowercaseFirstLetter:()=>Zo,makeObjectWithoutPrototype:()=>ow,map:()=>Z_,mapStringsWithContextComponents:()=>Vl,markPolyglotSeeded:()=>Wn,markRevived:()=>Ji,matchesComponentNaming:()=>Hn,memoize:()=>ww,merge:()=>Lt,mergeSharedLibraries:()=>Of,mergeSharedLibraryDesignSystems:()=>Rf,mergeStateData:()=>so,nextElement:()=>yf,normalizeIgnoreList:()=>Af,normalizeLibraryKey:()=>Ss,objectToString:()=>Cl,objectizeStringProperty:()=>zl,overwrite:()=>Rl,overwriteDeep:()=>ie,overwriteShallow:()=>as,overwriteState:()=>rS,parse:()=>Bh,parseDeep:()=>af,payloadHasComputedIconName:()=>rg,pickStartLang:()=>Hh,pickupElementFromProps:()=>th,pickupPropsFromElement:()=>Qp,planLibraryIconPrune:()=>Nx,polyglotAddressLang:()=>Vh,polyglotFallbackLang:()=>_r,polyglotLangStorageKey:()=>ha,polyglotLanguages:()=>En,polyglotSeededKeys:()=>io,polyglotStartLang:()=>ms,polyglotStartRule:()=>zh,polyglotStartupScript:()=>JS,previousElement:()=>bf,promoteActiveRootState:()=>da,propExists:()=>Ww,propertizeElement:()=>eh,propertizeUpdate:()=>Hw,readBrenderStamp:()=>ds,readJsonDataBlock:()=>qn,remove:()=>O1,removeChars:()=>Lx,removeCookie:()=>Tw,removeDuplicateProps:()=>Gl,removeDuplicatesInArray:()=>qi,removeFromArray:()=>E_,removeFromObject:()=>iw,removeNestedKeyByPath:()=>cw,removeValueFromArray:()=>ml,removeValueFromArrayAll:()=>T_,reorderArrayByValues:()=>R_,repairLegacyArrowScopePreamble:()=>kl,replaceLiteralsWithObjectFields:()=>Jt,replaceOctalEscapeSequences:()=>F_,resolveAsset:()=>_e,resolveFileReferences:()=>vs,resolveHandler:()=>ta,resolveSharedLibraries:()=>Pf,returnValueAsText:()=>rh,runPluginHook:()=>oo,scopeElementParam:()=>Ip,scopeReceiverExpression:()=>Y_,self:()=>w_,setActiveRootState:()=>ff,setCookie:()=>Aw,setHashedExtend:()=>zp,setInObjectByPath:()=>lw,setLocalStorage:()=>Rw,setNodeStyles:()=>$h,setProps:()=>VS,setPropsPrototype:()=>ql,sharedLibrary:()=>hx,sharedLibraryFiles:()=>xs,splitPackageSpecifier:()=>xf,spotByPath:()=>cf,srcsetFor:()=>Ea,stringIncludesAny:()=>_l,stringToObject:()=>ew,stripVersionRangePrefix:()=>kf,swapItemsInArray:()=>v_,syncProps:()=>Yl,themeColorKey:()=>Es,toCamelCase:()=>wr,toDashCase:()=>Bf,toDescriptionCase:()=>Ix,toPriorityOrder:()=>Xe,toTitleCase:()=>Dx,toggleFullscreen:()=>ZS,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>sS,trimStringFromSymbols:()=>N_,unstackArrayOfObjects:()=>gl,update:()=>Kw,updateProps:()=>Gw,variables:()=>_f,verbose:()=>pa,warn:()=>mf,warnLibraryAliasCollision:()=>Sa,window:()=>R});var M=D(()=>{"use strict";jp();Il();Wt();jn();ea();Gi();pl();gO();mO();wl();ul();yO();Lw();Bw();Yw();Zp();CO();IO();es();MO();P1();cS();L1();iS();D1();X_();I1();M1();N1();$1();F1();B1();j1();U1();hR();gR();Jh();wR();Mx();SR();xR()});var $n,Hd,Wd,bb=D(()=>{$n=Object.create(null);$n.open="0";$n.close="1";$n.ping="2";$n.pong="3";$n.message="4";$n.upgrade="5";$n.noop="6";Hd=Object.create(null);Object.keys($n).forEach(t=>{Hd[$n[t]]=t});Wd={type:"error",data:"parser error"}});function qF(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function JF(t,e){if(GF&&t.data instanceof Blob)return t.data.arrayBuffer().then(qF).then(e);if(YF&&(t.data instanceof ArrayBuffer||XF(t.data)))return e(qF(t.data));Kd(t,!1,n=>{xC||(xC=new TextEncoder),e(xC.encode(n))})}var GF,YF,XF,Kd,KF,xC,ZF=D(()=>{bb();GF=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",YF=typeof ArrayBuffer=="function",XF=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Kd=({type:t,data:e},n,r)=>GF&&e instanceof Blob?n?r(e):KF(e,r):YF&&(e instanceof ArrayBuffer||XF(e))?n?r(e):KF(new Blob([e]),r):r($n[t]+(e||"")),KF=(t,e)=>{let n=new FileReader;return n.onload=function(){let r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)}});var QF,qd,tB,eB=D(()=>{QF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<QF.length;t++)qd[QF.charCodeAt(t)]=t;tB=t=>{let e=t.length*.75,n=t.length,r,o=0,s,i,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let l=new ArrayBuffer(e),f=new Uint8Array(l);for(r=0;r<n;r+=4)s=qd[t.charCodeAt(r)],i=qd[t.charCodeAt(r+1)],a=qd[t.charCodeAt(r+2)],c=qd[t.charCodeAt(r+3)],f[o++]=s<<2|i>>4,f[o++]=(i&15)<<4|a>>2,f[o++]=(a&3)<<6|c&63;return l}});var Cq,Gd,Tq,nB,rB=D(()=>{bb();eB();Cq=typeof ArrayBuffer=="function",Gd=(t,e)=>{if(typeof t!="string")return{type:"message",data:nB(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:Tq(t.substring(1),e)}:Hd[n]?t.length>1?{type:Hd[n],data:t.substring(1)}:{type:Hd[n]}:Wd},Tq=(t,e)=>{if(Cq){let n=tB(t);return nB(n,e)}else return{base64:!0,data:t}},nB=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function aB(){return new TransformStream({transform(t,e){JF(t,n=>{let r=n.length,o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);let s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{o=new Uint8Array(9);let s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}function _b(t){return t.reduce((e,n)=>e+n.length,0)}function wb(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),r=0;for(let o=0;o<e;o++)n[o]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function cB(t,e){kC||(kC=new TextDecoder);let n=[],r=0,o=-1,s=!1;return new TransformStream({transform(i,a){for(n.push(i);;){if(r===0){if(_b(n)<1)break;let c=wb(n,1);s=(c[0]&128)===128,o=c[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(_b(n)<2)break;let c=wb(n,2);o=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(_b(n)<8)break;let c=wb(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Wd);break}o=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(_b(n)<o)break;let c=wb(n,o);a.enqueue(Gd(s?c:kC.decode(c),e)),r=0}if(o===0||o>t){a.enqueue(Wd);break}}}})}var oB,sB,iB,kC,EC,zc=D(()=>{ZF();rB();bb();oB="",sB=(t,e)=>{let n=t.length,r=new Array(n),o=0;t.forEach((s,i)=>{Kd(s,!1,a=>{r[i]=a,++o===n&&e(r.join(oB))})})},iB=(t,e)=>{let n=t.split(oB),r=[];for(let o=0;o<n.length;o++){let s=Gd(n[o],e);if(r.push(s),s.type==="error")break}return r};EC=4});function At(t){if(t)return Oq(t)}function Oq(t){for(var e in At.prototype)t[e]=At.prototype[e];return t}var vi=D(()=>{At.prototype.on=At.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};At.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};At.prototype.off=At.prototype.removeListener=At.prototype.removeAllListeners=At.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+t],this};At.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this};At.prototype.emitReserved=At.prototype.emit;At.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};At.prototype.hasListeners=function(t){return!!this.listeners(t).length}});var Kr,pe,lB,Ai=D(()=>{Kr=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),pe=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lB="arraybuffer"});function Sb(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}function qr(t,e){e.useNativeTimers?(t.setTimeoutFn=Rq.bind(pe),t.clearTimeoutFn=Pq.bind(pe)):(t.setTimeoutFn=pe.setTimeout.bind(pe),t.clearTimeoutFn=pe.clearTimeout.bind(pe))}function fB(t){return typeof t=="string"?Dq(t):Math.ceil((t.byteLength||t.size)*Lq)}function Dq(t){let e=0,n=0;for(let r=0,o=t.length;r<o;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function xb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var Rq,Pq,Lq,Ci=D(()=>{Ai();Rq=pe.setTimeout,Pq=pe.clearTimeout;Lq=1.33});function uB(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function dB(t){let e={},n=t.split("&");for(let r=0,o=n.length;r<o;r++){let s=n[r].split("=");e[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return e}var vC=D(()=>{});var kb,Gr,Yd=D(()=>{zc();vi();Ci();vC();kb=class extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}},Gr=class extends At{constructor(e){super(),this.writable=!1,qr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,r){return super.emitReserved("error",new kb(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Gd(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=uB(e);return n.length?"?"+n:""}}});var Hc,AC=D(()=>{Yd();Ci();zc();Hc=class extends Gr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};iB(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,sB(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=xb()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var pB,hB,gB=D(()=>{pB=!1;try{pB=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}hB=pB});function Iq(){}function mB(){for(let t in Wo.requests)Wo.requests.hasOwnProperty(t)&&Wo.requests[t].abort()}function yB(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||hB))return new XMLHttpRequest}catch{}if(!e)try{return new pe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var CC,Wo,Mq,Yr,Eb=D(()=>{AC();vi();Ci();Ai();gB();CC=class extends Hc{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,n){let r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}},Wo=class t extends At{constructor(e,n,r){super(),this.createRequest=e,qr(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var e;let n=Sb(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Iq,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Wo.requestsCount=0;Wo.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mB);else if(typeof addEventListener=="function"){let t="onpagehide"in pe?"pagehide":"unload";addEventListener(t,mB,!1)}}Mq=(function(){let t=yB({xdomain:!1});return t&&t.responseType!==null})(),Yr=class extends CC{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=Mq&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Wo(yB,this.uri(),e)}}});var bB,OC,TC,Xr,vb=D(()=>{Yd();Ci();zc();Ai();bB=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",OC=class extends Gr{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,r=bB?{}:Sb(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;Kd(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}o&&Kr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=xb()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},TC=pe.WebSocket||pe.MozWebSocket,Xr=class extends OC{createSocket(e,n,r){return bB?new TC(e,n,r):n?new TC(e,n):new TC(e)}doWrite(e,n){this.ws.send(n)}}});var Ti,RC=D(()=>{Yd();Ai();zc();Ti=class extends Gr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=cB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),o=aB();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();let s=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),s())}).catch(a=>{})};s();let i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n<e.length;n++){let r=e[n],o=n===e.length-1;this._writer.write(r).then(()=>{o&&Kr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var PC,LC=D(()=>{Eb();vb();RC();PC={websocket:Xr,webtransport:Ti,polling:Yr}});function Wc(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=Nq.exec(t||""),s={},i=14;for(;i--;)s[$q[i]]=o[i]||"";return n!=-1&&r!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Fq(s,s.path),s.queryKey=Bq(s,s.query),s}function Fq(t,e){let n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Bq(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var Nq,$q,DC=D(()=>{Nq=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$q=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var IC,Ab,Oi,Cb,Kc,MC=D(()=>{LC();Ci();vC();DC();vi();zc();Ai();IC=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ab=[];IC&&addEventListener("offline",()=>{Ab.forEach(t=>t())},!1);Oi=class t extends At{constructor(e,n){if(super(),this.binaryType=lB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let r=Wc(e);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Wc(n.host).host);qr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{let o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=dB(this.opts.query)),IC&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ab.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=EC,n.transport=e,this.id&&(n.sid=this.id);let r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){let o=this.writeBuffer[r].data;if(o&&(n+=fB(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Kr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,r){return this._sendPacket("message",e,n,r),this}send(e,n,r){return this._sendPacket("message",e,n,r),this}_sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let s={type:e,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),IC&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=Ab.indexOf(this._offlineEventListener);r!==-1&&Ab.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};Oi.protocol=EC;Cb=class extends Oi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let n=this.createTransport(e),r=!1;Oi.priorWebsocketSuccess=!1;let o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Oi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}let i=u=>{let d=new Error("probe error: "+u);d.transport=n.name,s(),this.emitReserved("upgradeError",d)};function a(){i("transport closed")}function c(){i("socket closed")}function l(u){n&&u.name!==n.name&&s()}let f=()=>{n.removeListener("open",o),n.removeListener("error",i),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",o),n.once("error",i),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}},Kc=class extends Cb{constructor(e,n={}){let r=typeof e=="object"?e:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>PC[o]).filter(o=>!!o)),super(e,r)}}});var Xd,_B=D(()=>{AC();Xd=class extends Hc{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(n=>this.onData(n))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,n){this._fetch(e).then(r=>{if(!r.ok)return this.onError("fetch write error",r.status,r);n()}).catch(r=>{this.onError("fetch write error",r)})}_fetch(e){var n;let r=e!==void 0,o=new Headers(this.opts.extraHeaders);return r&&o.set("content-type","text/plain;charset=UTF-8"),(n=this.socket._cookieJar)===null||n===void 0||n.appendCookies(o),fetch(this.uri(),{method:r?"POST":"GET",body:r?e:null,headers:o,credentials:this.opts.withCredentials?"include":"omit"}).then(s=>{var i;return(i=this.socket._cookieJar)===null||i===void 0||i.parseCookies(s.headers.getSetCookie()),s})}}});var Fpt,Tb=D(()=>{MC();MC();Yd();LC();Ci();DC();Ai();_B();Eb();Eb();vb();vb();RC();Fpt=Kc.protocol});function wB(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Wc(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+e,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}var SB=D(()=>{Tb()});function Zd(t){return jq&&(t instanceof ArrayBuffer||Uq(t))||Vq&&t instanceof Blob||zq&&t instanceof File}function Jd(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Jd(t[n]))return!0;return!1}if(Zd(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Jd(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Jd(t[n]))return!0;return!1}var jq,Uq,xB,Vq,zq,NC=D(()=>{jq=typeof ArrayBuffer=="function",Uq=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,xB=Object.prototype.toString,Vq=typeof Blob=="function"||typeof Blob<"u"&&xB.call(Blob)==="[object BlobConstructor]",zq=typeof File=="function"||typeof File<"u"&&xB.call(File)==="[object FileConstructor]"});function kB(t){let e=[],n=t.data,r=t;return r.data=$C(n,e),r.attachments=e.length,{packet:r,buffers:e}}function $C(t,e){if(!t)return t;if(Zd(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=$C(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){let n={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=$C(t[r],e));return n}return t}function EB(t,e){return t.data=FC(t.data,e),delete t.attachments,t}function FC(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=FC(t[n],e);else if(typeof t=="object")for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=FC(t[n],e));return t}var vB=D(()=>{NC()});var CB=Qb((rht,AB)=>{var qc=1e3,Gc=qc*60,Yc=Gc*60,Ri=Yc*24,Hq=Ri*7,Wq=Ri*365.25;AB.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Kq(t);if(n==="number"&&isFinite(t))return e.long?Gq(t):qq(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Kq(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Wq;case"weeks":case"week":case"w":return n*Hq;case"days":case"day":case"d":return n*Ri;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Yc;case"minutes":case"minute":case"mins":case"min":case"m":return n*Gc;case"seconds":case"second":case"secs":case"sec":case"s":return n*qc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function qq(t){var e=Math.abs(t);return e>=Ri?Math.round(t/Ri)+"d":e>=Yc?Math.round(t/Yc)+"h":e>=Gc?Math.round(t/Gc)+"m":e>=qc?Math.round(t/qc)+"s":t+"ms"}function Gq(t){var e=Math.abs(t);return e>=Ri?Ob(t,e,Ri,"day"):e>=Yc?Ob(t,e,Yc,"hour"):e>=Gc?Ob(t,e,Gc,"minute"):e>=qc?Ob(t,e,qc,"second"):t+" ms"}function Ob(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var OB=Qb((oht,TB)=>{function Yq(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=CB(),n.destroy=l,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let u=0;for(let d=0;d<f.length;d++)u=(u<<5)-u+f.charCodeAt(d),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=e;function n(f){let u,d=null,p,g;function h(...m){if(!h.enabled)return;let y=h,x=Number(new Date),E=x-(u||x);y.diff=E,y.prev=u,y.curr=x,u=x,m[0]=n.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let C=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(b,w)=>{if(b==="%%")return"%";C++;let S=n.formatters[w];if(typeof S=="function"){let A=m[C];b=S.call(y,A),m.splice(C,1),C--}return b}),n.formatArgs.call(y,m),(y.log||n.log).apply(y,m)}return h.namespace=f,h.useColors=n.useColors(),h.color=n.selectColor(f),h.extend=r,h.destroy=n.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==n.namespaces&&(p=n.namespaces,g=n.enabled(f)),g),set:m=>{d=m}}),typeof n.init=="function"&&n.init(h),h}function r(f,u){let d=n(this.namespace+(typeof u>"u"?":":u)+f);return d.log=this.log,d}function o(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let u=(typeof f=="string"?f:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function s(f,u){let d=0,p=0,g=-1,h=0;for(;d<f.length;)if(p<u.length&&(u[p]===f[d]||u[p]==="*"))u[p]==="*"?(g=p,h=d,p++):(d++,p++);else if(g!==-1)p=g+1,h++,d=h;else return!1;for(;p<u.length&&u[p]==="*";)p++;return p===u.length}function i(){let f=[...n.names,...n.skips.map(u=>"-"+u)].join(",");return n.enable(""),f}function a(f){for(let u of n.skips)if(s(f,u))return!1;for(let u of n.names)if(s(f,u))return!0;return!1}function c(f){return f instanceof Error?f.stack||f.message:f}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}TB.exports=Yq});var RB=Qb((Re,Rb)=>{Re.formatArgs=Jq;Re.save=Zq;Re.load=Qq;Re.useColors=Xq;Re.storage=tG();Re.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Re.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Xq(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Jq(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Rb.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}Re.log=console.debug||console.log||(()=>{});function Zq(t){try{t?Re.storage.setItem("debug",t):Re.storage.removeItem("debug")}catch{}}function Qq(){let t;try{t=Re.storage.getItem("debug")||Re.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function tG(){try{return localStorage}catch{}}Rb.exports=OB()(Re);var{formatters:eG}=Rb.exports;eG.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var HC={};F(HC,{Decoder:()=>UC,Encoder:()=>jC,PacketType:()=>et,isPacketValid:()=>sG,protocol:()=>zC});function nG(t){return typeof t=="string"}function rG(t){return t===void 0||DB(t)}function Pb(t){return Object.prototype.toString.call(t)==="[object Object]"}function oG(t,e){switch(t){case et.CONNECT:return e===void 0||Pb(e);case et.DISCONNECT:return e===void 0;case et.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&LB.indexOf(e[0])===-1);case et.ACK:return Array.isArray(e);case et.CONNECT_ERROR:return typeof e=="string"||Pb(e);default:return!1}}function sG(t){return nG(t.nsp)&&rG(t.id)&&oG(t.type,t.data)}var PB,BC,LB,zC,et,jC,UC,VC,DB,Lb=D(()=>{vi();vB();NC();PB=$T(RB(),1),BC=(0,PB.default)("socket.io-parser"),LB=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],zC=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(et||(et={}));jC=class{constructor(e){this.replacer=e}encode(e){return BC("encoding packet %j",e),(e.type===et.EVENT||e.type===et.ACK)&&Jd(e)?this.encodeAsBinary({type:e.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===et.BINARY_EVENT||e.type===et.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),BC("encoded %j as %s",e,n),n}encodeAsBinary(e){let n=kB(e),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}},UC=class t extends At{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new VC(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Zd(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,r={type:Number(e.charAt(0))};if(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let i=e.substring(s,n);if(i!=Number(i)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let a=Number(i);if(!DB(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=a}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(s,n)}else r.nsp="/";let o=e.charAt(n+1);if(o!==""&&Number(o)==o){let s=n+1;for(;++n;){let i=e.charAt(n);if(i==null||Number(i)!=i){--n;break}if(n===e.length)break}r.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return BC("decoded %s as %j",e,r),r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case et.CONNECT:return Pb(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||Pb(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&LB.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},VC=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=EB(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};DB=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function We(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var WC=D(()=>{});var iG,Pi,KC=D(()=>{Lb();WC();vi();iG=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Pi=class extends At{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[We(e,"open",this.onopen.bind(this)),We(e,"packet",this.onpacket.bind(this)),We(e,"error",this.onerror.bind(this)),We(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var r,o,s;if(iG.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let i={type:et.EVENT,data:n};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let f=this.ids++,u=n.pop();this._registerAckCallback(f,u),i.id=f}let a=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,n){var r;let o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},o),i=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...n){return new Promise((r,o)=>{let s=(i,a)=>i?o(i):r(a);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...s)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:et.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){let r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case et.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case et.EVENT:case et.BINARY_EVENT:this.onevent(e);break;case et.ACK:case et.BINARY_ACK:this.onack(e);break;case et.DISCONNECT:this.ondisconnect();break;case et.CONNECT_ERROR:this.destroy();let r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,r=!1;return function(...o){r||(r=!0,n.packet({type:et.ACK,id:e,data:o}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let r of n)r.apply(this,e.data)}}}});function Li(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}var IB=D(()=>{Li.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Li.prototype.reset=function(){this.attempts=0};Li.prototype.setMin=function(t){this.ms=t};Li.prototype.setMax=function(t){this.max=t};Li.prototype.setJitter=function(t){this.jitter=t}});var Di,MB=D(()=>{Tb();KC();Lb();WC();IB();vi();Di=class extends At{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,qr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Li({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let o=n.parser||HC;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Kc(this.uri,this.opts);let n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let o=We(n,"open",function(){r.onopen(),e&&e()}),s=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},i=We(n,"error",s);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(We(e,"ping",this.onping.bind(this)),We(e,"data",this.ondata.bind(this)),We(e,"error",this.onerror.bind(this)),We(e,"close",this.onclose.bind(this)),We(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){Kr(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new Pi(this,e,n),this.nsps[e]=r),r}_destroy(e){let n=Object.keys(this.nsps);for(let r of n)if(this.nsps[r].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});var NB={};F(NB,{Fetch:()=>Xd,Manager:()=>Di,NodeWebSocket:()=>Xr,NodeXHR:()=>Yr,Socket:()=>Pi,WebSocket:()=>Xr,WebTransport:()=>Ti,XHR:()=>Yr,connect:()=>Db,default:()=>Db,io:()=>Db,protocol:()=>zC});function Db(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=wB(t,e.path||"/socket.io"),r=n.source,o=n.id,s=n.path,i=Qd[o]&&s in Qd[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||i,c;return a?c=new Di(r,e):(Qd[o]||(Qd[o]=new Di(r,e)),c=Qd[o]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}var Qd,$B=D(()=>{SB();MB();KC();Lb();Tb();Qd={};Object.assign(Db,{Manager:Di,Socket:Pi,io:Db,connect:Db})});var MT={};F(MT,{ANIMATION_PROPS:()=>kk,ARIA_ROLES:()=>kH,ATTR_TRANSFORMS:()=>Oo,BARE_SEQUENCE_TOKEN_RE:()=>Rn,BLOCK_PROPS:()=>Ek,BREAKPOINTS_CONTAINER_NAME:()=>lL,BREAKPOINT_PROPS:()=>Lk,BRENDER_REGISTRY_BLOCK:()=>Df,BRENDER_REGISTRY_TREE_BLOCK:()=>If,BRENDER_STAMP_META:()=>Qh,CDN_PROVIDERS:()=>Qe,COMPOUND_CSS_KEYWORDS:()=>Ts,CONFIG:()=>Ls,CONFIG_MERGE_EXL:()=>ae,CSS_LONGHAND_SHORTHANDS:()=>an,CSS_NAMED_COLOR_HEX:()=>Aa,CSS_NATIVE_COLOR_REGEX:()=>Sr,CSS_PROPS_REGISTRY:()=>xt,CSS_SHORTHAND_LONGHANDS:()=>vt,CSS_UNITS:()=>Wi,DEFAULT_CONFIG:()=>ai,DEFAULT_CSS_PROPERTIES_LIST:()=>Bt,DELEGATED_EVENTS:()=>Qa,DESIGN_SYSTEM_BLOCK:()=>Ff,DESIGN_SYSTEM_DEFERRED:()=>$f,DESIGN_SYSTEM_LINK:()=>Nf,DESIGN_SYSTEM_OPTIONS:()=>oT,DOMQL_EVENTS:()=>W_,DOMQ_PROPERTIES:()=>Qr,DOM_EVENTS:()=>ZL,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Yi,ENV:()=>hw,FACTORY:()=>$e,FLEX_PROPS:()=>Ok,FONT_PROPS:()=>vk,GRID_PROPS:()=>Rk,HOST_REGISTERED_PACKAGES:()=>P3,HTML_ATTRIBUTES:()=>$r,HTML_TAGS:()=>na,LIBRARY_PACKAGES:()=>Xh,LIBRARY_SCOPES_KEY:()=>ws,LIFECYCLE_EVENTS:()=>Jn,LIVE_KEYS:()=>z0,METHODS:()=>eo,METHODS_EXL:()=>xl,MISC_PROPS:()=>Ak,MIXINS:()=>rm,NODE_ENV:()=>Sn,OPTIONS:()=>Jl,PACKAGE_MANAGER_TO_CDN:()=>fo,PARSED_DOMQ_PROPERTIES:()=>Sl,POLYGLOT_LANG_STORAGE_KEY:()=>Uh,POSITION_PROPS:()=>Ck,PREPARED_FORMAT:()=>Wa,PRERENDER_REGISTRY_FORMATS:()=>cT,PROPS_METHODS:()=>to,REGISTRY:()=>Gt,RESERVED_STORE_METHODS:()=>GT,REVIVED_MARK:()=>Ol,ROUTER_OPTIONS:()=>jb,SIGNAL_ENGINE_KEY:()=>zi,SIGNAL_INSTANCES_KEY:()=>Ui,STANDARD_SCHEME_QUERIES:()=>Og,STATE_DATA_MERGE_EXL:()=>gh,STATE_PROPERTIES:()=>z_,STORE_METHOD_NAMES:()=>qT,SVG_TAGS:()=>ic,THEME_PROPS:()=>Tk,TILING_POSITION_KEYWORDS:()=>Ru,TILING_SIZE_KEYWORDS:()=>Ou,TIMING_PROPS:()=>Wu,TYPES:()=>hl,UNIVERSAL_RESERVED_KEYS:()=>jh,VALUE_TRANSFORMERS:()=>Vg,VERSION:()=>FP,__resetBuiltinMethodWarnings:()=>gx,__resetSignalEngine:()=>y_,__resetSignalInstances:()=>g_,__resetSkinWarnings:()=>B0,__resetStateShadowWarnings:()=>YT,activateConfig:()=>CR,addCaching:()=>lh,addContext:()=>ch,addDelegatedEvent:()=>Uu,addExtend:()=>$w,addExtends:()=>Vn,addItemAfterEveryElement:()=>O_,addMethods:()=>fc,addProtoToArray:()=>yl,addRef:()=>sh,adoptPrepared:()=>vA,aliasCaseVariants:()=>Ia,alternateLinkKey:()=>ks,animation:()=>l0,appendSVGSprite:()=>vu,appendSvgIconsSprite:()=>zs,applyAttrTransforms:()=>rE,applyCSS:()=>CA,applyDependentState:()=>nS,applyDocument:()=>Eu,applyEvent:()=>mh,applyEventUpdate:()=>yh,applyExtends:()=>rc,applyHeadings:()=>Ig,applyInitialState:()=>xm,applyMediaSequenceVars:()=>bo,applyProps:()=>Hl,applyReset:()=>Au,applySequenceGlobalVars:()=>au,applySequenceVars:()=>Cr,applySkins:()=>Cu,applySpacingSequence:()=>du,applyStateMethods:()=>Ae,applyThemeRoot:()=>Du,applyTimingSequence:()=>ku,applyTrueProps:()=>$k,applyTypographySequence:()=>wu,arrayContainsOtherArray:()=>x_,arraysEqual:()=>P_,arrayzeValue:()=>As,assertEmitIntegrity:()=>ak,atSchemes:()=>So,bareLibraryKey:()=>vf,batch:()=>Ap,bindLibraryGlobalScopes:()=>Cf,breakpoints:()=>a0,breakpointsContainerName:()=>gm,brenderRegistryBlock:()=>Sx,brenderRegistryTreeBlock:()=>xx,brenderStampMeta:()=>vx,buildImgSrcset:()=>Uf,buildSkinVarStyles:()=>Hs,buildSourcesAndImg:()=>Vf,buildThemeVarStyles:()=>Ay,cache:()=>aS,cacheNode:()=>Co,call:()=>qS,callStateMethod:()=>Ju,camelToAttr:()=>Fr,camelToLowerAttr:()=>nD,captureSnapshot:()=>YS,changeGlobalTheme:()=>zg,changeLightness:()=>Hx,checkAttributeByTagName:()=>pn,checkEventFunctions:()=>nE,checkForStateTypes:()=>Zw,checkIfBoxSize:()=>uu,checkIfInherits:()=>hh,checkIfStringIsInArray:()=>I_,class:()=>h0,clone:()=>Q_,cloneAndMergeArrayExtend:()=>Nl,cloneFunction:()=>Sw,collectExtendsList:()=>ra,color:()=>t0,colorPairSchemes:()=>fu,colorStringToRgbaArray:()=>tn,components:()=>Lc,compositeOverBackdrop:()=>Rs,compoundLayers:()=>Ta,concatAddExtends:()=>Iw,containerBreakpointQuery:()=>Pk,contrastRatio:()=>Ra,convertSvgToSymbol:()=>lu,copyJavaScriptToClipboard:()=>Px,copyStringToClipboard:()=>Rx,countUntrackedReads:()=>Tp,create:()=>PT,createAsync:()=>wX,createBasedOnType:()=>oh,createComputed:()=>WT,createConfig:()=>tu,createDefine:()=>bj,createDomqlElement:()=>fp,createEffect:()=>K,createElement:()=>Jw,createElementExtends:()=>Kp,createExtends:()=>Fl,createExtendsFromKeys:()=>oa,createExtendsStack:()=>Xp,createHTMLNode:()=>sc,createIfConditionFlag:()=>xw,createInheritedState:()=>Qw,createKey:()=>Dl,createNestedObject:()=>aw,createNestedObjectByKeyPath:()=>eS,createObjectWithoutPrototype:()=>Bp,createParent:()=>ih,createPath:()=>ah,createPristineConfig:()=>vg,createProps:()=>Wl,createPropsStack:()=>nh,createPrunedLibraryIconLoader:()=>og,createRoot:()=>Xw,createScope:()=>oS,createScopeStore:()=>Op,createSignal:()=>wn,createSkeleton:()=>xX,createSnapshotId:()=>Ll,createState:()=>Xk,createStore:()=>lr,createSync:()=>SX,css:()=>Ue,cssCamelName:()=>Fu,cssMediaVars:()=>kg,cssPropName:()=>Ee,cssShorthandDepth:()=>Ka,cssShorthandStatesLonghand:()=>qa,cssShorthandStatesThemeLonghand:()=>Iu,cssVars:()=>xg,currentPathname:()=>ys,customDecodeURIComponent:()=>V_,customEncodeURIComponent:()=>U_,cutArrayAfterValue:()=>C_,cutArrayBeforeValue:()=>A_,debounce:()=>Ml,debounceOnContext:()=>_w,decodeBrenderRegistry:()=>Mf,decodeNewlines:()=>j_,deepClone:()=>pt,deepContains:()=>sw,deepDefaults:()=>_a,deepDestringifyFunctions:()=>be,deepExtend:()=>Wp,deepMerge:()=>bt,deepMergeExtends:()=>zn,deepStringifyFunctions:()=>Al,defaultDefine:()=>Jc,defineResolvedThemeSignal:()=>yo,defineSetter:()=>WS,defineThemeSignal:()=>mo,designSystemBlock:()=>Ex,designSystemLink:()=>kx,destringifyGlobalScope:()=>is,destroy:()=>Ii,detectHeightOnInit:()=>ex,detectInfiniteLoop:()=>uw,detectTag:()=>Qn,devices:()=>c0,dispose:()=>dn,effectiveGlobalTheme:()=>Cy,encodeBrenderRegistry:()=>Zh,encodeNewlines:()=>B_,error:()=>gs,escapeHtml:()=>U,escapeRegExp:()=>M_,excludeKeysFromObject:()=>pw,exec:()=>St,executeAttr:()=>LH,exetuteClassPerComponent:()=>eH,exposeBagGlobalScopes:()=>Tf,extendCachedRegistry:()=>Mw,extendStackRegistry:()=>Bl,extractArrayExtend:()=>Ul,extractConditionalAttrs:()=>oE,faviconLinkKey:()=>ho,fetchLibraryData:()=>xa,fibonacciNumberByIndex:()=>nx,fileEntryUrl:()=>tg,filterArrays:()=>L_,filterArraysFast:()=>D_,filterAttributesByTagName:()=>PH,finalizeExtends:()=>Jp,findClosestNumber:()=>eg,findClosestNumberInFactory:()=>Ox,findHeadingLetter:()=>Cg,findHeadings:()=>iu,findInheritedState:()=>ph,findKeyPosition:()=>$_,flattenExtend:()=>sa,font:()=>Gx,fontFace:()=>Jx,fontFamily:()=>Yx,fontFamilyTypes:()=>Xx,forcedScheme:()=>Bs,formatDate:()=>tx,generateHash:()=>Vp,generateHeadArrayTags:()=>ka,generateKey:()=>Pl,generateMetaTags:()=>Cx,generateSequence:()=>we,generateSequencePosition:()=>k0,generateSprite:()=>cu,generateSubSequence:()=>ou,get:()=>US,getActiveConfig:()=>P,getActiveDocument:()=>Xn,getActiveLang:()=>Bi,getCDNDirUrl:()=>Wh,getCDNUrl:()=>vn,getCacheSize:()=>dk,getCapitalCaseKeys:()=>jw,getCdnProviderFromConfig:()=>ya,getChildStateInKey:()=>dh,getChildren:()=>HS,getColor:()=>dt,getColorShade:()=>lg,getContext:()=>gf,getCookie:()=>Cw,getDB:()=>wf,getDefaultOrFirstKey:()=>kr,getEmitStats:()=>em,getEmotionStylesheet:()=>Fx,getExtendsInElement:()=>Fw,getExtendsStack:()=>$l,getExtendsStackRegistry:()=>Hp,getFnPrefixAndValue:()=>Ar,getFontFace:()=>Kx,getFontFaceEach:()=>Ps,getFontFaceEachString:()=>bg,getFontFaceString:()=>Yf,getFontFamily:()=>_u,getFontFormat:()=>mg,getFontSizeByKey:()=>Su,getFrequencyInArray:()=>k_,getFunctionSource:()=>Me,getHashedExtend:()=>jl,getImportMapScript:()=>QS,getInObjectByPath:()=>fw,getLanguages:()=>rp,getLocalStateLang:()=>ap,getLocalStorage:()=>Ow,getMediaBorder:()=>gu,getMediaColor:()=>Kt,getMediaTheme:()=>sn,getNev:()=>bw,getObserver:()=>Ie,getPageMetadata:()=>Tx,getParentStateInKey:()=>uh,getPath:()=>lf,getPendingLang:()=>np,getQuery:()=>Sf,getRef:()=>zS,getResolvedThemeSignal:()=>AR,getRgbTone:()=>On,getRoot:()=>df,getRootContext:()=>hf,getRootData:()=>pf,getRootState:()=>uf,getRootStateInKey:()=>fh,getSafeInk:()=>Lg,getSafeInkInfo:()=>O0,getSequenceValue:()=>Ds,getSequenceValueBySymbols:()=>su,getSequenceValuePropertyPair:()=>Yn,getShadow:()=>hu,getShapeByKey:()=>xu,getSignals:()=>KT,getSizeValue:()=>Ma,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Vt,getSpreadChildren:()=>Uw,getSubratio:()=>ru,getSubratioDifference:()=>nu,getSystemGlobalTheme:()=>fe,getTheme:()=>D0,getThemeSignal:()=>vR,getTimingByKey:()=>Se,getTimingFunction:()=>Be,global:()=>__,gradient:()=>e0,grid:()=>p0,hasFunction:()=>se,hasHandlerPlugin:()=>Qi,hasOwnProperty:()=>nw,hashContent:()=>Cn,hexToRgb:()=>jx,hexToRgbArray:()=>sg,hexToRgba:()=>Vx,hslToRgb:()=>cg,icons:()=>o0,inForcedColors:()=>Is,inheritChildExtends:()=>Gp,inheritChildPropsExtends:()=>qp,inheritParentProps:()=>Kl,inheritRecursiveChildExtends:()=>Yp,init:()=>cr,initPolyglot:()=>zb,initProps:()=>qw,injectGlobal:()=>Ot,insertAfterImportMap:()=>Ax,installPrunedLibraryIconLoader:()=>jf,is:()=>ye,isArray:()=>I,isBoolean:()=>Pp,isBuiltinElementMethod:()=>H_,isCSSVar:()=>Ft,isContextComponent:()=>Vw,isCyclic:()=>dw,isDOMNode:()=>ge,isDate:()=>Dp,isDefined:()=>Ut,isDevelopment:()=>ro,isDomDocument:()=>fr,isEmpty:()=>$p,isEmptyObject:()=>rw,isEnumeratedTrueFalseAttr:()=>ti,isEqualDeep:()=>Fp,isFailedRevival:()=>os,isForcedColorsQuery:()=>Ms,isFunction:()=>L,isGoogleFontsUrl:()=>Pa,isHostObject:()=>ur,isHtmlElement:()=>dl,isInertCompoundValue:()=>ug,isIntendedSystemColorWord:()=>Ns,isLazyFunction:()=>tw,isLocal:()=>yw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>bs,isMethod:()=>GS,isMobile:()=>vw,isNativeColorToken:()=>Os,isNode:()=>dr,isNot:()=>S_,isNotProduction:()=>pr,isNull:()=>Lp,isNumber:()=>me,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>rx,isPlainColor:()=>wo,isPolyglotRetranslatableKey:()=>Xl,isPolyglotWritableKey:()=>cs,isProduction:()=>no,isProtectedElementMethod:()=>ts,isRawUnitValue:()=>fl,isResolvedColor:()=>en,isRevived:()=>ss,isScalingUnit:()=>Jo,isStaging:()=>mw,isState:()=>tS,isStore:()=>Et,isString:()=>v,isStringFunction:()=>Zi,isStringTag:()=>Tl,isSvgTag:()=>Nr,isTest:()=>Up,isTesting:()=>gw,isTracking:()=>Zk,isUndefined:()=>Xt,isUniversallyReservedKey:()=>XS,isUnresolvableDependency:()=>uo,isValidDependencyMap:()=>_s,isValidHtmlTag:()=>Pw,isValidTag:()=>oc,isWasmLoaded:()=>I2,isWrappedLibrary:()=>Ne,isWritableFamilyBucket:()=>b_,joinArrays:()=>Ki,joinCompoundLayers:()=>Oa,jointStacks:()=>Nw,jsonForScript:()=>gr,keyframes:()=>Za,keys:()=>Fh,libraryIconPruneReplacer:()=>$x,libraryIdentifier:()=>ng,libraryPackageSpecs:()=>wa,librarySpecsFor:()=>Yh,linearChannelToSrgb:()=>pg,literalPairCompound:()=>js,literalSchemeMap:()=>Or,loadCssFile:()=>ax,loadJavascript:()=>cx,loadJavascriptFile:()=>ox,loadJavascriptFileEmbedSync:()=>ix,loadJavascriptFileSync:()=>sx,loadRemoteCSS:()=>lx,loadRemoteScript:()=>ba,loadTranslations:()=>Fi,loadWasm:()=>D2,log:()=>KS,logGroupIf:()=>Ew,logIf:()=>kw,lookdown:()=>BS,lookdownAll:()=>jS,lookup:()=>FS,lowercaseFirstLetter:()=>Zo,makeObjectWithoutPrototype:()=>ow,map:()=>Z_,mapStringsWithContextComponents:()=>Vl,markPolyglotSeeded:()=>Wn,markRevived:()=>Ji,matchesComponentNaming:()=>Hn,media:()=>Zx,memoize:()=>ww,merge:()=>Lt,mergeSharedLibraries:()=>Of,mergeSharedLibraryDesignSystems:()=>Rf,mergeStateData:()=>so,mixTwoColors:()=>Bx,mixTwoRgb:()=>zx,mixTwoRgba:()=>fg,nextElement:()=>yf,normalizeIgnoreList:()=>Af,normalizeLibraryKey:()=>Ss,numToLetterMap:()=>rn,objectToString:()=>Cl,objectizeStringProperty:()=>zl,oklabToLinearSrgb:()=>hg,oklabToOklch:()=>Kf,oklchToGamutSafeSrgb:()=>qf,oklchToOklab:()=>gg,opacify:()=>Ca,overwrite:()=>Rl,overwriteDeep:()=>ie,overwriteShallow:()=>as,overwriteState:()=>rS,parkHostObject:()=>Zr,parse:()=>Bh,parseColorToken:()=>te,parseDeep:()=>af,payloadHasComputedIconName:()=>rg,pickStartLang:()=>Hh,pickupElementFromProps:()=>th,pickupPropsFromElement:()=>Qp,planLibraryIconPrune:()=>Nx,polyglotAddressLang:()=>Vh,polyglotFallbackLang:()=>_r,polyglotFunctions:()=>cp,polyglotLangStorageKey:()=>ha,polyglotLanguages:()=>En,polyglotPlugin:()=>tl,polyglotSeededKeys:()=>io,polyglotStartLang:()=>ms,polyglotStartRule:()=>zh,polyglotStartupScript:()=>JS,popConfig:()=>ht,popStaticCssPass:()=>hm,prepareContext:()=>OT,previousElement:()=>bf,promoteActiveRootState:()=>da,propExists:()=>Ww,propertizeElement:()=>eh,propertizeUpdate:()=>Hw,pushConfig:()=>mt,pushStaticCssPass:()=>pm,quietColorProbe:()=>$s,quietSequenceProbe:()=>vr,readBrenderStamp:()=>ds,readJsonDataBlock:()=>qn,recordRules:()=>Bu,refreshContextProto:()=>uc,registerEvent:()=>ec,registerHostPackages:()=>L3,registerSignalInstance:()=>Vi,reinit:()=>AA,relativeLuminance:()=>Cs,remove:()=>lc,removeChars:()=>Lx,removeCookie:()=>Tw,removeDelegatedEvent:()=>Vu,removeDuplicateProps:()=>Gl,removeDuplicatesInArray:()=>qi,removeFromArray:()=>E_,removeFromObject:()=>iw,removeNestedKeyByPath:()=>cw,removeValueFromArray:()=>ml,removeValueFromArrayAll:()=>T_,reorderArrayByValues:()=>R_,repairLegacyArrowScopePreamble:()=>kl,replaceLiteralsWithObjectFields:()=>Jt,replaceOctalEscapeSequences:()=>F_,replayRules:()=>ju,resetEmitStats:()=>ik,resolveAsset:()=>_e,resolveBorderValue:()=>ce,resolveColorRgb:()=>Fs,resolveColorsInGradient:()=>ko,resolveCompoundWords:()=>xr,resolveConfigDocument:()=>Hi,resolveDesignSystemClass:()=>yL,resolveFileReferences:()=>vs,resolveFileSource:()=>eE,resolveFileUrl:()=>nn,resolveGridTracks:()=>cL,resolveHandler:()=>ta,resolvePropValue:()=>To,resolveShadowNonColorWord:()=>$a,resolveShadowValue:()=>Us,resolveSharedLibraries:()=>Pf,resolveStyleBlockTokens:()=>Bk,returnSubThemeOrDefault:()=>Wx,returnValueAsText:()=>rh,reviveConfig:()=>Kg,rgbArrayToHex:()=>ig,rgbToHSL:()=>ag,rgbToHex:()=>Ux,runPluginHook:()=>oo,runThroughMedia:()=>Dg,schemeGuardSelector:()=>Pg,schemeMediaQuery:()=>Rg,scopeElementParam:()=>Ip,scopeReceiverExpression:()=>Y_,scratchDefaultConfig:()=>Da,scratchSystem:()=>Ua,scratchUtils:()=>_o,self:()=>w_,semanticIcons:()=>s0,sequence:()=>Er,serializeAttrValue:()=>nr,serializeConfig:()=>Wg,set:()=>Ks,setActiveConfig:()=>Eg,setActiveDocument:()=>sk,setActiveRootState:()=>ff,setAdaptiveSchemeVar:()=>xo,setClass:()=>e7,setClassname:()=>nH,setColor:()=>Tr,setCookie:()=>Aw,setCssEngineHook:()=>vy,setCustomFont:()=>Gf,setCustomFontMedia:()=>go,setEach:()=>Lu,setFont:()=>bu,setFontFamily:()=>Ba,setFontImport:()=>La,setGradient:()=>Na,setHashedExtend:()=>zp,setInCustomFontMedia:()=>yg,setInObjectByPath:()=>lw,setLang:()=>sp,setLocalStorage:()=>Rw,setMediaTheme:()=>Fa,setNodeStyles:()=>$h,setObserver:()=>cl,setProps:()=>VS,setPropsPrototype:()=>ql,setSVG:()=>ja,setScalingVar:()=>eu,setShadow:()=>Eo,setSubScalingVar:()=>Ag,setSvgIcon:()=>Vs,setTheme:()=>mu,setValue:()=>V0,setVariables:()=>E0,setWasmEngine:()=>$u,settled:()=>Cp,shadow:()=>r0,shape:()=>y0,sharedLibrary:()=>hx,sharedLibraryFiles:()=>xs,sizes:()=>m0,skins:()=>b0,spacing:()=>Qx,splitCompoundWords:()=>Hf,splitPackageSpecifier:()=>xf,splitSelectorList:()=>Ir,splitSpacedValue:()=>pu,splitTopLevelCommas:()=>Tn,splitTopLevelSpaces:()=>ut,splitTransition:()=>Ug,spotByPath:()=>cf,srcsetFor:()=>Ea,srgbChannelToLinear:()=>dg,srgbToOklab:()=>Wf,stringIncludesAny:()=>_l,stringToObject:()=>ew,stripVersionRangePrefix:()=>kf,svg:()=>f0,svgData:()=>_g,svg_data:()=>u0,swapItemsInArray:()=>v_,syncProps:()=>Yl,templates:()=>d0,theme:()=>n0,themeColorKey:()=>Es,timing:()=>i0,toCamel:()=>Qf,toCamelCase:()=>wr,toDashCase:()=>Bf,toDescriptionCase:()=>Ix,toLinearChannel:()=>va,toPriorityOrder:()=>Xe,toTitleCase:()=>Dx,toggleFullscreen:()=>ZS,transformBackgroundImage:()=>Fg,transformBorder:()=>Mg,transformBorderRadius:()=>Rr,transformBoxShadow:()=>Tu,transformClassname:()=>_L,transformDuration:()=>Pu,transformGridTemplate:()=>jg,transformShadow:()=>$g,transformSize:()=>Nt,transformSizeRatio:()=>j,transformTextStroke:()=>Ng,transformTilingValue:()=>Ws,transformTransition:()=>U0,transformersByPrefix:()=>Fk,transfromGap:()=>Bg,translate:()=>op,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>sS,trimStringFromSymbols:()=>N_,typography:()=>Xf,unit:()=>qx,unstackArrayOfObjects:()=>gl,untrack:()=>Xo,update:()=>cc,updateProps:()=>Gw,updateVars:()=>t7,upsertTranslation:()=>ip,useCssInProps:()=>ee,useHostState:()=>Jk,usePropsAsCSS:()=>mL,useSelectorsAsCSS:()=>bL,variables:()=>_f,vars:()=>g0,verbose:()=>pa,viewTransition:()=>_0,warn:()=>mf,warnLibraryAliasCollision:()=>Sa,warnStateKeyShadowsMethod:()=>Rp,window:()=>R,wrapHoverRule:()=>Dr});module.exports=Q3(MT);Mt();var nm={};F(nm,{CSS_LONGHAND_SHORTHANDS:()=>an,CSS_SHORTHAND_LONGHANDS:()=>vt,assertEmitIntegrity:()=>ak,css:()=>Ue,cssCamelName:()=>Fu,cssPropName:()=>Ee,cssShorthandDepth:()=>Ka,cssShorthandStatesLonghand:()=>qa,cssShorthandStatesThemeLonghand:()=>Iu,getActiveDocument:()=>Xn,getCacheSize:()=>dk,getEmitStats:()=>em,injectGlobal:()=>Ot,keyframes:()=>Za,recordRules:()=>Bu,replayRules:()=>ju,reset:()=>$P,resetEmitStats:()=>ik,setActiveDocument:()=>sk,setWasmEngine:()=>$u,splitSelectorList:()=>Ir,wrapHoverRule:()=>Dr});var H0={};F(H0,{BARE_SEQUENCE_TOKEN_RE:()=>Rn,COMPOUND_CSS_KEYWORDS:()=>Ts,CONFIG:()=>Ls,CONFIG_MERGE_EXL:()=>ae,CSS_NAMED_COLOR_HEX:()=>Aa,CSS_NATIVE_COLOR_REGEX:()=>Sr,CSS_UNITS:()=>Wi,FACTORY:()=>$e,LIVE_KEYS:()=>z0,PREPARED_FORMAT:()=>Wa,STANDARD_SCHEME_QUERIES:()=>Og,TILING_POSITION_KEYWORDS:()=>Ru,TILING_SIZE_KEYWORDS:()=>Ou,VALUE_TRANSFORMERS:()=>Vg,__resetSkinWarnings:()=>B0,activateConfig:()=>CR,aliasCaseVariants:()=>Ia,animation:()=>l0,appendSVGSprite:()=>vu,appendSvgIconsSprite:()=>zs,applyDocument:()=>Eu,applyHeadings:()=>Ig,applyMediaSequenceVars:()=>bo,applyReset:()=>Au,applySequenceGlobalVars:()=>au,applySequenceVars:()=>Cr,applySkins:()=>Cu,applySpacingSequence:()=>du,applyThemeRoot:()=>Du,applyTimingSequence:()=>ku,applyTypographySequence:()=>wu,atSchemes:()=>So,breakpoints:()=>a0,buildSkinVarStyles:()=>Hs,changeGlobalTheme:()=>zg,changeLightness:()=>Hx,checkIfBoxSize:()=>uu,class:()=>h0,color:()=>t0,colorPairSchemes:()=>fu,colorStringToRgbaArray:()=>tn,compositeOverBackdrop:()=>Rs,compoundLayers:()=>Ta,contrastRatio:()=>Ra,convertSvgToSymbol:()=>lu,createConfig:()=>tu,createPristineConfig:()=>vg,cssMediaVars:()=>kg,cssVars:()=>xg,defineResolvedThemeSignal:()=>yo,defineThemeSignal:()=>mo,devices:()=>c0,document:()=>kR,findHeadingLetter:()=>Cg,findHeadings:()=>iu,font:()=>Gx,fontFace:()=>Jx,fontFamily:()=>Yx,fontFamilyTypes:()=>Xx,forcedScheme:()=>Bs,generateSequence:()=>we,generateSequencePosition:()=>k0,generateSprite:()=>cu,generateSubSequence:()=>ou,getActiveConfig:()=>P,getColor:()=>dt,getColorShade:()=>lg,getDefaultOrFirstKey:()=>kr,getFnPrefixAndValue:()=>Ar,getFontFace:()=>Kx,getFontFaceEach:()=>Ps,getFontFaceEachString:()=>bg,getFontFaceString:()=>Yf,getFontFamily:()=>_u,getFontFormat:()=>mg,getFontSizeByKey:()=>Su,getMediaBorder:()=>gu,getMediaColor:()=>Kt,getMediaTheme:()=>sn,getResolvedThemeSignal:()=>AR,getRgbTone:()=>On,getSafeInk:()=>Lg,getSafeInkInfo:()=>O0,getSequenceValue:()=>Ds,getSequenceValueBySymbols:()=>su,getSequenceValuePropertyPair:()=>Yn,getShadow:()=>hu,getShapeByKey:()=>xu,getSizeValue:()=>Ma,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Vt,getSubratio:()=>ru,getSubratioDifference:()=>nu,getTheme:()=>D0,getThemeSignal:()=>vR,getTimingByKey:()=>Se,getTimingFunction:()=>Be,gradient:()=>e0,grid:()=>p0,hexToRgb:()=>jx,hexToRgbArray:()=>sg,hexToRgba:()=>Vx,hslToRgb:()=>cg,icons:()=>o0,inForcedColors:()=>Is,isCSSVar:()=>Ft,isDomDocument:()=>fr,isForcedColorsQuery:()=>Ms,isGoogleFontsUrl:()=>Pa,isHostObject:()=>ur,isInertCompoundValue:()=>ug,isIntendedSystemColorWord:()=>Ns,isNativeColorToken:()=>Os,isPlainColor:()=>wo,isRawUnitValue:()=>fl,isResolvedColor:()=>en,isScalingUnit:()=>Jo,isWritableFamilyBucket:()=>b_,joinCompoundLayers:()=>Oa,linearChannelToSrgb:()=>pg,literalPairCompound:()=>js,literalSchemeMap:()=>Or,media:()=>Zx,mixTwoColors:()=>Bx,mixTwoRgb:()=>zx,mixTwoRgba:()=>fg,numToLetterMap:()=>rn,oklabToLinearSrgb:()=>hg,oklabToOklch:()=>Kf,oklchToGamutSafeSrgb:()=>qf,oklchToOklab:()=>gg,opacify:()=>Ca,parkHostObject:()=>Zr,parseColorToken:()=>te,popConfig:()=>ht,pushConfig:()=>mt,quietColorProbe:()=>$s,quietSequenceProbe:()=>vr,relativeLuminance:()=>Cs,reset:()=>ER,resolveBorderValue:()=>ce,resolveColorRgb:()=>Fs,resolveColorsInGradient:()=>ko,resolveCompoundWords:()=>xr,resolveConfigDocument:()=>Hi,resolveFileUrl:()=>nn,resolveShadowNonColorWord:()=>$a,resolveShadowValue:()=>Us,returnSubThemeOrDefault:()=>Wx,reviveConfig:()=>Kg,rgbArrayToHex:()=>ig,rgbToHSL:()=>ag,rgbToHex:()=>Ux,runThroughMedia:()=>Dg,schemeGuardSelector:()=>Pg,schemeMediaQuery:()=>Rg,scratchDefaultConfig:()=>Da,scratchSystem:()=>Ua,scratchUtils:()=>_o,semanticIcons:()=>s0,sequence:()=>Er,serializeConfig:()=>Wg,set:()=>Ks,setActiveConfig:()=>Eg,setAdaptiveSchemeVar:()=>xo,setColor:()=>Tr,setCustomFont:()=>Gf,setCustomFontMedia:()=>go,setEach:()=>Lu,setFont:()=>bu,setFontFamily:()=>Ba,setFontImport:()=>La,setGradient:()=>Na,setInCustomFontMedia:()=>yg,setMediaTheme:()=>Fa,setSVG:()=>ja,setScalingVar:()=>eu,setShadow:()=>Eo,setSubScalingVar:()=>Ag,setSvgIcon:()=>Vs,setTheme:()=>mu,setValue:()=>V0,setVariables:()=>E0,shadow:()=>r0,shape:()=>y0,sizes:()=>m0,skins:()=>b0,spacing:()=>Qx,splitCompoundWords:()=>Hf,splitSpacedValue:()=>pu,splitTopLevelCommas:()=>Tn,splitTopLevelSpaces:()=>ut,splitTransition:()=>Ug,srgbChannelToLinear:()=>dg,srgbToOklab:()=>Wf,svg:()=>f0,svgData:()=>_g,svg_data:()=>u0,templates:()=>d0,theme:()=>n0,timing:()=>i0,toCamel:()=>Qf,toLinearChannel:()=>va,transformBackgroundImage:()=>Fg,transformBorder:()=>Mg,transformBorderRadius:()=>Rr,transformBoxShadow:()=>Tu,transformDuration:()=>Pu,transformGridTemplate:()=>jg,transformShadow:()=>$g,transformSize:()=>Nt,transformSizeRatio:()=>j,transformTextStroke:()=>Ng,transformTilingValue:()=>Ws,transformTransition:()=>U0,transfromGap:()=>Bg,typography:()=>Xf,unit:()=>qx,vars:()=>g0,viewTransition:()=>_0});var _o={};F(_o,{BARE_SEQUENCE_TOKEN_RE:()=>Rn,COMPOUND_CSS_KEYWORDS:()=>Ts,CSS_NAMED_COLOR_HEX:()=>Aa,CSS_NATIVE_COLOR_REGEX:()=>Sr,CSS_UNITS:()=>Wi,applyMediaSequenceVars:()=>bo,applySequenceGlobalVars:()=>au,applySequenceVars:()=>Cr,changeLightness:()=>Hx,colorStringToRgbaArray:()=>tn,compositeOverBackdrop:()=>Rs,compoundLayers:()=>Ta,contrastRatio:()=>Ra,convertSvgToSymbol:()=>lu,findHeadingLetter:()=>Cg,findHeadings:()=>iu,generateSequence:()=>we,generateSequencePosition:()=>k0,generateSprite:()=>cu,generateSubSequence:()=>ou,getColorShade:()=>lg,getDefaultOrFirstKey:()=>kr,getFnPrefixAndValue:()=>Ar,getFontFace:()=>Kx,getFontFaceEach:()=>Ps,getFontFaceEachString:()=>bg,getFontFaceString:()=>Yf,getFontFormat:()=>mg,getRgbTone:()=>On,getSequenceValue:()=>Ds,getSequenceValueBySymbols:()=>su,getSequenceValuePropertyPair:()=>Yn,getSizeValue:()=>Ma,getSubratio:()=>ru,getSubratioDifference:()=>nu,hexToRgb:()=>jx,hexToRgbArray:()=>sg,hexToRgba:()=>Vx,hslToRgb:()=>cg,isCSSVar:()=>Ft,isDomDocument:()=>fr,isGoogleFontsUrl:()=>Pa,isHostObject:()=>ur,isInertCompoundValue:()=>ug,isNativeColorToken:()=>Os,isRawUnitValue:()=>fl,isResolvedColor:()=>en,isScalingUnit:()=>Jo,isWritableFamilyBucket:()=>b_,joinCompoundLayers:()=>Oa,linearChannelToSrgb:()=>pg,mixTwoColors:()=>Bx,mixTwoRgb:()=>zx,mixTwoRgba:()=>fg,numToLetterMap:()=>rn,oklabToLinearSrgb:()=>hg,oklabToOklch:()=>Kf,oklchToGamutSafeSrgb:()=>qf,oklchToOklab:()=>gg,opacify:()=>Ca,parkHostObject:()=>Zr,parseColorToken:()=>te,quietSequenceProbe:()=>vr,relativeLuminance:()=>Cs,resolveCompoundWords:()=>xr,resolveConfigDocument:()=>Hi,resolveFileUrl:()=>nn,returnSubThemeOrDefault:()=>Wx,rgbArrayToHex:()=>ig,rgbToHSL:()=>ag,rgbToHex:()=>Ux,setCustomFont:()=>Gf,setCustomFontMedia:()=>go,setFontImport:()=>La,setInCustomFontMedia:()=>yg,setScalingVar:()=>eu,setSubScalingVar:()=>Ag,setVariables:()=>E0,splitCompoundWords:()=>Hf,splitTopLevelCommas:()=>Tn,splitTopLevelSpaces:()=>ut,srgbChannelToLinear:()=>dg,srgbToOklab:()=>Wf,toLinearChannel:()=>va});var fr=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0),ur=t=>{if(t===null||typeof t!="object")return!1;let e=Object.prototype.toString.call(t);return!!(e!=="[object Object]"&&e!=="[object Array]"||typeof t.nodeType=="number"||t.defaultView||t.window===t||t.self===t)},b_=t=>t!==null&&typeof t=="object"&&!ur(t),Zr=(t,e,n)=>{if(!t)return;if(fr(n)){t.__domDocument||(t.__domDocument=n);return}let r=`__host_${e}`;t[r]||(t[r]=n)},Hi=t=>t?fr(t.__domDocument)?t.__domDocument:fr(t.document)?t.document:null:null;var Jo=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",Wi=["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"],b4=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),_4=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Wi.filter(t=>t!=="auto").map(b4).join("|")})$`),fl=t=>_4.test(String(t).trim());M();var Aa={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"},tn=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];let e=Aa[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&&kt&&R){let n=kt.body.appendChild(kt.createElement("fictum")),r="rgb(1, 2, 3)";if(n.style.color=r,n.style.color!==r){kt.body.removeChild(n);return}if(n.style.color=t,n.style.color===r||n.style.color==="")return kt.body.removeChild(n),[0,0,0,0];t=R.getComputedStyle(n).color,kt.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]},Bx=(t,e,n=.5)=>(t=tn(t),e=tn(e),fg(t,e,n)),jx=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgb(${n},${r},${o})`},sg=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[n,r,o]},Ux=(t,e,n)=>"#"+(1<<24|t<<16|e<<8|n).toString(16).slice(1),ig=([t,e,n])=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),Vx=(t,e=1)=>{let[n,r,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return`rgba(${n},${r},${o},${e})`},zx=(t,e,n=.5)=>{let r=[];for(let o=0;o<3;o++)r[o]=~~(t[o]+(e[o]-t[o])*n);return`rgb(${r})`},Hx=(t,e)=>{let[n,r,o]=e,s=Math.max(0,Math.min(100,o+parseFloat(t)));return[n,r,s]},ag=(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]},cg=(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)],lg=(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)},fg=(t,e,n=.5)=>{let r=[];for(let o=0;o<4;o++){let s=o===3?i=>i:Math.round;r[o]=s(t[o]+(e[o]-t[o])*n)}return`rgba(${r})`},Ca=(t,e)=>{let n=tn(t);if(!n){pr()&&console.warn(t+" color is not rgba");return}return n[3]=e,`rgba(${n})`},Ft=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Ts=new Set(["currentcolor","transparent","thin","medium","thick"]),Sr=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,X6=/^(?:#[0-9a-f]{3,8}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\([\s\S]*\))$/i,Os=t=>X6.test(t),Hf=t=>t.indexOf("(")===-1?t.split(/\s+/):ut(t),ug=(t,e)=>{let n=t.length,r=0,o=0;for(let s=0;s<=n;s++){let i=s<n?t.charCodeAt(s):32;if(i===40){r++;continue}if(i===41){r>0&&r--;continue}if(!(r>0||!(i<=32||i===44||i>127&&/\s/.test(t[s])))){if(s>o&&!J6(t,o,s,e))return!1;o=s+1}}return!0},J6=(t,e,n,r)=>{let o=t.charCodeAt(e);if(o>=48&&o<=57)return!0;let s=t.slice(e,n);return Os(s)||r!==void 0&&r.has(s)},Ta=(t,e)=>e?Tn(t).map(n=>Hf(n.trim())):[Hf(t)],Oa=t=>{let e=t[0].join(" ");for(let n=1;n<t.length;n++)e+=", "+t[n].join(" ");return e},xr=(t,e,{commas:n,keywords:r},o,s)=>{let i=Sr.test(t);if(i&&ug(t,r))return t;let a=Ta(t,n),c=!1;try{for(let l of a)for(let f=0;f<l.length;f++){let u=l[f],d=Z6(u,e,r,o,s);d!==u&&(l[f]=d,c=!0)}}catch(l){if(i)return t;throw l}return i&&!c?t:Oa(a)},Z6=(t,e,n,r,o)=>t?Ft(t)?`var(${t})`:Os(t)||n!==void 0&&n.has(t)?t:e(t,r,o):"",Q6=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,te=t=>{if(!v(t))return null;if(Sr.test(t))return{passthrough:t};if(Ft(t))return{cssVar:t};let e=t.match(Q6);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}},en=t=>v(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Tn=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},ut=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},va=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),Cs=t=>.2126*va(t[0])+.7152*va(t[1])+.0722*va(t[2]),Ra=(t,e)=>{let n=Cs(t)+.05,r=Cs(e)+.05;return n>r?n/r:r/n},dg=t=>(t/=255,t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)),pg=t=>(t<=.0031308?t*12.92:1.055*Math.pow(t,1/2.4)-.055)*255,Wf=([t,e,n])=>{let[r,o,s]=[t,e,n].map(dg),i=.4122214708*r+.5363325363*o+.0514459929*s,a=.2119034982*r+.6806995451*o+.1073969566*s,c=.0883024619*r+.2817188376*o+.6299787005*s,l=Math.cbrt(i),f=Math.cbrt(a),u=Math.cbrt(c);return[.2104542553*l+.793617785*f-.0040720468*u,1.9779984951*l-2.428592205*f+.4505937099*u,.0259040371*l+.7827717662*f-.808675766*u]},hg=([t,e,n])=>{let r=t+.3963377774*e+.2158037573*n,o=t-.1055613458*e-.0638541728*n,s=t-.0894841775*e-1.291485548*n,i=r**3,a=o**3,c=s**3;return[4.0767416621*i-3.3077115913*a+.2309699292*c,-1.2684380046*i+2.6097574011*a-.3413193965*c,-.0041960863*i-.7034186147*a+1.707614701*c]},Kf=([t,e,n])=>{let r=Math.atan2(n,e)*180/Math.PI;return r<0&&(r+=360),[t,Math.sqrt(e*e+n*n),r]},gg=([t,e,n])=>{let r=n*Math.PI/180;return[t,e*Math.cos(r),e*Math.sin(r)]},qf=(t,e,n,r=24)=>{let o=a=>hg(gg([t,a,n])),s=a=>a.every(c=>c>=-1e-4&&c<=1.0001),i=o(e);if(!s(i)){let a=0,c=e;for(let l=0;l<r;l++){let f=(a+c)/2;s(o(f))?a=f:c=f}i=o(a)}return i.map(a=>pg(Math.max(0,Math.min(1,a))))},Rs=(t,e=1,n=[255,255,255])=>e>=1?t:t.map((r,o)=>r*e+n[o]*(1-e)),On=(t,e)=>{v(t)&&t.includes("rgb")&&(t=tn(t).join(", ")),v(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),me(e)&&(e+="");let n=ig(t),r=e.slice(0,1);if(r==="-"||r==="+"){let o=lg(n,parseFloat(e));return sg(o).join(", ")}else{let[o,s,i]=t,[a,c]=ag(o/255,s/255,i/255),l=Math.max(0,Math.min(100,parseFloat(e)))/100;return cg(a,c,l).map(u=>Math.round(Math.max(0,Math.min(1,u))*255)).join(", ")}};var Wx=(t,e)=>{if(t)return t.themes&&t.themes[e]?t.themes[e]:t[e]?[t,t[e]]:t};var nn=(t,e)=>{if(!t||!e)return null;try{return new URL(t),null}catch{}let n=e[t];return n?n.content&&n.content.src:null},kr=(t,e)=>{if(!t)return;if(e!=null&&e!==""&&e!=="default"){let s=t[e];return s&&typeof s=="object"?s.value:void 0}let r=()=>Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value&&!t[s].isSystemFallback&&!t[s].isSharedLibrary);if(t.__defaultKey){let s=t[t.__defaultKey];if(s&&s.isSystemFallback){let i=r();if(i)return t[i].value}if(s)return s.value}let o=r()||Object.keys(t).find(s=>s!=="default"&&t[s]&&t[s].value);return o&&t[o]&&t[o].value},mg=t=>{if(typeof t!="string"||!t)return null;let e=t.split(/[#?]/)[0].split(".").pop().trim();return["woff2","woff","ttf","otf","eot"].includes(e)?e:null},Pa=t=>t&&(t.includes("fonts.googleapis.com")||t.includes("fonts.gstatic.com")),La=t=>`@import url('${t}');`,yg=t=>`@font-face { ${t} }`,Gf=(t,e,n,r={})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>typeof a=="string"&&a).map(a=>{let c=mg(a),l=c?` format('${c}')`:"";return`url('${a}')${l}`}).join(`,
38
38
  `);return`
39
39
  font-family: '${t}';
40
40
  font-style: ${r.fontStyle||"normal"};${n?`
@@ -42,24 +42,24 @@ FROM ${a}${l}`},j5=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
42
42
  font-stretch: ${r.fontStretch};`:""}${r.fontDisplay?`
43
43
  font-display: ${r.fontDisplay};`:""}${r.unicodeRange?`
44
44
  unicode-range: ${r.unicodeRange};`:""}
45
- src: ${i};`},ho=(t,e,n,r)=>`@font-face {${zf(t,e,n,r)}
46
- }`,Rs=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>en(d,n)||d):en(s,n)||s;return zf(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),Ux=t=>Object.keys(t).map(n=>Rs(n,t[n].value)),hg=(t,e,n)=>{if(e&&e.isVariable){let s=en(e.url,n)||e.url;return Oa(s)?Ra(s):ho(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Rs(t,e,n).map(pg);let o=Array.isArray(e.url)?e.url.map(s=>en(s,n)||s):en(e.url,n)||e.url;return ho(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Wf=(t,e)=>Object.keys(t).map(r=>hg(r,t[r].value,e));M();M();M();M();Mt();var Pa={};F(Pa,{animation:()=>o0,breakpoints:()=>n0,class:()=>l0,color:()=>Yx,devices:()=>r0,document:()=>bR,font:()=>Hx,fontFace:()=>Kx,fontFamily:()=>zx,fontFamilyTypes:()=>Wx,gradient:()=>Xx,grid:()=>c0,icons:()=>Qx,media:()=>qx,reset:()=>_R,semanticIcons:()=>t0,sequence:()=>xr,shadow:()=>Zx,shape:()=>d0,sizes:()=>u0,skins:()=>p0,spacing:()=>Gx,svg:()=>s0,svgData:()=>gg,svg_data:()=>i0,templates:()=>a0,theme:()=>Jx,timing:()=>e0,typography:()=>Kf,unit:()=>Vx,vars:()=>f0,viewTransition:()=>h0});var xr={"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 Vx={default:"em"};var U6={browserDefault:16,base:16,type:"font-size",ratio:xr["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Kf=U6;var Hx={};var zx={},Wx={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},Kx={};var qx={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var V6={base:Kf.base,type:"spacing",ratio:xr.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Gx=V6;var Yx={},Xx={};var Jx={};var Zx={};var Qx={},t0={};var H6={default:150,base:150,type:"timing",ratio:xr["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},e0=H6;var bR={};var n0={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},r0={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 o0={};var s0={},gg={},i0=gg;var a0={};var z6={},c0=z6;var l0={};var _R={},f0={},u0={},d0={},p0={},h0={};var bg={},_g={},ie=new Set,mg=Pa,yg={},Yf=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in mg){let e=t.toLowerCase();yg[e]=mg[t];let n=Yf(e);n!==e&&(yg[n]=mg[t]),e!==t&&(yg[t]=mg[t])}var Ps={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bg,cssMediaVars:_g,CSS_VARS:bg,CSS_MEDIA_VARS:_g,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...yg},go=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Ut(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=Ut(e)?e:t.globalTheme,r=_n(Ut(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},wR=t=>t?go(t):null,mo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Ut(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=Ut(e)?e:t.resolvedTheme,r=_n(Ut(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},SR=t=>t?mo(t):null;go(Ps);mo(Ps);var qf=pt(Ps),Ne={active:"0",0:Ps},xR=t=>(Ut(t)&&(Ne.active=t),Ne[t||Ne.active]),Gf=[],mt=t=>{t&&t._scratchConfig&&Gf.push(t)},ht=()=>{Gf.pop()},P=t=>Gf.length?Gf[Gf.length-1]:Ne[t||Ne.active]||Ps,wg=t=>{if(k(t))return Ne.active="1",Ne[1]=bt(t,pt(qf),ie),La(Ne[1]),go(Ne[1]),mo(Ne[1]),t},W6=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],K6=["useVariable","globalTheme","verbose"],q6=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData","svg_data"]],La=t=>{for(let e of q6){let n;for(let r of e){let o=t[r];k(o)&&(n=n?bt(n,o,ie):o)}if(n)for(let r of e)k(t[r])&&(t[r]=n)}},kR=t=>(t.cssVars={},t.cssMediaVars={},t.CSS_VARS=t.cssVars,t.CSS_MEDIA_VARS=t.cssMediaVars,t.cssSkinVars={},t.cssSkinFallback={},t._scratchConfig=!0,La(t),go(t),mo(t),t),Sg=()=>kR(pt(qf)),Xf=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:P(),o=pt(!n&&r&&r._scratchConfig?r:qf);for(let i of W6)delete o[i];for(let i of K6)Object.prototype.hasOwnProperty.call(qf,i)?o[i]=qf[i]:delete o[i];let s=kR(bt(e||{},o,ie));return t&&(Ne[t]=s),s};var On=/^-?[A-Z][0-9]?$/,g0=0,kr=t=>{g0++;try{return t()}finally{g0--}},nn={"-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"},G6=Object.keys(nn).reduce((t,e)=>(t[nn[e]]=Number(e),t),{}),Y6=(t,e,n,r)=>{if(On.test(e)){if(t&&Object.keys(t).length)return t[e]!==void 0;let o=G6[e.slice(0,1)];if(o===void 0)return!1;let{range:s}=n;return!Array.isArray(s)||s.length<2?!0:o>=Math.min(s[0],s[1])&&o<=Math.max(s[0],s[1])}if(r&&Object.keys(r).length)return!1},y0=(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=ER.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},Er=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)]},m0="\0",X6=(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+=m0+e.length+m0,e.push(o),o=""))}return n+o},J6=(t,e)=>t.indexOf(m0)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),Z6=/^(calc|min|max|clamp)\((.*)\)$/,Q6=(t,e)=>{let n=Z6.exec(t);return n?`${n[1]}(${eu(n[2],e)})`:t.indexOf("(")!==-1?t:Ls(t,e)},ER=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Jf=(t,e)=>{let{base:n,type:r,unit:o}=e,s=ER.has(o)?"rem":o,i=(Xo(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=nn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=nn[t+1],u=Math.abs(t),d=Math.pow(vR,2*u),p=nn[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},xg=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},Zf=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},Qf=(t,e)=>Zf(t,e).map(n=>n/t),tu=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=Zf(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((g,h)=>{let m=~~(g/r*1e3)/1e3,y=i+(h+1),x=a+(h+1)/10,E=xg(h+1,f,i,e),C={key:n+(h+1),variable:y,value:g,scaling:m,scalingVariable:E,index:x};y0(C,e)})},vR=1.618,tU=(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(vR,2*r);return Math.max(o,s)},_e=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 l=0;l<=i;l++){let f=o[1]-l,u=nn[f],d=tU(f,n,r),p=~~(d/n*100)/100,g=c+u,h=Jf(f,t),m={key:u,variable:g,value:d,base:n,scaling:p,scalingVariable:h,ratio:r,index:f};y0(m,t),s&&tu(m,t)}return t},b0=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=v(e)?e:nn[e],a=v(e)?Object.entries(nn).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=r*Math.pow(o,a),f=~~(l/r*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,g=Jf(a,t),h={key:i,variable:p,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return y0(h,c),s&&tu(h,c),c},Da=(t,e)=>{if(!t||!v(e)||!e)return;let n=t[e]||t[e.toLowerCase()];if(n!==void 0)return e.charCodeAt(0)===45?`calc(${n} * -1)`:n;if(e.charCodeAt(0)!==45||e.length<2)return;let r=e.slice(1),o=t[r]||t[r.toLowerCase()];if(o!==void 0)return`calc(${o} * -1)`},Ls=(t="A",e)=>{let n=P(),{unit:r}=n;if(v(t)&&Ft(t))return`var(${t})`;if(v(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(v(t)){let _=Da(n.sizes,t);if(_!==void 0)return _}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(cl(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${Mf(e.type.replace(".","-"))}-`,p=t.toUpperCase(),g=p.slice(0,1)==="-"?"-":"",h=g?p.slice(1):p,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=_=>a.test(_)?`var(${d}${_}${m})`:_;if(h.includes("+")){let[_,b]=h.split("+"),w=`${y(_)} + ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("*")){let[_,b]=h.split("*"),w=`${y(_)} * ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("-")){let[_,b]=h.split("-"),w=`${y(_)} - ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}!o[h]&&h.length===2&&(n.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1));let x=o?o[h]:null,E=!!(i||n.useVariable);if((E?Y6(o,h,e,n.sizes):!!x)===!1){if(g0>0)return;if(console.warn("can't find",o,h),tt())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}if(E){let _=`var(${d}${h}${m})`;return g?`calc(${_} * -1)`:_}return s==="ms"||s==="s"?g+x.val+s:g+x.scaling+s},eu=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return X6(t,o).split(r).map(i=>{let a=J6(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:Q6(c,e)}).join("")},qn=(t,e,n,r)=>{if(typeof t!="string")return P().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=Er(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=eu(t,n):t=Ls(t,n),{[e]:r?`${r}(${t})`:t}},kg=(t,e)=>nn[t-e],nu=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=kg(e,o);return n[s]})};M();var _0=(t,e)=>{let n=P(),{cssVars:r}=n;V(t.value)||(r[t.var]=t.value)},ru=(t,e,n)=>{let r=P(),{unit:o}=r,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,p,g]=Qf(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},AR=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),vr=(t,e={})=>{let n=P(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=AR.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||ru(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},yo=(t,e,n={})=>{let r=P(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=AR.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,g=s[a];if(!g&&r.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),ru(h,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let x=d[y],E=p[y]+f;h[x.variable+"_default"]=E,h[x.variable]=E}return}for(let h in d){let m=d[h],y=(Xo(f)?p[h]:d[h].val)+f;!g&&r.verbose&&console.warn("Can't find query ",g);let x=i[`@media ${g}`];x||(x=i[`@media ${g}`]={}),x[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};M();var TR=ur(),ou=t=>{let e=P(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},eU=t=>{let e=t&&(t.default||t);if(!v(e))return TR&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},nU=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return r},CR=new Set,su=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return TR&&!CR.has(t)&&(CR.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=eU(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=nU(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=sU(f),f},rU="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",oU=new RegExp(`<(${rU})\\b([^>]*?)\\s*/>`,"g"),sU=t=>t.replace(oU,"<$1$2></$1>");var Ba={};F(Ba,{STANDARD_SCHEME_QUERIES:()=>vg,__resetSkinWarnings:()=>I0,appendSVGSprite:()=>Su,appendSvgIconsSprite:()=>Vs,applyDocument:()=>wu,applyHeadings:()=>Rg,applyReset:()=>xu,applySkins:()=>ku,applySpacingSequence:()=>cu,applyTimingSequence:()=>_u,applyTypographySequence:()=>mu,atSchemes:()=>wo,buildSkinVarStyles:()=>Hs,checkIfBoxSize:()=>au,colorPairSchemes:()=>iu,forcedScheme:()=>Fs,getColor:()=>dt,getFontFamily:()=>gu,getFontSizeByKey:()=>yu,getMediaBorder:()=>uu,getMediaColor:()=>Kt,getMediaTheme:()=>on,getSafeInk:()=>Tg,getSafeInkInfo:()=>E0,getShadow:()=>fu,getShapeByKey:()=>bu,getSpacingBasedOnRatio:()=>$e,getSpacingByKey:()=>Vt,getTheme:()=>T0,getTimingByKey:()=>we,getTimingFunction:()=>Fe,inForcedColors:()=>Ds,isForcedColorsQuery:()=>Is,isIntendedSystemColorWord:()=>Ms,isPlainColor:()=>_o,literalPairCompound:()=>Bs,literalSchemeMap:()=>Cr,quietColorProbe:()=>Ns,resolveBorderValue:()=>ae,resolveColorRgb:()=>$s,resolveColorsInGradient:()=>xo,resolveShadowNonColorWord:()=>Ma,resolveShadowValue:()=>js,runThroughMedia:()=>Og,schemeGuardSelector:()=>Cg,schemeMediaQuery:()=>Ag,setAdaptiveSchemeVar:()=>So,setColor:()=>Ar,setFont:()=>hu,setFontFamily:()=>$a,setGradient:()=>Ia,setMediaTheme:()=>Na,setSVG:()=>Fa,setShadow:()=>ko,setSvgIcon:()=>Us,setTheme:()=>du,splitSpacedValue:()=>lu});M();var vg={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Ag=(t,e)=>{let n=e.media&&e.media[t]||vg[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},Cg=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},rn=new Set,LR=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"]),DR=["AccentColor","AccentColorText","ActiveText","ButtonBorder","ButtonFace","ButtonText","Canvas","CanvasText","Field","FieldText","GrayText","Highlight","HighlightText","LinkText","Mark","MarkText","SelectedItem","SelectedItemText","VisitedText","ActiveBorder","ActiveCaption","AppWorkspace","Background","ButtonHighlight","ButtonShadow","CaptionText","InactiveBorder","InactiveCaption","InactiveCaptionText","InfoBackground","InfoText","Menu","MenuText","Scrollbar","ThreeDDarkShadow","ThreeDFace","ThreeDHighlight","ThreeDLightShadow","ThreeDShadow","Window","WindowFrame","WindowText"],IR=new Set(DR.map(t=>t.toLowerCase())),iU=new Set(DR),w0=0,Ds=t=>{w0++;try{return t()}finally{w0--}},aU=/(^|[^\w-])(not\s+)?\(\s*forced-colors\s*(?::\s*(active|none)\s*)?\)/i,Is=t=>{if(!v(t))return!1;let e=t.match(aU);return!e||e[2]||e[3]&&e[3].toLowerCase()==="none"?!1:!/^\s*(?:@media\s+)?not\b/i.test(t)},MR=t=>w0>0||iU.has(t),Ms=t=>v(t)&&IR.has(t.toLowerCase())&&MR(t),cU=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,lU=/gradient\(|url\(|image-set\(|var\(/i,fU=new Set(["transparent","currentColor","currentcolor"]),_o=t=>{if(!v(t))return!1;let e=t.trim();return lU.test(e)?!1:cU.test(e)?!0:LR.has(e)||fU.has(e)},Eg=new Set,OR=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(k(e)&&Object.keys(e).length||k(n)&&Object.keys(n).length)},RR=new Set,S0=0,Ns=t=>{S0++;try{return t()}finally{S0--}},uU=(t,e)=>{if(!v(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=Qt(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},x0=(t,e,n)=>{let r=uU(t,n);if(r){if(!RR.has(t)){RR.add(t);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${a} \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=Qt(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&OR(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!S0&&!Eg.has(t)){Eg.add(t);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${a} \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=v(e)?e.toLowerCase():"",i=IR.has(s);if(!LR.has(s)&&!i||i&&MR(e)||!OR(n))return t;if(!Eg.has(s)){Eg.add(s);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(i?`[scratch] color \`${t}\` is a CSS system colour that is not in the palette${a}. Dropped rather than emitted as a raw browser colour: a system colour paints the value the user's desktop chose (\`highlight\` is the selection blue), so it ignores the design system and is not even stable across two machines. Define it in designSystem/color.js or use a palette token.`:`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${a}. 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.`)}},NR=(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})`},dt=(t,e,n)=>{let r=n||P();if(!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(I(t))[o,s,i]=t;else{let u=Qt(t);if(!u){let{color:d,gradient:p}=r,g=p[t]||d[t];return g?(e&&g[e]&&(g=g[e]),r.useVariable?`var(${g.var})`:g.value):x0(t,t,r)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=r,l=a[o]||c[o];if(!l)return x0(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(I(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(v(l)){if(rn.has(o))return l;rn.add(o);try{return dt(l,null,n)}finally{rn.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?NR(u,s,i):u}return i&&!l[i]&&(f=Tn(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},PR=t=>{let e=Qe(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},dU=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=Tn(n,e.tone);n=v(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},$s=(t,e,n)=>{let r=e||P();if(!v(t))return null;let o=Qt(t);if(o){if(o.passthrough){let d=Qe(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return PR(t);if(v(c)){let d;if(rn.has(s))d=PR(c);else{rn.add(s);try{d=$s(c,r,n)}finally{rn.delete(s)}}return d?dU(d,o):null}if(c.rgb===void 0&&k(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=Tn(l,o.tone));let f=v(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},$R=t=>k(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),wo=t=>{let e=[];for(let n in t)n.charCodeAt(0)===64&&e.push(n.slice(1));return e},k0=t=>{if(!k(t)||t.value!==void 0)return null;for(let n in t)if(n!=="var"&&(n.charCodeAt(0)!==64||!$R(t[n])))return null;let e=wo(t);return e.length?e:null},pU=t=>v(t&&t.var)&&k0(t)!==null,hU=(t,e,n,r,o)=>{let s=k0(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?NR(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=dt(t,"@light",o),a=dt(t,"@dark",o);if(!(!_o(i)||!_o(a)))return i===a?i:`light-dark(${i}, ${a})`},iu=(t,e)=>{if(!t)return null;let n=e||P(),r=Qt(t),o=r?r.name:t,s=o&&n.color&&n.color[o];if(I(s))return["light","dark"];if(!k(s)||s.value!==void 0)return null;let i=wo(s);return i.length?i:null},Cr=(t,e,n)=>{let r={},o=Cg(e);for(let s of t){let i=n(s);if(i!==void 0&&(r[`[data-theme="${s}"] &`]=i,s==="light"||s==="dark")){let a=Ag(s,e);a&&(r[a]={[o]:i})}}return r},Fs=(t,e)=>t||(e.globalTheme==="auto"?null:e.globalTheme),Bs=(t,e,n,{commas:r,resolve:o,resolveScheme:s})=>{let i=Aa(t,r),a=null;for(let f of i)for(let u of f){let d=iu(u,n);if(d)for(let p of d)(a||(a=[])).includes(p)||a.push(p)}if(!a)return;let c=f=>Ca(i.map(u=>u.map(d=>{if(!iu(d,n))return d;let p=f(d);return v(p)?p:d}))),l=Fs(e,n);return l?o(c(f=>Kt(f,l,n)),l):Cr(a,n,f=>s(f,c))},Kt=(t,e,n)=>{let r=n||P();if(e=Fs(e,r),!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;let o,s,i;if(I(t))o=t[0];else{let u=Qt(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=r,l=a[o]||c[o],f=k(l);if(f&&l.value)return dt(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?dt(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=hU(t,l,s,i,n);if(u!==void 0)return u}return dt(t,`@${e}`,n)}else return Cr(wo(l),r,u=>dt(t,"@"+u,n))}else return x0(t,o,r)},So=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Ar=(t,e,n)=>{let r=P();if($R(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&pU(t))return t;if(v(t)&&Ft(t)){let h=t.slice(2),m=h.trim().indexOf(" ")!==-1;if(t=m?h:dt(h),m||!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let y=h.trim().split(/\s+/),x=r.color[y[0]];if(x&&!x.value&&!x.rgb&&(v(x)||I(x)||k(x))&&!rn.has(y[0])){rn.add(y[0]);try{r.color[y[0]]=Ar(x,y[0])}finally{rn.delete(y[0])}x=r.color[y[0]]}if(x&&x.value){let E=x.rgb,C=y[1]!==void 0?y[1]:"1",_=y[2];_&&(E=Tn(E,_)),t=`rgba(${E}, ${C})`}else{let E=y[2],C=y[1]!==void 0?y[1]:"1";if(E)try{let _=Qe(y[0]);_&&_.length>=3?t=`rgba(${Tn(_.slice(0,3).join(", "),E)}, ${C})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(I(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let h={};for(let m in t)m!=="var"&&(h[m]=Ar(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&So(h,"color",e,r),h}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(v(i)&&!i.includes("(")&&!i.startsWith("#")){let h=Qt(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=r.color[h.name];if(m&&!m.value&&!m.rgb&&(v(m)||I(m)||k(m))&&!rn.has(h.name)){rn.add(h.name);try{r.color[h.name]=Ar(m,h.name)}finally{rn.delete(h.name)}}let y=r.color[h.name],x=k0(y);if(x){if(h.alpha===void 0&&h.tone===void 0)return y;let E={};for(let C of x){let _=y["@"+C],b=_.rgb;h.tone&&(b=Tn(b,h.tone));let w=h.alpha!==void 0?parseFloat(h.alpha):_.alpha!==void 0?_.alpha:1;E["@"+C]=`rgba(${b}, ${w})`}return Ar(E,e,n)}if(y&&y.rgb){let E=y.rgb;h.tone&&(E=Tn(E,h.tone));let C=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${E}, ${C})`}}}let a=Qe(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,g=`rgba(${p}, ${d})`;return r.useVariable&&(r.cssVars[s]=g),{var:s,rgb:p,alpha:d,value:g}},gU=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),xo=(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=")",i=Cn(o),a=!1,c=i.map(l=>(l=l.trim(),l.split(/\s+/).map(u=>{if(!u||/^\d/.test(u)||u==="0"||gU.has(u)||u==="transparent"||_r.test(u))return u;let d=dt(u);return tn(d)?(a=!0,d):u}).join(" ")));return a?r+c.join(", ")+s:t},Ia=(t,e,n)=>{let r=P();if(k(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(v(t)&&Ft(t)&&(t=dt(t.slice(2))),I(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let a={};for(let c in t)c!=="var"&&(a[c]=Ia(t[c],e,c.slice(0,1)==="@"?c.slice(1):c));return r.useVariable&&So(a,"gradient",e,r),a}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:""),i=xo(t.value||t);return r.useVariable&&(r.cssVars[s]=i),{var:s,value:i}};M();var Tg=(t,e,n={},r)=>{let o=r||P(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=v(e)?e:String(e),p=Qt(t),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(rt,gt)=>c?{value:rt,...gt}:rt;if(g){let rt=o.color[`${g}Safe`];if(rt){let gt=`${d}@${u}`,q=rt[gt]!==void 0?rt[gt]:rt[d];if(q!==void 0){let W=q&&q.rgb!==void 0?o.useVariable&&q.var?`var(${q.var})`:q.value:dt(q,null,o);return h(W,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=dt(t,u?`@${u}`:null,o),y=$s(t,o,u),x=$s(e,o,u);if(!y||!x)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let E=Os(x.rgb,x.alpha),C=Os(y.rgb,y.alpha,E),_=Ta(C,E);if(_>=f-.02)return h(m,{ratio:_,deviation:0,derived:!1,overridden:!1});let[b,w,S]=Uf(y.rgb),[,A,T]=Vf([b,w,S]),O=As(E)>.5,B=O?b:1-b,$=rt=>{let gt=O?b-rt:b+rt,q=Math.max(0,Math.min(1,gt));return{rgb:Hf(q,A,T),L:q}},N=rt=>{let{rgb:gt}=$(rt),q=Os(gt.map(W=>Math.round(W)),y.alpha,E);return Ta(q,E)},G=0,Y=B,nt=N(Y)>=f;if(nt)for(let rt=0;rt<l;rt++){let gt=(G+Y)/2;N(gt)>=f?Y=gt:G=gt}else G=Y;let{rgb:ot,L:st}=$(Y),Z=ot.map(rt=>Math.round(rt)),J=N(Y),Q=y.alpha<1?`rgba(${Z.join(", ")}, ${y.alpha})`:`rgb(${Z.join(", ")})`,it=Math.abs(st-b)*100;return h(Q,{rgb:Z,ratio:J,startRatio:_,deviation:it,derived:!0,overridden:!1,reachable:nt})},E0=(t,e,n={},r)=>Tg(t,e,{...n,meta:!0},r);M();M();var mU=t=>{let n=P().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return _e(o),o},yU=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;Lt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),_e(n),yo(t,e)}},au=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},cu=()=>{let t=P(),{spacing:e}=t;_e(e),vr(e),yU(e)},bU=t=>{let e=P(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:_e(t)},Vt=(t,e="padding",n,r)=>{let o=bU(n);if(v(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=Er(t);r=i[0],t=i[1]}}let s=r?[t]:v(t)&&t.includes("(")?ut(t):vs(t);if(I(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=(l,f)=>qn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return qn(t,e,o,r)}},$e=(t,e,n,r)=>{let o=P(),{spacing:s}=o,i=n||t[e];if(!r&&v(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&v(i)&&i.includes("(")){let a=Er(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=mU(t);return Vt(i,e,a,r)}return Vt(i,e,s,r)},lu=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=Hi.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(" ")};M();var _U={commas:!0},js=(t,e,n)=>v(t)?wr(t,wU,_U,e,n):t,wU=(t,e,n)=>{let r=Ns(()=>dt(t,e));return tn(r)?r:Ma(t,n)},Ma=(t,e)=>{if(/^\d/.test(t)||t.includes("px")||t.slice(-2)==="em"||t==="inset"||t==="none"||Ms(t)||Cs.has(t.toLowerCase()))return t;e&&e(t);let n=kr(()=>Vt(t,"shadow"));return n&&n.shadow?n.shadow:t},ko=(t,e,n,r)=>{let o=P();if(k(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(I(t)){let a={"@light":ko(t[0],e,"light"),"@dark":ko(t[1],e,"dark")};return o.useVariable&&So(a,"shadow",e,o),a}if(k(t)){let a={};for(let c in t)a[c]=ko(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&So(a,"shadow",e,o),a}v(t)&&(t=js(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},fu=(t,e)=>{let n=P();if(e=Fs(e,n),!v(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;let[r]=I(t)?t:t.split(" "),s=n.shadow[r],i=k(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)}return i&&s.value?s.value:i?Cr(wo(s),n,a=>{let c=s["@"+a];return c&&(c.value!==void 0?c.value:c)}):(n.verbose&&console.warn("Can't find color",t),t)};M();var SU=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),xU={commas:!1,keywords:SU},ae=(t,e,n)=>{if(t==null)return;let r=t+"",o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:wr(r,kU,xU,e,n)},kU=(t,e,n)=>{if(/^\d/.test(t))return t;let r=Ns(()=>dt(t,e));if(tn(r))return r;if(Ms(t)||Cs.has(t.toLowerCase()))return t;n&&n(t);let o=kr(()=>Vt(t,"border"));return o&&o.border?o.border:t},uu=(t,e,n)=>{let r=n||P();if(r.useVariable||!v(t))return ae(t);let o=Bs(t,e,r,{commas:!1,resolve:s=>ae(s),resolveScheme:s=>ae(t,"@"+s)});return o!==void 0?o:ae(t)};M();var EU=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","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","gainsboro","ghostwhite","gold","goldenrod","greenyellow","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","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),FR=["color","Color","background","Background","fill","Fill","stroke","Stroke"],VR=t=>{for(let e=0;e<FR.length;e++)if(t.includes(FR[e]))return!0;return!1},vU={boxShadow:js,textShadow:js,border:ae,borderTop:ae,borderRight:ae,borderBottom:ae,borderLeft:ae,outline:ae,columnRule:ae},AU=t=>{if(!t)return!1;let e=Qt(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},BR=new Set,CU=(t,e,n,r,o,s)=>{if(!tt())return;let i=`${t}::${e}::${n||""}::${r}`;BR.has(i)||(BR.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},C0=(t,e,n,r)=>{let o=vU[e];if(!o)return dt(n,r);let s=null,i=o(n,r,a=>{!s&&AU(a)&&(s=a)});return s&&CU(t,e,r,n,i,s),i},T0=(t,e)=>on(t,e),TU=t=>k(t)&&V(t.value),OU=t=>{for(let e in t){let n=t[e];if(v(n)&&n.startsWith("var(--"))return!0}return!1},du=(t,e)=>{let n=P();return TU(t)?!n.useVariable&&OU(t)?t:Na(t.value,e):Na(t,e)},HR=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&VR(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=dt(i,`@${s}`);a!==void 0&&v(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!EU.has(a)&&n.add(s)}}return n},zR=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),pu=(t,e)=>{for(let n in e){let r=e[n];k(r)?pu(t[n]||(t[n]={}),r):t[n]=r}return t},jR=(t,e,n,r,o)=>pu(t,Cr(r,o,s=>({[e]:n[s]}))),WR=(t,e,n,r)=>{let o={},s=Object.keys(e).filter(c=>e[c]!==n);if(!s.length)return n===void 0?void 0:(o[t]=n,o);let i=e.light!==void 0?e.light:n,a=e.dark!==void 0?e.dark:n;if(VR(t)&&_o(i)&&_o(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;let c=Object.keys(e).filter(l=>l!=="light"&&l!=="dark");jR(o,t,e,c,r)}else n!==void 0&&(o[t]=n),jR(o,t,e,s,r);return o},RU=new Set(["backdropFilter","WebkitBackdropFilter"]),KR=new WeakSet,qR=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=HR(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let m={};for(let E in t)V(t[E]?.[l])&&(m[E]=t[E][l]);let y=r&&V(r[l])?r[l]:void 0;if(!Object.keys(m).length&&!y)continue;let x=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=qR(m,`${e}-${x}`,n,y);continue}let u=r&&!V(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},g;for(let m of d){if(a.has(m))continue;let y=t[m]?.[l];if((y===void 0||V(y))&&(y=u),y===void 0)continue;let x=C0(e,l,y,`@${m}`);x!==void 0&&(p[m]=x,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=x))}let h=WR(l,p,g,n);h&&(pu(c,h),c[`.${l}`]=h)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},v0=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=HR(t,l);for(let u of l){let d=u.slice(0,1),p=V(r?.[u])||Object.values(t).some(g=>V(g?.[u]));if(d==="."&&p){let g=u.slice(1),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=v0(h,`${e}-${g}`,n,m)}else if(d===":"&&p){let g=u.replace(/^:+/,""),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=v0(h,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!V(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let x,E=!1,C={};for(let _ of y){if(f.has(_))continue;let b=t[_]?.[u];if((b===void 0||V(b))&&(b=m),b===void 0)continue;let w=C0(e,u,b,`@${_}`);if(w===void 0)continue;E=!0,C[_]=w,(a&&_===a||!a&&(_==="light"||x===void 0))&&(x=w);let S=`[data-theme="${_}"]`;if(s[S]||(s[S]={}),s[S][h]=w,_==="dark"||_==="light"){let A=`@media (prefers-color-scheme: ${_})`;s[A]||(s[A]={}),s[A][h]=w}}if(x!==void 0&&(o[h]=x),!E)continue;if(RU.has(u)){let _=WR(u,C,x,n);_&&(pu(c,_),c[`.${u}`]=_);continue}c[u]=`var(${h})`,c[`.${u}`]={[u]:c[u]}}}(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color});for(let u in c)zR(u)&&V(c[u])&&KR.add(c[u]);return c},Na=(t,e,n,r)=>{let o=P(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(V(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=v0(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=qR(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let p=u==="@"&&f;i[f]=Na(d,e,f,r||p)}else if(!a){let p=C0(e,f,d,r),g=[...new Set([r,n].filter(x=>x).map(x=>x.slice(1)))],h=g.length?"-"+g.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=p),i[f]=`var(${y})`):i[f]=p,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&V(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&V(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(v(t)&&Ft(t)){let u=o.theme[t.slice(2)];return on(u,r)}return i},A0=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(V(t[r]))if(zR(r)&&(e||KR.has(t[r])))n[r]=pu({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=A0(t[r],e):o==="."&&(n[`&${r}`]=A0(t[r],e))}else n[r]=t[r]}return n},GR=(t,e)=>{let n=e.shift();return t[n]?GR(t[n],e):t},UR=(t,e)=>I(e)?GR(t,e):v(e)&&t[e]?t[e]:t;var on=(t,e)=>{let n=P();if(v(t)&&Ft(t)&&(t=on(t.slice(2))),!t||!v(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=I(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=UR(s,o):s&&e&&(s=UR(s,e)),A0(s,!n.useVariable)};M();M();var hu=(t,e)=>{let n=P(),r=`--font-${e}`;if(!t||I(t)&&!t[0])return;let o;if(t.isVariable){let s=en(t.url,n.files)||t.url;Oa(s)?o=Ra(s):o=ho(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Rs(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>en(i,n.files)||i):en(t.url,n.files)||t.url;o=ho(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},JR=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong","inherit","initial","unset","revert","revert-layer"]),PU=t=>JR.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),YR=new Set,gu=(t,e)=>{let n=P(),{fontFamily:r}=n,o=e||r,s=Sr(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!v(t))return Sr(o);if(!PU(t))return ur()&&!YR.has(t)&&(YR.add(t),console.warn(`[scratch] fontFamily \`${t}\` is not a font family key of this design system \u2014 rendering the default family. Name a key from designSystem fontFamily, a CSS generic family (\`monospace\`, \`serif\`, \u2026) or a quoted font name (\`"'${t}'"\`).`)),Sr(o)},XR=t=>{let e=t.trim(),n=e.replace(/^(['"])(.*)\1$/,"$2").trim(),r=n.replace(/\s+/g," ").toLowerCase();return n!==e&&JR.has(r)?'"'+r+'"':r},$a=(t,e)=>{let n=P(),{fontFamily:r,fontFamilyTypes:o}=n;if(k(t)&&v(t.value)&&v(t.var))return n.useVariable&&(n.cssVars[t.var]=t.value),t;let{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.__defaultKey)&&(r.__defaultKey=e),k(s)&&(s=vs(s));let c=`--${n.varPrefix?n.varPrefix+"-":""}font-family-${e}`,l=p=>p&&!p.startsWith("--"),f=[...s].map(p=>String(p).trim()).filter(l),u=new Set;for(let p of f)for(let g of p.split(","))u.add(XR(g));for(let p of String(o[i]??"").split(",")){let g=p.trim();if(!l(g))continue;let h=XR(g);u.has(h)||(u.add(h),f.push(g))}let d=f.join(", ");return n.useVariable&&(n.cssVars[c]=d),{var:c,value:d,arr:s,type:i,isSystemFallback:!!t.isSystemFallback,isSharedLibrary:!!t.isSharedLibrary}};M();var Og=t=>{let e=P(),{typography:n,media:r}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h}=t;Lt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,x=!i.unit&&m.has(h)?"rem":y,E=r[c],C="@media "+(E==="print"?`${E}`:`screen and ${E}`);if(n.templates[C]={fontSize:i.base/n.browserDefault+x},!a){Lt(i,{sequence:{},scales:{},vars:{}}),_e(i),yo(t,o);continue}Lt(i,{sequence:{},scales:{},templates:{},vars:{}}),_e(i),yo(t,o)}},Rg=t=>{let e=P();if(t.h1Matches){let n=t.unit,r=nu(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},mu=()=>{let t=P(),{typography:e}=t;_e(e),Rg(e),vr(e),Og(e)},yu=t=>{let e=P(),{typography:n}=e;return qn(t,"fontSize",n)};M();var bu=t=>{if(!v(t))return;let n=P().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};M();var _u=()=>{let t=P(),{timing:e}=t;_e(e),vr(e)},Fe=t=>{let e=P(),{timing:n}=e;return n[t]||n[br(t)]||t},we=(t,e="timing")=>{let n=P(),{timing:r}=n;return qn(t,e,r)};M();var wu=()=>{let t=P(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return lr(o)?(Xr(t,"document",o),o=t.document={}):o||(o=t.document={}),Lt(o,{theme:n.document,fontFamily:Sr(e),fontSize:r.base,lineHeight:r.lineHeight})};M();var P0={document:kt},ZR=new WeakMap,QR=new WeakMap,LU=128,tP=1048576,O0=8192,L0=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),rP=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),DU=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},R0=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},IU=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},Fa=(t,e)=>{let n=P();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?su(e,t):t},Su=(t,e=P0)=>{let n=P(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];sP(r,e)},Us=(t,e)=>{let n=P();return n.useIconSprite&&!n.semanticIcons?.[e]?Fa(t,e):t},Vs=(t,e=P0)=>{let n=P(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];sP(r,e)},oP=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},MU=t=>{let e=t&&t.defaultView;return e&&typeof e.DOMParser=="function"?e.DOMParser:typeof DOMParser<"u"?DOMParser:null},NU=(t,e)=>{let n=MU(t);if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},$U=(t,e,n)=>{let r=String(n),o=QR.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=NU(t,r);if(i||(i=oP(t,{isRoot:!1}),i.innerHTML=r),r.length>tP)return i;let a=DU(i,O0);if(a>O0)return i;for(o||(o={entries:new Map,units:0,nodes:0},QR.set(e,o));o.entries.size>=LU||o.units+r.length>tP||o.nodes+a>O0;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},eP=t=>{let e=new Map;for(let n of t.children){let r=L0(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},FU=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),nP=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?eP(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${FU(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=eP(n)}return s.get(a)};for(let a of e.childNodes){if(rP(a))continue;let c=L0(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let p=R0(t,d||a);n.appendChild(p),r.nodes[u]=p;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=R0(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=R0(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},sP=(t,e=P0)=>{let n=P(),r=e.document||kt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),ou(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||oP(r);if(!i||!i.nodeType)return;let a=d=>$U(r,i,d),c=a(s),l=ZR.get(i);l||ZR.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!rP(d)&&!L0(d))){let d=[];for(let p in t)d.push(p);for(let p of d){let g=f.get(p);g||f.set(p,g={nodes:[],complete:!1}),nP(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{nP(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||IU(r.body,i);for(let d in t)n.__svgCache[d]=!0};M();var xu=(t={})=>{let e=P(),n=e.typography||{},r=e.document||{},o=k(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?on("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates||{},a=e.useDocumentTheme?on("document"):{};if(o.html&&se(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,d=f.base||n.base,p=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return bt(Lt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ie)};M();var BU=new Set(["fallback"]),D0=new Set,iP=(t,e)=>{D0.has(t)||(D0.add(t),tt()&&console.warn(e))},I0=()=>{D0.clear()},aP=t=>{for(let e in t)delete t[e];return t},ku=()=>{let t=P(),e=k(t.cssSkinVars)?aP(t.cssSkinVars):t.cssSkinVars={},n=k(t.cssSkinFallback)?aP(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!k(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>v(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!k(l))continue;let f={};for(let u in l){if(BU.has(u))continue;let d=l[u];if(k(d))for(let p in d){let g=`--${o}theme-${u}-${p}`;t.useVariable!==!1&&!(g in i)&&iP(`${c}/${u}/${p}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${p}", which the theme does not declare \u2014 no element reads ${g}, so the skin changes nothing there. Declare "${p}" on the "${u}" theme (its no-skin value).`),f[g]=a(d[p])}}e[c]=f,v(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(iP(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},cP=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},Hs=(t,e,n)=>{let r={};if(!k(t))return r;for(let s in t)r[cP(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[cP(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};M();var Pg=(t,e)=>uu(t,e),Lg=t=>{if(v(t))return _r.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(Ft(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=dt(e);return tn(n)?n:e}).join(" ")},Dg=(t,e)=>fu(t,e),Eu=(t,e)=>{if(!v(t))return;let n=P();if(!n.useVariable){let r=jU(t,e,n);if(r!==void 0)return r}return M0(t,e)},jU=(t,e,n)=>Bs(t,e==="auto"?null:e,n,{commas:!0,resolve:M0,resolveScheme:(r,o)=>M0(o(s=>dt(s,"@"+r,n)),null)}),M0=(t,e)=>wr(t,VU,UU,e),UU={commas:!0,keywords:new Set(["inset","none"])},VU=(t,e)=>{if(!tn(dt(t)))return Ma(t);let n=Kt(t,e);return k(n)?Object.values(n).filter(r=>r.includes(": "+e))[0]:n},Ig=(t,e)=>{if(!v(t))return;let n=P();return Cn(t).map(r=>{let o=r.trim();if(Ft(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=Kt(o,e);if(v(s))return s;if(k(s)){for(let i in s)if(v(s[i]))return s[i]}return o}return o.includes("gradient")?xo(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!Qt(o)?`url(${o})`:o}).join(", ")},vu=new Set(["auto","cover","contain"]),Au=new Set(["center","top","bottom","left","right"]),HU=(t,e,n,r)=>{if(n.has(t))return t;let o=kr(()=>$e(r,e,t));return o&&o[e]!==void 0?o[e]:t},zs=(t,e,n,r)=>v(t)?Cn(t).map(o=>ut(o.trim()).map(s=>HU(s,e,n,r)).join(" ")).join(", "):t,Mg=t=>v(t)&&ut(t).map(e=>Vt(e,"gap").gap).join(" "),Ng=t=>{if(!v(t))return t;let e=P();return ut(t).map(n=>On.test(n)?Ls(n,e.spacing):n).join(" ")},N0=t=>{if(!v(t))return;let e=t.split(" ");return e.length?e.map(n=>Ft(n)?`var(${n})`:n.length<3||n.includes("ms")?we(n).timing||n:Fe(n)?Fe(n):n).join(" "):t},Cu=(t,e,n)=>{if(v(t))return t.split(",").map(r=>we(r).timing||r).join(",")},$g=t=>{if(!v(t))return;let e=t.split(",");if(e.length)return e.map(N0).join(",")};function Nt(t,e,n={},r={}){let o=St.call(this,e||n[t]);if(o==null)return;let s;if(v(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Er(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=au(t);!i&&a&&!r.ratio&&(o=lu(o))}return r.ratio?$e(n,t,o,s):Vt(o,t,void 0,s)}var j=(t,e=null,n)=>Nt(t,e,n,{ratio:!0}),zU=(t,e,n)=>v(t)?ut(t).map(r=>On.test(r)?$e(e,n,r)[n]:r).join(" "):t,Tr=(t,e,n,r="borderRadius")=>{if(v(t))return{[r]:ut(t).map(o=>{let s=bu(o);return s!==void 0?zU(s,e,n):$e(e,n,o)[n]}).join(" ")}};M();var ja="__smblsThemeRootOwner",Ua=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},lP=(t,e,n)=>{if(!(!t||!e)){Ua(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},WU=(t,e)=>{let n=P(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},ce=t=>t,KU=(t,e)=>{if(v(t)||ge(t)){let n=P();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},Fg={color:Ar,gradient:Ia,font:hu,fontFamily:$a,fontfamily:$a,theme:du,icons:Us,semanticIcons:ce,semanticicons:ce,svg:Fa,svgData:ce,typography:ce,shadow:ko,spacing:ce,media:ce,grid:ce,class:ce,timing:ce,reset:ce,unit:ce,animation:ce,vars:WU,sizes:KU,shape:ce,skins:ce,viewTransition:ce},qU=(t,e,n,r)=>{Xr(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},$0=(t,e,n)=>{let r=P(),o=Yf(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=lr(i)?qU(r,i,s,[o,s,t]):i,c=Fg[o]||Fg[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},Tu=(t,e)=>{let n=P(),r=t.toLowerCase();if(lr(e))return Xr(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t];if(e==null)return n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t];let o=Object.keys(e).sort((s,i)=>{let a=k(e[s])||I(e[s])?1:0,c=k(e[i])||I(e[i])?1:0;return a-c});if(r==="color"){let s=n[r]||(n[r]={});for(let i of o)i in s||(s[i]=e[i])}return o.forEach(s=>{try{return $0(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t]},Bg=(t,e)=>{let n=e||P();n.globalTheme=t;let o=Vi(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[ja]=n,c)Ua(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",lP(n,f,l)}else Ua(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},Ou=t=>{let n=Vi(t)||(typeof document<"u"?document:null),r=n&&n.defaultView||(typeof window<"u"?window:null),o=n&&(t.themeRoot||n.documentElement);if(o&&typeof o.setAttribute=="function")if(t.globalTheme&&t.globalTheme!=="auto")Ua(t),o.setAttribute("data-theme",t.globalTheme),t.resolvedTheme=t.globalTheme,o[ja]=t,t.globalTheme==="dark"||t.globalTheme==="light"?o.style.colorScheme=t.globalTheme:o.style.colorScheme="light dark";else if(o[ja]&&o[ja]!==t&&o.hasAttribute("data-theme"))Ua(t),t.resolvedTheme=o.getAttribute("data-theme");else if(r&&r.matchMedia){let i=c=>{let l=c.matches?"dark":"light";o.setAttribute("data-theme",l),t.resolvedTheme=l},a=r.matchMedia("(prefers-color-scheme: dark)");i(a),o.style.colorScheme="light dark",o[ja]=t,lP(t,a,i)}else Ua(t),o.setAttribute("data-theme","light"),t.resolvedTheme="light",o.style.colorScheme="light",o[ja]=t},GU={},Ws=(t,e=GU)=>{let n=e.config||P(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:g,hoverMedia:h,focusableRing:m,files:y,assets:x,...E}=t;e.newConfig&&(n=wg(e.newConfig)),cr(E.document)&&(n.__domDocument=E.document,delete E.document),cr(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),y!==void 0&&(n.files=y),x!==void 0&&(n.assets=x),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),p!==void 0&&(n.useDefaultConfig=p),g!==void 0&&(n.semanticIcons=g),h!==void 0&&(n.hoverMedia=h),m!==void 0&&(n.focusableRing=m),n.verbose&&console.log(n),Ou(n),n.__svgCache||(n.__svgCache={}),La(E);let C=Object.keys(E).filter(S=>!S.startsWith("__")),_=new Set(C);C.forEach(S=>{let A=S.toLowerCase();A!==S&&_.has(A)&&bt(E[A],E[S],ie)});let b=new Set;if(C.forEach(S=>{let A=S.toLowerCase(),T=A!==S&&_.has(A)?A:S;b.has(T)||(b.add(T),Tu(T,E[T]))}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),E.typography)try{mu()}catch(S){n.verbose&&console.warn("Error applying typography sequence",S)}if(E.spacing)try{cu()}catch(S){n.verbose&&console.warn("Error applying spacing sequence",S)}if(E.timing)try{_u()}catch(S){n.verbose&&console.warn("Error applying timing sequence",S)}try{ku()}catch(S){n.verbose&&console.warn("Error applying skins",S)}wu();let w=xu();return w&&(n.reset=w),n};var Ha=1,F0=["font","files","assets","themeRoot"],YU=new Set(F0),Va="$smbls",jg=t=>{if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},XU=t=>t.startsWith("__")||YU.has(t),Ug=t=>{if(!jg(t))return null;let e=new Map,n=!1,r=s=>{if(n)return;if(s===void 0)return{[Va]:"u"};if(s===null||typeof s=="string"||typeof s=="boolean")return s;if(typeof s=="number")return Number.isFinite(s)&&!Object.is(s,-0)?s:{[Va]:"n",v:Object.is(s,-0)?"-0":String(s)};if(typeof s!="object"){n=!0;return}let i=e.get(s);if(i!==void 0)return{[Va]:"r",i};if(Array.isArray(s)){e.set(s,e.size);let c=new Array(s.length);for(let l=0;l<s.length;l++){if(!(l in s)){n=!0;return}c[l]=r(s[l])}return c}if(!jg(s)||Object.prototype.hasOwnProperty.call(s,Va)){n=!0;return}e.set(s,e.size);let a={};for(let c of Object.keys(s))a[c]=r(s[c]);return a},o={};for(let s of Object.keys(t))if(!XU(s)&&(o[s]=r(t[s]),n))return null;return o},JU=(t,e)=>{let n=Object.keys(e),r=0;for(let o in t){if(r===n.length)return!0;if(o!==n[r])return!1;r++}return r===n.length},Vg=(t,e)=>{let n=[],r=(s,i)=>{if(s===null||typeof s!="object")return s;if(Array.isArray(s)){let l=new Array(s.length);n.push(l);for(let f=0;f<s.length;f++)l[f]=r(s[f]);return l}let a=s[Va];if(typeof a=="string"){if(a==="u")return;if(a==="n")return s.v==="-0"?-0:Number(s.v);if(a==="r")return n[s.i]}let c=i;if(c&&!JU(s,c))for(let l of Object.keys(c))delete c[l];else c||(c={});n.push(c);for(let l in s)c[l]=r(s[l]);return c},o=new Set;for(let s in t){let i=t[s],a=e[s],c=jg(a)&&!o.has(a)&&jg(i)&&typeof i[Va]!="string"?a:null;c&&o.add(c);let l=r(i,c);l!==a&&(e[s]=l)}return e};var H=(t,e)=>e.split(" ").map(n=>t+"-"+n),V0="top right bottom left",H0=V0+" block block-start block-end inline inline-start inline-end",Se="start end",Rr="width style color",Hg=t=>H(t,H0),ZU=(()=>{let t=H("border","width style color image");for(let e of H0.split(" "))t.push("border-"+e,...H("border-"+e,Rr));return t})(),fP=t=>[...H("border-"+t,Rr+" start end"),...H("border-"+t+"-start",Rr),...H("border-"+t+"-end",Rr)],vt={animation:H("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:H("background","image position position-x position-y size repeat origin clip attachment color"),border:ZU};for(let t of["width","style","color"])vt["border-"+t]=H0.split(" ").map(e=>"border-"+e+"-"+t);for(let t of V0.split(" "))vt["border-"+t]=H("border-"+t,Rr);vt["border-block"]=fP("block");vt["border-inline"]=fP("inline");Object.assign(vt,{"border-image":H("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:H("column","width count"),"column-rule":H("column-rule",Rr),container:H("container","name type"),"contain-intrinsic-size":H("contain-intrinsic","width height"),flex:H("flex","grow shrink basis"),"flex-flow":H("flex","direction wrap"),font:[...H("font","style variant weight stretch size"),"line-height",...H("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:H("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":H("grid-template","rows columns areas"),"grid-area":H("grid","row column row-start row-end column-start column-end"),"grid-row":H("grid-row",Se),"grid-column":H("grid-column",Se),inset:[...V0.split(" "),...H("inset","block block-start block-end inline inline-start inline-end")],"inset-block":H("inset-block",Se),"inset-inline":H("inset-inline",Se),"list-style":H("list-style","type position image"),margin:Hg("margin"),"margin-block":H("margin-block",Se),"margin-inline":H("margin-inline",Se),mask:H("mask","image mode repeat position clip origin size composite"),offset:H("offset","position path distance rotate anchor"),outline:H("outline",Rr),overflow:H("overflow","x y"),"overscroll-behavior":H("overscroll-behavior","x y"),padding:Hg("padding"),"padding-block":H("padding-block",Se),"padding-inline":H("padding-inline",Se)});for(let t of["content","items","self"])vt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(vt,{"scroll-margin":Hg("scroll-margin"),"scroll-padding":Hg("scroll-padding"),"text-decoration":H("text-decoration","line style color thickness"),"text-emphasis":H("text-emphasis","style color"),transition:H("transition","property duration timing-function delay behavior")});var QU="block-start block-end inline-start inline-end".split(" ");for(let t of QU)vt["border-"+t]=H("border-"+t,Rr);for(let t of["block","inline"])for(let e of Rr.split(" "))vt["border-"+t+"-"+e]=H("border-"+t,Se.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(vt,{"animation-range":H("animation-range",Se),"background-position":H("background-position","x y"),"font-variant":H("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":H("font-synthesis","weight style small-caps"),marker:H("marker","start mid end"),"position-try":H("position-try","order fallbacks"),"scroll-margin-block":H("scroll-margin-block",Se),"scroll-margin-inline":H("scroll-margin-inline",Se),"scroll-padding-block":H("scroll-padding-block",Se),"scroll-padding-inline":H("scroll-padding-inline",Se),"scroll-timeline":H("scroll-timeline","name axis"),"view-timeline":H("view-timeline","name axis inset"),"text-box":H("text-box","trim edge"),"text-wrap":H("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});vt.font.push("font-language-override");var Or=t=>"corner-"+t+"-shape";vt["corner-shape"]=[..."top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" "),..."top right bottom left block-start block-end inline-start inline-end".split(" ")].map(Or);Object.assign(vt,{"corner-top-shape":["top-left","top-right"].map(Or),"corner-right-shape":["top-right","bottom-right"].map(Or),"corner-bottom-shape":["bottom-left","bottom-right"].map(Or),"corner-left-shape":["top-left","bottom-left"].map(Or),"corner-block-start-shape":["start-start","start-end"].map(Or),"corner-block-end-shape":["end-start","end-end"].map(Or),"corner-inline-start-shape":["start-start","end-start"].map(Or),"corner-inline-end-shape":["start-end","end-end"].map(Or)});for(let t in vt){let e=vt[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=vt[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var sn={};for(let t in vt)for(let e of vt[t])(sn[e]||(sn[e]=[])).push(t);var j0=new Map,uP=t=>{let e=j0.get(t);if(e!==void 0)return e;j0.set(t,0),e=0;let n=sn[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,uP(n[r])+1);return j0.set(t,e),e};function za(t){if(typeof t!="string")return 0;let e=t.charCodeAt(0)===45&&t.charCodeAt(1)!==45?t.replace(/^-(webkit|moz|ms|o)-/,""):t;return Object.prototype.hasOwnProperty.call(sn,e)?uP(e):0}var tV=/^(?:margin|padding|inset|scroll-margin|scroll-padding)(?:-(?:block|inline))?$|^border(?:-(?:block|inline))?-(?:width|style|color)$|^(?:border-radius|corner(?:-[a-z]+)*-shape|gap|overflow|overscroll-behavior|place-(?:content|items|self)|background-position|contain-intrinsic-size)$/,dP=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,eV=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),U0=t=>ut(String(t).replace(/\s*!important\s*$/,""));function Wa(t,e,n){let r=vt[t];if(!r||r.indexOf(n)===-1)return!1;if(tV.test(t))return!0;if(!dP.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=U0(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>eV.has(s.toLowerCase()))}var nV=new Set(["thin","medium","thick"]),rV=t=>/^[+-]?\.?\d/.test(t)||nV.has(t.toLowerCase())||/^(?:calc|min|max|clamp)\(/i.test(t)||/^var\(--(?:[a-zA-Z0-9]{1,6}-)?spacing-/.test(t),oV=t=>t==="transparent"||t==="currentcolor"||Object.prototype.hasOwnProperty.call(Ea,t),sV=t=>Ts(t)||/^var\(--(?:(?!theme-|shadow-)[a-zA-Z0-9]{1,6}-)?color-/.test(t)||oV(t.toLowerCase()),iV=/-(width|style|color)$/;function Ru(t,e,n){if(Wa(t,e,n))return!0;let r=vt[t];if(!r||r.indexOf(n)===-1||typeof e=="function"||e==null)return!1;if(dP.test(t)){if(n.indexOf("border-image")===0)return!1;let o=iV.exec(n);if(!o)return!1;let s=U0(e);return s.length===1&&/^(?:0|none)$/i.test(s[0])?o[1]!=="color":o[1]==="width"&&s.some(rV)}if(t==="background"&&n==="background-color"){let o=U0(e);return o.length===1&&sV(o[0])}return!1}var Ga=new Map,AP=null,z0=null,aV=null;function Du(t){t.batchAtomicCss&&(z0=t.batchAtomicCss),t.compoundCssClass&&(aV=t.compoundCssClass)}var cV=new Set,hP=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function tk(t){try{let e=P();e&&(e.__domDocument=t)}catch{}t&&cV.add(t)}function Gn(){try{let t=P();if(t){if(hP(t.__domDocument))return t.__domDocument;if(hP(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var xe={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function Jg(){return{...xe}}function ek(){for(let t in xe)xe[t]=0;Gg=!1}var Gg=!1,Kg=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function lV(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${Kg(n,"day")} ago)`}function fV(){try{let t=xV();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function uV(t,e){if(Gg)return!1;Gg=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Kg(xe.variable,"variable rule")} and ${Kg(xe.atomic,"atomic rule")}, while the design system held ${Kg(e,"CSS variable")}.
45
+ src: ${i};`},go=(t,e,n,r)=>`@font-face {${Gf(t,e,n,r)}
46
+ }`,Ps=(t,e,n)=>Object.keys(e).map(o=>{let{url:s,fontWeight:i,fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f}=e[o],u=Array.isArray(s)?s.map(d=>nn(d,n)||d):nn(s,n)||s;return Gf(t,u,i,{fontStyle:a,fontDisplay:c,fontStretch:l,unicodeRange:f})}),Kx=t=>Object.keys(t).map(n=>Ps(n,t[n].value)),bg=(t,e,n)=>{if(e&&e.isVariable){let s=nn(e.url,n)||e.url;return Pa(s)?La(s):go(t,s,e.fontWeight,{fontStretch:e.fontStretch,fontDisplay:e.fontDisplay||"swap",unicodeRange:e.unicodeRange})}if(e[0])return Ps(t,e,n).map(yg);let o=Array.isArray(e.url)?e.url.map(s=>nn(s,n)||s):nn(e.url,n)||e.url;return go(t,o,e.fontWeight,{fontStyle:e.fontStyle,fontDisplay:e.fontDisplay,fontStretch:e.fontStretch,unicodeRange:e.unicodeRange})},Yf=(t,e)=>Object.keys(t).map(r=>bg(r,t[r].value,e));M();M();M();M();Mt();var Da={};F(Da,{animation:()=>l0,breakpoints:()=>a0,class:()=>h0,color:()=>t0,devices:()=>c0,document:()=>kR,font:()=>Gx,fontFace:()=>Jx,fontFamily:()=>Yx,fontFamilyTypes:()=>Xx,gradient:()=>e0,grid:()=>p0,icons:()=>o0,media:()=>Zx,reset:()=>ER,semanticIcons:()=>s0,sequence:()=>Er,shadow:()=>r0,shape:()=>y0,sizes:()=>m0,skins:()=>b0,spacing:()=>Qx,svg:()=>f0,svgData:()=>_g,svg_data:()=>u0,templates:()=>d0,theme:()=>n0,timing:()=>i0,typography:()=>Xf,unit:()=>qx,vars:()=>g0,viewTransition:()=>_0});var Er={"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 qx={default:"em"};var tU={browserDefault:16,base:16,type:"font-size",ratio:Er["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Xf=tU;var Gx={};var Yx={},Xx={"sans-serif":"Helvetica, Arial, sans-serif",serif:"Times New Roman, Georgia, serif",monospace:"Courier New, monospace"},Jx={};var Zx={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var eU={base:Xf.base,type:"spacing",ratio:Er.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Qx=eU;var t0={},e0={};var n0={};var r0={};var o0={},s0={};var nU={default:150,base:150,type:"timing",ratio:Er["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},i0=nU;var kR={};var a0={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},c0={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 l0={};var f0={},_g={},u0=_g;var d0={};var rU={},p0=rU;var h0={};var ER={},g0={},m0={},y0={},b0={},_0={};var xg={},kg={},ae=new Set,wg=Da,Sg={},Qf=t=>t.replace(/_([a-z])/g,(e,n)=>n.toUpperCase());for(let t in wg){let e=t.toLowerCase();Sg[e]=wg[t];let n=Qf(e);n!==e&&(Sg[n]=wg[t]),e!==t&&(Sg[t]=wg[t])}var Ls={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:xg,cssMediaVars:kg,CSS_VARS:xg,CSS_MEDIA_VARS:kg,cssSkinVars:{},cssSkinFallback:{},_scratchConfig:!0,...Sg},mo=(t,e)=>{if(!t)return null;if(t.__globalThemeSignal)return Ut(e)&&t.__globalThemeSignal.set(e),t.__globalThemeSignal;let n=Ut(e)?e:t.globalTheme,r=wn(Ut(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},vR=t=>t?mo(t):null,yo=(t,e)=>{if(!t)return null;if(t.__resolvedThemeSignal)return Ut(e)&&t.__resolvedThemeSignal.set(e),t.__resolvedThemeSignal;let n=Ut(e)?e:t.resolvedTheme,r=wn(Ut(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},AR=t=>t?yo(t):null;mo(Ls);yo(Ls);var Jf=pt(Ls),$e={active:"0",0:Ls},CR=t=>(Ut(t)&&($e.active=t),$e[t||$e.active]),Zf=[],mt=t=>{t&&t._scratchConfig&&Zf.push(t)},ht=()=>{Zf.pop()},P=t=>Zf.length?Zf[Zf.length-1]:$e[t||$e.active]||Ls,Eg=t=>{if(k(t))return $e.active="1",$e[1]=bt(t,pt(Jf),ae),Ia($e[1]),mo($e[1]),yo($e[1]),t},oU=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],sU=["useVariable","globalTheme","verbose"],iU=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData","svg_data"]],Ia=t=>{for(let e of iU){let n;for(let r of e){let o=t[r];k(o)&&(n=n?bt(n,o,ae):o)}if(n)for(let r of e)k(t[r])&&(t[r]=n)}},TR=t=>(t.cssVars={},t.cssMediaVars={},t.CSS_VARS=t.cssVars,t.CSS_MEDIA_VARS=t.cssMediaVars,t.cssSkinVars={},t.cssSkinFallback={},t._scratchConfig=!0,Ia(t),mo(t),yo(t),t),vg=()=>TR(pt(Jf)),tu=(t,e,{cleanBase:n=!1}={})=>{let r=n?null:P(),o=pt(!n&&r&&r._scratchConfig?r:Jf);for(let i of oU)delete o[i];for(let i of sU)Object.prototype.hasOwnProperty.call(Jf,i)?o[i]=Jf[i]:delete o[i];let s=TR(bt(e||{},o,ae));return t&&($e[t]=s),s};var Rn=/^-?[A-Z][0-9]?$/,w0=0,vr=t=>{w0++;try{return t()}finally{w0--}},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"},aU=Object.keys(rn).reduce((t,e)=>(t[rn[e]]=Number(e),t),{}),cU=(t,e,n,r)=>{if(Rn.test(e)){if(t&&Object.keys(t).length)return t[e]!==void 0;let o=aU[e.slice(0,1)];if(o===void 0)return!1;let{range:s}=n;return!Array.isArray(s)||s.length<2?!0:o>=Math.min(s[0],s[1])&&o<=Math.max(s[0],s[1])}if(r&&Object.keys(r).length)return!1},x0=(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=OR.has(e.unit)?"rem":e.unit;e.vars[r]=s+c},Ar=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)]},S0="\0",lU=(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+=S0+e.length+S0,e.push(o),o=""))}return n+o},fU=(t,e)=>t.indexOf(S0)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),uU=/^(calc|min|max|clamp)\((.*)\)$/,dU=(t,e)=>{let n=uU.exec(t);return n?`${n[1]}(${su(n[2],e)})`:t.indexOf("(")!==-1?t:Ds(t,e)},OR=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),eu=(t,e)=>{let{base:n,type:r,unit:o}=e,s=OR.has(o)?"rem":o,i=(Jo(s)?1:n)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(r&&r.replace(".","-")),l=`${c}-ratio`;if(t>0){let f=rn[t-1];return`calc(var(${c}-${f}) * var(${l}))`}if(t<0){let f=rn[t+1],u=Math.abs(t),d=Math.pow(RR,2*u),p=rn[u];return p?`max(calc(var(${c}-${f}) / var(${l})), calc(var(${c}-${p}) / ${d.toFixed(4)}))`:`calc(var(${c}-${f}) / var(${l}))`}},Ag=(t,e,n,r)=>{let{type:o}=r,i=t===2&&e.length===2?t+1:t,l=`${"--"+(r.varPrefix?r.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${n}) * var(${l+i}))`},nu=(t,e)=>{let r=(t*e-t)/1.618,o=t*e-r,s=t+r,i=(o+s)/2;return[o,i,s]},ru=(t,e)=>nu(t,e).map(n=>n/t),ou=(t,e)=>{let{key:n,base:r,value:o,ratio:s,variable:i,index:a}=t,l=~~(o*s)-~~o,f,[u,d,p]=nu(o,s);l>16?f=[u,d,p]:f=[u,p],f.forEach((g,h)=>{let m=~~(g/r*1e3)/1e3,y=i+(h+1),x=a+(h+1)/10,E=Ag(h+1,f,i,e),C={key:n+(h+1),variable:y,value:g,scaling:m,scalingVariable:E,index:x};x0(C,e)})},RR=1.618,pU=(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(RR,2*r);return Math.max(o,s)},we=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 l=0;l<=i;l++){let f=o[1]-l,u=rn[f],d=pU(f,n,r),p=~~(d/n*100)/100,g=c+u,h=eu(f,t),m={key:u,variable:g,value:d,base:n,scaling:p,scalingVariable:h,ratio:r,index:f};x0(m,t),s&&ou(m,t)}return t},k0=(t,e=0)=>{let{type:n,base:r,ratio:o,subSequence:s}=t,i=v(e)?e:rn[e],a=v(e)?Object.entries(rn).find(([,m])=>m===e)?.[0]:e;if(!i)return console.warn(`Position ${e} is out of range in numToLetterMap`),null;let c={sequence:{},scales:{},vars:{},...t},l=r*Math.pow(o,a),f=~~(l/r*100)/100,p="--"+(t.varPrefix?t.varPrefix+"-":"")+(n&&n.replace(".","-"))+"-"+i,g=eu(a,t),h={key:i,variable:p,value:l,base:r,scaling:f,scalingVariable:g,ratio:o,index:a};return x0(h,c),s&&ou(h,c),c},Ma=(t,e)=>{if(!t||!v(e)||!e)return;let n=t[e]||t[e.toLowerCase()];if(n!==void 0)return e.charCodeAt(0)===45?`calc(${n} * -1)`:n;if(e.charCodeAt(0)!==45||e.length<2)return;let r=e.slice(1),o=t[r]||t[r.toLowerCase()];if(o!==void 0)return`calc(${o} * -1)`},Ds=(t="A",e)=>{let n=P(),{unit:r}=n;if(v(t)&&Ft(t))return`var(${t})`;if(v(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(v(t)){let _=Ma(n.sizes,t);if(_!==void 0)return _}let{sequence:o,unit:s=r.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(fl(t)||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${Bf(e.type.replace(".","-"))}-`,p=t.toUpperCase(),g=p.slice(0,1)==="-"?"-":"",h=g?p.slice(1):p,m="";h.includes("_")&&(m="_"+h.split("_")[1].toLowerCase(),h=h.split("_")[0]);let y=_=>a.test(_)?`var(${d}${_}${m})`:_;if(h.includes("+")){let[_,b]=h.split("+"),w=`${y(_)} + ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("*")){let[_,b]=h.split("*"),w=`${y(_)} * ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}else if(h.includes("-")){let[_,b]=h.split("-"),w=`${y(_)} - ${y(b)}`;return g?`calc((${w}) * -1)`:`calc(${w})`}!o[h]&&h.length===2&&(n.verbose&&console.warn(h,"- value is not found because `subSequence` is set to false"),h=h.slice(0,1));let x=o?o[h]:null,E=!!(i||n.useVariable);if((E?cU(o,h,e,n.sizes):!!x)===!1){if(w0>0)return;if(console.warn("can't find",o,h),tt())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}if(E){let _=`var(${d}${h}${m})`;return g?`calc(${_} * -1)`:_}return s==="ms"||s==="s"?g+x.val+s:g+x.scaling+s},su=(t,e)=>{if(!["+","-","*","/",","].filter(i=>t.includes(i+" ")).length)return t;let r=/(\s+-\s+|\s*[+*/,]\s*)/,o=[];return lU(t,o).split(r).map(i=>{let a=fU(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:dU(c,e)}).join("")},Yn=(t,e,n,r)=>{if(typeof t!="string")return P().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=Ar(t);r=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=su(t,n):t=Ds(t,n),{[e]:r?`${r}(${t})`:t}},Cg=(t,e)=>rn[t-e],iu=t=>{let{h1Matches:e,sequence:n}=t;return new Array(6).fill(null).map((r,o)=>{let s=Cg(e,o);return n[s]})};M();var E0=(t,e)=>{let n=P(),{cssVars:r}=n;V(t.value)||(r[t.var]=t.value)},au=(t,e,n)=>{let r=P(),{unit:o}=r,s=e.unit||o.default,{base:i,ratio:a,type:c}=e,f="--"+(e.varPrefix?e.varPrefix+"-":"")+(c&&c.replace(".","-"));t[`${f}-base`]=i,t[`${f}-unit`]=s;let u=`${f}-ratio`;t[u]=a;let[d,p,g]=ru(i,a);t[`${f}-sub-ratio-1`]=`calc(var(${f}-ratio) * ${d/a})`,t[`${f}-sub-ratio-2`]=`calc(var(${f}-ratio) * ${p/a})`,t[`${f}-sub-ratio-3`]=`calc(var(${f}-ratio) * ${g/a})`},PR=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Cr=(t,e={})=>{let n=P(),{unit:r,timing:o,cssVars:s}=n,i=t.unit||r.default,a=PR.has(i)?"rem":i,{mediaRegenerate:c,sequence:l,scales:f}=t;c||au(s,t,e);for(let u in l){let d=l[u],p=(t.type===o.type?l[u].val:f[u])+a;if(!c){s[d.variable+"_default"]=p,s[d.variable]=d.scalingVariable;continue}e.useDefault===!1?s[d.variable]=p:(s[d.variable+"_default"]=p,s[d.variable]=`var(${d.variable+"_default"})`)}},bo=(t,e,n={})=>{let r=P(),{unit:o,media:s,cssVars:i}=r,a=e.slice(1),c=t[e],l=c.unit||t.unit||o.default,f=PR.has(l)?"rem":l,{mediaRegenerate:u}=t,{sequence:d,scales:p}=c,g=s[a];if(!g&&r.verbose&&console.warn("Can't find media query ",g),!u){let h=i[`@media ${g}`];h||(h=i[`@media ${g}`]={}),au(h,c,n);let m=t.unit||o.default;if(f!==m&&d)for(let y in d){let x=d[y],E=p[y]+f;h[x.variable+"_default"]=E,h[x.variable]=E}return}for(let h in d){let m=d[h],y=(Jo(f)?p[h]:d[h].val)+f;!g&&r.verbose&&console.warn("Can't find query ",g);let x=i[`@media ${g}`];x||(x=i[`@media ${g}`]={}),x[m.variable]=`var(${m.variable+"_"+a})`,i[m.variable+"_"+a]=y}};M();var DR=pr(),cu=t=>{let e=P(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},hU=t=>{let e=t&&(t.default||t);if(!v(e))return DR&&console.warn("parseRootAttributes:",e,"is not a string"),{};let n=e.match(/<svg\s+(.*?)>/);if(!n||!n[1])return{};let o=n[1].match(/(\S+)=["']?((?:.(?!["']?\s+(?:\S+)=|\s*\/?[>"']))+.)["']?/gm);return o?o.reduce((s,i)=>{let[a,c]=i.split("=");return s[a]=c.replace(/['"]/g,""),s},{}):{}},gU=(t,e)=>{let n=[];if(t.replace(/id="([^"]*)"/g,(o,s)=>(n.push(s),o)),!n.length)return t;let r=t;for(let o of n){let s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`${e}-${o}`;r=r.replace(new RegExp(`id="${s}"`,"g"),`id="${i}"`).replace(new RegExp(`url\\(#${s}\\)`,"g"),`url(#${i})`).replace(new RegExp(`xlink:href="#${s}"`,"g"),`xlink:href="#${i}"`).replace(new RegExp(`href="#${s}"`,"g"),`href="#${i}"`)}return r},LR=new Set,lu=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return DR&&!LR.has(t)&&(LR.add(t),console.warn("convertSvgToSymbol:",t,"is not a string")),"";e=n;let r=e.match(/^<symbol\b[^>]*\bid="([^"]*)"/);if(r){let u=r[1];return u===t?e:e.replace(`id="${u}"`,`id="${t}"`)}let o=hU(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=gU(e,t).replace("<svg",`<symbol id="${t}" xmlns="http://www.w3.org/2000/svg" viewBox="${a}"`);return f=f.replace(/^<symbol\b[^>]*>/,u=>u.replace(/\s(width|height)="[^"]*"/g,"")),f=f.replace("</svg","</symbol"),f=bU(f),f},mU="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",yU=new RegExp(`<(${mU})\\b([^>]*?)\\s*/>`,"g"),bU=t=>t.replace(yU,"<$1$2></$1>");var Ua={};F(Ua,{STANDARD_SCHEME_QUERIES:()=>Og,__resetSkinWarnings:()=>B0,appendSVGSprite:()=>vu,appendSvgIconsSprite:()=>zs,applyDocument:()=>Eu,applyHeadings:()=>Ig,applyReset:()=>Au,applySkins:()=>Cu,applySpacingSequence:()=>du,applyTimingSequence:()=>ku,applyTypographySequence:()=>wu,atSchemes:()=>So,buildSkinVarStyles:()=>Hs,checkIfBoxSize:()=>uu,colorPairSchemes:()=>fu,forcedScheme:()=>Bs,getColor:()=>dt,getFontFamily:()=>_u,getFontSizeByKey:()=>Su,getMediaBorder:()=>gu,getMediaColor:()=>Kt,getMediaTheme:()=>sn,getSafeInk:()=>Lg,getSafeInkInfo:()=>O0,getShadow:()=>hu,getShapeByKey:()=>xu,getSpacingBasedOnRatio:()=>Fe,getSpacingByKey:()=>Vt,getTheme:()=>D0,getTimingByKey:()=>Se,getTimingFunction:()=>Be,inForcedColors:()=>Is,isForcedColorsQuery:()=>Ms,isIntendedSystemColorWord:()=>Ns,isPlainColor:()=>wo,literalPairCompound:()=>js,literalSchemeMap:()=>Or,quietColorProbe:()=>$s,resolveBorderValue:()=>ce,resolveColorRgb:()=>Fs,resolveColorsInGradient:()=>ko,resolveShadowNonColorWord:()=>$a,resolveShadowValue:()=>Us,runThroughMedia:()=>Dg,schemeGuardSelector:()=>Pg,schemeMediaQuery:()=>Rg,setAdaptiveSchemeVar:()=>xo,setColor:()=>Tr,setFont:()=>bu,setFontFamily:()=>Ba,setGradient:()=>Na,setMediaTheme:()=>Fa,setSVG:()=>ja,setShadow:()=>Eo,setSvgIcon:()=>Vs,setTheme:()=>mu,splitSpacedValue:()=>pu});M();var Og={light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)"},Rg=(t,e)=>{let n=e.media&&e.media[t]||Og[t];return n?"@media "+(n==="print"?`${n}`:`screen and ${n}`):null},Pg=t=>{let e=t.scopeSelector||":root";return`${e===":root"?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`} &`},on=new Set,$R=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"]),FR=["AccentColor","AccentColorText","ActiveText","ButtonBorder","ButtonFace","ButtonText","Canvas","CanvasText","Field","FieldText","GrayText","Highlight","HighlightText","LinkText","Mark","MarkText","SelectedItem","SelectedItemText","VisitedText","ActiveBorder","ActiveCaption","AppWorkspace","Background","ButtonHighlight","ButtonShadow","CaptionText","InactiveBorder","InactiveCaption","InactiveCaptionText","InfoBackground","InfoText","Menu","MenuText","Scrollbar","ThreeDDarkShadow","ThreeDFace","ThreeDHighlight","ThreeDLightShadow","ThreeDShadow","Window","WindowFrame","WindowText"],BR=new Set(FR.map(t=>t.toLowerCase())),_U=new Set(FR),v0=0,Is=t=>{v0++;try{return t()}finally{v0--}},wU=/(^|[^\w-])(not\s+)?\(\s*forced-colors\s*(?::\s*(active|none)\s*)?\)/i,Ms=t=>{if(!v(t))return!1;let e=t.match(wU);return!e||e[2]||e[3]&&e[3].toLowerCase()==="none"?!1:!/^\s*(?:@media\s+)?not\b/i.test(t)},jR=t=>v0>0||_U.has(t),Ns=t=>v(t)&&BR.has(t.toLowerCase())&&jR(t),SU=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,xU=/gradient\(|url\(|image-set\(|var\(/i,kU=new Set(["transparent","currentColor","currentcolor"]),wo=t=>{if(!v(t))return!1;let e=t.trim();return xU.test(e)?!1:SU.test(e)?!0:$R.has(e)||kU.has(e)},Tg=new Set,IR=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(k(e)&&Object.keys(e).length||k(n)&&Object.keys(n).length)},MR=new Set,A0=0,$s=t=>{A0++;try{return t()}finally{A0--}},EU=(t,e)=>{if(!v(t)||t.indexOf(" ")===-1)return null;let n=t.replace(/\s+/g,""),r=te(n);if(!r||r.passthrough||r.cssVar)return null;let{color:o,gradient:s}=e;return!o[r.name]&&!s[r.name]?null:n},C0=(t,e,n)=>{let r=EU(t,n);if(r){if(!MR.has(t)){MR.add(t);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` has a space before its alpha/tone modifier${a} \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=te(t);if(o&&o.name&&!o.passthrough&&!o.cssVar&&(o.alpha!==void 0||o.tone!==void 0)&&IR(n)&&!n.color[o.name]&&!n.gradient[o.name]){if(!A0&&!Tg.has(t)){Tg.add(t);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(`[scratch] color token \`${t}\` does not resolve${a} \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=v(e)?e.toLowerCase():"",i=BR.has(s);if(!$R.has(s)&&!i||i&&jR(e)||!IR(n))return t;if(!Tg.has(s)){Tg.add(s);let a=n&&n.name?` (design system \`${n.name}\`)`:"";console.warn(i?`[scratch] color \`${t}\` is a CSS system colour that is not in the palette${a}. Dropped rather than emitted as a raw browser colour: a system colour paints the value the user's desktop chose (\`highlight\` is the selection blue), so it ignores the design system and is not even stable across two machines. Define it in designSystem/color.js or use a palette token.`:`[scratch] color \`${t}\` is a CSS named colour that is not in the palette${a}. 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.`)}},UR=(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})`},dt=(t,e,n)=>{let r=n||P();if(!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(I(t))[o,s,i]=t;else{let u=te(t);if(!u){let{color:d,gradient:p}=r,g=p[t]||d[t];return g?(e&&g[e]&&(g=g[e]),r.useVariable?`var(${g.var})`:g.value):C0(t,t,r)}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:a,gradient:c}=r,l=a[o]||c[o];if(!l)return C0(t,o,r);if(e)if(l[e]!==void 0)l=l[e];else if(I(l)){let u=e.charCodeAt(0)===64?e.slice(1):e;u==="dark"?l=l[1]!==void 0?l[1]:l[0]:(u!=="light"&&r.verbose&&console.warn(t," - array-form color tokens only support light/dark; falling back to the light slot for scheme",e),l=l[0])}else r.verbose&&console.warn(t," - does not have ",e);if(v(l)){if(on.has(o))return l;on.add(o);try{return dt(l,null,n)}finally{on.delete(o)}}let f=l.rgb;if(!f){let u=r.useVariable?`var(${l.var})`:l.value;return(s||i)&&u?UR(u,s,i):u}return i&&!l[i]&&(f=On(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, ${l.alpha!==void 0?l.alpha:1})`:r.useVariable?`var(${l.var})`:l.value!==void 0?l.value:`rgb(${f})`},NR=t=>{let e=tn(t);return!e||e.length<3||e[0]===0&&e[1]===0&&e[2]===0&&e[3]===0&&t.toLowerCase()!=="transparent"?null:{rgb:[e[0],e[1],e[2]],alpha:e[3]!==void 0?e[3]:1}},vU=(t,e)=>{if(!e)return t;let n=t.rgb;if(e.tone){let o=On(n,e.tone);n=v(o)?o.split(",").map(s=>parseFloat(s.trim())):o}let r=e.alpha!==void 0?parseFloat(e.alpha):t.alpha;return{rgb:n,alpha:r}},Fs=(t,e,n)=>{let r=e||P();if(!v(t))return null;let o=te(t);if(o){if(o.passthrough){let d=tn(o.passthrough);return d&&d.length>=3?{rgb:[d[0],d[1],d[2]],alpha:d[3]!==void 0?d[3]:1}:null}if(o.cssVar)return null}let s=o?o.name:t,{color:i,gradient:a}=r,c=i[s]||a[s];if(!c)return NR(t);if(v(c)){let d;if(on.has(s))d=NR(c);else{on.add(s);try{d=Fs(c,r,n)}finally{on.delete(s)}}return d?vU(d,o):null}if(c.rgb===void 0&&k(c)){let d=`@${n||"light"}`;c=c[d]!==void 0?c[d]:c["@light"]}if(!c||c.rgb===void 0)return null;let l=c.rgb;o&&o.tone&&(l=On(l,o.tone));let f=v(l)?l.split(",").map(d=>parseFloat(d.trim())):l,u=o&&o.alpha!==void 0?parseFloat(o.alpha):c.alpha!==void 0?c.alpha:1;return{rgb:f,alpha:u}},VR=t=>k(t)&&t.value!==void 0&&(t.rgb!==void 0||t.var!==void 0),So=t=>{let e=[];for(let n in t)n.charCodeAt(0)===64&&e.push(n.slice(1));return e},T0=t=>{if(!k(t)||t.value!==void 0)return null;for(let n in t)if(n!=="var"&&(n.charCodeAt(0)!==64||!VR(t[n])))return null;let e=So(t);return e.length?e:null},AU=t=>v(t&&t.var)&&T0(t)!==null,CU=(t,e,n,r,o)=>{let s=T0(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?UR(c,n,r):c}if(s.length!==2||!s.includes("light")||!s.includes("dark"))return;let i=dt(t,"@light",o),a=dt(t,"@dark",o);if(!(!wo(i)||!wo(a)))return i===a?i:`light-dark(${i}, ${a})`},fu=(t,e)=>{if(!t)return null;let n=e||P(),r=te(t),o=r?r.name:t,s=o&&n.color&&n.color[o];if(I(s))return["light","dark"];if(!k(s)||s.value!==void 0)return null;let i=So(s);return i.length?i:null},Or=(t,e,n)=>{let r={},o=Pg(e);for(let s of t){let i=n(s);if(i!==void 0&&(r[`[data-theme="${s}"] &`]=i,s==="light"||s==="dark")){let a=Rg(s,e);a&&(r[a]={[o]:i})}}return r},Bs=(t,e)=>t||(e.globalTheme==="auto"?null:e.globalTheme),js=(t,e,n,{commas:r,resolve:o,resolveScheme:s})=>{let i=Ta(t,r),a=null;for(let f of i)for(let u of f){let d=fu(u,n);if(d)for(let p of d)(a||(a=[])).includes(p)||a.push(p)}if(!a)return;let c=f=>Oa(i.map(u=>u.map(d=>{if(!fu(d,n))return d;let p=f(d);return v(p)?p:d}))),l=Bs(e,n);return l?o(c(f=>Kt(f,l,n)),l):Or(a,n,f=>s(f,c))},Kt=(t,e,n)=>{let r=n||P();if(e=Bs(e,r),!v(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;let o,s,i;if(I(t))o=t[0];else{let u=te(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}else o=t}let{color:a,gradient:c}=r,l=a[o]||c[o],f=k(l);if(f&&l.value)return dt(t,`@${e}`,n);if(f){if(r.useVariable&&l.var)return s||i?dt(t,null,n):`var(${l.var})`;if(e){if(!r.useVariable&&a[o]===l){let u=CU(t,l,s,i,n);if(u!==void 0)return u}return dt(t,`@${e}`,n)}else return Or(So(l),r,u=>dt(t,"@"+u,n))}else return C0(t,o,r)},xo=(t,e,n,r)=>{let s=`--${r.varPrefix?r.varPrefix+"-":""}${e}-${n}`,i,a={};for(let c in t){if(c.charCodeAt(0)!==64)continue;let l=c.slice(1),f=t[c],u=f&&(f.value||f);!u||typeof u!="string"||(a[l]=u,(l==="light"||i===void 0)&&(i=u))}if(i!==void 0){r.cssVars[s]=i,r.cssMediaVars||(r.cssMediaVars={});for(let c in a){let l=`[data-theme="${c}"]`;if(r.cssMediaVars[l]||(r.cssMediaVars[l]={}),r.cssMediaVars[l][s]=a[c],c==="light"||c==="dark"){let f=`@media (prefers-color-scheme: ${c})`;r.cssMediaVars[f]||(r.cssMediaVars[f]={}),r.cssMediaVars[f][s]=a[c]}}return t.var=s,s}},Tr=(t,e,n)=>{let r=P();if(VR(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&AU(t))return t;if(v(t)&&Ft(t)){let h=t.slice(2),m=h.trim().indexOf(" ")!==-1;if(t=m?h:dt(h),m||!(t.includes("rgb")||t.includes("var")||t.includes("#"))){let y=h.trim().split(/\s+/),x=r.color[y[0]];if(x&&!x.value&&!x.rgb&&(v(x)||I(x)||k(x))&&!on.has(y[0])){on.add(y[0]);try{r.color[y[0]]=Tr(x,y[0])}finally{on.delete(y[0])}x=r.color[y[0]]}if(x&&x.value){let E=x.rgb,C=y[1]!==void 0?y[1]:"1",_=y[2];_&&(E=On(E,_)),t=`rgba(${E}, ${C})`}else{let E=y[2],C=y[1]!==void 0?y[1]:"1";if(E)try{let _=tn(y[0]);_&&_.length>=3?t=`rgba(${On(_.slice(0,3).join(", "),E)}, ${C})`:t=y[0]}catch{t=y[0]}else t=y[0]}}}if(I(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let h={};for(let m in t)m!=="var"&&(h[m]=Tr(t[m],e,m.slice(0,1)==="@"?m.slice(1):m));return r.useVariable&&xo(h,"color",e,r),h}let s=`--${r.varPrefix?r.varPrefix+"-":""}color-${e}`+(n?`-${n}`:""),i=t.value||t;if(v(i)&&!i.includes("(")&&!i.startsWith("#")){let h=te(i);if(h&&h.name&&!h.passthrough&&!h.cssVar){let m=r.color[h.name];if(m&&!m.value&&!m.rgb&&(v(m)||I(m)||k(m))&&!on.has(h.name)){on.add(h.name);try{r.color[h.name]=Tr(m,h.name)}finally{on.delete(h.name)}}let y=r.color[h.name],x=T0(y);if(x){if(h.alpha===void 0&&h.tone===void 0)return y;let E={};for(let C of x){let _=y["@"+C],b=_.rgb;h.tone&&(b=On(b,h.tone));let w=h.alpha!==void 0?parseFloat(h.alpha):_.alpha!==void 0?_.alpha:1;E["@"+C]=`rgba(${b}, ${w})`}return Tr(E,e,n)}if(y&&y.rgb){let E=y.rgb;h.tone&&(E=On(E,h.tone));let C=h.alpha!==void 0?parseFloat(h.alpha):y.alpha!==void 0?y.alpha:1;i=`rgba(${E}, ${C})`}}}let a=tn(i),[c,l,f,u=1]=a,d=parseFloat(u.toFixed(2)),p=`${c}, ${l}, ${f}`,g=`rgba(${p}, ${d})`;return r.useVariable&&(r.cssVars[s]=g),{var:s,rgb:p,alpha:d,value:g}},TU=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),ko=(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=")",i=Tn(o),a=!1,c=i.map(l=>(l=l.trim(),l.split(/\s+/).map(u=>{if(!u||/^\d/.test(u)||u==="0"||TU.has(u)||u==="transparent"||Sr.test(u))return u;let d=dt(u);return en(d)?(a=!0,d):u}).join(" ")));return a?r+c.join(", ")+s:t},Na=(t,e,n)=>{let r=P();if(k(t)&&t.value!==void 0&&t.var!==void 0)return r.useVariable&&(r.cssVars[t.var]=t.value),t;if(v(t)&&Ft(t)&&(t=dt(t.slice(2))),I(t)&&(t={"@light":t[0],"@dark":t[1]!==void 0?t[1]:t[0]}),k(t)){let a={};for(let c in t)c!=="var"&&(a[c]=Na(t[c],e,c.slice(0,1)==="@"?c.slice(1):c));return r.useVariable&&xo(a,"gradient",e,r),a}let s=`--${r.varPrefix?r.varPrefix+"-":""}gradient-${e}`+(n?`-${n}`:""),i=ko(t.value||t);return r.useVariable&&(r.cssVars[s]=i),{var:s,value:i}};M();var zR=new Set,qt=(t,e)=>{if(zR.has(t)||(zR.add(t),typeof console>"u"||!console.error))return;let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` (at <${n.join(".")}>)`:"";console.error(`[smbls] "${t}"${r} is not in this build: symbols.json build.treeShakeFeatures left it out because neither the project source nor its build settings use it. Add "${t}" to build.treeShakeFeatures.keep.`)};var Lg=(t,e,n={},r)=>{if(globalThis.__SMBLS_BUILD_DROP_F_safeInk__)return qt("safeInk");let o=r||P(),{min:s=4.5,large:i=!1,scheme:a,meta:c=!1,maxIterations:l=15}=n,f=i?3:s,u=a||(o.globalTheme&&o.globalTheme!=="auto"?o.globalTheme:"light"),d=v(e)?e:String(e),p=te(t),g=p&&!p.passthrough&&!p.cssVar?p.name:null,h=(rt,gt)=>c?{value:rt,...gt}:rt;if(g){let rt=o.color[`${g}Safe`];if(rt){let gt=`${d}@${u}`,q=rt[gt]!==void 0?rt[gt]:rt[d];if(q!==void 0){let W=q&&q.rgb!==void 0?o.useVariable&&q.var?`var(${q.var})`:q.value:dt(q,null,o);return h(W,{ratio:null,deviation:0,derived:!1,overridden:!0})}}}let m=dt(t,u?`@${u}`:null,o),y=Fs(t,o,u),x=Fs(e,o,u);if(!y||!x)return o.verbose&&console.warn("getSafeInk: could not resolve",t,e,"\u2014 returning hue unchanged"),h(m,{ratio:null,deviation:0,derived:!1,overridden:!1,unresolved:!0});let E=Rs(x.rgb,x.alpha),C=Rs(y.rgb,y.alpha,E),_=Ra(C,E);if(_>=f-.02)return h(m,{ratio:_,deviation:0,derived:!1,overridden:!1});let[b,w,S]=Wf(y.rgb),[,A,T]=Kf([b,w,S]),O=Cs(E)>.5,B=O?b:1-b,$=rt=>{let gt=O?b-rt:b+rt,q=Math.max(0,Math.min(1,gt));return{rgb:qf(q,A,T),L:q}},N=rt=>{let{rgb:gt}=$(rt),q=Rs(gt.map(W=>Math.round(W)),y.alpha,E);return Ra(q,E)},G=0,Y=B,nt=N(Y)>=f;if(nt)for(let rt=0;rt<l;rt++){let gt=(G+Y)/2;N(gt)>=f?Y=gt:G=gt}else G=Y;let{rgb:ot,L:st}=$(Y),Z=ot.map(rt=>Math.round(rt)),J=N(Y),Q=y.alpha<1?`rgba(${Z.join(", ")}, ${y.alpha})`:`rgb(${Z.join(", ")})`,it=Math.abs(st-b)*100;return h(Q,{rgb:Z,ratio:J,startRatio:_,deviation:it,derived:!0,overridden:!1,reachable:nt})},O0=(t,e,n={},r)=>Lg(t,e,{...n,meta:!0},r);M();M();var OU=t=>{let n=P().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return we(o),o},RU=t=>{for(let e in t){let n=t[e];if(!(e.slice(0,1)==="@"))continue;let{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f}=t;Lt(n,{type:o,base:s,ratio:i,range:a,subSequence:c,h1Matches:l,unit:f,sequence:{},scales:{},templates:{},vars:{}}),we(n),bo(t,e)}},uu=t=>{let e=t.toLowerCase(),n=e.includes("width")||e.includes("height"),r=e.includes("border")||e.includes("outline");return n&&!r},du=()=>{let t=P(),{spacing:e}=t;we(e),Cr(e),RU(e)},PU=t=>{let e=P(),{spacing:n}=e;return!t||!t.sequence?n:Object.keys(t.sequence).length>0?t:we(t)},Vt=(t,e="padding",n,r)=>{let o=PU(n);if(v(t)){if(!r&&/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!r&&t.includes("(")){let i=Ar(t);r=i[0],t=i[1]}}let s=r?[t]:v(t)&&t.includes("(")?ut(t):As(t);if(I(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=(l,f)=>Yn(s[f],e+l+i,o,r);return a[s.length].map((l,f)=>c(l,f))}return Yn(t,e,o,r)}},Fe=(t,e,n,r)=>{let o=P(),{spacing:s}=o,i=n||t[e];if(!r&&v(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!r&&v(i)&&i.includes("(")){let a=Ar(i);r=a[0],i=a[1]}if(t.spacingRatio){let a=OU(t);return Vt(i,e,a,r)}return Vt(i,e,s,r)},pu=t=>{let e=n=>{let r=["+","-","*","/"].includes(n),o=Wi.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(" ")};M();var LU={commas:!0},Us=(t,e,n)=>v(t)?xr(t,DU,LU,e,n):t,DU=(t,e,n)=>{let r=$s(()=>dt(t,e));return en(r)?r:$a(t,n)},$a=(t,e)=>{if(/^\d/.test(t)||t.includes("px")||t.slice(-2)==="em"||t==="inset"||t==="none"||Ns(t)||Ts.has(t.toLowerCase()))return t;e&&e(t);let n=vr(()=>Vt(t,"shadow"));return n&&n.shadow?n.shadow:t},Eo=(t,e,n,r)=>{let o=P();if(k(t)&&t.value!==void 0&&t.var!==void 0)return o.useVariable&&(o.cssVars[t.var]=t.value),t;if(I(t)){let a={"@light":Eo(t[0],e,"light"),"@dark":Eo(t[1],e,"dark")};return o.useVariable&&xo(a,"shadow",e,o),a}if(k(t)){let a={};for(let c in t)a[c]=Eo(t[c],e,c.startsWith("@")?c.slice(1):c);return o.useVariable&&xo(a,"shadow",e,o),a}v(t)&&(t=Us(t));let i=`--${o.varPrefix?o.varPrefix+"-":""}shadow-${e}`+(n?`-${n}`:"");return o.useVariable&&(o.cssVars[i]=t),{var:i,value:t}},hu=(t,e)=>{let n=P();if(e=Bs(e,n),!v(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Ft(t))return`var(${t})`;let[r]=I(t)?t:t.split(" "),s=n.shadow[r],i=k(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)}return i&&s.value?s.value:i?Or(So(s),n,a=>{let c=s["@"+a];return c&&(c.value!==void 0?c.value:c)}):(n.verbose&&console.warn("Can't find color",t),t)};M();var IU=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),MU={commas:!1,keywords:IU},ce=(t,e,n)=>{if(t==null)return;let r=t+"",o=r.trim();return o==="none"||o==="0"||o==="initial"||o==="inherit"||o==="unset"?r:xr(r,NU,MU,e,n)},NU=(t,e,n)=>{if(/^\d/.test(t))return t;let r=$s(()=>dt(t,e));if(en(r))return r;if(Ns(t)||Ts.has(t.toLowerCase()))return t;n&&n(t);let o=vr(()=>Vt(t,"border"));return o&&o.border?o.border:t},gu=(t,e,n)=>{let r=n||P();if(r.useVariable||!v(t))return ce(t);let o=js(t,e,r,{commas:!1,resolve:s=>ce(s),resolveScheme:s=>ce(t,"@"+s)});return o!==void 0?o:ce(t)};M();var $U=new Set(["black","white","red","green","blue","yellow","orange","purple","pink","brown","gray","grey","cyan","magenta","lime","olive","navy","teal","aqua","maroon","silver","fuchsia","transparent","currentColor","currentcolor","inherit","initial","unset","none","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","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","gainsboro","ghostwhite","gold","goldenrod","greenyellow","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","limegreen","linen","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","rebeccapurple"]),HR=["color","Color","background","Background","fill","Fill","stroke","Stroke"],GR=t=>{for(let e=0;e<HR.length;e++)if(t.includes(HR[e]))return!0;return!1},FU={boxShadow:Us,textShadow:Us,border:ce,borderTop:ce,borderRight:ce,borderBottom:ce,borderLeft:ce,outline:ce,columnRule:ce},BU=t=>{if(!t)return!1;let e=te(t);return!e||!e.name||e.passthrough||e.cssVar?!1:e.alpha!==void 0||e.tone!==void 0},WR=new Set,jU=(t,e,n,r,o,s)=>{if(!tt())return;let i=`${t}::${e}::${n||""}::${r}`;WR.has(i)||(WR.add(i),console.warn(`[smbls/scratch] theme param "${e}" on "${t}"`+(n?` (${n})`:"")+` did not fully resolve: "${r}" -> "${o}" still contains the unresolved token "${s}". This is not valid CSS \u2014 the browser will drop the whole declaration. Register "${s}" as a design-system color token or fix the typo.`))},L0=(t,e,n,r)=>{let o=FU[e];if(!o)return dt(n,r);let s=null,i=o(n,r,a=>{!s&&BU(a)&&(s=a)});return s&&jU(t,e,r,n,i,s),i},D0=(t,e)=>sn(t,e),UU=t=>k(t)&&V(t.value),VU=t=>{for(let e in t){let n=t[e];if(v(n)&&n.startsWith("var(--"))return!0}return!1},mu=(t,e)=>{let n=P();return UU(t)?!n.useVariable&&VU(t)?t:Fa(t.value,e):Fa(t,e)},YR=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&GR(r))for(let s in t){if(n.has(s))continue;let i=t[s]?.[r];if(i===void 0)continue;let a=dt(i,`@${s}`);a!==void 0&&v(a)&&/^[a-z][a-zA-Z]+$/.test(a)&&!$U.has(a)&&n.add(s)}}return n},XR=t=>t.startsWith("[data-theme=")||t.startsWith("@media"),yu=(t,e)=>{for(let n in e){let r=e[n];k(r)?yu(t[n]||(t[n]={}),r):t[n]=r}return t},KR=(t,e,n,r,o)=>yu(t,Or(r,o,s=>({[e]:n[s]}))),JR=(t,e,n,r)=>{let o={},s=Object.keys(e).filter(c=>e[c]!==n);if(!s.length)return n===void 0?void 0:(o[t]=n,o);let i=e.light!==void 0?e.light:n,a=e.dark!==void 0?e.dark:n;if(GR(t)&&wo(i)&&wo(a)){o[t]=i===a?i:`light-dark(${i}, ${a})`;let c=Object.keys(e).filter(l=>l!=="light"&&l!=="dark");KR(o,t,e,c,r)}else n!==void 0&&(o[t]=n),KR(o,t,e,s,r);return o},zU=new Set(["backdropFilter","WebkitBackdropFilter"]),ZR=new WeakSet,QR=(t,e,n,r)=>{let o=n.globalTheme!==void 0?n.globalTheme:"auto",s=o&&o!=="auto"?String(o).replace(/^'|'$/g,""):null,i=new Set(r?Object.keys(r):[]);for(let l in t)if(t[l])for(let f of Object.keys(t[l]))i.add(f);let a=YR(t,i),c={};for(let l of i){let f=l.slice(0,1);if(f==="@")continue;if(f==="."||f===":"){let m={};for(let E in t)V(t[E]?.[l])&&(m[E]=t[E][l]);let y=r&&V(r[l])?r[l]:void 0;if(!Object.keys(m).length&&!y)continue;let x=f==="."?l.slice(1):l.replace(/^:+/,"");c[l]=QR(m,`${e}-${x}`,n,y);continue}let u=r&&!V(r[l])?r[l]:void 0,d=new Set(Object.keys(t));u!==void 0&&(d.add("light"),d.add("dark"),s&&d.add(s));let p={},g;for(let m of d){if(a.has(m))continue;let y=t[m]?.[l];if((y===void 0||V(y))&&(y=u),y===void 0)continue;let x=L0(e,l,y,`@${m}`);x!==void 0&&(p[m]=x,(s&&m===s||!s&&(m==="light"||g===void 0))&&(g=x))}let h=JR(l,p,g,n);h&&(yu(c,h),c[`.${l}`]=h)}return(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color}),c},R0=(t,e,n,r)=>{let{cssVars:o}=n;n.cssMediaVars||(n.cssMediaVars={});let s=n.cssMediaVars,i=n.globalTheme!==void 0?n.globalTheme:"auto",a=i&&i!=="auto"?String(i).replace(/^'|'$/g,""):null,c={},l=new Set(r?Object.keys(r):[]);for(let u in t)if(t[u])for(let d of Object.keys(t[u]))l.add(d);let f=YR(t,l);for(let u of l){let d=u.slice(0,1),p=V(r?.[u])||Object.values(t).some(g=>V(g?.[u]));if(d==="."&&p){let g=u.slice(1),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=R0(h,`${e}-${g}`,n,m)}else if(d===":"&&p){let g=u.replace(/^:+/,""),h={};for(let y in t)V(t[y]?.[u])&&(h[y]=t[y][u]);let m=V(r?.[u])?r[u]:void 0;c[u]=R0(h,`${e}-${g}`,n,m)}else if(d!=="@"&&d!=="."&&d!==":"){let h=`--${n.varPrefix?n.varPrefix+"-":""}theme-${e}-${u}`,m=r&&!V(r[u])?r[u]:void 0,y=new Set(Object.keys(t));m!==void 0&&(y.add("light"),y.add("dark"),a&&y.add(a));let x,E=!1,C={};for(let _ of y){if(f.has(_))continue;let b=t[_]?.[u];if((b===void 0||V(b))&&(b=m),b===void 0)continue;let w=L0(e,u,b,`@${_}`);if(w===void 0)continue;E=!0,C[_]=w,(a&&_===a||!a&&(_==="light"||x===void 0))&&(x=w);let S=`[data-theme="${_}"]`;if(s[S]||(s[S]={}),s[S][h]=w,_==="dark"||_==="light"){let A=`@media (prefers-color-scheme: ${_})`;s[A]||(s[A]={}),s[A][h]=w}}if(x!==void 0&&(o[h]=x),!E)continue;if(zU.has(u)){let _=JR(u,C,x,n);_&&(yu(c,_),c[`.${u}`]=_);continue}c[u]=`var(${h})`,c[`.${u}`]={[u]:c[u]}}}(c.background||c.color||c.backgroundColor)&&(c[".inversed"]={color:c.background||c.backgroundColor,background:c.color});for(let u in c)XR(u)&&V(c[u])&&ZR.add(c[u]);return c},Fa=(t,e,n,r)=>{let o=P(),{cssVars:s}=o,i={value:t},a=!n&&!r,c,l;if(V(t)){if(a&&o.useVariable){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];(Object.keys(f).length||Object.keys(u).length)&&(l=R0(f,e,o,u),Object.assign(i,l))}else if(a){let f={},u={};for(let d in t)d.startsWith("@")?V(t[d])&&(f[d.slice(1)]=t[d]):u[d]=t[d];c=QR(f,e,o,u),Object.assign(i,c)}for(let f in t){let u=f.slice(0,1),d=t[f];if(u==="@"||u===":"||u==="."){let p=u==="@"&&f;i[f]=Fa(d,e,f,r||p)}else if(!a){let p=L0(e,f,d,r),g=[...new Set([r,n].filter(x=>x).map(x=>x.slice(1)))],h=g.length?"-"+g.join("-"):"",y=`--${o.varPrefix?o.varPrefix+"-":""}theme-${e}${h}-${f}`;o.useVariable?(o.useThemeSuffixedVars&&(s[y]=p),i[f]=`var(${y})`):i[f]=p,i[`.${f}`]={[f]:i[f]}}}if(c)for(let f in c){let u=f.slice(0,1);(u==="."||u===":")&&V(t[f])&&(i[f]=c[f])}if(l)for(let f in l){let u=f.slice(0,1);(u==="."||u===":")&&V(t[f])&&(i[f]=l[f])}!i[".inversed"]&&(i.background||i.color||i.backgroundColor)&&(i[".inversed"]={color:i.background||i.backgroundColor,background:i.color})}if(v(t)&&Ft(t)){let u=o.theme[t.slice(2)];return sn(u,r)}return i},P0=(t,e)=>{let n={};for(let r in t){let o=r.slice(0,1);if(V(t[r]))if(XR(r)&&(e||ZR.has(t[r])))n[r]=yu({},t[r]);else{if(o==="@")continue;o===":"?n[`&${r}`]=P0(t[r],e):o==="."&&(n[`&${r}`]=P0(t[r],e))}else n[r]=t[r]}return n},tP=(t,e)=>{let n=e.shift();return t[n]?tP(t[n],e):t},qR=(t,e)=>I(e)?tP(t,e):v(e)&&t[e]?t[e]:t;var sn=(t,e)=>{let n=P();if(v(t)&&Ft(t)&&(t=sn(t.slice(2))),!t||!v(t)){n.verbose&&console.warn(`${t} - Theme is not a string`);return}let[r,...o]=I(t)?t:t.split(" "),s=n.theme[r];return s&&o.length?s=qR(s,o):s&&e&&(s=qR(s,e)),P0(s,!n.useVariable)};M();M();var bu=(t,e)=>{let n=P(),r=`--font-${e}`;if(!t||I(t)&&!t[0])return;let o;if(t.isVariable){let s=nn(t.url,n.files)||t.url;Pa(s)?o=La(s):o=go(e,s,t.fontWeight,{fontStretch:t.fontStretch,fontDisplay:t.fontDisplay||"swap",unicodeRange:t.unicodeRange})}else if(t[0])o=Ps(e,t,n.files);else{let s=Array.isArray(t.url)?t.url.map(i=>nn(i,n.files)||i):nn(t.url,n.files)||t.url;o=go(e,s,t.fontWeight,{fontStyle:t.fontStyle,fontDisplay:t.fontDisplay,fontStretch:t.fontStretch,unicodeRange:t.unicodeRange})}return{var:r,value:t,fontFace:o}},rP=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong","inherit","initial","unset","revert","revert-layer"]),HU=t=>rP.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),eP=new Set,_u=(t,e)=>{let n=P(),{fontFamily:r}=n,o=e||r,s=kr(o,t);if(s!==void 0||t==null||t===""||t==="default")return s;if(!v(t))return kr(o);if(!HU(t))return pr()&&!eP.has(t)&&(eP.add(t),console.warn(`[scratch] fontFamily \`${t}\` is not a font family key of this design system \u2014 rendering the default family. Name a key from designSystem fontFamily, a CSS generic family (\`monospace\`, \`serif\`, \u2026) or a quoted font name (\`"'${t}'"\`).`)),kr(o)},nP=t=>{let e=t.trim(),n=e.replace(/^(['"])(.*)\1$/,"$2").trim(),r=n.replace(/\s+/g," ").toLowerCase();return n!==e&&rP.has(r)?'"'+r+'"':r},Ba=(t,e)=>{let n=P(),{fontFamily:r,fontFamilyTypes:o}=n;if(k(t)&&v(t.value)&&v(t.var))return n.useVariable&&(n.cssVars[t.var]=t.value),t;let{value:s,type:i}=t;t.isDefault&&(!t.isSystemFallback||!r.__defaultKey)&&(r.__defaultKey=e),k(s)&&(s=As(s));let c=`--${n.varPrefix?n.varPrefix+"-":""}font-family-${e}`,l=p=>p&&!p.startsWith("--"),f=[...s].map(p=>String(p).trim()).filter(l),u=new Set;for(let p of f)for(let g of p.split(","))u.add(nP(g));for(let p of String(o[i]??"").split(",")){let g=p.trim();if(!l(g))continue;let h=nP(g);u.has(h)||(u.add(h),f.push(g))}let d=f.join(", ");return n.useVariable&&(n.cssVars[c]=d),{var:c,value:d,arr:s,type:i,isSystemFallback:!!t.isSystemFallback,isSharedLibrary:!!t.isSharedLibrary}};M();var Dg=t=>{let e=P(),{typography:n,media:r}=e;for(let o in t){let s=o.slice(0,1)==="@",i=t[o];if(!s)continue;let{mediaRegenerate:a}=t,c=o.slice(1),{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h}=t;Lt(i,{type:l,base:f,ratio:u,range:d,subSequence:p,h1Matches:g,unit:h});let m=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),y=i.unit||h,x=!i.unit&&m.has(h)?"rem":y,E=r[c],C="@media "+(E==="print"?`${E}`:`screen and ${E}`);if(n.templates[C]={fontSize:i.base/n.browserDefault+x},!a){Lt(i,{sequence:{},scales:{},vars:{}}),we(i),bo(t,o);continue}Lt(i,{sequence:{},scales:{},templates:{},vars:{}}),we(i),bo(t,o)}},Ig=t=>{let e=P();if(t.h1Matches){let n=t.unit,r=iu(t),{templates:o}=t;for(let s in r){let i=`h${parseInt(s)+1}`,a=o[i];o[i]={fontSize:e.useVariable?`var(${r[s]?.variable})`:`${r[s]?.scaling}${n}`,margin:a?a.margin:0,lineHeight:a?a.lineHeight:t.lineHeight,letterSpacing:a?a.letterSpacing:t.letterSpacing,fontWeight:a?a.fontWeight:900-s*100}}}},wu=()=>{let t=P(),{typography:e}=t;we(e),Ig(e),Cr(e),Dg(e)},Su=t=>{let e=P(),{typography:n}=e;return Yn(t,"fontSize",n)};M();var xu=t=>{if(!v(t))return;let n=P().shape;if(n)return n[t]!==void 0?n[t]:n[t.toLowerCase()]};M();var ku=()=>{let t=P(),{timing:e}=t;we(e),Cr(e)},Be=t=>{let e=P(),{timing:n}=e;return n[t]||n[wr(t)]||t},Se=(t,e="timing")=>{let n=P(),{timing:r}=n;return Yn(t,e,r)};M();var Eu=()=>{let t=P(),{fontFamily:e,theme:n,typography:r}=t,o=t.document;return ur(o)?(Zr(t,"document",o),o=t.document={}):o||(o=t.document={}),Lt(o,{theme:n.document,fontFamily:kr(e),fontSize:r.base,lineHeight:r.lineHeight})};M();var N0={document:kt},oP=new WeakMap,sP=new WeakMap,WU=128,iP=1048576,I0=8192,$0=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),lP=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),KU=(t,e)=>{let n=1,r=t.ownerDocument;if(r&&typeof r.createTreeWalker=="function"){let s=r.createTreeWalker(t,4294967295);for(;s.nextNode();)if(++n>e)return n;return n}let o=[t];for(;o.length;){let s=o.pop().childNodes||[];for(let i=0;i<s.length;i++){if(++n>e)return n;o.push(s[i])}}return n},M0=(t,e)=>{if(typeof t.importNode=="function")return t.importNode(e,!0);let n=e.cloneNode(!0);return typeof t.adoptNode=="function"?t.adoptNode(n):n},qU=(t,e)=>{if(typeof t.prepend=="function")return t.prepend(e);let n=t.firstChild!==void 0?t.firstChild:t.childNodes&&t.childNodes[0];return typeof t.insertBefore=="function"?t.insertBefore(e,n||null):t.appendChild(e)},ja=(t,e)=>{let n=P();if(!t){n.verbose&&console.warn("setSVG: val is not defined",e);return}return n.useSvgSprite?lu(e,t):t},vu=(t,e=N0)=>{let n=P(),r=Object.keys(t).length?{}:n.svg;for(let o in t)r[o]=t[o];uP(r,e)},Vs=(t,e)=>{let n=P();return n.useIconSprite&&!n.semanticIcons?.[e]?ja(t,e):t},zs=(t,e=N0)=>{let n=P(),r=Object.keys(t).length?{}:n.icons;for(let o in t)r[o]=t[o];uP(r,e)},fP=(t,e={isRoot:!0})=>{if(!t||!t.createElementNS)return;let n=t.createElementNS("http://www.w3.org/2000/svg","svg");return e.isRoot&&(n.setAttribute("aria-hidden","true"),n.setAttribute("width","0"),n.setAttribute("height","0"),n.setAttribute("style","position:absolute"),n.setAttribute("id","svgSprite")),n},GU=t=>{let e=t&&t.defaultView;return e&&typeof e.DOMParser=="function"?e.DOMParser:typeof DOMParser<"u"?DOMParser:null},YU=(t,e)=>{let n=GU(t);if(n){let r=`<svg xmlns="http://www.w3.org/2000/svg">${e}</svg>`,s=new n().parseFromString(r,"image/svg+xml");return s.querySelector("parsererror")?null:s.documentElement}return null},XU=(t,e,n)=>{let r=String(n),o=sP.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=YU(t,r);if(i||(i=fP(t,{isRoot:!1}),i.innerHTML=r),r.length>iP)return i;let a=KU(i,I0);if(a>I0)return i;for(o||(o={entries:new Map,units:0,nodes:0},sP.set(e,o));o.entries.size>=WU||o.units+r.length>iP||o.nodes+a>I0;){let c=o.entries.keys().next().value,l=o.entries.get(c);o.units-=c.length,o.nodes-=l.nodes,o.entries.delete(c)}return o.entries.set(r,{root:i,nodes:a}),o.units+=r.length,o.nodes+=a,i},aP=t=>{let e=new Map;for(let n of t.children){let r=$0(n);if(!r)continue;let o=e.get(r)||[];o.push(n),e.set(r,o)}return e},JU=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),cP=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?aP(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${JU(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=aP(n)}return s.get(a)};for(let a of e.childNodes){if(lP(a))continue;let c=$0(a);if(!c&&r){let u=o++,d=r.nodes[u];if(!d&&r.complete||d?.parentNode===n)continue;let p=M0(t,d||a);n.appendChild(p),r.nodes[u]=p;continue}let l=c&&i(c),f=l&&l[0];if(!f)f=M0(t,a),n.appendChild(f);else if(!f.isEqualNode(a)){let u=M0(t,a);n.replaceChild(u,f),f=u}if(l)for(let u=1;u<l.length;u++)l[u].remove();c&&s&&s.set(c,[f])}},uP=(t,e=N0)=>{let n=P(),r=e.document||kt;if(!r||!r.documentElement)return n.verbose&&console.warn("To append SVG sprites it should be run in browser environment"),cu(t);let o=r.querySelector("#svgSprite"),s="";for(let d in t)s+=t[d];let i=o||fP(r);if(!i||!i.nodeType)return;let a=d=>XU(r,i,d),c=a(s),l=oP.get(i);l||oP.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!lP(d)&&!$0(d))){let d=[];for(let p in t)d.push(p);for(let p of d){let g=f.get(p);g||f.set(p,g={nodes:[],complete:!1}),cP(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{cP(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||qU(r.body,i);for(let d in t)n.__svgCache[d]=!0};M();var Au=(t={})=>{let e=P(),n=e.typography||{},r=e.document||{},o=k(e.reset)?e.reset:e.reset={};if(o[":root"]){let c=o,l=n.templates||{};c.body={...e.useDocumentTheme?sn("document"):{},...l.body},c.h1=l.h1,c.h2=l.h2,c.h3=l.h3,c.h4=l.h4,c.h5=l.h5,c.h6=l.h6}let{body:s,...i}=n.templates||{},a=e.useDocumentTheme?sn("document"):{};if(o.html&&ie(o.html,a),n.unit)for(let c in i){if(c.slice(0,6)!=="@media")continue;let l=i[c];delete i[c],!(!l||!l.fontSize)&&(o[c]||(o[c]={}),o[c].html||(o[c].html={}),o[c].html.fontSize===void 0&&(o[c].html.fontSize=l.fontSize))}if(n.unit){let c=e.media||{};for(let l in n){if(l.charAt(0)!=="@")continue;let f=n[l];if(!f||f.unit===n.unit||!f.unit)continue;let u=f.unit,d=f.base||n.base,p=f.browserDefault||n.browserDefault,g=l.slice(1),h=c[g];if(!h)continue;let m="@media "+(h==="print"?h:"screen and "+h);o[m]||(o[m]={}),o[m].html||(o[m].html={}),o[m].html.fontSize=d/p+u}}return bt(Lt(o,t),{html:{position:"absolute",width:"100%",height:"100%",top:"0",left:"0",margin:"0",WebkitFontSmoothing:"subpixel-antialiased",textSizeAdjust:"100%",WebkitTextSizeAdjust:"100%",...a,fontSize:n.unit?n.base/n.browserDefault+n.unit:n.browserDefault+"px",fontFamily:r.fontFamily,lineHeight:r.lineHeight},body:{boxSizing:"border-box",height:"100%",margin:0,fontFamily:r.fontFamily,fontSize:n.unit?"1"+e.unit.default:n.base/n.browserDefault+e.unit.default,...i,...s},a:{color:"currentColor"},button:{color:"inherit",font:"inherit",background:"transparent",border:"none",cursor:"pointer",appearance:"none",WebkitAppearance:"none"},"input, select, textarea":{color:"inherit",font:"inherit"},fieldset:{border:0,padding:0,margin:0}},ae)};M();var ZU=new Set(["fallback"]),F0=new Set,dP=(t,e)=>{F0.has(t)||(F0.add(t),tt()&&console.warn(e))},B0=()=>{F0.clear()},pP=t=>{for(let e in t)delete t[e];return t},Cu=()=>{let t=P(),e=k(t.cssSkinVars)?pP(t.cssSkinVars):t.cssSkinVars={},n=k(t.cssSkinFallback)?pP(t.cssSkinFallback):t.cssSkinFallback={},r=t.skins;if(!k(r))return e;let o=t.varPrefix?t.varPrefix+"-":"",s=t.color||{},i=t.cssVars||{},a=c=>v(c)&&Object.prototype.hasOwnProperty.call(s,c)?`var(--${o}color-${c})`:c;for(let c in r){let l=r[c];if(!k(l))continue;let f={};for(let u in l){if(ZU.has(u))continue;let d=l[u];if(k(d))for(let p in d){let g=`--${o}theme-${u}-${p}`;t.useVariable!==!1&&!(g in i)&&dP(`${c}/${u}/${p}`,`[scratch] skin "${c}" rewrites theme "${u}" param "${p}", which the theme does not declare \u2014 no element reads ${g}, so the skin changes nothing there. Declare "${p}" on the "${u}" theme (its no-skin value).`),f[g]=a(d[p])}}e[c]=f,v(l.fallback)&&(n[c]=l.fallback)}for(let c in n){let l=n[c];e[l]||(dP(`${c}/fallback/${l}`,`[scratch] skin "${c}" falls back to "${l}", which is not a declared skin \u2014 the reduced-transparency fallback is skipped.`),delete n[c])}return e},hP=(t,e)=>{let n=`[data-skin="${t}"]`;return!e||e===":root"?`:root${n}, ${n}`:`${e}${n}, ${n} ${e}, ${e} ${n}`},Hs=(t,e,n)=>{let r={};if(!k(t))return r;for(let s in t)r[hP(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[hP(s,n)]=i)}return Object.keys(o).length&&(r["@media (prefers-reduced-transparency: reduce)"]=o),r};M();var Mg=(t,e)=>gu(t,e),Ng=t=>{if(v(t))return Sr.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(Ft(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let n=dt(e);return en(n)?n:e}).join(" ")},$g=(t,e)=>hu(t,e),Tu=(t,e)=>{if(!v(t))return;let n=P();if(!n.useVariable){let r=QU(t,e,n);if(r!==void 0)return r}return j0(t,e)},QU=(t,e,n)=>js(t,e==="auto"?null:e,n,{commas:!0,resolve:j0,resolveScheme:(r,o)=>j0(o(s=>dt(s,"@"+r,n)),null)}),j0=(t,e)=>xr(t,eV,tV,e),tV={commas:!0,keywords:new Set(["inset","none"])},eV=(t,e)=>{if(!en(dt(t)))return $a(t);let n=Kt(t,e);return k(n)?Object.values(n).filter(r=>r.includes(": "+e))[0]:n},Fg=(t,e)=>{if(!v(t))return;let n=P();return Tn(t).map(r=>{let o=r.trim();if(Ft(o))return`var(${o})`;if(/^var\(/.test(o)||o.includes("url"))return o;if(n.gradient?.[o]){let s=Kt(o,e);if(v(s))return s;if(k(s)){for(let i in s)if(v(s[i]))return s[i]}return o}return o.includes("gradient")?ko(o,e):o.includes("/")||o.startsWith("http")||o.includes(".")&&!te(o)?`url(${o})`:o}).join(", ")},Ou=new Set(["auto","cover","contain"]),Ru=new Set(["center","top","bottom","left","right"]),nV=(t,e,n,r)=>{if(n.has(t))return t;let o=vr(()=>Fe(r,e,t));return o&&o[e]!==void 0?o[e]:t},Ws=(t,e,n,r)=>v(t)?Tn(t).map(o=>ut(o.trim()).map(s=>nV(s,e,n,r)).join(" ")).join(", "):t,Bg=t=>v(t)&&ut(t).map(e=>Vt(e,"gap").gap).join(" "),jg=t=>{if(!v(t))return t;let e=P();return ut(t).map(n=>Rn.test(n)?Ds(n,e.spacing):n).join(" ")},U0=t=>{if(!v(t))return;let e=t.split(" ");return e.length?e.map(n=>Ft(n)?`var(${n})`:n.length<3||n.includes("ms")?Se(n).timing||n:Be(n)?Be(n):n).join(" "):t},Pu=(t,e,n)=>{if(v(t))return t.split(",").map(r=>Se(r).timing||r).join(",")},Ug=t=>{if(!v(t))return;let e=t.split(",");if(e.length)return e.map(U0).join(",")};function Nt(t,e,n={},r={}){let o=St.call(this,e||n[t]);if(o==null)return;let s;if(v(o)){if(/^(?:env|var)\(/.test(o.trim()))return{[t]:o};if(o.includes("(")){let c=Ar(o);s=c[0],o=c[1]}let i=n.scaleBoxSize,a=uu(t);!i&&a&&!r.ratio&&(o=pu(o))}return r.ratio?Fe(n,t,o,s):Vt(o,t,void 0,s)}var j=(t,e=null,n)=>Nt(t,e,n,{ratio:!0}),rV=(t,e,n)=>v(t)?ut(t).map(r=>Rn.test(r)?Fe(e,n,r)[n]:r).join(" "):t,Rr=(t,e,n,r="borderRadius")=>{if(v(t))return{[r]:ut(t).map(o=>{let s=xu(o);return s!==void 0?rV(s,e,n):Fe(e,n,o)[n]}).join(" ")}};M();var Va="__smblsThemeRootOwner",za=t=>{let e=t&&t.__prefersListener,n=t&&t.__prefersMq;if(e&&n)try{typeof n.removeEventListener=="function"?n.removeEventListener("change",e):typeof n.removeListener=="function"&&n.removeListener(e)}catch{try{n.removeListener(e)}catch{}}t&&(t.__prefersListener=null,t.__prefersMq=null)},gP=(t,e,n)=>{if(!(!t||!e)){za(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},oV=(t,e)=>{let n=P(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},le=t=>t,sV=(t,e)=>{if(v(t)||me(t)){let n=P();if(n.cssVars&&e){let r=n.varPrefix?n.varPrefix+"-":"";n.cssVars[`--${r}size-${e}`]=t}}return t},Vg={color:Tr,gradient:Na,font:bu,fontFamily:Ba,fontfamily:Ba,theme:mu,icons:Vs,semanticIcons:le,semanticicons:le,svg:ja,svgData:le,typography:le,shadow:Eo,spacing:le,media:le,grid:le,class:le,timing:le,reset:le,unit:le,animation:le,vars:oV,sizes:sV,shape:le,skins:le,viewTransition:le},iV=(t,e,n,r)=>{Zr(t,n,e);let o={};for(let s of r)t[s]===e&&(t[s]=o);return t.verbose&&console.warn("[scratch] design-system family",n,"resolved to a host object; parked it and allocated a plain bucket"),o},V0=(t,e,n)=>{let r=P(),o=Qf(t),s=o.toLowerCase(),i=r[o]||r[s]||r[t],a=ur(i)?iV(r,i,s,[o,s,t]):i,c=Vg[o]||Vg[s];if(c)try{let l=c(e,n);return a&&(a[n]=l),a}catch(l){r.verbose&&console.warn("Error setting",s,"value",e,n,l)}if(!c){let l=a||(r[s]={});return l[n]=e,l}r.verbose&&console.warn("Can not find",s,"method in scratch")},Lu=(t,e)=>{let n=P(),r=t.toLowerCase();if(ur(e))return Zr(n,r,e),n.verbose&&console.warn("[scratch] ignoring host object passed as the",r,"design-system family"),n[r]||n[t];if(e==null)return n.verbose&&console.warn("[scratch] skipping empty design-system family",r),n[r]||n[t];let o=Object.keys(e).sort((s,i)=>{let a=k(e[s])||I(e[s])?1:0,c=k(e[i])||I(e[i])?1:0;return a-c});if(r==="color"){let s=n[r]||(n[r]={});for(let i of o)i in s||(s[i]=e[i])}return o.forEach(s=>{try{return V0(r,e[s],s)}catch(i){n.verbose&&console.warn("Error setting",r,"value",e[s],s,i)}}),n[r]||n[t]},zg=(t,e)=>{let n=e||P();n.globalTheme=t;let o=Hi(n)||(typeof document<"u"?document:null),s=o&&o.defaultView||(typeof window<"u"?window:null);if(o){let a=n.themeRoot||o.documentElement,c=t&&t!=="auto";if(a[Va]=n,c)za(n),a.setAttribute("data-theme",t),n.resolvedTheme=t,t==="dark"||t==="light"?a.style.colorScheme=t:a.style.colorScheme="light dark";else if(s&&s.matchMedia){let l=u=>{let d=u.matches?"dark":"light";a.setAttribute("data-theme",d),n.resolvedTheme=d},f=s.matchMedia("(prefers-color-scheme: dark)");l(f),a.style.colorScheme="light dark",gP(n,f,l)}else za(n),a.setAttribute("data-theme","light"),n.resolvedTheme="light",a.style.colorScheme="light"}let i=n.varPrefix?`--${n.varPrefix}-theme-`:"--theme-";for(let a in n.cssVars)a.startsWith(i)&&delete n.cssVars[a];for(let a in n.cssMediaVars)delete n.cssMediaVars[a];if(o&&n.cssVars){let a=n.scopeSelector||":root",c=o.styleSheets;for(let l=0;l<c.length;l++)try{let f=c[l].cssRules;for(let u=0;u<f.length;u++)if(f[u].selectorText===a){for(let d in n.cssVars)f[u].style.setProperty(d,n.cssVars[d]);return n}}catch{}}return n},Du=t=>{let n=Hi(t)||(typeof document<"u"?document:null),r=n&&n.defaultView||(typeof window<"u"?window:null),o=n&&(t.themeRoot||n.documentElement);if(o&&typeof o.setAttribute=="function")if(t.globalTheme&&t.globalTheme!=="auto")za(t),o.setAttribute("data-theme",t.globalTheme),t.resolvedTheme=t.globalTheme,o[Va]=t,t.globalTheme==="dark"||t.globalTheme==="light"?o.style.colorScheme=t.globalTheme:o.style.colorScheme="light dark";else if(o[Va]&&o[Va]!==t&&o.hasAttribute("data-theme"))za(t),t.resolvedTheme=o.getAttribute("data-theme");else if(r&&r.matchMedia){let i=c=>{let l=c.matches?"dark":"light";o.setAttribute("data-theme",l),t.resolvedTheme=l},a=r.matchMedia("(prefers-color-scheme: dark)");i(a),o.style.colorScheme="light dark",o[Va]=t,gP(t,a,i)}else za(t),o.setAttribute("data-theme","light"),t.resolvedTheme="light",o.style.colorScheme="light",o[Va]=t},aV={},Ks=(t,e=aV)=>{let n=e.config||P(),{version:r,verbose:o,useVariable:s,useReset:i,useSvgSprite:a,useFontImport:c,useIconSprite:l,globalTheme:f,themeRoot:u,useDocumentTheme:d,useDefaultConfig:p,semanticIcons:g,hoverMedia:h,focusableRing:m,files:y,assets:x,...E}=t;e.newConfig&&(n=Eg(e.newConfig)),fr(E.document)&&(n.__domDocument=E.document,delete E.document),fr(n.document)&&(n.__domDocument||(n.__domDocument=n.document),n.document={}),y!==void 0&&(n.files=y),x!==void 0&&(n.assets=x),o!==void 0&&(n.verbose=o),s!==void 0&&(n.useVariable=s),i!==void 0&&(n.useReset=i),c!==void 0&&(n.useFontImport=c),a!==void 0&&(n.useSvgSprite=a),l!==void 0&&(n.useIconSprite=l),d!==void 0&&(n.useDocumentTheme=d),f!==void 0&&(n.globalTheme=f),u!==void 0&&(n.themeRoot=u),t.useThemeSuffixedVars!==void 0&&(n.useThemeSuffixedVars=t.useThemeSuffixedVars),p!==void 0&&(n.useDefaultConfig=p),g!==void 0&&(n.semanticIcons=g),h!==void 0&&(n.hoverMedia=h),m!==void 0&&(n.focusableRing=m),n.verbose&&console.log(n),Du(n),n.__svgCache||(n.__svgCache={}),Ia(E);let C=Object.keys(E).filter(S=>!S.startsWith("__")),_=new Set(C);C.forEach(S=>{let A=S.toLowerCase();A!==S&&_.has(A)&&bt(E[A],E[S],ae)});let b=new Set;if(C.forEach(S=>{let A=S.toLowerCase(),T=A!==S&&_.has(A)?A:S;b.has(T)||(b.add(T),Lu(T,E[T]))}),n.varPrefix&&(n.typography&&(n.typography.varPrefix=n.varPrefix),n.spacing&&(n.spacing.varPrefix=n.varPrefix),n.timing&&(n.timing.varPrefix=n.varPrefix)),E.typography)try{wu()}catch(S){n.verbose&&console.warn("Error applying typography sequence",S)}if(E.spacing)try{du()}catch(S){n.verbose&&console.warn("Error applying spacing sequence",S)}if(E.timing)try{ku()}catch(S){n.verbose&&console.warn("Error applying timing sequence",S)}try{Cu()}catch(S){n.verbose&&console.warn("Error applying skins",S)}Eu();let w=Au();return w&&(n.reset=w),n};var Wa=1,z0=["font","files","assets","themeRoot"],cV=new Set(z0),Ha="$smbls",Hg=t=>{if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null},lV=t=>t.startsWith("__")||cV.has(t),Wg=t=>{if(!Hg(t))return null;let e=new Map,n=!1,r=s=>{if(n)return;if(s===void 0)return{[Ha]:"u"};if(s===null||typeof s=="string"||typeof s=="boolean")return s;if(typeof s=="number")return Number.isFinite(s)&&!Object.is(s,-0)?s:{[Ha]:"n",v:Object.is(s,-0)?"-0":String(s)};if(typeof s!="object"){n=!0;return}let i=e.get(s);if(i!==void 0)return{[Ha]:"r",i};if(Array.isArray(s)){e.set(s,e.size);let c=new Array(s.length);for(let l=0;l<s.length;l++){if(!(l in s)){n=!0;return}c[l]=r(s[l])}return c}if(!Hg(s)||Object.prototype.hasOwnProperty.call(s,Ha)){n=!0;return}e.set(s,e.size);let a={};for(let c of Object.keys(s))a[c]=r(s[c]);return a},o={};for(let s of Object.keys(t))if(!lV(s)&&(o[s]=r(t[s]),n))return null;return o},fV=(t,e)=>{let n=Object.keys(e),r=0;for(let o in t){if(r===n.length)return!0;if(o!==n[r])return!1;r++}return r===n.length},Kg=(t,e)=>{let n=[],r=(s,i)=>{if(s===null||typeof s!="object")return s;if(Array.isArray(s)){let l=new Array(s.length);n.push(l);for(let f=0;f<s.length;f++)l[f]=r(s[f]);return l}let a=s[Ha];if(typeof a=="string"){if(a==="u")return;if(a==="n")return s.v==="-0"?-0:Number(s.v);if(a==="r")return n[s.i]}let c=i;if(c&&!fV(s,c))for(let l of Object.keys(c))delete c[l];else c||(c={});n.push(c);for(let l in s)c[l]=r(s[l]);return c},o=new Set;for(let s in t){let i=t[s],a=e[s],c=Hg(a)&&!o.has(a)&&Hg(i)&&typeof i[Ha]!="string"?a:null;c&&o.add(c);let l=r(i,c);l!==a&&(e[s]=l)}return e};var z=(t,e)=>e.split(" ").map(n=>t+"-"+n),q0="top right bottom left",G0=q0+" block block-start block-end inline inline-start inline-end",xe="start end",Lr="width style color",qg=t=>z(t,G0),uV=(()=>{let t=z("border","width style color image");for(let e of G0.split(" "))t.push("border-"+e,...z("border-"+e,Lr));return t})(),mP=t=>[...z("border-"+t,Lr+" start end"),...z("border-"+t+"-start",Lr),...z("border-"+t+"-end",Lr)],vt={animation:z("animation","name duration timing-function delay iteration-count direction fill-mode play-state timeline range range-start range-end"),background:z("background","image position position-x position-y size repeat origin clip attachment color"),border:uV};for(let t of["width","style","color"])vt["border-"+t]=G0.split(" ").map(e=>"border-"+e+"-"+t);for(let t of q0.split(" "))vt["border-"+t]=z("border-"+t,Lr);vt["border-block"]=mP("block");vt["border-inline"]=mP("inline");Object.assign(vt,{"border-image":z("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:z("column","width count"),"column-rule":z("column-rule",Lr),container:z("container","name type"),"contain-intrinsic-size":z("contain-intrinsic","width height"),flex:z("flex","grow shrink basis"),"flex-flow":z("flex","direction wrap"),font:[...z("font","style variant weight stretch size"),"line-height",...z("font","family size-adjust kerning feature-settings variation-settings optical-sizing")],gap:["row-gap","column-gap"],grid:z("grid","template template-rows template-columns template-areas auto-rows auto-columns auto-flow"),"grid-template":z("grid-template","rows columns areas"),"grid-area":z("grid","row column row-start row-end column-start column-end"),"grid-row":z("grid-row",xe),"grid-column":z("grid-column",xe),inset:[...q0.split(" "),...z("inset","block block-start block-end inline inline-start inline-end")],"inset-block":z("inset-block",xe),"inset-inline":z("inset-inline",xe),"list-style":z("list-style","type position image"),margin:qg("margin"),"margin-block":z("margin-block",xe),"margin-inline":z("margin-inline",xe),mask:z("mask","image mode repeat position clip origin size composite"),offset:z("offset","position path distance rotate anchor"),outline:z("outline",Lr),overflow:z("overflow","x y"),"overscroll-behavior":z("overscroll-behavior","x y"),padding:qg("padding"),"padding-block":z("padding-block",xe),"padding-inline":z("padding-inline",xe)});for(let t of["content","items","self"])vt["place-"+t]=["align-"+t,"justify-"+t];Object.assign(vt,{"scroll-margin":qg("scroll-margin"),"scroll-padding":qg("scroll-padding"),"text-decoration":z("text-decoration","line style color thickness"),"text-emphasis":z("text-emphasis","style color"),transition:z("transition","property duration timing-function delay behavior")});var dV="block-start block-end inline-start inline-end".split(" ");for(let t of dV)vt["border-"+t]=z("border-"+t,Lr);for(let t of["block","inline"])for(let e of Lr.split(" "))vt["border-"+t+"-"+e]=z("border-"+t,xe.split(" ").map(n=>n+"-"+e).join(" "));Object.assign(vt,{"animation-range":z("animation-range",xe),"background-position":z("background-position","x y"),"font-variant":z("font-variant","alternates caps east-asian emoji ligatures numeric position"),"font-synthesis":z("font-synthesis","weight style small-caps"),marker:z("marker","start mid end"),"position-try":z("position-try","order fallbacks"),"scroll-margin-block":z("scroll-margin-block",xe),"scroll-margin-inline":z("scroll-margin-inline",xe),"scroll-padding-block":z("scroll-padding-block",xe),"scroll-padding-inline":z("scroll-padding-inline",xe),"scroll-timeline":z("scroll-timeline","name axis"),"view-timeline":z("view-timeline","name axis inset"),"text-box":z("text-box","trim edge"),"text-wrap":z("text-wrap","mode style"),"white-space":["white-space-collapse","text-wrap-mode"]});vt.font.push("font-language-override");var Pr=t=>"corner-"+t+"-shape";vt["corner-shape"]=[..."top-left top-right bottom-right bottom-left start-start start-end end-start end-end".split(" "),..."top right bottom left block-start block-end inline-start inline-end".split(" ")].map(Pr);Object.assign(vt,{"corner-top-shape":["top-left","top-right"].map(Pr),"corner-right-shape":["top-right","bottom-right"].map(Pr),"corner-bottom-shape":["bottom-left","bottom-right"].map(Pr),"corner-left-shape":["top-left","bottom-left"].map(Pr),"corner-block-start-shape":["start-start","start-end"].map(Pr),"corner-block-end-shape":["end-start","end-end"].map(Pr),"corner-inline-start-shape":["start-start","end-start"].map(Pr),"corner-inline-end-shape":["start-end","end-end"].map(Pr)});for(let t in vt){let e=vt[t],n=new Set(e);for(let r=0;r<e.length;r++){let o=vt[e[r]];if(o)for(let s of o)n.has(s)||(n.add(s),e.push(s))}}var an={};for(let t in vt)for(let e of vt[t])(an[e]||(an[e]=[])).push(t);var W0=new Map,yP=t=>{let e=W0.get(t);if(e!==void 0)return e;W0.set(t,0),e=0;let n=an[t];if(n)for(let r=0;r<n.length;r++)e=Math.max(e,yP(n[r])+1);return W0.set(t,e),e};function Ka(t){if(typeof t!="string")return 0;let e=t.charCodeAt(0)===45&&t.charCodeAt(1)!==45?t.replace(/^-(webkit|moz|ms|o)-/,""):t;return Object.prototype.hasOwnProperty.call(an,e)?yP(e):0}var pV=/^(?:margin|padding|inset|scroll-margin|scroll-padding)(?:-(?:block|inline))?$|^border(?:-(?:block|inline))?-(?:width|style|color)$|^(?:border-radius|corner(?:-[a-z]+)*-shape|gap|overflow|overscroll-behavior|place-(?:content|items|self)|background-position|contain-intrinsic-size)$/,bP=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,hV=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","auto"]),K0=t=>ut(String(t).replace(/\s*!important\s*$/,""));function qa(t,e,n){let r=vt[t];if(!r||r.indexOf(n)===-1)return!1;if(pV.test(t))return!0;if(!bP.test(t)||typeof e=="function"||e==null||n.indexOf("border-image")===0)return!1;let o=K0(e);return o.length>=3?!0:/-style$/.test(n)&&o.some(s=>hV.has(s.toLowerCase()))}var gV=new Set(["thin","medium","thick"]),mV=t=>/^[+-]?\.?\d/.test(t)||gV.has(t.toLowerCase())||/^(?:calc|min|max|clamp)\(/i.test(t)||/^var\(--(?:[a-zA-Z0-9]{1,6}-)?spacing-/.test(t),yV=t=>t==="transparent"||t==="currentcolor"||Object.prototype.hasOwnProperty.call(Aa,t),bV=t=>Os(t)||/^var\(--(?:(?!theme-|shadow-)[a-zA-Z0-9]{1,6}-)?color-/.test(t)||yV(t.toLowerCase()),_V=/-(width|style|color)$/;function Iu(t,e,n){if(qa(t,e,n))return!0;let r=vt[t];if(!r||r.indexOf(n)===-1||typeof e=="function"||e==null)return!1;if(bP.test(t)){if(n.indexOf("border-image")===0)return!1;let o=_V.exec(n);if(!o)return!1;let s=K0(e);return s.length===1&&/^(?:0|none)$/i.test(s[0])?o[1]!=="color":o[1]==="width"&&s.some(mV)}if(t==="background"&&n==="background-color"){let o=K0(e);return o.length===1&&bV(o[0])}return!1}var Xa=new Map,LP=null,Y0=null,wV=null;function $u(t){t.batchAtomicCss&&(Y0=t.batchAtomicCss),t.compoundCssClass&&(wV=t.compoundCssClass)}var SV=new Set,wP=t=>!!(t&&t.documentElement&&typeof t.createElement=="function"&&t.head!==void 0);function sk(t){try{let e=P();e&&(e.__domDocument=t)}catch{}t&&SV.add(t)}function Xn(){try{let t=P();if(t){if(wP(t.__domDocument))return t.__domDocument;if(wP(t.document))return t.document}}catch{}return typeof document<"u"?document:null}var ke={atomic:0,variable:0,global:0,keyframes:0,duplicate:0,invalid:0,dropped:0};function em(){return{...ke}}function ik(){for(let t in ke)ke[t]=0;Zg=!1}var Zg=!1,Xg=(t,e)=>`${t} ${e}${t===1?"":"s"}`;function xV(t){let e=Date.parse(t);if(!isFinite(e))return"";let n=Math.floor((Date.now()-e)/864e5);return n<1?" (today)":` (${Xg(n,"day")} ago)`}function kV(){try{let t=MV();if(!t.length)return-1;let e=0;for(let n=0;n<t.length;n++)e+=t[n].cssRules?t[n].cssRules.length:0;return e}catch{return-1}}function EV(t,e){if(Zg)return!1;Zg=!0;let n="n/a \u2014 running from src/ (unbuilt), so no dist is in play",r="this IS the source",o="@symbo.ls/css";return console.error(`[@symbo.ls/css] CSS EMIT FAILURE (${t}) \u2014 the engine emitted ${Xg(ke.variable,"variable rule")} and ${Xg(ke.atomic,"atomic rule")}, while the design system held ${Xg(e,"CSS variable")}.
47
47
  The document will render UNSTYLED and nothing else will report an error.
48
48
  This is what a STALE dist/ looks like: an obsolete emitter against a current design system.
49
49
  package : ${o}
50
50
  built : ${n}
51
51
  source : ${r}
52
- emitted : ${JSON.stringify(xe)}
53
- sheets : the style[data-smbls] tiers currently hold ${fV()} rule(s)
52
+ emitted : ${JSON.stringify(ke)}
53
+ sheets : the style[data-smbls] tiers currently hold ${kV()} rule(s)
54
54
  FIX : cd smbls && npm run check:stale # every package whose src is newer than its dist
55
55
  then rebuild the listed packages and clear the app's .parcel-cache
56
- Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function CP(){try{let t=P(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function W0(t){Gg||xe.variable>0||xe.atomic>0||TP(Math.max(t,CP()))}function nk(t){let e=t&&(t.CSS_VARS||t.cssVars);return TP(e?Object.keys(e).length:CP())}function TP(t){let e=Jg();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!ik())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let n=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return uV(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var dV={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 pV(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}var qa=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,gP=new Map,ke=t=>{if(qa(t))return t;let e=gP.get(t);return e===void 0&&(e=pV(t),gP.set(t,e)),e},mP=new Map,Iu=t=>{if(qa(t))return t;let e=mP.get(t);return e===void 0&&(e=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()),mP.set(t,e)),e};function Yg(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 hV(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Yg(e)}var gV={"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 Ks(t,e){let n=gV[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function K0(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)r[s]!=null&&(o+=Ks(ke(s),r[s]));e+=`${n}{${o}}`}return e}function q0(t){return t.charCodeAt(0)===64&&!Ya(t)}function yP(t){let e="";for(let n in t){let r=t[n];if(!q0(n)||typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=r[s];i==null||typeof i=="object"||(o+=Ks(ke(s),i))}e+=`${n}{${o}}`}return e}var mV="@media (hover: hover)",yV=/(?:^|[^\\]):hover(?![\w-])/;function rk(){try{let t=P();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Pr(t,e,n){return n===!1||!yV.test(e)||n===void 0&&!rk()?t:`${mV}{${t}}`}var ok=new Map;function bV(t,e,n,r){let o=Ga.get(t);if(!o){let c=dV[e]||Yg(e),l=hV(n);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Ga.set(t,o)}let i=typeof n=="string"&&(n.indexOf("}")!==-1||n.indexOf("{")!==-1)?null:`.${o}{${Ks(ke(e),n)}}`,a={className:o,rule:i,tier:i===null?null:sk(i,!0,"atomic")};return ok.set(t,a),a}function bP(t,e,n){let r=(n?n+"":"")+t+":"+e,o=ok.get(r)||bV(r,t,e,n);return o.rule!==null&&an(o.rule,void 0,"atomic",!0,o.tier),o.className}var _P=new WeakMap,wP=new WeakMap;function an(t,e,n,r,o){let s=o||sk(t,r,n);Lu&&!e&&Lu.push([t,n||"global",s]);let i=SV(e,s);if(!i)return xe.dropped++,"dropped";let a=i.sheet,c=i.rules;if(c||(c=_P.get(a),c||(c=new Set,_P.set(a,c)),i.rules=c),c.has(t))return xe.duplicate++,xe[n||"global"]++,"duplicate";let l=wP.get(a);if(l&&l.has(t))return xe.invalid++,"invalid";try{a.insertRule(t,a.cssRules.length)}catch{return l||(l=new Set,wP.set(a,l)),l.add(t),xe.invalid++,"invalid"}return c.add(t),xe[n||"global"]++,"inserted"}var Be="0:0",G0="1:0",OP="0:99",SP=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function sk(t,e,n){if(typeof t!="string"||!t)return Be;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return Be;let i=1/0,a=-1/0;SP.lastIndex=0;let c;for(;c=SP.exec(t);){let l=parseFloat(c[2])*(c[3]==="em"||c[3]==="rem"?16:1);c[1]==="max"?i=Math.min(i,l):a=Math.max(a,l)}return i!==1/0?"2:"+-i:a!==-1/0?"3:"+a:G0}if(t.charCodeAt(0)!==46)return n==="atomic"&&!e?OP:Be;if(!/^\.[\w-]+\{/.test(t))return G0;if(!e)return Be;let r=t.indexOf("{"),o=t.indexOf(":",r);if(o===-1)return Be;let s=za(t.slice(r+1,o).trim());return s?"0:"+s:Be}var Ka=null,_V=()=>{if(Ka)return Ka;let t=0;for(let e in sn)t=Math.max(t,za(e));Ka=[Be];for(let e=1;e<=t;e++)Ka.push("0:"+e);return Ka.push(OP,G0),Ka},xP=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},kP=(t,e)=>{let[n,r]=xP(t),[o,s]=xP(e);return n!==o?n<o:r<s},wV=t=>t.getAttribute("data-tier")||Be,Y0=new WeakMap,qg=!1,Pu=null,X0=0;function SV(t,e){if(qg&&!t){let n=Pu&&Y0.get(Pu),r=n&&n.get(e);if(r&&r.epoch===X0)return r;let o=Xg(Pu,e);return o&&(o.epoch=X0),o}return Xg(t||Gn(),e)}function ik(t,e){let n=Xg(t||Gn(),e);return n?n.sheet:null}function Xg(t,e){if(!t||!t.head)return null;let n=e||Be,r=Y0.get(t);r||(r=new Map,Y0.set(t,r));let o=r.get(n);if(o&&o.node.parentNode===t.head&&o.node.sheet===o.sheet)return o;if(n!==Be){let c=_V();for(let l=0;l<c.length&&kP(c[l],n);l++)Xg(t,c[l])}let s=n===Be?t.head.querySelector("style[data-smbls]:not([data-tier])"):t.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!s){s=t.createElement("style"),s.setAttribute("data-smbls",""),n!==Be&&s.setAttribute("data-tier",n);let c=t.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(kP(n,wV(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;if(l)t.head.insertBefore(s,l);else if(f)t.head.insertBefore(s,f.nextSibling);else{let u=t.head.querySelector('style[data-brender], style[data-emotion="smbls"]');u?t.head.insertBefore(s,u):t.head.appendChild(s)}}let i=s.sheet;if(!i)return r.delete(n),null;let a={sheet:i,node:s,rules:null,epoch:0};return r.set(n,a),n===Be&&(AP=i),a}function xV(t){let e=t||Gn();if(!e||!e.head)return[];let n=[],r=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<r.length;o++)r[o].sheet&&n.push(r[o].sheet);return n}var kV=8;function je(t,e,n,r){if(!t||typeof t!="object")return"";if(qg)return EP(t,n,r);qg=!0,Pu=Gn(),X0++;try{return EP(t,n,r)}finally{qg=!1,Pu=null}}function EP(t,e,n){let r=!!(n&&n.state),o=null,s=0,i=[],a=[],c=Object.keys(t);for(let f=0;f<c.length;f++){let u=c[f],d=t[u];d==null||d===!1||d===""||(typeof d=="object"?a.push([u,d]):z0&&!qa(u)?(o||(o=[]),o.push(u,String(d)),s++):i.push(bP(u,String(d),e)))}if(o&&s>=kV){let f=o.join("\0"),u=z0(f),d=u.indexOf("\0"),p=u.substring(0,d),g=u.substring(d+1);if(g){let h=g.split(`
57
- `);for(let m=0;m<h.length;m++)h[m]&&an(h[m],void 0,"atomic",!0)}i.push(p)}else if(o)for(let f=0;f<o.length;f+=2)i.push(bP(o[f],o[f+1],e));let l=[];for(let f=0;f<a.length;f++)l.push(CV(a[f][0],a[f][1],e,r));return i.concat(l).join(" ").trim()}var vP=new Map,EV=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Ya(t){return/^@(media|supports|container)\b/.test(t)}function Lr(t){let e=[],n=0,r=0;for(let o=0;o<t.length;o++){let s=t.charCodeAt(o);s===40?n++:s===41?n--:s===44&&n===0&&(e.push(t.slice(r,o).trim()),r=o+1)}return e.push(t.slice(r).trim()),e}function vV(t){return typeof t!="string"||!t||Ya(t)?!1:Lr(t).every(e=>EV.test(e))}var RP=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},J0=32,Z0=1024,Q0=!1;function Wg(t,e,n){if(Q0)return;Q0=!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 AV(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)||!RP(s)||n.length>J0||++r>Z0)))return n.push(s),s})}}function CV(t,e,n,r){let o=AV(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&rk(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=Ga.get(a);if(c){let _=vP.get(c);if(_)for(let b=0;b<_.length;b+=2)an(_[b],void 0,"atomic",void 0,_[b+1]);return c}c=n?`_${n}_c${Yg(a)}`:`_c${Yg(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=vV(t)?`${l}.${c}`:l,u="",d=[],p=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),g=new Set,h=0,m=(_,b)=>{g.add(b);let w="",S=Object.keys(b);for(let A=0;A<S.length;A++){let T=S[A],O=b[T];if(O!=null)if(typeof O=="object"){let B=[..._,T];g.has(O)?Wg("a style value that loops back to one of its own ancestors",t,B):RP(O)?B.length>J0?Wg(`a style block nested more than ${J0} levels deep`,t,B):++h>Z0?Wg(`a style object with more than ${Z0} nested blocks`,t,B):m(B,O):Wg(`a ${Object.prototype.toString.call(O).slice(8,-1)} (not a style block)`,t,B)}else{if(p(O))continue;w+=Ks(ke(T),O)}}g.delete(b),w&&(_.length===0?u+=w:d.push({chain:_,body:w}))};m([],e);let y=_=>_.startsWith(":")||_.startsWith("["),x=(_,b=!0)=>{let w=b&&_.length===1?f:l;if(!_.length)return w;let S=Lr(_[0]).map(A=>A.includes("&")?A.replace(/&/g,w):y(A)?`${w}${A}`:`${w} ${A}`);for(let A=1;A<_.length;A++){let T=Lr(_[A]),O=[];for(let B of S)for(let $ of T)$.includes("&")?O.push($.replace(/&/g,B)):y($)?O.push(B+$):O.push(B+" "+$);S=O}return S.join(", ")},E=[],C=(_,b)=>{let w=_.filter(Ya),S=x(_.filter(O=>!Ya(O)),w.length===0),A=`${S}{${b}}`;for(let O=w.length-1;O>=0;O--)A=`${w[O]}{${A}}`;A=Pr(A,S,i);let T=sk(A,void 0,"atomic");E.push(A,T),an(A,void 0,"atomic",void 0,T)};u&&C([t],u);for(let _ of d)C([t,..._.chain],_.body);return vP.set(c,E),Ga.set(a,c),c}var Lu=null;function Mu(t){let e=Lu,n=[];Lu=n;try{t()}finally{Lu=e}return n}function Nu(t){if(!Array.isArray(t))return;ik();let e=0;for(let n of t){if(!Array.isArray(n)||typeof n[0]!="string")continue;let r=n[1]||"global";r==="variable"&&e++,an(n[0],void 0,r,void 0,n[2]||void 0)}e>0&&W0(e)}function Ot(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(ik(),typeof t=="string"){let s=t.indexOf("--")!==-1;an(t,void 0,s?"variable":"global"),s&&W0(1);return}let e=rk(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=K0(i);a&&an(`${s}{${a}}`,void 0,"keyframes");continue}if(Ya(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=K0(c);l&&an(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0,u=a.charCodeAt(0)===64;for(let d in c){let p=c[d];p!=null&&(u&&typeof p=="object"||(qa(d)&&f++,l+=Ks(ke(d),p)))}u&&(l+=yP(c)),n+=f,an(Pr(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else if(c!=null){let l=qa(a);l&&n++,an(`${s}{${Ks(ke(a),c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0,f=s.charCodeAt(0)===64;for(let u in i){let d=i[u];if(d!=null)if(typeof d=="object"){if(f&&q0(u))continue;c=!0}else qa(u)&&l++,a+=Ks(ke(u),d)}if(f&&(a+=yP(i)),n+=l,a&&an(Pr(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let u=[],d=[];for(let p in i)if(typeof i[p]=="object"&&i[p]!==null){if(f&&q0(p))continue;Ya(p)?u.push(p):d.push(p)}u.sort((p,g)=>{let h=m=>{let y=m.match(/max-width:\s*(\d+)/);return y?parseInt(y[1]):0};return h(g)-h(p)});for(let p of d)Ot({[`${s} ${p}`]:i[p]});for(let p of u)Ot({[p]:{[s]:i[p]}})}}}n>0&&W0(n)}function Xa(t,e){return an(`@keyframes ${t}{${K0(e)}}`,void 0,"keyframes"),t}function PP(){Ga.clear(),ok.clear(),AP=null,Q0=!1}function ak(){return Ga.size}M();var zm={};F(zm,{DELEGATED_EVENTS:()=>Ja,LIFECYCLE_EVENTS:()=>Yn,MIXINS:()=>Qg,MOUNT_YIELD_BUDGET_MS:()=>oi,NON_BUBBLING_EVENTS:()=>tm,REGISTRY:()=>qt,SVG_TAGS:()=>oc,addDelegatedEvent:()=>$u,addMethods:()=>cc,adoptHydrationNode:()=>NE,applyExtends:()=>ec,attachElement:()=>Do,cacheNode:()=>Ao,create:()=>Gt,createHTMLNode:()=>rc,detectTag:()=>Jn,dispose:()=>un,dropMountWork:()=>ud,elementPath:()=>Nm,flushMounts:()=>gc,globalEventKeyInfo:()=>sm,holdMountFlush:()=>ni,inertOutsidePlugin:()=>Hm,isSvgTag:()=>Ir,isValidTag:()=>nc,mountIdle:()=>No,mountPending:()=>Um,mountYieldBudget:()=>rr,refreshContextProto:()=>lc,registerEvent:()=>Qa,registerGlobalEvent:()=>im,releaseMount:()=>He,remove:()=>ac,removeDelegatedEvent:()=>Fu,settleBuiltAttributes:()=>Io,update:()=>ic,whenConnected:()=>Eo,whenMountIdle:()=>Ae,whenMounted:()=>Br,yieldToMain:()=>or});var ct={viewEvents:null,chains:null,rows:null,hydration:null,mount:null};var qt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","vars","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),Qg={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Yn=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","bridgeMount","bridgeUpdate","bridgeDestroy"]),tm=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"]),em=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Ja=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"]);M();var qs=new Set;function Za(t){let e=t&&t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function Eo(t,e){let n=t&&t.node,r=t&&t.__ref;if(!(!n||!r||typeof e!="function")){if(Za(t)){e(t);return}(r.__onConnected||(r.__onConnected=[])).push(e),qs.add(t)}}function nm(){if(qs.size)for(let t of qs){let e=t.__ref,n=t.node;if(!e||!n){qs.delete(t);continue}if(!Za(t))continue;qs.delete(t);let r=e.__onConnected;if(e.__onConnected=null,!!r)for(let o=0;o<r.length;o++)try{r[o](t)}catch(s){typeof console<"u"&&console.error&&console.error("[smbls] whenConnected callback failed:",s?.message||s)}}}function LP(t){qs.size&&qs.delete(t)&&t.__ref&&(t.__ref.__onConnected=null)}var fk=new WeakMap,TV={passive:!0},OV={passive:!0,capture:!0},NP=(t,e)=>em.has(t)?e?OV:TV:e||!1;function $P(t){let e=fk.get(t);return e||(e={handlers:new Map,installed:new Set},fk.set(t,e)),e}function RV(t,e){let n=$P(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),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(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}},NP(t,r))}function $u(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=$P(r);RV(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Fu(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=fk.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function cn(t){if(t.charCodeAt(0)!==111||t.charCodeAt(1)!==110)return!1;let e=t.charCodeAt(2);return e>=65&&e<=90}function rm(t){return t.charAt(2).toLowerCase()+t.slice(3)}var PV=/^[A-Za-z_$][\w$]*$/;function Bu(t,e){return typeof e!="string"||!PV.test(e)?e:function(r){return t.call(e,r)}}function LV(t){return Ja.has(t)&&!Yn.has(t)}function om(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&mt(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&&ht()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&ht()}}var FP=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function DV(t,e){return FP(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:em.has(t),once:e.once===!0}:NP(t,!1)}function IV(t,e,n){return r=>{let o=r.target;if(o&&o.nodeType!==1&&(o=o.parentElement),!o||typeof o.closest!="function")return;let s;try{s=o.closest(e)}catch{return}s&&t.contains(s)&&n(r)}}function Qa(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=om(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=IV(o,a,i));let l=!tm.has(t)&&LV(t)&&!FP(r),f=l?null:DV(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;$u(t,o,i,u)}else o.addEventListener(t,i,f);e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;Fu(t,o,u)}else o.removeEventListener(t,i,f)})}var ck=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function sm(t){if(typeof t!="string")return null;for(let e=0;e<ck.length;e++){let n=ck[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:ck[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}function MV(t,e,n){let r=e,o=!1,s,i=!1,a=null;return 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)),r=Bu(t,r),typeof r!="function"?null:(s===void 0&&(s=em.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function NV(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}var lk=/^@media\s+/i,$V=/^[@[.#&:>*~+]/,DP=new Set;function IP(t,e){!tt()||DP.has(t)||(DP.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function FV(t,e){if(typeof e!="string")return null;let n=e.trim();if(!n)return null;let r=t.context?.designSystem?.media,o=i=>{let a=r&&typeof r=="object"?r[i]:void 0;return typeof a=="string"&&a.trim()?a.trim():null},s=n;if(n.charCodeAt(0)===64&&!lk.test(n)){if(s=o(n.slice(1)),!s)return IP(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return lk.test(s)?s.replace(lk,"").trim()||null:$V.test(s)?(IP(n,`names "${s}", which is not a media query`),null):s}function BV(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function BP(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function im(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)MP(t,e,n[o]);return}MP(t,e,n)}}function MP(t,e,n){let r=e.__ref,o=MV(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=FV(e,o.query),!o.query))return;let s=NV(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=om(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=p=>{if(Za(e)){if(c){if(l)return;l=!0}a(p)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!BV(s,t.eventName,f,u))return;r.__globalEvents||(r.__globalEvents=new Map);let d={target:s,eventName:t.eventName,listener:f,options:u};r.__globalEvents.set(i,d),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{BP(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&jV(e,i,d,()=>l)}function jV(t,e,n,r){let o=n.target.document;!o||o.readyState!=="complete"||Eo(t,()=>queueMicrotask(()=>{let s=t.__ref;if(r()||!s||!s.__globalEvents||s.__globalEvents.get(e)!==n)return;let i=n.target,a=typeof i.Event=="function"?i.Event:typeof Event=="function"?Event:null;a&&(n.listener(new a("load")),n.options.once&&r()&&BP(i,"load",n.listener,n.options))}))}var uk=Symbol("handlerChain.none"),UV=new Set(["inView","leaveView"]),VV=new Set(["bridgeMount","bridgeUpdate","bridgeDestroy"]),tc=new WeakMap,jP=new WeakMap,gk=!1,dk=t=>t!==null&&typeof t=="object"&&t.always===!0;function HV(t){let e=rm(t);return UV.has(e)?!0:Yn.has(e)&&!VV.has(e)}var UP=new Set;function zV(t){UP.has(t)||!tt()||(UP.add(t),console.warn(`[smbls] \`${t}: { always: true, \u2026 }\` \u2014 \`always\` composes the lifecycle hooks (onInit, onRender, onCreate, onMounted, onUpdate, onRemove, \u2026; not the bridge hooks) and onInView / onLeaveView only. \`${t}\` keeps the default merge: an extender's own \`${t}\` replaces this one. Run the shared step from a lifecycle hook, or call it from the extender's handler.`))}function pk(t){return t&&typeof t=="object"?{handler:t.handler,options:t}:{handler:t,options:null}}function ju(t,e){let n={always:t,own:e,list:e?t.concat(e):t,next:null,prims:null,cleared:null},r=function(...s){return qV(n,this,s)};return tc.set(r,n),gk=!0,r}function hk(t){let e=jP.get(t);return e||(e=ju([pk(t)],null),jP.set(t,e)),e}function WV(t,e){let n=tc.get(t);if(e==null||e===!1)return n.own?n.cleared||(n.cleared=ju(n.always,null)):t;if(typeof e!="object"&&typeof e!="function"){let i=n.prims||(n.prims=new Map),a=i.get(e);return a||i.set(e,a=ju(n.always,pk(e))),a}let r=n.next||(n.next=new WeakMap),o=r.get(e);if(o)return o;let s=dk(e)?tc.get(hk(e)):typeof e=="function"?tc.get(e):void 0;return o=s?ju(n.always.concat(s.always),s.own):ju(n.always,pk(e)),r.set(e,o),o}function KV(t,e,n){let r=dk(e),o=!r&&gk&&typeof e=="function"&&tc.has(e);if(!r&&!o&&!dk(n))return uk;if(!HV(t))return zV(t),uk;let s=r?hk(e):o?e:null;return s?WV(s,n):hk(n)}function VP(t,e,n,r){if(!cn(e))return!1;let o=KV(e,n,r);return o===uk?!1:(t[e]=o,!0)}function mk(t){if(typeof t=="function"){let e=gk?tc.get(t):void 0;return e?e.list:[{handler:t,options:null}]}return typeof t=="string"?[{handler:t,options:null}]:t&&typeof t=="object"?[{handler:t.handler,options:t}]:[]}function qV(t,e,n){let r=t.list,o,s=!1,i=null,a=!1,c;for(let l=0;l<r.length;l++){let f=r[l].handler;if(typeof f!="function")continue;let u;try{u=f.apply(e,n)}catch(d){a?console.error("[smbls] lifecycle handler error:",d):(a=!0,c=d);continue}u===!1?s=!0:u&&typeof u.then=="function"&&(i||(i=[])).push(u),o=u}if(a){if(i)for(let l of i)l.then(null,f=>console.error("[smbls] lifecycle handler error:",f));throw c}return s?!1:i?i.length===1?i[0]:GV(i):o}function GV(t){return Promise.allSettled(t).then(e=>{let n=null;for(let r of e)r.status==="rejected"&&(n?console.error("[smbls] lifecycle handler error:",r.reason):n=r);if(n)throw n.reason})}var YV=1e-6,HP=new WeakMap;function XV(t,e,n){let r=t.defaultView,o=r&&r.IntersectionObserver;if(typeof o!="function")return null;let s=HP.get(t);s||HP.set(t,s=new Map);let i=e+"|"+n,a=s.get(i);if(a)return a;a={id:i,byKey:s,threshold:e,targets:new Map,observer:null};try{let c=n?{threshold:e,rootMargin:n}:{threshold:e};a.observer=new o(l=>JV(a,l),c)}catch{return null}return s.set(i,a),a}function JV(t,e){for(let n=0;n<e.length;n++){let r=e[n],o=t.targets.get(r.target);if(!o)continue;let s=!!r.isIntersecting&&r.intersectionRatio>=t.threshold-YV;if(s===o.inView)continue;o.inView=s;let i=s?"in":"leave",a=o.subs.slice();for(let c=0;c<a.length;c++){let l=a[c];if(!(l.kind!==i||l.dead)){l.once&&WP(t,o,l);try{l.run(r)}catch(f){ZV(f)}}}}}function ZV(t){typeof globalThis.reportError=="function"?globalThis.reportError(t):queueMicrotask(()=>{throw t})}function WP(t,e,n){if(n.dead)return;n.dead=!0;let r=e.subs.indexOf(n);r!==-1&&e.subs.splice(r,1),!e.subs.length&&(t.targets.delete(e.node),t.observer.unobserve(e.node),!t.targets.size&&(t.observer.disconnect(),t.byKey.delete(t.id)))}function zP(t,e,n,r,o){let s=Bu(t,o.handler),i=o.options;if(typeof s!="function")return;let a=i&&i.threshold,c=typeof a=="number"&&a>=0&&a<=1?a:0,l=i&&typeof i.rootMargin=="string"?i.rootMargin.trim():"",f=XV(n,c,l);if(!f)return;let u=f.targets.get(e);u||(u={node:e,inView:!1,subs:[]},f.targets.set(e,u),f.observer.observe(e));let d={kind:r,once:!!(i&&i.once===!0),run:om(t,s),dead:!1};u.subs.push(d);let p=t.__ref;p.__eventCleanup||(p.__eventCleanup=[]),p.__eventCleanup.push(()=>WP(f,u,d))}function KP(t){let e=t.node;if(!e||e.nodeType!==1)return;let n=e.ownerDocument,r=n&&n.defaultView;if(!r||typeof r.IntersectionObserver!="function")return;let o=mk(t.onInView);for(let i=0;i<o.length;i++)zP(t,e,n,"in",o[i]);let s=mk(t.onLeaveView);for(let i=0;i<s.length;i++)zP(t,e,n,"leave",s[i])}Mt();Mt();function ln(t,e){let n=t&&t.context&&t.context.designSystem;if(!n)return e();mt(n);try{return e()}finally{ht()}}var Ee=Yo||(t=>{let e=De();if(!e)return t();il(null);try{return t()}finally{il(e)}});M();M();var XP=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],QV=["none","forwards","backwards","both"],tH=["normal","reverse","alternate","alternate-reverse"],eH=["running","paused"],nH=/^(?: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*\))$/,rH=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=>nH.test(r.replace(/\s+/g,"")))},qP=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),oH={transform:rH,translate:qP,rotate:t=>qP(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},sH=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},iH=t=>{if(!k(t))return null;let e=null,n=-1;for(let r in t){let o=sH(r);o==null||!k(t[r])||o>=n&&(n=o,e=t[r])}return e},aH=t=>{let e=iH(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=oH[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},cH=(t,e)=>{if(k(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return k(r)?r:null},lH=["reverse","alternate","alternate-reverse"],JP=(t,e,n)=>{let r=n||e.animationDirection;return r&&lH.includes(String(r))?"both":aH(cH(t,e))?"backwards":"both"},fH=0,GP=new Map,yk=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(k(t)){let o=JSON.stringify(t),s=GP.get(o);if(s)return s;let i=`smbls-anim-${fH++}`,a=Xa(i,t);return GP.set(o,a),a}let r=n&&n[t];return k(r)?Xa(t,r):t},ZP=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,uH=/^(?:\d+(?:\.\d*)?|\.\d+)$/,QP=/^(?:cubic-bezier|steps|linear)\(/,dH=/^(?:calc|min|max|clamp)\(/,pH=t=>t.includes("(")||t.startsWith("--"),hH=(t,e)=>{if(!On.test(t))return!1;let n=e&&e.sequence;if(!k(n))return!1;let r=t.charCodeAt(0)===45?t.slice(1):t;return!!(n[r]||r.length===2&&n[r[0]])},gH=t=>{if(!v(t))return!1;let e=t.trim();return XP.includes(e)||QP.test(e)||e.startsWith("var(")},mH=(t,e)=>!!e&&gH(e[t]||e[br(t)]),yH=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],bH=t=>ut(String(t)),_H=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(u,d)=>r[u]!=null?!1:(r[u]=d,!0),c=(u,d)=>{a(u,d)||s.push(d)};for(let u of bH(t))e&&e[u]?o=u:ZP.test(u)||hH(u,n)?a("duration",u)||a("delay",u):XP.includes(u)||mH(u,n)?c("timingFunction",u):QP.test(u)?a("timingFunction",u):u==="infinite"?c("iterationCount",u):uH.test(u)?a("iterationCount",Number(u)):tH.includes(u)?c("direction",u):QV.includes(u)?c("fillMode",u):eH.includes(u)?c("playState",u):pH(u)?i.push(u):s.push(u);let l=o||s[0]||i.shift()||null,f=new Set;for(let u of i){let d=yH.find(p=>r[p]==null);if(!d)break;r[d]=u.startsWith("--")?`var(${u})`:u,f.add(d)}return{name:l,...r,opaqueSlots:f}},wH=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=P()||{};return Cn(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>_H(o,n,r))},YP=(t,e)=>ZP.test(t)||e&&!dH.test(t)&&!/^(?:var|env)\(/.test(t)?t:we(t).timing||t,SH=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:yk(t.name,e),animationDuration:t.duration!=null?YP(t.duration,n("duration")):we(e.animationDuration||"A").timing,animationDelay:t.delay!=null?YP(t.delay,n("delay")):we(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:Fe(t.timingFunction):Fe(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||JP(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},xH={animationName:"none",animationPlayState:"running",animationDirection:"normal"},kH=(t,e)=>{let n=t.map(o=>SH(o,e));if(n.length===1)return n[0];let r={};for(let o in n[0]){let s=n.map(i=>i[o]);s.every(i=>i==null)||(r[o]=s.map(i=>i??xH[o]).join(", "))}return r},bk={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=wH(t,e);if(n.length)return kH(n,e)}return{animationName:yk(t,e),animationDuration:we(e.animationDuration||"A").timing,animationDelay:we(e.animationDelay||"0s").timing,animationTimingFunction:Fe(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||JP(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:yk(t,e)}),animationDuration:t=>({animationDuration:we(t).timing}),animationDelay:t=>({animationDelay:we(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Fe(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var am=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!v(e))return;let[r,o]=ut(e);return{...j(t+"Start",r,n),...j(t+"End",o||r,n)}},_k={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>Yt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("height",e),...Nt("width",n||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minWidth",e),...Nt("maxWidth",n||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minHeight",e),...Nt("maxHeight",n||e)}},size:t=>{if(!v(t))return;let[e,n]=ut(t);return{...j("inlineSize",e),...j("blockSize",n||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minInlineSize",e),...Nt("minBlockSize",n||e)}},maxSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("maxInlineSize",e),...Nt("maxBlockSize",n||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),borderTopWidth:(t,e)=>j("borderTopWidth",t,e),borderRightWidth:(t,e)=>j("borderRightWidth",t,e),borderBottomWidth:(t,e)=>j("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>j("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>j("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>j("textUnderlineOffset",t,e),padding:(t,e)=>j("padding",t,e),paddingInline:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("paddingInlineStart",e),...Nt("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("paddingBlockStart",e),...Nt("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("marginInlineStart",e),...Nt("marginInlineEnd",n||e)}},marginBlock:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("marginBlockStart",e),...Nt("marginBlockEnd",n||e)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),scrollMargin:(t,e)=>j("scrollMargin",t,e),scrollMarginTop:(t,e)=>j("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>j("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>j("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>j("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>am("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>am("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>j("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>j("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>j("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>j("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),scrollPaddingTop:(t,e)=>j("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>j("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>j("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>j("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>am("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>am("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>j("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>j("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>j("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>j("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Mg(t)}),columnGap:(t,e)=>$e(e,"columnGap",t),rowGap:(t,e)=>$e(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!v(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(!v(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Tr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Tr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Tr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Tr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Tr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Tr(t,e,"borderBottomRightRadius","borderBottomRightRadius"),backgroundSize:(t,e)=>({backgroundSize:zs(t,"backgroundSize",vu,e)}),backgroundPosition:(t,e)=>({backgroundPosition:zs(t,"backgroundPosition",Au,e)}),maskSize:(t,e)=>({maskSize:zs(t,"maskSize",vu,e)}),maskPosition:(t,e)=>({maskPosition:zs(t,"maskPosition",Au,e)})};var wk={fontSize:t=>yu(t)||t,fontFamily:t=>({fontFamily:gu(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 Sk={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 xk={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ut(t).map(n=>Vt(n,"k").k).join(" ")}},left:t=>Vt(t,"left"),top:t=>Vt(t,"top"),right:t=>Vt(t,"right"),bottom:t=>Vt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ut(t).map(n=>Vt(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ut(t).map(n=>Vt(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var cm=0,lm=()=>{cm++},fm=()=>{cm>0&&cm--},le=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:cm>0?null:n&&n.resolvedTheme||null},fe=(t,e)=>{if(e==null||e==="")return;if(!k(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(k(s)){let i=fe(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},tL=t=>{let e={};for(let n in t){let r=t[n];e[n]=k(r)?tL(r):v(r)?r+" !important":r}return e},Gs=t=>(e,n)=>{let r=n&&v(e)&&!P().useVariable,o=Pg(e,r?le(n):null);return k(o)?fe(t,o):{[t]:o}},kk={theme:(t,e)=>{if(t)return e.themeModifier?on(t,`@${e.themeModifier}`):on(t)},color:(t,e)=>{let n=le(e);if(t)return fe("color",Kt(t,n))},background:(t,e)=>{let n=le(e);if(t)return v(t)&&t.includes("gradient")&&t.includes("(")?{background:xo(t,n)}:fe("background",Kt(t,n))},backgroundColor:(t,e)=>{let n=le(e);if(t)return fe("backgroundColor",Kt(t,n))},backgroundImage:(t,e,n,r)=>{let o=le(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 fe("backgroundImage",Ig(t,o))},textStroke:t=>{let e=Lg(t);if(e!=null)return{WebkitTextStroke:e}},outline:Gs("outline"),outlineWidth:(t,e)=>j("outlineWidth",t,e),outlineColor:(t,e)=>{let n=le(e);if(t)return fe("outlineColor",Kt(t,n))},outlineOffset:(t,e)=>j("outlineOffset",t,e),border:Gs("border"),borderColor:(t,e)=>{let n=le(e);if(t)return fe("borderColor",Kt(t,n))},borderTopColor:(t,e)=>{let n=le(e);if(t)return fe("borderTopColor",Kt(t,n))},borderBottomColor:(t,e)=>{let n=le(e);if(t)return fe("borderBottomColor",Kt(t,n))},borderLeftColor:(t,e)=>{let n=le(e);if(t)return fe("borderLeftColor",Kt(t,n))},borderRightColor:(t,e)=>{let n=le(e);if(t)return fe("borderRightColor",Kt(t,n))},borderLeft:Gs("borderLeft"),borderTop:Gs("borderTop"),borderRight:Gs("borderRight"),borderBottom:Gs("borderBottom"),shadow:(t,e)=>{let n=le(e);if(t)return fe("boxShadow",Dg(t,n))},boxShadow:(t,e)=>{if(!v(t))return;let[n,r]=t.split("!importan"),o=le(e),s=r?" !important":"",i=Eu(n.trim(),o);return v(i)?{boxShadow:i+s}:fe("boxShadow",s?tL(i):i)},textShadow:(t,e)=>fe("textShadow",Eu(t,e?le(e):null)),columnRule:Gs("columnRule")};var Uu={transition:t=>{let e=$g(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Cu(t)}),transitionDelay:t=>({transitionDelay:Cu(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Fe(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var Ek={flow:(t,e)=>{let n=e.reverse;if(!v(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(!v(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};M();var EH=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,eL=t=>{if(!v(t))return t;let e=P().sizes;return e?t.replace(EH,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},Xn=t=>eL(Ng(t)),vk={gridTemplateColumns:t=>({gridTemplateColumns:Xn(t)}),gridTemplateRows:t=>({gridTemplateRows:Xn(t)}),gridAutoColumns:t=>({gridAutoColumns:Xn(t)}),gridAutoRows:t=>({gridAutoRows:Xn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Xn(t)}),templateColumns:t=>({gridTemplateColumns:Xn(t)}),autoColumns:t=>({gridAutoColumns:Xn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Xn(t)}),templateRows:t=>({gridTemplateRows:Xn(t)}),autoRows:t=>({gridAutoRows:Xn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var nL="breakpoints",vH=new Set(["window","media"]),rL=/^-?[A-Za-z_][\w-]*$/,oL=new Set(["none","and","or","not","initial","inherit","unset","revert","revert-layer","default"]),AH=t=>{let e=t&&t.containerName;if(typeof e!="string")return null;let n=e.trim().split(/\s+/)[0];return n&&rL.test(n)&&!oL.has(n)?n:null},um=(t,e)=>{if(typeof t=="function")try{t=t(e,e&&e.state,e&&e.context)}catch{return null}if(typeof t!="string")return null;let n=t.trim();return!n||vH.has(n)?null:n==="container"?AH(e)||nL:rL.test(n)&&!oL.has(n)?n:null},CH=/^@media\s+/i,TH=/^(?:only\s+)?(?:screen|all)\s+and\s+/i,OH=/(?:^|[^\w-])(?:(?:min|max)-)?(?:width|inline-size)(?![\w-])/i,RH=/height|block-size|aspect-ratio|orientation|device-|resolution/i,Ak=t=>{if(typeof t!="string")return null;let e=t.trim().replace(CH,"").replace(TH,"").trim();if(!e||e.indexOf(",")!==-1)return null;let n=e.split(/\s+(?:and|or)\s+/i);for(let r of n){let o=r.trim();if(o.charCodeAt(0)!==40||o.charCodeAt(o.length-1)!==41)return null;let s=o.slice(1,-1);if(s.indexOf("(")!==-1||s.indexOf(")")!==-1||!OH.test(s)||RH.test(s))return null}return e},Ck={breakpointsFrom:(t,e)=>{let n=um(t,e);if(!n)return;let r={},o=e&&e.container!=null;return!o&&(!e||e.containerType==null)&&(r.containerType="inline-size"),!o&&(!e||e.containerName==null)&&(r.containerName=n),r}};var xt={...bk,..._k,...wk,...Sk,...xk,...kk,...Uu,...Ek,...vk,...Ck};var Bt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","anchorName","anchorScope","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","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","counterIncrement","counterReset","cursor","direction","display","emptyCells","fieldSizing","fill","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","positionAnchor","positionArea","positionTry","positionTryFallbacks","positionTryOrder","positionVisibility","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","stroke","tabSize","tableLayout","textAlign","textAlignLast","textBox","textBoxEdge","textBoxTrim","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","viewTransitionClass","viewTransitionName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();var PH=/^[a-z][0-9]?$/,sL=/var\(\s*(--[A-Za-z0-9-]+)/g,LH=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},DH=Object.prototype.propertyIsEnumerable,iL=(t,e)=>{if(!t||typeof t!="object")return!1;for(let n in t){let r=t[n];if(!r||typeof r!="object")continue;let o=r.sequence;if(o&&typeof o=="object"&&DH.call(o,e))return!0}return!1},Tk=/[(),\s]+/,Ok=(t,e)=>{let n=null,r=t.split(Tk);for(let o=0;o<r.length;o++){let s=r[o];s&&e(s)&&(n||(n=[])).push(s)}return n},Rk=(t,e)=>On.test(t)&&e(t.charCodeAt(0)===45?t.slice(1):t),IH=(t,e)=>{if(!e.size)return[];let n=o=>e.has(o),r=Ok(t,o=>Rk(o,n));return r?[...new Set(r)]:[]},MH=(t,e)=>{if(!e.size)return[];let n=[];sL.lastIndex=0;let r;for(;r=sL.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!PH.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},dm=new Set,aL=(t,e,n)=>{if(!tt()||!v(e)||!e)return;let r;try{r=P()}catch{return}let{knownLetters:o,knownVars:s}=LH(r);if(!o.size&&!s.size)return;let i=IH(e,o),a=MH(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;dm.has(f)||(dm.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;dm.has(u)||(dm.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};M();var NH=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,$H=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=Is(s||t)?Ds(()=>te(e,n)):te(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(NH),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},cL=(t,e,n)=>({[t]:te(e,n)}),Vu=(t,e,n)=>{let r=`&${t}`,o=te(e,n);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Pk=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return L(n)?n.call(e,e):!!n},FH=(t,e,n)=>{let r=t.slice(1),o=Pk(r,n);if(o===void 0&&(o=!!n[r]),!!o)return te(e,n)},BH=(t,e,n)=>({[t]:e}),jH=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Pk(r,n);s!==void 0&&(o=s)}if(o)return te(e,n)},UH=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Pk(r,n);s!==void 0&&(o=s)}if(!o)return te(e,n)},Lk=(t,e)=>te(t,e),Dk={"@":$H,":":Vu,"[":Vu,"*":Vu,"+":Vu,"~":Vu,"&":cL,">":cL,$:FH,"-":BH,".":jH,"!":UH};var pm=to(),lL=(t,e,n)=>{let r=e?.context?.designSystem;r&&mt(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&v(c)){let l=fL(c,e);l&&(n.unpack?Lt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=St(c,e);Lt(o,Lk(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=L(l)?l(e,e.state,e.context):l;f&&i(a,f),!pm&&k(o[a])&&(o[a].label=a)}else if(xt[a]){let l=St(c,e);if(l===null)continue;I(l)&&(l=l.reduce((u,d)=>Lt(u,d),{}));let f=xt[a](l,e,e.state,e.context);I(f)&&(f=f.reduce((u,d)=>Lt(u,d),{})),f&&i(a,f),!pm&&k(o[a])&&(o[a].label=a)}else if(Bt.has(a)){let l=St(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),pm||aL(a,l,e),i(a,{[a]:l}),!pm&&k(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&ht()}},fL=(t,e)=>{if(!v(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!k(s))continue;let i=pt(s);r=r?se(r,i):i}if(r)return te(r,e)},uL=(t,e)=>{let n={};for(let r in t){let o=Dk[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?se(n[i],s[i]):n[i]=s[i])}}return n},te=(t,e,n={unpack:!0})=>{let[r,o]=lL(t,e,n),s=uL(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Tl(r,s);r._selectors=s}return r},VH=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};M();var dL=t=>{if(k(t))return te(t,t)},HH=(t,e)=>{let n=dL(t);return typeof e=="function"?e(n):je(n)};M();var pL=/\s*!important\s*$/,zH=()=>{let t;try{t=P()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{n||(n=new Map);let i=n.get(s);return i===void 0&&(i=iL(t,s),n.set(s,i)),i},o=s=>Da(e,s)!==void 0;return{isToken:s=>s.charCodeAt(0)!==35&&(Rk(s,r)||o(s))}},WH=(t,e)=>{let n=String(t).split(Tk);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},KH=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(ke(t),e)}catch{return!1}},hL=new Set,qH=(t,e,n)=>{if(!tt())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;hL.has(o)||(hL.add(o),console.warn(`[smbls/css-in-props] style.${e} on <${r}> holds a design-system token the "${e}" transformer could not resolve to one inline value, so it is written as is and the browser drops it. Move the key out of \`style\` to the element itself, or write the resolved CSS. Value: "${n}"`))},GH=(t,e)=>{if(!t||typeof t!="object")return!1;let n=!1;for(let r in t){let o=t[r];if(o!=null){if(typeof o=="object"||typeof o=="function")return!1;for(let s of e)if(WH(o,s))return!1;n=!0}}return n},YH=(t,e,n,r)=>{if(!v(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=xt[t];if(!o||!Bt.has(t))return null;let s=pL.test(e),i=s?e.replace(pL,""):e,a=Ok(i,r.isToken);if(!a||KH(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let f={};for(let u of c)u&&typeof u=="object"&&Object.assign(f,u);c=f}if(!GH(c,a))return qH(n,t,e),null;let l={};for(let f in c){let u=c[f];u!=null&&(l[f]=s?String(u)+" !important":u)}return l},gL=(t,e,n)=>{let r={},o=!1;for(let s in t){let i=t[s];if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let c=gL(i,e,n);c!==i&&(o=!0),r[s]=c;continue}let a=YH(s,i,e,n);a?(o=!0,Object.assign(r,a)):r[s]=i}return o?r:t},Ik=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:gL(t,e,zH());if(!vt||!sn)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");var hm=vt,vo=sn,gm=Wa||(()=>!1),mL=Ru||gm,yL=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Dr=ke||(t=>yL(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),Hu=Iu||(t=>yL(t)?t:t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase()));function _L(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 ec(t,e,n){let r=_L(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=wL(r[i],s);a&&a!==e&&SL(t,a,n,new Set([e]))}}function wL(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 SL(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=_L(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=wL(o[c],a);l&&SL(t,l,n,r)}}let s=Nk(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.mark(i);let c=ct.chains;c!==null&&c(t,i,t[i],a)||(t[i]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?t[i]={...a}:t[i]=a:typeof t[i]=="object"&&typeof a=="object"&&!Array.isArray(t[i])&&!Array.isArray(a)&&t[i]!==null&&a!==null?t[i]=Ue(t[i],a):t[i]=a)}}var Mk=class{constructor(){this.rank=0,this.ranks=null}mark(e){XH(e)&&(this.ranks||(this.ranks=new Map),this.ranks.set(e,this.rank))}get(e){return this.ranks?this.ranks.get(e):void 0}get size(){return this.ranks?this.ranks.size:0}},mm=new Set;for(let t of[vo,hm])for(let e in t)mm.add(e),mm.add(Hu(e));var bL=new Map;function XH(t){let e=t.charCodeAt(0);if(e>=65&&e<=90||e>=48&&e<=57)return!1;let n=bL.get(t);return n===void 0&&(n=!!xt[t]||mm.has(t)||t.indexOf("-")>=0&&!(t.charCodeAt(0)===45&&t.charCodeAt(1)===45)&&mm.has(Dr(t)),bL.set(t,n)),n}function Nk(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new Mk),n.rank++,n}function xL(t){let e=t&&t.__ref&&t.__ref.__mergeLayer;if(!e||!e.ranks)return;let n;for(let r of e.ranks.values())if(n===void 0)n=r;else if(r!==n)return;e.ranks=null}function Ue(t,e){let n={...t},r=ct.chains;for(let o in e){let s=n[o],i=e[o];r!==null&&r(n,o,s,i)||(s&&i&&typeof s=="object"&&typeof i=="object"&&!Array.isArray(s)&&!Array.isArray(i)&&typeof s!="function"&&typeof i!="function"?n[o]=Ue(s,i):n[o]=i)}return n}Mt();Mt();Mt();var Ys="http://www.w3.org/2000/svg",oc=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"]),JH=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 nc(t){return JH.has(t)||oc.has(t)}function Ir(t){return oc.has(t)}function Jn(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"&&nc(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]),nc(o)&&!r.has(o)?o:"div"}var kL={};function rc(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===Ys)return n.createElementNS(Ys,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Ao(t){let e=t.tag=Jn(t),r=Ir(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ys)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=kL[r];if(s||(s=kL[r]=rc(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?rc(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}function zu(t,e){return e&&e.parentNode===t?e.nextSibling:t.firstChild}Mt();Qi();var EL=new WeakMap,vL=null,AL=null;function ZH(t,e){let n=t===vL?AL:EL.get(t);(!n||n.length!==t.length)&&(n={length:t.length,hooks:new Map},EL.set(t,n)),vL=t,AL=n;let r=n.hooks.get(e);if(r===void 0){r=!1;for(let o of t)if(typeof o[e]=="function"){r=!0;break}n.hooks.set(e,r)}return r}function $k(t,e){let n=t&&t.context&&t.context.plugins;return!!(n&&n.length&&ZH(n,e))}function Zn(t,e,...n){return $k(e,t)?no(t,e,...n):!1}function fn(t,e,n){Zn("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}var QH=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function TL(t,e,n){return Ee(()=>ln(t,()=>e.call(t,n,t,t.state,t.context)))}function tz(t,e){if(!tt())return;let n=e.__children&&e.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${e.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function OL(t){let e=t.__ref,n=t.node;if(!e||!n||e.__bridge||typeof t.onBridgeMount!="function"||!("scrollHeight"in n))return;let r=e.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};e.contentManaged=!0,tz(t,e);let o;try{o=TL(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,fn(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>CL(t,r,s),s=>{r.failed=!0,fn(t,"onBridgeMount",s)});return}CL(t,r,o)}function CL(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){PL(t,e);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;let r=t.__ref;e.effect=K(()=>{e.disposed||ln(t,()=>{try{let o=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);o&&typeof o.then=="function"&&o.catch(s=>fn(t,"onBridgeUpdate",s))}catch(o){fn(t,"onBridgeUpdate",o)}})},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function RL(t){let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&PL(t,e))}function PL(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,QH(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=TL(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>fn(t,"onBridgeDestroy",o))}catch(r){fn(t,"onBridgeDestroy",r)}}function sc(t){return t.__mount||(t.__mount={pending:0,tail:null,holder:null,waiters:null,chunkGen:0,attachLater:!1,held:!1})}function Wu(t){let e=t.__mount;return e?e.pending:0}Mt();function ic(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"&&ym(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>Qn(r,!1),c=>{Qn(r,!0),Zn("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(Qn(r,!1),a===!1)return n}catch(a){throw Qn(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;kp(()=>{if(t.state&&Et(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&Xs(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){let a=Zs(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=Dr(c),u=String(l).replace(/\s*!important\s*$/,"");n.node.style.setProperty(f,u,"important")}}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let a in t.attr){let c=t.attr[a];Js(n.node,a,c)}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let a in t.data)n.node.dataset[a]=t.data[a];n.data||(n.data={}),Object.assign(n.data,t.data)}if(t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)){let a=n.vars&&typeof n.vars=="object"&&!Array.isArray(n.vars)?n.vars:null;n.vars={...a,...t.vars},i=!0}for(let a in t){if(qt.has(a)||a==="state")continue;let c=t[a],l=n[a];if(l&&l.__ref&&typeof l.update=="function")l.update(c,e);else if(typeof c=="object"&&c!==null){let f=a.charCodeAt(0);f>=65&&f<=90&&Gt(c,n,a,e)}else a!=="text"&&a!=="html"&&a!=="style"&&a!=="attr"&&a!=="data"&&(n[a]=c,typeof c!="function"&&s.push(a))}});for(let a=0;a<s.length;a++)jk(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)Fk(s[c])&&(a=!0);a&&Bk(n)}if(n.node&&o&&r.__effects&&r.__effects.length)for(let a=0;a<r.__effects.length;a++){let c=r.__effects[a];c&&!c._disposed&&!c._isSubscribeToEffect&&typeof c._execute=="function"&&c._execute()}else if(n.node&&r.__conditionalRunners)for(let a of r.__conditionalRunners)a();return Zn("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Mt();function un(t){if(!t)return;let e=t.__ref;if(!e)return;if(e.__onConnected&&LP(t),De())return Ee(()=>un(t));e.__disposed=!0;let n=e.__if===!1&&!e.__ifInitialized;if(!n)try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__bridge&&RL(t),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&&un(i)}}if(e.__ifParked&&e.__ifParked.size){let o=[...e.__ifParked];e.__ifParked.clear();for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&i.parent===t&&un(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),t.parent.__ref.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),delete t.parent[t.key]}if(!n)try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}e.__mount&&e.__mount.tail&&ct.mount.abandon(t,e),t.node=null,t.parent=null,t.__ref=null}function ac(){un(this)}M();M();function Hk(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 LL=new Set;function DL(t,e,n){let r=String(e);if(LL.has(r))return;LL.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.`;Hk(t,"error",[a]),console.error(a)}var ML=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),ez=new Set,NL=t=>ML(Uk,t)&&!(qi||ez).has(t),IL=new Set;function $L(t,e){IL.has(t)||(IL.add(t),tt()&&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 nz(...t){return Hk(this,"warn",t),hf.apply(this,t)}function rz(...t){return Hk(this,"error",t),hs.apply(this,t)}var Uk={update:ic,remove:ac,getDB:bf,getQuery:_f,getRootData:uf,getPath:af,nextElement:gf,previousElement:mf,verbose:ua,warn:nz,error:rz,variables:yf,spotByPath:sf,set(t,e,n){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}let o;try{if(this.removeContent(),t!=null){let s=this.context?.__create;s&&(o=s(t,this,"content",e,n))}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let s=r.__setQueued;s&&(r.__setQueued=null,this.set(s.content,s.options))}}return o},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},whenConnected(t){return Eo(this,t)},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:ff,getRootState:lf,getRootContext:df,getContext:pf,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=NL(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&$L(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=rs;if(!s||!s(o))return o.call(this,...e);tt()&&DL(this,t,Ie(o));return}tt()&&DL(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)}},Vk=new WeakMap;function oz(t){if(!t)return Uk;let e=Vk.get(t);if(e)return e;e=Object.create(Uk);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return Vk.set(t,e),e}function cc(t){let e=oz(t.context);Object.setPrototypeOf(t,e)}function lc(t){if(!t)return!1;let e=Vk.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(NL(r)&&!ML(e,r)){$L(r,"refreshContextProto");continue}e[r]=n[r]}return!0}M();M();var Gk={};F(Gk,{STATE_METHODS:()=>FL,applyInitialState:()=>bm,applyStateMethods:()=>ve,callStateMethod:()=>qu,createState:()=>Wk,isTracking:()=>qk,useHostState:()=>Kk});Mt();Mt();var FL=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),Ku=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},Rn=(t,e,n,{onlyIfAbsent:r}={})=>{Ku(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Ku(t,e,n)},qu=(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)},ve=(t,e)=>{if(Et(e)){let o=e.__raw||e;Rn(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Rn(o,"set",function(s,i={}){let a=e.__element;return typeof s=="object"&&s!==null&&a&&typeof a.onBeforeStateUpdate=="function"&&!i.preventBeforeStateUpdateListener&&a.onBeforeStateUpdate(a,e,a.context,{changes:s,options:i})===!1||(e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,{...i,preventBeforeStateUpdateListener:!0})),e},{onlyIfAbsent:!0}),Rn(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Rn(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}),Rn(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Rn(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Rn(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Rn(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Rn(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&Et(a.parent);)a=a.parent;return qu(a,"update",s,i)}),Rn(o,"parentUpdate",function(s,i={}){if(e.parent)return qu(e.parent,"update",s,i)}),Rn(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=Et(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,Et(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}};Ku(e,"$settled",function(){return Ep().then(()=>e)});for(let o in r)if(Ku(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Cp(o,"");continue}Ku(e,o,r[o])}};var Wk=function(t,e,n){return t.state=bm(t,e,n),t.state},bm=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return ve(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",sz(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=ar({value:o});return s.__element=t,e?.state&&(s.parent=e.state),ve(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!Et(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=ar({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),ve(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return Et(o)?(o.__element=t,o):e?.state||{}};function zk(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 sz(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?zk(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?zk(o,s):o??{}}let r=zk(n.state,t);if(r&&typeof r=="object"&&!Et(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Mt();var Kk=(t,e)=>{if(!t)return jL;let n=az(t,e);return!n||!n.state?jL:lz(n.state)},qk=()=>De()!=null,iz=128;function az(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<iz&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var cz={get(t,e){return t[e]}},BL=new WeakMap,lz=t=>{let e=BL.get(t);return e||(e=new Proxy(t,cz),BL.set(t,e)),e},jL=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var fz=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],uz=["alignment-baseline","baseline-shift","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","mask-type","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","transform-origin","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"],dz=["requiredExtensions","systemLanguage"],UL={circle:["cx","cy","r","pathLength"],ellipse:["cx","cy","rx","ry","pathLength"],line:["x1","y1","x2","y2","pathLength"],path:["d","pathLength"],polygon:["points","pathLength"],polyline:["points","pathLength"],rect:["x","y","width","height","rx","ry","pathLength"],g:[],defs:[],switch:[],symbol:["viewBox","preserveAspectRatio","refX","refY","x","y","width","height"],use:["href","xlink:href","x","y","width","height"],image:["href","xlink:href","x","y","width","height","preserveAspectRatio","crossorigin"],foreignObject:["x","y","width","height"],text:["x","y","dx","dy","rotate","textLength","lengthAdjust"],tspan:["x","y","dx","dy","rotate","textLength","lengthAdjust"],textPath:["href","xlink:href","path","startOffset","method","spacing","side","textLength","lengthAdjust"],linearGradient:["x1","y1","x2","y2","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],radialGradient:["cx","cy","r","fx","fy","fr","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],stop:["offset"],pattern:["x","y","width","height","patternUnits","patternContentUnits","patternTransform","viewBox","preserveAspectRatio","href","xlink:href"],clipPath:["clipPathUnits"],mask:["x","y","width","height","maskUnits","maskContentUnits"],marker:["viewBox","preserveAspectRatio","refX","refY","markerUnits","markerWidth","markerHeight","orient"],filter:["x","y","width","height","filterUnits","primitiveUnits"]},pz=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),hz=()=>{let t={};for(let e in UL)t[e]=[...UL[e],...pz.has(e)?[]:dz,...uz];return t},Mr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","enterkeyhint","exportparts","headingoffset","headingreset","hidden","id","inputmode","lang","nonce","part","placeholder","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions","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","ping","referrerpolicy","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","loading","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["name","open"],del:["cite","datetime"],dialog:["closedby","open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["accept-charset","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","controls","crossorigin","decoding","fetchpriority","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alpha","alt","autocomplete","capture","checked","colorspace","crossorigin","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","blocking","crossorigin","disabled","fetchpriority","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"],q:["cite"],slot:["name"],script:["async","blocking","charset","crossorigin","defer","fetchpriority","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:["blocking","media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],template:["for","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable","shadowrootslotassignment"],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","loading","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","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"],...hz()},WL=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],KL=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()):null,VL=new Map,Nr=t=>{let e=VL.get(t);return e===void 0&&(e=KL(t)||YL(t),VL.set(t,e)),e},qL=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate","autoCapitalize","autoCorrect","writingSuggestions","headingOffset","headingReset","exportParts"]),Yk=new Set;for(let t in Mr)t==="default"||t==="aria"||t==="svg"||Mr[t].forEach(e=>{e.startsWith("on")||Yk.add(e)});var GL=t=>{let e=t.charCodeAt(0);if(e<97||e>122||!/[A-Z]/.test(t))return null;let n=t.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());if(Yk.has(n))return n;let r=t.toLowerCase();return Yk.has(r)?r:null},YL=t=>qL.has(t)?t.toLowerCase():GL(t),gz=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),mz=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),Qs=t=>typeof t=="string"&&(gz.has(t)||t.startsWith("aria-")),tr=(t,e)=>{if(e!==!0&&e!==!1)return e;if(Qs(t)){let n=mz.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},HL=new Map,dn=(t,e)=>{let n=Mr.default,r=Object.prototype.hasOwnProperty.call(Mr,t)?Mr[t]:null,o=r?r.length:-1,s=HL.get(t);(!s||s.def!==n||s.defLen!==n.length||s.own!==r||s.ownLen!==o)&&(s={def:n,defLen:n.length,own:r,ownLen:o,answers:new Map},HL.set(t,s));let i=s.answers.get(e);return i===void 0&&(i=yz(t,e),s.answers.set(e,i)),i},yz=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||KL(e)||qL.has(e)||Mr.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call(Mr,t)){let n=Mr[t];if(n.includes(e))return!0;let r=GL(e);return r!==null&&n.includes(r)}return!1},Jk=t=>{if(!v(t))return!1;let e=t.toLowerCase();return WL.includes(e)},bz=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Ut(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Ut(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=dn(t,o),i=Jk(o);if(Ut(e[o])&&(s||i)){let a=Nr(o)||o;r[a]=e[o]}}return r},_z=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},Co=(t,e)=>{let n=t.call("exec",e,t);if(n)return v(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},Xk=(t,e)=>{let n=(t.preSrc||"")+(Co(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},To={src:t=>Xk(t,t.src),href:t=>Co(t,t.href),action:t=>Co(t,t.action),poster:t=>Xk(t,t.poster),data:t=>Co(t,t.data)},Zk=t=>{let e=t.tag||"div",n={};for(let r in To)if(t[r]!==void 0&&dn(e,r)){let o=To[r](t);o!==void 0&&(n[r]=o)}return n},zL=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return L(n)?n.call(e,e):!!n},wz=(t,e,n)=>{if(t==="$"){let o=zL(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=zL(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},Sz=new Set(["$",".","!"]),Qk=(t,e,n,r=wz)=>{let o={},s=(i,a,c,l)=>{let f=a;o[i]=u=>{if(r(c,l,u))return L(f)?f(u,u.state,u.context):f}};for(let i in t){let a=i.charAt(0);if(!Sz.has(a))continue;let c=t[i];if(!c||typeof c!="object")continue;let l=i.slice(1);for(let f in c){if(n&&f in n)continue;if(f==="aria"&&c[f]&&typeof c[f]=="object"){for(let g in c[f])s("aria-"+g,c[f][g],a,l);continue}if(f==="data"&&c[f]&&typeof c[f]=="object"){for(let g in c[f]){let h=g.replace(/([A-Z])/g,m=>"-"+m.toLowerCase());s("data-"+h,c[f][g],a,l)}continue}let u=dn(e,f),d=Jk(f);if(!u&&!d)continue;let p=Nr(f)||f;s(p,c[f],a,l)}}return o};var _m="3.14.812";var XL="__SMBLS_ELEMENT_ID_ENGINE__",JL=(t,e,n)=>{let r=e||_m,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[XL];return s&&s.engine&&s.version===r?s.engine:(s||(o[XL]={version:r,engine:t}),t)};var xz=new Set(["rows","cols","wrap","fill","stroke","offset"]),wm=(t,e)=>xz.has(e)&&dn(t,e),Oo=(t,e)=>!!(xt[e]||Bt&&Bt.has(e))&&!wm(t,e);var RD=JL({uniqId:1,scopedStyleId:0},_m),uc=[],Ro=new Set,bE=!1,PD=0,hc=null,Xu=null;function yc(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function LD(){return typeof document<"u"&&document.visibilityState==="hidden"}var kz=250,Ez=1e3;function vz(){return Xu&&(Xu!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||LD())?!0:yc()-PD>=Ez}function Az(){if(bE=!0,PD=yc(),Xu=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,0);hc=t?()=>t(e):null;return}if(LD()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(gc,kz);hc=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;Xu=requestAnimationFrame;let e=requestAnimationFrame(gc);hc=t?()=>t(e):null}}function rd(){if(bE){if(!vz())return;let t=hc;if(hc=null,t)try{t()}catch{}}Az()}var DD=300,ID=15e4,uE=0;function ni(){uE++;let t=!1;return()=>{t||(t=!0,!(--uE>0)&&(uc.length||Ro.size)&&rd())}}function gc(){if(bE=!1,hc=null,Xu=null,uE>0||(Ro.size&&P9(),!uc.length))return;let t=uc.splice(0,uc.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=yc());let o=yc()-r.__mountFirstAttemptAt;r.__mountAttempts<=DD&&o<ID?(uc.push(n),rd()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}typeof n.onBridgeMount=="function"&&OL(n),typeof n.onMounted=="function"&&Jt("Mounted",n,n.__ref?.__mountOptions||{})}}}function dE(t,e){let n=t.__ref?.__autoGrow;n&&n.active&&nd(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,uc.push(t),rd())}function xm(t,e){typeof t.onContentUpdate=="function"&&(Zn("contentUpdate",t,e),ln(t,()=>{try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(fn(t,"onContentUpdate",n),t.context?.strictMode)throw n}}))}function Cz(t){return t.toLowerCase()}function MD(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function km(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function ND(t,e,n,r){return Tm(r,km(t)||(e&&typeof e=="object"?km(e.key):void 0)||String(n))}function Tm(t,e){if(!t||typeof e!="string")return e;let n=e;for(;Tz(t,n);)n="$"+n;return n!==e&&Oz(t,e,n),n}function Tz(t,e){if(qt.has(e)&&e!=="content")return!0;if(!(e in t))return!1;let n=t[e];return!(n&&typeof n=="object"&&n.__ref&&n.parent===t)}var ZL=new Set;function Oz(t,e,n){if(!tt())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;ZL.has(o)||(ZL.add(o),console.warn(`[smbls] a child keyed "${e}" at ${r} names a property of its parent; it lives at el["${n}"] (data-key="${n}") so the parent keeps its own "${e}". Prefix the data keys to keep plain el.<key> access.`))}function Gt(t,e,n,r={},o){if(De())return Ee(()=>Gt(t,e,n,r,o));if(t==null||t===!1)return null;let s=Xz(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=km(n);let i=km(t.key),a=Object.create(null);a.key=n||(i&&e?Tm(e,i):i)||`_${RD.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=Gt);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t,__mount:null,__plainRows:null,__ifParked:null};s&&(c.__runtimeSource=s);let l=o;o&&(o.holdTail||o.deferAttach)&&(o.holdTail&&ct.mount!==null&&ct.mount.hold(a),o.deferAttach&&(sc(c).attachLater=!0),l=void 0);let f=t;if(t=FD(a,t,n,i,e,r),a.if!=null){let g;if(typeof a.if=="function")try{g=a.if(a,a.state,a.context)}catch(h){if(g=!1,c.__ifError=h,typeof console<"u"&&console.warn){let m=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,h?.message||h)}}else g=a.if;c.__if=!!g}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else{if(e){e[a.key]=a;let h=e.__ref;h&&(h.__ifParked||(h.__ifParked=new Set)).add(a.key)}let g=Iz(t,n,a.context?.components);return g.length&&(c.__ifLateMerge={definition:f,key:n,ownKey:i,names:g,options:r}),typeof a.if=="function"&&KD(a,c,a.if),a}a.tag||(a.tag=Jn(a)),Jt("Init",a,r);let u=ct.hydration,d=a.node=u!==null&&u.adopt(a)||Ao(a);if(!d)return a;if(a.tag==="fragment"){let h=(a.context?.document||globalThis.document).createComment("");d.appendChild(h),c.__fragmentAnchor=h}if(Jt("AttachNode",a,r),d.setAttribute&&a.key&&d.getAttribute("data-key")!==String(a.key)&&d.setAttribute("data-key",a.key),e){let g=e[a.key];e[a.key]=a;let h=e.__ref?.__children;h&&(g===void 0||!h.includes(a.key))&&h.push(a.key)}d.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&d.setAttribute("data-smbls-app",a.context.key),a.id&&d.setAttribute&&(d.id=a.id),uI(a,r),zD(a),WD(a);try{pI(a,r)}catch(g){Om(a,g)}let p=c.__mount;return p!==null&&p.pending>0?(p.attachLater||(r.mountWhole===!0&&!(o&&o.holdTail)&&Rz(a,e)?p.held=!0:bc(a,e,l)),p.tail=()=>ct.mount.finish(a,r),a):(mc(a,!0),(p===null||!p.attachLater)&&bc(a,e,l),_E(a,r),a)}function Do(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.attachLater||(e.attachLater=!1,!t.node)?!1:(bc(t,t.parent),!0)}function Rz(t,e){if(!e||e.tag==="fragment")return!1;let n=t.node;if(!n||n.nodeType===11)return!1;let r=e.node||(e.nodeType?e:null);return!!r&&n.parentNode!==r}function $D(t){let e=t.__ref,n=e&&e.__mount;if(!n||!n.held)return;n.held=!1;let r=t.node,o=t.parent;if(!r||!o)return;let s=o.__ref;if(!s){bc(t,o);return}let i=o.node;if(!i)return;let a=s.__children,c=a?a.lastIndexOf(t.key):-1,l;for(let f=c-1;f>=0;f--){let u=o[a[f]],d=u&&($r(u)||(u.tag==="fragment"&&u.__ref?u.__ref.__fragmentAnchor:null));if(d&&d.parentNode===i){l=d.nextSibling;break}}l===void 0&&(l=zu(i,s.__textNode)),bc(t,o,l?{position:"before",node:l}:void 0)}function Om(t,e){if(typeof console<"u"&&console.error){let n=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] createChildren failed at ${n}:`,e?.message||e,e?.stack?`
56
+ Do NOT trust any browser measurement taken on this page until that reads clean.`),!0}function DP(){try{let t=P(),e=t&&(t.CSS_VARS||t.cssVars);return e?Object.keys(e).length:0}catch{return 0}}function X0(t){Zg||ke.variable>0||ke.atomic>0||IP(Math.max(t,DP()))}function ak(t){let e=t&&(t.CSS_VARS||t.cssVars);return IP(e?Object.keys(e).length:DP())}function IP(t){let e=em();if(t===0)return{ok:!0,reason:"no-design-system",stats:e,varCount:t};if(!uk())return{ok:!0,reason:"no-sheet",stats:e,varCount:t};if(e.variable>0||e.atomic>0)return{ok:!0,reason:null,stats:e,varCount:t};let n=e.invalid>0?"every rule was rejected as malformed":"no rule was ever produced";return EV(n,t),{ok:!1,reason:n,stats:e,varCount:t}}var vV={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 AV(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}var Ya=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,SP=new Map,Ee=t=>{if(Ya(t))return t;let e=SP.get(t);return e===void 0&&(e=AV(t),SP.set(t,e)),e},xP=new Map,Fu=t=>{if(Ya(t))return t;let e=xP.get(t);return e===void 0&&(e=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()),xP.set(t,e)),e};function Qg(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 CV(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Qg(e)}var TV={"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 qs(t,e){let n=TV[t];return n?`${t}:${e};${n}:${e};`:`${t}:${e};`}function J0(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)r[s]!=null&&(o+=qs(Ee(s),r[s]));e+=`${n}{${o}}`}return e}function Z0(t){return t.charCodeAt(0)===64&&!Ja(t)}function kP(t){let e="";for(let n in t){let r=t[n];if(!Z0(n)||typeof r!="object"||r===null)continue;let o="";for(let s in r){let i=r[s];i==null||typeof i=="object"||(o+=qs(Ee(s),i))}e+=`${n}{${o}}`}return e}var OV="@media (hover: hover)",RV=/(?:^|[^\\]):hover(?![\w-])/;function ck(){try{let t=P();if(t&&t.hoverMedia===!1)return!1}catch{}return!0}function Dr(t,e,n){return n===!1||!RV.test(e)||n===void 0&&!ck()?t:`${OV}{${t}}`}var lk=new Map;function PV(t,e,n,r){let o=Xa.get(t);if(!o){let c=vV[e]||Qg(e),l=CV(n);o=r?`_${r}_${c}-${l}`:`_${c}-${l}`,Xa.set(t,o)}let i=typeof n=="string"&&(n.indexOf("}")!==-1||n.indexOf("{")!==-1)?null:`.${o}{${qs(Ee(e),n)}}`,a={className:o,rule:i,tier:i===null?null:fk(i,!0,"atomic")};return lk.set(t,a),a}function EP(t,e,n){let r=(n?n+"":"")+t+":"+e,o=lk.get(r)||PV(r,t,e,n);return o.rule!==null&&cn(o.rule,void 0,"atomic",!0,o.tier),o.className}var vP=new WeakMap,AP=new WeakMap;function cn(t,e,n,r,o){let s=o||fk(t,r,n);Nu&&!e&&Nu.push([t,n||"global",s]);let i=IV(e,s);if(!i)return ke.dropped++,"dropped";let a=i.sheet,c=i.rules;if(c||(c=vP.get(a),c||(c=new Set,vP.set(a,c)),i.rules=c),c.has(t))return ke.duplicate++,ke[n||"global"]++,"duplicate";let l=AP.get(a);if(l&&l.has(t))return ke.invalid++,"invalid";try{a.insertRule(t,a.cssRules.length)}catch{return l||(l=new Set,AP.set(a,l)),l.add(t),ke.invalid++,"invalid"}return c.add(t),ke[n||"global"]++,"inserted"}var je="0:0",Q0="1:0",MP="0:99",CP=/\((max|min)-width:\s*([\d.]+)(px|em|rem)?\)/g;function fk(t,e,n){if(typeof t!="string"||!t)return je;if(t.charCodeAt(0)===64){if(!t.startsWith("@media")&&!t.startsWith("@supports")&&!t.startsWith("@container"))return je;let i=1/0,a=-1/0;CP.lastIndex=0;let c;for(;c=CP.exec(t);){let l=parseFloat(c[2])*(c[3]==="em"||c[3]==="rem"?16:1);c[1]==="max"?i=Math.min(i,l):a=Math.max(a,l)}return i!==1/0?"2:"+-i:a!==-1/0?"3:"+a:Q0}if(t.charCodeAt(0)!==46)return n==="atomic"&&!e?MP:je;if(!/^\.[\w-]+\{/.test(t))return Q0;if(!e)return je;let r=t.indexOf("{"),o=t.indexOf(":",r);if(o===-1)return je;let s=Ka(t.slice(r+1,o).trim());return s?"0:"+s:je}var Ga=null,LV=()=>{if(Ga)return Ga;let t=0;for(let e in an)t=Math.max(t,Ka(e));Ga=[je];for(let e=1;e<=t;e++)Ga.push("0:"+e);return Ga.push(MP,Q0),Ga},TP=t=>{let e=t.indexOf(":");return[Number(t.slice(0,e)),Number(t.slice(e+1))]},OP=(t,e)=>{let[n,r]=TP(t),[o,s]=TP(e);return n!==o?n<o:r<s},DV=t=>t.getAttribute("data-tier")||je,tk=new WeakMap,Jg=!1,Mu=null,ek=0;function IV(t,e){if(Jg&&!t){let n=Mu&&tk.get(Mu),r=n&&n.get(e);if(r&&r.epoch===ek)return r;let o=tm(Mu,e);return o&&(o.epoch=ek),o}return tm(t||Xn(),e)}function uk(t,e){let n=tm(t||Xn(),e);return n?n.sheet:null}function tm(t,e){if(!t||!t.head)return null;let n=e||je,r=tk.get(t);r||(r=new Map,tk.set(t,r));let o=r.get(n);if(o&&o.node.parentNode===t.head&&o.node.sheet===o.sheet)return o;if(n!==je){let c=LV();for(let l=0;l<c.length&&OP(c[l],n);l++)tm(t,c[l])}let s=n===je?t.head.querySelector("style[data-smbls]:not([data-tier])"):t.head.querySelector(`style[data-smbls][data-tier="${n}"]`);if(!s){s=t.createElement("style"),s.setAttribute("data-smbls",""),n!==je&&s.setAttribute("data-tier",n);let c=t.head.querySelectorAll("style[data-smbls]"),l=null;for(let u=0;u<c.length;u++)if(OP(n,DV(c[u]))){l=c[u];break}let f=c.length?c[c.length-1]:null;if(l)t.head.insertBefore(s,l);else if(f)t.head.insertBefore(s,f.nextSibling);else{let u=t.head.querySelector('style[data-brender], style[data-emotion="smbls"]');u?t.head.insertBefore(s,u):t.head.appendChild(s)}}let i=s.sheet;if(!i)return r.delete(n),null;let a={sheet:i,node:s,rules:null,epoch:0};return r.set(n,a),n===je&&(LP=i),a}function MV(t){let e=t||Xn();if(!e||!e.head)return[];let n=[],r=e.head.querySelectorAll("style[data-smbls]");for(let o=0;o<r.length;o++)r[o].sheet&&n.push(r[o].sheet);return n}var NV=8;function Ue(t,e,n,r){if(!t||typeof t!="object")return"";if(Jg)return RP(t,n,r);Jg=!0,Mu=Xn(),ek++;try{return RP(t,n,r)}finally{Jg=!1,Mu=null}}function RP(t,e,n){let r=!!(n&&n.state),o=null,s=0,i=[],a=[],c=Object.keys(t);for(let f=0;f<c.length;f++){let u=c[f],d=t[u];d==null||d===!1||d===""||(typeof d=="object"?a.push([u,d]):Y0&&!Ya(u)?(o||(o=[]),o.push(u,String(d)),s++):i.push(EP(u,String(d),e)))}if(o&&s>=NV){let f=o.join("\0"),u=Y0(f),d=u.indexOf("\0"),p=u.substring(0,d),g=u.substring(d+1);if(g){let h=g.split(`
57
+ `);for(let m=0;m<h.length;m++)h[m]&&cn(h[m],void 0,"atomic",!0)}i.push(p)}else if(o)for(let f=0;f<o.length;f+=2)i.push(EP(o[f],o[f+1],e));let l=[];for(let f=0;f<a.length;f++)l.push(jV(a[f][0],a[f][1],e,r));return i.concat(l).join(" ").trim()}var PP=new Map,$V=/^&?:(hover|focus|focus-visible|focus-within|active)(?![\w-])/;function Ja(t){return/^@(media|supports|container)\b/.test(t)}function Ir(t){let e=[],n=0,r=0;for(let o=0;o<t.length;o++){let s=t.charCodeAt(o);s===40?n++:s===41?n--:s===44&&n===0&&(e.push(t.slice(r,o).trim()),r=o+1)}return e.push(t.slice(r).trim()),e}function FV(t){return typeof t!="string"||!t||Ja(t)?!1:Ir(t).every(e=>$V.test(e))}var NP=t=>{let e=Object.prototype.toString.call(t);return e==="[object Object]"||e==="[object Array]"},nk=32,rk=1024,ok=!1;function Yg(t,e,n){if(ok)return;ok=!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 BV(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)||!NP(s)||n.length>nk||++r>rk)))return n.push(s),s})}}function jV(t,e,n,r){let o=BV(e),s=t.indexOf(":hover")!==-1||o.indexOf(":hover")!==-1,i=s&&ck(),a=(n?n+"":"")+t+o+(s&&!i?"rawhover":"")+(r?"state":""),c=Xa.get(a);if(c){let _=PP.get(c);if(_)for(let b=0;b<_.length;b+=2)cn(_[b],void 0,"atomic",void 0,_[b+1]);return c}c=n?`_${n}_c${Qg(a)}`:`_c${Qg(a)}`;let l=r?`.${c}.${c}`:`.${c}`,f=FV(t)?`${l}.${c}`:l,u="",d=[],p=_=>typeof _=="string"&&(_.indexOf("{")!==-1||_.indexOf("}")!==-1),g=new Set,h=0,m=(_,b)=>{g.add(b);let w="",S=Object.keys(b);for(let A=0;A<S.length;A++){let T=S[A],O=b[T];if(O!=null)if(typeof O=="object"){let B=[..._,T];g.has(O)?Yg("a style value that loops back to one of its own ancestors",t,B):NP(O)?B.length>nk?Yg(`a style block nested more than ${nk} levels deep`,t,B):++h>rk?Yg(`a style object with more than ${rk} nested blocks`,t,B):m(B,O):Yg(`a ${Object.prototype.toString.call(O).slice(8,-1)} (not a style block)`,t,B)}else{if(p(O))continue;w+=qs(Ee(T),O)}}g.delete(b),w&&(_.length===0?u+=w:d.push({chain:_,body:w}))};m([],e);let y=_=>_.startsWith(":")||_.startsWith("["),x=(_,b=!0)=>{let w=b&&_.length===1?f:l;if(!_.length)return w;let S=Ir(_[0]).map(A=>A.includes("&")?A.replace(/&/g,w):y(A)?`${w}${A}`:`${w} ${A}`);for(let A=1;A<_.length;A++){let T=Ir(_[A]),O=[];for(let B of S)for(let $ of T)$.includes("&")?O.push($.replace(/&/g,B)):y($)?O.push(B+$):O.push(B+" "+$);S=O}return S.join(", ")},E=[],C=(_,b)=>{let w=_.filter(Ja),S=x(_.filter(O=>!Ja(O)),w.length===0),A=`${S}{${b}}`;for(let O=w.length-1;O>=0;O--)A=`${w[O]}{${A}}`;A=Dr(A,S,i);let T=fk(A,void 0,"atomic");E.push(A,T),cn(A,void 0,"atomic",void 0,T)};u&&C([t],u);for(let _ of d)C([t,..._.chain],_.body);return PP.set(c,E),Xa.set(a,c),c}var Nu=null;function Bu(t){let e=Nu,n=[];Nu=n;try{t()}finally{Nu=e}return n}function ju(t){if(!Array.isArray(t))return;uk();let e=0;for(let n of t){if(!Array.isArray(n)||typeof n[0]!="string")continue;let r=n[1]||"global";r==="variable"&&e++,cn(n[0],void 0,r,void 0,n[2]||void 0)}e>0&&X0(e)}function Ot(t){if(t==null||typeof t!="string"&&typeof t!="object")return;if(uk(),typeof t=="string"){let s=t.indexOf("--")!==-1;cn(t,void 0,s?"variable":"global"),s&&X0(1);return}let e=ck(),n=0,r=Object.keys(t),o=s=>{let i=s.match(/max-width:\s*(\d+)/);return i?parseInt(i[1]):0};r.sort((s,i)=>{let a=s.startsWith("@media"),c=i.startsWith("@media");return!a&&!c?0:a?c?o(i)-o(s):1:-1});for(let s of r){let i=t[s];if(s.startsWith("@keyframes")){let a=J0(i);a&&cn(`${s}{${a}}`,void 0,"keyframes");continue}if(Ja(s))for(let a in i){let c=i[a];if(a.startsWith("@keyframes")){let l=J0(c);l&&cn(`${s}{${a}{${l}}}`,void 0,"keyframes");continue}if(typeof c=="object"&&c!==null){let l="",f=0,u=a.charCodeAt(0)===64;for(let d in c){let p=c[d];p!=null&&(u&&typeof p=="object"||(Ya(d)&&f++,l+=qs(Ee(d),p)))}u&&(l+=kP(c)),n+=f,cn(Dr(`${s}{${a}{${l}}}`,a,e),void 0,f?"variable":"global")}else if(c!=null){let l=Ya(a);l&&n++,cn(`${s}{${qs(Ee(a),c)}}`,void 0,l?"variable":"global")}}else{let a="",c=!1,l=0,f=s.charCodeAt(0)===64;for(let u in i){let d=i[u];if(d!=null)if(typeof d=="object"){if(f&&Z0(u))continue;c=!0}else Ya(u)&&l++,a+=qs(Ee(u),d)}if(f&&(a+=kP(i)),n+=l,a&&cn(Dr(`${s}{${a}}`,s,e),void 0,l?"variable":"global"),c){let u=[],d=[];for(let p in i)if(typeof i[p]=="object"&&i[p]!==null){if(f&&Z0(p))continue;Ja(p)?u.push(p):d.push(p)}u.sort((p,g)=>{let h=m=>{let y=m.match(/max-width:\s*(\d+)/);return y?parseInt(y[1]):0};return h(g)-h(p)});for(let p of d)Ot({[`${s} ${p}`]:i[p]});for(let p of u)Ot({[p]:{[s]:i[p]}})}}}n>0&&X0(n)}function Za(t,e){return cn(`@keyframes ${t}{${J0(e)}}`,void 0,"keyframes"),t}function $P(){Xa.clear(),lk.clear(),LP=null,ok=!1}function dk(){return Xa.size}var FP="3.14.849";M();var Gm={};F(Gm,{DELEGATED_EVENTS:()=>Qa,LIFECYCLE_EVENTS:()=>Jn,MIXINS:()=>rm,MOUNT_YIELD_BUDGET_MS:()=>si,NON_BUBBLING_EVENTS:()=>om,REGISTRY:()=>Gt,SVG_TAGS:()=>ic,addDelegatedEvent:()=>Uu,addMethods:()=>fc,adoptHydrationNode:()=>UE,applyExtends:()=>rc,attachElement:()=>Io,cacheNode:()=>Co,create:()=>Yt,createHTMLNode:()=>sc,detectTag:()=>Qn,dispose:()=>dn,dropMountWork:()=>gd,elementPath:()=>jm,flushMounts:()=>yc,globalEventKeyInfo:()=>lm,holdMountFlush:()=>ri,inertOutsidePlugin:()=>qm,isSvgTag:()=>Nr,isValidTag:()=>oc,mountIdle:()=>$o,mountPending:()=>Wm,mountYieldBudget:()=>sr,refreshContextProto:()=>uc,registerEvent:()=>ec,registerGlobalEvent:()=>fm,releaseMount:()=>He,remove:()=>lc,removeDelegatedEvent:()=>Vu,settleBuiltAttributes:()=>Mo,update:()=>cc,whenConnected:()=>vo,whenMountIdle:()=>Ce,whenMounted:()=>Ur,yieldToMain:()=>ir});var ct={viewEvents:null,chains:null,rows:null,hydration:null,mount:null};var Gt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","vars","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","srcObject","allowRuntimeTemplates","__name","__ref","__hash","__text","parent","node"]),rm={text:"text",html:"html",style:"style",attr:"attr",data:"data",classlist:"classlist",state:"state",scope:"scope"},Jn=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","bridgeMount","bridgeUpdate","bridgeDestroy"]),om=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"]),sm=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Qa=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"]);M();var Gs=new Set;function tc(t){let e=t&&t.node;if(!e)return!1;let n=e.nodeType===11?t.__ref?.__fragmentAnchor:e;return n?n.isConnected!==!1:!1}function vo(t,e){let n=t&&t.node,r=t&&t.__ref;if(!(!n||!r||typeof e!="function")){if(tc(t)){e(t);return}(r.__onConnected||(r.__onConnected=[])).push(e),Gs.add(t)}}function im(){if(Gs.size)for(let t of Gs){let e=t.__ref,n=t.node;if(!e||!n){Gs.delete(t);continue}if(!tc(t))continue;Gs.delete(t);let r=e.__onConnected;if(e.__onConnected=null,!!r)for(let o=0;o<r.length;o++)try{r[o](t)}catch(s){typeof console<"u"&&console.error&&console.error("[smbls] whenConnected callback failed:",s?.message||s)}}}function BP(t){Gs.size&&Gs.delete(t)&&t.__ref&&(t.__ref.__onConnected=null)}var gk=new WeakMap,UV={passive:!0},VV={passive:!0,capture:!0},zP=(t,e)=>sm.has(t)?e?VV:UV:e||!1;function HP(t){let e=gk.get(t);return e||(e={handlers:new Map,installed:new Set},gk.set(t,e)),e}function zV(t,e){let n=HP(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),l=c&&a?c.get(a):null;if(!l||s.relatedTarget&&typeof a.contains=="function"&&a.contains(s.relatedTarget))return;l(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}},zP(t,r))}function Uu(t,e,n,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let o=HP(r);zV(t,r),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,n)}function Vu(t,e,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let r=gk.get(n);if(!r)return;let o=r.handlers.get(t);o&&o.delete(e)}function ln(t){if(t.charCodeAt(0)!==111||t.charCodeAt(1)!==110)return!1;let e=t.charCodeAt(2);return e>=65&&e<=90}function am(t){return t.charAt(2).toLowerCase()+t.slice(3)}var HV=/^[A-Za-z_$][\w$]*$/;function zu(t,e){return typeof e!="string"||!HV.test(e)?e:function(r){return t.call(e,r)}}function WV(t){return Qa.has(t)&&!Jn.has(t)}function cm(t,e){let{context:n}=t,r=n?.designSystem;return o=>{r&&mt(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&&ht()});return}}catch(s){if(t.error=s,console.error("[DOMQL] Event error:",s),n?.strictMode)throw s}r&&ht()}}var WP=t=>!!t&&(t.capture===!0||typeof t.passive=="boolean"||t.once===!0);function KV(t,e){return WP(e)?{capture:e.capture===!0,passive:typeof e.passive=="boolean"?e.passive:sm.has(t),once:e.once===!0}:zP(t,!1)}function qV(t,e,n){return r=>{let o=r.target;if(o&&o.nodeType!==1&&(o=o.parentElement),!o||typeof o.closest!="function")return;let s;try{s=o.closest(e)}catch{return}s&&t.contains(s)&&n(r)}}function ec(t,e,n,r){let{node:o,context:s}=e;if(!o)return;let i=cm(e,n),a=r&&typeof r.selector=="string"&&r.selector;a&&(i=qV(o,a,i));let l=!om.has(t)&&WV(t)&&!WP(r),f=l?null:KV(t,r);if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;Uu(t,o,i,u)}else o.addEventListener(t,i,f);e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(l){let u=s?.rootNode||o.ownerDocument?.documentElement;Vu(t,o,u)}else o.removeEventListener(t,i,f)})}var pk=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function lm(t){if(typeof t!="string")return null;for(let e=0;e<pk.length;e++){let n=pk[e][0];if(t.length<=n.length||!t.startsWith(n))continue;let r=t.charCodeAt(n.length);if(!(r<65||r>90))return{target:pk[e][1],eventName:t.slice(n.length).toLowerCase()}}return null}function GV(t,e,n){let r=e,o=!1,s,i=!1,a=null;return 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)),r=zu(t,r),typeof r!="function"?null:(s===void 0&&(s=sm.has(n)),{handler:r,capture:o,passive:s,once:i,query:a})}function YV(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}var hk=/^@media\s+/i,XV=/^[@[.#&:>*~+]/,jP=new Set;function UP(t,e){!tt()||jP.has(t)||(jP.add(t),console.warn(`[smbls] onMediaQueryChange: "${t}" ${e} \u2014 no listener is registered.`))}function JV(t,e){if(typeof e!="string")return null;let n=e.trim();if(!n)return null;let r=t.context?.designSystem?.media,o=i=>{let a=r&&typeof r=="object"?r[i]:void 0;return typeof a=="string"&&a.trim()?a.trim():null},s=n;if(n.charCodeAt(0)===64&&!hk.test(n)){if(s=o(n.slice(1)),!s)return UP(n,"is not a key of designSystem.media"),null}else s=o(n)||n;return hk.test(s)?s.replace(hk,"").trim()||null:XV.test(s)?(UP(n,`names "${s}", which is not a media query`),null):s}function ZV(t,e,n,r){try{return t.addEventListener(e,n,r),!0}catch{return typeof t.addListener=="function"?(t.addListener(n),!0):!1}}function KP(t,e,n,r){try{t.removeEventListener(e,n,r)}catch{typeof t.removeListener=="function"&&t.removeListener(n)}}function fm(t,e,n){if(e.__ref){if(Array.isArray(n)){if(t.target!=="mediaQuery")return;for(let o=0;o<n.length;o++)VP(t,e,n[o]);return}VP(t,e,n)}}function VP(t,e,n){let r=e.__ref,o=GV(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=JV(e,o.query),!o.query))return;let s=YV(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=cm(e,o.handler),c=t.target==="window"&&t.eventName==="load",l=!1,f=p=>{if(tc(e)){if(c){if(l)return;l=!0}a(p)}},u={capture:o.capture,passive:o.passive,once:o.once};if(!ZV(s,t.eventName,f,u))return;r.__globalEvents||(r.__globalEvents=new Map);let d={target:s,eventName:t.eventName,listener:f,options:u};r.__globalEvents.set(i,d),r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{KP(s,t.eventName,f,u),r.__globalEvents&&r.__globalEvents.delete(i)}),c&&QV(e,i,d,()=>l)}function QV(t,e,n,r){let o=n.target.document;!o||o.readyState!=="complete"||vo(t,()=>queueMicrotask(()=>{let s=t.__ref;if(r()||!s||!s.__globalEvents||s.__globalEvents.get(e)!==n)return;let i=n.target,a=typeof i.Event=="function"?i.Event:typeof Event=="function"?Event:null;a&&(n.listener(new a("load")),n.options.once&&r()&&KP(i,"load",n.listener,n.options))}))}var mk=Symbol("handlerChain.none"),tz=new Set(["inView","leaveView"]),ez=new Set(["bridgeMount","bridgeUpdate","bridgeDestroy"]),nc=new WeakMap,qP=new WeakMap,wk=!1,yk=t=>t!==null&&typeof t=="object"&&t.always===!0;function nz(t){let e=am(t);return tz.has(e)?!0:Jn.has(e)&&!ez.has(e)}var GP=new Set;function rz(t){GP.has(t)||!tt()||(GP.add(t),console.warn(`[smbls] \`${t}: { always: true, \u2026 }\` \u2014 \`always\` composes the lifecycle hooks (onInit, onRender, onCreate, onMounted, onUpdate, onRemove, \u2026; not the bridge hooks) and onInView / onLeaveView only. \`${t}\` keeps the default merge: an extender's own \`${t}\` replaces this one. Run the shared step from a lifecycle hook, or call it from the extender's handler.`))}function bk(t){return t&&typeof t=="object"?{handler:t.handler,options:t}:{handler:t,options:null}}function Hu(t,e){let n={always:t,own:e,list:e?t.concat(e):t,next:null,prims:null,cleared:null},r=function(...s){return iz(n,this,s)};return nc.set(r,n),wk=!0,r}function _k(t){let e=qP.get(t);return e||(e=Hu([bk(t)],null),qP.set(t,e)),e}function oz(t,e){let n=nc.get(t);if(e==null||e===!1)return n.own?n.cleared||(n.cleared=Hu(n.always,null)):t;if(typeof e!="object"&&typeof e!="function"){let i=n.prims||(n.prims=new Map),a=i.get(e);return a||i.set(e,a=Hu(n.always,bk(e))),a}let r=n.next||(n.next=new WeakMap),o=r.get(e);if(o)return o;let s=yk(e)?nc.get(_k(e)):typeof e=="function"?nc.get(e):void 0;return o=s?Hu(n.always.concat(s.always),s.own):Hu(n.always,bk(e)),r.set(e,o),o}function sz(t,e,n){let r=yk(e),o=!r&&wk&&typeof e=="function"&&nc.has(e);if(!r&&!o&&!yk(n))return mk;if(!nz(t))return rz(t),mk;let s=r?_k(e):o?e:null;return s?oz(s,n):_k(n)}function YP(t,e,n,r){if(!ln(e))return!1;let o=sz(e,n,r);return o===mk?!1:(t[e]=o,!0)}function Sk(t){if(typeof t=="function"){let e=wk?nc.get(t):void 0;return e?e.list:[{handler:t,options:null}]}return typeof t=="string"?[{handler:t,options:null}]:t&&typeof t=="object"?[{handler:t.handler,options:t}]:[]}function iz(t,e,n){let r=t.list,o,s=!1,i=null,a=!1,c;for(let l=0;l<r.length;l++){let f=r[l].handler;if(typeof f!="function")continue;let u;try{u=f.apply(e,n)}catch(d){a?console.error("[smbls] lifecycle handler error:",d):(a=!0,c=d);continue}u===!1?s=!0:u&&typeof u.then=="function"&&(i||(i=[])).push(u),o=u}if(a){if(i)for(let l of i)l.then(null,f=>console.error("[smbls] lifecycle handler error:",f));throw c}return s?!1:i?i.length===1?i[0]:az(i):o}function az(t){return Promise.allSettled(t).then(e=>{let n=null;for(let r of e)r.status==="rejected"&&(n?console.error("[smbls] lifecycle handler error:",r.reason):n=r);if(n)throw n.reason})}var cz=1e-6,XP=new WeakMap;function lz(t,e,n){let r=t.defaultView,o=r&&r.IntersectionObserver;if(typeof o!="function")return null;let s=XP.get(t);s||XP.set(t,s=new Map);let i=e+"|"+n,a=s.get(i);if(a)return a;a={id:i,byKey:s,threshold:e,targets:new Map,observer:null};try{let c=n?{threshold:e,rootMargin:n}:{threshold:e};a.observer=new o(l=>fz(a,l),c)}catch{return null}return s.set(i,a),a}function fz(t,e){for(let n=0;n<e.length;n++){let r=e[n],o=t.targets.get(r.target);if(!o)continue;let s=!!r.isIntersecting&&r.intersectionRatio>=t.threshold-cz;if(s===o.inView)continue;o.inView=s;let i=s?"in":"leave",a=o.subs.slice();for(let c=0;c<a.length;c++){let l=a[c];if(!(l.kind!==i||l.dead)){l.once&&ZP(t,o,l);try{l.run(r)}catch(f){uz(f)}}}}}function uz(t){typeof globalThis.reportError=="function"?globalThis.reportError(t):queueMicrotask(()=>{throw t})}function ZP(t,e,n){if(n.dead)return;n.dead=!0;let r=e.subs.indexOf(n);r!==-1&&e.subs.splice(r,1),!e.subs.length&&(t.targets.delete(e.node),t.observer.unobserve(e.node),!t.targets.size&&(t.observer.disconnect(),t.byKey.delete(t.id)))}function JP(t,e,n,r,o){let s=zu(t,o.handler),i=o.options;if(typeof s!="function")return;let a=i&&i.threshold,c=typeof a=="number"&&a>=0&&a<=1?a:0,l=i&&typeof i.rootMargin=="string"?i.rootMargin.trim():"",f=lz(n,c,l);if(!f)return;let u=f.targets.get(e);u||(u={node:e,inView:!1,subs:[]},f.targets.set(e,u),f.observer.observe(e));let d={kind:r,once:!!(i&&i.once===!0),run:cm(t,s),dead:!1};u.subs.push(d);let p=t.__ref;p.__eventCleanup||(p.__eventCleanup=[]),p.__eventCleanup.push(()=>ZP(f,u,d))}function QP(t){if(globalThis.__SMBLS_BUILD_DROP_F_viewEvents__)return qt("viewEvents",t);let e=t.node;if(!e||e.nodeType!==1)return;let n=e.ownerDocument,r=n&&n.defaultView;if(!r||typeof r.IntersectionObserver!="function")return;let o=Sk(t.onInView);for(let i=0;i<o.length;i++)JP(t,e,n,"in",o[i]);let s=Sk(t.onLeaveView);for(let i=0;i<s.length;i++)JP(t,e,n,"leave",s[i])}Mt();Mt();function fn(t,e){let n=t&&t.context&&t.context.designSystem;if(!n)return e();mt(n);try{return e()}finally{ht()}}var ve=Xo||(t=>{let e=Ie();if(!e)return t();cl(null);try{return t()}finally{cl(e)}});M();M();var rL=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],dz=["none","forwards","backwards","both"],pz=["normal","reverse","alternate","alternate-reverse"],hz=["running","paused"],gz=/^(?: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*\))$/,mz=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=>gz.test(r.replace(/\s+/g,"")))},tL=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),yz={transform:mz,translate:tL,rotate:t=>tL(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},bz=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},_z=t=>{if(!k(t))return null;let e=null,n=-1;for(let r in t){let o=bz(r);o==null||!k(t[r])||o>=n&&(n=o,e=t[r])}return e},wz=t=>{let e=_z(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=yz[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},Sz=(t,e)=>{if(k(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return k(r)?r:null},xz=["reverse","alternate","alternate-reverse"],oL=(t,e,n)=>{let r=n||e.animationDirection;return r&&xz.includes(String(r))?"both":wz(Sz(t,e))?"backwards":"both"},kz=0,eL=new Map,xk=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{};if(k(t)){let o=JSON.stringify(t),s=eL.get(o);if(s)return s;let i=`smbls-anim-${kz++}`,a=Za(i,t);return eL.set(o,a),a}let r=n&&n[t];return k(r)?Za(t,r):t},sL=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)m?s$/i,Ez=/^(?:\d+(?:\.\d*)?|\.\d+)$/,iL=/^(?:cubic-bezier|steps|linear)\(/,vz=/^(?:calc|min|max|clamp)\(/,Az=t=>t.includes("(")||t.startsWith("--"),Cz=(t,e)=>{if(!Rn.test(t))return!1;let n=e&&e.sequence;if(!k(n))return!1;let r=t.charCodeAt(0)===45?t.slice(1):t;return!!(n[r]||r.length===2&&n[r[0]])},Tz=t=>{if(!v(t))return!1;let e=t.trim();return rL.includes(e)||iL.test(e)||e.startsWith("var(")},Oz=(t,e)=>!!e&&Tz(e[t]||e[wr(t)]),Rz=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],Pz=t=>ut(String(t)),Lz=(t,e,n)=>{let r={duration:null,delay:null,timingFunction:null,iterationCount:null,direction:null,fillMode:null,playState:null},o=null,s=[],i=[],a=(u,d)=>r[u]!=null?!1:(r[u]=d,!0),c=(u,d)=>{a(u,d)||s.push(d)};for(let u of Pz(t))e&&e[u]?o=u:sL.test(u)||Cz(u,n)?a("duration",u)||a("delay",u):rL.includes(u)||Oz(u,n)?c("timingFunction",u):iL.test(u)?a("timingFunction",u):u==="infinite"?c("iterationCount",u):Ez.test(u)?a("iterationCount",Number(u)):pz.includes(u)?c("direction",u):dz.includes(u)?c("fillMode",u):hz.includes(u)?c("playState",u):Az(u)?i.push(u):s.push(u);let l=o||s[0]||i.shift()||null,f=new Set;for(let u of i){let d=Rz.find(p=>r[p]==null);if(!d)break;r[d]=u.startsWith("--")?`var(${u})`:u,f.add(d)}return{name:l,...r,opaqueSlots:f}},Dz=(t,e)=>{let{animation:n}=e.context&&e.context.designSystem||{},{timing:r}=P()||{};return Tn(String(t)).map(o=>o.trim()).filter(Boolean).map(o=>Lz(o,n,r))},nL=(t,e)=>sL.test(t)||e&&!vz.test(t)&&!/^(?:var|env)\(/.test(t)?t:Se(t).timing||t,Iz=(t,e)=>{let n=r=>t.opaqueSlots.has(r);return{animationName:t.name==null?void 0:xk(t.name,e),animationDuration:t.duration!=null?nL(t.duration,n("duration")):Se(e.animationDuration||"A").timing,animationDelay:t.delay!=null?nL(t.delay,n("delay")):Se(e.animationDelay||"0s").timing,animationTimingFunction:t.timingFunction!=null?n("timingFunction")?t.timingFunction:Be(t.timingFunction):Be(e.animationTimingFunction||"ease"),animationFillMode:t.fillMode||e.animationFillMode||oL(t.name,e,t.direction),animationIterationCount:t.iterationCount!=null?t.iterationCount:e.animationIterationCount||1,animationPlayState:t.playState||e.animationPlayState,animationDirection:t.direction||e.animationDirection}},Mz={animationName:"none",animationPlayState:"running",animationDirection:"normal"},Nz=(t,e)=>{let n=t.map(o=>Iz(o,e));if(n.length===1)return n[0];let r={};for(let o in n[0]){let s=n.map(i=>i[o]);s.every(i=>i==null)||(r[o]=s.map(i=>i??Mz[o]).join(", "))}return r},kk={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=Dz(t,e);if(n.length)return Nz(n,e)}return{animationName:xk(t,e),animationDuration:Se(e.animationDuration||"A").timing,animationDelay:Se(e.animationDelay||"0s").timing,animationTimingFunction:Be(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||oL(t,e),animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}}},animationName:(t,e)=>({animationName:xk(t,e)}),animationDuration:t=>({animationDuration:Se(t).timing}),animationDelay:t=>({animationDelay:Se(t).timing}),animationTimingFunction:t=>({animationTimingFunction:Be(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};M();var um=(t,e,n)=>{if(typeof e=="number"&&(e=String(e)),!v(e))return;let[r,o]=ut(e);return{...j(t+"Start",r,n),...j(t+"End",o||r,n)}},Ek={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>j("height",t,e),width:(t,e)=>j("width",t,e),boxSizing:t=>Xt(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("height",e),...Nt("width",n||e)}},inlineSize:(t,e)=>j("inlineSize",t,e),blockSize:(t,e)=>j("blockSize",t,e),minWidth:(t,e)=>j("minWidth",t,e),maxWidth:(t,e)=>j("maxWidth",t,e),widthRange:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minWidth",e),...Nt("maxWidth",n||e)}},minHeight:(t,e)=>j("minHeight",t,e),maxHeight:(t,e)=>j("maxHeight",t,e),heightRange:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minHeight",e),...Nt("maxHeight",n||e)}},size:t=>{if(!v(t))return;let[e,n]=ut(t);return{...j("inlineSize",e),...j("blockSize",n||e)}},minBlockSize:(t,e)=>j("minBlockSize",t,e),minInlineSize:(t,e)=>j("minInlineSize",t,e),maxBlockSize:(t,e)=>j("maxBlockSize",t,e),maxInlineSize:(t,e)=>j("maxInlineSize",t,e),minSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("minInlineSize",e),...Nt("minBlockSize",n||e)}},maxSize:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("maxInlineSize",e),...Nt("maxBlockSize",n||e)}},borderWidth:(t,e)=>j("borderWidth",t,e),borderTopWidth:(t,e)=>j("borderTopWidth",t,e),borderRightWidth:(t,e)=>j("borderRightWidth",t,e),borderBottomWidth:(t,e)=>j("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>j("borderLeftWidth",t,e),textDecorationThickness:(t,e)=>j("textDecorationThickness",t,e),textUnderlineOffset:(t,e)=>j("textUnderlineOffset",t,e),padding:(t,e)=>j("padding",t,e),paddingInline:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("paddingInlineStart",e),...Nt("paddingInlineEnd",n||e)}},paddingBlock:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("paddingBlockStart",e),...Nt("paddingBlockEnd",n||e)}},paddingTop:(t,e)=>j("paddingBlockStart",t,e),paddingBottom:(t,e)=>j("paddingBlockEnd",t,e),paddingLeft:(t,e)=>j("paddingInlineStart",t,e),paddingRight:(t,e)=>j("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>j("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>j("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>j("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>j("paddingInlineEnd",t,e),margin:(t,e)=>j("margin",t,e),marginInline:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("marginInlineStart",e),...Nt("marginInlineEnd",n||e)}},marginBlock:t=>{if(!v(t))return;let[e,n]=ut(t);return{...Nt("marginBlockStart",e),...Nt("marginBlockEnd",n||e)}},marginTop:(t,e)=>j("marginBlockStart",t,e),marginBottom:(t,e)=>j("marginBlockEnd",t,e),marginLeft:(t,e)=>j("marginInlineStart",t,e),marginRight:(t,e)=>j("marginInlineEnd",t,e),marginInlineStart:(t,e)=>j("marginInlineStart",t,e),marginInlineEnd:(t,e)=>j("marginInlineEnd",t,e),marginBlockStart:(t,e)=>j("marginBlockStart",t,e),marginBlockEnd:(t,e)=>j("marginBlockEnd",t,e),scrollMargin:(t,e)=>j("scrollMargin",t,e),scrollMarginTop:(t,e)=>j("scrollMarginTop",t,e),scrollMarginRight:(t,e)=>j("scrollMarginRight",t,e),scrollMarginBottom:(t,e)=>j("scrollMarginBottom",t,e),scrollMarginLeft:(t,e)=>j("scrollMarginLeft",t,e),scrollMarginBlock:(t,e)=>um("scrollMarginBlock",t,e),scrollMarginInline:(t,e)=>um("scrollMarginInline",t,e),scrollMarginBlockStart:(t,e)=>j("scrollMarginBlockStart",t,e),scrollMarginBlockEnd:(t,e)=>j("scrollMarginBlockEnd",t,e),scrollMarginInlineStart:(t,e)=>j("scrollMarginInlineStart",t,e),scrollMarginInlineEnd:(t,e)=>j("scrollMarginInlineEnd",t,e),scrollPadding:(t,e)=>j("scrollPadding",t,e),scrollPaddingTop:(t,e)=>j("scrollPaddingTop",t,e),scrollPaddingRight:(t,e)=>j("scrollPaddingRight",t,e),scrollPaddingBottom:(t,e)=>j("scrollPaddingBottom",t,e),scrollPaddingLeft:(t,e)=>j("scrollPaddingLeft",t,e),scrollPaddingBlock:(t,e)=>um("scrollPaddingBlock",t,e),scrollPaddingInline:(t,e)=>um("scrollPaddingInline",t,e),scrollPaddingBlockStart:(t,e)=>j("scrollPaddingBlockStart",t,e),scrollPaddingBlockEnd:(t,e)=>j("scrollPaddingBlockEnd",t,e),scrollPaddingInlineStart:(t,e)=>j("scrollPaddingInlineStart",t,e),scrollPaddingInlineEnd:(t,e)=>j("scrollPaddingInlineEnd",t,e),gap:t=>({gap:Bg(t)}),columnGap:(t,e)=>Fe(e,"columnGap",t),rowGap:(t,e)=>Fe(e,"rowGap",t),flexWrap:t=>{if(t!=null)return{display:"flex",flexWrap:t}},flexFlow:(t,e)=>{let n=e.reverse;if(!v(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(!v(t))return;let[e,n]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:n}},round:(t,e)=>Rr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Rr(t??e.round,e,"borderRadius"),borderTopLeftRadius:(t,e)=>Rr(t,e,"borderTopLeftRadius","borderTopLeftRadius"),borderTopRightRadius:(t,e)=>Rr(t,e,"borderTopRightRadius","borderTopRightRadius"),borderBottomLeftRadius:(t,e)=>Rr(t,e,"borderBottomLeftRadius","borderBottomLeftRadius"),borderBottomRightRadius:(t,e)=>Rr(t,e,"borderBottomRightRadius","borderBottomRightRadius"),backgroundSize:(t,e)=>({backgroundSize:Ws(t,"backgroundSize",Ou,e)}),backgroundPosition:(t,e)=>({backgroundPosition:Ws(t,"backgroundPosition",Ru,e)}),maskSize:(t,e)=>({maskSize:Ws(t,"maskSize",Ou,e)}),maskPosition:(t,e)=>({maskPosition:Ws(t,"maskPosition",Ru,e)})};var vk={fontSize:t=>Su(t)||t,fontFamily:t=>({fontFamily:_u(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 Ak={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 Ck={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:ut(t).map(n=>Vt(n,"k").k).join(" ")}},left:t=>Vt(t,"left"),top:t=>Vt(t,"top"),right:t=>Vt(t,"right"),bottom:t=>Vt(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=ut(t).map(n=>Vt(n,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=ut(t).map(n=>Vt(n,"k").k);return{left:e[0],right:e[1]||e[0]}}};M();var dm=0,pm=()=>{dm++},hm=()=>{dm>0&&dm--},fe=({context:t,state:e})=>{let n=t?.designSystem,r=e?.root?.globalTheme||n?.globalTheme;return r&&r!=="auto"?r:dm>0?null:n&&n.resolvedTheme||null},ue=(t,e)=>{if(e==null||e==="")return;if(!k(e))return{[t]:e};let n={},r=!1;for(let o in e){let s=e[o];if(!(s==null||s==="")){if(k(s)){let i=ue(t,s);i&&(n[o]=i,r=!0);continue}n[o]={[t]:s},r=!0}}return r?n:void 0},aL=t=>{let e={};for(let n in t){let r=t[n];e[n]=k(r)?aL(r):v(r)?r+" !important":r}return e},Ys=t=>(e,n)=>{let r=n&&v(e)&&!P().useVariable,o=Mg(e,r?fe(n):null);return k(o)?ue(t,o):{[t]:o}},Tk={theme:(t,e)=>{if(t)return e.themeModifier?sn(t,`@${e.themeModifier}`):sn(t)},color:(t,e)=>{let n=fe(e);if(t)return ue("color",Kt(t,n))},background:(t,e)=>{let n=fe(e);if(t)return v(t)&&t.includes("gradient")&&t.includes("(")?{background:ko(t,n)}:ue("background",Kt(t,n))},backgroundColor:(t,e)=>{let n=fe(e);if(t)return ue("backgroundColor",Kt(t,n))},backgroundImage:(t,e,n,r)=>{let o=fe(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 ue("backgroundImage",Fg(t,o))},textStroke:t=>{let e=Ng(t);if(e!=null)return{WebkitTextStroke:e}},outline:Ys("outline"),outlineWidth:(t,e)=>j("outlineWidth",t,e),outlineColor:(t,e)=>{let n=fe(e);if(t)return ue("outlineColor",Kt(t,n))},outlineOffset:(t,e)=>j("outlineOffset",t,e),border:Ys("border"),borderColor:(t,e)=>{let n=fe(e);if(t)return ue("borderColor",Kt(t,n))},borderTopColor:(t,e)=>{let n=fe(e);if(t)return ue("borderTopColor",Kt(t,n))},borderBottomColor:(t,e)=>{let n=fe(e);if(t)return ue("borderBottomColor",Kt(t,n))},borderLeftColor:(t,e)=>{let n=fe(e);if(t)return ue("borderLeftColor",Kt(t,n))},borderRightColor:(t,e)=>{let n=fe(e);if(t)return ue("borderRightColor",Kt(t,n))},borderLeft:Ys("borderLeft"),borderTop:Ys("borderTop"),borderRight:Ys("borderRight"),borderBottom:Ys("borderBottom"),shadow:(t,e)=>{let n=fe(e);if(t)return ue("boxShadow",$g(t,n))},boxShadow:(t,e)=>{if(!v(t))return;let[n,r]=t.split("!importan"),o=fe(e),s=r?" !important":"",i=Tu(n.trim(),o);return v(i)?{boxShadow:i+s}:ue("boxShadow",s?aL(i):i)},textShadow:(t,e)=>ue("textShadow",Tu(t,e?fe(e):null)),columnRule:Ys("columnRule")};var Wu={transition:t=>{let e=Ug(t);if(e!=null)return{transition:e}},transitionDuration:t=>({transitionDuration:Pu(t)}),transitionDelay:t=>({transitionDelay:Pu(t)}),transitionTimingFunction:t=>({transitionTimingFunction:Be(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};M();var Ok={flow:(t,e)=>{let n=e.reverse;if(!v(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(!v(t))return;let[n,r]=t.split(" ");return{display:"flex",alignItems:n,justifyContent:r}}};M();var $z=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,cL=t=>{if(!v(t))return t;let e=P().sizes;return e?t.replace($z,(n,r,o)=>{let s=e[o];return s==null?n:r+String(s)}):t},Zn=t=>cL(jg(t)),Rk={gridTemplateColumns:t=>({gridTemplateColumns:Zn(t)}),gridTemplateRows:t=>({gridTemplateRows:Zn(t)}),gridAutoColumns:t=>({gridAutoColumns:Zn(t)}),gridAutoRows:t=>({gridAutoRows:Zn(t)}),area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:Zn(t)}),templateColumns:t=>({gridTemplateColumns:Zn(t)}),autoColumns:t=>({gridAutoColumns:Zn(t)}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:Zn(t)}),templateRows:t=>({gridTemplateRows:Zn(t)}),autoRows:t=>({gridAutoRows:Zn(t)}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var lL="breakpoints",Fz=new Set(["window","media"]),fL=/^-?[A-Za-z_][\w-]*$/,uL=new Set(["none","and","or","not","initial","inherit","unset","revert","revert-layer","default"]),Bz=t=>{let e=t&&t.containerName;if(typeof e!="string")return null;let n=e.trim().split(/\s+/)[0];return n&&fL.test(n)&&!uL.has(n)?n:null},gm=(t,e)=>{if(typeof t=="function")try{t=t(e,e&&e.state,e&&e.context)}catch{return null}if(typeof t!="string")return null;let n=t.trim();return!n||Fz.has(n)?null:n==="container"?Bz(e)||lL:fL.test(n)&&!uL.has(n)?n:null},jz=/^@media\s+/i,Uz=/^(?:only\s+)?(?:screen|all)\s+and\s+/i,Vz=/(?:^|[^\w-])(?:(?:min|max)-)?(?:width|inline-size)(?![\w-])/i,zz=/height|block-size|aspect-ratio|orientation|device-|resolution/i,Pk=t=>{if(typeof t!="string")return null;let e=t.trim().replace(jz,"").replace(Uz,"").trim();if(!e||e.indexOf(",")!==-1)return null;let n=e.split(/\s+(?:and|or)\s+/i);for(let r of n){let o=r.trim();if(o.charCodeAt(0)!==40||o.charCodeAt(o.length-1)!==41)return null;let s=o.slice(1,-1);if(s.indexOf("(")!==-1||s.indexOf(")")!==-1||!Vz.test(s)||zz.test(s))return null}return e},Lk={breakpointsFrom:(t,e)=>{let n=gm(t,e);if(!n)return;let r={},o=e&&e.container!=null;return!o&&(!e||e.containerType==null)&&(r.containerType="inline-size"),!o&&(!e||e.containerName==null)&&(r.containerName=n),r}};var xt={...kk,...Ek,...vk,...Ak,...Ck,...Tk,...Wu,...Ok,...Rk,...Lk};var Bt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","anchorName","anchorScope","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","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","counterIncrement","counterReset","cursor","direction","display","emptyCells","fieldSizing","fill","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","positionAnchor","positionArea","positionTry","positionTryFallbacks","positionTryOrder","positionVisibility","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","stroke","tabSize","tableLayout","textAlign","textAlignLast","textBox","textBoxEdge","textBoxTrim","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","viewTransitionClass","viewTransitionName","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);M();var Hz=/^[a-z][0-9]?$/,dL=/var\(\s*(--[A-Za-z0-9-]+)/g,Wz=t=>{let e=new Set,n=new Set;if(!t||typeof t!="object")return{knownLetters:e,knownVars:n};for(let r in t){let o=t[r];if(!(!o||typeof o!="object")){if(o.sequence&&typeof o.sequence=="object")for(let s in o.sequence)e.add(s);if(o.vars&&typeof o.vars=="object")for(let s in o.vars)n.add(s)}}return{knownLetters:e,knownVars:n}},Kz=Object.prototype.propertyIsEnumerable,pL=(t,e)=>{if(!t||typeof t!="object")return!1;for(let n in t){let r=t[n];if(!r||typeof r!="object")continue;let o=r.sequence;if(o&&typeof o=="object"&&Kz.call(o,e))return!0}return!1},Dk=/[(),\s]+/,Ik=(t,e)=>{let n=null,r=t.split(Dk);for(let o=0;o<r.length;o++){let s=r[o];s&&e(s)&&(n||(n=[])).push(s)}return n},Mk=(t,e)=>Rn.test(t)&&e(t.charCodeAt(0)===45?t.slice(1):t),qz=(t,e)=>{if(!e.size)return[];let n=o=>e.has(o),r=Ik(t,o=>Mk(o,n));return r?[...new Set(r)]:[]},Gz=(t,e)=>{if(!e.size)return[];let n=[];dL.lastIndex=0;let r;for(;r=dL.exec(t);){let o=r[1];if(e.has(o))continue;let s=o.lastIndexOf("-");if(s===-1)continue;let i=o.slice(s+1);if(!Hz.test(i))continue;let a=o.slice(0,s+1)+i.toUpperCase();a!==o&&e.has(a)&&n.push({varName:o,corrected:a})}return n},mm=new Set,hL=(t,e,n)=>{if(!tt()||!v(e)||!e)return;let r;try{r=P()}catch{return}let{knownLetters:o,knownVars:s}=Wz(r);if(!o.size&&!s.size)return;let i=qz(e,o),a=Gz(e,s);if(!i.length&&!a.length)return;let c=n?.__ref?.path?n.__ref.path.join("."):n?.key||"?";for(let l of i){let f=`${c}::${t}::bare::${l}::${e}`;mm.has(f)||(mm.add(f),console.warn(`[smbls/css-in-props] "${t}" on <${c}> looks like it contains an un-wrapped design-system token ("${l}") \u2014 "${t}" has no registered resolver, so its value is forwarded to the browser untouched. A bare letter token there is invalid CSS, so the browser drops the ENTIRE "${t}" declaration (not just this argument). Wrap it in var(--<family>-${l.replace("-","")}) (or calc(-1 * var(--<family>-${l.replace("-","")})) for a negative). Value: "${e}"`))}for(let{varName:l,corrected:f}of a){let u=`${c}::${t}::case::${l}::${e}`;mm.has(u)||(mm.add(u),console.warn(`[smbls/css-in-props] "${t}" on <${c}> references ${l}, which the active design system never emits. CSS custom-property names are case-sensitive \u2014 the real variable is ${f}, so this reference silently never resolves. Value: "${e}"`))}};M();var Yz=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,Xz=(t,e,n)=>{let{context:r}=n;if(!r.designSystem?.media)return;let o=t.slice(1),s=r.designSystem.media[o],i=Ms(s||t)?Is(()=>ee(e,n)):ee(e,n);if(!s)return{[t]:i};if(/^@(media|supports|container)\b/.test(s))return{[s]:i};if(s==="print")return{"@media print":i};if(s[0]==="(")return{[`@media screen and ${s}`]:i};let a=s.match(Yz),c=a?a[1]||a[2]:o,l={[`${s} &`]:i};if(c==="dark"||c==="light"){let f=r.designSystem?.scopeSelector||":root",u=f===":root"?":root:not([data-theme])":`${f}:not([data-theme])`;l[`@media (prefers-color-scheme: ${c})`]={[`${u} &`]:i}}return l},gL=(t,e,n)=>({[t]:ee(e,n)}),Ku=(t,e,n)=>{let r=`&${t}`,o=ee(e,n);if(t.includes(",")&&o){let s={},i={};for(let a in o)typeof o[a]=="object"&&o[a]!==null?i[a]=o[a]:s[a]=o[a];if(Object.keys(i).length){let a=r.split(",").map(l=>l.trim()),c={};Object.keys(s).length&&(c[r]=s);for(let l in i){let f=a.map(u=>`${u} ${l}`).join(", ");c[f]=i[l]}return c}}return{[r]:o}},Nk=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return L(n)?n.call(e,e):!!n},Jz=(t,e,n)=>{let r=t.slice(1),o=Nk(r,n);if(o===void 0&&(o=!!n[r]),!!o)return ee(e,n)},Zz=(t,e,n)=>({[t]:e}),Qz=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Nk(r,n);s!==void 0&&(o=s)}if(o)return ee(e,n)},tH=(t,e,n)=>{let r=t.slice(1),o=n[r]===!0||n.state?.[r];if(!o)if(typeof n[r]=="function")try{o=n[r](n,n.state,n.context)}catch{}else{let s=Nk(r,n);s!==void 0&&(o=s)}if(!o)return ee(e,n)},$k=(t,e)=>ee(t,e),Fk={"@":Xz,":":Ku,"[":Ku,"*":Ku,"+":Ku,"~":Ku,"&":gL,">":gL,$:Jz,"-":Zz,".":Qz,"!":tH};var ym=no(),mL=(t,e,n)=>{let r=e?.context?.designSystem;r&&mt(r);try{let o={},s={},i=(a,c)=>{if(n.unpack){o={...o,...c};return}o[a]=c};for(let a in t){let c=t[a];if(c!==null)if(a==="class"&&v(c)){let l=yL(c,e);l&&(n.unpack?Lt(o,l):o.designSystemClass=l)}else if(a==="true"){let l=St(c,e);Lt(o,$k(l,e))}else if(e.classlist?.[a]){let l=e.classlist[a],f=L(l)?l(e,e.state,e.context):l;f&&i(a,f),!ym&&k(o[a])&&(o[a].label=a)}else if(xt[a]){let l=St(c,e);if(l===null)continue;I(l)&&(l=l.reduce((u,d)=>Lt(u,d),{}));let f=xt[a](l,e,e.state,e.context);I(f)&&(f=f.reduce((u,d)=>Lt(u,d),{})),f&&i(a,f),!ym&&k(o[a])&&(o[a].label=a)}else if(Bt.has(a)){let l=St(c,e);if(l===null)continue;typeof l=="string"&&l.charCodeAt(0)===45&&l.charCodeAt(1)===45&&(l=`var(${l})`),ym||hL(a,l,e),i(a,{[a]:l}),!ym&&k(o[a])&&(o[a].label=a)}else s[a]=c}return[o,s]}finally{r&&ht()}},yL=(t,e)=>{if(!v(t))return;let n=e?.context?.designSystem?.class;if(!n)return;let r;for(let o of t.split(" ")){if(!o)continue;let s=n[o];if(!k(s))continue;let i=pt(s);r=r?ie(r,i):i}if(r)return ee(r,e)},bL=(t,e)=>{let n={};for(let r in t){let o=Fk[r.slice(0,1)];if(o){let s=o(r,t[r],e);if(s)for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]&&typeof n[i]=="object"&&typeof s[i]=="object"?ie(n[i],s[i]):n[i]=s[i])}}return n},ee=(t,e,n={unpack:!0})=>{let[r,o]=mL(t,e,n),s=bL(o,e),i=!1;for(let a in s){i=!0;break}if(i){if(n.unpack)return Rl(r,s);r._selectors=s}return r},eH=(t,e)=>{let n={};if(t.class)for(let r in t.class)n[r]=t.class[r](e);return n};M();var _L=t=>{if(k(t))return ee(t,t)},nH=(t,e)=>{let n=_L(t);return typeof e=="function"?e(n):Ue(n)};M();var wL=/\s*!important\s*$/,rH=()=>{let t;try{t=P()}catch{t=null}let e=t&&t.sizes&&typeof t.sizes=="object"?t.sizes:null,n=null,r=s=>{n||(n=new Map);let i=n.get(s);return i===void 0&&(i=pL(t,s),n.set(s,i)),i},o=s=>Ma(e,s)!==void 0;return{isToken:s=>s.charCodeAt(0)!==35&&(Mk(s,r)||o(s))}},oH=(t,e)=>{let n=String(t).split(Dk);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},sH=(t,e)=>{let n=typeof globalThis<"u"?globalThis.CSS:void 0;if(!n||typeof n.supports!="function")return!1;try{return n.supports(Ee(t),e)}catch{return!1}},SL=new Set,iH=(t,e,n)=>{if(!tt())return;let r=t?.__ref?.path?t.__ref.path.join("."):t?.key||"?",o=r+"::"+e+"::"+n;SL.has(o)||(SL.add(o),console.warn(`[smbls/css-in-props] style.${e} on <${r}> holds a design-system token the "${e}" transformer could not resolve to one inline value, so it is written as is and the browser drops it. Move the key out of \`style\` to the element itself, or write the resolved CSS. Value: "${n}"`))},aH=(t,e)=>{if(!t||typeof t!="object")return!1;let n=!1;for(let r in t){let o=t[r];if(o!=null){if(typeof o=="object"||typeof o=="function")return!1;for(let s of e)if(oH(o,s))return!1;n=!0}}return n},cH=(t,e,n,r)=>{if(!v(e)||!e||t.charCodeAt(0)===45&&t.charCodeAt(1)===45)return null;let o=xt[t];if(!o||!Bt.has(t))return null;let s=wL.test(e),i=s?e.replace(wL,""):e,a=Ik(i,r.isToken);if(!a||sH(t,i))return null;let c;try{c=o(i,n,n?.state,n?.context)}catch{c=null}if(Array.isArray(c)){let f={};for(let u of c)u&&typeof u=="object"&&Object.assign(f,u);c=f}if(!aH(c,a))return iH(n,t,e),null;let l={};for(let f in c){let u=c[f];u!=null&&(l[f]=s?String(u)+" !important":u)}return l},xL=(t,e,n)=>{let r={},o=!1;for(let s in t){let i=t[s];if(s.charCodeAt(0)===38&&i&&typeof i=="object"&&!Array.isArray(i)){let c=xL(i,e,n);c!==i&&(o=!0),r[s]=c;continue}let a=cH(s,i,e,n);a?(o=!0,Object.assign(r,a)):r[s]=i}return o?r:t},Bk=(t,e)=>!t||typeof t!="object"||Array.isArray(t)?t:xL(t,e,rH());if(!vt||!an)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");var bm=vt,Ao=an,_m=qa||(()=>!1),kL=Iu||_m,EL=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Mr=Ee||(t=>EL(t)?t:t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),qu=Fu||(t=>EL(t)?t:t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase()));function AL(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 rc(t,e,n){let r=AL(e);if(!r.length)return;let s=(t.context||n?.context||{}).components||{};for(let i=0;i<r.length;i++){let a=CL(r[i],s);a&&a!==e&&TL(t,a,n,new Set([e]))}}function CL(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 TL(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let o=AL(e);if(o.length){let a=(t.context||n?.context||{}).components||{};for(let c=0;c<o.length;c++){let l=CL(o[c],a);l&&TL(t,l,n,r)}}let s=Uk(t);for(let i in e){if(i==="extends"||i==="extend")continue;let a=e[i];s&&s.mark(i);let c=ct.chains;c!==null&&c(t,i,t[i],a)||(t[i]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?t[i]={...a}:t[i]=a:typeof t[i]=="object"&&typeof a=="object"&&!Array.isArray(t[i])&&!Array.isArray(a)&&t[i]!==null&&a!==null?t[i]=Ve(t[i],a):t[i]=a)}}var jk=class{constructor(){this.rank=0,this.ranks=null}mark(e){lH(e)&&(this.ranks||(this.ranks=new Map),this.ranks.set(e,this.rank))}get(e){return this.ranks?this.ranks.get(e):void 0}get size(){return this.ranks?this.ranks.size:0}},wm=new Set;for(let t of[Ao,bm])for(let e in t)wm.add(e),wm.add(qu(e));var vL=new Map;function lH(t){let e=t.charCodeAt(0);if(e>=65&&e<=90||e>=48&&e<=57)return!1;let n=vL.get(t);return n===void 0&&(n=!!xt[t]||wm.has(t)||t.indexOf("-")>=0&&!(t.charCodeAt(0)===45&&t.charCodeAt(1)===45)&&wm.has(Mr(t)),vL.set(t,n)),n}function Uk(t){let e=t&&t.__ref;if(!e)return null;let n=e.__mergeLayer;return n||(n=e.__mergeLayer=new jk),n.rank++,n}function OL(t){let e=t&&t.__ref&&t.__ref.__mergeLayer;if(!e||!e.ranks)return;let n;for(let r of e.ranks.values())if(n===void 0)n=r;else if(r!==n)return;e.ranks=null}function Ve(t,e){let n={...t},r=ct.chains;for(let o in e){let s=n[o],i=e[o];r!==null&&r(n,o,s,i)||(s&&i&&typeof s=="object"&&typeof i=="object"&&!Array.isArray(s)&&!Array.isArray(i)&&typeof s!="function"&&typeof i!="function"?n[o]=Ve(s,i):n[o]=i)}return n}Mt();Mt();Mt();var Xs="http://www.w3.org/2000/svg",ic=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"]),fH=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 oc(t){return fH.has(t)||ic.has(t)}function Nr(t){return ic.has(t)}function Qn(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"&&oc(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]),oc(o)&&!r.has(o)?o:"div"}var RL={};function sc(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(Nr(t)){let r=e?.parent;if(t==="svg"||r?.node?.namespaceURI===Xs)return n.createElementNS(Xs,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function Co(t){let e=t.tag=Qn(t),r=Nr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Xs)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=RL[r];if(s||(s=RL[r]=sc(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?sc(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}function Gu(t,e){return e&&e.parentNode===t?e.nextSibling:t.firstChild}Mt();ea();var PL=new WeakMap,LL=null,DL=null;function uH(t,e){let n=t===LL?DL:PL.get(t);(!n||n.length!==t.length)&&(n={length:t.length,hooks:new Map},PL.set(t,n)),LL=t,DL=n;let r=n.hooks.get(e);if(r===void 0){r=!1;for(let o of t)if(typeof o[e]=="function"){r=!0;break}n.hooks.set(e,r)}return r}function Vk(t,e){let n=t&&t.context&&t.context.plugins;return!!(n&&n.length&&uH(n,e))}function tr(t,e,...n){return Vk(e,t)?oo(t,e,...n):!1}function un(t,e,n){tr("error",t,{hook:e,error:n})||console.error(`[DOMQL] Lifecycle "${e}" error:`,n)}var dH=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function ML(t,e,n){return ve(()=>fn(t,()=>e.call(t,n,t,t.state,t.context)))}function pH(t,e){if(!tt())return;let n=e.__children&&e.__children.length>0;!n&&t.html==null||console.warn(`[smbls] bridge host "${e.path.join(".")}" renders DOMQL ${n?"children":"html"} inside the node it hands to its library \u2014 the library owns that subtree and may replace them. Keep DOMQL children beside the host, not in it.`)}function NL(t){let e=t.__ref,n=t.node;if(!e||!n||e.__bridge||typeof t.onBridgeMount!="function")return;if(globalThis.__SMBLS_BUILD_DROP_F_bridge__)return qt("bridge",t);if(!("scrollHeight"in n))return;let r=e.__bridge={settled:!1,failed:!1,disposed:!1,destroyed:!1,instance:void 0,effect:null};e.contentManaged=!0,pH(t,e);let o;try{o=ML(t,t.onBridgeMount,n)}catch(s){if(r.failed=!0,un(t,"onBridgeMount",s),t.context?.strictMode)throw s;return}if(o&&typeof o.then=="function"){o.then(s=>IL(t,r,s),s=>{r.failed=!0,un(t,"onBridgeMount",s)});return}IL(t,r,o)}function IL(t,e,n){if(e.settled=!0,e.instance=n,e.disposed){FL(t,e);return}if(Object.defineProperty(t,"bridge",{value:n,writable:!0,configurable:!0,enumerable:!1}),typeof t.onBridgeUpdate!="function")return;let r=t.__ref;e.effect=K(()=>{e.disposed||fn(t,()=>{try{let o=t.onBridgeUpdate.call(t,e.instance,t,t.state,t.context);o&&typeof o.then=="function"&&o.catch(s=>un(t,"onBridgeUpdate",s))}catch(o){un(t,"onBridgeUpdate",o)}})},{depth:r.path.length,label:()=>r.path.join(".")+"::onBridgeUpdate"}),r.__effects.push(e.effect)}function $L(t){if(globalThis.__SMBLS_BUILD_DROP_F_bridge__)return;let e=t.__ref?.__bridge;!e||e.disposed||(e.disposed=!0,e.effect&&e.effect.dispose(),e.settled&&FL(t,e))}function FL(t,e){if(e.destroyed)return;e.destroyed=!0;let n=e.instance;if(e.instance=void 0,dH(t,"bridge")&&(t.bridge=void 0),typeof t.onBridgeDestroy=="function")try{let r=ML(t,t.onBridgeDestroy,n);r&&typeof r.then=="function"&&r.catch(o=>un(t,"onBridgeDestroy",o))}catch(r){un(t,"onBridgeDestroy",r)}}function ac(t){return t.__mount||(t.__mount={pending:0,tail:null,holder:null,waiters:null,chunkGen:0,attachLater:!1,held:!1})}function Yu(t){let e=t.__mount;return e?e.pending:0}Mt();function cc(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"&&Sm(r))try{let a=n.onBeforeUpdate(n,n.state,n.context,e);if(a&&typeof a.then=="function")a.then(()=>er(r,!1),c=>{er(r,!0),tr("error",n,{hook:"onBeforeUpdate",error:c})||console.error("[DOMQL] onBeforeUpdate error:",c)});else if(er(r,!1),a===!1)return n}catch(a){throw er(r,!0),a}let o=!t||Object.keys(t).length===0,s=[],i=!1;Ap(()=>{if(t.state&&Et(n.state)&&n.state.$update(t.state),t.text!==void 0&&(n.text=t.text,!r.__exec.text&&n.node&&Js(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){let a=Qs(n,t.style);for(let c in a){let l=a[c];if(l==null)continue;let f=Mr(c),u=String(l).replace(/\s*!important\s*$/,"");n.node.style.setProperty(f,u,"important")}}n.style||(n.style={}),Object.assign(n.style,t.style)}if(t.attr&&n.node?.setAttribute){for(let a in t.attr){let c=t.attr[a];Zs(n.node,a,c)}n.attr||(n.attr={}),Object.assign(n.attr,t.attr)}if(t.data&&n.node?.dataset){for(let a in t.data)n.node.dataset[a]=t.data[a];n.data||(n.data={}),Object.assign(n.data,t.data)}if(t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)){let a=n.vars&&typeof n.vars=="object"&&!Array.isArray(n.vars)?n.vars:null;n.vars={...a,...t.vars},i=!0}for(let a in t){if(Gt.has(a)||a==="state")continue;let c=t[a],l=n[a];if(l&&l.__ref&&typeof l.update=="function")l.update(c,e);else if(typeof c=="object"&&c!==null){let f=a.charCodeAt(0);f>=65&&f<=90&&Yt(c,n,a,e)}else a!=="text"&&a!=="html"&&a!=="style"&&a!=="attr"&&a!=="data"&&(n[a]=c,typeof c!="function"&&s.push(a))}});for(let a=0;a<s.length;a++)Wk(n,s[a]);if(n.node){let a=i;for(let c=0;!a&&c<s.length;c++)zk(s[c])&&(a=!0);a&&Hk(n)}if(n.node&&o&&r.__effects&&r.__effects.length)for(let a=0;a<r.__effects.length;a++){let c=r.__effects[a];c&&!c._disposed&&!c._isSubscribeToEffect&&typeof c._execute=="function"&&c._execute()}else if(n.node&&r.__conditionalRunners)for(let a of r.__conditionalRunners)a();return tr("update",n),!e.preventListeners&&typeof n.onUpdate=="function"&&n.onUpdate(n,n.state,n.context,e),n}Mt();function dn(t){if(!t)return;let e=t.__ref;if(!e)return;if(e.__onConnected&&BP(t),Ie())return ve(()=>dn(t));e.__disposed=!0;let n=e.__if===!1&&!e.__ifInitialized;if(!n)try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(o){console.error("[smbls] onBeforeRemove error:",o)}if(e.__bridge&&$L(t),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)}}if(e.__ifParked&&e.__ifParked.size){let o=[...e.__ifParked];e.__ifParked.clear();for(let s=0;s<o.length;s++){let i=t[o[s]];i&&i.__ref&&i.parent===t&&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),t.parent.__ref.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),delete t.parent[t.key]}if(!n)try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(o){console.error("[smbls] onRemove error:",o)}e.__mount&&e.__mount.tail&&ct.mount.abandon(t,e),t.node=null,t.parent=null,t.__ref=null}function lc(){dn(this)}M();M();function Gk(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 BL=new Set;function jL(t,e,n){let r=String(e);if(BL.has(r))return;BL.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.`;Gk(t,"error",[a]),console.error(a)}var VL=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),hH=new Set,zL=t=>VL(Kk,t)&&!(Yi||hH).has(t),UL=new Set;function HL(t,e){UL.has(t)||(UL.add(t),tt()&&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 gH(...t){return Gk(this,"warn",t),mf.apply(this,t)}function mH(...t){return Gk(this,"error",t),gs.apply(this,t)}var Kk={update:cc,remove:lc,getDB:wf,getQuery:Sf,getRootData:pf,getPath:lf,nextElement:yf,previousElement:bf,verbose:pa,warn:gH,error:mH,variables:_f,spotByPath:cf,set(t,e,n){let r=this.__ref;if(r){if(r.__setLocked){r.__setQueued={content:t,options:e};return}r.__setLocked=!0}let o;try{if(this.removeContent(),t!=null){let s=this.context?.__create;s&&(o=s(t,this,"content",e,n))}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(r){r.__setLocked=!1;let s=r.__setQueued;s&&(r.__setQueued=null,this.set(s.content,s.options))}}return o},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},whenConnected(t){return vo(this,t)},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:df,getRootState:uf,getRootContext:hf,getContext:gf,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=zL(t);r&&n?.methods?.[t]&&n.methods[t]!==this[t]&&HL(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=os;if(!s||!s(o))return o.call(this,...e);tt()&&jL(this,t,Me(o));return}tt()&&jL(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)}},qk=new WeakMap;function yH(t){if(!t)return Kk;let e=qk.get(t);if(e)return e;e=Object.create(Kk);let n=t.methods;if(n)for(let r in n)e[r]=n[r];return qk.set(t,e),e}function fc(t){let e=yH(t.context);Object.setPrototypeOf(t,e)}function uc(t){if(!t)return!1;let e=qk.get(t);if(!e)return!1;let n=t.methods;if(!n)return!1;for(let r in n){if(zL(r)&&!VL(e,r)){HL(r,"refreshContextProto");continue}e[r]=n[r]}return!0}M();M();var Qk={};F(Qk,{STATE_METHODS:()=>WL,applyInitialState:()=>xm,applyStateMethods:()=>Ae,callStateMethod:()=>Ju,createState:()=>Xk,isTracking:()=>Zk,useHostState:()=>Jk});Mt();Mt();var WL=new Set(["update","parse","clean","destroy","create","add","toggle","remove","set","replace","setByPath","setPathCollection","removeByPath","removePathCollection","getByPath","reset","apply","applyReplace","applyFunction","quietUpdate","quietReplace","rootUpdate","parentUpdate","keys","values","__element","__children","parent","root"]),Xu=(t,e,n)=>{Object.defineProperty(t,e,{value:n,enumerable:!1,configurable:!0,writable:!0})},Pn=(t,e,n,{onlyIfAbsent:r}={})=>{Xu(t,"$"+e,n),!(r&&Object.prototype.hasOwnProperty.call(t,e))&&Xu(t,e,n)},Ju=(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)},Ae=(t,e)=>{if(Et(e)){let o=e.__raw||e;Pn(o,"toggle",function(s,i={}){e[s]=!e[s]},{onlyIfAbsent:!0}),Pn(o,"set",function(s,i={}){let a=e.__element;return typeof s=="object"&&s!==null&&a&&typeof a.onBeforeStateUpdate=="function"&&!i.preventBeforeStateUpdateListener&&a.onBeforeStateUpdate(a,e,a.context,{changes:s,options:i})===!1||(e.$clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.$update(s,{...i,preventBeforeStateUpdateListener:!0})),e},{onlyIfAbsent:!0}),Pn(o,"setByPath",function(s,i,a={}){let c=s.split("."),l=e;for(let f=0;f<c.length-1;f++)l[c[f]]===void 0&&(l[c[f]]={}),l=l[c[f]];return l[c[c.length-1]]=i,e}),Pn(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}),Pn(o,"removeByPath",function(s,i={}){let a=s.split("."),c=e;for(let l=0;l<a.length-1;l++){if(c==null)return e;c=c[a[l]]}return c&&delete c[a[a.length-1]],e}),Pn(o,"reset",function(s={}){let i=e.$parse();return e.$set(i,s)}),Pn(o,"apply",function(s,i={}){if(typeof s=="function"){let a=s(e);return e.$update(a,i)}}),Pn(o,"applyFunction",function(s,i={}){if(typeof s=="function")return s(e),e.$update(e.$parse(),i)}),Pn(o,"rootUpdate",function(s,i={}){let a=e;for(;a?.parent&&Et(a.parent);)a=a.parent;return Ju(a,"update",s,i)}),Pn(o,"parentUpdate",function(s,i={}){if(e.parent)return Ju(e.parent,"update",s,i)}),Pn(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=Et(s)?s:null;for(let a=0;a<64&&s?.parent&&s.parent!==s;a++)s=s.parent,Et(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}};Xu(e,"$settled",function(){return Cp().then(()=>e)});for(let o in r)if(Xu(e,"$"+o,r[o]),typeof e[o]!="function"){if(Object.prototype.hasOwnProperty.call(e,o)){Rp(o,"");continue}Xu(e,o,r[o])}};var Xk=function(t,e,n){return t.state=xm(t,e,n),t.state},xm=function(t,e,n){let{__ref:r}=t,o=t.state;if(o==null||o===!1){let s=e?.state||{};return Ae(t,s),s}if(typeof o=="string")return r&&(r.__state=o),r.__stateType="string",bH(o,t,e);if(typeof o=="number"||typeof o=="boolean"){r&&(r.__state=o,r.__stateType=typeof o,r.__hasRootState=!0);let s=lr({value:o});return s.__element=t,e?.state&&(s.parent=e.state),Ae(t,s),s}if(typeof o=="function"&&(o=o(t,e?.state)||{}),typeof o=="object"&&!Et(o)){r&&(r.__hasRootState=!0),o.isRootState&&r&&(r.__hasRootState=!0);let s=lr({...o});if(s.__element=t,!Object.getOwnPropertyDescriptor(s,"root")){let i=e?.state?.root||e?.state||s;Object.defineProperty(s,"root",{get:()=>i,enumerable:!1,configurable:!0})}return e?.state&&(s.parent=e.state,e.state.__children&&(e.state.__children[t.key]=s)),Ae(t,s),typeof t.onStateCreated=="function"&&t.onStateCreated(t,s,t.context,n),s}return Et(o)?(o.__element=t,o):e?.state||{}};function Yk(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 bH(t,e,n){if(!n?.state)return{};if(t===".")return n.state;if(t.startsWith("../")){let o=t.slice(3),s=n.state?.parent;return o&&s?Yk(s,o):s??n.state??{}}if(t.startsWith("~/")){let o=n.state;for(;o?.parent;)o=o.parent;let s=t.slice(2);return s?Yk(o,s):o??{}}let r=Yk(n.state,t);if(r&&typeof r=="object"&&!Et(r)&&!Object.getOwnPropertyDescriptor(r,"root")){let o=n.state?.root||n.state;Object.defineProperty(r,"root",{get:()=>o,enumerable:!1,configurable:!0})}return r}Mt();var Jk=(t,e)=>{if(!t)return qL;let n=wH(t,e);return!n||!n.state?qL:xH(n.state)},Zk=()=>Ie()!=null,_H=128;function wH(t,e){let n=typeof e=="function"?e:typeof e=="string"?s=>!!s?.[e]:s=>!!s?.state,r=t,o=null;for(let s=0;s<_H&&r;s++){if(n(r)&&r.state)return r;if(r.state&&!o&&(o=r),!r.parent||r.parent===r)break;r=r.parent}return o}var SH={get(t,e){return t[e]}},KL=new WeakMap,xH=t=>{let e=KL.get(t);return e||(e=new Proxy(t,SH),KL.set(t,e)),e},qL=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var kH=["alert","alertdialog","application","article","banner","button","cell","checkbox","columnheader","combobox","complementary","contentinfo","definition","dialog","directory","document","feed","figure","form","grid","gridcell","group","heading","img","link","list","listbox","listitem","log","main","marquee","math","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","switch","tab","table","tablist","tabpanel","term","textbox","timer","toolbar","tooltip","tree","treegrid","treeitem"],EH=["alignment-baseline","baseline-shift","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","mask-type","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","transform-origin","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"],vH=["requiredExtensions","systemLanguage"],GL={circle:["cx","cy","r","pathLength"],ellipse:["cx","cy","rx","ry","pathLength"],line:["x1","y1","x2","y2","pathLength"],path:["d","pathLength"],polygon:["points","pathLength"],polyline:["points","pathLength"],rect:["x","y","width","height","rx","ry","pathLength"],g:[],defs:[],switch:[],symbol:["viewBox","preserveAspectRatio","refX","refY","x","y","width","height"],use:["href","xlink:href","x","y","width","height"],image:["href","xlink:href","x","y","width","height","preserveAspectRatio","crossorigin"],foreignObject:["x","y","width","height"],text:["x","y","dx","dy","rotate","textLength","lengthAdjust"],tspan:["x","y","dx","dy","rotate","textLength","lengthAdjust"],textPath:["href","xlink:href","path","startOffset","method","spacing","side","textLength","lengthAdjust"],linearGradient:["x1","y1","x2","y2","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],radialGradient:["cx","cy","r","fx","fy","fr","gradientUnits","gradientTransform","spreadMethod","href","xlink:href"],stop:["offset"],pattern:["x","y","width","height","patternUnits","patternContentUnits","patternTransform","viewBox","preserveAspectRatio","href","xlink:href"],clipPath:["clipPathUnits"],mask:["x","y","width","height","maskUnits","maskContentUnits"],marker:["viewBox","preserveAspectRatio","refX","refY","markerUnits","markerWidth","markerHeight","orient"],filter:["x","y","width","height","filterUnits","primitiveUnits"]},AH=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),CH=()=>{let t={};for(let e in GL)t[e]=[...GL[e],...AH.has(e)?[]:vH,...EH];return t},$r={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","enterkeyhint","exportparts","headingoffset","headingreset","hidden","id","inputmode","lang","nonce","part","placeholder","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions","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","ping","referrerpolicy","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","loading","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["name","open"],del:["cite","datetime"],dialog:["closedby","open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["accept-charset","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","controls","crossorigin","decoding","fetchpriority","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alpha","alt","autocomplete","capture","checked","colorspace","crossorigin","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","blocking","crossorigin","disabled","fetchpriority","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"],q:["cite"],slot:["name"],script:["async","blocking","charset","crossorigin","defer","fetchpriority","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:["blocking","media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],template:["for","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable","shadowrootslotassignment"],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","loading","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","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"],...CH()},ZL=["oncopy","oncut","onpaste","oncompositionend","oncompositionstart","oncompositionupdate","onfocus","onfocusin","onfocusout","onblur","onchange","onbeforeinput","oninput","onreset","onsubmit","oninvalid","onformdata","onload","onerror","ontoggle","onkeydown","onkeypress","onkeyup","onabort","oncanplay","oncanplaythrough","oncuechange","ondurationchange","onemptied","onencrypted","onended","onloadeddata","onloadedmetadata","onloadstart","onpause","onplay","onplaying","onprogress","onratechange","onseeked","onseeking","onstalled","onsuspend","ontimeupdate","onvolumechange","onwaiting","onauxclick","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragexit","ondragleave","ondragover","ondragstart","ondrop","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onselect","onselectionchange","onselectstart","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ongotpointercapture","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onlostpointercapture","onscroll","onresize","onwheel","onanimationstart","onanimationend","onanimationiteration","ontransitionstart","ontransitionrun","ontransitionend","ontransitioncancel","onoutrostart","onoutroend","onintrostart","onintroend","onmessage","onmessageerror","onvisibilitychange","oncancel","onclose","onfullscreenchange","onfullscreenerror"],QL=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()):null,YL=new Map,Fr=t=>{let e=YL.get(t);return e===void 0&&(e=QL(t)||nD(t),YL.set(t,e)),e},tD=new Set(["tabIndex","readOnly","maxLength","minLength","autoComplete","autoFocus","autoPlay","contentEditable","spellCheck","colSpan","rowSpan","srcSet","crossOrigin","accessKey","inputMode","enterKeyHint","formAction","noValidate","autoCapitalize","autoCorrect","writingSuggestions","headingOffset","headingReset","exportParts"]),tE=new Set;for(let t in $r)t==="default"||t==="aria"||t==="svg"||$r[t].forEach(e=>{e.startsWith("on")||tE.add(e)});var eD=t=>{let e=t.charCodeAt(0);if(e<97||e>122||!/[A-Z]/.test(t))return null;let n=t.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());if(tE.has(n))return n;let r=t.toLowerCase();return tE.has(r)?r:null},nD=t=>tD.has(t)?t.toLowerCase():eD(t),TH=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),OH=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),ti=t=>typeof t=="string"&&(TH.has(t)||t.startsWith("aria-")),nr=(t,e)=>{if(e!==!0&&e!==!1)return e;if(ti(t)){let n=OH.get(t);return n?e?n[0]:n[1]:e?"true":"false"}return e===!0?"":e},XL=new Map,pn=(t,e)=>{let n=$r.default,r=Object.prototype.hasOwnProperty.call($r,t)?$r[t]:null,o=r?r.length:-1,s=XL.get(t);(!s||s.def!==n||s.defLen!==n.length||s.own!==r||s.ownLen!==o)&&(s={def:n,defLen:n.length,own:r,ownLen:o,answers:new Map},XL.set(t,s));let i=s.answers.get(e);return i===void 0&&(i=RH(t,e),s.answers.set(e,i)),i},RH=(t,e)=>{if(e.startsWith("aria-")||e.startsWith("data-")||QL(e)||tD.has(e)||$r.default.includes(e))return!0;if(Object.prototype.hasOwnProperty.call($r,t)){let n=$r[t];if(n.includes(e))return!0;let r=eD(e);return r!==null&&n.includes(r)}return!1},nE=t=>{if(!v(t))return!1;let e=t.toLowerCase();return ZL.includes(e)},PH=(t,e,n)=>{let r={};for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(n&&o in n)continue;if(o==="aria"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])Ut(e[o][a])&&(r["aria-"+a]=e[o][a]);continue}if(o==="data"&&e[o]&&typeof e[o]=="object"){for(let a in e[o])if(Ut(e[o][a])){let c=a.replace(/([A-Z])/g,l=>"-"+l.toLowerCase());r["data-"+c]=e[o][a]}continue}let s=pn(t,o),i=nE(o);if(Ut(e[o])&&(s||i)){let a=Fr(o)||o;r[a]=e[o]}}return r},LH=(t,e)=>{let n={};if(t.attr)for(let r in t.attr)n[r]=t.attr[r](e,e.state,e.context);if(t.aria&&typeof t.aria=="object")for(let r in t.aria){let o=t.aria[r];typeof o=="function"&&(n["aria-"+r]=o(e,e.state,e.context))}if(t.data&&typeof t.data=="object")for(let r in t.data){let o=t.data[r];if(typeof o=="function"){let s=r.replace(/([A-Z])/g,i=>"-"+i.toLowerCase());n["data-"+s]=o(e,e.state,e.context)}}return n},To=(t,e)=>{let n=t.call("exec",e,t);if(n)return v(n)&&n.includes("{{")&&(n=t.call("replaceLiteralsWithObjectFields",n)),n},eE=(t,e)=>{let n=(t.preSrc||"")+(To(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},Oo={src:t=>eE(t,t.src),href:t=>To(t,t.href),action:t=>To(t,t.action),poster:t=>eE(t,t.poster),data:t=>To(t,t.data)},rE=t=>{let e=t.tag||"div",n={};for(let r in Oo)if(t[r]!==void 0&&pn(e,r)){let o=Oo[r](t);o!==void 0&&(n[r]=o)}return n},JL=(t,e)=>{let n=e.context?.cases?.[t];if(n!==void 0)return L(n)?n.call(e,e):!!n},DH=(t,e,n)=>{if(t==="$"){let o=JL(e,n);return o===void 0&&(o=!!n[e]),o}let r=n[e]===!0||n.state[e];if(!r){let o=JL(e,n);o!==void 0&&(r=o)}return t==="."?!!r:!r},IH=new Set(["$",".","!"]),oE=(t,e,n,r=DH)=>{let o={},s=(i,a,c,l)=>{let f=a;o[i]=u=>{if(r(c,l,u))return L(f)?f(u,u.state,u.context):f}};for(let i in t){let a=i.charAt(0);if(!IH.has(a))continue;let c=t[i];if(!c||typeof c!="object")continue;let l=i.slice(1);for(let f in c){if(n&&f in n)continue;if(f==="aria"&&c[f]&&typeof c[f]=="object"){for(let g in c[f])s("aria-"+g,c[f][g],a,l);continue}if(f==="data"&&c[f]&&typeof c[f]=="object"){for(let g in c[f]){let h=g.replace(/([A-Z])/g,m=>"-"+m.toLowerCase());s("data-"+h,c[f][g],a,l)}continue}let u=pn(e,f),d=nE(f);if(!u&&!d)continue;let p=Fr(f)||f;s(p,c[f],a,l)}}return o};var km="3.14.809";var rD="__SMBLS_ELEMENT_ID_ENGINE__",oD=(t,e,n)=>{let r=e||km,o=n||(typeof globalThis<"u"?globalThis:null);if(!o)return t;let s=o[rD];return s&&s.engine&&s.version===r?s.engine:(s||(o[rD]={version:r,engine:t}),t)};var MH=new Set(["rows","cols","wrap","fill","stroke","offset"]),Em=(t,e)=>MH.has(e)&&pn(t,e),Ro=(t,e)=>!!(xt[e]||Bt&&Bt.has(e))&&!Em(t,e);var $D=oD({uniqId:1,scopedStyleId:0},km),pc=[],Po=new Set,kE=!1,FD=0,mc=null,td=null;function _c(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function BD(){return typeof document<"u"&&document.visibilityState==="hidden"}var NH=250,$H=1e3;function FH(){return td&&(td!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||BD())?!0:_c()-FD>=$H}function BH(){if(kE=!0,FD=_c(),td=null,typeof requestAnimationFrame!="function"){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(yc,0);mc=t?()=>t(e):null;return}if(BD()){let t=typeof clearTimeout=="function"?clearTimeout:null,e=setTimeout(yc,NH);mc=t?()=>t(e):null}else{let t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;td=requestAnimationFrame;let e=requestAnimationFrame(yc);mc=t?()=>t(e):null}}function ad(){if(kE){if(!FH())return;let t=mc;if(mc=null,t)try{t()}catch{}}BH()}var jD=300,UD=15e4,mE=0;function ri(){mE++;let t=!1;return()=>{t||(t=!0,!(--mE>0)&&(pc.length||Po.size)&&ad())}}function yc(){if(kE=!1,mc=null,td=null,mE>0||(!globalThis.__SMBLS_BUILD_DROP_F_autoGrow__&&Po.size&&H9(),!pc.length))return;let t=pc.splice(0,pc.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=_c());let o=_c()-r.__mountFirstAttemptAt;r.__mountAttempts<=jD&&o<UD?(pc.push(n),ad()):console.warn("[DOMQL] onMounted dropped after",r.__mountAttempts,"attempts /",o,"ms \u2014 node never connected:",n.key||n.tag||n);continue}typeof n.onBridgeMount=="function"&&NL(n),typeof n.onMounted=="function"&&Zt("Mounted",n,n.__ref?.__mountOptions||{})}}}function yE(t,e){let n=!globalThis.__SMBLS_BUILD_DROP_F_autoGrow__&&t.__ref?.__autoGrow;n&&n.active&&id(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=e,pc.push(t),ad())}function Am(t,e){typeof t.onContentUpdate=="function"&&(tr("contentUpdate",t,e),fn(t,()=>{try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(un(t,"onContentUpdate",n),t.context?.strictMode)throw n}}))}function jH(t){return t.toLowerCase()}function VD(t){let e=t.charCodeAt(0);return e===58||e===64||e===38||e===91}function Cm(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function zD(t,e,n,r){return Lm(r,Cm(t)||(e&&typeof e=="object"?Cm(e.key):void 0)||String(n))}function Lm(t,e){if(!t||typeof e!="string")return e;let n=e;for(;UH(t,n);)n="$"+n;return n!==e&&VH(t,e,n),n}function UH(t,e){if(Gt.has(e)&&e!=="content")return!0;if(!(e in t))return!1;let n=t[e];return!(n&&typeof n=="object"&&n.__ref&&n.parent===t)}var sD=new Set;function VH(t,e,n){if(!tt())return;let r=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",o=r+"::"+e;sD.has(o)||(sD.add(o),console.warn(`[smbls] a child keyed "${e}" at ${r} names a property of its parent; it lives at el["${n}"] (data-key="${n}") so the parent keeps its own "${e}". Prefix the data keys to keep plain el.<key> access.`))}function Yt(t,e,n,r={},o){if(Ie())return ve(()=>Yt(t,e,n,r,o));if(t==null||t===!1)return null;let s=l9(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),n=Cm(n);let i=Cm(t.key),a=Object.create(null);a.key=n||(i&&e?Lm(e,i):i)||`_${$D.uniqId++}`,a.parent=e||null,a.context=t.context||e?.context||r.context||{},a.context.__create||(a.context.__create=Yt);let c=a.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||a,path:e?.__ref?.path?[...e.__ref.path,a.key]:[a.key],origin:t,__mount:null,__plainRows:null,__ifParked:null};s&&(c.__runtimeSource=s);let l=o;o&&(o.holdTail||o.deferAttach)&&(o.holdTail&&ct.mount!==null&&ct.mount.hold(a),o.deferAttach&&(ac(c).attachLater=!0),l=void 0);let f=t;if(t=WD(a,t,n,i,e,r),a.if!=null){let g;if(typeof a.if=="function")try{g=a.if(a,a.state,a.context)}catch(h){if(g=!1,c.__ifError=h,typeof console<"u"&&console.warn){let m=a.key||a.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,h?.message||h)}}else g=a.if;c.__if=!!g}if(c.__if)typeof a.if=="function"&&(c.__ifInitialized=!0);else{if(e){e[a.key]=a;let h=e.__ref;h&&(h.__ifParked||(h.__ifParked=new Set)).add(a.key)}let g=qH(t,n,a.context?.components);return g.length&&(c.__ifLateMerge={definition:f,key:n,ownKey:i,names:g,options:r}),typeof a.if=="function"&&QD(a,c,a.if),a}a.tag||(a.tag=Qn(a)),Zt("Init",a,r);let u=ct.hydration,d=a.node=u!==null&&u.adopt(a)||Co(a);if(!d)return a;if(a.tag==="fragment"){let h=(a.context?.document||globalThis.document).createComment("");d.appendChild(h),c.__fragmentAnchor=h}if(Zt("AttachNode",a,r),d.setAttribute&&a.key&&d.getAttribute("data-key")!==String(a.key)&&d.setAttribute("data-key",a.key),e){let g=e[a.key];e[a.key]=a;let h=e.__ref?.__children;h&&(g===void 0||!h.includes(a.key))&&h.push(a.key)}d.setAttribute&&a.context?.scopeSelector&&a.context.scopeSelector!==":root"&&a.context.key&&a.key===a.context.key&&d.setAttribute("data-smbls-app",a.context.key),a.id&&d.setAttribute&&(d.id=a.id),bI(a,r),JD(a),ZD(a);try{wI(a,r)}catch(g){Dm(a,g)}let p=c.__mount;return p!==null&&p.pending>0?(p.attachLater||(r.mountWhole===!0&&!(o&&o.holdTail)&&zH(a,e)?p.held=!0:wc(a,e,l)),p.tail=()=>ct.mount.finish(a,r),a):(bc(a,!0),(p===null||!p.attachLater)&&wc(a,e,l),EE(a,r),a)}function Io(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.attachLater||(e.attachLater=!1,!t.node)?!1:(wc(t,t.parent),!0)}function zH(t,e){if(!e||e.tag==="fragment")return!1;let n=t.node;if(!n||n.nodeType===11)return!1;let r=e.node||(e.nodeType?e:null);return!!r&&n.parentNode!==r}function HD(t){let e=t.__ref,n=e&&e.__mount;if(!n||!n.held)return;n.held=!1;let r=t.node,o=t.parent;if(!r||!o)return;let s=o.__ref;if(!s){wc(t,o);return}let i=o.node;if(!i)return;let a=s.__children,c=a?a.lastIndexOf(t.key):-1,l;for(let f=c-1;f>=0;f--){let u=o[a[f]],d=u&&(Br(u)||(u.tag==="fragment"&&u.__ref?u.__ref.__fragmentAnchor:null));if(d&&d.parentNode===i){l=d.nextSibling;break}}l===void 0&&(l=Gu(i,s.__textNode)),wc(t,o,l?{position:"before",node:l}:void 0)}function Dm(t,e){if(typeof console<"u"&&console.error){let n=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] createChildren failed at ${n}:`,e?.message||e,e?.stack?`
58
58
  `+e.stack.split(`
59
59
  `).slice(0,6).join(`
60
- `):"")}}function _E(t,e){if(typeof t.html=="function"&&t.node&&!t.node.innerHTML&&ln(t,()=>{try{let n=t.html(t,t.state,t.context);n!=null&&typeof n!="function"&&(t.node.innerHTML=n)}catch{}}),Jt("Create",t,e),Jt("Complete",t,e),Jt("Render",t,e),Jt("RenderRouter",t,e),dE(t,e),typeof t.onFrame=="function"){let n=t.onFrame,r=t.context?.designSystem,o=()=>{if(t.node){if(t.node.isConnected){r&&mt(r);try{n(t,t.state,t.context)}catch(s){console.error("[DOMQL] onFrame error:",s)}finally{r&&ht()}}requestAnimationFrame(o)}};requestAnimationFrame(o)}}function Em(t,e){let n=e&&e.__ref&&e.__ref.__mount;!n||!n.tail||n.holder||(n.holder=t,ct.mount.hold(t))}var Pz=new Set(["childProps","attr","style","scope","data","vars"]);function FD(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let h=n.indexOf("_"),m=n.indexOf("."),y=h>0?h:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let x=n.substring(0,y),E=t.context?.components;E&&(E[x]||E["smbls."+x])?e={...e,extends:x}:E&&tt()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${x}" but neither "${x}" nor "smbls.${x}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),ec(t,e,s);let i=Nk(t),a=t.props&&typeof t.props=="object"?t.props:null;for(let h in e)if(!(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")){if(h==="key"){r&&(t.key=o?Tm(o,r):r);continue}i&&i.mark(h),tE(t,h,e[h])}if(a)for(let h in a)tE(t,h,a[h]);let c=e.props;if(c&&typeof c=="object"){for(let h in c)tE(t,h,c[h]);if(i)for(let h in c)i.mark(h)}xL(t),e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let h={};l&&Object.assign(h,l),e.scope!==void 0&&Object.assign(h,e.scope),t.scope=Ap(h,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let p=t.__ref,g=Jz(t,p&&p.__runtimeSource);return p&&(p.__declaredArrays=g||void 0),cc(t),Mz(t,o,e,s),e}function tE(t,e,n){let r=t[e],o=ct.chains;if(o!==null&&o(t,e,r,n))return;let s=r&&n&&typeof r=="object"&&typeof n=="object"&&!Array.isArray(r)&&!Array.isArray(n);s&&e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90?t[e]=Ue(r,n):s&&Pz.has(e)?t[e]={...r,...n}:s&&MD(e)?t[e]=Ue(r,n):t[e]=n}var Lz=new Set(["key","parent","context","__ref"]);function Dz(t,e){for(let r of Object.keys(t))Lz.has(r)||delete t[r];let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let r=t.context?.components||{},o=r[e.key]||r["smbls."+e.key];o&&(n={...n,extends:o})}Ee(()=>FD(t,n,e.key,e.ownKey,t.parent,e.options))}function Iz(t,e,n){let r=n||{},o=a=>!!(r[a]||r["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function eE(t,e,n){if(typeof t.onStateInit!="function"&&!$k(t,"stateInit"))return;let r=t.state;t.state=e;try{Jt("StateInit",t,n)}finally{t.state=r}}var nE=t=>({isDataOnlyKey:e=>oo(t).has(e)});function Mz(t,e,n,r){let o=!e,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,i=o&&s&&t.context?.state,a=n.state!==void 0&&!i?n.state:t.state&&!Et(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,ve(t,t.state);else if(t.context?.state){let c=t.context.state,l={...c},f=t.context?.polyglot;if(f?.translations){let u=t.context,d=c.lang||f.defaultLang||"en",p=new Set,g=(y,x)=>{p.has(y)||as(u,y,l)&&(l[y]=x,p.add(y),zn(u,y,x))},h=f.translations[d];if(h&&typeof h=="object")for(let y in h)g(y,h[y]);let m=new Set(kn(f,!1));for(let y in f.translations)m.has(y)||g(y,f.translations[y])}Et(l)||eE(t,l,r),t.state=Et(l)?l:ar(l,nE(t.context)),t.state.__element=t,t.state.root=t.state,ve(t,t.state),fa?.(c,t.state),Jt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),ve(t,t.state);return}if(typeof a=="string"){if(t.state=jD(a,e),t.state&&typeof t.state=="object"&&!Et(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}ve(t,t.state),$z(t,a,e),Jt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(Et(c))t.state=c;else{let l=c||{};eE(t,l,r),t.state=ar(l,e?.state?void 0:nE(t.context))}}else if(Et(a))t.state=a;else{let c={...a};eE(t,c,r),t.state=ar(c,e?.state?void 0:nE(t.context))}t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,ve(t,t.state),fa?.(a,t.state),Jt("StateCreated",t,r)}function QL(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 BD(t,e){let n=e.state;return t.startsWith("~/")?[n&&(n.root||n),t.slice(2)]:t.startsWith("../")?[n,t.slice(3)]:[n,t]}function jD(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")||t.startsWith("~/")){let[o,s]=BD(t,e);return s?QL(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=QL(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{}}function Nz(t,e){let[n,r]=BD(t,e);if(!r||!n||typeof n!="object")return;let o=n[r];if(o!==void 0||r.indexOf("/")===-1)return o;let s=n;for(let i of r.split("/")){if(s==null||typeof s!="object")return;s=s[i]}return s}function $z(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!Et(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=Ee(()=>K(()=>{let s=Nz(e,n);!s||typeof s!="object"||s===t.state||Ee(()=>UD(t,t.state,s,!0))},{depth:r.path?r.path.length:0,label:_t(r,"state")}));o._isStateBinding=!0,r.__stateBinding=o,r.__effects&&r.__effects.push(o)}function UD(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&ve(t,n),eD(o);let i=o.__children;if(i)for(let a=0;a<i.length;a++){let c=t[i[a]];c&&c.__ref&&c.parent===t&&UD(c,e,n,!1)}return}if(o.__stateBinding){o.__stateBinding._notify();return}let s=t.state;s&&typeof s=="object"&&s.parent===e&&(s.parent=n,eD(o))}function tD(t,e){let n=t.__ifParked;if(!n||!n.size)return e;for(let r of n)e.includes(r)||e.push(r);return e}function eD(t){let e=t.__effects;if(e)for(let n=0;n<e.length;n++){let r=e[n];r&&!r._disposed&&!r._isStateBinding&&!r._isSubscribeToEffect&&typeof r._notify=="function"&&r._notify()}}var Fz=new Set(["s","state","ctx","context"]),rE=new WeakMap;function Bz(t){if(rE.has(t))return rE.get(t);let e=null;try{let n=typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t);if(typeof n=="string"){let r=n.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||n.match(/^[^(]*\(([^)]*)\)/);r&&(e={params:r[1].split(",").map(o=>o.trim())})}}catch{}return rE.set(t,e),e}function jz(t){let e=Bz(t);return e?e.params.map(n=>n.split("=")[0].trim()).filter(Boolean):[]}var Uz=3,Vz=/^(is|has)[A-Z0-9_$]/,Hz=new Set(["routerOptions"]),nD=new WeakSet;function zz(t,e){if(typeof t!="function"||t.length!==2||e&&(Vz.test(e)||Hz.has(e))||nD.has(t))return!1;let n=jz(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<Uz||Fz.has(r)?!1:(nD.add(t),!0)}function Wz(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"||qt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||cn(a)||xt[a]||Bt&&Bt.has(a)||c!==45&&(dn(n,a)||(tt()&&zz(t[a],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&&mt(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&ht()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Kz(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 Ht(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return Kz(t,e),n.apply(this,r)}}function fc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function _t(t,e){return()=>t.path.join(".")+"::"+e}var rD=new Set;function ee(t,e,n){if(!tt())return;let r=_t(t,e)();rD.has(r)||(rD.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var oD=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,sD=new WeakMap,qz=t=>{let e=sD.get(t);if(e!==void 0)return e;e=null;let n;try{n=String(t)}catch{n=""}if(n.includes("{{")){oD.lastIndex=0;let r;for(;(r=oD.exec(n))!==null;)r[2].includes("{{")&&(e||(e=[])).push(r[2])}return sD.set(t,e),e},Gz=(t,e)=>{let n=qz(t);if(n)for(let r=0;r<n.length;r++)e.add(n[r])},Yz=(t,e)=>!cn(t)&&!Oo(e,t),oE=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&Yz(t,r)&&Gz(e,n)},pE=new WeakMap,Ju=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Zu=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?Ue(t,e):t},Qu=(t,e)=>t&&e?Ue(t,e):t||e||null,VD=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&Ju(n,e)},Po=(t,e)=>VD(t,e)?Zu(t.__ref.__runtimeSource[e]):null,ti=(t,e)=>(e&&t&&typeof t=="object"&&pE.set(t,e),t),Xz=t=>{if(!t||typeof t!="object")return;let e=pE.get(t);return e&&pE.delete(t),e},hE=(t,e,n)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||n.has(t))){if(n.add(t),Array.isArray(t)){for(let r=0;r<t.length;r++)hE(t[r],e,n);return}if(!t.__ref)for(let r of Object.keys(t)){if(r==="state")continue;let o=Object.getOwnPropertyDescriptor(t,r);o&&"value"in o&&hE(o.value,e,n)}}},Jz=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(qt.has(r)||e&&Ju(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;hE(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},iD=(t,e)=>{if(Array.isArray(e))for(let n=t;n;n=n.parent){let r=n.__ref&&n.__ref.__declaredArrays,o=r&&r.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},HD=["attr","aria","data","metadata"],Zz=t=>{if(HD.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},Qz=(t,e)=>{let n=new Set,r=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&Ju(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!Zz(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null,f=o.charCodeAt(0)===46||o.charCodeAt(0)===33;for(let u in i){let d=a&&(!l||Ju(l,u)),p=i[u];if(f&&p&&typeof p=="object"&&!Array.isArray(p)&&HD.includes(u)){for(let g in p)oE(g,p[g],n,r,d);continue}oE(u,p,n,r,d)}continue}oE(o,i,n,r,a)}return n};function zD(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=Qz(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(Wz(t),typeof t.text=="function"){let c=t.text,l=Ht(t,t.textDeps,c),f=K(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Xt.call(t,u,t.state)),Xs(t,u))}catch(u){ee(n,"text",u)}},{depth:n.path.length,label:_t(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=K(()=>{if(n.contentManaged)return;let f=Xt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&Xs(t,f??"")},{depth:n.path.length,label:_t(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!qt.has(c)&&!cn(c)&&!n.__exec[c]&&!wm(s,c)){if(xt[c]){let l=t[c],f=Ht(t,t[c+"Deps"],l),u=c,d,p=null,g=null,h,m=()=>{for(let E of g)t.node.classList.remove(E);g=null,h=void 0},y=()=>{XD(t,u,p,null),Sm(t,u,null),p=null},x=K(()=>{let E=t.context?.designSystem;E&&mt(E);try{let C=f(t,t.state,t.context);lm();let _;try{_=xt[u](C,t,t.state,t.context)}finally{fm()}if(Array.isArray(_)){let b={};for(let w of _)if(w)for(let S in w)b[S]=w[S];_=b}if(u==="show"||u==="hide"){t.node&&Am(t,u,!!(_&&_.display),!0);return}if(_&&t.node&&n9(_)){let b=dc(_);if(b===null||b!==h){h=b;let w=je(_,null,t.context?.cssPrefix),S=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let A of g)t.node.classList.remove(A);if(S&&S.length)for(let A of S)t.node.classList.add(A);g=S}}p&&y(),d=void 0}else if(_&&t.node){g&&m();let b=dc(_);if(b===null||b!==d||!pc(t.node,p,t)){d=b;let w=lD(t,_,p,u);p=Yu(t.node,w,t),Sm(t,u,p)}}else t.node&&(g&&m(),p&&y(),d=void 0)}finally{E&&ht()}},{depth:n.path.length,label:_t(n,u)});n.__effects.push(x),n.__exec[c]=l}else if(Bt&&Bt.has(c)){let l=t[c],f=Ht(t,t[c+"Deps"],l),u=c,d,p=null,g=K(()=>{let h=t.context?.designSystem;h&&mt(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!pc(t.node,p,t)){d=y;let x={[u]:m},E=lD(t,x);p=Yu(t.node,E,t),Sm(t,u,p)}}else d=void 0,p=null,Sm(t,u,null),u==="display"?od(t,""):t.node.style[u]=""}finally{h&&ht()}},{depth:n.path.length,label:_t(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];ZD(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(s9(t),typeof t.html=="function"){let c=t.html,l=Ht(t,t.htmlDeps,c),f=K(()=>{ln(t,()=>{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:n.path.length,label:_t(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=Ht(t,t.valueDeps,c),f=K(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Xt.call(t,u,t.state)),cD(t,u)}catch(u){ee(n,"value",u)}},{depth:n.path.length,label:_t(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=K(()=>{try{cD(t,Xt.call(t,c,t.state))}catch(f){ee(n,"value",f)}},{depth:n.path.length,label:_t(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=Ht(t,t.styleDeps,c),f,u=null,d,p,g,h,m=K(()=>{let y=l(t,t.state,t.context),x=t.context&&t.context.designSystem,E;if(y&&typeof y=="object"&&y===d&&x===g){let _=dc(y);E=_!==null&&_===p?h:Zs(t,y),p=_}else E=Zs(t,y),p=void 0;d=y,g=x,h=E;let C=dc(E);(C===null||C!==f||!pc(t.node,u,t))&&(f=C,gE(t.node,u,E,t),nr(t.node,E,t),u=Yu(t.node,E,t))},{depth:n.path.length,label:_t(n,"style")});n.__effects.push(m),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=Ht(t,fc(t.styleDeps,c),l),u,d=null,p=K(()=>{try{let g=f(t,t.state,t.context);if(t.node){let h=c+":"+String(g);if(h!==u||!pc(t.node,d,t)){u=h;let m=Zs(t,{[c]:g});gE(t.node,d,Object.assign({},m,{[c]:""}),t),nr(t.node,m,t),d=Yu(t.node,m,t)}}}catch(g){ee(n,"style."+c,g)}},{depth:n.path.length,label:_t(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 l=Ht(t,fc(t.attrDeps,c),t.attr[c]),f=c,u=K(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Xt.call(t,d,t.state)),t.node?.setAttribute&&Js(t.node,f,d)}catch(d){ee(n,"attr."+f,d)}},{depth:n.path.length,label:_t(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=K(()=>{try{let d=Xt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,tr(f,d??""))}catch(d){ee(n,"attr."+f,d)}},{depth:n.path.length,label:_t(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),h=K(()=>{try{let m=Xt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,tr(g,m??""))}catch(m){ee(n,"aria."+c,m)}},{depth:n.path.length,label:_t(n,"aria."+c)});h._attrName=g,n.__effects.push(h);continue}if(typeof l!="function")continue;let f=Ht(t,fc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),d=K(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;Js(t.node,u,p)}catch(p){ee(n,"aria."+c,p)}},{depth:n.path.length,label:_t(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let g=l,h="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=K(()=>{try{let y=Xt.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){ee(n,"data."+c,y)}},{depth:n.path.length,label:_t(n,"data."+c)});m._attrName=h,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=Ht(t,fc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),p=K(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null||g===!1?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(d,g===!0?"":g)}catch(g){ee(n,"data."+c,g)}},{depth:n.path.length,label:_t(n,"data."+c)});p._attrName=d,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 l=Ht(t,fc(t.classDeps,c),i[c]),f=K(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){ee(n,"class."+c,u)}},{depth:n.path.length,label:_t(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&KD(t,n,t.if);for(let c of Object.keys(t)){if(qt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||cn(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(dn(u,c)&&!Oo(u,c)){let d=Nr(c)||c,p=Ht(t,t[c+"Deps"],f),g=K(()=>{try{let h=p(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=Xt.call(t,h,t.state));let m=To[c];if(m&&h!=null){let y=m(t);y!==void 0&&(h=y)}t.node?.setAttribute&&Js(t.node,d,h,!0)}catch(h){ee(n,c,h)}},{depth:n.path.length,label:_t(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(qt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||cn(c)||Oo(a,c)||To[c]||!dn(a,c))continue;let u=Nr(c)||c,d=K(()=>{try{let p=Xt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,tr(u,p??""))}catch(p){ee(n,c,p)}},{depth:n.path.length,label:_t(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(d9(t),k9(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=K(()=>{let p=[];for(let m=0;m<l.length;m++){let y=l[m];try{p[m]=typeof y=="function"?y(t,t.state,t.context):t.state?.[y]}catch{p[m]=void 0}}if(!f){f=!0,u=p;return}let g=p.length!==u.length;for(let m=0;!g&&m<p.length;m++)p[m]!==u[m]&&(g=!0);let h=u;u=p,g&&ln(t,()=>{try{c(t,t.state,t.context,{prev:h,next:p})}catch(m){if(fn(t,"onStateUpdate",m),t.context?.strictMode)throw m}})},{depth:n.path.length,label:_t(n,"onStateUpdate")});n.__effects.push(d)}y9(t)}function aD(t){let e=t.parent,n=e?.node;if(!n||!t.node){bc(t,t.parent);return}let r=null,o=Object.keys(e),s=o.indexOf(t.key);for(let a=s+1;a<o.length;a++){let c=e[o[a]];if(c?.node?.parentNode===n){r=c.node;break}}t.node.parentNode===n&&t.node.nextSibling===r||(r?n.insertBefore(t.node,r):n.appendChild(t.node)),nm()}function WD(t){qD(t),O9(t),sI(t),U9(t),j9(t)}function KD(t,e,n){let r=Ht(t,t.ifDeps,n),o=K(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,Dz(t,s),r=Ht(t,t.ifDeps,typeof t.if=="function"?t.if:n))}let i;try{i=r(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!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(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=Ao(t)),t.node&&(t.node.ref=t),aD(t),qD(t),sI(t),Jt("Render",t,{}),dE(t,{});else{e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Jn(t)),Jt("Init",t,{});let c=ct.hydration;if(t.node||(t.node=c!==null&&c.adopt(t)||Ao(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.parent?.__ref?.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),e.__fragmentAnchor=f}Jt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),uI(t,{}),zD(t,{skipIfEffect:!0}),WD(t),pI(t,{}),aD(t),Jt("Create",t,{}),Jt("Complete",t,{}),Jt("Render",t,{}),Jt("RenderRouter",t,{}),dE(t,{})}},{depth:e.path.length,label:_t(e,"if")});e.__effects.push(o)}function Xs(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 t9(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function e9(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function Js(t,e,n,r){n==null||n===!1&&!Qs(e)?vm(t,e,null):typeof n=="function"||typeof n=="object"||(r&&e==="src"&&"src"in t?t.src=n:vm(t,e,tr(e,n)))}function vm(t,e,n){let r=t9(t,e);n==null?t.removeAttribute(e):t.setAttribute(e,n),e9(t,r)}function cD(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=n.ownerDocument,s=!!o&&o.activeElement===n,i=s&&typeof n.selectionStart=="number"?n.selectionStart:null,a=s&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,s&&i!=null&&a!=null)try{n.setSelectionRange(i,a)}catch{}let c=t.__ref&&t.__ref.__autoGrow;c&&c.active&&c.resize()}function qD(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Xs(t,t.text),cI(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}nr(e,Zs(t,n),t)}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&&!Qs(n)||e.setAttribute&&e.setAttribute(n,tr(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 dc(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function n9(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 Yu(t,e,n){if(!t||!t.style||!e)return null;let r=t.style,o=[];for(let s in e){if(e[s]==null||s.charAt(0)==="&")continue;let a=er(s);o.push(a,_c(n,r,a),xE(n,r,a))}return o}function GD(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function YD(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function er(t){return Dr(t)}function gE(t,e,n,r){if(!t||!t.style||!e||!e.length)return;let o=t.style,s=new Set;if(n&&typeof n=="object")for(let i in n)n[i]==null||i.charAt(0)==="&"||s.add(er(i));for(let i=0;i<e.length;i+=3){let a=e[i];s.has(a)||_c(r,o,a)===e[i+1]&&(r&&a==="display"?od(r,""):typeof o.removeProperty=="function"&&o.removeProperty(a))}}function Sm(t,e,n){let r=t.__ref;r&&(n?(r.__heldInline||(r.__heldInline=new Map)).set(e,n):r.__heldInline&&r.__heldInline.delete(e))}function r9(t,e,n){if(t.__heldInline){for(let[r,o]of t.__heldInline)if(r!==e){for(let s=0;s<o.length;s+=3)if(o[s]===n)return!0}}return!1}function XD(t,e,n,r){let o=t.__ref,s=t.node;if(!o||!n||!s||!s.style)return;let i=o.__inlineCssKeys,a=null;for(let u=0;u<n.length;u+=3){let d=n[u];r&&r.has(d)||r9(o,e,d)||(a||(a=[]),a.push(u),i&&i.delete(d))}if(!a)return;let c=i&&wE(t,i),l=s.style,f=[];for(let u of a){let d=n[u];c&&c[d]!==void 0||_c(t,l,d)===n[u+1]&&f.push(d)}for(let u of f)u==="display"?od(t,""):typeof l.removeProperty=="function"&&l.removeProperty(u)}function o9(t,e,n){let r=[];for(let i=0;i<e.length;i+=3)r.push(e[i]);let o=!1;for(let i in n){let a=vo[i];r.some(c=>a.includes(c))&&(o=!0,r.includes(i)||r.push(i))}if(!o)return;let s=t.node.style;e.length=0;for(let i of r)e.push(i,_c(t,s,i),xE(t,s,i))}function pc(t,e,n){if(!e||!t||!t.style)return!1;let r=t.style;for(let o=0;o<e.length;o+=3)if(_c(n,r,e[o])!==e[o+1]||xE(n,r,e[o])!==e[o+2])return!1;return!0}var td=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,JD=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",Rm=t=>td(t)?t:"--"+t;function Pm(t,e){if(!Lo(t))return null;let n=null;for(let r of Object.keys(t)){if(!r)continue;let o=t[r];if(typeof o=="function"){if(!e)continue;o=o(e,e.state,e.context)}JD(o)&&(n||(n={}),n[Rm(r)]=o)}return n}function ZD(t,e,n,r,o){QD(t,o,Ht(t,r,n),s=>JD(s)?{[e]:s}:null)}function QD(t,e,n,r,o){let s=t.__ref,i,a=null,c=K(()=>{ln(t,()=>{try{let l=r(n(t,t.state,t.context)),f=t.node;if(!f||!f.style)return;let u=dc(l);(u===null||u!==i||!pc(f,a))&&(i=u,gE(f,a,l),l&&nr(f,l),a=l?Yu(f,l):null,o&&o(l))}catch(l){ee(s,e,l)}})},{depth:s.path.length,label:_t(s,e)});s.__effects.push(c)}function s9(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){i9(t,n),e.__exec.vars=n;return}if(Lo(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||ZD(t,Rm(r),o,fc(t.varsDeps,r),"vars."+r)}}function i9(t,e){let n=t.__ref;QD(t,"vars",Ht(t,t.varsDeps,e),r=>Pm(r),r=>{n.__varsInline=r?new Set(Object.keys(r)):null})}function mE(t,e){if(typeof t[e]=="function"&&(Oo(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!td(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!Lo(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&Rm(r)===e)return!0;return!1}function a9(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(er(n)));return e}function c9(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=er(i);vo[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function wE(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=vo[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 lD(t,e,n,r){let o=t.node,s=a9(e),i=s&&wE(t,s);if(n&&XD(t,r,n,i?new Set([...s,...Object.keys(i)]):s),nr(o,e,t),!s)return e;let a=t.__ref;if(a)if(a.__inlineCssKeys)for(let c of s)a.__inlineCssKeys.add(c);else a.__inlineCssKeys=new Set(s);return i?(nr(o,i),Object.assign({},e,i)):e}function l9(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=wE(t,e.__inlineCssKeys);if(!n)return;let r=[];if(e.__heldInline)for(let o of e.__heldInline.values())pc(t.node,o,t)&&r.push(o);nr(t.node,n);for(let o of r)o9(t,o,n)}function Zs(t,e){return!e||typeof e!="object"?e:ln(t,()=>{try{return Ik(e,t)}catch{return e}})}var tI="none",SE=t=>!!(t&&t.__hiddenBy&&t.__hiddenBy.size),fD=t=>GD(t,"display")===tI&&YD(t,"display")==="important";function eI(t,e){e?t.setProperty("display",e[0],e[1]):typeof t.removeProperty=="function"?t.removeProperty("display"):t.display=""}function Am(t,e,n,r){let o=t.__ref,s=t.node;if(!o||!s||!s.style)return;let i=o.__hiddenBy,a=!!(i&&i.size);n?(i||(i=o.__hiddenBy=new Set),i.add(e)):i&&i.delete(e);let c=s.style;i&&i.size?fD(c)||c.setProperty("display",tI,"important"):(a||r&&fD(c))&&eI(c,o.__shownDisplay||null)}function od(t,e,n){let r=t.__ref,o=e?[String(e),n||""]:null;r&&(r.__shownDisplay=o);let s=t.node;!s||!s.style||SE(r)||eI(s.style,o)}function _c(t,e,n){let r=n==="display"&&t&&t.__ref;return SE(r)?r.__shownDisplay?r.__shownDisplay[0]:"":GD(e,n)}function xE(t,e,n){let r=n==="display"&&t&&t.__ref;return SE(r)?r.__shownDisplay?r.__shownDisplay[1]:"":YD(e,n)}function nr(t,e,n){if(!t||!e||!t.style)return;let r=null;for(let o in e){let s=e[o];if(s!=null){if(o.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[o]=s;continue}try{let i=String(s);if(typeof s=="object"&&i==="[object Object]")continue;let a=Dr(o),c=i.trim(),l=/\s*!important\s*$/.test(c),f=c.replace(/\s*!important\s*$/,"");if(n&&a==="display"){od(n,f,l?"important":"");continue}t.style.setProperty(a,f,l?"important":"")}catch{}}}r&&f9(t,r)}function f9(t,e){let n=`_ds${RD.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=Lr(i.replace(/&/g,a)).map(f=>f.includes(a)?f:a+f).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let p=l[d];if(typeof p=="object"){let g=Lr(c),h=d.includes("&")?g.map(y=>d.replace(/&/g,y)).join(", "):g.map(y=>`${y} ${d}`).join(", "),m="";for(let y in p)m+=`${er(y)}: ${p[y]};`;u+=Pr(`${h} { ${m} }`,h)+`
61
- `}else f+=`${er(d)}: ${p};`}f&&(s+=Pr(`${c} { ${f} }`,c)+`
62
- `),u&&(s+=u)}}s&&(o.textContent+=s)}var uD=new Set;function dD(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 u9(t,e,n){let r=dD(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(dD(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";uD.has(s)||(uD.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 core.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 d9(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&&tt()&&u9(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],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(Et(t.state)?t.state.root:null);if(!d||!Et(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(Et(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"&&ln(t,()=>{try{if(ym(o)){let h=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});h&&typeof h.then=="function"?h.then(()=>Qn(o,!1),m=>{Qn(o,!0),Zn("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}):(Qn(o,!1),h===!1&&(g=!0))}}catch(h){Qn(o,!0),Zn("error",t,{hook:"onBeforeUpdate",error:h})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",h)}}),!g&&t.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}!g&&typeof t.onUpdate=="function"&&ln(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(h){Zn("error",t,{hook:"onUpdate",error:h})||console.error("[DOMQL] subscribeTo onUpdate error:",h)}})},{depth:o.path.length,label:_t(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function kE(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 EE(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)];if(!n)return t;if(typeof n=="string"&&!/^@(supports|container)\b/.test(n)){let r=p9(e);if(r){let o=Ak(n);if(o)return`@container ${r} ${o}`}}return/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`}function vE(t,e,n,r){return Is(t)?Ds(()=>ed(e,n,!1,r)):ed(e,n,!1,r)}function p9(t){let e=t.__ref;if(e&&e.__breakpointContainer!==void 0)return e.__breakpointContainer;let n=null;for(let r=t.parent;r&&typeof r=="object";r=r.parent){let o=r.breakpointsFrom;if(o!=null&&o!==!1){n=um(o,r);break}}return e&&(e.__breakpointContainer=n),n}var pD=new Set;function h9(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;pD.has(r)||(pD.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.`))}var hD=new Map;function g9(t){let e=hD.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push(Hu(o))};return n(vo[t]),n(hm[t]),hD.set(t,e),e}function gD(t,e,n){if(mE(t,e)||n&&n.has(e))return!0;let r=g9(er(e));for(let o=0;o<r.length;o++){let s=r[o];if(mE(t,s)||n&&n.has(s))return!0}return!1}function ed(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(xt[a]){let u=xt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let p of d)p&&Object.assign(o,p)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};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")){if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let u in c){let d=c[u];typeof d=="function"&&(d=d(e,e.state,e.context)),!(d==null||typeof d=="function")&&i(u,d,gD(e,u,r))}continue}if(a==="vars"){let u=Pm(c,e);if(u)for(let d in u)i(d,u[d],mE(e,d)||!!(r&&r.has(d)));continue}if(kE(a,e)){let u=ed(c,e,!1,r);Object.keys(u).length&&(o[`[data-theme="${a.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){tt()&&h9(a,e);continue}let l=EE(a,e),f=vE(l,c,e,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,gD(e,a,r))}}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 Lo=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function nI(t,e){for(let n in e){let r=e[n];t[n]=Lo(r)?nI(Lo(t[n])?t[n]:{},r):r}return t}function m9(t,e){if(!Lo(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Lo(o)&&(n=nI(n||{},o))}return n}function AE(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)&&AE(t[n],e+1))return!0}return!1}function rI(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(kE(t,n)){let s=ed(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=EE(t,n),o=vE(r,e,n);return Object.keys(o).length?{cssProp:r,block:o}:null}function y9(t){let e=t.__ref;for(let n of Object.keys(t)){if(!MD(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!AE(r))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&mt(a);let c,l=!1;try{let f=rI(n,r,t),u=f?dc(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=je({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&ht()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:_t(e,"cssBlock("+n+")")});e.__effects.push(i)}}var b9=()=>!0,_9=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!xt[t]||!!(Bt&&Bt.has(t))||td(t)||t==="vars"};function w9(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(_9(a,n[a])||qt.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=Qk({[e]:n},t.tag||"div",r,b9),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function mD(t,e,n,r,o,s){let i=t.node,a=null,c=l=>{(a||(a=[])).push(l)};for(let l in r){let f=e.owners.get(l),u=f===n;if(!s&&f!==void 0&&!u)continue;let d;try{d=r[l](t)}catch(g){ee(t.__ref,"conditional("+n+")."+l,g),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Xt.call(t,d,t.state)),u&&i.getAttribute(l)!==e.written.get(l)){c(l);continue}if(d==null||typeof d=="object"||typeof d=="function"){u&&oI(i,e,l);continue}let p=d===!1&&!Qs(l)?null:String(tr(l,d));c(l),!(u&&p===e.written.get(l))&&(f===void 0&&e.base.set(l,i.getAttribute(l)),vm(i,l,p),e.owners.set(l,n),e.written.set(l,p))}o.appliedAttrs=a}function oI(t,e,n){t.getAttribute(n)===e.written.get(n)&&vm(t,n,e.base.get(n)),e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function S9(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&oI(t.node,e,s)}function sI(t){let e=t.__ref&&t.__ref.__conditionalAttrs,n=t.node;if(!(!e||!e.owners.size||!n||!n.getAttribute))for(let r of e.owners.keys()){let o=e.written.get(r),s=n.getAttribute(r);s!==o&&(e.base.set(r,s),o==null?n.removeAttribute(r):n.setAttribute(r,o))}}var sE,x9=()=>sE===void 0?sE=tt():sE;function yD(t,e){let n=vp;typeof n=="function"?t.untrackedReads+=n(e):e()}function k9(t){let e=t.__ref;e.__conditionalRunners=[];let n=null,r=new Map;for(let o of Object.keys(t)){let s=o.charAt(0);if(s!=="."&&s!=="!")continue;let i=o.slice(1);if(!i)continue;if(/[:@\s>~+[\]]/.test(i)){if(typeof console<"u"&&console.warn){let m=i.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${s}\` is read as one prop name. Nest the selector inside instead: \`${s}${m}: { '${i.slice(m.length)}': {...} }\`.`)}continue}let a=t[o];if(!a||typeof a!="object")continue;let c=s==="!",l={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null,hides:!1,probe:!1,untrackedReads:0},f=w9(t,o,a);f&&!n&&(n=e.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});let u=new Set;for(let m in a){if(!Object.prototype.hasOwnProperty.call(a,m))continue;let y=m.charAt(0),x=a[m];if(!((y===":"||y==="@"||y==="&"||y==="[")&&x&&typeof x=="object"&&!Array.isArray(x))){if(m==="vars"&&Lo(x)){for(let E of Object.keys(x))E&&u.add(Rm(E));continue}u.add(m)}}let d=()=>{let m,y=l.probe,x;if(y?yD(l,()=>{x=t[i]}):x=t[i],x===void 0){let _=!!t.state&&i in t.state,b=t.state?t.state[i]:void 0;if(_||b!==void 0)m=b;else{let w=t.context?.cases?.[i];if(w===void 0)return;try{m=typeof w=="function"?w.call(t,t):w}catch(S){m=!1,e.__conditionalError=S,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,S?.message||S)}}}else if(typeof x=="function")try{y?yD(l,()=>{m=x(t,t.state,t.context)}):m=x(t,t.state,t.context)}catch(_){m=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}else m=x;y&&(l.probe=!1);let E=c?!m:!!m;if(!t.node)return;let C=t.context?.designSystem;if(E===l.lastMatch){if(E&&f&&t.node.setAttribute){C&&mt(C);try{mD(t,n,o,f,l,!1)}finally{C&&ht()}}return}l.lastMatch=E,C&&mt(C);try{if(E){let _={},b={},w=!1,S=!1;for(let T in a){if(!Object.prototype.hasOwnProperty.call(a,T))continue;let O=a[T],B=T.charAt(0);if((B===":"||B==="@"||B==="&"||B==="[")&&O&&typeof O=="object"&&!Array.isArray(O)){if(kE(T,t)){let N=ed(O,t,!1,u);Object.keys(N).length&&(b[`[data-theme="${T.slice(1)}"] &`]=N,w=!0)}else{let N=EE(T,t),G=vE(N,O,t,u);Object.keys(G).length&&(b[N]=G,w=!0)}continue}let $=typeof O=="function"?O(t,t.state,t.context):O;if($!=null){if(T==="hide"||T==="show"){let N=xt[T]($,t,t.state,t.context);N&&N.display&&(S=!0)}else if(xt[T]){let N=xt[T]($,t,t.state,t.context);if(N){let G=Array.isArray(N)?N:[N];for(let Y of G)Y&&Object.assign(_,Y)}}else if(Bt&&Bt.has(T))_[T]=$;else if(td(T))_[T]=$;else if(T==="vars"){let N=Pm($,t);N&&Object.assign(_,N)}}}(S||l.hides)&&(l.hides=S,Am(t,o,S));let A=Object.keys(_);if(A.length){nr(t.node,_,t);for(let T of A){let O=r.get(T);O||(O=[],r.set(T,O));let B=O.findIndex($=>$.key===o);B!==-1&&O.splice(B,1),O.push({key:o,value:_[T]})}l.appliedKeys=A}else l.appliedKeys=null;if(w){let T=je(b,null,t.context?.cssPrefix,{state:!0}),O=T?T.split(" ").filter(Boolean):[];if(O.length&&t.node.classList){for(let B of O)t.node.classList.add(B);l.appliedClasses=O}else l.appliedClasses=null}else if(l.appliedClasses){for(let T of l.appliedClasses)t.node.classList.remove(T);l.appliedClasses=null}f&&t.node.setAttribute&&mD(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&S9(t,n,o,l),l.appliedKeys){for(let _ of l.appliedKeys){let b=r.get(_);if(!b)continue;let w=b.findIndex(S=>S.key===o);if(w!==-1)if(b.splice(w,1),b.length){let S=b[b.length-1].value,A=Dr(_),T=String(S).trim().replace(/\s*!important\s*$/,"");_c(t,t.node.style,A)!==T&&nr(t.node,{[_]:S},t)}else r.delete(_),td(_)?t.node.style.removeProperty(_):Dr(_)==="display"?od(t,""):t.node.style[_]=""}l.appliedKeys=null}if(l.hides&&(l.hides=!1,Am(t,o,!1)),l.appliedClasses){for(let _ of l.appliedClasses)t.node.classList.remove(_);l.appliedClasses=null}}}finally{C&&ht()}};e.__conditionalRunners.push(d);let p=t[i+"Deps"],g=Ht(t,p,d);x9()&&typeof(e.__exec&&e.__exec[i]||t[i])=="function"&&!(Array.isArray(p)&&p.length===0)&&(l.probe=!0);let h=K(g,{depth:e.path.length,label:_t(e,"conditional("+o+")")});l.probe&&(l.probe=!1),l.untrackedReads>0&&h._sources.size===0&&console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate read state on its first run without subscribing to it (\`in\`, Object.keys, a \`__\` key, parse()), so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). Declare \`${i}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally, or \`${i}Deps: []\` when it is static on purpose.`),e.__effects.push(h)}}var iE=new WeakSet,aE=new WeakMap;function E9(t){let e=aE.get(t);if(e==="painted")return!1;if(e===void 0){aE.set(t,"open");let n=t.defaultView,r=()=>{aE.set(t,"painted")};n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(r):setTimeout(r,0)}return!0}var cE=new WeakSet;function v9(t){if(cE.has(t))return;cE.add(t);let e=()=>{cE.delete(t);let r=t.body||t.documentElement;r&&r.offsetWidth},n=t.defaultView;n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(e):setTimeout(e,0)}function A9(t,e){let n=t.ownerDocument;if(n&&!E9(n)){if(ct.hydration!==null&&e&&e.context&&e.context.__hydration){v9(n);return}iE.has(n)||(iE.add(n),queueMicrotask(()=>{iE.delete(n);let r=n.body||n.documentElement;r&&r.offsetWidth}))}}var lE=new WeakSet,bD=!1;function _D(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function yE(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"?yE(s,o):o}return n}function iI(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=iI(o,e);Object.keys(s).length&&(n[r]=s)}else e(r)||(n[r]=o)}return n}function wD(t,e,n){let r=CE(t);if(!r)return!1;for(let o=0;o<r.length;o+=3){let s=r[o+1];if(!n.has(s))continue;let i=e[s];if(!(i==null||typeof i=="object")&&mL(r[o],i,r[o+2]))return!0}return!1}function C9(t,e,n){let r=1/0,o=-1/0;for(let i of e.values())i<r&&(r=i),i>o&&(o=i);if(n)for(let i of n.values())i>o&&(o=i);if(o<=r)return null;let s=null;for(let[i,a]of e){if(a===o)continue;let c=CE(i);if(c)for(let l=0;l<c.length;l+=3){let f=c[l],u=c[l+1],d=c[l+2],p=t[u]!=null?e.get(u):void 0,g=n&&n.get(f),h=p!==void 0&&p>a&&gm(f,t[u],d),m=!h&&g!==void 0&&g>a&&gm(f,void 0,d);if(h||m){h&&delete t[i],s||(s=new Set),s.add(i);break}}}return s}var SD=new Map;function CE(t){let e=SD.get(t);if(e!==void 0)return e;let n=er(t),r=vo[n];if(e=null,Array.isArray(r)){e=[];for(let o of r)e.push(o,Hu(o),n)}return SD.set(t,e),e}var aI=new Set(["page","zoom"]),T9=(t,e)=>{aI.add(t);let n=typeof CSS<"u"?CSS:null;if(!n||typeof n.supports!="function")return;let r=!1;try{r=n.supports(er(t),String(e))}catch{r=!1}r&&console.warn(`[smbls] css: "${t}: ${e}" is valid CSS, but smbls has no entry for "${t}", so the element gets no CSS for it. Write it in style: { ${t}: \u2026 } for now, and report the missing property.`)};function cI(t){let{node:e}=t;if(!e)return;if(bD||(bD=!0,je({display:"none"})),lE.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}lE.add(t);let n=t.context?.designSystem;n&&mt(n),lm();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=null,f=t.__ref&&t.__ref.__mergeLayer,u,d=null,p=null,g=!1,h=(_,b)=>{if(b&&typeof b=="object"&&_D(_)){c||(c={});let w=c[_];w&&(b=yE(w,b)),c[_]=b}else(b===null||typeof b!="object")&&(l||(l=new Set),l.add(_),u!==void 0&&(d||(d=new Map),d.set(_,u)));r[_]=b};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let _=xt.theme(t.theme,t,t.state,t.context);if(_){let b=w=>{for(let S in w){let A=w[S];A&&typeof A=="object"?_D(S)&&(i||(i={}),i[S]=A):CE(S)&&(a||(a=[])).push(S),r[S]=A}};if(Array.isArray(_))for(let w of _)w&&b(w);else b(_);o=!0}}let m=(_,b)=>{if(_==="vars"){let w=Pm(b);if(w){for(let S in w)h(S,w[S]);o=!0}return}if(_==="hide"||_==="show"){let w=xt[_](b,t,t.state,t.context);w&&w.display&&(g=!0);return}if(xt[_]){let w=xt[_](b,t,t.state,t.context);if(w){if(Array.isArray(w)){for(let S of w)if(S)for(let A in S)h(A,S[A])}else for(let S in w)h(S,w[S]);o=!0}}else if(Bt&&Bt.has(_))b!=null&&typeof b!="object"&&(h(_,b),o=!0);else if(_.charCodeAt(0)===45)b!=null&&typeof b!="object"&&(h(_,b),o=!0);else if(_.charAt(0)==="&"||_.charAt(0)==="@"||_.charAt(0)===":"||_.charAt(0)==="["){if(b&&typeof b=="object"&&!Array.isArray(b)){if(AE(b))return;let w=rI(_,b,t);w&&(h(w.cssProp,w.block),o=!0)}}else(typeof b=="string"||typeof b=="number")&&!aI.has(_)&&tt()&&T9(_,b)};if(typeof t.class=="string"){let _=m9(t.class,t.context?.designSystem?.class);if(_)for(let b in _)m(b,_[b])}let y=l?new Set(l):null,x=t.tag||"div";for(let _ of Object.keys(t)){if(typeof t[_]=="function"){let w=f&&f.get(_);w!==void 0&&Oo(x,_)&&(p||(p=new Map),p.set(er(_),w));continue}if(u=f?f.get(_):void 0,_==="vars"){m(_,t[_]);continue}if(qt.has(_)||_==="theme")continue;let b=_.charCodeAt(0);b>=65&&b<=90||cn(_)||wm(x,_)||m(_,t[_])}u=void 0;let E=d?C9(r,d,p):null;if(a&&l)for(let _ of a)l.has(_)||!(_ in r)||wD(_,r,l)&&delete r[_];if(i){let _=l?b=>l.has(b)||wD(b,r,l):null;for(let b in i){let w=_?iI(i[b],_):i[b];c&&c[b]&&(w=yE(w,c[b])),Object.keys(w).length?r[b]=w:delete r[b]}}if(c9(t,r,l,E?new Set([...y||[],...E]):y),Am(t,"static",g),o){r.display&&String(r.display).includes("!important")&&(nr(e,{display:r.display},t),delete r.display);let _=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof _=="string"&&_!==""&&r.display&&r.display!==_&&(r.display=_);let b=je(r,null,t.context?.cssPrefix);if(s=b?b.split(" ").filter(Boolean):[],b&&e.classList){let w=s,S=!1;for(let A of w)e.classList.add(A),S||(A.charCodeAt(0)===95&&A.charCodeAt(1)===99||A.charCodeAt(0)===95&&A.indexOf("_c",1)!==-1)&&(S=!0);S&&A9(e,t)}}let C=t.__ref;if(C){let _=C.__staticCssClasses;if(_&&e.classList){let b=new Set(s);for(let w of _)b.has(w)||e.classList.remove(w)}C.__staticCssClasses=s}l9(t)}finally{fm(),n&&ht(),lE.delete(t)}}var Fk=t=>!!xt[t]||!!(Bt&&Bt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Bk(t){t&&t.node&&cI(t)}function O9(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,tr(i,s))}let n=Zk(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"||qt.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!cn(o)&&!Oo(r,o)&&dn(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!To[o])continue;i=Xt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!Qs(Nr(o)||o))continue;let a=Nr(o)||o;e.setAttribute(a,tr(a,i))}}}function jk(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||cn(e))return;let o=t.tag||"div";if(Oo(o,e)||!dn(o,e))return;let s=Nr(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=To[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Xt.call(t,l,t.state)),Js(n,s,l)}function R9(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{}kD(o),Ro.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),vD(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){nd(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,xD(t,o);return}o.awaitingLayout=!1;let i=D9(n),a=I9(i),c=n.style.height;n.style.height="0px",a&&fE(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&fE(n);return}let f=M9(n,i),u=f!=null&&l<f?f:l,d=F9(i),p=d!=null&&u>d;n.style.height=$9(p?d:u,i)+"px",a&&fE(n),vD(n,o,p),o.lastMeasure=l,o.lastWidth=n.clientWidth,xD(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}kD(o),Ro.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,L9(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 nd(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Ro.add(t),rd())}function P9(){let t=Array.from(Ro);Ro.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=yc()),o.attachAttempts+=1,o.attachAttempts<=DD&&yc()-o.firstAttemptAt<ID&&(Ro.add(n),rd());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function xD(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,nd(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,nd(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function kD(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function L9(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&&nd(t,!0)},()=>{})}function D9(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var ei=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,TE=t=>(ei(t.paddingTop)||0)+(ei(t.paddingBottom)||0),lI=t=>(ei(t.borderTopWidth)||0)+(ei(t.borderBottomWidth)||0);function I9(t){if(!t)return!1;let e=String(t.transitionProperty||"").split(","),n=String(t.transitionDuration||"0s").split(",");for(let r=0;r<e.length;r++){let o=e[r].trim();if(!(o!=="all"&&o!=="height")&&parseFloat(n[r%n.length])>0)return!0}return!1}function fE(t){if(typeof t.getAnimations!="function")return;let e;try{e=t.getAnimations()}catch{return}for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.transitionProperty==="height")try{r.cancel()}catch{}}}function M9(t,e){if(!e||!t.hasAttribute||!t.hasAttribute("rows"))return null;let n=parseInt(t.getAttribute("rows"),10);if(!(n>0))return null;let r=ei(e.lineHeight)||N9(t,e);return r>0?n*r+TE(e):null}var Gu=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],ED=new WeakMap;function N9(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=ED.get(n);o||(o=new Map,ED.set(n,o));let s=Gu.map(l=>e[l]||"").join("|");if(o.has(s))return o.get(s);let i=n.createElement("textarea");i.rows=1,i.setAttribute("aria-hidden","true"),i.tabIndex=-1;let a=i.style;a.position="absolute",a.visibility="hidden",a.top="0",a.left="-9999px",a.height="auto",a.minHeight="0",a.maxHeight="none",a.padding="0",a.border="0",a.boxSizing="content-box",a.overflow="hidden";for(let l=0;l<Gu.length;l++)e[Gu[l]]&&(a[Gu[l]]=e[Gu[l]]);let c=0;try{r.appendChild(i),c=i.clientHeight}catch{c=0}finally{i.parentNode&&i.parentNode.removeChild(i)}return c>0?(o.set(s,c),c):null}function $9(t,e){return e?e.boxSizing==="border-box"?t+lI(e):e.boxSizing==="content-box"?Math.max(0,t-TE(e)):t:t}function F9(t){if(!t)return null;let e=ei(t.maxHeight);if(e==null||!(e>0))return null;let n=TE(t),r=lI(t),o=t.boxSizing==="border-box"?e-r:e+n,s=ei(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function vD(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 AD=["srcObject","muted"],B9=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function j9(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<AD.length;r++){let o=AD[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=B9(o,a);if(e[o]!==c)try{e[o]=c}catch(l){ee(n,o,l)}};if(typeof s=="function"){let a=Ht(t,t[o+"Deps"],s),c=K(()=>{try{i(a(t,t.state,t.context))}catch(l){ee(n,o,l)}},{depth:n.path.length,label:_t(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function U9(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"?Ht(t,t.autoGrowDeps,r):null,s=K(()=>{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}R9(t,a)},{depth:n.path.length,label:_t(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var fI=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function uI(t,e){let n=!1;for(let r of Object.keys(t)){if(!cn(r)||fI.has(r))continue;if(r==="onInView"||r==="onLeaveView"){n=!0;continue}let o=sm(r);if(o){im(o,t,t[r]);continue}let s=t[r],i=null;if(s&&typeof s=="object"&&!Array.isArray(s)&&(i=s,s=i.handler),s=Bu(t,s),typeof s!="function")continue;let a=rm(r);Yn.has(a)||Qa(Cz(a),t,s,i)}V9(t),n&&ct.viewEvents&&ct.viewEvents(t)}function V9(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of fI){let p=t[d];typeof p=="function"&&(n[d]=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,l=!1,f=d=>{let p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let g=p.clientX-i,h=p.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(g),x=Math.abs(h);if(Math.max(y,x)<o)return;let E;if(y>x*1.2)E=g<0?"left":"right";else if(x>y*1.2)E=h<0?"up":"down";else return;let C="onSwipe"+E.charAt(0).toUpperCase()+E.slice(1),_=n[C],b=n.onSwipe;_&&_.call(t,d,t,t.state,t.context),b&&b.call(t,{direction:E,dx:g,dy:h,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function OE(t,e,n,r,o,s,i,a){let c=e;(typeof c=="string"||typeof c=="number")&&(c={text:c});let l=r;if(typeof r=="function")try{l=r(t,c)}catch{l=null}let f=typeof r=="function"?Zu(l):o;if(a&&!i&&(f=Qu(f,Zu(e))),i){let u=e;(typeof e=="string"||typeof e=="number")&&(u={value:e,text:e}),c=l?{...l,state:u}:{state:u}}else l&&(c=Ue(l,c));return c=sd(c,s),{def:c,key:ND(c?.key,e,n,t),supplied:f,props:l}}function sd(t,e){if(!e||!t||t.ignoreChildExtends)return t;if(!t.extends)return{...t,extends:e};let n=Array.isArray(t.extends)?t.extends:[t.extends],r=Array.isArray(e)?e:[e];return{...t,extends:[...r,...n]}}var $r=t=>{let e=t&&t.__ref;if(!e||e.__if===!1||e.__mount&&e.__mount.held)return null;let n=t.node;return n&&n.nodeType!==11?n:null},dI=(t,e)=>e?e.nextSibling:zu(t.node,t.__ref.__textNode),Lm=(t,e,n)=>{let r=dI(t,n);return e!==r&&t.node.insertBefore(e,r),e},id=(t,e)=>{let n=dI(t,e);return n?{position:"before",node:n}:void 0};function RE(t,e,n){let r=null;for(let o=0;o<e.length;o++){if(n&&n.has(e[o]))continue;let s=$r(t[e[o]]);s&&(r=Lm(t,s,r))}}function CD(t,e,n,r){let o=ct.rows,s=o!==null&&t.childrenAs!=="state"&&t.tag!=="fragment"?o.track(t):null,i=PE(t,e,n,r,!0,s);return t.__ref.__plainRows=s&&(i||e==null||e===!1)?s:null,i}function PE(t,e,n,r,o,s){if(!e||!t.node)return;let i=t.childExtends,a=Po(t,"childProps"),c=t.__ref,l=ct.mount,f=r>0&&t.tag!=="fragment"&&c?r:0;if(Array.isArray(e)){let u=t.childProps,d=t.childrenAs==="state",p=(g,h)=>{let m=OE(t,e[g],g,u,a,i,d,o);s&&s.add(m.key,e[g],m,u,i);try{let y=Gt(ti(m.def,m.supplied),t,m.key,n,h);return!y&&s&&s.none(m.key),Em(t,y),y}catch(y){if(s&&s.failed(m.key),typeof console<"u"&&console.error){let x=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${m.key}" failed to construct at ${x} (initial render, skipping this row):`,y?.message||y)}return null}};if(!f){for(let g=0;g<e.length&&!(c&&c.__disposed);g++)p(g);return!0}return l.rows(t,e.length,p,f),!0}if(typeof e=="string"){let u=jD(e,t);if(Array.isArray(u))return PE(t,u,n,r,!0,s)}if(typeof e=="object"){let u=(p,g)=>{if(qt.has(p))return!1;let h=e[p];if(h==null||h===!1)return!1;let m=o?Qu(a,Zu(h)):a;(typeof h=="string"||typeof h=="number")&&(h={text:h}),t.childProps&&(h=Ue(t.childProps,h)),h=sd(h,i);let y=Gt(ti(h,m),t,Tm(t,p),n,g);return Em(t,y),y};if(!f){for(let p in e)u(p);return}let d=[];for(let p in e)d.push(p);l.rows(t,d.length,(p,g)=>u(d[p],g),f)}}function mc(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 f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Xt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function pI(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function",i=s||VD(t,"children");if(typeof n=="function"){let u=n,d=t.__ref,p=!1,g,h=Ht(t,t.childrenDeps,u),m=K(()=>{let y=p;p=!0;let x;try{x=h(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 run, treating as empty)"}:`,T?.message||T)}return}if(!y){g=x;return}if(x===t.children)return;iD(t,x),t.children=x,d.__mount&&d.__mount.chunkGen++;let E=typeof t.onContentUpdate=="function",C=E?[]:null,_=E?[]:null,b=E?[]:null;if(Array.isArray(x)&&t.childrenAs==="state"){let T=t.childProps,O=[],B=new Map;for(let Z=0;Z<x.length;Z++){let J=x[Z],Q=T;if(typeof T=="function")try{Q=T(t,J)}catch{Q=null}let it=ND(Q&&Q.key,J,Z,t);O.push(it),B.set(it,{rawChild:J,childProps:Q})}let $=new Set(O),N=tD(d,d.__children.slice());for(let Z of N)if(!$.has(Z)){let J=t[Z];J?.remove&&J.remove(),delete t[Z],_&&_.push(Z)}let G=t.childExtends,nt=!(t.tag==="fragment")&&!!t.node,ot=null,st=new Set;for(let Z of O){let J=B.get(Z),Q=J.rawChild,it=t[Z];if(it&&it.state){if(Q&&typeof Q=="object"){let yt=it.state,jt=yt.$replace||yt.replace,Ct=yt.$update||yt.update;try{if(typeof jt=="function")jt.call(yt,Q);else if(typeof Ct=="function"){for(let Pt in yt)if(!(Pt==="__element"||Pt==="root"||Pt==="parent"||Pt==="update")&&!Object.prototype.hasOwnProperty.call(Q,Pt))try{yt[Pt]=void 0}catch{}Ct.call(yt,Q)}else for(let Pt in Q)yt[Pt]=Q[Pt]}catch(Pt){if(typeof console<"u"&&console.error){let Ke=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${Z}" failed to patch at ${Ke} (reconcile, keeping its previous data for this pass):`,Pt?.message||Pt)}}}if(b&&b.push(Z),nt){let yt=$r(it);yt&&(ot=Lm(t,yt,ot))}continue}let rt=Q;(typeof Q=="string"||typeof Q=="number")&&(rt={value:Q,text:Q});let gt=J.childProps,q=sd(gt?{...gt,state:rt}:{state:rt},G),W=typeof T=="function"?Zu(gt):Po(t,"childProps"),Rt;try{Rt=Gt(ti(q,W),t,Z,e,nt?id(t,ot):void 0)}catch(yt){if(typeof console<"u"&&console.error){let jt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${Z}" failed to construct at ${jt} (reconcile, skipping this row):`,yt?.message||yt)}st.add(Z);continue}if(d.__disposed)return;if(nt){let yt=$r(Rt);yt&&(ot=yt)}C&&C.push(Z)}nt&&RE(t,O,st.size?st:null),d.__children=st.size?O.filter(Z=>!st.has(Z)):O,E&&(C.length||_.length)&&xm(t,{added:C,removed:_,kept:b}),mc(t,!1);return}if(t.childrenAs!=="state"&&d.__plainRows&&ct.rows.reconcile(t,d,x,e,E)){mc(t,!1);return}let A=E?[...d.__children]:null;for(let T of tD(d,[...d.__children])){let O=t[T];O?.remove&&O.remove(),delete t[T]}d.__children=[],CD(t,x,e,0),mc(t,!1),E&&xm(t,{added:[...d.__children],removed:A,kept:[]})},{depth:d.path.length,label:_t(d,"children")});d.__effects.push(m),n=g,iD(t,n),t.children=n}let a=ct.mount,c=a!==null?a.budgetOf(t,e):0,l=Wu(t.__ref),f=s?CD(t,n,e,c):PE(t,n,e,c,i);if(c&&Wu(t.__ref)>l){a.defer(t,c,()=>TD(t,e,n,r,o,f,c));return}TD(t,e,n,r,o,f,c)}function TD(t,e,n,r,o,s,i){let a=Wu(t.__ref);if(r!=null&&!(r&&r.__ref)){let c=r;typeof c=="string"||typeof c=="number"?c={text:c}:typeof c!="object"&&(c={}),t.childProps&&(c=Ue(t.childProps,c)),c=sd(c,o);let l=Qu(Po(t,"childProps"),Po(t,"content"));Em(t,Gt(ti(c,l),t,"content",e))}if(!(n&&!s)){if(i&&Wu(t.__ref)>a){ct.mount.defer(t,i,()=>OD(t,e,o,i));return}OD(t,e,o,i)}}function OD(t,e,n,r){let o=t.context?.components||{},s=t.__ref&&t.__ref.__runtimeSource,i=s?{}:null;{let l=Object.keys(t);for(let f=0;f<l.length;f++){let u=l[f];if(!u.endsWith("Extends")||typeof t[u]!="string")continue;let d=u.slice(0,-7);if(!d||d.charCodeAt(0)<65||d.charCodeAt(0)>90)continue;let p={extends:t[u]};delete t[u];for(let g=f+1;g<l.length;g++){let h=l[g],m=h.charCodeAt(0);if(m>=65&&m<=90||qt.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let y=t[h];y!==void 0&&(p[h]=y,delete t[h],i&&Ju(s,h)&&(i[d]||(i[d]={}),i[d][h]=s[h]))}t[d]&&typeof t[d]=="object"?t[d]={...p,...t[d]}:t[d]=p}}let a=Object.keys(t),c=l=>{if(qt.has(l)||typeof t[l]!="object"||t[l]===null)return!1;let f=l.charCodeAt(0);if(f<65||f>90)return!1;let u=t[l];if(u.__ref)return!1;if(!u.extends&&!u.extend){let p=o[l]||o[`smbls.${l}`];p&&(u={...u,extends:p})}t.childProps&&(u=Ue(t.childProps,u)),u=sd(u,n);let d=s?Qu(Po(t,"childProps"),Qu(i[l]||null,Po(t,l))):null;Em(t,Gt(ti(u,d),t,l,e))};if(!r){for(let l of a)c(l);return}ct.mount.run(t,a.length,l=>c(a[l]),r)}function bc(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 c=o.parentNode;if(c){if(n?.position==="before"&&n.node)c.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let l=n.node.nextSibling;c.insertBefore(r,l||o)}else c.insertBefore(r,o);nm();return}}let s=e?.node||(e?.nodeType?e:null);if(!s)return;if(!n&&ct.hydration!==null){let c=t.context&&t.context.__hydration;if(c&&ct.hydration.place(c,t,e,s,r))return}let i=n?.node,a=r.parentNode===s;if(i&&i.parentNode!==s)(!a||r.nextSibling)&&s.appendChild(r);else if(n?.position==="before"&&i)i!==r&&(!a||r.nextSibling!==i)&&s.insertBefore(r,i);else if(n?.position==="after"&&n.node){let c=n.node.nextSibling;c===r||(c?s.insertBefore(r,c):s.appendChild(r))}else(!a||r.nextSibling)&&s.appendChild(r);nm()}var Cm=3;function ym(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Cm?!1:(t.__inBeforeUpdate=!0,!0)}function Qn(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Cm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Cm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Jt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);Zn(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 l=e.context?.designSystem;l&&mt(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(p=>{fn(e,o,p)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(fn(e,o,u),e.context?.strictMode)throw u}finally{l&&ht(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var ad=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),yI=1e3,bI=24,LE=Object.freeze({}),ME=Object.freeze({}),wc=0,Dm=t=>{if(Et(t)||ad(t,"__ref"))return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function DE(t,e,n){if(t===null||typeof t!="object")return t;if(--wc<0||e>bI){wc=-1;return}if(Array.isArray(t)){let o=new Array(t.length);for(let s=0;s<t.length;s++)o[s]=n?t[s]:DE(t[s],e+1,!1);return o}if(n||!Dm(t))return t;let r={};for(let o in t)ad(t,o)&&(r[o]=DE(t[o],e+1,o==="extends"||o==="childExtends"));return r}function hI(t){wc=yI;let e;try{e=DE(t,0,!1)}catch{return LE}return wc<0?LE:e}function IE(t,e,n,r){if(t===e)return!0;if(t===null||typeof t!="object"||e===null||typeof e!="object"||--wc<0||n>bI)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||e.length!==t.length)return!1;for(let s=0;s<t.length;s++)if(r?t[s]!==e[s]:!IE(t[s],e[s],n+1,!1))return!1;return!0}if(r||Array.isArray(e)||!Dm(t)||!Dm(e))return!1;let o=0;for(let s in t)if(ad(t,s)&&(o++,!ad(e,s)||!IE(t[s],e[s],n+1,s==="extends"||s==="childExtends")))return!1;for(let s in e)ad(e,s)&&o--;return o===0}function gI(t,e){if(e===LE||e===ME)return!1;wc=yI;try{return IE(t,e,0,!1)}catch{return!1}}var Im=t=>De()?Ee(()=>hI(t)):hI(t),mI=(t,e)=>De()?Ee(()=>gI(t,e)):gI(t,e);function _I(t,e,n,r){let o=t;return o&&typeof o=="object"&&!Array.isArray(o)&&!Dm(o)&&(r||n&&!o.ignoreChildExtends)&&(o=r?Ue({},o):{...o}),typeof e=="function"?{item:o,props:r}:o}var wI=t=>({childProps:typeof t.childProps=="function"?void 0:t.childProps,childExtends:t.childExtends}),Mm=class{constructor(e,n){this.shared=e,this.rows=n}add(e,n,r,o,s){this.rows.set(e,Im(_I(n,o,s,r.props)))}failed(e){this.rows.set(e,ME)}none(e){this.rows.delete(e)}},H9=Object.freeze([]);function z9(t,e,n,r,o){let s=e.__plainRows.rows,i=e.__plainRows.shared,a=wI(t),c=mI(a,i),l=t.childProps,f=Po(t,"childProps"),u=t.childExtends,d=new Array(n.length),p=new Map;for(let w=0;w<n.length;w++){let S=OE(t,n[w],w,l,f,u,!1,!0);if(p.has(S.key))return!1;p.set(S.key,S),d[w]=S}for(let w=0;w<d.length;w++){let S=d[w];S.input=_I(n[w],l,u,S.props);let A=c?s.get(S.key):void 0;if(A===void 0)continue;let T=t[S.key];T&&T.__ref&&T.parent===t&&mI(S.input,A)&&(S.kept=!0,S.snap=A)}let g=o?[]:null;for(let w of s.keys()){let S=p.get(w);if(S&&S.kept)continue;let A=t[w];A?.remove&&A.remove(),delete t[w],g&&g.push(w)}let h=o?[]:null,m=o?[]:null,y=new Map,x=null,E=null;for(let w=0;w<d.length;w++){let S=d[w];if(S.kept){y.set(S.key,S.snap),m&&m.push(S.key);let O=$r(t[S.key]);O&&(E=Lm(t,O,E));continue}y.set(S.key,Im(S.input));let A;try{A=Gt(ti(S.def,S.supplied),t,S.key,r,id(t,E))}catch(O){if(y.set(S.key,ME),x||(x=new Set),x.add(S.key),typeof console<"u"&&console.error){let B=e.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${S.key}" failed to construct at ${B} (re-run, skipping this row):`,O?.message||O)}continue}if(e.__disposed)return!0;if(!A){y.delete(S.key);continue}let T=$r(A);T&&(E=T),h&&h.push(S.key)}e.__plainRows=new Mm(c?i:Im(a),y);let C=Array.from(y.keys());RE(t,C,x);let _=new Set(e.__children),b=[];for(let w=0;w<C.length;w++)_.has(C[w])&&b.push(C[w]);for(let w of e.__children)y.has(w)||b.push(w);return e.__children=b,o&&(h.length||g.length)&&xm(t,{added:h,removed:g,kept:m}),!0}var SI={track:t=>new Mm(Im(wI(t)),new Map),reconcile(t,e,n,r,o){let s=Array.isArray(n)?n:n==null||n===!1?H9:null;return!!s&&z9(t,e,s,r,o)}};var Nm=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?Nm(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},W9=new Set(["src","srcset"]),K9=new Set(["sizes","loading","fetchpriority","decoding","crossorigin","referrerpolicy","width","height"]),q9=new Set(["sizes","media","type","width","height"]),G9=t=>t==="img"?K9:t==="source"?q9:null,Y9=t=>t.charCodeAt(0)===97&&t.startsWith("aria-")||t.charCodeAt(0)===100&&t.startsWith("data-")&&t!=="data-br"&&t!=="data-key",xI=(t,e)=>{for(let n of e){let r=t.nodes.get(n.target);r&&(r.delete(n.attributeName),r.size||t.nodes.delete(n.target))}},X9=(t,e,n)=>{let r=t.built;if(!r){let o=e.ownerDocument&&e.ownerDocument.defaultView&&e.ownerDocument.defaultView.MutationObserver||(typeof MutationObserver=="function"?MutationObserver:null);if(!o)return!1;let s=new Map;r=t.built={nodes:s,observer:null},r.observer=new o(i=>xI(r,i))}return r.nodes.set(e,new Set(n)),r.observer.observe(e,{attributes:!0,attributeFilter:n}),!0};function Io(t){let e=t&&t.built;if(!e)return 0;t.built=null,xI(e,e.observer.takeRecords()),e.observer.disconnect();let n=0;for(let[r,o]of e.nodes)for(let s of o)r.hasAttribute(s)&&(r.removeAttribute(s),n++);return e.nodes.clear(),n}function NE(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=Jn(t);if(n==="string"||n==="fragment")return null;let r=Nm(t),o=e.registry[r===""?"__root":r],s=o!==void 0?e.nodes[o]:null;if(!s||s.nodeType!==1||e.claimed.has(s))return o!==void 0&&e.misses++,null;let i=Ir(n)&&(n==="svg"||t.parent?.node?.namespaceURI===Ys),a=Ir(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===Ys:s.namespaceURI!==Ys;if(s.localName!==a||!c)return e.misses++,null;e.claimed.add(s),e.adopted++;let l=e.pending;if(l&&l.delete(s)){let d=s.parentNode,p=d?(e.pendingIn.get(d)||1)-1:0;p>0?e.pendingIn.set(d,p):d&&e.pendingIn.delete(d)}let f=null,u=G9(s.localName);for(let d of Array.from(s.getAttributeNames?s.getAttributeNames():[]))W9.has(d)||d==="data-key"||u&&u.has(d)||(Y9(d)?(f||(f=[])).push(d):s.removeAttribute(d));if(f&&!X9(e,s,f))for(let d of f)s.removeAttribute(d);if(l){let d=0,p=0,g=s.firstChild,h=t.text!=null&&g&&g.nodeType===3&&!l.has(g)?g:null;for(let m=s.firstChild;m;){let y=m.nextSibling;m!==h&&!l.has(m)&&(m.nodeType===3?d++:m.nodeType!==8&&p++,s.removeChild(m)),m=y}(p||d>(t.text!=null&&!h?1:0))&&(e.whole||(e.whole=new Set)).add(t)}else for(;s.firstChild;)s.removeChild(s.firstChild);return s.localName==="img"&&s.complete&&s.naturalWidth>0&&Z9(s),s}var J9=500;function Z9(t){let e=!1,n=!1,r=o=>{o.isTrusted&&(n?o.stopImmediatePropagation():e=!0,t.removeEventListener("load",r,!0))};t.addEventListener("load",r,!0),setTimeout(()=>{if(!e){if(!(t.complete&&t.naturalWidth>0)){t.removeEventListener("load",r,!0);return}n=!0,t.dispatchEvent(new Event("load")),setTimeout(()=>t.removeEventListener("load",r,!0),J9)}},0)}function Q9(t,e,n,r,o){if(o.parentNode===r&&t.claimed.has(o))return!0;let s=t.pendingIn;if(!s||!s.has(r))return!1;let i,a=n&&n.__ref,c=a&&a.__children,l=c?c.lastIndexOf(e.key):-1;for(let f=l-1;f>=0;f--){let u=n[c[f]],d=u&&u.node;if(d&&d!==o&&d.parentNode===r){i=d.nextSibling;break}}return i===void 0&&(i=zu(r,a&&a.__textNode)),i===o||r.insertBefore(o,i),!0}function tW(t,e){let n=t.whole;if(!n)return!1;if(n.has(e))return!0;let r=e.parent;return!r||!n.has(r)?!1:(n.add(e),!0)}var kI={adopt:NE,place:Q9,whole:tW,settle:Io};var oi=50;function rr(t){return t===!0?oi:typeof t=="number"&&t>0?t:0}var Pn=[],xc=!1,Mo=0,Fr=oi,fd=!1,Fm=[],Bm=typeof performance<"u"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),$m=[],cd=null;function eW(t){if(!cd){let e=new MessageChannel;e.port1.onmessage=()=>{let n=$m.shift();!$m.length&&typeof e.port1.unref=="function"&&e.port1.unref(),n&&n()},cd=e}$m.push(t),$m.length===1&&typeof cd.port1.ref=="function"&&cd.port1.ref(),cd.port2.postMessage(0)}function jE(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof setImmediate=="function"){setImmediate(t);return}if(typeof MessageChannel=="function"){eW(t);return}setTimeout(t,0)}function or(){return new Promise(t=>jE(t))}var ld=0,FE=0,BE=0,Sc=0;function UE(){ld=0,FE=Mo,BE=0,Sc=0}function EI(){if(!Mo)return!1;if(ld++,Sc>0)return Sc--,!1;let t=Bm(),e=t-Mo,n=e/ld,r=(t-FE)/(ld-BE),o=r>n?r:n;FE=t,BE=ld;let s=Fr-e-o;return s<=0?(fd=!0,!0):(Sc=o>0?Math.floor(s/o/2):0,!1)}var ri=0;function vI(t=oi){ri===0&&!Mo?(Mo=Bm(),fd=!1,Fr=t,UE()):t<Fr&&(Fr=t,Sc=0),ri++}var Ve=null,$E=!1,nW=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);function VE(){Mo=0,fd=!1,Fr=oi,UE()}function rW(){$E||($E=!0,nW(()=>{$E=!1,ri===0&&VE()}))}function AI(){ri>0&&ri--,!(ri!==0||Ve!==null)&&(xc?rW():VE())}function HE(t,e=oi,n=null){let r={fn:t,budget:e,lease:n};Ve?Ve.push(r):Pn.push(r),xc||(xc=!0,jE(CI))}function zE(t){let e=t&&t.context;return e&&e.__mountLease||null}function ud(t){if(!t)return;let e=0;for(let n=0;n<Pn.length;n++){let r=Pn[n];r.lease!==t&&(Pn[e++]=r)}if(Pn.length=e,Ve){let n=0;for(let r=0;r<Ve.length;r++)Ve[r].lease!==t&&(Ve[n++]=Ve[r]);Ve.length=n}typeof t.lost=="function"&&t.lost()}function oW(t){if(t.lease!==null&&!t.lease.live()){ud(t.lease);return}let e=Ve;Ve=[];try{t.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{let n=Ve;Ve=e,n.length&&Pn.unshift(...n)}}function Ae(){return!xc&&!Pn.length?Promise.resolve():new Promise(t=>Fm.push(t))}function No(){return!xc&&!Pn.length}function sW(){if(!Fm.length)return;let t=Fm;Fm=[];for(let e=0;e<t.length;e++)t[e]()}function CI(){for(Mo=Bm(),fd=!1,Fr=1/0,UE();Pn.length;){let t=Pn.shift();if(t.budget<Fr&&(Fr=t.budget,Sc=0),oW(t),fd||Bm()-Mo>=Fr)break}if(ri=0,VE(),Pn.length){jE(CI);return}xc=!1,sW()}function jm(t){sc(t.__ref).pending++}function He(t){let e=t&&t.__ref,n=e&&e.__mount;if(!n||!(n.pending>0)||--n.pending>0||e.__disposed)return;let r=n.tail;r&&(n.tail=null,r())}function Um(t){let e=t&&t.__ref&&t.__ref.__mount;return!!(e&&e.tail)}function Br(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.tail?Promise.resolve(t):new Promise(n=>{(e.waiters||(e.waiters=[])).push(n)})}function WE(t,e=t&&t.__ref){let n=e&&e.__mount,r=n&&n.waiters;if(r){n.waiters=null;for(let o=0;o<r.length;o++)r[o](t)}}function TI(t,e=t&&t.__ref){let n=e&&e.__mount;if(!n||!n.tail)return;n.tail=null,n.pending=0;let r=n.holder;n.holder=null,WE(t,e),r&&He(r)}function iW(t,e){let n=e&&e.mountYield;if(!n&&!t.yieldChildren)return 0;let r=ct.hydration!==null&&t.context?t.context.__hydration:null;if(r&&ct.hydration.whole(r,t))return 0;let o=n?rr(n):0,s=rr(t.yieldChildren);return o&&s?o<s?o:s:o||s}function OI(t,e,n,r,o){vI(r);try{RI(t,t.__ref,0,e,n,r,o,!1)}finally{AI()}}function RI(t,e,n,r,o,s,i,a){try{for(let c=n;c<r;c++){let l=e.__mount,f=l?l.pending:0;if(o(c)===!1)continue;if(e.__disposed)break;let u=EI(),d=e.__mount;if(c+1<r&&(u||(d?d.pending:0)>f)){i&&i.onSuspend&&i.onSuspend(),a||jm(t);let p=c+1;HE(()=>aW(t,e,p,r,o,s,i),s,zE(t));return}}}catch(c){if(!a)throw c;Om(t,c)}a&&He(t)}function aW(t,e,n,r,o,s,i){if(e.__disposed||i&&i.isStale&&i.isStale()){He(t);return}RI(t,e,n,r,o,s,i,!0)}function cW(t,e,n){jm(t),HE(()=>{try{let r=t.__ref;r&&!r.__disposed&&n()}catch(r){Om(t,r)}finally{He(t)}},e,zE(t))}function lW(t,e,n,r){let o=t.__ref,s=sc(o),i=++s.chunkGen,a=t.node,c=[],l=!1;OI(t,e,f=>{let u=n(f,l?id(t,fW(a,c)):void 0),d=PI(u);return d?c.push(d):u&&u.__ref.__mount&&u.__ref.__mount.held&&c.push(u),u},r,{isStale:()=>s.chunkGen!==i,onSuspend:()=>{l=!0}})}function PI(t){let e=$r(t);if(e)return e;let n=t&&t.__ref;return n&&n.__if!==!1&&t.tag==="fragment"&&n.__fragmentAnchor||null}function fW(t,e){for(let n=e.length-1;n>=0;n--){let r=e[n].__ref?PI(e[n]):e[n];if(r&&r.parentNode===t)return r}return null}function uW(t,e){let n=t.__ref;try{mc(t,!0),$D(t),_E(t,e)}finally{WE(t,n);let r=n.__mount,o=r&&r.holder;o&&(r.holder=null,He(o))}}var LI={budgetOf:iW,run:OI,rows:lW,defer:cW,hold:jm,finish:uW,abandon:TI};function DI(){ct.viewEvents=KP,ct.chains=VP,ct.rows=SI,ct.hydration=kI,ct.mount=LI}DI();Mt();var dd="inertOutside",pW=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),hW='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',gW={attributes:!0,attributeFilter:["inert"]},II=new WeakMap,MI=new WeakMap,pd=new Set,NI=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function $o(t){try{return Ee(t)}catch(e){console.error("[smbls] inertOutside:",e)}}function $I(t){let e=()=>$o(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function mW(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=II.get(t);if(e)return e;let n=t.defaultView.MutationObserver||globalThis.MutationObserver;return typeof n!="function"?null:(e={doc:t,layers:[],held:new Map,top:null,observer:null},e.observer=new n(r=>$o(()=>Vm(e,r))),II.set(t,e),e)}function KE(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function yW(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var FI=t=>!!(t.closest&&t.closest("[inert]"));function bW(t){let e=t.ownerDocument,n=new Set,r=[];for(let o=t;o!==e.body;o=o.parentNode){let s=o.parentNode;if(!s||s.nodeType!==1||s===e.documentElement)break;r.push(s);for(let i=s.firstElementChild;i;i=i.nextElementSibling)i!==o&&!pW.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function BI(t,e){for(let n=0;n<e.length;n++){let{type:r,target:o}=e[n];r==="attributes"&&t.held.has(o)&&t.held.set(o,!o.hasAttribute("inert"))}}function Vm(t,e){let{doc:n,held:r,observer:o}=t;e&&BI(t,e),BI(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=KE(u,n);d&&!u.live&&(i.push(u),u.returnFocus=yW(n)),u.live=d}i.length&&(t.layers=t.layers.filter(u=>!i.includes(u)).concat(i));let a=null;for(let u=t.layers.length-1;u>=0&&!a;u--)t.layers[u].live&&(a=t.layers[u]);t.top=a;let{outside:c,parents:l}=a?bW(a.element.node):{outside:new Set,parents:[]};for(let[u,d]of r)c.has(u)||(d&&u.removeAttribute("inert"),r.delete(u));for(let u of c)r.has(u)||r.set(u,!1),u.hasAttribute("inert")||(u.setAttribute("inert",""),r.set(u,!0));o.takeRecords(),o.disconnect();for(let u of l)o.observe(u,{childList:!0});for(let u of r.keys())o.observe(u,gW);t.layers.some(u=>!u.live)?pd.add(t):pd.delete(t);for(let u of t.layers)!u.live&&!u.connecting&&!Za(u.element)&&(u.connecting=!0,Eo(u.element,()=>$o(()=>{u.connecting=!1,u.declared&&!u.live&&KE(u,t.doc)&&Vm(t)})));if(a===s)return;let f=s&&!(s.declared&&s.live)?s:null;if(a&&i.includes(a))f&&f.returnFocus&&(a.returnFocus=f.returnFocus),$I(()=>UI(t,a));else if(f){let u=f.returnFocus;$I(()=>_W(t,f,u))}f&&(f.returnFocus=null)}function UI(t,e){let n=e.element.node;if(t.top!==e||!n||!n.isConnected)return;let r=t.doc,o=r.activeElement;if(o&&n.contains(o))return;let s=new Set,i=(a,c)=>{if(s.has(a)||(s.add(a),a.matches(":disabled")))return!1;let l=c&&a.getAttribute("tabindex");return l&&parseInt(l,10)<0?!1:(a.focus(),r.activeElement===a)};for(let a of n.querySelectorAll("[autofocus]"))if(i(a,!1))return;for(let a of n.querySelectorAll(hW))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function _W(t,e,n){if(e.declared&&e.live)return;let r=t.doc,o=r.activeElement,s=e.element.node;(!o||o===r.body||s&&s.contains(o)||FI(o))&&(n&&n.isConnected&&n.ownerDocument===r&&!FI(n)&&(n.focus({preventScroll:!0}),r.activeElement===n)||t.top&&UI(t,t.top))}function qE(t,e){if(t.declared===e)return;let n=t.manager;if(t.declared=e,t.live=!1,e)n.layers.push(t);else{let r=n.layers.indexOf(t);r!==-1&&n.layers.splice(r,1)}Vm(n)}function VI(t){let e=t[dd];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function jI(t){let e=MI.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=mW(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,connecting:!1,returnFocus:null},MI.set(t,e);let s=K(()=>{let i=VI(t);$o(()=>qE(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+dd});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>$o(()=>qE(e,!1))),e}function wW(){for(let t of pd){if(!t.doc.defaultView){pd.delete(t);continue}t.layers.some(e=>!e.live&&KE(e,t.doc))&&Vm(t)}}var Hm={name:dd,create(t){NI(t,dd)&&$o(()=>jI(t))},render(){pd.size&&$o(wW)},update(t){NI(t,dd)&&$o(()=>{let e=jI(t);e&&qE(e,VI(t))})}};var HI={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["gray-168","gray+168"],caption:["gray-68","gray+68"],paragraph:["gray-42","gray+42"],disabled:["gray-26","gray+26"],line:["gray-16","gray+16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},zI={"gradient-blue-light":`linear-gradient(to right,
60
+ `):"")}}function EE(t,e){if(typeof t.html=="function"&&t.node&&!t.node.innerHTML&&fn(t,()=>{try{let n=t.html(t,t.state,t.context);n!=null&&typeof n!="function"&&(t.node.innerHTML=n)}catch{}}),Zt("Create",t,e),Zt("Complete",t,e),Zt("Render",t,e),Zt("RenderRouter",t,e),yE(t,e),typeof t.onFrame=="function"){let n=t.onFrame,r=t.context?.designSystem,o=()=>{if(t.node){if(t.node.isConnected){r&&mt(r);try{n(t,t.state,t.context)}catch(s){console.error("[DOMQL] onFrame error:",s)}finally{r&&ht()}}requestAnimationFrame(o)}};requestAnimationFrame(o)}}function Tm(t,e){let n=e&&e.__ref&&e.__ref.__mount;!n||!n.tail||n.holder||(n.holder=t,ct.mount.hold(t))}var HH=new Set(["childProps","attr","style","scope","data","vars"]);function WD(t,e,n,r,o,s){if(n&&!e.extends&&!e.extend){let h=n.indexOf("_"),m=n.indexOf("."),y=h>0?h:-1;if(m>0&&(y<0||m<y)&&(y=m),y>0){let x=n.substring(0,y),E=t.context?.components;E&&(E[x]||E["smbls."+x])?e={...e,extends:x}:E&&tt()&&(/^[A-Z]\w*_\d+$/.test(n)||/^[A-Z]\w*\.\w+$/.test(n))&&console.warn(`[smbls] auto-extend: key "${n}" looks like an instance of "${x}" but neither "${x}" nor "smbls.${x}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),rc(t,e,s);let i=Uk(t),a=t.props&&typeof t.props=="object"?t.props:null;for(let h in e)if(!(h==="parent"||h==="node"||h==="__ref"||h==="extends"||h==="context"||h==="props")){if(h==="key"){r&&(t.key=o?Lm(o,r):r);continue}i&&i.mark(h),sE(t,h,e[h])}if(a)for(let h in a)sE(t,h,a[h]);let c=e.props;if(c&&typeof c=="object"){for(let h in c)sE(t,h,c[h]);if(i)for(let h in c)i.mark(h)}OL(t),e.classlist!==void 0&&(t.classlist=e.classlist),e.text!==void 0&&(t.text=e.text),e.html!==void 0&&(t.html=e.html);let l=t.scope&&typeof t.scope=="object"?t.scope:null,f=o?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,d=f||u||null;if(e.scope!==void 0||l){let h={};l&&Object.assign(h,l),e.scope!==void 0&&Object.assign(h,e.scope),t.scope=Op(h,d)}else d&&(t.scope=d);e.if!==void 0&&(t.if=e.if);let p=t.__ref,g=f9(t,p&&p.__runtimeSource);return p&&(p.__declaredArrays=g||void 0),fc(t),GH(t,o,e,s),e}function sE(t,e,n){let r=t[e],o=ct.chains;if(o!==null&&o(t,e,r,n))return;let s=r&&n&&typeof r=="object"&&typeof n=="object"&&!Array.isArray(r)&&!Array.isArray(n);s&&e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90?t[e]=Ve(r,n):s&&HH.has(e)?t[e]={...r,...n}:s&&VD(e)?t[e]=Ve(r,n):t[e]=n}var WH=new Set(["key","parent","context","__ref"]);function KH(t,e){for(let r of Object.keys(t))WH.has(r)||delete t[r];let n=e.definition;if(!n.extends&&!n.extend&&typeof e.key=="string"){let r=t.context?.components||{},o=r[e.key]||r["smbls."+e.key];o&&(n={...n,extends:o})}ve(()=>WD(t,n,e.key,e.ownKey,t.parent,e.options))}function qH(t,e,n){let r=n||{},o=a=>!!(r[a]||r["smbls."+a]),s=[],i=[];if(t.extends&&i.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&i.push(...Array.isArray(t.extend)?t.extend:[t.extend]),i.length){for(let a of i){if(typeof a!="string")continue;let c=a.includes(">")?a.split(">")[0].trim():a;o(c)||s.push(c)}return s}if(typeof e=="string"&&/^[A-Z]/.test(e)){let a=-1,c=e.indexOf("_"),l=e.indexOf(".");c>0&&(a=c),l>0&&(a<0||l<a)&&(a=l);let f=a>0?e.substring(0,a):e;o(f)||s.push(f)}return s}function iE(t,e,n){if(typeof t.onStateInit!="function"&&!Vk(t,"stateInit"))return;let r=t.state;t.state=e;try{Zt("StateInit",t,n)}finally{t.state=r}}var aE=t=>({isDataOnlyKey:e=>io(t).has(e)});function GH(t,e,n,r){let o=!e,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,i=o&&s&&t.context?.state,a=n.state!==void 0&&!i?n.state:t.state&&!Et(t.state)?t.state:void 0;if(a==null){if(e?.state)t.state=e.state,Ae(t,t.state);else if(t.context?.state){let c=t.context.state,l={...c},f=t.context?.polyglot;if(f?.translations){let u=t.context,d=c.lang||f.defaultLang||"en",p=new Set,g=(y,x)=>{p.has(y)||cs(u,y,l)&&(l[y]=x,p.add(y),Wn(u,y,x))},h=f.translations[d];if(h&&typeof h=="object")for(let y in h)g(y,h[y]);let m=new Set(En(f,!1));for(let y in f.translations)m.has(y)||g(y,f.translations[y])}Et(l)||iE(t,l,r),t.state=Et(l)?l:lr(l,aE(t.context)),t.state.__element=t,t.state.root=t.state,Ae(t,t.state),da?.(c,t.state),Zt("StateCreated",t,r)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),Ae(t,t.state);return}if(typeof a=="string"){if(t.state=qD(a,e),t.state&&typeof t.state=="object"&&!Et(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}Ae(t,t.state),XH(t,a,e),Zt("StateCreated",t,r);return}if(typeof a=="function"){let c=a(t,e?.state);if(Et(c))t.state=c;else{let l=c||{};iE(t,l,r),t.state=lr(l,e?.state?void 0:aE(t.context))}}else if(Et(a))t.state=a;else{let c={...a};iE(t,c,r),t.state=lr(c,e?.state?void 0:aE(t.context))}t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,Ae(t,t.state),da?.(a,t.state),Zt("StateCreated",t,r)}function iD(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 KD(t,e){let n=e.state;return t.startsWith("~/")?[n&&(n.root||n),t.slice(2)]:t.startsWith("../")?[n,t.slice(3)]:[n,t]}function qD(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")||t.startsWith("~/")){let[o,s]=KD(t,e);return s?iD(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let n=iD(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{}}function YH(t,e){let[n,r]=KD(t,e);if(!r||!n||typeof n!="object")return;let o=n[r];if(o!==void 0||r.indexOf("/")===-1)return o;let s=n;for(let i of r.split("/")){if(s==null||typeof s!="object")return;s=s[i]}return s}function XH(t,e,n){let r=t.__ref;if(!r||!n||e==="."||!Et(n.state))return;r.__stateBinding&&r.__stateBinding.dispose();let o=ve(()=>K(()=>{let s=YH(e,n);!s||typeof s!="object"||s===t.state||ve(()=>GD(t,t.state,s,!0))},{depth:r.path?r.path.length:0,label:_t(r,"state")}));o._isStateBinding=!0,r.__stateBinding=o,r.__effects&&r.__effects.push(o)}function GD(t,e,n,r){let o=t.__ref;if(!o)return;if(r||t.state===e){t.state=n,r&&Ae(t,n),cD(o);let i=o.__children;if(i)for(let a=0;a<i.length;a++){let c=t[i[a]];c&&c.__ref&&c.parent===t&&GD(c,e,n,!1)}return}if(o.__stateBinding){o.__stateBinding._notify();return}let s=t.state;s&&typeof s=="object"&&s.parent===e&&(s.parent=n,cD(o))}function aD(t,e){let n=t.__ifParked;if(!n||!n.size)return e;for(let r of n)e.includes(r)||e.push(r);return e}function cD(t){let e=t.__effects;if(e)for(let n=0;n<e.length;n++){let r=e[n];r&&!r._disposed&&!r._isStateBinding&&!r._isSubscribeToEffect&&typeof r._notify=="function"&&r._notify()}}var JH=new Set(["s","state","ctx","context"]),cE=new WeakMap;function ZH(t){if(cE.has(t))return cE.get(t);let e=null;try{let n=typeof Me=="function"?Me(t):Function.prototype.toString.call(t);if(typeof n=="string"){let r=n.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||n.match(/^[^(]*\(([^)]*)\)/);r&&(e={params:r[1].split(",").map(o=>o.trim())})}}catch{}return cE.set(t,e),e}function QH(t){let e=ZH(t);return e?e.params.map(n=>n.split("=")[0].trim()).filter(Boolean):[]}var t9=3,e9=/^(is|has)[A-Z0-9_$]/,n9=new Set(["routerOptions"]),lD=new WeakSet;function r9(t,e){if(typeof t!="function"||t.length!==2||e&&(e9.test(e)||n9.has(e))||lD.has(t))return!1;let n=QH(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<t9||JH.has(r)?!1:(lD.add(t),!0)}function o9(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"||Gt.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||ln(a)||xt[a]||Bt&&Bt.has(a)||c!==45&&(pn(n,a)||(tt()&&r9(t[a],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&&mt(r);try{return c(t,t.state,t.context)}catch{return}finally{r&&ht()}},set(l){delete e.__exec[a],Object.defineProperty(t,a,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function s9(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 zt(t,e,n){return!Array.isArray(e)||e.length===0?n:function(...r){return s9(t,e),n.apply(this,r)}}function dc(t,e){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[e]}function _t(t,e){return()=>t.path.join(".")+"::"+e}var fD=new Set;function ne(t,e,n){if(!tt())return;let r=_t(t,e)();fD.has(r)||(fD.add(r),console.warn(`[smbls] "${e}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,n?.message||n))}var uD=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,dD=new WeakMap,i9=t=>{let e=dD.get(t);if(e!==void 0)return e;e=null;let n;try{n=String(t)}catch{n=""}if(n.includes("{{")){uD.lastIndex=0;let r;for(;(r=uD.exec(n))!==null;)r[2].includes("{{")&&(e||(e=[])).push(r[2])}return dD.set(t,e),e},a9=(t,e)=>{let n=i9(t);if(n)for(let r=0;r<n.length;r++)e.add(n[r])},c9=(t,e)=>!ln(t)&&!Ro(e,t),lE=(t,e,n,r,o)=>{if(typeof e=="string"){!o&&e.includes("{{")&&n.add(e);return}typeof e=="function"&&c9(t,r)&&a9(e,n)},bE=new WeakMap,ed=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),nd=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;let e=t.props;return e&&typeof e=="object"&&!Array.isArray(e)?Ve(t,e):t},rd=(t,e)=>t&&e?Ve(t,e):t||e||null,YD=(t,e)=>{let n=t.__ref&&t.__ref.__runtimeSource;return!!n&&ed(n,e)},Lo=(t,e)=>YD(t,e)?nd(t.__ref.__runtimeSource[e]):null,ei=(t,e)=>(e&&t&&typeof t=="object"&&bE.set(t,e),t),l9=t=>{if(!t||typeof t!="object")return;let e=bE.get(t);return e&&bE.delete(t),e},_E=(t,e,n)=>{if(typeof t=="string"){t.includes("{{")&&e.add(t);return}if(!(!t||typeof t!="object"||n.has(t))){if(n.add(t),Array.isArray(t)){for(let r=0;r<t.length;r++)_E(t[r],e,n);return}if(!t.__ref)for(let r of Object.keys(t)){if(r==="state")continue;let o=Object.getOwnPropertyDescriptor(t,r);o&&"value"in o&&_E(o.value,e,n)}}},f9=(t,e)=>{let n=null;for(let r of Object.keys(t)){if(Gt.has(r)||e&&ed(e,r))continue;let o=Object.getOwnPropertyDescriptor(t,r),s=o&&o.value;if(!Array.isArray(s))continue;let i=new Set;_E(s,i,new Set),i.size&&(n||(n=new Map),n.set(s,i))}return n},pD=(t,e)=>{if(Array.isArray(e))for(let n=t;n;n=n.parent){let r=n.__ref&&n.__ref.__declaredArrays,o=r&&r.get(e);if(!o)continue;let s=t.__ref;s.__authoredTemplates||(s.__authoredTemplates=new Set);for(let i of o)s.__authoredTemplates.add(i);return}},XD=["attr","aria","data","metadata"],u9=t=>{if(XD.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},d9=(t,e)=>{let n=new Set,r=t.tag||"div";for(let o of Object.keys(t)){let s=Object.getOwnPropertyDescriptor(t,o),i=s&&s.value,a=!!e&&ed(e,o);if(i&&typeof i=="object"&&!Array.isArray(i)){if(!u9(o))continue;let c=a?e[o]:null,l=c&&typeof c=="object"?c:null,f=o.charCodeAt(0)===46||o.charCodeAt(0)===33;for(let u in i){let d=a&&(!l||ed(l,u)),p=i[u];if(f&&p&&typeof p=="object"&&!Array.isArray(p)&&XD.includes(u)){for(let g in p)lE(g,p[g],n,r,d);continue}lE(u,p,n,r,d)}continue}lE(o,i,n,r,a)}return n};function JD(t,e){let n=t.__ref,r=!!(e&&e.skipIfEffect),o=d9(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(o9(t),typeof t.text=="function"){let c=t.text,l=zt(t,t.textDeps,c),f=K(()=>{if(!n.contentManaged)try{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=Jt.call(t,u,t.state)),Js(t,u))}catch(u){ne(n,"text",u)}},{depth:n.path.length,label:_t(n,"text")});n.__effects.push(f),n.__exec.text=c}else if(typeof t.text=="string"&&t.text.includes("{{")){let c=t.text,l=K(()=>{if(n.contentManaged)return;let f=Jt.call(t,c,t.state);f!=null&&(t.text=f),t.node&&Js(t,f??"")},{depth:n.path.length,label:_t(n,"text")});n.__effects.push(l),n.__exec.text=c}let s=t.tag||"div";for(let c of Object.keys(t))if(typeof t[c]=="function"&&!Gt.has(c)&&!ln(c)&&!n.__exec[c]&&!Em(s,c)){if(xt[c]){let l=t[c],f=zt(t,t[c+"Deps"],l),u=c,d,p=null,g=null,h,m=()=>{for(let E of g)t.node.classList.remove(E);g=null,h=void 0},y=()=>{rI(t,u,p,null),vm(t,u,null),p=null},x=K(()=>{let E=t.context?.designSystem;E&&mt(E);try{let C=f(t,t.state,t.context);pm();let _;try{_=xt[u](C,t,t.state,t.context)}finally{hm()}if(Array.isArray(_)){let b={};for(let w of _)if(w)for(let S in w)b[S]=w[S];_=b}if(u==="show"||u==="hide"){t.node&&Rm(t,u,!!(_&&_.display),!0);return}if(_&&t.node&&g9(_)){let b=hc(_);if(b===null||b!==h){h=b;let w=Ue(_,null,t.context?.cssPrefix),S=w?w.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(let A of g)t.node.classList.remove(A);if(S&&S.length)for(let A of S)t.node.classList.add(A);g=S}}p&&y(),d=void 0}else if(_&&t.node){g&&m();let b=hc(_);if(b===null||b!==d||!gc(t.node,p,t)){d=b;let w=mD(t,_,p,u);p=Qu(t.node,w,t),vm(t,u,p)}}else t.node&&(g&&m(),p&&y(),d=void 0)}finally{E&&ht()}},{depth:n.path.length,label:_t(n,u)});n.__effects.push(x),n.__exec[c]=l}else if(Bt&&Bt.has(c)){let l=t[c],f=zt(t,t[c+"Deps"],l),u=c,d,p=null,g=K(()=>{let h=t.context?.designSystem;h&&mt(h);try{let m=f(t,t.state,t.context);if(t.node)if(m!=null){let y=u+":"+String(m);if(y!==d||!gc(t.node,p,t)){d=y;let x={[u]:m},E=mD(t,x);p=Qu(t.node,E,t),vm(t,u,p)}}else d=void 0,p=null,vm(t,u,null),u==="display"?cd(t,""):t.node.style[u]=""}finally{h&&ht()}},{depth:n.path.length,label:_t(n,u)});n.__effects.push(g),n.__exec[c]=l}else if(c.charCodeAt(0)===45){let l=t[c];sI(t,c,l,t[c+"Deps"],c),n.__exec[c]=l}}if(b9(t),typeof t.html=="function"){let c=t.html,l=zt(t,t.htmlDeps,c),f=K(()=>{fn(t,()=>{let u=l(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:n.path.length,label:_t(n,"html")});n.__effects.push(f),n.__exec.html=c}if(typeof t.value=="function"){let c=t.value,l=zt(t,t.valueDeps,c),f=K(()=>{try{let u=l(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=Jt.call(t,u,t.state)),gD(t,u)}catch(u){ne(n,"value",u)}},{depth:n.path.length,label:_t(n,"value")});n.__effects.push(f),n.__exec.value=c}else if(typeof t.value=="string"&&t.value.includes("{{")){let c=t.value,l=K(()=>{try{gD(t,Jt.call(t,c,t.state))}catch(f){ne(n,"value",f)}},{depth:n.path.length,label:_t(n,"value")});n.__effects.push(l),n.__exec.value=c}if(typeof t.style=="function"){let c=t.style,l=zt(t,t.styleDeps,c),f,u=null,d,p,g,h,m=K(()=>{let y=l(t,t.state,t.context),x=t.context&&t.context.designSystem,E;if(y&&typeof y=="object"&&y===d&&x===g){let _=hc(y);E=_!==null&&_===p?h:Qs(t,y),p=_}else E=Qs(t,y),p=void 0;d=y,g=x,h=E;let C=hc(E);(C===null||C!==f||!gc(t.node,u,t))&&(f=C,wE(t.node,u,E,t),or(t.node,E,t),u=Qu(t.node,E,t))},{depth:n.path.length,label:_t(n,"style")});n.__effects.push(m),n.__exec.style=c}else if(t.style&&typeof t.style=="object")for(let c in t.style){let l=t.style[c];if(typeof l!="function")continue;let f=zt(t,dc(t.styleDeps,c),l),u,d=null,p=K(()=>{try{let g=f(t,t.state,t.context);if(t.node){let h=c+":"+String(g);if(h!==u||!gc(t.node,d,t)){u=h;let m=Qs(t,{[c]:g});wE(t.node,d,Object.assign({},m,{[c]:""}),t),or(t.node,m,t),d=Qu(t.node,m,t)}}}catch(g){ne(n,"style."+c,g)}},{depth:n.path.length,label:_t(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 l=zt(t,dc(t.attrDeps,c),t.attr[c]),f=c,u=K(()=>{try{let d=l(t,t.state,t.context);typeof d=="string"&&d.includes("{{")&&(d=Jt.call(t,d,t.state)),t.node?.setAttribute&&Zs(t.node,f,d)}catch(d){ne(n,"attr."+f,d)}},{depth:n.path.length,label:_t(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}else if(typeof t.attr[c]=="string"&&t.attr[c].includes("{{")){let l=t.attr[c],f=c,u=K(()=>{try{let d=Jt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(f,nr(f,d??""))}catch(d){ne(n,"attr."+f,d)}},{depth:n.path.length,label:_t(n,"attr."+f)});u._attrName=f.toLowerCase(),n.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(let c in t.aria){let l=t.aria[c];if(typeof l=="string"&&l.includes("{{")){let p=l,g="aria-"+c.replace(/[A-Z]/g,m=>"-"+m.toLowerCase()),h=K(()=>{try{let m=Jt.call(t,p,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,nr(g,m??""))}catch(m){ne(n,"aria."+c,m)}},{depth:n.path.length,label:_t(n,"aria."+c)});h._attrName=g,n.__effects.push(h);continue}if(typeof l!="function")continue;let f=zt(t,dc(t.ariaDeps,c),t.aria[c]),u="aria-"+c.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),d=K(()=>{try{let p=f(t,t.state,t.context);if(!t.node?.setAttribute)return;Zs(t.node,u,p)}catch(p){ne(n,"aria."+c,p)}},{depth:n.path.length,label:_t(n,"aria."+c)});d._attrName=u,n.__effects.push(d)}if(t.data&&typeof t.data=="object")for(let c in t.data){let l=t.data[c];if(typeof l=="string"&&l.includes("{{")){let g=l,h="data-"+c.replace(/[A-Z]/g,y=>"-"+y.toLowerCase()),m=K(()=>{try{let y=Jt.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(h,y??"")}catch(y){ne(n,"data."+c,y)}},{depth:n.path.length,label:_t(n,"data."+c)});m._attrName=h,n.__effects.push(m);continue}if(typeof l!="function")continue;let f=zt(t,dc(t.dataDeps,c),t.data[c]),d="data-"+c.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),p=K(()=>{try{let g=f(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null||g===!1?t.node.removeAttribute(d):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(d,g===!0?"":g)}catch(g){ne(n,"data."+c,g)}},{depth:n.path.length,label:_t(n,"data."+c)});p._attrName=d,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 l=zt(t,dc(t.classDeps,c),i[c]),f=K(()=>{try{let u=l(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(c):t.node.classList.remove(c)}catch(u){ne(n,"class."+c,u)}},{depth:n.path.length,label:_t(n,"class."+c)});n.__effects.push(f)}!r&&typeof t.if=="function"&&QD(t,n,t.if);for(let c of Object.keys(t)){if(Gt.has(c)||typeof t[c]!="function")continue;let l=c.charCodeAt(0);if(l>=65&&l<=90||ln(c))continue;let f=t[c];n.__exec[c]=f;let u=t.tag||"div";if(pn(u,c)&&!Ro(u,c)){let d=Fr(c)||c,p=zt(t,t[c+"Deps"],f),g=K(()=>{try{let h=p(t,t.state,t.context);typeof h=="string"&&h.includes("{{")&&(h=Jt.call(t,h,t.state));let m=Oo[c];if(m&&h!=null){let y=m(t);y!==void 0&&(h=y)}t.node?.setAttribute&&Zs(t.node,d,h,!0)}catch(h){ne(n,c,h)}},{depth:n.path.length,label:_t(n,c)});g._attrName=d.toLowerCase(),n.__effects.push(g)}}let a=t.tag||"div";for(let c of Object.keys(t)){if(Gt.has(c))continue;let l=t[c];if(typeof l!="string"||!l.includes("{{"))continue;let f=c.charCodeAt(0);if(f>=65&&f<=90||ln(c)||Ro(a,c)||Oo[c]||!pn(a,c))continue;let u=Fr(c)||c,d=K(()=>{try{let p=Jt.call(t,l,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,nr(u,p??""))}catch(p){ne(n,c,p)}},{depth:n.path.length,label:_t(n,c)});d._attrName=u.toLowerCase(),n.__effects.push(d)}if(v9(t),N9(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let c=t.onStateUpdate,l=t.stateDeps,f=!1,u=[],d=K(()=>{let p=[];for(let m=0;m<l.length;m++){let y=l[m];try{p[m]=typeof y=="function"?y(t,t.state,t.context):t.state?.[y]}catch{p[m]=void 0}}if(!f){f=!0,u=p;return}let g=p.length!==u.length;for(let m=0;!g&&m<p.length;m++)p[m]!==u[m]&&(g=!0);let h=u;u=p,g&&fn(t,()=>{try{c(t,t.state,t.context,{prev:h,next:p})}catch(m){if(un(t,"onStateUpdate",m),t.context?.strictMode)throw m}})},{depth:n.path.length,label:_t(n,"onStateUpdate")});n.__effects.push(d)}R9(t)}function hD(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 a=s+1;a<o.length;a++){let c=e[o[a]];if(c?.node?.parentNode===n){r=c.node;break}}t.node.parentNode===n&&t.node.nextSibling===r||(r?n.insertBefore(t.node,r):n.appendChild(t.node)),im()}function ZD(t){tI(t),V9(t),dI(t),tW(t),Q9(t)}function QD(t,e,n){let r=zt(t,t.ifDeps,n),o=K(()=>{let s=!e.__ifInitialized&&e.__ifLateMerge;if(s){let c=t.context?.components||{};s.names.some(l=>c[l]||c["smbls."+l])&&(e.__ifLateMerge=null,KH(t,s),r=zt(t,t.ifDeps,typeof t.if=="function"?t.if:n))}let i;try{i=r(t,t.state,t.context)}catch(c){if(i=!1,e.__ifError=c,typeof console<"u"&&console.warn){let l=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${l} \u2014 treating as false:`,c?.message||c)}return}let a=e.__if;if(e.__if=!!i,a&&!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(!a&&e.__if)if(e.__ifInitialized)t.node||(t.node=Co(t)),t.node&&(t.node.ref=t),hD(t),tI(t),dI(t),Zt("Render",t,{}),yE(t,{});else{e.__ifInitialized=!0,e.__ifLateMerge=null,t.tag||(t.tag=Qn(t)),Zt("Init",t,{});let c=ct.hydration;if(t.node||(t.node=c!==null&&c.adopt(t)||Co(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.parent?.__ref?.__ifParked&&t.parent.__ref.__ifParked.delete(t.key),t.tag==="fragment"&&!e.__fragmentAnchor){let f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),e.__fragmentAnchor=f}Zt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),bI(t,{}),JD(t,{skipIfEffect:!0}),ZD(t),wI(t,{}),hD(t),Zt("Create",t,{}),Zt("Complete",t,{}),Zt("Render",t,{}),Zt("RenderRouter",t,{}),yE(t,{})}},{depth:e.path.length,label:_t(e,"if")});e.__effects.push(o)}function Js(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 p9(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function h9(t,e){if(e===null)return;let n=t.hasAttribute("checked");n!==e&&t.checked!==n&&(t.checked=n)}function Zs(t,e,n,r){n==null||n===!1&&!ti(e)?Om(t,e,null):typeof n=="function"||typeof n=="object"||(r&&e==="src"&&"src"in t?t.src=n:Om(t,e,nr(e,n)))}function Om(t,e,n){let r=p9(t,e);n==null?t.removeAttribute(e):t.setAttribute(e,n),h9(t,r)}function gD(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=n.ownerDocument,s=!!o&&o.activeElement===n,i=s&&typeof n.selectionStart=="number"?n.selectionStart:null,a=s&&typeof n.selectionEnd=="number"?n.selectionEnd:null;if(n.value=r,s&&i!=null&&a!=null)try{n.setSelectionRange(i,a)}catch{}let c=t.__ref&&t.__ref.__autoGrow;c&&c.active&&c.resize()}function tI(t){let{node:e}=t;if(e){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Js(t,t.text),gI(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}or(e,Qs(t,n),t)}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&&!ti(n)||e.setAttribute&&e.setAttribute(n,nr(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 hc(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function g9(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 Qu(t,e,n){if(!t||!t.style||!e)return null;let r=t.style,o=[];for(let s in e){if(e[s]==null||s.charAt(0)==="&")continue;let a=rr(s);o.push(a,Sc(n,r,a),CE(n,r,a))}return o}function eI(t,e){return typeof t.getPropertyValue=="function"?t.getPropertyValue(e):""}function nI(t,e){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(e):""}function rr(t){return Mr(t)}function wE(t,e,n,r){if(!t||!t.style||!e||!e.length)return;let o=t.style,s=new Set;if(n&&typeof n=="object")for(let i in n)n[i]==null||i.charAt(0)==="&"||s.add(rr(i));for(let i=0;i<e.length;i+=3){let a=e[i];s.has(a)||Sc(r,o,a)===e[i+1]&&(r&&a==="display"?cd(r,""):typeof o.removeProperty=="function"&&o.removeProperty(a))}}function vm(t,e,n){let r=t.__ref;r&&(n?(r.__heldInline||(r.__heldInline=new Map)).set(e,n):r.__heldInline&&r.__heldInline.delete(e))}function m9(t,e,n){if(t.__heldInline){for(let[r,o]of t.__heldInline)if(r!==e){for(let s=0;s<o.length;s+=3)if(o[s]===n)return!0}}return!1}function rI(t,e,n,r){let o=t.__ref,s=t.node;if(!o||!n||!s||!s.style)return;let i=o.__inlineCssKeys,a=null;for(let u=0;u<n.length;u+=3){let d=n[u];r&&r.has(d)||m9(o,e,d)||(a||(a=[]),a.push(u),i&&i.delete(d))}if(!a)return;let c=i&&vE(t,i),l=s.style,f=[];for(let u of a){let d=n[u];c&&c[d]!==void 0||Sc(t,l,d)===n[u+1]&&f.push(d)}for(let u of f)u==="display"?cd(t,""):typeof l.removeProperty=="function"&&l.removeProperty(u)}function y9(t,e,n){let r=[];for(let i=0;i<e.length;i+=3)r.push(e[i]);let o=!1;for(let i in n){let a=Ao[i];r.some(c=>a.includes(c))&&(o=!0,r.includes(i)||r.push(i))}if(!o)return;let s=t.node.style;e.length=0;for(let i of r)e.push(i,Sc(t,s,i),CE(t,s,i))}function gc(t,e,n){if(!e||!t||!t.style)return!1;let r=t.style;for(let o=0;o<e.length;o+=3)if(Sc(n,r,e[o])!==e[o+1]||CE(n,r,e[o])!==e[o+2])return!1;return!0}var od=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,oI=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",Im=t=>od(t)?t:"--"+t;function Mm(t,e){if(!Do(t))return null;let n=null;for(let r of Object.keys(t)){if(!r)continue;let o=t[r];if(typeof o=="function"){if(!e)continue;o=o(e,e.state,e.context)}oI(o)&&(n||(n={}),n[Im(r)]=o)}return n}function sI(t,e,n,r,o){iI(t,o,zt(t,r,n),s=>oI(s)?{[e]:s}:null)}function iI(t,e,n,r,o){let s=t.__ref,i,a=null,c=K(()=>{fn(t,()=>{try{let l=r(n(t,t.state,t.context)),f=t.node;if(!f||!f.style)return;let u=hc(l);(u===null||u!==i||!gc(f,a))&&(i=u,wE(f,a,l),l&&or(f,l),a=l?Qu(f,l):null,o&&o(l))}catch(l){ne(s,e,l)}})},{depth:s.path.length,label:_t(s,e)});s.__effects.push(c)}function b9(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){_9(t,n),e.__exec.vars=n;return}if(Do(n))for(let r of Object.keys(n)){let o=n[r];!r||typeof o!="function"||sI(t,Im(r),o,dc(t.varsDeps,r),"vars."+r)}}function _9(t,e){let n=t.__ref;iI(t,"vars",zt(t,t.varsDeps,e),r=>Mm(r),r=>{n.__varsInline=r?new Set(Object.keys(r)):null})}function SE(t,e){if(typeof t[e]=="function"&&(Ro(t.tag||"div",e)||e.charCodeAt(0)===45))return!0;if(!od(e))return!1;let n=t.vars;if(typeof n=="function"){let r=t.__ref&&t.__ref.__varsInline;return!!(r&&r.has(e))}if(!Do(n))return!1;for(let r of Object.keys(n))if(typeof n[r]=="function"&&Im(r)===e)return!0;return!1}function w9(t){let e=null;for(let n in t)t[n]!=null&&n.charAt(0)!=="&"&&(e||(e=new Set),e.add(rr(n)));return e}function S9(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=rr(i);Ao[c]&&(s||(s={}),s[c]=a)}o.__declaredLonghands=s}function vE(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=Ao[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 mD(t,e,n,r){let o=t.node,s=w9(e),i=s&&vE(t,s);if(n&&rI(t,r,n,i?new Set([...s,...Object.keys(i)]):s),or(o,e,t),!s)return e;let a=t.__ref;if(a)if(a.__inlineCssKeys)for(let c of s)a.__inlineCssKeys.add(c);else a.__inlineCssKeys=new Set(s);return i?(or(o,i),Object.assign({},e,i)):e}function x9(t){let e=t.__ref;if(!e||!e.__inlineCssKeys||!e.__declaredLonghands)return;let n=vE(t,e.__inlineCssKeys);if(!n)return;let r=[];if(e.__heldInline)for(let o of e.__heldInline.values())gc(t.node,o,t)&&r.push(o);or(t.node,n);for(let o of r)y9(t,o,n)}function Qs(t,e){return!e||typeof e!="object"?e:fn(t,()=>{try{return Bk(e,t)}catch{return e}})}var aI="none",AE=t=>!!(t&&t.__hiddenBy&&t.__hiddenBy.size),yD=t=>eI(t,"display")===aI&&nI(t,"display")==="important";function cI(t,e){e?t.setProperty("display",e[0],e[1]):typeof t.removeProperty=="function"?t.removeProperty("display"):t.display=""}function Rm(t,e,n,r){let o=t.__ref,s=t.node;if(!o||!s||!s.style)return;let i=o.__hiddenBy,a=!!(i&&i.size);n?(i||(i=o.__hiddenBy=new Set),i.add(e)):i&&i.delete(e);let c=s.style;i&&i.size?yD(c)||c.setProperty("display",aI,"important"):(a||r&&yD(c))&&cI(c,o.__shownDisplay||null)}function cd(t,e,n){let r=t.__ref,o=e?[String(e),n||""]:null;r&&(r.__shownDisplay=o);let s=t.node;!s||!s.style||AE(r)||cI(s.style,o)}function Sc(t,e,n){let r=n==="display"&&t&&t.__ref;return AE(r)?r.__shownDisplay?r.__shownDisplay[0]:"":eI(e,n)}function CE(t,e,n){let r=n==="display"&&t&&t.__ref;return AE(r)?r.__shownDisplay?r.__shownDisplay[1]:"":nI(e,n)}function or(t,e,n){if(!t||!e||!t.style)return;let r=null;for(let o in e){let s=e[o];if(s!=null){if(o.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[o]=s;continue}try{let i=String(s);if(typeof s=="object"&&i==="[object Object]")continue;let a=Mr(o),c=i.trim(),l=/\s*!important\s*$/.test(c),f=c.replace(/\s*!important\s*$/,"");if(n&&a==="display"){cd(n,f,l?"important":"");continue}t.style.setProperty(a,f,l?"important":"")}catch{}}}r&&k9(t,r)}function k9(t,e){let n=`_ds${$D.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=Ir(i.replace(/&/g,a)).map(f=>f.includes(a)?f:a+f).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let d in l){let p=l[d];if(typeof p=="object"){let g=Ir(c),h=d.includes("&")?g.map(y=>d.replace(/&/g,y)).join(", "):g.map(y=>`${y} ${d}`).join(", "),m="";for(let y in p)m+=`${rr(y)}: ${p[y]};`;u+=Dr(`${h} { ${m} }`,h)+`
61
+ `}else f+=`${rr(d)}: ${p};`}f&&(s+=Dr(`${c} { ${f} }`,c)+`
62
+ `),u&&(s+=u)}}s&&(o.textContent+=s)}var bD=new Set;function _D(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 E9(t,e,n){let r=_D(n);queueMicrotask(()=>{if(!t.__ref)return;let o;try{o=e(t,t.state,t.context)}catch{return}if(_D(o)===r)return;let s=t.__ref.path?t.__ref.path.join("."):t.key||"?";bD.has(s)||(bD.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 core.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 v9(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&&tt()&&E9(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],l=a.slice(1),f={value:!1},u=K(()=>{let d=t.state&&(Et(t.state)?t.state.root:null);if(!d||!Et(d))return;let p=d;p=p[c];for(let h=0;h<l.length&&!(p==null||typeof p!="object");h++)if(Et(p))p=p[l[h]];else break;if(!f.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"&&fn(t,()=>{try{if(Sm(o)){let h=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});h&&typeof h.then=="function"?h.then(()=>er(o,!1),m=>{er(o,!0),tr("error",t,{hook:"onBeforeUpdate",error:m})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",m)}):(er(o,!1),h===!1&&(g=!0))}}catch(h){er(o,!0),tr("error",t,{hook:"onBeforeUpdate",error:h})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",h)}}),!g&&t.node&&o.__effects)for(let h=0;h<o.__effects.length;h++){let m=o.__effects[h];m&&m!==u&&!m._disposed&&!m._isSubscribeToEffect&&typeof m._execute=="function"&&m._execute()}!g&&typeof t.onUpdate=="function"&&fn(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(h){tr("error",t,{hook:"onUpdate",error:h})||console.error("[DOMQL] subscribeTo onUpdate error:",h)}})},{depth:o.path.length,label:_t(o,"subscribeTo("+i+")")});f.value=!0,u._isSubscribeToEffect=!0,o.__effects.push(u)}}function TE(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 OE(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)];if(!n)return t;if(typeof n=="string"&&!/^@(supports|container)\b/.test(n)){let r=A9(e);if(r){let o=Pk(n);if(o)return`@container ${r} ${o}`}}return/^@(media|supports|container)\b/.test(n)?n:`@media ${n}`}function RE(t,e,n,r){return Ms(t)?Is(()=>sd(e,n,!1,r)):sd(e,n,!1,r)}function A9(t){let e=t.__ref;if(e&&e.__breakpointContainer!==void 0)return e.__breakpointContainer;let n=null;for(let r=t.parent;r&&typeof r=="object";r=r.parent){let o=r.breakpointsFrom;if(o!=null&&o!==!1){n=gm(o,r);break}}return e&&(e.__breakpointContainer=n),n}var wD=new Set;function C9(t,e){let n=e?.__ref?.path?e.__ref.path.join("."):e?.key||"?",r=n+"::"+t;wD.has(r)||(wD.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.`))}var SD=new Map;function T9(t){let e=SD.get(t);if(e)return e;e=[];let n=r=>{if(r)for(let o of r)e.push(qu(o))};return n(Ao[t]),n(bm[t]),SD.set(t,e),e}function xD(t,e,n){if(SE(t,e)||n&&n.has(e))return!0;let r=T9(rr(e));for(let o=0;o<r.length;o++){let s=r[o];if(SE(t,s)||n&&n.has(s))return!0}return!1}function sd(t,e,n,r){let o={},s=new Set,i=(a,c,l)=>{let f=l?new Set(Object.keys(o)):null;if(xt[a]){let u=xt[a](c,e,e.state,e.context);if(u){let d=Array.isArray(u)?u:[u];for(let p of d)p&&Object.assign(o,p)}}else o[a]=c;if(l)for(let u in o)f.has(u)||s.add(u)};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")){if(typeof c=="object"&&!Array.isArray(c)){if(a==="style"){for(let u in c){let d=c[u];typeof d=="function"&&(d=d(e,e.state,e.context)),!(d==null||typeof d=="function")&&i(u,d,xD(e,u,r))}continue}if(a==="vars"){let u=Mm(c,e);if(u)for(let d in u)i(d,u[d],SE(e,d)||!!(r&&r.has(d)));continue}if(TE(a,e)){let u=sd(c,e,!1,r);Object.keys(u).length&&(o[`[data-theme="${a.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(a)){tt()&&C9(a,e);continue}let l=OE(a,e),f=RE(l,c,e,r);Object.keys(f).length&&(o[l]=f);continue}i(a,c,xD(e,a,r))}}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 Do=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function lI(t,e){for(let n in e){let r=e[n];t[n]=Do(r)?lI(Do(t[n])?t[n]:{},r):r}return t}function O9(t,e){if(!Do(e))return;let n;for(let r of t.split(" ")){let o=r?e[r]:null;Do(o)&&(n=lI(n||{},o))}return n}function PE(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)&&PE(t[n],e+1))return!0}return!1}function fI(t,e,n){if(!e||typeof e!="object"||Array.isArray(e))return null;if(TE(t,n)){let s=sd(e,n,!1);return Object.keys(s).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:s}:null}let r=OE(t,n),o=RE(r,e,n);return Object.keys(o).length?{cssProp:r,block:o}:null}function R9(t){let e=t.__ref;for(let n of Object.keys(t)){if(!VD(n))continue;let r=t[n];if(!r||typeof r!="object"||Array.isArray(r)||!PE(r))continue;let o=null,s,i=K(()=>{if(!t.node)return;let a=t.context?.designSystem;a&&mt(a);let c,l=!1;try{let f=fI(n,r,t),u=f?hc(f.block)+"::"+f.cssProp:null;if(u!==null&&u===s)l=!0;else if(s=u,f){let d=Ue({[f.cssProp]:f.block},null,t.context?.cssPrefix);c=d?d.split(" ").filter(Boolean):null}else c=null}finally{a&&ht()}if(!(l||!t.node.classList)){if(o)for(let f of o)t.node.classList.remove(f);if(c&&c.length)for(let f of c)t.node.classList.add(f);o=c}},{depth:e.path.length,label:_t(e,"cssBlock("+n+")")});e.__effects.push(i)}}var P9=()=>!0,L9=(t,e)=>{let n=t.charAt(0);return(n===":"||n==="@"||n==="&"||n==="[")&&e&&typeof e=="object"&&!Array.isArray(e)?!0:!!xt[t]||!!(Bt&&Bt.has(t))||od(t)||t==="vars"};function D9(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(L9(a,n[a])||Gt.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=oE({[e]:n},t.tag||"div",r,P9),i=null;for(let a in s)/^on/i.test(a)||(i||(i={}),i[a]=s[a]);return i}function kD(t,e,n,r,o,s){let i=t.node,a=null,c=l=>{(a||(a=[])).push(l)};for(let l in r){let f=e.owners.get(l),u=f===n;if(!s&&f!==void 0&&!u)continue;let d;try{d=r[l](t)}catch(g){ne(t.__ref,"conditional("+n+")."+l,g),u&&c(l);continue}if(typeof d=="string"&&d.includes("{{")&&(d=Jt.call(t,d,t.state)),u&&i.getAttribute(l)!==e.written.get(l)){c(l);continue}if(d==null||typeof d=="object"||typeof d=="function"){u&&uI(i,e,l);continue}let p=d===!1&&!ti(l)?null:String(nr(l,d));c(l),!(u&&p===e.written.get(l))&&(f===void 0&&e.base.set(l,i.getAttribute(l)),Om(i,l,p),e.owners.set(l,n),e.written.set(l,p))}o.appliedAttrs=a}function uI(t,e,n){t.getAttribute(n)===e.written.get(n)&&Om(t,n,e.base.get(n)),e.owners.delete(n),e.base.delete(n),e.written.delete(n)}function I9(t,e,n,r){let o=r.appliedAttrs;if(r.appliedAttrs=null,!!o)for(let s of o)e.owners.get(s)===n&&uI(t.node,e,s)}function dI(t){let e=t.__ref&&t.__ref.__conditionalAttrs,n=t.node;if(!(!e||!e.owners.size||!n||!n.getAttribute))for(let r of e.owners.keys()){let o=e.written.get(r),s=n.getAttribute(r);s!==o&&(e.base.set(r,s),o==null?n.removeAttribute(r):n.setAttribute(r,o))}}var fE,M9=()=>fE===void 0?fE=tt():fE;function ED(t,e){let n=Tp;typeof n=="function"?t.untrackedReads+=n(e):e()}function N9(t){let e=t.__ref;e.__conditionalRunners=[];let n=null,r=new Map;for(let o of Object.keys(t)){let s=o.charAt(0);if(s!=="."&&s!=="!")continue;let i=o.slice(1);if(!i)continue;if(/[:@\s>~+[\]]/.test(i)){if(typeof console<"u"&&console.warn){let m=i.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${s}\` is read as one prop name. Nest the selector inside instead: \`${s}${m}: { '${i.slice(m.length)}': {...} }\`.`)}continue}let a=t[o];if(!a||typeof a!="object")continue;let c=s==="!",l={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null,hides:!1,probe:!1,untrackedReads:0},f=D9(t,o,a);f&&!n&&(n=e.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});let u=new Set;for(let m in a){if(!Object.prototype.hasOwnProperty.call(a,m))continue;let y=m.charAt(0),x=a[m];if(!((y===":"||y==="@"||y==="&"||y==="[")&&x&&typeof x=="object"&&!Array.isArray(x))){if(m==="vars"&&Do(x)){for(let E of Object.keys(x))E&&u.add(Im(E));continue}u.add(m)}}let d=()=>{let m,y=l.probe,x;if(y?ED(l,()=>{x=t[i]}):x=t[i],x===void 0){let _=!!t.state&&i in t.state,b=t.state?t.state[i]:void 0;if(_||b!==void 0)m=b;else{let w=t.context?.cases?.[i];if(w===void 0)return;try{m=typeof w=="function"?w.call(t,t):w}catch(S){m=!1,e.__conditionalError=S,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,S?.message||S)}}}else if(typeof x=="function")try{y?ED(l,()=>{m=x(t,t.state,t.context)}):m=x(t,t.state,t.context)}catch(_){m=!1,e.__conditionalError=_,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${o}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,_?.message||_)}else m=x;y&&(l.probe=!1);let E=c?!m:!!m;if(!t.node)return;let C=t.context?.designSystem;if(E===l.lastMatch){if(E&&f&&t.node.setAttribute){C&&mt(C);try{kD(t,n,o,f,l,!1)}finally{C&&ht()}}return}l.lastMatch=E,C&&mt(C);try{if(E){let _={},b={},w=!1,S=!1;for(let T in a){if(!Object.prototype.hasOwnProperty.call(a,T))continue;let O=a[T],B=T.charAt(0);if((B===":"||B==="@"||B==="&"||B==="[")&&O&&typeof O=="object"&&!Array.isArray(O)){if(TE(T,t)){let N=sd(O,t,!1,u);Object.keys(N).length&&(b[`[data-theme="${T.slice(1)}"] &`]=N,w=!0)}else{let N=OE(T,t),G=RE(N,O,t,u);Object.keys(G).length&&(b[N]=G,w=!0)}continue}let $=typeof O=="function"?O(t,t.state,t.context):O;if($!=null){if(T==="hide"||T==="show"){let N=xt[T]($,t,t.state,t.context);N&&N.display&&(S=!0)}else if(xt[T]){let N=xt[T]($,t,t.state,t.context);if(N){let G=Array.isArray(N)?N:[N];for(let Y of G)Y&&Object.assign(_,Y)}}else if(Bt&&Bt.has(T))_[T]=$;else if(od(T))_[T]=$;else if(T==="vars"){let N=Mm($,t);N&&Object.assign(_,N)}}}(S||l.hides)&&(l.hides=S,Rm(t,o,S));let A=Object.keys(_);if(A.length){or(t.node,_,t);for(let T of A){let O=r.get(T);O||(O=[],r.set(T,O));let B=O.findIndex($=>$.key===o);B!==-1&&O.splice(B,1),O.push({key:o,value:_[T]})}l.appliedKeys=A}else l.appliedKeys=null;if(w){let T=Ue(b,null,t.context?.cssPrefix,{state:!0}),O=T?T.split(" ").filter(Boolean):[];if(O.length&&t.node.classList){for(let B of O)t.node.classList.add(B);l.appliedClasses=O}else l.appliedClasses=null}else if(l.appliedClasses){for(let T of l.appliedClasses)t.node.classList.remove(T);l.appliedClasses=null}f&&t.node.setAttribute&&kD(t,n,o,f,l,!0)}else{if(l.appliedAttrs&&I9(t,n,o,l),l.appliedKeys){for(let _ of l.appliedKeys){let b=r.get(_);if(!b)continue;let w=b.findIndex(S=>S.key===o);if(w!==-1)if(b.splice(w,1),b.length){let S=b[b.length-1].value,A=Mr(_),T=String(S).trim().replace(/\s*!important\s*$/,"");Sc(t,t.node.style,A)!==T&&or(t.node,{[_]:S},t)}else r.delete(_),od(_)?t.node.style.removeProperty(_):Mr(_)==="display"?cd(t,""):t.node.style[_]=""}l.appliedKeys=null}if(l.hides&&(l.hides=!1,Rm(t,o,!1)),l.appliedClasses){for(let _ of l.appliedClasses)t.node.classList.remove(_);l.appliedClasses=null}}}finally{C&&ht()}};e.__conditionalRunners.push(d);let p=t[i+"Deps"],g=zt(t,p,d);M9()&&typeof(e.__exec&&e.__exec[i]||t[i])=="function"&&!(Array.isArray(p)&&p.length===0)&&(l.probe=!0);let h=K(g,{depth:e.path.length,label:_t(e,"conditional("+o+")")});l.probe&&(l.probe=!1),l.untrackedReads>0&&h._sources.size===0&&console.warn(`[smbls] conditional \`${o}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate read state on its first run without subscribing to it (\`in\`, Object.keys, a \`__\` key, parse()), so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). Declare \`${i}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally, or \`${i}Deps: []\` when it is static on purpose.`),e.__effects.push(h)}}var uE=new WeakSet,dE=new WeakMap;function $9(t){let e=dE.get(t);if(e==="painted")return!1;if(e===void 0){dE.set(t,"open");let n=t.defaultView,r=()=>{dE.set(t,"painted")};n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(r):setTimeout(r,0)}return!0}var pE=new WeakSet;function F9(t){if(pE.has(t))return;pE.add(t);let e=()=>{pE.delete(t);let r=t.body||t.documentElement;r&&r.offsetWidth},n=t.defaultView;n&&typeof n.requestAnimationFrame=="function"?n.requestAnimationFrame(e):setTimeout(e,0)}function B9(t,e){let n=t.ownerDocument;if(n&&!$9(n)){if(ct.hydration!==null&&e&&e.context&&e.context.__hydration){F9(n);return}uE.has(n)||(uE.add(n),queueMicrotask(()=>{uE.delete(n);let r=n.body||n.documentElement;r&&r.offsetWidth}))}}var hE=new WeakSet,vD=!1;function AD(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function xE(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"?xE(s,o):o}return n}function pI(t,e){let n={};for(let r in t){let o=t[r];if(o&&typeof o=="object"){let s=pI(o,e);Object.keys(s).length&&(n[r]=s)}else e(r)||(n[r]=o)}return n}function CD(t,e,n){let r=LE(t);if(!r)return!1;for(let o=0;o<r.length;o+=3){let s=r[o+1];if(!n.has(s))continue;let i=e[s];if(!(i==null||typeof i=="object")&&kL(r[o],i,r[o+2]))return!0}return!1}function j9(t,e,n){let r=1/0,o=-1/0;for(let i of e.values())i<r&&(r=i),i>o&&(o=i);if(n)for(let i of n.values())i>o&&(o=i);if(o<=r)return null;let s=null;for(let[i,a]of e){if(a===o)continue;let c=LE(i);if(c)for(let l=0;l<c.length;l+=3){let f=c[l],u=c[l+1],d=c[l+2],p=t[u]!=null?e.get(u):void 0,g=n&&n.get(f),h=p!==void 0&&p>a&&_m(f,t[u],d),m=!h&&g!==void 0&&g>a&&_m(f,void 0,d);if(h||m){h&&delete t[i],s||(s=new Set),s.add(i);break}}}return s}var TD=new Map;function LE(t){let e=TD.get(t);if(e!==void 0)return e;let n=rr(t),r=Ao[n];if(e=null,Array.isArray(r)){e=[];for(let o of r)e.push(o,qu(o),n)}return TD.set(t,e),e}var hI=new Set(["page","zoom"]),U9=(t,e)=>{hI.add(t);let n=typeof CSS<"u"?CSS:null;if(!n||typeof n.supports!="function")return;let r=!1;try{r=n.supports(rr(t),String(e))}catch{r=!1}r&&console.warn(`[smbls] css: "${t}: ${e}" is valid CSS, but smbls has no entry for "${t}", so the element gets no CSS for it. Write it in style: { ${t}: \u2026 } for now, and report the missing property.`)};function gI(t){let{node:e}=t;if(!e)return;if(vD||(vD=!0,Ue({display:"none"})),hE.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}hE.add(t);let n=t.context?.designSystem;n&&mt(n),pm();try{let r={},o=!1,s=[],i=null,a=null,c=null,l=null,f=t.__ref&&t.__ref.__mergeLayer,u,d=null,p=null,g=!1,h=(_,b)=>{if(b&&typeof b=="object"&&AD(_)){c||(c={});let w=c[_];w&&(b=xE(w,b)),c[_]=b}else(b===null||typeof b!="object")&&(l||(l=new Set),l.add(_),u!==void 0&&(d||(d=new Map),d.set(_,u)));r[_]=b};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&xt.theme){let _=xt.theme(t.theme,t,t.state,t.context);if(_){let b=w=>{for(let S in w){let A=w[S];A&&typeof A=="object"?AD(S)&&(i||(i={}),i[S]=A):LE(S)&&(a||(a=[])).push(S),r[S]=A}};if(Array.isArray(_))for(let w of _)w&&b(w);else b(_);o=!0}}let m=(_,b)=>{if(_==="vars"){let w=Mm(b);if(w){for(let S in w)h(S,w[S]);o=!0}return}if(_==="hide"||_==="show"){let w=xt[_](b,t,t.state,t.context);w&&w.display&&(g=!0);return}if(xt[_]){let w=xt[_](b,t,t.state,t.context);if(w){if(Array.isArray(w)){for(let S of w)if(S)for(let A in S)h(A,S[A])}else for(let S in w)h(S,w[S]);o=!0}}else if(Bt&&Bt.has(_))b!=null&&typeof b!="object"&&(h(_,b),o=!0);else if(_.charCodeAt(0)===45)b!=null&&typeof b!="object"&&(h(_,b),o=!0);else if(_.charAt(0)==="&"||_.charAt(0)==="@"||_.charAt(0)===":"||_.charAt(0)==="["){if(b&&typeof b=="object"&&!Array.isArray(b)){if(PE(b))return;let w=fI(_,b,t);w&&(h(w.cssProp,w.block),o=!0)}}else(typeof b=="string"||typeof b=="number")&&!hI.has(_)&&tt()&&U9(_,b)};if(typeof t.class=="string"){let _=O9(t.class,t.context?.designSystem?.class);if(_)for(let b in _)m(b,_[b])}let y=l?new Set(l):null,x=t.tag||"div";for(let _ of Object.keys(t)){if(typeof t[_]=="function"){let w=f&&f.get(_);w!==void 0&&Ro(x,_)&&(p||(p=new Map),p.set(rr(_),w));continue}if(u=f?f.get(_):void 0,_==="vars"){m(_,t[_]);continue}if(Gt.has(_)||_==="theme")continue;let b=_.charCodeAt(0);b>=65&&b<=90||ln(_)||Em(x,_)||m(_,t[_])}u=void 0;let E=d?j9(r,d,p):null;if(a&&l)for(let _ of a)l.has(_)||!(_ in r)||CD(_,r,l)&&delete r[_];if(i){let _=l?b=>l.has(b)||CD(b,r,l):null;for(let b in i){let w=_?pI(i[b],_):i[b];c&&c[b]&&(w=xE(w,c[b])),Object.keys(w).length?r[b]=w:delete r[b]}}if(S9(t,r,l,E?new Set([...y||[],...E]):y),Rm(t,"static",g),o){r.display&&String(r.display).includes("!important")&&(or(e,{display:r.display},t),delete r.display);let _=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof _=="string"&&_!==""&&r.display&&r.display!==_&&(r.display=_);let b=Ue(r,null,t.context?.cssPrefix);if(s=b?b.split(" ").filter(Boolean):[],b&&e.classList){let w=s,S=!1;for(let A of w)e.classList.add(A),S||(A.charCodeAt(0)===95&&A.charCodeAt(1)===99||A.charCodeAt(0)===95&&A.indexOf("_c",1)!==-1)&&(S=!0);S&&B9(e,t)}}let C=t.__ref;if(C){let _=C.__staticCssClasses;if(_&&e.classList){let b=new Set(s);for(let w of _)b.has(w)||e.classList.remove(w)}C.__staticCssClasses=s}x9(t)}finally{hm(),n&&ht(),hE.delete(t)}}var zk=t=>!!xt[t]||!!(Bt&&Bt.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Hk(t){t&&t.node&&gI(t)}function V9(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,nr(i,s))}let n=rE(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"||Gt.has(o)||o==="on"||n[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!ln(o)&&!Ro(r,o)&&pn(r,o)){let i=t[o];if(i==null)continue;if(typeof i=="string"&&i.includes("{{")){if(!Oo[o])continue;i=Jt.call(t,i,t.state)}if(i==null||typeof i=="function"||typeof i=="object"||i===!1&&!ti(Fr(o)||o))continue;let a=Fr(o)||o;e.setAttribute(a,nr(a,i))}}}function Wk(t,e){let{node:n}=t;if(!n||!n.setAttribute)return;let r=e.charCodeAt(0);if(r>=65&&r<=90||ln(e))return;let o=t.tag||"div";if(Ro(o,e)||!pn(o,e))return;let s=Fr(e)||e,i=s.toLowerCase(),a=t.__ref&&t.__ref.__effects,c=!1;if(a)for(let u=0;u<a.length;u++){let d=a[u];d&&d._attrName===i&&!d._disposed&&typeof d._execute=="function"&&(c=!0,d._execute())}if(c)return;let l=t[e],f=Oo[e];if(f&&l!=null){let u=f(t);u!==void 0&&(l=u)}typeof l=="string"&&l.includes("{{")&&(l=Jt.call(t,l,t.state)),Zs(n,s,l)}function z9(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{}RD(o),Po.delete(t),n.style.height="",o.appliedMax!=null&&n.style.maxHeight===o.appliedMax&&(n.style.maxHeight=""),LD(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){id(t,!0);return}if(!(n.scrollHeight>0)){o.awaitingLayout=!0,OD(t,o);return}o.awaitingLayout=!1;let i=K9(n),a=q9(i),c=n.style.height;n.style.height="0px",a&&gE(n);let l=n.scrollHeight;if(!(l>0)){n.style.height=c,a&&gE(n);return}let f=G9(n,i),u=f!=null&&l<f?f:l,d=J9(i),p=d!=null&&u>d;n.style.height=X9(p?d:u,i)+"px",a&&gE(n),LD(n,o,p),o.lastMeasure=l,o.lastWidth=n.clientWidth,OD(t,o)}},r.__eventCleanup||(r.__eventCleanup=[]),r.__eventCleanup.push(()=>{try{n.removeEventListener("input",o.resize)}catch{}RD(o),Po.delete(t)})),o.active||(n.addEventListener("input",o.resize),o.active=!0,W9(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 id(t,e){let n=t.__ref?.__autoGrow;n&&(e&&(n.attachAttempts=0,n.firstAttemptAt=null),Po.add(t),ad())}function H9(){let t=Array.from(Po);Po.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=_c()),o.attachAttempts+=1,o.attachAttempts<=jD&&_c()-o.firstAttemptAt<UD&&(Po.add(n),ad());continue}o.attachAttempts=0,o.firstAttemptAt=null,o.resize()}}}function OD(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,id(t,!0);return}let a=n.clientWidth;e.lastWidth!=null&&Math.abs(a-e.lastWidth)<.5||(e.lastWidth=a,id(t,!0))},i;try{i=new o(s),i.observe(n)}catch{return}e.watch=i}function RD(t){let e=t.watch;if(e){t.watch=null;try{e.disconnect()}catch{}}}function W9(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&&id(t,!0)},()=>{})}function K9(t){let e=t.ownerDocument&&t.ownerDocument.defaultView;try{return e&&e.getComputedStyle?e.getComputedStyle(t):null}catch{return null}}var ni=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,DE=t=>(ni(t.paddingTop)||0)+(ni(t.paddingBottom)||0),mI=t=>(ni(t.borderTopWidth)||0)+(ni(t.borderBottomWidth)||0);function q9(t){if(!t)return!1;let e=String(t.transitionProperty||"").split(","),n=String(t.transitionDuration||"0s").split(",");for(let r=0;r<e.length;r++){let o=e[r].trim();if(!(o!=="all"&&o!=="height")&&parseFloat(n[r%n.length])>0)return!0}return!1}function gE(t){if(typeof t.getAnimations!="function")return;let e;try{e=t.getAnimations()}catch{return}for(let n=0;n<e.length;n++){let r=e[n];if(r&&r.transitionProperty==="height")try{r.cancel()}catch{}}}function G9(t,e){if(!e||!t.hasAttribute||!t.hasAttribute("rows"))return null;let n=parseInt(t.getAttribute("rows"),10);if(!(n>0))return null;let r=ni(e.lineHeight)||Y9(t,e);return r>0?n*r+DE(e):null}var Zu=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],PD=new WeakMap;function Y9(t,e){let n=t.ownerDocument,r=n&&(n.body||n.documentElement);if(!r||!n.createElement)return null;let o=PD.get(n);o||(o=new Map,PD.set(n,o));let s=Zu.map(l=>e[l]||"").join("|");if(o.has(s))return o.get(s);let i=n.createElement("textarea");i.rows=1,i.setAttribute("aria-hidden","true"),i.tabIndex=-1;let a=i.style;a.position="absolute",a.visibility="hidden",a.top="0",a.left="-9999px",a.height="auto",a.minHeight="0",a.maxHeight="none",a.padding="0",a.border="0",a.boxSizing="content-box",a.overflow="hidden";for(let l=0;l<Zu.length;l++)e[Zu[l]]&&(a[Zu[l]]=e[Zu[l]]);let c=0;try{r.appendChild(i),c=i.clientHeight}catch{c=0}finally{i.parentNode&&i.parentNode.removeChild(i)}return c>0?(o.set(s,c),c):null}function X9(t,e){return e?e.boxSizing==="border-box"?t+mI(e):e.boxSizing==="content-box"?Math.max(0,t-DE(e)):t:t}function J9(t){if(!t)return null;let e=ni(t.maxHeight);if(e==null||!(e>0))return null;let n=DE(t),r=mI(t),o=t.boxSizing==="border-box"?e-r:e+n,s=ni(t.lineHeight);if(!(s>0))return o;let i=Math.floor((o-n)/s+1e-6);return i>=1?i*s+n:o}function LD(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 DD=["srcObject","muted"],Z9=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function Q9(t){let e=t.node,n=t.__ref;if(!(!e||!n))for(let r=0;r<DD.length;r++){let o=DD[r],s=t[o];if(s===void 0||!(o in e))continue;let i=a=>{let c=Z9(o,a);if(e[o]!==c)try{e[o]=c}catch(l){ne(n,o,l)}};if(typeof s=="function"){let a=zt(t,t[o+"Deps"],s),c=K(()=>{try{i(a(t,t.state,t.context))}catch(l){ne(n,o,l)}},{depth:n.path.length,label:_t(n,o)});n.__effects.push(c),n.__exec[o]=s}else i(s);o==="srcObject"&&(n.__releaseMedia=()=>{try{e.srcObject!=null&&(e.srcObject=null)}catch{}})}}function tW(t){if(!t.autoGrow)return;if(globalThis.__SMBLS_BUILD_DROP_F_autoGrow__)return qt("autoGrow",t);let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let n=t.__ref,r=t.autoGrow,o=typeof r=="function"?zt(t,t.autoGrowDeps,r):null,s=K(()=>{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}z9(t,a)},{depth:n.path.length,label:_t(n,"autoGrow")});n.__effects||(n.__effects=[]),n.__effects.push(s),o&&(n.__exec.autoGrow=r)}var yI=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function bI(t,e){let n=!1;for(let r of Object.keys(t)){if(!ln(r)||yI.has(r))continue;if(r==="onInView"||r==="onLeaveView"){n=!0;continue}let o=lm(r);if(o){fm(o,t,t[r]);continue}let s=t[r],i=null;if(s&&typeof s=="object"&&!Array.isArray(s)&&(i=s,s=i.handler),s=zu(t,s),typeof s!="function")continue;let a=am(r);Jn.has(a)||ec(jH(a),t,s,i)}eW(t),n&&ct.viewEvents&&ct.viewEvents(t)}function eW(t){let e=t.node;if(!e||!e.addEventListener)return;let n={},r=!1;for(let d of yI){let p=t[d];typeof p=="function"&&(n[d]=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,l=!1,f=d=>{let p=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];p&&(i=p.clientX,a=p.clientY,c=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let p=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!p)return;let g=p.clientX-i,h=p.clientY-a,m=Date.now()-c;if(m>s)return;let y=Math.abs(g),x=Math.abs(h);if(Math.max(y,x)<o)return;let E;if(y>x*1.2)E=g<0?"left":"right";else if(x>y*1.2)E=h<0?"up":"down";else return;let C="onSwipe"+E.charAt(0).toUpperCase()+E.slice(1),_=n[C],b=n.onSwipe;_&&_.call(t,d,t,t.state,t.context),b&&b.call(t,{direction:E,dx:g,dy:h,dt:m,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function IE(t,e,n,r,o,s,i,a){let c=e;(typeof c=="string"||typeof c=="number")&&(c={text:c});let l=r;if(typeof r=="function")try{l=r(t,c)}catch{l=null}let f=typeof r=="function"?nd(l):o;if(a&&!i&&(f=rd(f,nd(e))),i){let u=e;(typeof e=="string"||typeof e=="number")&&(u={value:e,text:e}),c=l?{...l,state:u}:{state:u}}else l&&(c=Ve(l,c));return c=ld(c,s),{def:c,key:zD(c?.key,e,n,t),supplied:f,props:l}}function ld(t,e){if(!e||!t||t.ignoreChildExtends)return t;if(!t.extends)return{...t,extends:e};let n=Array.isArray(t.extends)?t.extends:[t.extends],r=Array.isArray(e)?e:[e];return{...t,extends:[...r,...n]}}var Br=t=>{let e=t&&t.__ref;if(!e||e.__if===!1||e.__mount&&e.__mount.held)return null;let n=t.node;return n&&n.nodeType!==11?n:null},_I=(t,e)=>e?e.nextSibling:Gu(t.node,t.__ref.__textNode),Nm=(t,e,n)=>{let r=_I(t,n);return e!==r&&t.node.insertBefore(e,r),e},fd=(t,e)=>{let n=_I(t,e);return n?{position:"before",node:n}:void 0};function ME(t,e,n){let r=null;for(let o=0;o<e.length;o++){if(n&&n.has(e[o]))continue;let s=Br(t[e[o]]);s&&(r=Nm(t,s,r))}}function ID(t,e,n,r){let o=ct.rows,s=o!==null&&t.childrenAs!=="state"&&t.tag!=="fragment"?o.track(t):null,i=NE(t,e,n,r,!0,s);return t.__ref.__plainRows=s&&(i||e==null||e===!1)?s:null,i}function NE(t,e,n,r,o,s){if(!e||!t.node)return;let i=t.childExtends,a=Lo(t,"childProps"),c=t.__ref,l=ct.mount,f=r>0&&t.tag!=="fragment"&&c?r:0;if(Array.isArray(e)){let u=t.childProps,d=t.childrenAs==="state",p=(g,h)=>{let m=IE(t,e[g],g,u,a,i,d,o);s&&s.add(m.key,e[g],m,u,i);try{let y=Yt(ei(m.def,m.supplied),t,m.key,n,h);return!y&&s&&s.none(m.key),Tm(t,y),y}catch(y){if(s&&s.failed(m.key),typeof console<"u"&&console.error){let x=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${m.key}" failed to construct at ${x} (initial render, skipping this row):`,y?.message||y)}return null}};if(!f){for(let g=0;g<e.length&&!(c&&c.__disposed);g++)p(g);return!0}return l.rows(t,e.length,p,f),!0}if(typeof e=="string"){let u=qD(e,t);if(Array.isArray(u))return NE(t,u,n,r,!0,s)}if(typeof e=="object"){let u=(p,g)=>{if(Gt.has(p))return!1;let h=e[p];if(h==null||h===!1)return!1;let m=o?rd(a,nd(h)):a;(typeof h=="string"||typeof h=="number")&&(h={text:h}),t.childProps&&(h=Ve(t.childProps,h)),h=ld(h,i);let y=Yt(ei(h,m),t,Lm(t,p),n,g);return Tm(t,y),y};if(!f){for(let p in e)u(p);return}let d=[];for(let p in e)d.push(p);l.rows(t,d.length,(p,g)=>u(d[p],g),f)}}function bc(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 f;if(i)try{f=s(t,t.state,t.context)}catch{return}else f=t.value,typeof f=="string"&&f.includes("{{")&&(f=Jt.call(t,f,t.state));let u=f==null?"":String(f);n.value!==u&&(n.value=u);return}let c=e||!(o&&o.__selectSynced);if(o&&(o.__selectSynced=!0),!c)return;let l=-1;for(let f=0;f<r.length;f++)r[f].defaultSelected&&(l=f);l>=0&&n.selectedIndex!==l&&(n.selectedIndex=l)}function wI(t,e){let{children:n,content:r}=t,o=t.childExtends,s=typeof n=="function",i=s||YD(t,"children");if(typeof n=="function"){let u=n,d=t.__ref,p=!1,g,h=zt(t,t.childrenDeps,u),m=K(()=>{let y=p;p=!0;let x;try{x=h(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 run, treating as empty)"}:`,T?.message||T)}return}if(!y){g=x;return}if(x===t.children)return;pD(t,x),t.children=x,d.__mount&&d.__mount.chunkGen++;let E=typeof t.onContentUpdate=="function",C=E?[]:null,_=E?[]:null,b=E?[]:null;if(Array.isArray(x)&&t.childrenAs==="state"){let T=t.childProps,O=[],B=new Map;for(let Z=0;Z<x.length;Z++){let J=x[Z],Q=T;if(typeof T=="function")try{Q=T(t,J)}catch{Q=null}let it=zD(Q&&Q.key,J,Z,t);O.push(it),B.set(it,{rawChild:J,childProps:Q})}let $=new Set(O),N=aD(d,d.__children.slice());for(let Z of N)if(!$.has(Z)){let J=t[Z];J?.remove&&J.remove(),delete t[Z],_&&_.push(Z)}let G=t.childExtends,nt=!(t.tag==="fragment")&&!!t.node,ot=null,st=new Set;for(let Z of O){let J=B.get(Z),Q=J.rawChild,it=t[Z];if(it&&it.state){if(Q&&typeof Q=="object"){let yt=it.state,jt=yt.$replace||yt.replace,Ct=yt.$update||yt.update;try{if(typeof jt=="function")jt.call(yt,Q);else if(typeof Ct=="function"){for(let Pt in yt)if(!(Pt==="__element"||Pt==="root"||Pt==="parent"||Pt==="update")&&!Object.prototype.hasOwnProperty.call(Q,Pt))try{yt[Pt]=void 0}catch{}Ct.call(yt,Q)}else for(let Pt in Q)yt[Pt]=Q[Pt]}catch(Pt){if(typeof console<"u"&&console.error){let qe=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${Z}" failed to patch at ${qe} (reconcile, keeping its previous data for this pass):`,Pt?.message||Pt)}}}if(b&&b.push(Z),nt){let yt=Br(it);yt&&(ot=Nm(t,yt,ot))}continue}let rt=Q;(typeof Q=="string"||typeof Q=="number")&&(rt={value:Q,text:Q});let gt=J.childProps,q=ld(gt?{...gt,state:rt}:{state:rt},G),W=typeof T=="function"?nd(gt):Lo(t,"childProps"),Rt;try{Rt=Yt(ei(q,W),t,Z,e,nt?fd(t,ot):void 0)}catch(yt){if(typeof console<"u"&&console.error){let jt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${Z}" failed to construct at ${jt} (reconcile, skipping this row):`,yt?.message||yt)}st.add(Z);continue}if(d.__disposed)return;if(nt){let yt=Br(Rt);yt&&(ot=yt)}C&&C.push(Z)}nt&&ME(t,O,st.size?st:null),d.__children=st.size?O.filter(Z=>!st.has(Z)):O,E&&(C.length||_.length)&&Am(t,{added:C,removed:_,kept:b}),bc(t,!1);return}if(t.childrenAs!=="state"&&d.__plainRows&&ct.rows.reconcile(t,d,x,e,E)){bc(t,!1);return}let A=E?[...d.__children]:null;for(let T of aD(d,[...d.__children])){let O=t[T];O?.remove&&O.remove(),delete t[T]}d.__children=[],ID(t,x,e,0),bc(t,!1),E&&Am(t,{added:[...d.__children],removed:A,kept:[]})},{depth:d.path.length,label:_t(d,"children")});d.__effects.push(m),n=g,pD(t,n),t.children=n}let a=ct.mount,c=a!==null?a.budgetOf(t,e):0,l=Yu(t.__ref),f=s?ID(t,n,e,c):NE(t,n,e,c,i);if(c&&Yu(t.__ref)>l){a.defer(t,c,()=>MD(t,e,n,r,o,f,c));return}MD(t,e,n,r,o,f,c)}function MD(t,e,n,r,o,s,i){let a=Yu(t.__ref);if(r!=null&&!(r&&r.__ref)){let c=r;typeof c=="string"||typeof c=="number"?c={text:c}:typeof c!="object"&&(c={}),t.childProps&&(c=Ve(t.childProps,c)),c=ld(c,o);let l=rd(Lo(t,"childProps"),Lo(t,"content"));Tm(t,Yt(ei(c,l),t,"content",e))}if(!(n&&!s)){if(i&&Yu(t.__ref)>a){ct.mount.defer(t,i,()=>ND(t,e,o,i));return}ND(t,e,o,i)}}function ND(t,e,n,r){let o=t.context?.components||{},s=t.__ref&&t.__ref.__runtimeSource,i=s?{}:null;{let l=Object.keys(t);for(let f=0;f<l.length;f++){let u=l[f];if(!u.endsWith("Extends")||typeof t[u]!="string")continue;let d=u.slice(0,-7);if(!d||d.charCodeAt(0)<65||d.charCodeAt(0)>90)continue;let p={extends:t[u]};delete t[u];for(let g=f+1;g<l.length;g++){let h=l[g],m=h.charCodeAt(0);if(m>=65&&m<=90||Gt.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let y=t[h];y!==void 0&&(p[h]=y,delete t[h],i&&ed(s,h)&&(i[d]||(i[d]={}),i[d][h]=s[h]))}t[d]&&typeof t[d]=="object"?t[d]={...p,...t[d]}:t[d]=p}}let a=Object.keys(t),c=l=>{if(Gt.has(l)||typeof t[l]!="object"||t[l]===null)return!1;let f=l.charCodeAt(0);if(f<65||f>90)return!1;let u=t[l];if(u.__ref)return!1;if(!u.extends&&!u.extend){let p=o[l]||o[`smbls.${l}`];p&&(u={...u,extends:p})}t.childProps&&(u=Ve(t.childProps,u)),u=ld(u,n);let d=s?rd(Lo(t,"childProps"),rd(i[l]||null,Lo(t,l))):null;Tm(t,Yt(ei(u,d),t,l,e))};if(!r){for(let l of a)c(l);return}ct.mount.run(t,a.length,l=>c(a[l]),r)}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 c=o.parentNode;if(c){if(n?.position==="before"&&n.node)c.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){let l=n.node.nextSibling;c.insertBefore(r,l||o)}else c.insertBefore(r,o);im();return}}let s=e?.node||(e?.nodeType?e:null);if(!s)return;if(!n&&ct.hydration!==null){let c=t.context&&t.context.__hydration;if(c&&ct.hydration.place(c,t,e,s,r))return}let i=n?.node,a=r.parentNode===s;if(i&&i.parentNode!==s)(!a||r.nextSibling)&&s.appendChild(r);else if(n?.position==="before"&&i)i!==r&&(!a||r.nextSibling!==i)&&s.insertBefore(r,i);else if(n?.position==="after"&&n.node){let c=n.node.nextSibling;c===r||(c?s.insertBefore(r,c):s.appendChild(r))}else(!a||r.nextSibling)&&s.appendChild(r);im()}var Pm=3;function Sm(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Pm?!1:(t.__inBeforeUpdate=!0,!0)}function er(t,e){t&&(t.__inBeforeUpdate=!1,e?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Pm&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Pm}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function Zt(t,e,n){let r=t.charAt(0).toLowerCase()+t.slice(1);tr(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 l=e.context?.designSystem;l&&mt(l);let f=!!c;try{let u=s(e,e.state,e.context,n);if(u&&typeof u.then=="function"){let d=e.__ref;return u.catch(p=>{un(e,o,p)}).finally(()=>{c&&d&&(d[c]=!1)}),f=!1,!0}if(u===!1)return!1}catch(u){if(un(e,o,u),e.context?.strictMode)throw u}finally{l&&ht(),f&&e.__ref&&(e.__ref[c]=!1)}}return!0}var ud=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),EI=1e3,vI=24,$E=Object.freeze({}),jE=Object.freeze({}),xc=0,$m=t=>{if(Et(t)||ud(t,"__ref"))return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null};function FE(t,e,n){if(t===null||typeof t!="object")return t;if(--xc<0||e>vI){xc=-1;return}if(Array.isArray(t)){let o=new Array(t.length);for(let s=0;s<t.length;s++)o[s]=n?t[s]:FE(t[s],e+1,!1);return o}if(n||!$m(t))return t;let r={};for(let o in t)ud(t,o)&&(r[o]=FE(t[o],e+1,o==="extends"||o==="childExtends"));return r}function SI(t){xc=EI;let e;try{e=FE(t,0,!1)}catch{return $E}return xc<0?$E:e}function BE(t,e,n,r){if(t===e)return!0;if(t===null||typeof t!="object"||e===null||typeof e!="object"||--xc<0||n>vI)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||e.length!==t.length)return!1;for(let s=0;s<t.length;s++)if(r?t[s]!==e[s]:!BE(t[s],e[s],n+1,!1))return!1;return!0}if(r||Array.isArray(e)||!$m(t)||!$m(e))return!1;let o=0;for(let s in t)if(ud(t,s)&&(o++,!ud(e,s)||!BE(t[s],e[s],n+1,s==="extends"||s==="childExtends")))return!1;for(let s in e)ud(e,s)&&o--;return o===0}function xI(t,e){if(e===$E||e===jE)return!1;xc=EI;try{return BE(t,e,0,!1)}catch{return!1}}var Fm=t=>Ie()?ve(()=>SI(t)):SI(t),kI=(t,e)=>Ie()?ve(()=>xI(t,e)):xI(t,e);function AI(t,e,n,r){let o=t;return o&&typeof o=="object"&&!Array.isArray(o)&&!$m(o)&&(r||n&&!o.ignoreChildExtends)&&(o=r?Ve({},o):{...o}),typeof e=="function"?{item:o,props:r}:o}var CI=t=>({childProps:typeof t.childProps=="function"?void 0:t.childProps,childExtends:t.childExtends}),Bm=class{constructor(e,n){this.shared=e,this.rows=n}add(e,n,r,o,s){this.rows.set(e,Fm(AI(n,o,s,r.props)))}failed(e){this.rows.set(e,jE)}none(e){this.rows.delete(e)}},nW=Object.freeze([]);function rW(t,e,n,r,o){let s=e.__plainRows.rows,i=e.__plainRows.shared,a=CI(t),c=kI(a,i),l=t.childProps,f=Lo(t,"childProps"),u=t.childExtends,d=new Array(n.length),p=new Map;for(let w=0;w<n.length;w++){let S=IE(t,n[w],w,l,f,u,!1,!0);if(p.has(S.key))return!1;p.set(S.key,S),d[w]=S}for(let w=0;w<d.length;w++){let S=d[w];S.input=AI(n[w],l,u,S.props);let A=c?s.get(S.key):void 0;if(A===void 0)continue;let T=t[S.key];T&&T.__ref&&T.parent===t&&kI(S.input,A)&&(S.kept=!0,S.snap=A)}let g=o?[]:null;for(let w of s.keys()){let S=p.get(w);if(S&&S.kept)continue;let A=t[w];A?.remove&&A.remove(),delete t[w],g&&g.push(w)}let h=o?[]:null,m=o?[]:null,y=new Map,x=null,E=null;for(let w=0;w<d.length;w++){let S=d[w];if(S.kept){y.set(S.key,S.snap),m&&m.push(S.key);let O=Br(t[S.key]);O&&(E=Nm(t,O,E));continue}y.set(S.key,Fm(S.input));let A;try{A=Yt(ei(S.def,S.supplied),t,S.key,r,fd(t,E))}catch(O){if(y.set(S.key,jE),x||(x=new Set),x.add(S.key),typeof console<"u"&&console.error){let B=e.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${S.key}" failed to construct at ${B} (re-run, skipping this row):`,O?.message||O)}continue}if(e.__disposed)return!0;if(!A){y.delete(S.key);continue}let T=Br(A);T&&(E=T),h&&h.push(S.key)}e.__plainRows=new Bm(c?i:Fm(a),y);let C=Array.from(y.keys());ME(t,C,x);let _=new Set(e.__children),b=[];for(let w=0;w<C.length;w++)_.has(C[w])&&b.push(C[w]);for(let w of e.__children)y.has(w)||b.push(w);return e.__children=b,o&&(h.length||g.length)&&Am(t,{added:h,removed:g,kept:m}),!0}var TI={track:t=>new Bm(Fm(CI(t)),new Map),reconcile(t,e,n,r,o){let s=Array.isArray(n)?n:n==null||n===!1?nW:null;return!!s&&rW(t,e,s,r,o)}};var jm=t=>{let e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;let n=t.parent,r=n&&n.__ref?jm(n):null,o=r===null?"":r?r+"."+t.key:String(t.key);return e&&(e.__hydrationPath=o),o},oW=new Set(["src","srcset"]),sW=new Set(["sizes","loading","fetchpriority","decoding","crossorigin","referrerpolicy","width","height"]),iW=new Set(["sizes","media","type","width","height"]),aW=t=>t==="img"?sW:t==="source"?iW:null,cW=t=>t.charCodeAt(0)===97&&t.startsWith("aria-")||t.charCodeAt(0)===100&&t.startsWith("data-")&&t!=="data-br"&&t!=="data-key",OI=(t,e)=>{for(let n of e){let r=t.nodes.get(n.target);r&&(r.delete(n.attributeName),r.size||t.nodes.delete(n.target))}},lW=(t,e,n)=>{let r=t.built;if(!r){let o=e.ownerDocument&&e.ownerDocument.defaultView&&e.ownerDocument.defaultView.MutationObserver||(typeof MutationObserver=="function"?MutationObserver:null);if(!o)return!1;let s=new Map;r=t.built={nodes:s,observer:null},r.observer=new o(i=>OI(r,i))}return r.nodes.set(e,new Set(n)),r.observer.observe(e,{attributes:!0,attributeFilter:n}),!0};function Mo(t){let e=t&&t.built;if(!e)return 0;t.built=null,OI(e,e.observer.takeRecords()),e.observer.disconnect();let n=0;for(let[r,o]of e.nodes)for(let s of o)r.hasAttribute(s)&&(r.removeAttribute(s),n++);return e.nodes.clear(),n}function UE(t){let e=t?.context?.__hydration;if(!e)return null;let n=t.tag=Qn(t);if(n==="string"||n==="fragment")return null;let r=jm(t),o=e.registry[r===""?"__root":r],s=o!==void 0?e.nodes[o]:null;if(!s||s.nodeType!==1||e.claimed.has(s))return o!==void 0&&e.misses++,null;let i=Nr(n)&&(n==="svg"||t.parent?.node?.namespaceURI===Xs),a=Nr(n)&&!i&&n!=="svg"?"div":n,c=i?s.namespaceURI===Xs:s.namespaceURI!==Xs;if(s.localName!==a||!c)return e.misses++,null;e.claimed.add(s),e.adopted++;let l=e.pending;if(l&&l.delete(s)){let d=s.parentNode,p=d?(e.pendingIn.get(d)||1)-1:0;p>0?e.pendingIn.set(d,p):d&&e.pendingIn.delete(d)}let f=null,u=aW(s.localName);for(let d of Array.from(s.getAttributeNames?s.getAttributeNames():[]))oW.has(d)||d==="data-key"||u&&u.has(d)||(cW(d)?(f||(f=[])).push(d):s.removeAttribute(d));if(f&&!lW(e,s,f))for(let d of f)s.removeAttribute(d);if(l){let d=0,p=0,g=s.firstChild,h=t.text!=null&&g&&g.nodeType===3&&!l.has(g)?g:null;for(let m=s.firstChild;m;){let y=m.nextSibling;m!==h&&!l.has(m)&&(m.nodeType===3?d++:m.nodeType!==8&&p++,s.removeChild(m)),m=y}(p||d>(t.text!=null&&!h?1:0))&&(e.whole||(e.whole=new Set)).add(t)}else for(;s.firstChild;)s.removeChild(s.firstChild);return s.localName==="img"&&s.complete&&s.naturalWidth>0&&uW(s),s}var fW=500;function uW(t){let e=!1,n=!1,r=o=>{o.isTrusted&&(n?o.stopImmediatePropagation():e=!0,t.removeEventListener("load",r,!0))};t.addEventListener("load",r,!0),setTimeout(()=>{if(!e){if(!(t.complete&&t.naturalWidth>0)){t.removeEventListener("load",r,!0);return}n=!0,t.dispatchEvent(new Event("load")),setTimeout(()=>t.removeEventListener("load",r,!0),fW)}},0)}function dW(t,e,n,r,o){if(o.parentNode===r&&t.claimed.has(o))return!0;let s=t.pendingIn;if(!s||!s.has(r))return!1;let i,a=n&&n.__ref,c=a&&a.__children,l=c?c.lastIndexOf(e.key):-1;for(let f=l-1;f>=0;f--){let u=n[c[f]],d=u&&u.node;if(d&&d!==o&&d.parentNode===r){i=d.nextSibling;break}}return i===void 0&&(i=Gu(r,a&&a.__textNode)),i===o||r.insertBefore(o,i),!0}function pW(t,e){let n=t.whole;if(!n)return!1;if(n.has(e))return!0;let r=e.parent;return!r||!n.has(r)?!1:(n.add(e),!0)}var RI={adopt:UE,place:dW,whole:pW,settle:Mo};var si=50;function sr(t){return t===!0?si:typeof t=="number"&&t>0?t:0}var Ln=[],Ec=!1,No=0,jr=si,hd=!1,Vm=[],zm=typeof performance<"u"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),Um=[],dd=null;function hW(t){if(!dd){let e=new MessageChannel;e.port1.onmessage=()=>{let n=Um.shift();!Um.length&&typeof e.port1.unref=="function"&&e.port1.unref(),n&&n()},dd=e}Um.push(t),Um.length===1&&typeof dd.port1.ref=="function"&&dd.port1.ref(),dd.port2.postMessage(0)}function WE(t){let e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(t,t);return}if(typeof setImmediate=="function"){setImmediate(t);return}if(typeof MessageChannel=="function"){hW(t);return}setTimeout(t,0)}function ir(){return new Promise(t=>WE(t))}var pd=0,zE=0,HE=0,kc=0;function KE(){pd=0,zE=No,HE=0,kc=0}function PI(){if(!No)return!1;if(pd++,kc>0)return kc--,!1;let t=zm(),e=t-No,n=e/pd,r=(t-zE)/(pd-HE),o=r>n?r:n;zE=t,HE=pd;let s=jr-e-o;return s<=0?(hd=!0,!0):(kc=o>0?Math.floor(s/o/2):0,!1)}var oi=0;function LI(t=si){oi===0&&!No?(No=zm(),hd=!1,jr=t,KE()):t<jr&&(jr=t,kc=0),oi++}var ze=null,VE=!1,gW=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);function qE(){No=0,hd=!1,jr=si,KE()}function mW(){VE||(VE=!0,gW(()=>{VE=!1,oi===0&&qE()}))}function DI(){oi>0&&oi--,!(oi!==0||ze!==null)&&(Ec?mW():qE())}function GE(t,e=si,n=null){let r={fn:t,budget:e,lease:n};ze?ze.push(r):Ln.push(r),Ec||(Ec=!0,WE(II))}function YE(t){let e=t&&t.context;return e&&e.__mountLease||null}function gd(t){if(!t)return;let e=0;for(let n=0;n<Ln.length;n++){let r=Ln[n];r.lease!==t&&(Ln[e++]=r)}if(Ln.length=e,ze){let n=0;for(let r=0;r<ze.length;r++)ze[r].lease!==t&&(ze[n++]=ze[r]);ze.length=n}typeof t.lost=="function"&&t.lost()}function yW(t){if(t.lease!==null&&!t.lease.live()){gd(t.lease);return}let e=ze;ze=[];try{t.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{let n=ze;ze=e,n.length&&Ln.unshift(...n)}}function Ce(){return!Ec&&!Ln.length?Promise.resolve():new Promise(t=>Vm.push(t))}function $o(){return!Ec&&!Ln.length}function bW(){if(!Vm.length)return;let t=Vm;Vm=[];for(let e=0;e<t.length;e++)t[e]()}function II(){for(No=zm(),hd=!1,jr=1/0,KE();Ln.length;){let t=Ln.shift();if(t.budget<jr&&(jr=t.budget,kc=0),yW(t),hd||zm()-No>=jr)break}if(oi=0,qE(),Ln.length){WE(II);return}Ec=!1,bW()}function Hm(t){ac(t.__ref).pending++}function He(t){let e=t&&t.__ref,n=e&&e.__mount;if(!n||!(n.pending>0)||--n.pending>0||e.__disposed)return;let r=n.tail;r&&(n.tail=null,r())}function Wm(t){let e=t&&t.__ref&&t.__ref.__mount;return!!(e&&e.tail)}function Ur(t){let e=t&&t.__ref&&t.__ref.__mount;return!e||!e.tail?Promise.resolve(t):new Promise(n=>{(e.waiters||(e.waiters=[])).push(n)})}function XE(t,e=t&&t.__ref){let n=e&&e.__mount,r=n&&n.waiters;if(r){n.waiters=null;for(let o=0;o<r.length;o++)r[o](t)}}function MI(t,e=t&&t.__ref){let n=e&&e.__mount;if(!n||!n.tail)return;n.tail=null,n.pending=0;let r=n.holder;n.holder=null,XE(t,e),r&&He(r)}function _W(t,e){let n=e&&e.mountYield;if(!n&&!t.yieldChildren)return 0;let r=ct.hydration!==null&&t.context?t.context.__hydration:null;if(r&&ct.hydration.whole(r,t))return 0;let o=n?sr(n):0,s=sr(t.yieldChildren);return o&&s?o<s?o:s:o||s}function NI(t,e,n,r,o){LI(r);try{$I(t,t.__ref,0,e,n,r,o,!1)}finally{DI()}}function $I(t,e,n,r,o,s,i,a){try{for(let c=n;c<r;c++){let l=e.__mount,f=l?l.pending:0;if(o(c)===!1)continue;if(e.__disposed)break;let u=PI(),d=e.__mount;if(c+1<r&&(u||(d?d.pending:0)>f)){i&&i.onSuspend&&i.onSuspend(),a||Hm(t);let p=c+1;GE(()=>wW(t,e,p,r,o,s,i),s,YE(t));return}}}catch(c){if(!a)throw c;Dm(t,c)}a&&He(t)}function wW(t,e,n,r,o,s,i){if(e.__disposed||i&&i.isStale&&i.isStale()){He(t);return}$I(t,e,n,r,o,s,i,!0)}function SW(t,e,n){Hm(t),GE(()=>{try{let r=t.__ref;r&&!r.__disposed&&n()}catch(r){Dm(t,r)}finally{He(t)}},e,YE(t))}function xW(t,e,n,r){let o=t.__ref,s=ac(o),i=++s.chunkGen,a=t.node,c=[],l=!1;NI(t,e,f=>{let u=n(f,l?fd(t,kW(a,c)):void 0),d=FI(u);return d?c.push(d):u&&u.__ref.__mount&&u.__ref.__mount.held&&c.push(u),u},r,{isStale:()=>s.chunkGen!==i,onSuspend:()=>{l=!0}})}function FI(t){let e=Br(t);if(e)return e;let n=t&&t.__ref;return n&&n.__if!==!1&&t.tag==="fragment"&&n.__fragmentAnchor||null}function kW(t,e){for(let n=e.length-1;n>=0;n--){let r=e[n].__ref?FI(e[n]):e[n];if(r&&r.parentNode===t)return r}return null}function EW(t,e){let n=t.__ref;try{bc(t,!0),HD(t),EE(t,e)}finally{XE(t,n);let r=n.__mount,o=r&&r.holder;o&&(r.holder=null,He(o))}}var BI={budgetOf:_W,run:NI,rows:xW,defer:SW,hold:Hm,finish:EW,abandon:MI};function jI(){ct.viewEvents=QP,ct.chains=YP,ct.rows=TI,ct.hydration=globalThis.__SMBLS_BUILD_DROP_F_prerender__?null:RI,ct.mount=BI}jI();Mt();var ii="inertOutside",AW=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),CW='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',TW={attributes:!0,attributeFilter:["inert"]},UI=new WeakMap,VI=new WeakMap,md=new Set,zI=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function Fo(t){try{return ve(t)}catch(e){console.error("[smbls] inertOutside:",e)}}function HI(t){let e=()=>Fo(t);typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e)}function OW(t){if(!t||!t.defaultView||!("activeElement"in t))return null;let e=UI.get(t);if(e)return e;let n=t.defaultView.MutationObserver||globalThis.MutationObserver;return typeof n!="function"?null:(e={doc:t,layers:[],held:new Map,top:null,observer:null},e.observer=new n(r=>Fo(()=>Km(e,r))),UI.set(t,e),e)}function JE(t,e){let n=t.element.node;return!!n&&n.nodeType===1&&n.isConnected&&n.ownerDocument===e}function RW(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var WI=t=>!!(t.closest&&t.closest("[inert]"));function PW(t){let e=t.ownerDocument,n=new Set,r=[];for(let o=t;o!==e.body;o=o.parentNode){let s=o.parentNode;if(!s||s.nodeType!==1||s===e.documentElement)break;r.push(s);for(let i=s.firstElementChild;i;i=i.nextElementSibling)i!==o&&!AW.has(i.tagName)&&n.add(i)}return{outside:n,parents:r}}function KI(t,e){for(let n=0;n<e.length;n++){let{type:r,target:o}=e[n];r==="attributes"&&t.held.has(o)&&t.held.set(o,!o.hasAttribute("inert"))}}function Km(t,e){let{doc:n,held:r,observer:o}=t;e&&KI(t,e),KI(t,o.takeRecords());let s=t.top,i=[];for(let u of t.layers){let d=JE(u,n);d&&!u.live&&(i.push(u),u.returnFocus=RW(n)),u.live=d}i.length&&(t.layers=t.layers.filter(u=>!i.includes(u)).concat(i));let a=null;for(let u=t.layers.length-1;u>=0&&!a;u--)t.layers[u].live&&(a=t.layers[u]);t.top=a;let{outside:c,parents:l}=a?PW(a.element.node):{outside:new Set,parents:[]};for(let[u,d]of r)c.has(u)||(d&&u.removeAttribute("inert"),r.delete(u));for(let u of c)r.has(u)||r.set(u,!1),u.hasAttribute("inert")||(u.setAttribute("inert",""),r.set(u,!0));o.takeRecords(),o.disconnect();for(let u of l)o.observe(u,{childList:!0});for(let u of r.keys())o.observe(u,TW);t.layers.some(u=>!u.live)?md.add(t):md.delete(t);for(let u of t.layers)!u.live&&!u.connecting&&!tc(u.element)&&(u.connecting=!0,vo(u.element,()=>Fo(()=>{u.connecting=!1,u.declared&&!u.live&&JE(u,t.doc)&&Km(t)})));if(a===s)return;let f=s&&!(s.declared&&s.live)?s:null;if(a&&i.includes(a))f&&f.returnFocus&&(a.returnFocus=f.returnFocus),HI(()=>GI(t,a));else if(f){let u=f.returnFocus;HI(()=>LW(t,f,u))}f&&(f.returnFocus=null)}function GI(t,e){let n=e.element.node;if(t.top!==e||!n||!n.isConnected)return;let r=t.doc,o=r.activeElement;if(o&&n.contains(o))return;let s=new Set,i=(a,c)=>{if(s.has(a)||(s.add(a),a.matches(":disabled")))return!1;let l=c&&a.getAttribute("tabindex");return l&&parseInt(l,10)<0?!1:(a.focus(),r.activeElement===a)};for(let a of n.querySelectorAll("[autofocus]"))if(i(a,!1))return;for(let a of n.querySelectorAll(CW))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function LW(t,e,n){if(e.declared&&e.live)return;let r=t.doc,o=r.activeElement,s=e.element.node;(!o||o===r.body||s&&s.contains(o)||WI(o))&&(n&&n.isConnected&&n.ownerDocument===r&&!WI(n)&&(n.focus({preventScroll:!0}),r.activeElement===n)||t.top&&GI(t,t.top))}function ZE(t,e){if(t.declared===e)return;let n=t.manager;if(t.declared=e,t.live=!1,e)n.layers.push(t);else{let r=n.layers.indexOf(t);r!==-1&&n.layers.splice(r,1)}Km(n)}function YI(t){let e=t[ii];if(typeof e=="function")try{e=e(t,t.state,t.context)}catch{e=!1}return!!e}function qI(t){let e=VI.get(t);if(e)return e;let n=t.__ref,r=t.node;if(!n||!r||r.nodeType!==1)return null;let o=OW(r.ownerDocument);if(!o)return null;e={element:t,manager:o,declared:!1,live:!1,connecting:!1,returnFocus:null},VI.set(t,e);let s=K(()=>{let i=YI(t);Fo(()=>ZE(e,i))},{depth:n.path.length,label:()=>n.path.join(".")+"::"+ii});return n.__effects||(n.__effects=[]),n.__effects.push(s),n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>Fo(()=>ZE(e,!1))),e}function DW(){for(let t of md){if(!t.doc.defaultView){md.delete(t);continue}t.layers.some(e=>!e.live&&JE(e,t.doc))&&Km(t)}}var qm={name:ii,create(t){if(zI(t,ii)){if(globalThis.__SMBLS_BUILD_DROP_F_inertOutside__)return qt(ii,t);Fo(()=>qI(t))}},render(){globalThis.__SMBLS_BUILD_DROP_F_inertOutside__||md.size&&Fo(DW)},update(t){if(zI(t,ii)){if(globalThis.__SMBLS_BUILD_DROP_F_inertOutside__)return qt(ii,t);Fo(()=>{let e=qI(t);e&&ZE(e,YI(t))})}}};var XI={blue:"#213eb0",green:"#389d34",red:"#e15c55",yellow:"#EDCB38",orange:"#e97c16",transparent:"rgba(0, 0, 0, 0)",black:"black",gray:"#4e4e50",white:"white",title:["gray-168","gray+168"],caption:["gray-68","gray+68"],paragraph:["gray-42","gray+42"],disabled:["gray-26","gray+26"],line:["gray-16","gray+16"],scrim:["black.45","black.55"],scrimSoft:["black.2","black.3"],blueDeep:"#0A5CB8",blueBright:"#47A8FF",accentInk:["blueDeep","blueBright"],greenDeep:"#2A6E28",greenBright:"#7FD07B",successInk:["greenDeep","greenBright"],redDeep:"#A83520",redBright:"#FF8C78",dangerInk:["redDeep","redBright"],orangeDeep:"#94500F",orangeBright:"#F4A45E",warningInk:["orangeDeep","orangeBright"],magentaDeep:"#A100A1",magentaBright:"#FF7AFF",magentaInk:["magentaDeep","magentaBright"]},JI={"gradient-blue-light":`linear-gradient(to right,
63
63
  rgba(4, 116, 242, 1),
64
64
  rgba(0, 48, 103, 1)
65
65
  )`,"gradient-blue-dark":`linear-gradient(to right,
@@ -85,12 +85,12 @@ FROM ${a}${l}`},j5=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
85
85
  #1E54F0 36%,
86
86
  #8B4CCA 69%,
87
87
  #C66894 100%
88
- )`};var SW={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},xW={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},kW={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},WI={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...SW,...xW,...kW,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var KI={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var qI={ratio:1.618,subSequence:!0};var GI={SourceSans:[{url:""}]},YI={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var XI={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var JI={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920.02px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680.02px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440.02px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366.02px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280.02px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024.02px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768.02px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560.02px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480.02px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375.02px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var ZI={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var QI={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var si={version:"0.0.1",color:HI,gradient:zI,theme:WI,typography:KI,spacing:qI,font:GI,fontFamily:YI,timing:ZI,icons:XI,media:JI,sizes:QI,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Rc={};F(Rc,{A:()=>d$,AssetPicture:()=>yM,Audio:()=>wM,Avatar:()=>$$,B:()=>BM,Block:()=>tM,Box:()=>Gm,Br:()=>HM,Bridge:()=>JM,Button:()=>g$,ButtonSet:()=>_$,COMPONENTS:()=>hi,Caption:()=>RM,Checkbox:()=>tN,CheckboxHgroup:()=>eN,Circle:()=>hM,CircleButton:()=>y$,Clickable:()=>uM,Data:()=>UM,Dialog:()=>v$,DialogFooter:()=>C$,DialogHeader:()=>A$,Dropdown:()=>f2,DropdownDisclosure:()=>p2,DropdownList:()=>u2,DropdownParent:()=>d2,DropdownParentFocus:()=>h2,DropdownSiblingFocus:()=>g2,FileIcon:()=>bN,Flex:()=>nM,Focusable:()=>dM,FocusableComponent:()=>pM,Footnote:()=>FM,Form:()=>cM,Grid:()=>oM,Gutter:()=>iM,H1:()=>kM,H2:()=>EM,H3:()=>vM,H4:()=>AM,H5:()=>CM,H6:()=>TM,Headline:()=>NM,Hgroup:()=>GM,HgroupButton:()=>XM,HgroupRows:()=>YM,Hoverable:()=>fM,Hr:()=>VM,I:()=>jM,Icon:()=>mN,IconButton:()=>w$,IconText:()=>yN,Iframe:()=>lM,Img:()=>aM,Inline:()=>eM,InlineFlex:()=>rM,InlineGrid:()=>sM,Input:()=>ZM,Italic:()=>IM,KangorooButton:()=>b$,Li:()=>zM,Link:()=>zv,Notification:()=>m2,NumberInput:()=>QM,Ol:()=>KM,P:()=>OM,Picture:()=>mM,Radio:()=>nN,RadioHgroup:()=>rN,Range:()=>F$,RouteLink:()=>p$,RouterLink:()=>Wv,SHAPES:()=>Km,Select:()=>h$,Shape:()=>tv,Span:()=>xM,SquareButton:()=>m$,Strong:()=>PM,Subhead:()=>$M,Svg:()=>bM,Text:()=>SM,Textarea:()=>iN,TextareaWithButton:()=>aN,Theme:()=>gM,Title:()=>MM,Toggle:()=>oN,ToggleHgroup:()=>sN,Tooltip:()=>I$,TooltipHidden:()=>M$,TooltipLayer:()=>eA,TooltipParent:()=>N$,U:()=>LM,Ul:()=>WM,Underline:()=>DM,Video:()=>_M,depth:()=>qm,focusableRingEnabled:()=>hd,focusableRingToken:()=>ZE,focusableRingValue:()=>ii,getSystemGlobalTheme:()=>gd});var GE={};F(GE,{Block:()=>tM,Flex:()=>nM,Grid:()=>oM,Gutter:()=>iM,Inline:()=>eM,InlineFlex:()=>rM,InlineGrid:()=>sM});var tM={display:"block"},eM={display:"inline"},nM={display:"flex"},rM={display:"inline-flex"},oM={display:"grid"},sM={display:"inline-grid"},iM={boxSize:"C1"};var YE={};F(YE,{Img:()=>aM});M();var aM={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=be(t);return e&&e.src||t.src},srcset:t=>{let e=be(t);return(e?$f(e):"")||t.srcset||t.srcSet}}};var XE={};F(XE,{Form:()=>cM});var cM={tag:"form"};var JE={};F(JE,{Iframe:()=>lM});var lM={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var QE={};F(QE,{Clickable:()=>uM,Focusable:()=>dM,FocusableComponent:()=>pM,Hoverable:()=>fM,focusableRingEnabled:()=>hd,focusableRingToken:()=>ZE,focusableRingValue:()=>ii});var EW={appearance:"none",fontFamily:"inherit"},fM={transition:"opacity C defaultBezier, transform C defaultBezier",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},uM={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function hd(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function ZE(t){let e=t.context&&t.context.designSystem,n=e&&e.focusableRing;if(typeof n=="string")return n?{outline:n,outlineOffset:void 0}:null;if(!n||typeof n!="object"||Array.isArray(n))return null;let r=n.outline||void 0,o=n.outlineOffset!=null&&n.outlineOffset!==""?n.outlineOffset:void 0;return r||o!==void 0?{outline:r,outlineOffset:o}:null}function ii(t,e,n){let r=ZE(t);return r&&r[e]!==void 0?r[e]:n}var dM={border:"none",outline:t=>hd(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>hd(t)?ii(t,"outline","solid X currentColor"):"none",outlineOffset:t=>hd(t)?ii(t,"outlineOffset"):void 0}},pM={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:EW};var rv={};F(rv,{Picture:()=>mM});var nv={};F(nv,{Theme:()=>gM,getSystemGlobalTheme:()=>gd});var ev={};F(ev,{Circle:()=>hM,SHAPES:()=>Km,Shape:()=>tv,default:()=>vW,depth:()=>qm});M();var pn=P(),qm={4:{boxShadow:`rgba(0,0,0,.10) 0 2${pn.unit.default} 4${pn.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${pn.unit.default} 6${pn.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${pn.unit.default} 10${pn.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${pn.unit.default} 16${pn.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${pn.unit.default} 26${pn.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${pn.unit.default} 42${pn.unit.default}`}},kc=t=>dt(t.shapeDirectionColor)||dt(t.borderColor)||dt(t.backgroundColor)||dt(t.background),Wm=t=>{let e=Uu.transition(t.transition,t);return e&&e.transition},Km={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:kc(t),transition:Wm(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:kc(t),transition:Wm(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:kc(t),transition:Wm(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Wm(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${kc(t)} 25%, transparent 25%), linear-gradient(315deg, ${kc(t)} 25%, transparent 25%)`},"&:after":{background:kc(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},tv={deps:{exec:St,getSpacingBasedOnRatio:$e,getMediaColor:Kt},classlist:{shape:t=>t.deps.exec(Km[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Km[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},hM={round:"100%"},vW=tv;M();var gd=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},gM={deps:{depth:qm},classlist:{depth:t=>!Yt(t.depth)&&t.deps.depth[t.depth]}};var mM={deps:{getSystemGlobalTheme:gd},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:gd},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var ov={};F(ov,{AssetPicture:()=>yM});M();var yM={tag:"picture",children:t=>{let e=be(t);if(e)return Ff(e,t.alt)}};var sv={};F(sv,{Svg:()=>bM});var bM={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let p=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(p))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[p]:i},{document:g}):r&&typeof r.init=="function"&&r.init({svg:{[p]:i}},{document:g,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var iv={};F(iv,{Video:()=>_M});M();var _M={tag:"video",controls:!0,attr:{src:t=>{let e=be(t);return e&&e.src||t.src}},children:t=>{let e=be(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var av={};F(av,{Audio:()=>wM});M();var wM={tag:"audio",controls:!0,attr:{src:t=>{let e=be(t);return e&&e.src||t.src}},children:t=>{let e=be(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var cv={};F(cv,{B:()=>BM,Caption:()=>RM,Data:()=>UM,Footnote:()=>FM,H1:()=>kM,H2:()=>EM,H3:()=>vM,H4:()=>AM,H5:()=>CM,H6:()=>TM,Headline:()=>NM,I:()=>jM,Italic:()=>IM,P:()=>OM,Span:()=>xM,Strong:()=>PM,Subhead:()=>$M,Text:()=>SM,Title:()=>MM,U:()=>LM,Underline:()=>DM});var SM={},xM={tag:"span"},kM={tag:"h1"},EM={tag:"h2"},vM={tag:"h3"},AM={tag:"h4"},CM={tag:"h5"},TM={tag:"h6"},OM={tag:"p"},RM={tag:"caption"},PM={tag:"strong",fontWeight:"700"},LM={tag:"u"},DM={tag:"u"},IM={tag:"i"},MM={},NM={tag:"h6",fontSize:"B",fontWeight:500},$M={tag:"span",fontSize:"Z1"},FM={tag:"span",fontSize:"Z"},BM={tag:"b"},jM={tag:"i"},UM={tag:"data"};var lv={};F(lv,{Box:()=>Gm,Br:()=>HM,Hr:()=>VM,Li:()=>zM,Ol:()=>KM,Ul:()=>WM});var AW=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=te(e,t,{unpack:!1});n.__class=r},Gm={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:AW},VM={tag:"hr",margin:"C1 0"},HM={tag:"br"},zM={tag:"li"},WM={tag:"ul",childExtends:{extends:"Li"}},KM={tag:"ol",childExtends:{extends:"Li"}};var fv={};F(fv,{Hgroup:()=>GM,HgroupButton:()=>XM,HgroupRows:()=>YM});var qM=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},GM={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:qM,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:qM,margin:"0",color:"paragraph"}},YM={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},XM={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var uv={};F(uv,{Bridge:()=>JM});var JM={tag:"div"};var dv={};F(dv,{Input:()=>ZM});var ZM={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,name:t=>t.name,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,required:t=>t.required,type:t=>t.type}};var pv={};F(pv,{NumberInput:()=>QM});var QM={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"1px solid line",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var hv={};F(hv,{Checkbox:()=>tN,CheckboxHgroup:()=>eN});var tN={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:t=>ii(t,"outline","solid X currentColor"),outlineOffset:t=>ii(t,"outlineOffset","Z")},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},eN={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var gv={};F(gv,{Radio:()=>nN,RadioHgroup:()=>rN});var nN={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},rN={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var mv={};F(mv,{Toggle:()=>oN,ToggleHgroup:()=>sN});var oN={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},sN={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var yv={};F(yv,{Textarea:()=>iN,TextareaWithButton:()=>aN});var iN={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},aN={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var wv={};F(wv,{FileIcon:()=>bN,Icon:()=>mN,IconText:()=>yN});Mt();var cN=new Set,CW=t=>t==="icon"?"build.treeShakeIcons":"build.treeShakeComponents",lN=(t,e,n)=>{let r=t+":"+e;if(cN.has(r)||(cN.add(r),typeof console>"u"||!console.error))return;let o=n&&n.__ref&&n.__ref.path,s=o&&o.length?` (at <${o.join(".")}>)`:"",i=CW(t);console.error(`[smbls] ${t==="icon"?"Icon":"Component"} "${e}"${s} is not in this build: symbols.json ${i} left it out because the project source never names it. Add "${e}" to ${i}.keep.`)};var TW=new Set;var fN=t=>TW.has(t);var uN=new Set,dN=(t,e)=>{if(!uN.has(t)&&(uN.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},pN=(t,e)=>{let n=t.find(r=>r&&fN(r));return n?(lN("icon",n,e),!0):!1},hN=new WeakMap,OW=t=>{let e=hN.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},hN.set(t,e)),e},RW=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},PW=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);mt(t);try{let o=P();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Us(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&Vs(s,{document:r}),Object.keys(s).length>0}finally{ht()}},LW=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=OW(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=()=>i(e,t),f=Promise.resolve().then(l).then(u=>{let d=RW(u,n);return d?PW(s,d,r):!1}).catch(u=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,u),!1)).then(u=>{a.pending.delete(e);let d=a.waiting.get(e);a.waiting.delete(e),u||a.failed.add(e),d&&d.forEach(p=>{try{p(u)}catch(g){console.error("[Icon] repaint error:",g)}})});return a.pending.set(e,f),!0},DW="0 0 24 24",IW=/<(symbol|svg)\b[^>]*>/i,MW={viewBox:/\sviewBox\s*=\s*(?:"([^"]*)"|'([^']*)')/i,width:/\swidth\s*=\s*(?:"([^"]*)"|'([^']*)')/i,height:/\sheight\s*=\s*(?:"([^"]*)"|'([^']*)')/i},bv=(t,e)=>{let n=t.match(MW[e]);return n?n[1]!==void 0?n[1]:n[2]:void 0},gN=t=>{let e=typeof t=="string"&&t.match(/^\s*(\d*\.?\d+)\s*(?:px)?\s*$/);return e?Number(e[1]):void 0},NW=(t,e)=>{if(typeof t!="string")return;let n=t.match(IW);if(!n)return;let r=(bv(n[0],"viewBox")||"").trim().split(/[\s,]+/).map(Number),o=r.length===4&&r[2]>0&&r[3]>0?[r[2],r[3]]:void 0,s=gN(bv(n[0],"width")),i=gN(bv(n[0],"height")),a=s>0&&i>0?[s,i]:void 0,c=n[1].toLowerCase()==="symbol"||e?o||a:a||o;return c?`0 0 ${c[0]} ${c[1]}`:void 0},_v=t=>{let e=t.call("exec",t.viewBox,t);if(e)return e;let n=t.context&&t.context.designSystem,r=!!(t.spriteId||n&&n.useSvgSprite);return NW(t.call("exec",t.src,t),r)||DW},mN={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=!1,l=(h,m)=>{try{return{value:t.call("exec",h,m)}}catch(y){if(t.__ref&&(t.__ref.__iconNameError=y),!c&&typeof console<"u"&&console.warn){c=!0;let x=t.__ref&&t.__ref.path,E=x&&x.length?` at <${x.join(".")}>`:"";console.warn(`[Icon] name/icon factory threw${E} \u2014 treated as no name (a painted glyph stays):`,y&&y.message||y)}return{threw:!0}}},f=(h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:x}=m&&m.utils,C=x(h).split(/([a-z])([A-Z])/g),_=C[1]?C[0]:h.split(".")[0].split(" ")[0],b=y&&y[_];if(b){let w=h.includes(".")?"sfsymbols."+h.split(".").slice(1).join("."):"sfsymbols";return h=b[w]||b[h.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${h}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},u=h=>{let{key:m}=h,y=l(h.name||h.icon||m,h);if(y.threw)return{name:m,threw:!0};let x=y.value;return h.call("isString",x)&&x.includes("{{")&&(x=h.call("replaceLiteralsWithObjectFields",x)),{name:h.call("isString",x)?x:m}},d=t.src,p,g=()=>{let h=u(t);if(h.threw&&t.node&&t.node.innerHTML)return;let m=h.name,y=m;if(m.includes(" ")){let $=m.split(" ");m=$[0]+$.slice(1).map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join("")}let x=a(m),E=x.split(/([a-z])([A-Z])/g),C=f(y,n);if(C){Object.assign(t,C);return}let _,b=t[".isActive"];b&&(b.name||b.icon)&&t.isActive&&(_=l(b.name||b.icon,t).value);let w=r&&r[".isActive"];w&&w.icon&&r.isActive&&(_=l(w.icon||w.Icon.name||w.Icon.icon,t).value),t.call("isString",_)&&_.includes("{{")&&(_=t.call("replaceLiteralsWithObjectFields",_));let S;o[_]&&(S=_),o[x]?S=x:o[E[0]+E[1]]?S=E[0]+E[1]:o[E[0]]?S=E[0]:i&&t.warn("Can't find icon:",m,S);let A=o[S],T=r&&r.src||d;!A&&!T&&(LW(n,y,x,t,N=>{if(!(p&&p._disposed)){if(!N)return globalThis.__SMBLS_BUILD_DROP_ICONS__&&pN([_,x,E[0]+E[1],E[0]],t)||dN(y,t);g()}})||globalThis.__SMBLS_BUILD_DROP_ICONS__&&pN([_,x,E[0]+E[1],E[0]],t)||dN(y,t));let O=s&&S,B=A||T||o.noIcon;if(!(t.spriteId===O&&t.src===B&&t.node&&t.node.innerHTML)){if(t.spriteId=O,t.src=B,typeof t.html=="function"&&t.node){let $=t.context&&t.context.designSystem;$&&mt($);try{let N=t.html(t,t.state,t.context);N!=null&&typeof N!="function"&&(t.node.innerHTML=N)}finally{$&&ht()}}t.node&&t.attr&&t.attr.viewBox===_v&&t.node.setAttribute("viewBox",_v(t))}};p=K(g,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(p))},attr:{viewBox:_v,"aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},yN={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},bN={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Kv={};F(Kv,{A:()=>d$,Link:()=>zv,RouteLink:()=>p$,RouterLink:()=>Wv});var Ac={};F(Ac,{default:()=>k8,getActiveRoute:()=>Hv,lastLevel:()=>ty,lastPathname:()=>vc,loadLazy:()=>Nv,matchRoute:()=>jv,parseQuery:()=>Uv,parseRoutePattern:()=>Qm,resolveRouterElement:()=>kd,router:()=>Ln,runGuards:()=>a$,saveScrollPosition:()=>bd});M();var Sv="__smblsRouter",xv=new WeakMap,$W=0,kv=()=>Date.now().toString(36)+(++$W).toString(36)+Math.random().toString(36).slice(2,6),Ev=t=>{try{let e=t&&t.history;if(e&&typeof e.pushState=="function"&&typeof e.replaceState=="function"&&typeof e.go=="function")return e}catch{}return null},jr=t=>{try{return t.state}catch{return}},yd=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},xN=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},kN=t=>{let e=xN(t)?t[Sv]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},vv=(t,e)=>t==null?{[Sv]:e}:xN(t)?{...t,[Sv]:e}:null,Av=()=>({key:kv(),index:0,chain:kv()}),Ec=(t,e)=>{let n=kN(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:yd(t),state:e}},EN=(t,e)=>{let n=kN(t);return e.key?!!n&&n.key===e.key:!n&&t===e.state},md=(t,e,n)=>!!n&&yd(t)===n.url&&EN(e,n),Cv=(t,e,n)=>({...t,url:e,state:n}),Tv=(t,e)=>{let n=jr(e),r=Ec(t,n);if(r.key)return r;let o=Av(),s=vv(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return Cv(o,r.url,s)},FW=(t,e)=>{let n=xv.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},xv.set(t,n)),n||null},vN="smbls.router.scroll",_N=100,BW=1e3,wN=["wheel","touchstart","keydown","pointerdown"],AN=t=>{try{return t.sessionStorage||null}catch{return null}},CN=t=>{try{let e=JSON.parse(t.getItem(vN)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},TN=(t,e)=>{if(!t.positions){t.positions=new Map;let n=AN(e);if(n)for(let[r,o]of CN(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},Ov=(t,e,n,r)=>{let o=TN(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>_N&&o.delete(o.keys().next().value);let s=AN(e);if(s)try{let i=new Map(CN(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(vN,JSON.stringify(Array.from(i).slice(-_N)))}catch{}},SN=(t,e,n)=>{(!e||e.visibilityState!=="hidden")&&typeof t.requestAnimationFrame=="function"?t.requestAnimationFrame(n):typeof t.setTimeout=="function"?t.setTimeout(n,16):setTimeout(n,16)},jW=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:BW,c=()=>Math.max(0,(Number(o.scrollHeight)||0)-(Number(o.clientHeight)||0)),l=(h,m)=>{typeof o.scrollTo=="function"?o.scrollTo({top:h,left:m,behavior:"instant"}):(o.scrollTop=h,o.scrollLeft=m)},f=typeof t.addEventListener=="function",u=()=>r.end("visitor");if(r.end=h=>{if(!r.outcome&&(r.outcome=h,f))for(let m of wN)t.removeEventListener(m,u,!0)},c()>=s.top-1)return l(s.top,s.left),r.end("placed");Number(o.scrollTop)>0&&l(0,0);let d=Number(o.scrollTop)||0,p=Date.now();if(f)for(let h of wN)t.addEventListener(h,u,{capture:!0,passive:!0});let g=()=>{if(r.outcome)return;if(n.seq!==r.seq)return r.end("overtaken");if(Math.abs((Number(o.scrollTop)||0)-d)>1)return r.end("visitor");let h=c()>=s.top-1;if(!h&&Date.now()-p<a)return SN(t,e,g);l(Math.min(s.top,c()),s.left),r.end(h?"placed":"clamped")};SN(t,e,g)},UW=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=Ec(n,jr(r)),a=o.expect;o.expect=null;let c;if(a&&i.key===a.key&&i.url===a.url)c={echo:!0};else{let l=o.current,f=!!(i.key&&l&&l.key===i.key),u=f?null:l;u&&u.key&&t.scrollNode&&Ov(o,n,u.key,t.scrollNode),c={to:i,from:u,stay:f,seq:o.seq,settled:!1,committed:!1},o.pending=c}return o.pops.set(e,c),c},VW=t=>{let{win:e,history:n,track:r}=t,o=jr(n);if(r.pending&&md(e,o,r.pending.to)||r.expect&&md(e,o,r.expect.away))return;let s=r.current;if(s&&(s.key?EN(o,s):md(e,o,s))){s.url=yd(e),s.state=o;return}r.current=t.restore?Tv(e,n):Ec(e,o),r.pending=null,r.seq++},ON=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=Ev(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&FW(o,s);if(!i)return null;let a={win:t,history:o,track:i,restore:r,scrollNode:r&&n?n:null,pop:null};a.scrollNode&&(i.scrollNode=a.scrollNode);let c=e.event;return c&&c.type==="popstate"?a.pop=UW(a,c):VW(a),a},Ym=(t,e)=>{e.settled=!0,t.pending===e&&(t.pending=null)},Rv=t=>{let e=t&&t.pop;if(!e||e.echo)return!0;if(e.settled)return e.committed;let{win:n,history:r,track:o}=t;return Ym(o,e),o.seq!==e.seq||!md(n,jr(r),e.to)?!1:(o.current=t.restore&&!e.to.key?Tv(n,r):e.to,o.seq++,e.committed=!0,!0)},RN=t=>{let e=t&&t.pop;e&&!e.echo&&!e.settled&&Ym(t.track,e)},HW=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},Pv=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;Ym(s,n);let i=n.from;if(!i||s.seq!==n.seq||!md(r,jr(o),n.to))return;let a=n.to;if(!e&&i.key&&a.key&&i.chain===a.chain&&i.index!==a.index){let f=s.expect={key:i.key,url:i.url,away:a};HW(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=Av(),l=vv(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?Cv(c,i.url,l):Ec(r,jr(o)),s.seq++},PN=(t,e)=>{let n=yd(e);t&&n!==null&&(t.__routerAddress=n)},Lv=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return Pv(t,!0);r&&!r.settled&&Ym(t.track,r);let o=Ev(n),s=e&&e.__routerAddress;if(!(!o||!s||s===yd(n)))try{o.replaceState(jr(o),null,s)}catch{}},LN=(t,e,n,r,o=t&&t.win)=>{if(!t){try{r?o.history.replaceState(e,null,n):o.history.pushState(e,null,n)}catch{}return}let{history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&Ov(i,o,a.key,t.scrollNode);let c=r?Ec(o,jr(s)):Tv(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:kv(),index:c.index+1,chain:c.chain}:Av(),f=vv(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?Cv(l,n,f):Ec(o,jr(s)),i.pending=null,i.expect=null,i.seq++},DN=(t,e,n,r)=>{if(!t||!t.restore||!e)return!1;let o=t.pop;if(o?o.stay||!o.committed:!n.initialRender)return!1;let{win:s,track:i}=t,a=i.current,c=a&&a.key&&TN(i,s).get(a.key);if(!c)return!1;let l=i.restore;return!!l&&l.key===a.key&&(o?l.pop===o:!l.pop&&l.seq===i.seq)&&l.outcome==="visitor"||jW(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},bd=t=>{let e=Ev(t),n=e&&xv.get(e);!n||!n.scrollNode||!n.current||!n.current.key||Ov(n,t,n.current.key,n.scrollNode)};M();var $N=["components","functions","methods","snippets"],FN=new Set(["pages",...$N]),Dv=new Set(["default","__esModule"]),Fo=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),zt=t=>!!t&&typeof t=="object"&&!Array.isArray(t),Xm=new WeakMap,IN=new WeakMap,Iv=new WeakMap,MN=new Set,ai=(t,e=console.warn)=>{MN.has(t)||(MN.add(t),e(t))},BN=t=>zt(t&&t.lazy),jN=(t,e)=>{let n=t&&t.lazy;return zt(n)&&Fo(n,e)?n[e]:void 0},wd=(t,e)=>{let n=jN(t,e);return zt(n)&&Fo(n,"load")?n.load:n},zW=(t,e)=>{let n=jN(t,e);return zt(n)&&typeof n.when=="function"?n.when:null},WW=t=>{let e=new Error(`[smbls/router] lazy group "${t}" waits: its \`when\` said false \u2014 nothing was requested`);return e.code="LAZY_WAITING",e},Mv=(t,e)=>{let n=Xm.get(t);n||(Xm.set(t,n=new Map),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{for(let o of n.values())o.disposed=!0,o.waiting.clear();Xm.delete(t)}));let r=n.get(e);return r||(r={status:"idle",attempts:0,promise:null,failure:null,disposed:!1,pages:null,waiting:new Set,maps:new Set},n.set(e,r)),r},UN=(t,e)=>!BN(e)||!zt(t)||!Fo(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,Zm=t=>!!t&&typeof t=="object"&&Iv.has(t),VN=t=>t&&(t.status==="error"||t.status==="reload"||t.status==="waiting")?t.status:"loading",KW=(t,e)=>typeof wd(t,e)!="function"?"error":VN(Xm.get(t)?.get(e)),qW=(t,e)=>{let n=IN.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||zt(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...zt(f)?f:null,lazyStatus:KW(c.context,e)}}:(s.state=o,tt()&&ai(`[smbls/router] the placeholder of lazy group "${e}" binds its state to a path (${JSON.stringify(o)}), so it gets no \`lazyStatus\` \u2014 give it its own state object to show a load failure.`));let a={definition:s,group:e,hasStatus:i};return IN.set(t,a),Iv.set(s,a),a},GW=t=>t.__ref&&t.__ref.contentElementKey||"content",_d=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&Zm(n.content)?Iv.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[GW(t)]}},Jm=(t,e,n)=>{let r=_d(t,e);if(!r||!r.record.hasStatus)return;let o=r.page&&r.page.state;if(!(!o||typeof o.update!="function"||o.lazyStatus===n))try{o.update({lazyStatus:n})}catch(s){console.error(`[smbls/router] lazy group "${e}": could not show the "${n}" status on its placeholder`,s)}},YW=t=>zt(t)?!Object.keys(t).some(n=>FN.has(n))&&zt(t.default)?t.default:t:{},XW=t=>{let e={};if(!zt(t))return e;for(let n of Object.keys(t)){if(Dv.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!Fo(e,o))&&(e[o]=t[n])}return e},HN=(t,e,n,r,o)=>{if(!zt(t))return 0;let s=0;for(let i of Object.keys(t))UN(t[i],r)===e&&(s++,Fo(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))Fo(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},NN=(t,e,n)=>{let r=t[e];if(!zt(r)){t[e]={...n};return}try{for(let o in n)r[o]=n[o];if(Object.keys(n).every(o=>r[o]===n[o]))return}catch{}t[e]={...r,...n}},JW=t=>{let e=t.__ref&&t.__ref.origin;if(!zt(e))return[];let n=[].concat(e.extends||[],e.extend||[]);if(n.length)return n.filter(s=>typeof s=="string").map(s=>(s.includes(">")?s.split(">")[0]:s).trim());let r=t.key;if(typeof r!="string"||!/^[A-Z]/.test(r))return[];let o=[r.indexOf("_"),r.indexOf(".")].filter(s=>s>0);return[o.length?r.slice(0,Math.min(...o)):r]},ZW=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=_d(i,e);a&&a.page&&o.add(a.page)}let s=i=>{let a=i&&i.__ref&&i.__ref.__children;if(Array.isArray(a))for(let c of a){let l=i[c];if(!(!l||!l.__ref||o.has(l)||!l.node)){for(let f of JW(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");ai(`[smbls/router] lazy group "${e}": ${u} was built before the group loaded, so it renders without "${f}". A built element never takes a later registration \u2014 build it after el.call('loadLazy', '${e}') resolves (an \`if:\` gate does that), or keep "${f}" out of the group.`)}s(l)}}};s(t)},QW=(t,e,n,r)=>{let o=t.context,s=YW(n),i=tt(),a=[],c=new Set;if(i)for(let p of Object.keys(s))FN.has(p)||Dv.has(p)||ai(`[smbls/router] lazy group "${e}" exports \`${p}\`, which a lazy group cannot add \u2014 it adds pages, components, functions, methods and snippets only. Declare the rest with the app.`);let l=!1;for(let p of $N){let g=s[p];if(!zt(g))continue;let h=zt(o[p])?o[p]:{},m={};for(let x of Object.keys(g))if(!Dv.has(x)){if(Fo(h,x)){h[x]!==g[x]&&a.push(`${p}.${x}`);continue}m[x]=g[x]}let y=Object.keys(m);if(y.length&&(NN(o,p,m),p==="components"&&y.forEach(x=>c.add(x)),p==="methods"&&(l=!0),(p==="functions"||p==="snippets")&&zt(o.utils))){let x={};for(let E of y)Fo(o.utils,E)||(x[E]=m[E]);Object.keys(x).length&&NN(o,"utils",x)}}l&&lc(o);let f=XW(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;zt(o.pages)&&d.add(o.pages),u&&zt(u.routes)&&d.add(u.routes);for(let p of r.maps)d.add(p);for(let p of r.waiting)zt(p.routes)&&d.add(p.routes);for(let p of d)HN(p,e,f,o,a);i&&a.length&&ai(`[smbls/router] lazy group "${e}" redefines ${a.join(", ")}, which the app already has \u2014 the app's own value stays. Rename them: frank refuses the same collision at \`smbls push\`.`),i&&c.size&&u&&ZW(u,e,c,r)},zN=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;if(!r||r.group!==e||(n.__lazyRoute=null,typeof t.set!="function")||!_d(t,e))return;let o=()=>r.rerender({pushState:!1,replace:!1,scrollToTop:!1,guards:[],lazy:{group:e,status:"loaded"}});Promise.resolve().then(o).catch(s=>console.error(`[smbls/router] lazy group "${e}" loaded, but its route failed to render`,s))},Sd=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",t8=(t,e,n)=>!!t&&(Sd(e)&&e===t.returned||!!n&&typeof n=="object"&&n===t.error),WN=(t,e)=>{let n=t.context,r=Mv(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=wd(n,e),s=zW(n,e),i=r.failure;r.status="loading";let a,c=!1,l=!1,f=()=>s?s(t):!0,u=p=>{if(p===!1)throw l=!0,WW(e);return a=o(r.attempts++)},d=Promise.resolve().then(f).then(u).then(p=>{c=!0,r.disposed||QW(t,e,p,r)}).then(()=>{r.status="loaded",r.failure=null;let p=[...r.waiting];r.waiting.clear();for(let g of p)zN(g,e)},p=>{if(l){if(r.status="waiting",r.promise=null,r.disposed)throw p;for(let h of[...r.waiting])_d(h,e)?Jm(h,e,"waiting"):r.waiting.delete(h);throw p}let g=!c&&t8(i,a,p);if(r.failure=c?null:{returned:a,error:p},r.status=g?"reload":"error",r.promise=null,r.disposed)throw p;g?ai(`[smbls/router] lazy group "${e}" cannot load in this page: its loader handed back the import that already failed (the same promise or the same error) and requested nothing \u2014 a bundler that keeps a failed dynamic import (parcel) does this. Its routes show their placeholder with lazyStatus 'reload'; reloading the page loads the group.`,h=>console.error(h,p)):console.error(`[smbls/router] lazy group "${e}" failed to load. Its routes show their placeholder with lazyStatus 'error'; the next navigation to one of them, or loadLazy('${e}'), calls the group's loader again.`,p);for(let h of[...r.waiting])_d(h,e)?Jm(h,e,r.status):r.waiting.delete(h);throw p});d.catch(()=>{}),r.promise=d;for(let p of r.waiting)Jm(p,e,"loading");return d},KN=(t,e,n)=>{let r=e&&e.context,o=UN(t,r);if(!o)return null;let s=Mv(r,o);if(zt(n)&&s.maps.add(n),s.status==="loaded"&&HN(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof wd(r,o)=="function";return i?WN(e,o):ai(`[smbls/router] a route names lazy group "${o}", which context.lazy does not declare as a loader (\`lazy: { ${o}: () => import('./\u2026') }\`) \u2014 it shows its placeholder in the error state.`,console.error),{content:qW(t,o).definition,group:o,status:i?"loading":"error"}},qN=(t,e,n)=>{if(!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof wd(r,e.group)!="function")return;let s=Mv(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},Jm(t,e.group,VN(s)),s.status==="loaded"){let i=()=>zN(t,e.group);Promise.resolve().then(i);return}s.waiting.add(t)};function Nv(t){let e=this,n=e&&e.context;if(!n)return Promise.reject(new TypeError("[smbls/router] loadLazy runs on an element: el.call('loadLazy', name)"));let r=wd(n,t);return typeof r!="function"?(r===void 0&&BN(n)&&tt()&&ai(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):WN(e,t)}var e8=(t,e,n)=>({...t.context&&t.context.domqlOptions,...e.mountOptions,contentElementKey:n}),GN=(t,e,n)=>{let r=n.mountOptions;if(!r)return;let o=e.context&&e.context.domqlOptions;for(let s in r)t[s]=o&&s in o?o[s]:void 0},e$=t=>{let e=rr;return typeof e=="function"?e(t.mountYield)>0:t.mountYield===!0},n8=t=>{let e=t&&t.context&&t.context.__hydration;return!!e&&e.adopted>0},r8=t=>{let e=Um;return typeof e!="function"||!e(t)?null:Br(t)},Bv=Object.freeze({holdTail:!0}),o8=t=>typeof t.holdPage=="function"&&typeof He=="function",n$=(t,e)=>{let n=()=>He(t);Sd(e)?e.then(n,n):n()},s8=(t,e)=>{let n=null;try{n=t.holdPage(e)}catch{}n$(e,n)},r$=Object.freeze({holdTail:!0,deferAttach:!0}),i8=(t,e,n,r)=>{let o=t.firstView;if(!o||typeof He!="function"||typeof Do!="function")return null;if(!o.committed)return Bv;if(!e$(r))return null;let s=e.node;return!e[n]&&s&&s.isConnected?r$:(r.mountYield=void 0,null)},a8=async()=>{await Ae();let t=No;if(typeof t=="function")for(;!t();)await Ae()},c8=(t,e,n,r)=>{if(e===Bv){t.firstView.page=n,n$(n,t.firstView.commit);return}e===r$&&a8().then(()=>{n.__ref&&r()&&Do(n),He(n)})},o$=/^:(.+)/,s$=/^\*$/,YN=new Map,Qm=t=>{let e=YN.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(o$);a?r.push({index:i,name:a[1]}):s$.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return YN.set(t,s),s},jv=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=Qm(l),u=l8(o,f);u>a&&(a=u,i=l,c=i$(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},l8=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(o$.test(n[i]))o+=1;else if(s$.test(n[i]))o+=.5;else return-1;return o},i$=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},Uv=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},Fv=t=>!!t&&typeof t=="object"&&typeof t.route=="string",XN=t=>t===!1||typeof t=="string"||Fv(t)?t:void 0,f8=10,Vv=(t,e,n=0)=>{for(let r=n;r<t.length;r++){let o=t[r](e);if(Sd(o))return Promise.resolve(o).then(i=>{let a=XN(i);return a===void 0?Vv(t,e,r+1):a});let s=XN(o);if(s!==void 0)return s}return!0},a$=async(t,e)=>!t||!t.length?!0:Vv(t,e),JN=(t,e,n,r)=>{if(typeof t!="string"||!n||!Object.prototype.hasOwnProperty.call(n,t))return null;let o=n[t];if(!o)return null;let s=e.replace(/^\//,"").split("/").filter(Boolean).slice(r||0);return{route:t,content:o,params:t==="/*"?{}:i$(s,Qm(t))}},kd=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},u8=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=kd(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},Hv=(t=0,e)=>{e||(e=typeof R<"u"?R.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},vc,ty=0,ZN=0,$v=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,d8=t=>t&&(t.scrollingElement||t.documentElement)||null,c$={level:ty,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300,scrollRestoreTimeout:1e3},l$=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},f$=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},p8=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(f$(e),!n||!n.node||typeof t.onRouteExit>"u"||!l$(s,i))return null;let c=typeof o=="number"&&o>=0?o:c$.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=dr("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(p=>{let g=setTimeout(()=>{d.abort(),p()},c),h=()=>{clearTimeout(g),p()};u.then(h,h)}),e.__routeExit=d,d.wait},xd=new WeakMap,h8=t=>t===!0?{}:t&&typeof t=="object"&&!Array.isArray(t)?t:null,g8=(t,e,n,r)=>{let o=h8(t.transition);return!o||!e||Zm(e.content)||!n||typeof n.startViewTransition!="function"||xd.get(n)>0||!l$(n,r)?null:o},m8=t=>{let e=t.__routeTransition;if(!(!e||e.updating))try{e.transition.skipTransition()}catch{}},y8=t=>{let e=typeof t.types=="string"?[t.types]:t.types;return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n):[]},b8=t=>{try{let e=t&&t.ViewTransition;return!!e&&"types"in e.prototype}catch{return!1}},_8=100,w8=1e3,QN=(t,e)=>t===!1?1/0:typeof t=="number"&&t>=0?t:e,t$=t=>{let e=t&&t.performance;return e&&typeof e.now=="function"?e.now():Date.now()},S8=t=>{t&&typeof t.then=="function"&&t.then(null,()=>{})},x8=(t,e,n,r,o,s,i)=>{let a=t.node,c=a&&a.style,l=typeof n.name=="string"&&n.name?n.name:null,f=e.__routeTransition,u={transition:null,updating:!1,name:l,previousName:f&&f.name&&c?f.previousName:c&&c.viewTransitionName||""},d=()=>{if(e.__routerNavSeq===s){u.updating=!0,u.swapStarted=t$(o),xd.set(r,(xd.get(r)||0)+1);try{return i()}finally{xd.set(r,xd.get(r)-1),u.updating=!1}}},p=()=>{l&&c&&c.viewTransitionName===l&&(c.viewTransitionName=u.previousName)};l&&c&&(c.viewTransitionName=l);let g=y8(n),h=null;try{h=g.length&&b8(o)?r.startViewTransition({update:d,types:g}):r.startViewTransition(d)}catch{}if(!h)return p(),null;u.transition=h,e.__routeTransition=u,S8(h.ready);let m=!1,y=null,x=()=>{m=!0,y!==null&&(o.clearTimeout(y),y=null),e.__routeTransition===u&&(e.__routeTransition=null,p())},E=()=>{if(!(m||e.__routeTransition!==u))try{h.skipTransition()}catch{}};h.finished&&typeof h.finished.then=="function"?h.finished.then(x,x):x();let C=QN(n.swapBudget,_8),_=QN(n.timeout,w8);_!==1/0&&h.ready&&typeof h.ready.then=="function"&&o&&typeof o.setTimeout=="function"&&h.ready.then(()=>{m||(y=o.setTimeout(()=>{y=null,E()},_))},()=>{});let b=h.updateCallbackDone;return!b||typeof b.then!="function"?Promise.resolve():(C!==1/0&&b.then(()=>{u.swapStarted!==void 0&&t$(o)-u.swapStarted>C&&E()},()=>{}),b)},Ln=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||R,i=o?.context?.document||kt,a={...c$,...o.context.routerOptions,...r};ty=a.lastLevel,o=u8(o,a);let c=!(r&&r.render===!1),l=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==l.contentElementKey||!l.contentElementKey)&&(l.contentElementKey=a.contentElementKey||"content");let f=l.contentElementKey||a.contentElementKey||"content",u=s.location.origin!=="null"?s.location.origin:"http://localhost";t=$v(t);let d=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,p=new d(u+t),{pathname:g,search:h,hash:m}=p,y=Uv(h),x=o.node,E=m&&m!==s.location.hash.slice(1),C=g!==vc,_=vc,b=++ZN;vc=g;let w=()=>{ZN===b&&(vc=_)},S=l.__routerRendered,A,T,O,B;if(a.useParamsMatching){let q=jv(g,o.routes,a.level);A=q.key,T=q.routePath,O=q.content,B=q.params}else{A=Hv(a.level,g),T=A;let q=o.routes;O=q?q[A||"/"]||q["/*"]:null,B={}}if(r&&r.route!=null){let q=JN(r.route,g,o.routes,a.level);!q&&!a.silent&&console.warn("[smbls/router] route",r.route,"chosen for",g,"is not one of the routes:",Object.keys(o.routes||{})),A=q?q.route:r.route,O=q?q.content:null,B=q?q.params:{}}a.scrollNode===void 0&&(a.scrollNode=d8(i));let $=a.scrollToNode?x:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let N=ON(s,a,$);if(N&&N.pop&&N.pop.echo)return;if(!O){w(),a.onNotFound?a.onNotFound({pathname:g,route:A,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",g,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&Lv(N,l,s));return}let G=r&&r.lazy?l.__routerStartSeq:l.__routerStartSeq=(l.__routerStartSeq||0)+1;if(a.guards&&a.guards.length){let q={pathname:g,route:A,params:B,query:y,hash:m,element:o,state:n},W=Vv(a.guards,q);if(Sd(W)&&(W=await W,l.__routerStartSeq!==G)){w(),RN(N);return}if(W===!1){w(),Pv(N);return}let Rt=jt=>{let Ct=new d(u+$v(jt));return Ct.pathname===g&&Ct.search===h&&Ct.hash===m},yt=typeof W=="string"?W:Fv(W)&&typeof W.path=="string"&&!Rt(W.path)?W.path:null;if(Fv(W)&&yt===null){let jt=JN(W.route,g,o.routes,a.level);if(!jt){a.silent||console.warn("[smbls/router] a guard chose route",W.route,"for",g,"\u2014 not one of the routes:",Object.keys(o.routes||{})),w(),a.onNotFound?a.onNotFound({pathname:g,route:W.route,element:o}):a.event&&a.event.type==="popstate"&&Lv(N,l,s);return}A=jt.route,O=jt.content,B=jt.params,r={...r,route:jt.route}}else if(yt!==null){let jt=!!(N&&N.pop);if(jt&&!Rv(N))return;let Ct=[...r&&r.__redirectChain||[],g],Pt=new d(u+$v(yt)).pathname,Ke=Ct.includes(Pt)||Ct.length>=f8;Ke&&!a.silent&&console.warn("[smbls/router] redirect loop:",[...Ct,Pt].join(" \u2192 "),"\u2014 rendering",Pt,"without its guards");let It={...r,__redirectChain:Ct};return Ke&&(It.guards=[]),typeof W=="string"?delete It.route:It.route=W.route,jt&&(It.event=void 0),delete It.render,(jt||a.initialRender)&&(It.pushState=!0,It.replace=!0),Ln(yt,e,n,It)}}let Y=c?KN(O,o,o.routes):null;if(Y&&Y.rematch)return Ln(t,o,n,r);Y&&(O=Y.content,a.lazy={group:Y.group,status:Y.status});let nt=l.__routerNavSeq=(l.__routerNavSeq||0)+1,ot=!S||S.content!==O||S.route!==A,st=!!S&&S.content===O,J=!(!c||a.keepSamePage===!0&&st&&a.force!==!0)&&(C||ot||a.force===!0);if(J&&S&&!Zm(S.content)){let q=p8(o,l,o[f],{from:S.route,to:A,pathname:g,params:B,query:y,hash:m},a.exitTimeout,i,s);if(q&&(await q,l.__routerNavSeq!==nt||(l.__routeExit&&l.__routeExit.wait===q&&(l.__routeExit=null),typeof o?.set!="function")))return}else f$(l);let Q=J?g8(a,S,i,s):null;if(J&&m8(l),a.pushState){let q=g+(h||"")+(m||"");LN(N,n,q,a.replace,s)}else N&&Rv(N);PN(l,s);let it=e8(o,a,f),rt=()=>{let q=J?i8(a,o,f,it):null,W=(!!S||e$(it))&&!!$&&$.scrollTop===0&&!$.scrollLeft,Rt=!S&&!!a.initialRender&&!!$&&n8(o)&&(Number($.scrollTop)>0||Number($.scrollLeft)>0),jt=C||!E?{route:A,routePath:T,hash:m,params:B,query:y,debugging:!1}:{params:B,query:y};a.updateState&&o.state.update(jt,{preventContentUpdate:!0});let Ct=null;if(J){f&&a.removeOldElement&&o[f].remove();let Ke=o.__ref?.origin?.content,It={};if(Ke)for(let X in Ke){let at=Ke[X];X==="__ref"||X==="props"||X==="node"||X==="parent"||X==="key"||(typeof at=="string"||typeof at=="number"||typeof at=="boolean"||typeof at=="object"&&at!==null&&!at.node&&!at.__ref)&&(It[X]=at)}let Pe={...It,...typeof O=="object"?O:{extends:O}};a.useFragment&&(Pe.tag="fragment");let z={content:O,route:A},Tt=l.__routerRendered;try{if(typeof o?.set!="function")return;l.__routerRendered=z;let X=!q&&o8(a),at=o.set(Pe,it,q||(X?Bv:void 0));at&&q?c8(a,q,at,()=>l.__routerNavSeq===nt):at&&X&&s8(a,at),Ct=r8(o[f])}catch(X){l.__routerRendered===z&&(l.__routerRendered=Tt),console.error("[smbls/router] failed to render route content",g,X)}}else st&&S.route!==A&&l.__routerRendered===S&&(l.__routerRendered={content:O,route:A});let Pt=()=>{let Ke=!C&&E,It=!c||DN(N,$,a,i);if(!It&&!Rt&&a.scrollToTop&&!Ke&&!W&&$?.scrollTo&&$.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!It&&!Rt&&a.scrollToNode&&O[f]?.node?.scrollTo&&O[f].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!It&&m){let Pe=i.getElementById(m.slice(1));if(Pe&&$?.scrollTo){let z=s.getComputedStyle?s.getComputedStyle(Pe):null,Tt=z&&parseFloat(z.scrollMarginTop)||0,X=Pe.getBoundingClientRect().top+$.scrollTop-Tt-(a.scrollToOffset||0);$.scrollTo({...a.scrollToOptions||{},top:X,left:0})}}Y&&qN(o,Y,Pe=>Ln(t,o,n,{...r,...Pe})),dr("routeChanged",o,a)};if(Ct)return Ct.then(()=>{GN(it,o,a),l.__routerNavSeq===nt&&Pt()});GN(it,o,a),Pt()},gt=Q?x8(o,l,Q,i,s,nt,rt):null;if(gt){await gt;return}return rt()},k8=Ln;var E8=(t,e)=>{if(!t)return!1;if(t.defaultPrevented||typeof t.button=="number"&&t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!0;let n=e.node;if(!n||typeof n.getAttribute!="function")return!1;let r=n.getAttribute("target");return r&&r.toLowerCase()!=="_self"?!0:n.hasAttribute("download")},v8=(t,e)=>{let n=t.slice(1),r=e.node&&e.node.ownerDocument,o=n&&r?r.getElementById(n):null;o&&(typeof o.scrollIntoView=="function"&&o.scrollIntoView(),typeof o.focus=="function"&&(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus()))},u$=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a||E8(t,e))return;if(a.startsWith("#")){t.preventDefault(),v8(a,e);return}let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,p=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!p){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Ln)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},zv={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>Co(t,t.href)||Co(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:u$},d$={extends:"Link"},Wv={onClick:u$},p$={extends:[zv,Wv]};var qv={};F(qv,{Select:()=>h$});var h$={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var Gv={};F(Gv,{Button:()=>g$,ButtonSet:()=>_$,CircleButton:()=>y$,IconButton:()=>w$,KangorooButton:()=>b$,SquareButton:()=>m$});var g$={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",border:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},m$={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},y$={extends:"SquareButton",round:"C"},b$={extends:"Button",childExtends:"IconText"},_$={tag:"nav",display:"flex",childExtends:"SquareButton"},w$={extends:["SquareButton","ClickableItem"],round:"Z"};var Xv={};F(Xv,{Dialog:()=>v$,DialogFooter:()=>C$,DialogHeader:()=>A$});Mt();var A8={ok:1,cancel:1},ci=new WeakMap,C8=0,hn=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},Yv=t=>{let e=ci.get(t);return e||(e={id:"smbls-dialog-"+ ++C8,want:void 0,waiting:!1},ci.set(t,e)),e},Ed=(t,e,n,r)=>t[e]!==void 0||n!==void 0&&t[n]!==void 0||!!t.attr&&typeof t.attr=="object"&&t.attr[e]!==void 0||r!==void 0&&!!t.aria&&typeof t.aria=="object"&&t.aria[r]!==void 0,Cc=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},S$=["methods","functions","utils"],T8=t=>{for(let e=0;e<S$.length;e++){let n=t[S$[e]];if(n&&typeof n.polyglot=="function")return!0}return!1},ey=(t,e,n)=>{let r=t.context;if(!r||!T8(r))return n;let o=t.call("polyglot",e);return typeof o=="string"&&o&&o!==e?o:n},x$=t=>{let e=ci.get(t),n=hn(t);if(!e||!n)return!0;if(!n.isConnected)return!1;if(e.want){if(!n.open&&typeof n.showModal=="function")try{n.showModal()}catch{}}else n.open&&typeof n.close=="function"&&n.close();return!0},k$=t=>{queueMicrotask(()=>{if(x$(t))return;let e=ci.get(t);!e||e.waiting||typeof t.whenConnected!="function"||(e.waiting=!0,t.whenConnected(()=>{e.waiting=!1,x$(t)}))})},O8=t=>{let e=t.__ref;if(!e||!hn(t)||!Object.prototype.hasOwnProperty.call(t,"modal")||Ed(t,"data-dialog"))return;let n=K(()=>{let r=t.modal,o=hn(t);if(!o)return;if(r==null){Cc(o,"data-dialog",null);return}Cc(o,"data-dialog","modal");let s=Yv(t),i=!!r;s.want!==i&&(s.want=i,k$(t))},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(n)},R8=t=>t.dialogTitle===!0,P8=t=>{for(let e=t;e;e=e.parent)if(e.tag==="dialog")return e;return null},E$=t=>{let e=P8(t);return!e||!e.locked},L8=t=>t.key==="Escape"||t.key==="Esc",D8=t=>{let e=t.__ref,n=hn(t);if(!e||!n||!Object.prototype.hasOwnProperty.call(t,"locked"))return;let r=Yv(t),o=!Ed(t,"closedby","closedBy"),s=K(()=>{let l=!!t.locked,f=hn(t);f&&o&&Cc(f,"closedby",l?"none":null)},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(s);let i=l=>{t.locked&&l.preventDefault()},a=t.context&&t.context.window||n.ownerDocument.defaultView,c=l=>{let f=hn(t);f&&f.open&&f.isConnected&&L8(l)&&t.locked&&l.preventDefault()};n.addEventListener("cancel",i),a&&a.addEventListener("keydown",c),r.unlock=()=>{n.removeEventListener("cancel",i),a&&a.removeEventListener("keydown",c)}},I8=t=>{let e=hn(t);if(!e||e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")||Ed(t,"aria-labelledby","ariaLabelledby","labelledby"))return;let n=typeof t.lookdown=="function"?t.lookdown(R8):null,r=hn(n);if(!r)return;let o=r.getAttribute("id");if(!o){if(Ed(n,"id"))return;o=Yv(t).id+"-title",Cc(r,"id",o)}Cc(e,"aria-labelledby",o)},M8=(t,e)=>{let n=hn(e),r=t.target;if(!n||t.defaultPrevented||!r||typeof r.closest!="function")return;let o=r.closest("[data-dialog-action]");if(!o||!n.contains(o))return;let s=o.getAttribute("data-dialog-action");if(A8[s]!==1)return;let i=n.ownerDocument.defaultView,a=new i.Event(s,{cancelable:!0});n.dispatchEvent(a),!a.defaultPrevented&&n.open&&typeof n.close=="function"&&n.close(s)},N8=t=>{let e=ci.get(t);e&&e.unlock&&(e.unlock(),e.unlock=null);let n=hn(t);e&&e.want!==void 0&&n&&n.open&&typeof n.close=="function"&&n.close()},$8=t=>{let e=ci.get(t),n=hn(t);e&&e.want!==void 0&&n&&!n.isConnected&&n.hasAttribute("open")&&n.removeAttribute("open")},F8=t=>{let e=ci.get(t);e&&e.want&&k$(t)},B8=t=>{let e=hn(t);if(!e||!Object.prototype.hasOwnProperty.call(t,"modal")||Ed(t,"data-dialog"))return;let n=t.modal;if(typeof n=="function")try{n=n(t,t.state)}catch{return}n!=null&&Cc(e,"data-dialog","modal")},v$={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2",'[data-dialog="modal"]:not([open])':{display:"none"},onAttachNode:{always:!0,handler:t=>B8(t)},onComplete:{always:!0,handler:t=>{O8(t),D8(t),I8(t)}},onRender:{always:!0,handler:t=>F8(t)},onClick:(t,e)=>M8(t,e),onBeforeRemove:{always:!0,handler:t=>N8(t)},onRemove:{always:!0,handler:t=>$8(t)}},A$={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{dialogTitle:!0,text:t=>ey(t,"dialog.title","Title")},SquareButton:{if:E$,icon:"x",theme:"transparent",aria:{label:t=>ey(t,"dialog.close","Close")},data:{dialogAction:"cancel"}}},Paragraph:{color:"caption"}},C$={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{if:E$,text:t=>ey(t,"dialog.cancel","Cancel"),data:{dialogAction:"cancel"}},Ok:{text:t=>ey(t,"dialog.ok","OK"),data:{dialogAction:"ok"}}};var nA={};F(nA,{Tooltip:()=>I$,TooltipHidden:()=>M$,TooltipLayer:()=>eA,TooltipParent:()=>N$});M();var j8='[data-tooltip]:not([data-tooltip=""])',T$={top:1,bottom:1,left:1,right:1},Jv={top:"bottom",bottom:"top",left:"right",right:"left"},li=6,O$=new WeakMap,U8=0,Ce=t=>{let e=O$.get(t);return e||(e={id:"smbls-tooltip-"+ ++U8,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},O$.set(t,e)),e},Zv=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},V8=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},H8=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},R$=(t,e)=>{let n=V8(t);if(!e||!n)return null;let r;try{r=e.closest(j8)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(H8(o))return null;return r},z8=(t,e)=>!!(e&&t.node&&t.node.contains(e)),W8=t=>{try{return t.matches(":focus-visible")}catch{return!0}},P$=(t,e)=>typeof t=="number"&&t>=0?t:e,sy=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},Qv=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),K8=(t,e)=>{let n=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);n.indexOf(e)===-1&&n.push(e),t.setAttribute("aria-describedby",n.join(" "))},tA=(t,e)=>{if(!t||typeof t.getAttribute!="function")return;let n=t.getAttribute("aria-describedby");if(n==null)return;let r=n.split(/\s+/).filter(o=>o&&o!==e);r.length?t.setAttribute("aria-describedby",r.join(" ")):t.removeAttribute("aria-describedby")},q8=(t,e,n,r,o)=>{let s={top:t.top,bottom:o-t.bottom,left:t.left,right:r-t.right},i=f=>(f==="top"||f==="bottom"?e.height:e.width)+li;s[n]<i(n)&&s[Jv[n]]>=i(Jv[n])&&(n=Jv[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+li:t.top-e.height-li):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+li:t.left-e.width-li);let l=(f,u)=>Math.max(li,Math.min(u-li,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},G8=t=>{let e=t.ownerDocument,n=e&&e.defaultView,r=e&&e.documentElement;return{width:r&&r.clientWidth||n&&n.innerWidth||0,height:r&&r.clientHeight||n&&n.innerHeight||0}},Y8=t=>(t.title||"")+(t.description||""),ry=(t,e=0)=>{let r=Ce(t).shown;if(!r||!Qv(t))return;if(!r.isConnected){oy(t);return}let o=t.node,s=t.state;if(o.textContent!==Y8(s)){e<3&&setTimeout(()=>ry(t,e+1),0);return}let i=r.getBoundingClientRect(),a=o.getBoundingClientRect(),c=a.left-(s.x||0),l=a.top-(s.y||0),f=G8(o),u=r.getAttribute("data-tooltip-placement"),d=T$[u]?u:T$[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=q8(i,{width:a.width,height:a.height},d,f.width,f.height);s.update({x:Math.round(p.left-c),y:Math.round(p.top-l),side:p.side,placed:!0})},X8=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},L$=(t,e)=>{let n=Ce(t);sy(n),!(!Qv(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&tA(n.shown,n.id),n.shown=e,K8(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),X8(()=>ry(t)))};function oy(t){let e=Ce(t);sy(e),e.shown&&tA(e.shown,e.id),e.shown=null,Qv(t)&&t.state.open&&t.state.update({open:!1})}var ny=(t,e)=>{let n=Ce(t);n.dismissed&&n.dismissed!==n.hover&&n.dismissed!==n.focus&&(n.dismissed=null);let r=n.hover&&n.hover!==n.dismissed?n.hover:n.focus&&n.focus!==n.dismissed?n.focus:null;if(r===n.shown){sy(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){oy(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,oy(t)},P$(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){L$(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,L$(t,r)},P$(t.tooltipDelay,250))},D$=t=>{let e=Ce(t);e.shown&&(e.dismissed=e.shown,oy(t))},eA={role:"tooltip",id:t=>Ce(t).id,data:{tooltipLayer:!0},state:{open:!1,placed:!1,title:"",description:"",x:0,y:0,side:"bottom"},tooltipPlacement:"bottom",display:"flex",flow:"column",gap:"X",theme:"dialog",padding:"Z1 A",round:"Y2",width:"max-content",maxWidth:"F2",textAlign:"center",position:"fixed",zIndex:2500,opacity:(t,e)=>e.open&&e.placed?"1":"0",visibility:(t,e)=>e.open&&e.placed?"visible":"hidden",pointerEvents:(t,e)=>e.open?"auto":"none",transition:"opacity A defaultBezier, visibility A defaultBezier",style:(t,e)=>({top:(e.y||0)+"px",left:(e.x||0)+"px"}),Text:{if:(t,e)=>!!e.title,text:(t,e)=>e.title,fontWeight:500,color:"currentColor"},P:{if:(t,e)=>!!e.description,text:(t,e)=>e.description,fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:400},onDocumentPointerover:{capture:!0,passive:!0,handler:(t,e)=>{if(t.pointerType==="touch")return;let n=Ce(e),r=Zv(t.target),o=z8(e,r)?n.shown:R$(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,ny(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=Ce(e);n.hover&&(n.hover=null,ny(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=Ce(e),r=Zv(t.target);n.shown&&r&&n.shown.contains(r)&&D$(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=Ce(e),r=Zv(t.target),o=r&&W8(r)?R$(e,r):null;o!==n.focus&&(n.focus=o,ny(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=Ce(e);n.focus&&(n.focus=null,ny(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&D$(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{Ce(e).shown&&ry(e)}},onWindowResize:(t,e)=>{Ce(e).shown&&ry(e)},onBeforeRemove:t=>{let e=Ce(t);sy(e),e.shown&&tA(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var I$={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>Ut(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},M$={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},N$={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var rA={};F(rA,{Avatar:()=>$$});var J8=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},$$={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=J8(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var oA={};F(oA,{Range:()=>F$});var F$={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:va("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:va("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var hA={};F(hA,{Dropdown:()=>f2,DropdownDisclosure:()=>p2,DropdownList:()=>u2,DropdownParent:()=>d2,DropdownParentFocus:()=>h2,DropdownSiblingFocus:()=>g2});Mt();var uy="hover",V$="focus",vd="sibling",Ur="disclosure",B$={menu:1,listbox:1,tree:1,grid:1,dialog:1},Z8={DIV:1,SPAN:1,LABEL:1,P:1,STRONG:1,B:1,EM:1,SMALL:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1},Q8={BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},tK='button, a[href], [role^="menuitem"], [role="option"]',eK={ArrowDown:1,Down:1,ArrowUp:-1,Up:-1,Home:"first",End:"last"},ay=new WeakMap,cy=new WeakMap,ly=new WeakMap,iA=new WeakMap,H$=new WeakSet,nK=0,wt=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},Tc=(t,e)=>{let n=wt(t);return n?n.getAttribute(e):null},Dt=(t,e)=>{let n=wt(t);return!!n&&!!e&&(n===e||n.contains(e))},sA=t=>{let e=wt(t);return!!e&&e.hasAttribute("dropdown")},aA=t=>{let e=wt(t);return!!e&&e.tagName==="BUTTON"},iy=t=>aA(t)||Tc(t,"role")==="button",j$=t=>{let e=wt(t);return!!e&&Z8[e.tagName]===1&&!e.isContentEditable},z$=t=>{let e=wt(t);return!!e&&!e.disabled&&!e.hidden&&e.getAttribute("aria-disabled")!=="true"},Ad=t=>{let e=Tc(t,"role");return!!e&&e.indexOf("menuitem")===0&&z$(t)},rK=t=>{let e=wt(t);if(!e||!z$(t))return!1;if(Q8[e.tagName]===1)return e.getAttribute("type")!=="hidden";if(e.tagName==="A"&&e.hasAttribute("href"))return!0;let n=e.getAttribute("tabindex");return n!==null&&parseInt(n,10)>=0},fi=t=>t&&typeof t.getChildren=="function"?t.getChildren():[],Te=t=>t&&typeof t.dropdownMode=="string"?t.dropdownMode:null,cA=t=>{let e=t&&t.Input_trigger;return e&&e.__ref?e:null},W$={tabindex:"tabIndex","aria-expanded":"ariaExpanded","aria-haspopup":"ariaHaspopup","aria-controls":"ariaControls","aria-labelledby":"ariaLabelledby","aria-label":"ariaLabel","aria-hidden":"ariaHidden"},K$=(t,e)=>{if(t[e]!==void 0)return!0;let n=W$[e];if(n!==void 0&&t[n]!==void 0)return!0;let r=t.attr;if(r&&typeof r=="object"&&r[e]!==void 0)return!0;if(e.indexOf("aria-")===0){let o=t.aria;if(o&&typeof o=="object"&&o[e.slice(5)]!==void 0)return!0}return!1},oK=(t,e)=>{let n=W$[e],r=t.attr;return typeof t[e]=="function"||n!==void 0&&typeof t[n]=="function"||!!r&&typeof r=="object"&&typeof r[e]=="function"},sr=(t,e,n)=>!e.hasAttribute(n)&&!K$(t,n),Bo=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},sK=(t,e)=>{let n=wt(t);if(n)for(let r in e)Bo(n,r,e[r])},fy=t=>{let e=wt(t);return!e||typeof e.focus!="function"?!1:(e.focus(),e.ownerDocument.activeElement===e)},iK=t=>{let e=ay.get(t);return e||(e={id:"smbls-dropdown-"+ ++nK,open:null,trigger:null,panel:null,popup:null,popupRole:null,owns:!1,pressedOpen:!1,written:null,outside:null,outsideDoc:null},ay.set(t,e)),e},U$=(t,e)=>!!e&&!!wt(e)&&!!t&&t[e.key]===e,aK=(t,e)=>{let n=null,r=null;if(e===vd){let s=t.parent?fi(t.parent):[];for(let i=s.indexOf(t)+1;i>0&&i<s.length&&s[i];i++)if(sA(s[i])){n=s[i];break}return(iy(t)||j$(t))&&(r=t),{panel:n,trigger:r}}let o=fi(t);for(let s=0;s<o.length;s++)if(sA(o[s])){n=o[s];break}if(iy(t))return{panel:n,trigger:t};for(let s=0;s<o.length;s++){let i=o[s];if(!(!wt(i)||i.key==="Input_trigger"||sA(i))){(iy(i)||j$(i))&&(r=i);break}}return{panel:n,trigger:r}},cK=t=>{let e=Tc(t,"role");if(e&&B$[e]===1)return{el:t,role:e};let n=fi(t);for(let r=0;r<n.length;r++){let o=Tc(n[r],"role");if(o&&B$[o]===1)return{el:n[r],role:o}}return null},gn=t=>{let e=Te(t);if(!e||!wt(t))return null;let n=iK(t);if(n.trigger){let p=e===vd?t.parent:t;if((n.trigger===t||U$(t,n.trigger))&&U$(p,n.panel))return n}let{panel:r,trigger:o}=aK(t,e);if(!r||!o)return n.trigger=n.panel=n.popup=null,null;n.trigger=o,n.panel=r;let s=e===Ur?null:cK(r);n.popup=s?s.el:null,n.popupRole=s?s.role:null;let i=wt(o),a={},c=i.getAttribute("id");n.popupRole==="menu"&&!c&&sr(o,i,"id")&&(a.id=c=n.id+"-trigger"),iy(o)||(sr(o,i,"role")&&(a.role="button"),sr(o,i,"tabindex")&&(a.tabindex="0")),n.popupRole&&sr(o,i,"aria-haspopup")&&(a["aria-haspopup"]=n.popupRole);let l=wt(r),f=l.getAttribute("id");if(!f&&sr(r,l,"id")&&(f=n.id+"-panel",Bo(l,"id",f)),f&&sr(o,i,"aria-controls")&&(a["aria-controls"]=f),n.owns=sr(o,i,"aria-expanded"),n.written={open:null,expanded:null},n.owns&&(n.written.expanded=dy(t,n)?"true":"false",a["aria-expanded"]=n.written.expanded),sK(o,a),n.popupRole==="menu"&&c){let p=wt(n.popup);sr(n.popup,p,"aria-label")&&sr(n.popup,p,"aria-labelledby")&&Bo(p,"aria-labelledby",c)}o!==t&&e===V$&&Tc(t,"tabindex")==="0"&&!oK(t,"tabindex")&&Bo(wt(t),"tabindex","-1");let u=cA(t),d=wt(u);return d&&!d.hasAttribute("tabindex")&&(K$(u,"tabindex")||Bo(d,"tabindex","-1"),sr(u,d,"aria-hidden")&&Bo(d,"aria-hidden","true")),ui(t,n),n},q$=t=>{let e=wt(t),n=e&&e.ownerDocument.activeElement;return n&&n!==e.ownerDocument.body?n:null},G$=t=>Dt(t,q$(t)),dy=(t,e,n)=>{if(e.open!==null)return e.open;let r=Te(t);return n||r===uy||r===Ur?!1:G$(t)},ui=(t,e,n)=>{let r=e.open===null?null:String(e.open);if(e.written.open!==r){e.written.open=r;let s=wt(t);s&&Bo(s,"data-dropdown-open",r)}if(!e.owns)return;let o=dy(t,e,n)?"true":"false";if(e.written.expanded!==o){e.written.expanded=o;let s=wt(e.trigger);s&&Bo(s,"aria-expanded",o)}},pi=t=>{let e=cy.get(t);return e||(e={stop:null,stopItem:null,chosen:!1,ready:!1,settling:!1,checks:null,checkRows:null,owned:!1},cy.set(t,e)),e},Y$=(t,e)=>{if(t.stopItem===e&&t.stop===e.key)return;let n=t.stopItem&&ly.get(t.stopItem);t.stop=e.key,t.stopItem=e,n&&n.set(!1);let r=ly.get(e);r&&r.set(!0)},X$=(t,e)=>{let n=pi(t);n.chosen=!0,Y$(n,e)},J$=t=>{let e=pi(t);if(e.settling=!1,e.chosen)return;let n=fi(t);for(let r=0;r<n.length;r++)if(Ad(n[r])){Y$(e,n[r]);return}},Z$=(t,e)=>{if(!e||!e.contains(t))return!1;let n=[];for(let o=t;o!==e;o=o.parentElement)n.push(o);n.push(e);let r=!1;for(let o=n.length-1;o>=0;o--){let s=typeof n[o].getAnimations=="function"?n[o].getAnimations():[];for(let i=0;i<s.length;i++)s[i].transitionProperty==="visibility"&&(s[i].finish(),r=!0)}return r},Q$=(t,e)=>{let n=wt(t);if(!n)return;let r=n.ownerDocument.activeElement,o=fy(t);!o&&e&&n.ownerDocument.activeElement===r&&Z$(n,wt(e))&&(o=fy(t));let s=t.parent;o&&s&&cy.has(s)&&X$(s,t)},lK=t=>{let e=t.popupRole==="menu"?t.popup:t.panel;return!e||typeof e.lookdownAll!="function"?[]:e.lookdownAll(t.popupRole==="menu"?Ad:rK)},fK=(t,e,n)=>{if(n==="trigger"){let s=q$(t);(!Dt(t,s)&&!Dt(e.panel,s)||Dt(cA(t),s))&&fy(e.trigger);return}let r=lK(e);if(!r.length)return;let o=n==="last"?r[r.length-1]:null;if(!o)for(let s=0;s<r.length&&!o;s++)Tc(r[s],"aria-checked")==="true"&&(o=r[s]);Q$(o||r[0],e.panel)},lA=(t,e,n)=>{let r=wt(t),o=r&&r.ownerDocument;n&&!e.outside&&o?(e.outside=s=>{if(!wt(t)||!wt(t).isConnected){lA(t,e,!1);return}Dt(t,s.target)||Dt(e.panel,s.target)||ue(t,e,!1)},e.outsideDoc=o,o.addEventListener("pointerdown",e.outside,!0)):!n&&e.outside&&(e.outsideDoc.removeEventListener("pointerdown",e.outside,!0),e.outside=e.outsideDoc=null)},t2=(t,e)=>{let n=wt(t),r=n&&n.ownerDocument&&n.ownerDocument.defaultView;if(!r||typeof r.Event!="function")return;let o=new r.Event("toggle");Object.defineProperty(o,"newState",{value:e?"open":"closed"}),Object.defineProperty(o,"oldState",{value:e?"closed":"open"}),n.dispatchEvent(o)},Oc=(t,e,n)=>{let r=e.open===!0;if(e.open=!0,ui(t,e),Te(t)===Ur){lA(t,e,!0);let o=wt(e.panel);o&&Z$(o,o),r||t2(t,!0)}n&&fK(t,e,n)},ue=(t,e,n)=>{let r=e.open===!0;e.open=!1,ui(t,e),e.outside&&lA(t,e,!1),n&&fy(e.trigger),r&&Te(t)===Ur&&t2(t,!1)},uK=t=>{let e=t.__ref;if(!e||Te(t)!==Ur||!Object.prototype.hasOwnProperty.call(t,"open"))return;let n=K(()=>{let r=t.open;r!=null&&Yo(()=>{let o=gn(t);!o||!!r==(o.open===!0)||(r?Oc(t,o,null):ue(t,o,G$(t)))})},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(n)},py=(t,e,n)=>e.trigger===t?!Dt(e.panel,n):Dt(e.trigger,n)?!0:Dt(cA(t),n),fA=(t,e)=>{let n=e&&typeof e.closest=="function"?e.closest(tK):null;return!!n&&Dt(t,n)},e2=(t,e,n)=>{let r=t.key;r==="Escape"||r==="Esc"?(t.preventDefault(),ue(e,n,!0)):r==="Tab"&&n.popupRole==="menu"&&Dt(n.popup,t.target)&&ue(e,n,!1)},hy=t=>{Te(t)===vd&&t.parent&&H$.add(t.parent),gn(t),uK(t)},gy=(t,e)=>{let n=gn(e);n&&(n.pressedOpen=dy(e,n))},dK=(t,e)=>{let n=ay.get(e);!n||!n.trigger||n.open!==!1||Te(e)!==uy||(n.open=null,ui(e,n))},my=(t,e)=>{if(Te(e)===Ur){hK(t,e);return}if(t.defaultPrevented)return;let n=gn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){if(Te(e)!==uy||!fA(n.panel,r))return;(n.open===!0||t.detail===0)&&ue(e,n,!0);return}if(!py(e,n,r))return;let o=t.detail===0?n.open===!0:n.pressedOpen;n.pressedOpen=!1,o?ue(e,n,!0):Oc(e,n,n.popupRole==="menu"?"first":"trigger")},yy=(t,e)=>{if(t.defaultPrevented)return;if(Te(e)===Ur){gK(t,e);return}let n=gn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){e2(t,e,n);return}if(!py(e,n,r))return;let o=t.key;if(o==="ArrowDown"||o==="Down"||o==="ArrowUp"||o==="Up")t.preventDefault(),Oc(e,n,o==="ArrowUp"||o==="Up"?"last":"first");else if(o==="Escape"||o==="Esc"){if(!dy(e,n))return;t.preventDefault(),ue(e,n,!1)}else(o==="Enter"||o===" "||o==="Spacebar")&&!aA(n.trigger)&&(t.preventDefault(),n.open===!0?ue(e,n,!0):Oc(e,n,n.popupRole==="menu"?"first":"trigger"))},pK=t=>!!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey),hK=(t,e)=>{let n=gn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){n.open===!0&&!pK(t)&&e.keepOpen!==!0&&fA(n.panel,r)&&ue(e,n,!0);return}if(t.defaultPrevented||!py(e,n,r))return;let o=t.detail===0?n.open===!0:n.pressedOpen;n.pressedOpen=!1,o?ue(e,n,!0):Oc(e,n,"trigger")},gK=(t,e)=>{let n=gn(e);if(!n)return;let r=t.key;if(r==="Escape"||r==="Esc"){if(n.open!==!0)return;t.preventDefault(),ue(e,n,!0);return}(r==="Enter"||r===" "||r==="Spacebar")&&!aA(n.trigger)&&!Dt(n.panel,t.target)&&py(e,n,t.target)&&(t.preventDefault(),n.open===!0?ue(e,n,!0):Oc(e,n,"trigger"))},uA=(t,e)=>{let n=gn(e);n&&(n.open===null&&Dt(n.panel,t.target)&&(n.open=!0),ui(e,n))},Cd=(t,e)=>{let n=ay.get(e);if(!n||!n.trigger)return;let r=t.relatedTarget;if(Te(e)===Ur){n.open===!0&&r&&!Dt(e,r)&&!Dt(n.panel,r)&&ue(e,n,!1);return}if(r&&(Dt(e,r)||Dt(n.panel,r))){n.open===null&&Dt(n.panel,r)&&(n.open=!0,ui(e,n));return}n.open=null,ui(e,n,!0)},n2=t=>{let e=t.parent;if(!e||!H$.has(e))return null;let n=fi(e);for(let r=n.indexOf(t)-1;r>=0&&n[r];r--)if(Te(n[r])===vd)return n[r];return null},dA=t=>{let e=n2(t),n=e?gn(e):null;return n&&n.panel===t?{ctrl:e,rec:n}:null},r2=t=>{let e=n2(t);e&&gn(e)},o2=(t,e)=>{if(t.defaultPrevented)return;let n=dA(e);n&&e2(t,n.ctrl,n.rec)},s2=(t,e)=>{if(t.defaultPrevented||!fA(e,t.target))return;let n=dA(e);n&&ue(n.ctrl,n.rec,!0)},i2=(t,e)=>{let n=dA(e);n&&Cd(t,n.ctrl)},mK=(t,e)=>{let n=e.parent,r=Te(n)?gn(n):null;if(r&&r.panel===e){ue(n,r,!0);return}let o=wt(e),s=o&&o.ownerDocument.activeElement;s&&typeof s.blur=="function"&&s.blur()},a2=(t,e)=>{if(Te(e.parent)&&gn(e.parent))return;let n=wt(e);n&&n===n.ownerDocument.activeElement&&n.blur()},yK=(t,e)=>{if(t.defaultPrevented)return;let n=eK[t.key];if(!n)return;let r=typeof e.lookdownAll=="function"?e.lookdownAll(Ad):[];if(!r.length)return;let o=-1;for(let i=0;i<r.length&&o===-1;i++)Dt(r[i],t.target)&&(o=i);let s;n==="first"?s=0:n==="last"?s=r.length-1:o===-1?s=n>0?0:r.length-1:s=(o+n+r.length)%r.length,t.preventDefault(),Q$(r[s])},bK=(t,e)=>{let n=fi(e);for(let r=0;r<n.length;r++)if(Dt(n[r],t.target)){Ad(n[r])&&X$(e,n[r]);return}},_K=t=>{let e=t.parent;if(!e)return"0";let n=pi(e),r=ly.get(t);if(!r){n.stop===null&&(n.stop=t.key);let o=n.stop===t.key;o&&(n.stopItem=t),n.ready&&!n.chosen&&!n.settling&&(n.settling=!0,queueMicrotask(()=>J$(e))),r=_n(o),ly.set(t,r)}return r.get()?"0":"-1"},wK=t=>{r2(t);let e=pi(t);e.ready=!0,!(e.stopItem&&e.stopItem.parent===t&&Ad(e.stopItem))&&J$(t)},SK=t=>{let e=iA.get(t),n=!e;n&&(e={tick:_n(0),seen:0,checked:!1},iA.set(t,e));let r=e.tick.get();return r===e.seen&&(e.checked=!!Yo(()=>t.isActive)),e.seen=r,n&&t.parent&&kK(t.parent),e.checked?"true":"false"},xK=(t,e)=>{if(e.checkRows.get(),!t.node){l2(t);return}let n=fi(t);for(let r=0;r<n.length;r++){let o=iA.get(n[r]);if(!o)continue;let s=!!n[r].isActive;s!==o.checked&&(o.checked=s,o.tick.set(o.tick.peek()+1))}},c2=t=>{let e=pi(t);e.checks||(e.checkRows||(e.checkRows=_n(0)),e.checks=K(()=>xK(t,e),{label:"DropdownList.checks"}))},l2=t=>{let e=cy.get(t);!e||!e.checks||(e.checks.dispose(),e.checks=null)},kK=t=>{let e=pi(t);e.checks?e.checkRows.set(e.checkRows.peek()+1):e.owned||c2(t)},EK=t=>{pi(t).owned=!0},di={transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"},pA={opacity:0,visibility:"hidden"},f2={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden",onComplete:{always:!0,handler:r2},onKeydown:o2,onClick:s2,onFocusout:i2},u2={display:"flex",attr:{dropdown:!0},role:"menu",padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",listStyleType:"none",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},onKeydown:(t,e)=>{yK(t,e),o2(t,e)},onInit:{always:!0,handler:EK},onComplete:{always:!0,handler:wK},onRender:{always:!0,handler:c2},onBeforeRemove:{always:!0,handler:l2},onFocusin:bK,onClick:s2,onFocusout:i2,childExtends:{extends:"Button",state:{},role:"menuitemradio",tabindex:t=>_K(t),aria:{checked:t=>SK(t)},isActive:(t,e)=>e.active===t.key,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},':where([aria-checked="true"])':{style:{svg:{opacity:"1"}}},Icon:{name:"check",opacity:"0.1"},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},d2={position:"relative",zIndex:999,dropdownMode:uy,":hover":{zIndex:1e3,"& [dropdown]":{...di}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...di}},'[data-dropdown-open="false"]:hover':{"& [dropdown]":{...pA}},onComplete:{always:!0,handler:hy},onPointerdown:gy,onPointerenter:dK,onClick:my,onKeydown:yy,onFocusin:uA,onFocusout:Cd},p2={position:"relative",dropdownMode:Ur,'[data-dropdown-open="true"]':{zIndex:1e3,"& > [dropdown]":{...di}},onComplete:{always:!0,handler:hy},onPointerdown:gy,onClick:my,onKeydown:yy,onFocusout:Cd},h2={position:"relative",tabindex:"0",dropdownMode:V$,":focus-within":{zIndex:1e3,"& [dropdown]":{...di}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...di}},'[data-dropdown-open="false"]:focus-within':{"& [dropdown]":{...pA}},onComplete:{always:!0,handler:hy},onPointerdown:gy,onClick:my,onKeydown:yy,onFocusin:uA,onFocusout:Cd,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>a2(t,e)},Dropdown:{onClick:(t,e)=>mK(t,e)}},g2={position:"relative",tabindex:"0",dropdownMode:vd,":focus-within":{zIndex:1e3,"& ~ [dropdown]":{...di}},'[data-dropdown-open="true"]':{zIndex:1e3,"& ~ [dropdown]":{...di}},'[data-dropdown-open="false"]:focus-within':{"& ~ [dropdown]":{...pA}},onComplete:{always:!0,handler:hy},onPointerdown:gy,onClick:my,onKeydown:yy,onFocusin:uA,onFocusout:Cd,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>a2(t,e)}};var gA={};F(gA,{Notification:()=>m2});var m2={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var hi=Object.assign({},GE,YE,XE,JE,QE,rv,ov,sv,ev,iv,av,nv,cv,lv,fv,uv,dv,pv,hv,gv,mv,yv,wv,Kv,qv,Gv,Xv,nA,rA,oA,hA,gA);function by(t){if(t==null)return 0;if(typeof t!="object")return y2(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^by(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^y2(n[r]))*16777619,e=(e^by(t[n[r]]))*16777619;return e>>>0}function y2(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function _y(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!_y(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!_y(t[s],e[s]))return!1}return!0}function mA(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=mA(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function yA(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?yA(t[r],o,n):t[r]=o}return t}function jo(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 Pc(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Td(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():jo(e)}function b2(t){return t.split(`
89
- `).map(jo).join(`
90
- `)}var _2={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",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",scrollBehavior:"sb",inset:"ins"};function w2(t,e){let n=_2[t]||jo(t),r=Td(e),o=`_${n}-${r}`,s=Pc(t),i=TK[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
91
- ${c}`}var TK={"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"},OK="@media (hover: hover)",RK=/(?:^|[^\\]):hover(?![\w-])/,S2=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function x2(t){let e=t.split("\0"),n=[],r=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||S2(i))continue;let a=_2[s]||jo(s),c=Td(i),l=`_${a}-${c}`,f=Pc(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
92
- `)}function k2(t,e,n){let r=t+e,o=`_c${jo(r)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(S2(u)||(i+=`${Pc(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return n!==!1&&RK.test(c)&&(a=`${OK}{${a}}`),`${o}
93
- ${a}`}var bA=null;function Sy(t){bA=t}var Dn={structuralHash:by,deepEqual:_y,mergeStructural:mA,overwriteDeep:yA,shortHash:jo,toKebab:Pc,sanitizeValue:Td,batchShortHash:b2,atomicCssClass:w2,batchAtomicCss:x2,compoundCssClass:k2},E2=!1,wy=null;function v2(t){return wy||(wy=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(Dn.structuralHash=e.structuralHash),e.deepEqual&&(Dn.deepEqual=e.deepEqual),e.mergeStructural&&(Dn.mergeStructural=e.mergeStructural),e.overwriteDeep&&(Dn.overwriteDeep=e.overwriteDeep),e.shortHash&&(Dn.shortHash=e.shortHash),e.toKebab&&(Dn.toKebab=e.toKebab),e.sanitizeValue&&(Dn.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(Dn.batchShortHash=e.batchShortHash),e.atomicCssClass&&(Dn.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(Dn.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(Dn.compoundCssClass=e.compoundCssClass),E2=!0,bA&&e.batchAtomicCss&&bA({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),wy)}function A2(){return E2}M();var Od={};F(Od,{BRENDER_REGISTRY_BLOCK:()=>Pf,BRENDER_STAMP_META:()=>Yh,CDN_PROVIDERS:()=>Ze,DESIGN_SYSTEM_BLOCK:()=>If,DESIGN_SYSTEM_DEFERRED:()=>Df,DESIGN_SYSTEM_LINK:()=>Lf,DOMQL_EVENTS:()=>U_,DOMQ_PROPERTIES:()=>Jr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>qi,ENV:()=>fw,HTML_TAGS:()=>ta,LIBRARY_PACKAGES:()=>qh,LIBRARY_SCOPES_KEY:()=>_s,METHODS:()=>Qr,METHODS_EXL:()=>wl,NODE_ENV:()=>wn,OPTIONS:()=>Yl,PACKAGE_MANAGER_TO_CDN:()=>lo,PARSED_DOMQ_PROPERTIES:()=>_l,POLYGLOT_LANG_STORAGE_KEY:()=>Fh,PROPS_METHODS:()=>Zr,REVIVED_MARK:()=>Cl,STATE_DATA_MERGE_EXL:()=>dh,STATE_METHODS:()=>Zo,STATE_PROPERTIES:()=>B_,SVG_TAGS:()=>p1,TYPES:()=>dl,UNIVERSAL_RESERVED_KEYS:()=>$h,__resetBuiltinMethodWarnings:()=>ux,addCaching:()=>ih,addContext:()=>sh,addExtend:()=>Dw,addExtends:()=>Un,addItemAfterEveryElement:()=>v_,addProtoToArray:()=>gl,addRef:()=>nh,alternateLinkKey:()=>xs,applyCSS:()=>xA,applyDependentState:()=>Zw,applyEvent:()=>ph,applyEventUpdate:()=>hh,applyExtends:()=>m1,applyProps:()=>Vl,arrayContainsOtherArray:()=>b_,arraysEqual:()=>C_,arrayzeValue:()=>vs,bareLibraryKey:()=>kf,bindLibraryGlobalScopes:()=>vf,brenderRegistryBlock:()=>yx,brenderStampMeta:()=>wx,buildImgSrcset:()=>$f,buildSourcesAndImg:()=>Ff,cache:()=>rS,call:()=>HS,captureSnapshot:()=>WS,checkForStateTypes:()=>Gw,checkIfInherits:()=>uh,checkIfStringIsInArray:()=>R_,clone:()=>Y_,cloneAndMergeArrayExtend:()=>Il,cloneFunction:()=>yw,collectExtendsList:()=>ea,concatAddExtends:()=>Rw,copyJavaScriptToClipboard:()=>Ax,copyStringToClipboard:()=>vx,createBasedOnType:()=>eh,createElement:()=>qw,createElementExtends:()=>Hp,createExtends:()=>Nl,createExtendsFromKeys:()=>na,createExtendsStack:()=>qp,createIfConditionFlag:()=>bw,createInheritedState:()=>Yw,createKey:()=>Pl,createNestedObject:()=>rw,createNestedObjectByKeyPath:()=>Jw,createObjectWithoutPrototype:()=>Np,createParent:()=>rh,createPath:()=>oh,createProps:()=>Hl,createPropsStack:()=>Qp,createPrunedLibraryIconLoader:()=>tg,createRoot:()=>Kw,createScope:()=>tS,createSnapshotId:()=>Rl,currentPathname:()=>ms,customDecodeURIComponent:()=>F_,customEncodeURIComponent:()=>$_,cutArrayAfterValue:()=>k_,cutArrayBeforeValue:()=>x_,debounce:()=>Dl,debounceOnContext:()=>gw,decodeNewlines:()=>N_,deepClone:()=>pt,deepContains:()=>ew,deepDefaults:()=>ya,deepDestringifyFunctions:()=>ye,deepExtend:()=>Vp,deepMerge:()=>bt,deepMergeExtends:()=>Vn,deepStringifyFunctions:()=>El,defineSetter:()=>US,designSystemBlock:()=>_x,designSystemLink:()=>bx,destringifyGlobalScope:()=>ss,detectHeightOnInit:()=>JS,detectInfiniteLoop:()=>aw,document:()=>kt,encodeNewlines:()=>M_,error:()=>hs,escapeHtml:()=>U,escapeRegExp:()=>P_,excludeKeysFromObject:()=>lw,exec:()=>St,exposeBagGlobalScopes:()=>Af,extendCachedRegistry:()=>Pw,extendStackRegistry:()=>$l,extractArrayExtend:()=>Bl,faviconLinkKey:()=>po,fetchLibraryData:()=>wa,fibonacciNumberByIndex:()=>ZS,fileEntryUrl:()=>Xh,filterArrays:()=>T_,filterArraysFast:()=>O_,finalizeExtends:()=>Gp,findClosestNumber:()=>Jh,findClosestNumberInFactory:()=>Ex,findInheritedState:()=>fh,findKeyPosition:()=>D_,flattenExtend:()=>ra,formatDate:()=>XS,generateHash:()=>Bp,generateHeadArrayTags:()=>Sa,generateKey:()=>Ol,generateMetaTags:()=>xx,get:()=>$S,getActiveRoute:()=>Hv,getCDNDirUrl:()=>Vh,getCDNUrl:()=>En,getCapitalCaseKeys:()=>Nw,getCdnProviderFromConfig:()=>ga,getChildStateInKey:()=>lh,getChildren:()=>jS,getContext:()=>pf,getCookie:()=>kw,getDB:()=>bf,getEmotionStylesheet:()=>Dx,getExtendsInElement:()=>Iw,getExtendsStack:()=>Ml,getExtendsStackRegistry:()=>Up,getFrequencyInArray:()=>__,getFunctionSource:()=>Ie,getHashedExtend:()=>Fl,getImportMapScript:()=>YS,getInObjectByPath:()=>iw,getLocalStorage:()=>vw,getNev:()=>hw,getPageMetadata:()=>kx,getParentStateInKey:()=>ch,getPath:()=>af,getQuery:()=>_f,getRef:()=>BS,getRoot:()=>ff,getRootContext:()=>df,getRootData:()=>uf,getRootState:()=>lf,getRootStateInKey:()=>ah,getSpreadChildren:()=>$w,global:()=>g_,hasFunction:()=>oe,hasHandlerPlugin:()=>Ji,hasOwnProperty:()=>Z_,hashContent:()=>An,inheritChildExtends:()=>Wp,inheritChildPropsExtends:()=>zp,inheritParentProps:()=>zl,inheritRecursiveChildExtends:()=>Kp,init:()=>ir,initProps:()=>Hw,insertAfterImportMap:()=>Sx,installPrunedLibraryIconLoader:()=>Nf,is:()=>me,isArray:()=>I,isBoolean:()=>Tp,isBuiltinElementMethod:()=>j_,isContextComponent:()=>Fw,isCyclic:()=>cw,isDOMNode:()=>he,isDate:()=>Rp,isDefined:()=>Ut,isDevelopment:()=>eo,isEmpty:()=>Ip,isEmptyObject:()=>Q_,isEqualDeep:()=>Mp,isFailedRevival:()=>rs,isFunction:()=>L,isHtmlElement:()=>fl,isLazyFunction:()=>X_,isLocal:()=>pw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>ys,isMethod:()=>zS,isMobile:()=>Sw,isNode:()=>fr,isNot:()=>y_,isNotProduction:()=>ur,isNull:()=>Op,isNumber:()=>ge,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>QS,isPolyglotRetranslatableKey:()=>Gl,isPolyglotWritableKey:()=>as,isProduction:()=>to,isProtectedElementMethod:()=>Qo,isRevived:()=>os,isStaging:()=>dw,isState:()=>Xw,isString:()=>v,isStringFunction:()=>Xi,isStringTag:()=>Al,isTest:()=>Fp,isTesting:()=>uw,isUndefined:()=>Yt,isUniversallyReservedKey:()=>KS,isUnresolvableDependency:()=>fo,isValidDependencyMap:()=>bs,isValidHtmlTag:()=>Cw,isWrappedLibrary:()=>Me,joinArrays:()=>zi,jointStacks:()=>Lw,jsonForScript:()=>ao,keys:()=>Mh,lastLevel:()=>ty,lastPathname:()=>vc,libraryIconPruneReplacer:()=>Lx,libraryIdentifier:()=>Zh,libraryPackageSpecs:()=>ba,librarySpecsFor:()=>Kh,loadCssFile:()=>rx,loadJavascript:()=>ox,loadJavascriptFile:()=>tx,loadJavascriptFileEmbedSync:()=>nx,loadJavascriptFileSync:()=>ex,loadLazy:()=>Nv,loadRemoteCSS:()=>sx,loadRemoteScript:()=>ma,log:()=>VS,logGroupIf:()=>ww,logIf:()=>_w,lookdown:()=>MS,lookdownAll:()=>NS,lookup:()=>IS,lowercaseFirstLetter:()=>Jo,makeObjectWithoutPrototype:()=>tw,map:()=>G_,mapStringsWithContextComponents:()=>jl,markPolyglotSeeded:()=>zn,markRevived:()=>Yi,matchRoute:()=>jv,matchesComponentNaming:()=>Hn,memoize:()=>mw,merge:()=>Lt,mergeSharedLibraries:()=>Cf,mergeSharedLibraryDesignSystems:()=>Tf,mergeStateData:()=>ro,nextElement:()=>gf,normalizeIgnoreList:()=>Ef,normalizeLibraryKey:()=>ws,objectToString:()=>vl,objectizeStringProperty:()=>Ul,overwrite:()=>Tl,overwriteDeep:()=>se,overwriteShallow:()=>is,overwriteState:()=>Qw,parse:()=>Nh,parseDeep:()=>of,parseQuery:()=>Uv,parseRoutePattern:()=>Qm,payloadHasComputedIconName:()=>Qh,pickStartLang:()=>Uh,pickupElementFromProps:()=>Jp,pickupPropsFromElement:()=>Xp,planLibraryIconPrune:()=>Px,polyglotAddressLang:()=>Bh,polyglotFallbackLang:()=>yr,polyglotLangStorageKey:()=>da,polyglotLanguages:()=>kn,polyglotSeededKeys:()=>oo,polyglotStartLang:()=>gs,polyglotStartRule:()=>jh,polyglotStartupScript:()=>qS,previousElement:()=>mf,promoteActiveRootState:()=>fa,propExists:()=>Uw,propertizeElement:()=>Zp,propertizeUpdate:()=>jw,readBrenderStamp:()=>us,readJsonDataBlock:()=>pr,reinit:()=>SA,remove:()=>EO,removeChars:()=>Cx,removeCookie:()=>Ew,removeDuplicateProps:()=>Kl,removeDuplicatesInArray:()=>Wi,removeFromArray:()=>w_,removeFromObject:()=>nw,removeNestedKeyByPath:()=>ow,removeValueFromArray:()=>hl,removeValueFromArrayAll:()=>E_,reorderArrayByValues:()=>A_,repairLegacyArrowScopePreamble:()=>Sl,replaceLiteralsWithObjectFields:()=>Xt,replaceOctalEscapeSequences:()=>I_,resolveAsset:()=>be,resolveFileReferences:()=>Es,resolveHandler:()=>Zi,resolveRouterElement:()=>kd,resolveSharedLibraries:()=>Of,returnValueAsText:()=>th,router:()=>Ln,runGuards:()=>a$,runPluginHook:()=>no,saveScrollPosition:()=>bd,scopeElementParam:()=>Pp,scopeReceiverExpression:()=>W_,scratchSystem:()=>Ba,scratchUtils:()=>bo,self:()=>m_,set:()=>Ws,setActiveRootState:()=>cf,setCookie:()=>xw,setHashedExtend:()=>jp,setInObjectByPath:()=>sw,setLocalStorage:()=>Aw,setNodeStyles:()=>Ih,setProps:()=>FS,setPropsPrototype:()=>Wl,sharedLibrary:()=>fx,sharedLibraryFiles:()=>Ss,splitPackageSpecifier:()=>wf,spotByPath:()=>sf,srcsetFor:()=>xa,stringIncludesAny:()=>yl,stringToObject:()=>J_,stripVersionRangePrefix:()=>Sf,swapItemsInArray:()=>S_,syncProps:()=>ql,themeColorKey:()=>ks,toCamelCase:()=>br,toDashCase:()=>Mf,toDescriptionCase:()=>Ox,toPriorityOrder:()=>Ye,toTitleCase:()=>Tx,toggleFullscreen:()=>GS,triggerEventOn:()=>dr,triggerEventOnUpdate:()=>eS,trimStringFromSymbols:()=>L_,unstackArrayOfObjects:()=>pl,update:()=>Vw,updateProps:()=>zw,variables:()=>yf,verbose:()=>ua,warn:()=>hf,warnLibraryAliasCollision:()=>_a,window:()=>R});M();M();M();var LK={group:"group",imagePair:"image-pair","image-pair":"image-pair",old:"old",new:"new"},DK=/^(?:\*|\.?-?[_a-zA-Z][\w-]*)$/,IK=/^-?[_a-zA-Z][\w-]*$/,MK=new Set(["root","*"]),NK="@media (prefers-reduced-motion: no-preference)",$K="@media (prefers-reduced-motion: reduce)",FK=(t,e)=>{let n=v(t)?{animation:t}:k(t)?t:null;if(!n)return null;let r;try{r=te(n,e)}catch{return null}let o={};for(let s in r){let i=r[s];(v(i)||ge(i))&&(o[s]=i)}return Object.keys(o).length?o:null},C2=(t,e,n={})=>{if(!k(t))return null;let r=!n.scope||n.scope===":root",o=l=>{n.verbose!==!1&&console.warn("[smbls] designSystem.viewTransition: "+l)},s={key:"viewTransition",state:{},context:{designSystem:e}},i={},a={},c=(l,f,u)=>{for(let d in f){if(d==="types"&&!u)continue;let p=LK[d];if(!p){o(`${l}.${d} is not a view-transition part (group, imagePair, old, new)`);continue}let g=`${u}::view-transition-${p}(${l})`,h=FK(f[d],s);h&&(i[g]=h,a[g]={animation:"none"})}};for(let l in t){let f=t[l];if(k(f)){if(!DK.test(l)){o(`"${l}" is not a view-transition name`);continue}if(!r&&MK.has(l)){o(`"${l}" belongs to the document's primary app; a scoped app (${n.scope}) emits its own names only`);continue}if(c(l,f,""),k(f.types))for(let u in f.types){if(!IK.test(u)||!k(f.types[u])){o(`${l}.types.${u} is not a view-transition type with parts`);continue}c(l,f.types[u],`:root:active-view-transition-type(${u})`)}}}return Object.keys(i).length?{[NK]:i,[$K]:a}:null};var BK=P(),O2=(t=BK,e)=>{let n=k(e.localFile)?e.localFile:{},r=pt(n.designSystem||{});return bt(t,r,ie)},jK={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},xy=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},_A=(t,e)=>{t.CSS_MEDIA_VARS&&Ot(xy(t.CSS_MEDIA_VARS,e));let n=Hs(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&Ot(n)},R2=(t,e)=>{let n=C2(t.viewTransition,t,{scope:e,verbose:t.verbose});n&&Ot(n)},ky=t=>{if(typeof window<"u"&&window.location)try{let e=new URLSearchParams(window.location.search).get("globalTheme");if(e)return e}catch{}return t},T2=(t,e)=>{t.useVariable&&(Ot({[e]:t.CSS_VARS}),_A(t,e)),t.useReset&&Ot(t.reset);let n=t.animation;if(n){let r={};for(let o in n)r[`@keyframes ${o}`]=n[o];Ot(r)}R2(t,e)},P2=(t,e,n,r,o)=>{t.useFontImport&&Ot(Wf(t.font,t.files));let s=null;return o?Nu(o):n.recordCss?s=Mu(()=>T2(t,e)):T2(t,e),(r.svg||t.useSvgSprite)&&Su(t.svg,{document:n.document}),(r.icons||t.useIconSprite)&&Vs(t.icons,{document:n.document}),s},ir=(t,e=jK)=>{let n=O2(t||{},e),r=e.scopeSelector||":root",o=ky(e.globalTheme),s=Ws({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i={svg:!!t.svg,icons:!!t.icons},a=P2(s,r,e,i);return a&&typeof e.recordCss=="function"&&e.recordCss({rules:a,sprites:i}),s},wA=(t,e,n,r)=>{let o=n.scopeSelector||":root";if(Vg(t.config,e),n.files!==void 0&&(e.files=n.files),n.assets!==void 0&&(e.assets=n.assets),n.themeRoot!==void 0&&(e.themeRoot=n.themeRoot),go(e),mo(e),Ou(e),e.__svgCache={},r){mt(e);try{Tu("font",r)}finally{ht()}}mt(e);try{P2(e,o,n,t.sprites||{},t.rules)}finally{ht()}return e},Ey={},SA=(t,e=Ey)=>{let n=O2(t||{},e),r=e.scopeSelector||":root",o=Ws({verbose:!1,...n});return e.preventInject||(Ot({[r]:o.CSS_VARS}),_A(o,r),Ot(o.reset),R2(o,r)),o},xA=(t,e=Ey)=>{Ot(t)},UK=(t,e=Ey)=>{let n=e.scopeSelector||":root";Ot({[n]:t.CSS_VARS}),_A(t,n)};var VK=(t,e=Ey)=>{};M();var L2=10,HK=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return!!e&&typeof e.requestAnimationFrame=="function"},zK=t=>{try{let e=t.defaultView;return e&&e.frameElement||null}catch{return null}},WK=t=>{let e=t&&t.document||(typeof document<"u"?document:null);if(!e)return()=>!0;let n=!!e.defaultView,r=zK(e);return()=>!(n&&!e.defaultView||r&&!r.isConnected)},D2=Symbol("smbls.bootGone"),I2=t=>{let e,n={live:WK(t),dead:!1,gone:new Promise(r=>{e=r}),lost(){n.dead||(n.dead=!0,e(D2))}};return n},Lc=t=>t?t.dead?!1:t.live()?!0:(ud(t),!1):!0,KK=(t,e)=>e?Promise.race([t,e.gone]):t,Uo=async(t,e)=>await KK(t,e)!==D2&&Lc(e),kA=t=>{if(!(!t||!t.__ref))try{un(t)}catch{}},M2=new WeakSet,Dc=t=>(M2.add(t),t),Rd=t=>!!t&&typeof t=="object"&&M2.has(t),N2=t=>{let e=t&&typeof t=="object"?t.firstRender:void 0;if(e===!1||!HK(t))return null;if(e===void 0||e===!0)return{budget:L2,progressive:!1};if(e&&typeof e=="object"){let r=e.budget===void 0?L2:rr(e.budget);return r?{budget:r,progressive:e.progressive===!0}:null}let n=rr(e);return n?{budget:n,progressive:!1}:null},EA=new WeakMap,vA=(t,e)=>(EA.set(t,e),e),AA=t=>{EA.delete(t)},$2=t=>{let e=t&&EA.get(t);return!e||e.routeTaken?null:(e.routeTaken=!0,e)},qK=Object.freeze({deferAttach:!0}),F2=async(t,e,n,r,o)=>{let s=o.lease||null;if(await or(),!Lc(s))return null;let i=r.mountYield;i===void 0&&(r.mountYield=o.budget);let a=r.mountWhole;a===void 0&&(r.mountWhole=!o.progressive),o.pageOptions={mountYield:r.mountYield,mountWhole:r.mountWhole};let c;o.commit=new Promise(d=>{c=d}),o.committed=!1;let l=!o.progressive;vA(n,o);let f=ni(),u=null;s&&(n.__mountLease=s);try{if(u=Gt(t,e,n.key,r,l?qK:void 0),!await Uo(Br(u),s)||o.routeReady&&!await Uo(o.routeReady,s)||!await Uo(Ae(),s))return vy(u);for(;!No();)if(!await Uo(Ae(),s))return vy(u);return l&&Do(u),o.committed=!0,c(),o.page&&await Br(o.page),await Ae(),u}finally{o.committed=!0,c(),f(),r.mountYield=i,r.mountWhole=a,s&&(n.__mountLease=null),AA(n)}},vy=t=>(kA(t),null);var j2=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,GK=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},TA={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},YK=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},Pd=(t,e)=>(kd||YK)(t,e),XK=["manual","auto","restore"],CA=new WeakMap,B2=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},JK=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!XK.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual', 'auto' or 'restore', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||R,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=CA.get(o);s||(s={found:o.scrollRestoration,claims:[]},CA.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),B2(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||CA.delete(o);try{B2(o,s)}catch{}}})}catch{}}},ZK=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=bd,r=t.window||R;if(typeof n!="function"||!r||typeof r.addEventListener!="function")return;let o=t.document||r.document,s=()=>n(r),i=()=>{o.visibilityState==="hidden"&&n(r)};r.addEventListener("pagehide",s);let a=!!o&&typeof o.addEventListener=="function";a&&o.addEventListener("visibilitychange",i),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{r.removeEventListener("pagehide",s),a&&o.removeEventListener("visibilitychange",i)})},U2=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=TA:e.router=Lt(e.router||{},TA);let n=e.router;JK(e,n),ZK(e,n);let r=(i,a)=>{let c=i.context?.window||R,l=GK(n);if(!l){if(!c.location)return;let{pathname:u,search:d,hash:p}=c.location;u=j2(u),l=u+d+p}let f=i;if(n.customRouterElement){let u=Pd(i,n.customRouterElement);u&&(f=u,i.routes&&(f.routes=i.routes))}if(f.routes)return Ln(l,f,{},{initialRender:!0,pushState:!1,...a})},o=async(i,a)=>{let c=$2(i.context);if(c)return QK(i,c,r);await r(i)},s=!Yt(t.onRenderRouter);return n&&n.initRouter&&!s&&(t.onRenderRouter=(i,a)=>e.__firstNavigation=o(i,a)),t7(e,n),n},QK=(t,e,n)=>{let r;return e.routeReady=new Promise(s=>{r=s}),(async()=>{try{if(await or(),!t.__ref||!Lc(e.lease))return;let s=n(t,e.progressive?{mountOptions:e.pageOptions}:{mountOptions:e.pageOptions,firstView:e});await Ae(),r(),await s}finally{r()}})()},OA=(t,e)=>{if(e.router===!1)return;let n=e.router||TA;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:Ln,o=e.window||R,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=j2(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=Pd(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},t7=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return bt(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};var DA={};F(DA,{components:()=>PA,functions:()=>Vr});var LA={};F(LA,{AlertTemplate:()=>Ny,ConfirmTemplate:()=>My,CustomTemplate:()=>Fy,ModalLayer:()=>Iy,ModalRoot:()=>Dy,PromptTemplate:()=>$y,windowsComponents:()=>PA});var RA={};F(RA,{alertDialog:()=>Py,closeAllModals:()=>Oy,closeModal:()=>Cy,confirmDialog:()=>Ry,getLayer:()=>Ay,openModal:()=>Ty,promptDialog:()=>Ly,windowsFunctions:()=>Vr});function lt(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Ic(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Ay(){return lt(this)}var e7=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},V2=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function Cy(t){let e=Ic(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)e7(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Ty(t={}){let e=Ic(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return V2(e,s),e.state.update({stack:[...o,r]}),n}function Oy(){let t=Ic(this);if(!t)return;let e=t.state?.stack;if(!e?.length)return;let n=e.slice();t.state.update({stack:[]});for(let r=n.length-1;r>=0;r--){let o=n[r];if(typeof o?.onClose=="function")try{o.onClose()}catch(s){console.warn("[windows] onClose threw:",s)}}}function Ry(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function Py(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Ly(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Vr={openModal:Ty,closeModal:Cy,closeAllModals:Oy,confirmDialog:Ry,alertDialog:Py,promptDialog:Ly,getLayer:Ay};var n7=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),H2=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(n7),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},z2=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},Dy={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let c in Vr)c in n.functions||(n.functions[c]=Vr[c])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=c=>{if(typeof c?.onCancel=="function")try{c.onCancel()}catch(l){console.warn("[windows] onCancel threw:",l)}if(typeof c?.onClose=="function")try{c.onClose()}catch(l){console.warn("[windows] onClose threw:",l)}},o=()=>{let c=t.state?.stack||[];if(!c.length)return;let l=c.length-1,f=c[l];t.state.update({stack:c.slice(0,-1)});let u=t["ModalLayer_"+l],d=u?.node||u?.__ref?.node;d?.style?.setProperty&&(d.style.setProperty("display","none","important"),d.style.setProperty("opacity","0","important"),d.style.setProperty("visibility","hidden","important"),d.style.setProperty("pointer-events","none","important")),r(f)},s=c=>{let l=t.state?.stack;if(l?.length){if(c.key==="Tab"){let f=z2(t);if(!f)return;let u=H2(f);if(!u.length){c.preventDefault();let m=f.querySelector?.('[role="dialog"]')||f;try{m.focus?.()}catch{}return}let d=u[0],p=u[u.length-1],g=document.activeElement;if(!f.contains(g)){c.preventDefault();try{d.focus()}catch{}return}if(c.shiftKey&&g===d){c.preventDefault();try{p.focus()}catch{}}else if(!c.shiftKey&&g===p){c.preventDefault();try{d.focus()}catch{}}return}c.key!=="Escape"||c.defaultPrevented||l[l.length-1]?.dismissOnBackdrop!==!1&&(c.preventDefault(),o())}};window.addEventListener("keydown",s),t.__escHandler=s;let i=c=>{let l=t.state?.stack||[];if(c<0||c>=l.length)return;let f=l[c];t.state.update({stack:l.filter((p,g)=>g!==c)});let u=t["ModalLayer_"+c],d=u?.node||u?.__ref?.node;d?.style?.setProperty&&(d.style.setProperty("display","none","important"),d.style.setProperty("opacity","0","important"),d.style.setProperty("visibility","hidden","important"),d.style.setProperty("pointer-events","none","important")),r(f)},a=c=>{let l=t.state?.stack||[];if(!l.length)return;let f=c.target?.closest?.('[data-key="Close"]');if(f){for(let u=l.length-1;u>=0;u--){let d=t["ModalLayer_"+u],p=d?.node||d?.__ref?.node;if(p&&p.contains(f)){c.preventDefault(),c.stopPropagation(),i(u);return}}return}for(let u=l.length-1;u>=0;u--){let d=t["ModalLayer_"+u];if((d?.node||d?.__ref?.node)===c.target){if(l[u]?.dismissOnBackdrop===!1)return;c.preventDefault(),c.stopPropagation(),i(u);return}}};document.addEventListener("click",a,!0),t.__clickDelegate=a},onUpdate:t=>{if(typeof window>"u")return;let n=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(n!==r)if(t.__prevStackLen=n,t.__modalOpeners=t.__modalOpeners||[],n>r)t.__modalOpeners[n]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[n]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=z2(t);if(!o)return;let i=H2(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{i.focus&&i.focus()}catch{}});else{let o=null;for(let s=r;s>n;s--)t.__modalOpeners[s]&&(o=o||t.__modalOpeners[s]),t.__modalOpeners[s]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Iy={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}},width:t=>lt(t)?.width||"H",maxWidth:t=>lt(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>lt(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>lt(t)?.template!=="confirm"},AlertTemplate:{hide:t=>lt(t)?.template!=="alert"},PromptTemplate:{hide:t=>lt(t)?.template!=="prompt"},CustomTemplate:{hide:t=>lt(t)?.template!=="custom"}}};var Mc=(t,e,n)=>lt(t)?.[e]||n,r7=t=>{let e=lt(t)?.icon;return e===null||e===!1},My={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Mc(t,"title","Are you sure?"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>r7(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>Mc(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>Mc(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Mc(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>Mc(t,"confirmTheme","primary"),text:t=>Mc(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var Ld=(t,e,n)=>lt(t)?.[e]||n,Ny={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Ld(t,"title","Notice"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Ld(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Ld(t,"message",""),P:{tag:"p",margin:"0",text:t=>Ld(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>Ld(t,"okText","OK"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Nc=(t,e,n)=>lt(t)?.[e]||n,$y={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=lt(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=lt(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Nc(t,"title","Enter a value"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Nc(t,"message",""),P:{tag:"p",margin:"0",text:t=>Nc(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Nc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=lt(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Nc(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Nc(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=lt(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Fy={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>lt(t)?.title||"",hide:t=>!lt(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=K(()=>{let n=lt(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Vr)i in s.functions||(s.functions[i]=Vr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var W2={extends:"Button",theme:"tertiary"};var PA={ModalRoot:Dy,ModalLayer:Iy,ConfirmTemplate:My,AlertTemplate:Ny,PromptTemplate:$y,CustomTemplate:Fy,"smbls.CancelButton":W2};var VA={};F(VA,{components:()=>FA,functions:()=>jA});var BA={};F(BA,{Dropdown:()=>zy,DropdownList:()=>Wy,DropdownParent:()=>Ky,DropdownParentFocus:()=>qy,DropdownRoot:()=>Vy,DropdownSiblingFocus:()=>Gy,DropdownTrigger:()=>Hy,dropdownComponents:()=>FA});var K2=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),o7=(t,e,n,r)=>{let o=K2(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},s7=(t,e,n,r,o)=>{let s=K2(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var IA=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},By=(t,e,n)=>Math.max(e,Math.min(n,t)),Hr=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:IA("center",null,g)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let g=IA("center",t,o),h=Math.min(s.height,g),m=By((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=By((o-h)/2,8,Math.max(8,o-h-8));return{left:m,top:y,side:"center",align:"center",maxHeight:g}}let i,a;if(n==="auto")i=o7(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=s7(i,t,s,r,o)}let c=IA(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),p=Math.max(8,o-l-8);return f=By(f,8,d),u=By(u,8,p),{left:f,top:u,side:i,align:a,maxHeight:c}},$c=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var Vo={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},i7=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},MA=t=>t?.getRoot?.()?.DropdownRoot||null,a7=0,c7=()=>`dropdown_${++a7}_${Date.now().toString(36)}`;function jy(t={}){let e=MA(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||i7(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||c7(),i=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),a={id:o,content:t.content||null,anchor:r,placement:t.placement||Vo.placement,trigger:t.trigger||Vo.trigger,offset:t.offset??Vo.offset,minWidth:t.minWidth||Vo.minWidth,maxWidth:t.maxWidth||Vo.maxWidth,maxHeight:t.maxHeight||Vo.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:i},c=e.state?.layer;if(c?.onClose)try{c.onClose(c)}catch(l){console.warn("[dropdown] prev onClose threw:",l)}if(e.state.update({layer:a}),typeof a.onOpen=="function")try{a.onOpen(a)}catch(l){console.warn("[dropdown] onOpen threw:",l)}return o}function Uy(t){let e=MA(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function gi(t){let e=MA(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var NA=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},q2=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},l7=`
88
+ )`};var IW={primary:{"@dark":{color:"white",background:"blue",".color-only":{color:"blue"},".inactive":{background:"gray+16"},".gradient":{color:"white",background:"gradient-blue"}},"@light":{color:"white",background:"gradient-blue",".color-only":{color:"blue"},".gradient":{color:"white",background:"gradient-colorful"}}},secondary:{"@dark":{color:"white",background:"green",".color-only":{color:"green"}},"@light":{color:"white",background:"green",".color-only":{color:"green"}},".child":"--primary"},tertiary:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"}},quaternary:{"@light":{color:"white",background:"gradient-light"},"@dark":{color:"white",background:"gradient-dark-active"}},quinary:{"@dark":{color:"gray=90",background:"gradient-light",":hover":{color:"gray=95",background:"gradient-light-active"},":focus":{color:"gray=120",background:"gradient-light-active"},":active":{color:"gray=120",background:"gradient-light-active"},".active":{color:"gray=120",background:"gradient-light-active"}},"@light":{color:"gray3",background:"gradient-dark",":hover":{color:"gray1",background:"gradient-dark-active"},":active":{color:"gray1",background:"gradient-dark-active"},".active":{color:"gray1",background:"gradient-dark-active"}}}},MW={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},NW={field:{"@light":{color:"black",background:"gray.975+144",borderColor:"gray.975+144","::placeholder":{color:"gray-68"}},"@dark":{color:"white",background:"gray.975-52",borderColor:"gray.975-52","::placeholder":{color:"gray+68"}}},label:{"@dark":{color:"white",background:"gray.92+8"},"@light":{background:"gray.1"},".light":{color:"white",background:"gray3"},".dark":{color:"white",background:"black.35"}},card:{"@light":{background:"gray.975+150"},"@dark":{color:"white",background:"gray.975-56"},".child":{color:"white",background:"gray3"},".secondary":{color:"white",background:"gradient-blue-dark",".child":{color:"white",background:"black.35"}}},dialog:{"@dark":{color:"white",background:"gray.92",".helper":{color:"white",background:"black"}},"@light":{color:"currentColor",background:"gray.1"}}},ZI={document:{"@light":{color:"black",background:"white"},"@dark":{color:"white",background:"black"}},...IW,...MW,...NW,backdrop:{"@light":{background:"scrim",backdropFilter:"blur(8px)"},"@dark":{background:"scrim",backdropFilter:"blur(8px)"}},backdropSoft:{"@light":{background:"scrimSoft",backdropFilter:"blur(4px)"},"@dark":{background:"scrimSoft",backdropFilter:"blur(4px)"}},none:{color:"none",background:"none"},transparent:{color:"currentColor",background:"transparent"}};var QI={base:16,ratio:1.25,subSequence:!0,useCapsize:!0,templates:{}};var tM={ratio:1.618,subSequence:!0};var eM={SourceSans:[{url:""}]},nM={system:{isDefault:!0,isSystemFallback:!0,value:["system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"','"Liberation Sans"'],type:"sans-serif"}};var rM={symbols:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',logo:'<svg xmlns="http://www.w3.org/2000/svg" width="41" height="42" viewBox="0 0 41 42"><path fill="currentColor" fill-rule="evenodd" d="M26.6448969,0.699064106 C31.4862479,1.83000067 35.6718819,4.48073656 38.3104478,8.91022511 C40.5212645,12.5974948 41.4936378,17.0951724 40.5085112,21.3679841 C39.7174644,25.0315254 37.8558379,27.853625 34.8002871,29.8369535 C31.9792925,31.7073227 27.90737,32.069064 24.6776501,31.3213124 C23.2887047,30.9944607 20.6411869,29.9775216 19.044333,28.0178349 C17.5928447,26.2365433 17.1250067,23.5192397 17.0461096,22.8419583 C16.9044422,21.6258334 17.1065683,20.249997 17.3800113,19.0276209 C17.9614095,16.4655592 18.9984397,14.7924534 21.1401118,13.3818866 C22.95018,12.1750388 24.6834696,11.8738651 26.7601335,12.3496124 C28.1855093,12.6880929 29.4520072,13.526716 30.3514025,14.7276098 C30.6271426,15.093878 30.8260324,15.4389318 31.059655,15.8362933 L30.9598079,15.7715366 C29.6377659,14.9422902 28.1654404,14.6590001 26.6448969,15.0752526 C25.2996601,15.4486698 24.1453463,16.3687006 23.4390969,17.6304467 C22.6973258,18.9448239 22.4839364,20.5087166 22.8465467,21.9733145 C23.2152637,23.4394215 24.1276197,24.6832715 25.381967,25.429977 C26.7647836,26.2608222 28.5893081,26.47537 30.1320438,26.0161118 C32.0344739,25.4497656 33.5958796,24.1165457 34.5824098,22.3233381 C35.8078311,20.0959926 36.0316242,17.5753145 35.4197363,15.1376991 C34.8712232,12.9726344 33.491011,11.1258939 31.7578503,9.86101942 C28.3978494,7.40873928 23.8145474,6.88014849 19.8961329,8.1555193 C16.9596954,9.11146975 14.399202,11.0657028 12.6221782,13.707146 C10.5375814,16.8894059 9.73736372,20.794518 10.3986926,24.5579956 C10.9302311,27.7327705 12.5716868,31.0242929 14.8485647,33.1339502 C15.5517576,33.7855358 16.0056239,34.2996296 16.8186608,34.9238068 C16.1252729,35.6670587 15.729719,36.1210912 15.0276006,36.8553491 L10.5425168,41.6144377 C8.59431563,40.2572487 6.84060794,38.6181461 5.33246714,36.7448351 C1.65619854,32.1632109 -0.0655234106,26.1858125 0.562658817,20.1851649 C1.1000136,14.4158268 3.81414269,9.08050481 8.0996615,5.36924966 C12.3107417,1.69300072 17.6911238,0.0107792851 23.1108097,0.299129816 C25.006381,0.458182488 26.18441,0.591493918 26.6448969,0.699064106 Z"/></svg>',arrowDownCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-circle"><circle cx="12" cy="12" r="10"/><path d="M8 12l4 4 4-4M12 8v8"/></svg>',arrowDownLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-left"><path d="M17 7L7 17M17 17H7V7"/></svg>',arrowDownRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down-right"><path d="M7 7l10 10M17 7v10H7"/></svg>',arrowDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-down"><path d="M12 5v14M19 12l-7 7-7-7"/></svg>',arrowLeftCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left-circle"><circle cx="12" cy="12" r="10"/><path d="M12 8l-4 4 4 4M16 12H8"/></svg>',arrowLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>',arrowRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><path d="M5 12h14M12 5l7 7-7 7"/></svg>',arrowRightCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right-circle"><circle cx="12" cy="12" r="10"/><path d="M12 16l4-4-4-4M8 12h8"/></svg>',arrowUpCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"/><path d="M16 12l-4-4-4 4M12 16V8"/></svg>',arrowUpLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-left"><path d="M17 17L7 7M7 17V7h10"/></svg>',arrowUpRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-right"><path d="M7 17L17 7M7 7h10v10"/></svg>',arrowUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><path d="M12 19V5M5 12l7-7 7 7"/></svg>',checkCircle:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><path d="M22 4L12 14.01l-3-3"/></svg>',check:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><path d="M20 6L9 17l-5-5"/></svg>',chevronDown:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><path d="M6 9l6 6 6-6"/></svg>',chevronLeft:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-left"><path d="M15 18l-6-6 6-6"/></svg>',chevronRight:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"><path d="M9 18l6-6-6-6"/></svg>',chevronUp:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-up"><path d="M18 15l-6-6-6 6"/></svg>',copy:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>',eyeOff:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24M1 1l22 22"/></svg>',eye:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>',info:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-info"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></svg>',lock:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg>',minus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-minus"><path d="M5 12h14"/></svg>',sun:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><path d="M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"/></svg>',moon:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg>',moreHorizontal:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>',moreVertical:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>',send:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-send"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/></svg>',smile:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-smile"><circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"/></svg>',search:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>',upload:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>',video:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-video"><path d="M23 7l-7 5 7 5V7z"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',x:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><path d="M18 6L6 18M6 6l12 12"/></svg>',star:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>',plus:'<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><path d="M12 5v14M5 12h14"/></svg>'};var oM={tv:"(min-width: 2780px)",screenL:"(max-width: 1920px)","screenL<":"(min-width: 1920.02px)",screenM:"(max-width: 1680px)","screenM<":"(min-width: 1680.02px)",screenS:"(max-width: 1440px)","screenS<":"(min-width: 1440.02px)",tabletL:"(max-width: 1366px)","tabletL<":"(min-width: 1366.02px)",tabletM:"(max-width: 1280px)","tabletM<":"(min-width: 1280.02px)",tabletS:"(max-width: 1024px)","tabletS<":"(min-width: 1024.02px)",mobileL:"(max-width: 768px)","mobileL<":"(min-width: 768.02px)",mobileM:"(max-width: 560px)","mobileM<":"(min-width: 560.02px)",mobileS:"(max-width: 480px)","mobileS<":"(min-width: 480.02px)",mobileXS:"(max-width: 375px)","mobileXS<":"(min-width: 375.02px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var sM={base:150,ratio:1.333,unit:"ms",subSequence:!0,defaultBezier:"cubic-bezier(.29, .67, .51, .97)",springBezier:"cubic-bezier(.32, .72, 0, 1)"};var iM={radiusControl:"12px",radiusCard:"17px",radiusSheet:"24px",radiusPill:"999px",controlH:"44px",controlHCompact:"36px"};var ai={version:"0.0.1",color:XI,gradient:JI,theme:ZI,typography:QI,spacing:tM,font:eM,fontFamily:nM,timing:sM,icons:rM,media:oM,sizes:iM,reset:{html:{},body:{}},animation:{fadeIn:{from:{opacity:0},to:{opacity:1}},modalIn:{from:{transform:"scale(0.95)",opacity:0},to:{transform:"",opacity:1}},modalOut:{to:{transform:"scale(0.95)",opacity:0}}},devices:{},class:{},svg:{},grid:{},shape:{}};var Lc={};F(Lc,{A:()=>w$,AssetPicture:()=>EM,Audio:()=>CM,Avatar:()=>W$,B:()=>KM,Block:()=>aM,Box:()=>Zm,Br:()=>XM,Bridge:()=>oN,Button:()=>k$,ButtonSet:()=>C$,COMPONENTS:()=>mi,Caption:()=>$M,Checkbox:()=>aN,CheckboxHgroup:()=>cN,Circle:()=>SM,CircleButton:()=>v$,Clickable:()=>bM,Data:()=>GM,Dialog:()=>D$,DialogFooter:()=>M$,DialogHeader:()=>I$,Dropdown:()=>b2,DropdownDisclosure:()=>S2,DropdownList:()=>_2,DropdownParent:()=>w2,DropdownParentFocus:()=>x2,DropdownSiblingFocus:()=>k2,FileIcon:()=>vN,Flex:()=>lM,Focusable:()=>_M,FocusableComponent:()=>wM,Footnote:()=>WM,Form:()=>gM,Grid:()=>uM,Gutter:()=>pM,H1:()=>RM,H2:()=>PM,H3:()=>LM,H4:()=>DM,H5:()=>IM,H6:()=>MM,Headline:()=>zM,Hgroup:()=>eN,HgroupButton:()=>rN,HgroupRows:()=>nN,Hoverable:()=>yM,Hr:()=>YM,I:()=>qM,Icon:()=>kN,IconButton:()=>T$,IconText:()=>EN,Iframe:()=>mM,Img:()=>hM,Inline:()=>cM,InlineFlex:()=>fM,InlineGrid:()=>dM,Input:()=>sN,Italic:()=>UM,KangorooButton:()=>A$,Li:()=>JM,Link:()=>Yv,Notification:()=>E2,NumberInput:()=>iN,Ol:()=>QM,P:()=>NM,Picture:()=>kM,Radio:()=>lN,RadioHgroup:()=>fN,Range:()=>K$,RouteLink:()=>S$,RouterLink:()=>Xv,SHAPES:()=>Xm,Select:()=>x$,Shape:()=>sv,Span:()=>OM,SquareButton:()=>E$,Strong:()=>FM,Subhead:()=>HM,Svg:()=>vM,Text:()=>TM,Textarea:()=>pN,TextareaWithButton:()=>hN,Theme:()=>xM,Title:()=>VM,Toggle:()=>uN,ToggleHgroup:()=>dN,Tooltip:()=>V$,TooltipHidden:()=>z$,TooltipLayer:()=>iA,TooltipParent:()=>H$,U:()=>BM,Ul:()=>ZM,Underline:()=>jM,Video:()=>AM,depth:()=>Jm,focusableRingEnabled:()=>yd,focusableRingToken:()=>rv,focusableRingValue:()=>ci,getSystemGlobalTheme:()=>bd});var QE={};F(QE,{Block:()=>aM,Flex:()=>lM,Grid:()=>uM,Gutter:()=>pM,Inline:()=>cM,InlineFlex:()=>fM,InlineGrid:()=>dM});var aM={display:"block"},cM={display:"inline"},lM={display:"flex"},fM={display:"inline-flex"},uM={display:"grid"},dM={display:"inline-grid"},pM={boxSize:"C1"};var tv={};F(tv,{Img:()=>hM});M();var hM={tag:"img",attr:{title:t=>t.title,alt:t=>t.alt!=null?t.alt:t.title||"",src:t=>{let e=_e(t);return e&&e.src||t.src},srcset:t=>{let e=_e(t);return(e?Uf(e):"")||t.srcset||t.srcSet}}};var ev={};F(ev,{Form:()=>gM});var gM={tag:"form"};var nv={};F(nv,{Iframe:()=>mM});var mM={tag:"iframe",position:"relative",minWidth:"G",minHeight:"G"};var ov={};F(ov,{Clickable:()=>bM,Focusable:()=>_M,FocusableComponent:()=>wM,Hoverable:()=>yM,focusableRingEnabled:()=>yd,focusableRingToken:()=>rv,focusableRingValue:()=>ci});var $W={appearance:"none",fontFamily:"inherit"},yM={transition:"opacity C defaultBezier, transform C defaultBezier",opacity:.85,":hover":{opacity:.9,transform:"scale(1.015)"},":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1,transform:"scale(1.015)",":hover":{opacity:1}}},bM={extends:"Hoverable",":active":{opacity:1,transform:"scale(1.015)"},".active":{opacity:1}};function yd(t){let e=t.context&&t.context.designSystem;return!e||e.focusableRing!==!1}function rv(t){let e=t.context&&t.context.designSystem,n=e&&e.focusableRing;if(typeof n=="string")return n?{outline:n,outlineOffset:void 0}:null;if(!n||typeof n!="object"||Array.isArray(n))return null;let r=n.outline||void 0,o=n.outlineOffset!=null&&n.outlineOffset!==""?n.outlineOffset:void 0;return r||o!==void 0?{outline:r,outlineOffset:o}:null}function ci(t,e,n){let r=rv(t);return r&&r[e]!==void 0?r[e]:n}var _M={border:"none",outline:t=>yd(t)?"solid 0 currentColor":"none",":focus-visible":{opacity:1,outline:t=>yd(t)?ci(t,"outline","solid X currentColor"):"none",outlineOffset:t=>yd(t)?ci(t,"outlineOffset"):void 0}},wM={extends:"Focusable",tag:"button",fontSize:"A",type:"button",border:"none",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",fontFamily:"inherit",cursor:"pointer",":disabled":{cursor:"not-allowed"},style:$W};var cv={};F(cv,{Picture:()=>kM});var av={};F(av,{Theme:()=>xM,getSystemGlobalTheme:()=>bd});var iv={};F(iv,{Circle:()=>SM,SHAPES:()=>Xm,Shape:()=>sv,default:()=>FW,depth:()=>Jm});M();var hn=P(),Jm={4:{boxShadow:`rgba(0,0,0,.10) 0 2${hn.unit.default} 4${hn.unit.default}`},6:{boxShadow:`rgba(0,0,0,.10) 0 3${hn.unit.default} 6${hn.unit.default}`},10:{boxShadow:`rgba(0,0,0,.10) 0 4${hn.unit.default} 10${hn.unit.default}`},16:{boxShadow:`rgba(0,0,0,.10) 0 8${hn.unit.default} 16${hn.unit.default}`},26:{boxShadow:`rgba(0,0,0,.10) 0 14${hn.unit.default} 26${hn.unit.default}`},42:{boxShadow:`rgba(0,0,0,.10) 0 20${hn.unit.default} 42${hn.unit.default}`}},vc=t=>dt(t.shapeDirectionColor)||dt(t.borderColor)||dt(t.backgroundColor)||dt(t.background),Ym=t=>{let e=Wu.transition(t.transition,t);return e&&e.transition},Xm={rectangle:{},circle:{borderRadius:"100%"},bubble:{},tv:{borderRadius:"1.15em/2.5em"},tooltip:t=>({position:t.position||"relative","&:before":{content:'""',display:"block",width:"0px",height:"0px",border:".35em solid",borderColor:vc(t),transition:Ym(t),transitionProperty:"border-color",position:"absolute",borderRadius:".15em"}}),tooltipDirection:{top:{"&:before":{top:"0",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},right:{"&:before":{top:"50%",right:"0",transform:"translate(50%, -50%) rotate(45deg)"}},bottom:{"&:before":{bottom:"0",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},left:{"&:before":{top:"50%",left:"0",transform:"translate(-50%, -50%) rotate(45deg)"}}},tag:t=>({position:"relative","&:before":{content:'""',display:"block",background:vc(t),transition:Ym(t),transitionProperty:"background",borderRadius:".25em",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%"}}),tagDirection:{top:{"&:before":{bottom:"100%",left:"50%",transform:"translate(-50%, 50%) rotate(45deg)"}},right:{"&:before":{top:"50%",left:"100%",transform:"translate(-50%, -50%) rotate(45deg)"}},bottom:{"&:before":{top:"100%",left:"50%",transform:"translate(-50%, -50%) rotate(45deg)"}},left:{"&:before":{top:"50%",right:"100%",transform:"translate(50%, -50%) rotate(45deg)"}}},hexagon:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",borderRadius:".25em",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",height:"73%",background:vc(t),transition:Ym(t),transitionProperty:"background"},"&:before":{left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"},"&:after":{left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}),chevron:t=>({position:"relative","&:before, &:after":{content:'""',display:"block",position:"absolute",zIndex:"-1",aspectRatio:"1/1",top:"50%",transformOrigin:"50% 50%",transition:Ym(t),transitionProperty:"background"},"&:before":{background:`linear-gradient(225deg, ${vc(t)} 25%, transparent 25%), linear-gradient(315deg, ${vc(t)} 25%, transparent 25%)`},"&:after":{background:vc(t),borderRadius:".25em"}}),chevronDirection:{left:{"&:before":{height:"100%",left:"100%",transform:"translate3d(-1%, -50%, 1px) scale(-1, 1)"},"&:after":{height:"73%",left:"0",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}},right:{"&:before":{height:"100%",left:"0",transform:"translate3d(-99%, -50%, 1px)"},"&:after":{height:"73%",left:"100%",transform:"translate3d(-50%, -50%, 1px) rotate(45deg)"}}}},sv={deps:{exec:St,getSpacingBasedOnRatio:Fe,getMediaColor:Kt},classlist:{shape:t=>t.deps.exec(Xm[t.shape],t),shapeDirection:t=>{if(!t.shape||!t.shapeDirection)return;let e=Xm[t.shape+"Direction"];return t.shape&&e?e[t.shapeDirection||"left"]:null},shapeDirectionColor:t=>{let e={borderColor:t.deps.getMediaColor(t.background||t.backgroundColor)};return t.shapeDirection?e:null}}},SM={round:"100%"},FW=sv;M();var bd=({context:t,state:e})=>{let n=e&&e.root,r=n&&n.globalTheme||t.designSystem&&t.designSystem.globalTheme;return r==="auto"?null:r},xM={deps:{depth:Jm},classlist:{depth:t=>!Xt(t.depth)&&t.deps.depth[t.depth]}};var kM={deps:{getSystemGlobalTheme:bd},tag:"picture",childExtends:{deps:{getSystemGlobalTheme:bd},tag:"source",attr:{media:t=>{let{key:e,context:n,deps:r}=t,{media:o}=n.designSystem,s=r.getSystemGlobalTheme(t),i=(t.media||e).slice(1);return i===s?"(min-width: 0px)":i==="dark"||i==="light"?"(max-width: 0px)":o[i]}}},Img:{width:"inherit",ignoreChildExtends:!0,height:"inherit",src:(t,e)=>t.parent?.src||e.src}};var lv={};F(lv,{AssetPicture:()=>EM});M();var EM={tag:"picture",children:t=>{let e=_e(t);if(e)return Vf(e,t.alt)}};var fv={};F(fv,{Svg:()=>vM});var vM={tag:"svg",attr:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},html:t=>{let{context:e}=t;if(t.semanticIcons)return;if(t.html&&typeof t.html!="function")return t.call("exec",t.html,t);let{designSystem:n,utils:r}=e,o=n&&n.svg,s=t.spriteId||n&&n.useSvgSprite,i=t.call("exec",t.src,t),a=d=>`<use xlink:href="#${d}" />`;if(typeof i=="string"){let d=i.match(/^\s*<symbol\b[^>]*\bid="([^"]+)"/);if(d){let p=d[1],g=e.document||(typeof document<"u"?document:null);if(!(g&&typeof g.getElementById=="function"&&g.getElementById(p))){let m=r&&r.scratchSystem&&r.scratchSystem.appendSVGSprite;n&&!n.__svgCache&&(n.__svgCache={}),typeof m=="function"?m({[p]:i},{document:g}):r&&typeof r.init=="function"&&r.init({svg:{[p]:i}},{document:g,emotion:e.emotion})}return a(p)}}if(!s&&i)return i;let c=t.spriteId;if(c)return a(c);if(o&&o[i])return a(i);let l=Symbol.for(i),f=o[l];if(f&&o[f])return a(f);if(!i)return a("");if(typeof i=="string"&&!i.includes("<"))return typeof console<"u"&&console.warn&&console.warn(`[Svg] Unknown sprite symbol "${i}" \u2014 not registered in design-system sprite. Set the icon name to one that exists in designSystem.icons / context.svg, or register the SVG body via utils.init({ svg: { '${i}': '<svg>...</svg>' } }).`),a("");let u=0;for(let d=0;d<i.length;d++)u=(u<<5)-u+i.charCodeAt(d)|0;return f=o[l]=`svg-${(u>>>0).toString(36)}`,r.init({svg:{[f]:i}},{document:e.document,emotion:e.emotion}),a(f)}};var uv={};F(uv,{Video:()=>AM});M();var AM={tag:"video",controls:!0,attr:{src:t=>{let e=_e(t);return e&&e.src||t.src}},children:t=>{let e=_e(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var dv={};F(dv,{Audio:()=>CM});M();var CM={tag:"audio",controls:!0,attr:{src:t=>{let e=_e(t);return e&&e.src||t.src}},children:t=>{let e=_e(t);if(!(!e||!Array.isArray(e.variants)||!e.variants.length))return e.variants.map(n=>({tag:"source",attr:{src:n.src,type:n.format}}))},childExtends:{tag:"source"}};var pv={};F(pv,{B:()=>KM,Caption:()=>$M,Data:()=>GM,Footnote:()=>WM,H1:()=>RM,H2:()=>PM,H3:()=>LM,H4:()=>DM,H5:()=>IM,H6:()=>MM,Headline:()=>zM,I:()=>qM,Italic:()=>UM,P:()=>NM,Span:()=>OM,Strong:()=>FM,Subhead:()=>HM,Text:()=>TM,Title:()=>VM,U:()=>BM,Underline:()=>jM});var TM={},OM={tag:"span"},RM={tag:"h1"},PM={tag:"h2"},LM={tag:"h3"},DM={tag:"h4"},IM={tag:"h5"},MM={tag:"h6"},NM={tag:"p"},$M={tag:"caption"},FM={tag:"strong",fontWeight:"700"},BM={tag:"u"},jM={tag:"u"},UM={tag:"i"},VM={},zM={tag:"h6",fontSize:"B",fontWeight:500},HM={tag:"span",fontSize:"Z1"},WM={tag:"span",fontSize:"Z"},KM={tag:"b"},qM={tag:"i"},GM={tag:"data"};var hv={};F(hv,{Box:()=>Zm,Br:()=>XM,Hr:()=>YM,Li:()=>JM,Ol:()=>QM,Ul:()=>ZM});var BW=t=>{if(!t.context)return;let{props:e,__ref:n}=t,r=ee(e,t,{unpack:!1});n.__class=r},Zm={extends:["Shape","Theme"],boxSizing:"border-box",onBeforeClassAssign:BW},YM={tag:"hr",margin:"C1 0"},XM={tag:"br"},JM={tag:"li"},ZM={tag:"ul",childExtends:{extends:"Li"}},QM={tag:"ol",childExtends:{extends:"Li"}};var gv={};F(gv,{Hgroup:()=>eN,HgroupButton:()=>rN,HgroupRows:()=>nN});var tN=t=>{if(t.text!=null||t.html!=null)return!0;for(let e in t){let n=e.charCodeAt(0);if(n>=65&&n<=90)return!0}return!1},eN={display:"flex",tag:"hgroup",flow:"y",gap:"Y2",H:{if:tN,color:"title",tag:"h3",lineHeight:"1em",margin:"0"},P:{if:tN,margin:"0",color:"paragraph"}},nN={extends:"Hgroup",H:{display:"flex",color:"title",align:"center space-between"},P:{color:"paragraph",align:"center space-between"}},rN={extends:"HgroupRows",H:{justifyContent:"space-between",Span:{},Button:{background:"transparent",color:"currentColor",padding:"0",Icon:{name:"x",fontSize:"C"}}},P:{}};var mv={};F(mv,{Bridge:()=>oN});var oN={tag:"div"};var yv={};F(yv,{Input:()=>sN});var sN={extends:["Focusable"],tag:"input",border:"none",theme:"field",fontSize:"A",round:"C",lineHeight:"1",padding:"Z2 B",attr:{pattern:t=>t.pattern,name:t=>t.name,placeholder:t=>t.placeholder,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e},checked:t=>t.call("exec",t.checked,t),disabled:t=>t.disabled||null,required:t=>t.required,type:t=>t.type}};var bv={};F(bv,{NumberInput:()=>iN});var iN={extends:["Flex","Input"],type:"number",boxSize:"C+X",align:"center center",textAlign:"center",round:"Y1",theme:"transparent",border:"1px solid line",placeholder:"0",fontWeight:"400","::-webkit-inner-spin-button":{appearance:"none"},attr:{step:t=>t.step,min:t=>t.min,max:t=>t.max}};var _v={};F(_v,{Checkbox:()=>aN,CheckboxHgroup:()=>cN});var aN={extends:"Focusable",tag:"label",boxSize:"fit-content fit-content",cursor:"pointer",round:"Y",Input:{type:"checkbox",position:"absolute",opacity:"0",width:"1px",height:"1px",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",":checked + div":{theme:"primary"},":checked + div > svg":{transform:"none",opacity:"1"},":focus-visible + div":{outline:t=>ci(t,"outline","solid X currentColor"),outlineOffset:t=>ci(t,"outlineOffset","Z")},attr:{checked:t=>t.call("exec",t.parent.checked)}},Flex:{align:"center center",fontSize:"B1",padding:"V",theme:"field",round:"X2",transition:"background A defaultBezier",Icon:{icon:"check",opacity:"0",transform:"scale(0.9) rotate(-15deg)",transition:"opacity B defaultBezier"}}},cN={display:"flex",tag:"label",boxSize:"fit-content",align:"flex-start flex-start",gap:"A",Checkbox:{tag:"div"},HgroupRows:{gap:"Z1",margin:"Y - - -"}};var wv={};F(wv,{Radio:()=>lN,RadioHgroup:()=>fN});var lN={extends:"Checkbox",Input:{type:"radio",":checked + div:after":{opacity:"1"}},Flex:{round:"100%",padding:"Y",":after":{content:'""',display:"block",boxSize:"X+W1",round:"100%",background:"white",opacity:"0",transition:"opacity .15s ease-in-out"},Icon:null}},fN={extends:"CheckboxHgroup",Checkbox:null,Radio:{}};var Sv={};F(Sv,{Toggle:()=>uN,ToggleHgroup:()=>dN});var uN={extends:"Checkbox",Input:{role:"switch",":checked + div":{background:"green2+8",justifyContent:"flex-end"}},Flex:{boxSize:"A1 B1",padding:"- W_default",round:"D",align:"center flex-start",theme:"field",border:"none",transition:"opacity .15s ease",":after":{content:'""',boxSize:"A A",round:"100%",background:"white",boxShadow:"gray.2 1px 1px Z"},Icon:null}},dN={extends:"CheckboxHgroup",Checkbox:null,Toggle:{}};var xv={};F(xv,{Textarea:()=>pN,TextareaWithButton:()=>hN});var pN={tag:"textarea",extends:["Input","Flex"],fontfamily:"Avenir",placeholder:"Leave us a message...",padding:"A",theme:"field",border:"none",minHeight:"E_default",width:"100%",height:"E1_default",fontFamily:"inherit",round:"Z2",lineHeight:1.4,".outlined":{borderWidth:"1px",borderStyle:"solid"}},hN={display:"flex",gap:"Y2",Textarea:{height:"C2+W",minWidth:"H",padding:"A",fontSize:"Z1",round:"Z2",minHeight:"fit-content"},SquareButton:{background:"blue",Icon:{name:"send"}}};var vv={};F(vv,{FileIcon:()=>vN,Icon:()=>kN,IconText:()=>EN});Mt();var gN=new Set,jW=t=>t==="icon"?"build.treeShakeIcons":"build.treeShakeComponents",mN=(t,e,n)=>{let r=t+":"+e;if(gN.has(r)||(gN.add(r),typeof console>"u"||!console.error))return;let o=n&&n.__ref&&n.__ref.path,s=o&&o.length?` (at <${o.join(".")}>)`:"",i=jW(t);console.error(`[smbls] ${t==="icon"?"Icon":"Component"} "${e}"${s} is not in this build: symbols.json ${i} left it out because the project source never names it. Add "${e}" to ${i}.keep.`)};var UW=new Set;var yN=t=>UW.has(t);var bN=new Set,_N=(t,e)=>{if(!bN.has(t)&&(bN.add(t),typeof console<"u"&&console.warn)){let n=e&&e.__ref&&e.__ref.path,r=n&&n.length?` at <${n.join(".")}>`:"";console.warn(`[Icon] Unknown icon name "${t}"${r} \u2014 not registered in designSystem.icons, rendering the noIcon placeholder. Fix the name or register the icon in the design system.`)}},wN=(t,e)=>{let n=t.find(r=>r&&yN(r));return n?(mN("icon",n,e),!0):!1},SN=new WeakMap,VW=t=>{let e=SN.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},SN.set(t,e)),e},zW=(t,e)=>{if(!t)return null;let n=t.default||t;return typeof n=="string"?n.trim()?{[e]:n}:null:typeof n=="object"&&!Array.isArray(n)&&Object.keys(n).length?n:null},HW=(t,e,n)=>{let r=n&&n.context&&n.context.document||(typeof document<"u"?document:null);mt(t);try{let o=P();o&&!o.__svgCache&&(o.__svgCache={}),t.__svgCache||(t.__svgCache={});let s={};for(let i in e){let a=Vs(e[i],i);a&&(t.icons[i]=a,s[i]=a)}return t.useIconSprite&&r&&Object.keys(s).length&&zs(s,{document:r}),Object.keys(s).length>0}finally{ht()}},WW=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=VW(s);if(a.failed.has(e))return!1;let c=a.waiting.get(e);if(c||(c=new Set,a.waiting.set(e,c)),c.add(o),a.pending.has(e))return!0;let l=()=>i(e,t),f=Promise.resolve().then(l).then(u=>{let d=zW(u,n);return d?HW(s,d,r):!1}).catch(u=>(typeof console<"u"&&console.error&&console.error(`[Icon] iconsLoader failed for "${e}":`,u),!1)).then(u=>{a.pending.delete(e);let d=a.waiting.get(e);a.waiting.delete(e),u||a.failed.add(e),d&&d.forEach(p=>{try{p(u)}catch(g){console.error("[Icon] repaint error:",g)}})});return a.pending.set(e,f),!0},KW="0 0 24 24",qW=/<(symbol|svg)\b[^>]*>/i,GW={viewBox:/\sviewBox\s*=\s*(?:"([^"]*)"|'([^']*)')/i,width:/\swidth\s*=\s*(?:"([^"]*)"|'([^']*)')/i,height:/\sheight\s*=\s*(?:"([^"]*)"|'([^']*)')/i},kv=(t,e)=>{let n=t.match(GW[e]);return n?n[1]!==void 0?n[1]:n[2]:void 0},xN=t=>{let e=typeof t=="string"&&t.match(/^\s*(\d*\.?\d+)\s*(?:px)?\s*$/);return e?Number(e[1]):void 0},YW=(t,e)=>{if(typeof t!="string")return;let n=t.match(qW);if(!n)return;let r=(kv(n[0],"viewBox")||"").trim().split(/[\s,]+/).map(Number),o=r.length===4&&r[2]>0&&r[3]>0?[r[2],r[3]]:void 0,s=xN(kv(n[0],"width")),i=xN(kv(n[0],"height")),a=s>0&&i>0?[s,i]:void 0,c=n[1].toLowerCase()==="symbol"||e?o||a:a||o;return c?`0 0 ${c[0]} ${c[1]}`:void 0},Ev=t=>{let e=t.call("exec",t.viewBox,t);if(e)return e;let n=t.context&&t.context.designSystem,r=!!(t.spriteId||n&&n.useSvgSprite);return YW(t.call("exec",t.src,t),r)||KW},kN={extends:"Svg",width:"A",height:"A",display:"inline-block",style:{fill:"currentColor","*":{fill:"currentColor"}},onInit:(t,e,n)=>{let{parent:r}=t,{icons:o,useIconSprite:s,verbose:i}=n&&n.designSystem,{toCamelCase:a}=n&&n.utils,c=!1,l=(h,m)=>{try{return{value:t.call("exec",h,m)}}catch(y){if(t.__ref&&(t.__ref.__iconNameError=y),!c&&typeof console<"u"&&console.warn){c=!0;let x=t.__ref&&t.__ref.path,E=x&&x.length?` at <${x.join(".")}>`:"";console.warn(`[Icon] name/icon factory threw${E} \u2014 treated as no name (a painted glyph stays):`,y&&y.message||y)}return{threw:!0}}},f=(h,m)=>{let{semanticIcons:y}=m&&m.designSystem,{toCamelCase:x}=m&&m.utils,C=x(h).split(/([a-z])([A-Z])/g),_=C[1]?C[0]:h.split(".")[0].split(" ")[0],b=y&&y[_];if(b){let w=h.includes(".")?"sfsymbols."+h.split(".").slice(1).join("."):"sfsymbols";return h=b[w]||b[h.split(".")[0].split(" ")[0]],{tag:"span",semanticIcons:!0,width:"A",height:"A",lineHeight:"1em",":after":{fontSize:"Z",fontWeight:"300",content:`"${h}"`,textAlign:"center",display:"inline-block",style:{color:"currentColor",fontFamily:"'SF Pro Icons', 'SF Pro', 'SF Symbols', 'Segoe UI'"}}}}},u=h=>{let{key:m}=h,y=l(h.name||h.icon||m,h);if(y.threw)return{name:m,threw:!0};let x=y.value;return h.call("isString",x)&&x.includes("{{")&&(x=h.call("replaceLiteralsWithObjectFields",x)),{name:h.call("isString",x)?x:m}},d=t.src,p,g=()=>{let h=u(t);if(h.threw&&t.node&&t.node.innerHTML)return;let m=h.name,y=m;if(m.includes(" ")){let $=m.split(" ");m=$[0]+$.slice(1).map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join("")}let x=a(m),E=x.split(/([a-z])([A-Z])/g),C=f(y,n);if(C){Object.assign(t,C);return}let _,b=t[".isActive"];b&&(b.name||b.icon)&&t.isActive&&(_=l(b.name||b.icon,t).value);let w=r&&r[".isActive"];w&&w.icon&&r.isActive&&(_=l(w.icon||w.Icon.name||w.Icon.icon,t).value),t.call("isString",_)&&_.includes("{{")&&(_=t.call("replaceLiteralsWithObjectFields",_));let S;o[_]&&(S=_),o[x]?S=x:o[E[0]+E[1]]?S=E[0]+E[1]:o[E[0]]?S=E[0]:i&&t.warn("Can't find icon:",m,S);let A=o[S],T=r&&r.src||d;!A&&!T&&(WW(n,y,x,t,N=>{if(!(p&&p._disposed)){if(!N)return globalThis.__SMBLS_BUILD_DROP_ICONS__&&wN([_,x,E[0]+E[1],E[0]],t)||_N(y,t);g()}})||globalThis.__SMBLS_BUILD_DROP_ICONS__&&wN([_,x,E[0]+E[1],E[0]],t)||_N(y,t));let O=s&&S,B=A||T||o.noIcon;if(!(t.spriteId===O&&t.src===B&&t.node&&t.node.innerHTML)){if(t.spriteId=O,t.src=B,typeof t.html=="function"&&t.node){let $=t.context&&t.context.designSystem;$&&mt($);try{let N=t.html(t,t.state,t.context);N!=null&&typeof N!="function"&&(t.node.innerHTML=N)}finally{$&&ht()}}t.node&&t.attr&&t.attr.viewBox===Ev&&t.node.setAttribute("viewBox",Ev(t))}};p=K(g,{depth:t.__ref&&t.__ref.path&&t.__ref.path.length||0}),t.__ref&&(t.__ref.__effects||(t.__ref.__effects=[]),t.__ref.__effects.push(p))},attr:{viewBox:Ev,"aria-hidden":t=>t.ariaLabel||t.role==="img"?null:"true",focusable:"false"}},EN={display:"flex",align:"center center",lineHeight:1,".reversed":{flow:"row-reverse"},".vertical":{flow:"column"},Icon:{if:t=>{let{parent:e}=t,n=t.call("exec",t.icon,t);return t.call("exec",n||e.icon||t.name||t.sfSymbols||e.sfSymbols,t)},icon:t=>t.call("exec",t.parent.icon,t.parent)},text:t=>t.text},vN={display:"flex",theme:"tertiary",boxSize:"C1",align:"center center",round:"Z2",Icon:{fontSize:"B",margin:"auto",icon:"file"}};var Jv={};F(Jv,{A:()=>w$,Link:()=>Yv,RouteLink:()=>S$,RouterLink:()=>Xv});var Tc={};F(Tc,{default:()=>N8,getActiveRoute:()=>Gv,lastLevel:()=>oy,lastPathname:()=>Cc,loadLazy:()=>Uv,matchRoute:()=>Wv,parseQuery:()=>Kv,parseRoutePattern:()=>ry,resolveRouterElement:()=>Ad,router:()=>Dn,runGuards:()=>g$,saveScrollPosition:()=>Sd});M();var Av="__smblsRouter",Cv=new WeakMap,XW=0,Tv=()=>Date.now().toString(36)+(++XW).toString(36)+Math.random().toString(36).slice(2,6),Ov=t=>{try{let e=t&&t.history;if(e&&typeof e.pushState=="function"&&typeof e.replaceState=="function"&&typeof e.go=="function")return e}catch{}return null},Vr=t=>{try{return t.state}catch{return}},wd=t=>{try{let{pathname:e,search:n,hash:r}=t.location;return e+n+r}catch{return null}},ON=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;let e=Object.getPrototypeOf(t);return e===null||Object.getPrototypeOf(e)===null},RN=t=>{let e=ON(t)?t[Av]:null;return e&&typeof e.key=="string"&&typeof e.chain=="string"&&Number.isInteger(e.index)?e:null},Rv=(t,e)=>t==null?{[Av]:e}:ON(t)?{...t,[Av]:e}:null,Pv=()=>({key:Tv(),index:0,chain:Tv()}),Ac=(t,e)=>{let n=RN(e);return{key:n?n.key:null,index:n?n.index:null,chain:n?n.chain:null,url:wd(t),state:e}},PN=(t,e)=>{let n=RN(t);return e.key?!!n&&n.key===e.key:!n&&t===e.state},_d=(t,e,n)=>!!n&&wd(t)===n.url&&PN(e,n),Lv=(t,e,n)=>({...t,url:e,state:n}),Dv=(t,e)=>{let n=Vr(e),r=Ac(t,n);if(r.key)return r;let o=Pv(),s=Rv(n,o);if(!s)return r;try{e.replaceState(s,null)}catch{return r}return Lv(o,r.url,s)},JW=(t,e)=>{let n=Cv.get(t);return!n&&e&&(n={current:null,pending:null,expect:null,seq:0,pops:new WeakMap,positions:null,scrollNode:null,restore:null},Cv.set(t,n)),n||null},LN="smbls.router.scroll",AN=100,ZW=1e3,CN=["wheel","touchstart","keydown","pointerdown"],DN=t=>{try{return t.sessionStorage||null}catch{return null}},IN=t=>{try{let e=JSON.parse(t.getItem(LN)||"[]");return Array.isArray(e)?e.filter(n=>Array.isArray(n)&&typeof n[0]=="string"):[]}catch{return[]}},MN=(t,e)=>{if(!t.positions){t.positions=new Map;let n=DN(e);if(n)for(let[r,o]of IN(n))o&&Number.isFinite(o.top)&&Number.isFinite(o.left)&&t.positions.set(r,{top:o.top,left:o.left})}return t.positions},Iv=(t,e,n,r)=>{let o=MN(t,e);o.delete(n),o.set(n,{top:Math.round(Number(r.scrollTop)||0),left:Math.round(Number(r.scrollLeft)||0)}),o.size>AN&&o.delete(o.keys().next().value);let s=DN(e);if(s)try{let i=new Map(IN(s));for(let[a,c]of o)i.delete(a),i.set(a,c);s.setItem(LN,JSON.stringify(Array.from(i).slice(-AN)))}catch{}},TN=(t,e,n)=>{(!e||e.visibilityState!=="hidden")&&typeof t.requestAnimationFrame=="function"?t.requestAnimationFrame(n):typeof t.setTimeout=="function"?t.setTimeout(n,16):setTimeout(n,16)},QW=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:ZW,c=()=>Math.max(0,(Number(o.scrollHeight)||0)-(Number(o.clientHeight)||0)),l=(h,m)=>{typeof o.scrollTo=="function"?o.scrollTo({top:h,left:m,behavior:"instant"}):(o.scrollTop=h,o.scrollLeft=m)},f=typeof t.addEventListener=="function",u=()=>r.end("visitor");if(r.end=h=>{if(!r.outcome&&(r.outcome=h,f))for(let m of CN)t.removeEventListener(m,u,!0)},c()>=s.top-1)return l(s.top,s.left),r.end("placed");Number(o.scrollTop)>0&&l(0,0);let d=Number(o.scrollTop)||0,p=Date.now();if(f)for(let h of CN)t.addEventListener(h,u,{capture:!0,passive:!0});let g=()=>{if(r.outcome)return;if(n.seq!==r.seq)return r.end("overtaken");if(Math.abs((Number(o.scrollTop)||0)-d)>1)return r.end("visitor");let h=c()>=s.top-1;if(!h&&Date.now()-p<a)return TN(t,e,g);l(Math.min(s.top,c()),s.left),r.end(h?"placed":"clamped")};TN(t,e,g)},t8=(t,e)=>{let{win:n,history:r,track:o}=t,s=o.pops.get(e);if(s)return s;let i=Ac(n,Vr(r)),a=o.expect;o.expect=null;let c;if(a&&i.key===a.key&&i.url===a.url)c={echo:!0};else{let l=o.current,f=!!(i.key&&l&&l.key===i.key),u=f?null:l;u&&u.key&&t.scrollNode&&Iv(o,n,u.key,t.scrollNode),c={to:i,from:u,stay:f,seq:o.seq,settled:!1,committed:!1},o.pending=c}return o.pops.set(e,c),c},e8=t=>{let{win:e,history:n,track:r}=t,o=Vr(n);if(r.pending&&_d(e,o,r.pending.to)||r.expect&&_d(e,o,r.expect.away))return;let s=r.current;if(s&&(s.key?PN(o,s):_d(e,o,s))){s.url=wd(e),s.state=o;return}r.current=t.restore?Dv(e,n):Ac(e,o),r.pending=null,r.seq++},NN=(t,e,n)=>{let r=e.scrollRestoration==="restore",o=Ov(t),s=r||Array.isArray(e.guards)&&e.guards.length>0,i=o&&JW(o,s);if(!i)return null;let a={win:t,history:o,track:i,restore:r,scrollNode:r&&n?n:null,pop:null};a.scrollNode&&(i.scrollNode=a.scrollNode);let c=e.event;return c&&c.type==="popstate"?a.pop=t8(a,c):e8(a),a},Qm=(t,e)=>{e.settled=!0,t.pending===e&&(t.pending=null)},Mv=t=>{let e=t&&t.pop;if(!e||e.echo)return!0;if(e.settled)return e.committed;let{win:n,history:r,track:o}=t;return Qm(o,e),o.seq!==e.seq||!_d(n,Vr(r),e.to)?!1:(o.current=t.restore&&!e.to.key?Dv(n,r):e.to,o.seq++,e.committed=!0,!0)},$N=t=>{let e=t&&t.pop;e&&!e.echo&&!e.settled&&Qm(t.track,e)},n8=(t,e,n)=>{try{t.addEventListener("popstate",()=>{e.expect===n&&(e.expect=null)},{once:!0})}catch{}},Nv=(t,e)=>{let n=t&&t.pop;if(!n||n.echo||n.settled)return;let{win:r,history:o,track:s}=t;Qm(s,n);let i=n.from;if(!i||s.seq!==n.seq||!_d(r,Vr(o),n.to))return;let a=n.to;if(!e&&i.key&&a.key&&i.chain===a.chain&&i.index!==a.index){let f=s.expect={key:i.key,url:i.url,away:a};n8(r,s,f);try{o.go(i.index-a.index)}catch{s.expect=null}return}let c=Pv(),l=Rv(i.state,c);try{o.replaceState(l||i.state,null,i.url)}catch{return}s.current=l?Lv(c,i.url,l):Ac(r,Vr(o)),s.seq++},FN=(t,e)=>{let n=wd(e);t&&n!==null&&(t.__routerAddress=n)},$v=(t,e,n)=>{let r=t&&t.pop;if(r&&!r.echo&&r.from)return Nv(t,!0);r&&!r.settled&&Qm(t.track,r);let o=Ov(n),s=e&&e.__routerAddress;if(!(!o||!s||s===wd(n)))try{o.replaceState(Vr(o),null,s)}catch{}},BN=(t,e,n,r,o=t&&t.win)=>{if(!t){try{r?o.history.replaceState(e,null,n):o.history.pushState(e,null,n)}catch{}return}let{history:s,track:i}=t,a=i.current;!r&&a&&a.key&&t.scrollNode&&Iv(i,o,a.key,t.scrollNode);let c=r?Ac(o,Vr(s)):Dv(o,s),l=c.key?r?{key:c.key,index:c.index,chain:c.chain}:{key:Tv(),index:c.index+1,chain:c.chain}:Pv(),f=Rv(e,l);try{r?s.replaceState(f||e,null,n):s.pushState(f||e,null,n)}catch{return}i.current=f?Lv(l,n,f):Ac(o,Vr(s)),i.pending=null,i.expect=null,i.seq++},jN=(t,e,n,r)=>{if(!t||!t.restore||!e)return!1;let o=t.pop;if(o?o.stay||!o.committed:!n.initialRender)return!1;let{win:s,track:i}=t,a=i.current,c=a&&a.key&&MN(i,s).get(a.key);if(!c)return!1;let l=i.restore;return!!l&&l.key===a.key&&(o?l.pop===o:!l.pop&&l.seq===i.seq)&&l.outcome==="visitor"||QW(s,r,i,{key:a.key,pop:o,seq:i.seq,outcome:null},e,c,n.scrollRestoreTimeout),!0},Sd=t=>{let e=Ov(t),n=e&&Cv.get(e);!n||!n.scrollNode||!n.current||!n.current.key||Iv(n,t,n.current.key,n.scrollNode)};M();var HN=["components","functions","methods","snippets"],WN=new Set(["pages",...HN]),Fv=new Set(["default","__esModule"]),Bo=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Ht=t=>!!t&&typeof t=="object"&&!Array.isArray(t),ty=new WeakMap,UN=new WeakMap,Bv=new WeakMap,VN=new Set,li=(t,e=console.warn)=>{VN.has(t)||(VN.add(t),e(t))},KN=t=>Ht(t&&t.lazy),qN=(t,e)=>{let n=t&&t.lazy;return Ht(n)&&Bo(n,e)?n[e]:void 0},kd=(t,e)=>{let n=qN(t,e);return Ht(n)&&Bo(n,"load")?n.load:n},r8=(t,e)=>{let n=qN(t,e);return Ht(n)&&typeof n.when=="function"?n.when:null},o8=t=>{let e=new Error(`[smbls/router] lazy group "${t}" waits: its \`when\` said false \u2014 nothing was requested`);return e.code="LAZY_WAITING",e},jv=(t,e)=>{let n=ty.get(t);n||(ty.set(t,n=new Map),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{for(let o of n.values())o.disposed=!0,o.waiting.clear();ty.delete(t)}));let r=n.get(e);return r||(r={status:"idle",attempts:0,promise:null,failure:null,disposed:!1,pages:null,waiting:new Set,maps:new Set},n.set(e,r)),r},GN=(t,e)=>!KN(e)||!Ht(t)||!Bo(t,"lazy")?null:typeof t.lazy=="string"&&t.lazy?t.lazy:null,ny=t=>!globalThis.__SMBLS_BUILD_DROP_F_lazyRoutes__&&!!t&&typeof t=="object"&&Bv.has(t),YN=(t,e)=>(t&&t.lazy&&typeof t.lazy=="object"&&qt("lazyRoutes",e),null),XN=t=>t&&(t.status==="error"||t.status==="reload"||t.status==="waiting")?t.status:"loading",s8=(t,e)=>typeof kd(t,e)!="function"?"error":XN(ty.get(t)?.get(e)),i8=(t,e)=>{let n=UN.get(t);if(n&&n.group===e)return n;let{lazy:r,state:o,...s}=t,i=o==null||Ht(o)||typeof o=="function";i?s.state=(c,l)=>{let f=typeof o=="function"?o(c,l):o;return{...Ht(f)?f:null,lazyStatus:s8(c.context,e)}}:(s.state=o,tt()&&li(`[smbls/router] the placeholder of lazy group "${e}" binds its state to a path (${JSON.stringify(o)}), so it gets no \`lazyStatus\` \u2014 give it its own state object to show a load failure.`));let a={definition:s,group:e,hasStatus:i};return UN.set(t,a),Bv.set(s,a),a},a8=t=>t.__ref&&t.__ref.contentElementKey||"content",xd=(t,e)=>{let n=t&&t.__ref&&t.__ref.__routerRendered,r=n&&ny(n.content)?Bv.get(n.content):null;return!r||r.group!==e?null:{record:r,page:t[a8(t)]}},ey=(t,e,n)=>{let r=xd(t,e);if(!r||!r.record.hasStatus)return;let o=r.page&&r.page.state;if(!(!o||typeof o.update!="function"||o.lazyStatus===n))try{o.update({lazyStatus:n})}catch(s){console.error(`[smbls/router] lazy group "${e}": could not show the "${n}" status on its placeholder`,s)}},c8=t=>Ht(t)?!Object.keys(t).some(n=>WN.has(n))&&Ht(t.default)?t.default:t:{},l8=t=>{let e={};if(!Ht(t))return e;for(let n of Object.keys(t)){if(Fv.has(n))continue;let r=n.charCodeAt(0)===47,o=r?n:"/"+(n==="index"?"":n);(r||!Bo(e,o))&&(e[o]=t[n])}return e},JN=(t,e,n,r,o)=>{if(!Ht(t))return 0;let s=0;for(let i of Object.keys(t))GN(t[i],r)===e&&(s++,Bo(n,i)?t[i]=n[i]:delete t[i]);for(let i of Object.keys(n))Bo(t,i)?t[i]!==n[i]&&o.push(`pages['${i}']`):t[i]=n[i];return s},zN=(t,e,n)=>{let r=t[e];if(!Ht(r)){t[e]={...n};return}try{for(let o in n)r[o]=n[o];if(Object.keys(n).every(o=>r[o]===n[o]))return}catch{}t[e]={...r,...n}},f8=t=>{let e=t.__ref&&t.__ref.origin;if(!Ht(e))return[];let n=[].concat(e.extends||[],e.extend||[]);if(n.length)return n.filter(s=>typeof s=="string").map(s=>(s.includes(">")?s.split(">")[0]:s).trim());let r=t.key;if(typeof r!="string"||!/^[A-Z]/.test(r))return[];let o=[r.indexOf("_"),r.indexOf(".")].filter(s=>s>0);return[o.length?r.slice(0,Math.min(...o)):r]},u8=(t,e,n,r)=>{let o=new Set;for(let i of r.waiting){let a=xd(i,e);a&&a.page&&o.add(a.page)}let s=i=>{let a=i&&i.__ref&&i.__ref.__children;if(Array.isArray(a))for(let c of a){let l=i[c];if(!(!l||!l.__ref||o.has(l)||!l.node)){for(let f of f8(l)){if(!n.has(f))continue;let u=(l.__ref.path||[l.key]).join(" \u203A ");li(`[smbls/router] lazy group "${e}": ${u} was built before the group loaded, so it renders without "${f}". A built element never takes a later registration \u2014 build it after el.call('loadLazy', '${e}') resolves (an \`if:\` gate does that), or keep "${f}" out of the group.`)}s(l)}}};s(t)},d8=(t,e,n,r)=>{let o=t.context,s=c8(n),i=tt(),a=[],c=new Set;if(i)for(let p of Object.keys(s))WN.has(p)||Fv.has(p)||li(`[smbls/router] lazy group "${e}" exports \`${p}\`, which a lazy group cannot add \u2014 it adds pages, components, functions, methods and snippets only. Declare the rest with the app.`);let l=!1;for(let p of HN){let g=s[p];if(!Ht(g))continue;let h=Ht(o[p])?o[p]:{},m={};for(let x of Object.keys(g))if(!Fv.has(x)){if(Bo(h,x)){h[x]!==g[x]&&a.push(`${p}.${x}`);continue}m[x]=g[x]}let y=Object.keys(m);if(y.length&&(zN(o,p,m),p==="components"&&y.forEach(x=>c.add(x)),p==="methods"&&(l=!0),(p==="functions"||p==="snippets")&&Ht(o.utils))){let x={};for(let E of y)Bo(o.utils,E)||(x[E]=m[E]);Object.keys(x).length&&zN(o,"utils",x)}}l&&uc(o);let f=l8(s.pages);r.pages=f;let u=null;try{u=typeof t.getRoot=="function"?t.getRoot():null}catch{}let d=new Set;Ht(o.pages)&&d.add(o.pages),u&&Ht(u.routes)&&d.add(u.routes);for(let p of r.maps)d.add(p);for(let p of r.waiting)Ht(p.routes)&&d.add(p.routes);for(let p of d)JN(p,e,f,o,a);i&&a.length&&li(`[smbls/router] lazy group "${e}" redefines ${a.join(", ")}, which the app already has \u2014 the app's own value stays. Rename them: frank refuses the same collision at \`smbls push\`.`),i&&c.size&&u&&u8(u,e,c,r)},ZN=(t,e)=>{let n=t&&t.__ref,r=n&&n.__lazyRoute;if(!r||r.group!==e||(n.__lazyRoute=null,typeof t.set!="function")||!xd(t,e))return;let o=()=>r.rerender({pushState:!1,replace:!1,scrollToTop:!1,guards:[],lazy:{group:e,status:"loaded"}});Promise.resolve().then(o).catch(s=>console.error(`[smbls/router] lazy group "${e}" loaded, but its route failed to render`,s))},Ed=t=>!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function",p8=(t,e,n)=>!!t&&(Ed(e)&&e===t.returned||!!n&&typeof n=="object"&&n===t.error),QN=(t,e)=>{let n=t.context,r=jv(n,e);if(r.status==="loading"||r.status==="loaded")return r.promise;let o=kd(n,e),s=r8(n,e),i=r.failure;r.status="loading";let a,c=!1,l=!1,f=()=>s?s(t):!0,u=p=>{if(p===!1)throw l=!0,o8(e);return a=o(r.attempts++)},d=Promise.resolve().then(f).then(u).then(p=>{c=!0,r.disposed||d8(t,e,p,r)}).then(()=>{r.status="loaded",r.failure=null;let p=[...r.waiting];r.waiting.clear();for(let g of p)ZN(g,e)},p=>{if(l){if(r.status="waiting",r.promise=null,r.disposed)throw p;for(let h of[...r.waiting])xd(h,e)?ey(h,e,"waiting"):r.waiting.delete(h);throw p}let g=!c&&p8(i,a,p);if(r.failure=c?null:{returned:a,error:p},r.status=g?"reload":"error",r.promise=null,r.disposed)throw p;g?li(`[smbls/router] lazy group "${e}" cannot load in this page: its loader handed back the import that already failed (the same promise or the same error) and requested nothing \u2014 a bundler that keeps a failed dynamic import (parcel) does this. Its routes show their placeholder with lazyStatus 'reload'; reloading the page loads the group.`,h=>console.error(h,p)):console.error(`[smbls/router] lazy group "${e}" failed to load. Its routes show their placeholder with lazyStatus 'error'; the next navigation to one of them, or loadLazy('${e}'), calls the group's loader again.`,p);for(let h of[...r.waiting])xd(h,e)?ey(h,e,r.status):r.waiting.delete(h);throw p});d.catch(()=>{}),r.promise=d;for(let p of r.waiting)ey(p,e,"loading");return d},t$=(t,e,n)=>{let r=e&&e.context;if(globalThis.__SMBLS_BUILD_DROP_F_lazyRoutes__)return YN(r,e);let o=GN(t,r);if(!o)return null;let s=jv(r,o);if(Ht(n)&&s.maps.add(n),s.status==="loaded"&&JN(n,o,s.pages||{},r,[])>0)return{rematch:!0};let i=typeof kd(r,o)=="function";return i?QN(e,o):li(`[smbls/router] a route names lazy group "${o}", which context.lazy does not declare as a loader (\`lazy: { ${o}: () => import('./\u2026') }\`) \u2014 it shows its placeholder in the error state.`,console.error),{content:i8(t,o).definition,group:o,status:i?"loading":"error"}},e$=(t,e,n)=>{if(globalThis.__SMBLS_BUILD_DROP_F_lazyRoutes__||!e||!e.group||e.status==="error")return;let r=t.context,o=t.__ref;if(!o||typeof kd(r,e.group)!="function")return;let s=jv(r,e.group);if(o.__lazyRoute={group:e.group,rerender:n},ey(t,e.group,XN(s)),s.status==="loaded"){let i=()=>ZN(t,e.group);Promise.resolve().then(i);return}s.waiting.add(t)};function Uv(t){let e=this,n=e&&e.context;if(!n)return Promise.reject(new TypeError("[smbls/router] loadLazy runs on an element: el.call('loadLazy', name)"));if(globalThis.__SMBLS_BUILD_DROP_F_lazyRoutes__)return Promise.resolve(YN(n,e));let r=kd(n,t);return typeof r!="function"?(r===void 0&&KN(n)&&tt()&&li(`[smbls/router] loadLazy('${t}'): context.lazy declares no group "${t}" \u2014 nothing to load.`),Promise.resolve()):QN(e,t)}var h8=(t,e,n)=>({...t.context&&t.context.domqlOptions,...e.mountOptions,contentElementKey:n}),n$=(t,e,n)=>{let r=n.mountOptions;if(!r)return;let o=e.context&&e.context.domqlOptions;for(let s in r)t[s]=o&&s in o?o[s]:void 0},l$=t=>{let e=sr;return typeof e=="function"?e(t.mountYield)>0:t.mountYield===!0},g8=t=>{let e=t&&t.context&&t.context.__hydration;return!!e&&e.adopted>0},m8=t=>{let e=Wm;return typeof e!="function"||!e(t)?null:Ur(t)},Hv=Object.freeze({holdTail:!0}),y8=t=>typeof t.holdPage=="function"&&typeof He=="function",f$=(t,e)=>{let n=()=>He(t);Ed(e)?e.then(n,n):n()},b8=(t,e)=>{let n=null;try{n=t.holdPage(e)}catch{}f$(e,n)},u$=Object.freeze({holdTail:!0,deferAttach:!0}),_8=(t,e,n,r)=>{let o=t.firstView;if(!o||typeof He!="function"||typeof Io!="function")return null;if(!o.committed)return Hv;if(!l$(r))return null;let s=e.node;return!e[n]&&s&&s.isConnected?u$:(r.mountYield=void 0,null)},w8=async()=>{await Ce();let t=$o;if(typeof t=="function")for(;!t();)await Ce()},S8=(t,e,n,r)=>{if(e===Hv){t.firstView.page=n,f$(n,t.firstView.commit);return}e===u$&&w8().then(()=>{n.__ref&&r()&&Io(n),He(n)})},d$=/^:(.+)/,p$=/^\*$/,r$=new Map,ry=t=>{let e=r$.get(t);if(e)return e;let n=t.replace(/^\//,"").split("/"),r=[],o=!1;for(let i=0;i<n.length;i++){let a=n[i].match(d$);a?r.push({index:i,name:a[1]}):p$.test(n[i])&&(o=!0)}let s={segments:n,params:r,hasWildcard:o,pattern:t};return r$.set(t,s),s},Wv=(t,e,n=0)=>{let o=t.replace(/^\//,"").split("/").filter(Boolean).slice(n),s="/"+(o[0]||"");if(!e)return{key:null,content:null,params:{},routePath:s};let i=null,a=-1,c={};for(let l in e){if(l==="/*")continue;let f=ry(l),u=x8(o,f);u>a&&(a=u,i=l,c=h$(o,f))}return!i&&e["/*"]&&(i="/*"),{key:i,content:i?e[i]:null,params:c,routePath:s}},x8=(t,e)=>{let{segments:n,hasWildcard:r}=e;if(!r&&n.length!==t.length&&n.length!==1&&n.length>t.length)return-1;let o=0,s=Math.min(n.length,t.length);for(let i=0;i<s;i++)if(n[i]===t[i])o+=3;else if(d$.test(n[i]))o+=1;else if(p$.test(n[i]))o+=.5;else return-1;return o},h$=(t,e)=>{let n={};for(let{index:r,name:o}of e.params)t[r]&&(n[o]=decodeURIComponent(t[r]));return n},Kv=t=>{if(!t||t==="?")return{};let e={};return new URLSearchParams(t).forEach((r,o)=>{e[o]!==void 0?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(r)):e[o]=r}),e},zv=t=>!!t&&typeof t=="object"&&typeof t.route=="string",o$=t=>t===!1||typeof t=="string"||zv(t)?t:void 0,k8=10,qv=(t,e,n=0)=>{for(let r=n;r<t.length;r++){let o=t[r](e);if(Ed(o))return Promise.resolve(o).then(i=>{let a=o$(i);return a===void 0?qv(t,e,r+1):a});let s=o$(o);if(s!==void 0)return s}return!0},g$=async(t,e)=>!t||!t.length?!0:qv(t,e),s$=(t,e,n,r)=>{if(typeof t!="string"||!n||!Object.prototype.hasOwnProperty.call(n,t))return null;let o=n[t];if(!o)return null;let s=e.replace(/^\//,"").split("/").filter(Boolean).slice(r||0);return{route:t,content:o,params:t==="/*"?{}:h$(s,ry(t))}},Ad=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},E8=(t,e)=>{let n=e.customRouterElement;if(!n||!t.__ref||t.__ref.root!==t)return t;let r=Ad(t,n);return!r||r===t?t:(t.routes&&(r.routes=t.routes),r)},Gv=(t=0,e)=>{e||(e=typeof R<"u"?R.location.pathname:"/");let r=e.split("/")[t+1];if(r)return`/${r}`},Cc,oy=0,i$=0,Vv=t=>!t||t==="srcdoc"||t==="about:srcdoc"?"/":t,v8=t=>t&&(t.scrollingElement||t.documentElement)||null,m$={level:oy,pushState:!0,replace:!1,initialRender:!1,scrollToTop:!0,scrollToNode:!1,scrollBody:!1,useFragment:!1,updateState:!0,scrollToOffset:0,contentElementKey:"content",scrollToOptions:{behavior:"smooth"},useParamsMatching:!0,exitTimeout:300,scrollRestoreTimeout:1e3},y$=(t,e)=>{if(!t||t.visibilityState!=="visible")return!1;try{let n=e&&typeof e.matchMedia=="function"&&e.matchMedia("(prefers-reduced-motion: reduce)");if(n&&n.matches)return!1}catch{}return!0},b$=t=>{let e=t.__routeExit;e&&(t.__routeExit=null,e.abort())},A8=(t,e,n,r,o,s,i)=>{let a=e.__routeExit;if(a&&a.page===n)return a.wait;if(b$(e),!n||!n.node||typeof t.onRouteExit>"u"||!y$(s,i))return null;let c=typeof o=="number"&&o>=0?o:m$.exitTimeout,l=typeof AbortController=="function"?new AbortController:null,f={...r,page:n,timeout:c,signal:l?l.signal:void 0},u;try{u=hr("routeExit",t,f)}catch{return null}if(!u||typeof u.then!="function")return null;let d={page:n,abort:()=>{l&&!l.signal.aborted&&l.abort()}};return d.wait=new Promise(p=>{let g=setTimeout(()=>{d.abort(),p()},c),h=()=>{clearTimeout(g),p()};u.then(h,h)}),e.__routeExit=d,d.wait},vd=new WeakMap,C8=t=>t===!0?{}:t&&typeof t=="object"&&!Array.isArray(t)?t:null,T8=(t,e,n,r)=>{let o=C8(t.transition);return!o||!e||ny(e.content)||!n||typeof n.startViewTransition!="function"||vd.get(n)>0||!y$(n,r)?null:o},O8=t=>{let e=t.__routeTransition;if(!(!e||e.updating))try{e.transition.skipTransition()}catch{}},R8=t=>{let e=typeof t.types=="string"?[t.types]:t.types;return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n):[]},P8=t=>{try{let e=t&&t.ViewTransition;return!!e&&"types"in e.prototype}catch{return!1}},L8=100,D8=1e3,a$=(t,e)=>t===!1?1/0:typeof t=="number"&&t>=0?t:e,c$=t=>{let e=t&&t.performance;return e&&typeof e.now=="function"?e.now():Date.now()},I8=t=>{t&&typeof t.then=="function"&&t.then(null,()=>{})},M8=(t,e,n,r,o,s,i)=>{let a=t.node,c=a&&a.style,l=typeof n.name=="string"&&n.name?n.name:null,f=e.__routeTransition,u={transition:null,updating:!1,name:l,previousName:f&&f.name&&c?f.previousName:c&&c.viewTransitionName||""},d=()=>{if(e.__routerNavSeq===s){u.updating=!0,u.swapStarted=c$(o),vd.set(r,(vd.get(r)||0)+1);try{return i()}finally{vd.set(r,vd.get(r)-1),u.updating=!1}}},p=()=>{l&&c&&c.viewTransitionName===l&&(c.viewTransitionName=u.previousName)};l&&c&&(c.viewTransitionName=l);let g=R8(n),h=null;try{h=g.length&&P8(o)?r.startViewTransition({update:d,types:g}):r.startViewTransition(d)}catch{}if(!h)return p(),null;u.transition=h,e.__routeTransition=u,I8(h.ready);let m=!1,y=null,x=()=>{m=!0,y!==null&&(o.clearTimeout(y),y=null),e.__routeTransition===u&&(e.__routeTransition=null,p())},E=()=>{if(!(m||e.__routeTransition!==u))try{h.skipTransition()}catch{}};h.finished&&typeof h.finished.then=="function"?h.finished.then(x,x):x();let C=a$(n.swapBudget,L8),_=a$(n.timeout,D8);_!==1/0&&h.ready&&typeof h.ready.then=="function"&&o&&typeof o.setTimeout=="function"&&h.ready.then(()=>{m||(y=o.setTimeout(()=>{y=null,E()},_))},()=>{});let b=h.updateCallbackDone;return!b||typeof b.then!="function"?Promise.resolve():(C!==1/0&&b.then(()=>{u.swapStarted!==void 0&&c$(o)-u.swapStarted>C&&E()},()=>{}),b)},Dn=async(t,e,n={},r={})=>{let o=e||void 0,s=o?.context?.window||R,i=o?.context?.document||kt,a={...m$,...o.context.routerOptions,...r};oy=a.lastLevel,o=E8(o,a);let c=!(r&&r.render===!1),l=o.__ref;(a.contentElementKey!=="content"&&a.contentElementKey!==l.contentElementKey||!l.contentElementKey)&&(l.contentElementKey=a.contentElementKey||"content");let f=l.contentElementKey||a.contentElementKey||"content",u=s.location.origin!=="null"?s.location.origin:"http://localhost";t=Vv(t);let d=typeof s.URL=="function"?s.URL:typeof globalThis<"u"&&globalThis.URL||URL,p=new d(u+t),{pathname:g,search:h,hash:m}=p,y=Kv(h),x=o.node,E=m&&m!==s.location.hash.slice(1),C=g!==Cc,_=Cc,b=++i$;Cc=g;let w=()=>{i$===b&&(Cc=_)},S=l.__routerRendered,A,T,O,B;if(a.useParamsMatching){let q=Wv(g,o.routes,a.level);A=q.key,T=q.routePath,O=q.content,B=q.params}else{A=Gv(a.level,g),T=A;let q=o.routes;O=q?q[A||"/"]||q["/*"]:null,B={}}if(r&&r.route!=null){let q=s$(r.route,g,o.routes,a.level);!q&&!a.silent&&console.warn("[smbls/router] route",r.route,"chosen for",g,"is not one of the routes:",Object.keys(o.routes||{})),A=q?q.route:r.route,O=q?q.content:null,B=q?q.params:{}}a.scrollNode===void 0&&(a.scrollNode=v8(i));let $=a.scrollToNode?x:a.scrollNode;if(o.state?.root?.debugging){o.state.root.debugging=!1;return}let N=NN(s,a,$);if(N&&N.pop&&N.pop.echo)return;if(!O){w(),a.onNotFound?a.onNotFound({pathname:g,route:A,element:o}):(a.silent||console.warn("[smbls/router] no content matched for path",g,"\u2014 available routes:",Object.keys(o.routes||{})),a.event&&a.event.type==="popstate"&&$v(N,l,s));return}let G=r&&r.lazy?l.__routerStartSeq:l.__routerStartSeq=(l.__routerStartSeq||0)+1;if(a.guards&&a.guards.length){let q={pathname:g,route:A,params:B,query:y,hash:m,element:o,state:n},W=qv(a.guards,q);if(Ed(W)&&(W=await W,l.__routerStartSeq!==G)){w(),$N(N);return}if(W===!1){w(),Nv(N);return}let Rt=jt=>{let Ct=new d(u+Vv(jt));return Ct.pathname===g&&Ct.search===h&&Ct.hash===m},yt=typeof W=="string"?W:zv(W)&&typeof W.path=="string"&&!Rt(W.path)?W.path:null;if(zv(W)&&yt===null){let jt=s$(W.route,g,o.routes,a.level);if(!jt){a.silent||console.warn("[smbls/router] a guard chose route",W.route,"for",g,"\u2014 not one of the routes:",Object.keys(o.routes||{})),w(),a.onNotFound?a.onNotFound({pathname:g,route:W.route,element:o}):a.event&&a.event.type==="popstate"&&$v(N,l,s);return}A=jt.route,O=jt.content,B=jt.params,r={...r,route:jt.route}}else if(yt!==null){let jt=!!(N&&N.pop);if(jt&&!Mv(N))return;let Ct=[...r&&r.__redirectChain||[],g],Pt=new d(u+Vv(yt)).pathname,qe=Ct.includes(Pt)||Ct.length>=k8;qe&&!a.silent&&console.warn("[smbls/router] redirect loop:",[...Ct,Pt].join(" \u2192 "),"\u2014 rendering",Pt,"without its guards");let It={...r,__redirectChain:Ct};return qe&&(It.guards=[]),typeof W=="string"?delete It.route:It.route=W.route,jt&&(It.event=void 0),delete It.render,(jt||a.initialRender)&&(It.pushState=!0,It.replace=!0),Dn(yt,e,n,It)}}let Y=c?t$(O,o,o.routes):null;if(Y&&Y.rematch)return Dn(t,o,n,r);Y&&(O=Y.content,a.lazy={group:Y.group,status:Y.status});let nt=l.__routerNavSeq=(l.__routerNavSeq||0)+1,ot=!S||S.content!==O||S.route!==A,st=!!S&&S.content===O,J=!(!c||a.keepSamePage===!0&&st&&a.force!==!0)&&(C||ot||a.force===!0);if(J&&S&&!ny(S.content)){let q=A8(o,l,o[f],{from:S.route,to:A,pathname:g,params:B,query:y,hash:m},a.exitTimeout,i,s);if(q&&(await q,l.__routerNavSeq!==nt||(l.__routeExit&&l.__routeExit.wait===q&&(l.__routeExit=null),typeof o?.set!="function")))return}else b$(l);let Q=J?T8(a,S,i,s):null;if(J&&O8(l),a.pushState){let q=g+(h||"")+(m||"");BN(N,n,q,a.replace,s)}else N&&Mv(N);FN(l,s);let it=h8(o,a,f),rt=()=>{let q=J?_8(a,o,f,it):null,W=(!!S||l$(it))&&!!$&&$.scrollTop===0&&!$.scrollLeft,Rt=!S&&!!a.initialRender&&!!$&&g8(o)&&(Number($.scrollTop)>0||Number($.scrollLeft)>0),jt=C||!E?{route:A,routePath:T,hash:m,params:B,query:y,debugging:!1}:{params:B,query:y};a.updateState&&o.state.update(jt,{preventContentUpdate:!0});let Ct=null;if(J){f&&a.removeOldElement&&o[f].remove();let qe=o.__ref?.origin?.content,It={};if(qe)for(let X in qe){let at=qe[X];X==="__ref"||X==="props"||X==="node"||X==="parent"||X==="key"||(typeof at=="string"||typeof at=="number"||typeof at=="boolean"||typeof at=="object"&&at!==null&&!at.node&&!at.__ref)&&(It[X]=at)}let Le={...It,...typeof O=="object"?O:{extends:O}};a.useFragment&&(Le.tag="fragment");let H={content:O,route:A},Tt=l.__routerRendered;try{if(typeof o?.set!="function")return;l.__routerRendered=H;let X=!q&&y8(a),at=o.set(Le,it,q||(X?Hv:void 0));at&&q?S8(a,q,at,()=>l.__routerNavSeq===nt):at&&X&&b8(a,at),Ct=m8(o[f])}catch(X){l.__routerRendered===H&&(l.__routerRendered=Tt),console.error("[smbls/router] failed to render route content",g,X)}}else st&&S.route!==A&&l.__routerRendered===S&&(l.__routerRendered={content:O,route:A});let Pt=()=>{let qe=!C&&E,It=!c||jN(N,$,a,i);if(!It&&!Rt&&a.scrollToTop&&!qe&&!W&&$?.scrollTo&&$.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!It&&!Rt&&a.scrollToNode&&O[f]?.node?.scrollTo&&O[f].node.scrollTo({...a.scrollToOptions||{},top:0,left:0}),!It&&m){let Le=i.getElementById(m.slice(1));if(Le&&$?.scrollTo){let H=s.getComputedStyle?s.getComputedStyle(Le):null,Tt=H&&parseFloat(H.scrollMarginTop)||0,X=Le.getBoundingClientRect().top+$.scrollTop-Tt-(a.scrollToOffset||0);$.scrollTo({...a.scrollToOptions||{},top:X,left:0})}}Y&&e$(o,Y,Le=>Dn(t,o,n,{...r,...Le})),hr("routeChanged",o,a)};if(Ct)return Ct.then(()=>{n$(it,o,a),l.__routerNavSeq===nt&&Pt()});n$(it,o,a),Pt()},gt=Q?M8(o,l,Q,i,s,nt,rt):null;if(gt){await gt;return}return rt()},N8=Dn;var $8=(t,e)=>{if(!t)return!1;if(t.defaultPrevented||typeof t.button=="number"&&t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return!0;let n=e.node;if(!n||typeof n.getAttribute!="function")return!1;let r=n.getAttribute("target");return r&&r.toLowerCase()!=="_self"?!0:n.hasAttribute("download")},F8=(t,e)=>{let n=t.slice(1),r=e.node&&e.node.ownerDocument,o=n&&r?r.getElementById(n):null;o&&(typeof o.scrollIntoView=="function"&&o.scrollIntoView(),typeof o.focus=="function"&&(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus()))},_$=(t,e,n)=>{let{context:r}=e,{href:o,scrollToTop:s,stopPropagation:i}=e,a=e.call("exec",o,e);if(e.call("isString",a)&&a.includes("{{")&&(a=e.call("replaceLiteralsWithObjectFields",a)),i&&t.stopPropagation(),!a||$8(t,e))return;if(a.startsWith("#")){t.preventDefault(),F8(a,e);return}let{utils:c,snippets:l,functions:f,routerOptions:u}=r,d=e.__ref.root,p=a.startsWith("http://")||a.startsWith("https://")||a.startsWith("mailto:")||a.startsWith("tel:")||a.startsWith("sketch:")||a.startsWith("whatsapp:")||a.startsWith("sms:")||a.startsWith("skype:")||a.startsWith("viber:")||a.startsWith("callto:")||a.startsWith("facetime:")||a.startsWith("facetime-audio:")||a.startsWith("geo:")||a.startsWith("maps:");if(a&&!p){t.preventDefault();try{let g=d;if(u&&u.customRouterElement){let h=Array.isArray(u.customRouterElement)?u.customRouterElement:u.customRouterElement.split("."),m=d;for(let y of h){if(!m||!m[y]){m=null;break}m=m[y]}m&&(g=m,d.routes&&(g.routes=d.routes))}(f.router||l.router||c.router||Dn)(a,g,{},{scrollToOptions:{behavior:"instant"},scrollToTop:e.call("isDefined",s)?s:!0,...u,...e.routerOptions})}catch(g){console.warn(g)}}},Yv={extends:"Focusable",tag:"a",aria:{},fontWeight:"bold",textDecoration:"none",color:"currentColor",draggable:!1,attr:{href:t=>To(t,t.href)||To(t,t.call("exec",t,t).href),"aria-label":t=>t.aria?t.aria.label:t.text},onClick:_$},w$={extends:"Link"},Xv={onClick:_$},S$={extends:[Yv,Xv]};var Zv={};F(Zv,{Select:()=>x$});var x$={extends:"Focusable",tag:"select",fontSize:"A",border:"none",boxSizing:"border-box",theme:"field",cursor:"pointer",childProps:{tag:"option",attr:{value:t=>t.value,selected:t=>t.selected,disabled:t=>t.disabled}},attr:{name:t=>t.name,disabled:t=>t.disabled,value:t=>{if(!t.value)return;let e=t.call("exec",t.value,t);return t.call("isString",e)&&e.includes("{{")?t.call("replaceLiteralsWithObjectFields",e):e}}};var Qv={};F(Qv,{Button:()=>k$,ButtonSet:()=>C$,CircleButton:()=>v$,IconButton:()=>T$,KangorooButton:()=>A$,SquareButton:()=>E$});var k$={extends:["IconText","FocusableComponent"],tag:"button",minHeight:"controlH",fontSize:"Z2",type:"button",border:"none",display:"inline-flex",align:"center center",textDecoration:"none",lineHeight:"1",whiteSpace:"nowrap",padding:"0 A",fontWeight:"700",fontFamily:"inherit",round:"radiusPill",disabled:t=>t.call("exec",t.disabled)},E$={extends:"Button",fontSize:"A",width:"A",minHeight:"auto",padding:"Z",aspectRatio:"1 / 1",boxSize:"fit-content fit-content",justifyContent:"center",round:"Z2",boxSizing:"content-box"},v$={extends:"SquareButton",round:"C"},A$={extends:"Button",childExtends:"IconText"},C$={tag:"nav",display:"flex",childExtends:"SquareButton"},T$={extends:["SquareButton","ClickableItem"],round:"Z"};var eA={};F(eA,{Dialog:()=>D$,DialogFooter:()=>M$,DialogHeader:()=>I$});Mt();var B8={ok:1,cancel:1},fi=new WeakMap,j8=0,gn=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},tA=t=>{let e=fi.get(t);return e||(e={id:"smbls-dialog-"+ ++j8,want:void 0,waiting:!1},fi.set(t,e)),e},Cd=(t,e,n,r)=>t[e]!==void 0||n!==void 0&&t[n]!==void 0||!!t.attr&&typeof t.attr=="object"&&t.attr[e]!==void 0||r!==void 0&&!!t.aria&&typeof t.aria=="object"&&t.aria[r]!==void 0,Oc=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},O$=["methods","functions","utils"],U8=t=>{for(let e=0;e<O$.length;e++){let n=t[O$[e]];if(n&&typeof n.polyglot=="function")return!0}return!1},sy=(t,e,n)=>{let r=t.context;if(!r||!U8(r))return n;let o=t.call("polyglot",e);return typeof o=="string"&&o&&o!==e?o:n},R$=t=>{let e=fi.get(t),n=gn(t);if(!e||!n)return!0;if(!n.isConnected)return!1;if(e.want){if(!n.open&&typeof n.showModal=="function")try{n.showModal()}catch{}}else n.open&&typeof n.close=="function"&&n.close();return!0},P$=t=>{queueMicrotask(()=>{if(R$(t))return;let e=fi.get(t);!e||e.waiting||typeof t.whenConnected!="function"||(e.waiting=!0,t.whenConnected(()=>{e.waiting=!1,R$(t)}))})},V8=t=>{let e=t.__ref;if(!e||!gn(t)||!Object.prototype.hasOwnProperty.call(t,"modal")||Cd(t,"data-dialog"))return;let n=K(()=>{let r=t.modal,o=gn(t);if(!o)return;if(r==null){Oc(o,"data-dialog",null);return}Oc(o,"data-dialog","modal");let s=tA(t),i=!!r;s.want!==i&&(s.want=i,P$(t))},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(n)},z8=t=>t.dialogTitle===!0,H8=t=>{for(let e=t;e;e=e.parent)if(e.tag==="dialog")return e;return null},L$=t=>{let e=H8(t);return!e||!e.locked},W8=t=>t.key==="Escape"||t.key==="Esc",K8=t=>{let e=t.__ref,n=gn(t);if(!e||!n||!Object.prototype.hasOwnProperty.call(t,"locked"))return;let r=tA(t),o=!Cd(t,"closedby","closedBy"),s=K(()=>{let l=!!t.locked,f=gn(t);f&&o&&Oc(f,"closedby",l?"none":null)},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(s);let i=l=>{t.locked&&l.preventDefault()},a=t.context&&t.context.window||n.ownerDocument.defaultView,c=l=>{let f=gn(t);f&&f.open&&f.isConnected&&W8(l)&&t.locked&&l.preventDefault()};n.addEventListener("cancel",i),a&&a.addEventListener("keydown",c),r.unlock=()=>{n.removeEventListener("cancel",i),a&&a.removeEventListener("keydown",c)}},q8=t=>{let e=gn(t);if(!e||e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")||Cd(t,"aria-labelledby","ariaLabelledby","labelledby"))return;let n=typeof t.lookdown=="function"?t.lookdown(z8):null,r=gn(n);if(!r)return;let o=r.getAttribute("id");if(!o){if(Cd(n,"id"))return;o=tA(t).id+"-title",Oc(r,"id",o)}Oc(e,"aria-labelledby",o)},G8=(t,e)=>{let n=gn(e),r=t.target;if(!n||t.defaultPrevented||!r||typeof r.closest!="function")return;let o=r.closest("[data-dialog-action]");if(!o||!n.contains(o))return;let s=o.getAttribute("data-dialog-action");if(B8[s]!==1)return;let i=n.ownerDocument.defaultView,a=new i.Event(s,{cancelable:!0});n.dispatchEvent(a),!a.defaultPrevented&&n.open&&typeof n.close=="function"&&n.close(s)},Y8=t=>{let e=fi.get(t);e&&e.unlock&&(e.unlock(),e.unlock=null);let n=gn(t);e&&e.want!==void 0&&n&&n.open&&typeof n.close=="function"&&n.close()},X8=t=>{let e=fi.get(t),n=gn(t);e&&e.want!==void 0&&n&&!n.isConnected&&n.hasAttribute("open")&&n.removeAttribute("open")},J8=t=>{let e=fi.get(t);e&&e.want&&P$(t)},Z8=t=>{let e=gn(t);if(!e||!Object.prototype.hasOwnProperty.call(t,"modal")||Cd(t,"data-dialog"))return;let n=t.modal;if(typeof n=="function")try{n=n(t,t.state)}catch{return}n!=null&&Oc(e,"data-dialog","modal")},D$={display:"flex",tag:"dialog",flow:"column",border:"0",theme:"dialog",round:"Z2",'[data-dialog="modal"]:not([open])':{display:"none"},onAttachNode:{always:!0,handler:t=>Z8(t)},onComplete:{always:!0,handler:t=>{V8(t),K8(t),q8(t)}},onRender:{always:!0,handler:t=>J8(t)},onClick:(t,e)=>G8(t,e),onBeforeRemove:{always:!0,handler:t=>Y8(t)},onRemove:{always:!0,handler:t=>X8(t)}},I$={extends:"Hgroup",minWidth:"100%",gap:"A",Title:{align:"center space-between",Text:{dialogTitle:!0,text:t=>sy(t,"dialog.title","Title")},SquareButton:{if:L$,icon:"x",theme:"transparent",aria:{label:t=>sy(t,"dialog.close","Close")},data:{dialogAction:"cancel"}}},Paragraph:{color:"caption"}},M$={display:"flex",align:"center flex-end",gap:"X2",margin:"auto - -",padding:"Y2 X2",childExtends:{extends:"Button",textTransform:"uppercase",background:"transparent","@dark":{theme:"primary @dark .color-only"},"@light":{theme:"primary @light .color-only"},"&":{padding:"Z A"},":hover":{theme:"tertiary"},":active":{background:"white.1"}},Cancel:{if:L$,text:t=>sy(t,"dialog.cancel","Cancel"),data:{dialogAction:"cancel"}},Ok:{text:t=>sy(t,"dialog.ok","OK"),data:{dialogAction:"ok"}}};var aA={};F(aA,{Tooltip:()=>V$,TooltipHidden:()=>z$,TooltipLayer:()=>iA,TooltipParent:()=>H$});M();var Q8='[data-tooltip]:not([data-tooltip=""])',N$={top:1,bottom:1,left:1,right:1},nA={top:"bottom",bottom:"top",left:"right",right:"left"},ui=6,$$=new WeakMap,tK=0,Te=t=>{let e=$$.get(t);return e||(e={id:"smbls-tooltip-"+ ++tK,hover:null,focus:null,shown:null,dismissed:null,showTimer:null,hideTimer:null},$$.set(t,e)),e},rA=t=>{let e=t&&t.nodeType!==1?t.parentElement:t;return e&&typeof e.closest=="function"?e:null},eK=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},nK=t=>{for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(e.hasAttribute("data-tooltip-layer"))return!0;return!1},F$=(t,e)=>{let n=eK(t);if(!e||!n)return null;let r;try{r=e.closest(Q8)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(nK(o))return null;return r},rK=(t,e)=>!!(e&&t.node&&t.node.contains(e)),oK=t=>{try{return t.matches(":focus-visible")}catch{return!0}},B$=(t,e)=>typeof t=="number"&&t>=0?t:e,ly=t=>{t.showTimer&&(clearTimeout(t.showTimer),t.showTimer=null),t.hideTimer&&(clearTimeout(t.hideTimer),t.hideTimer=null)},oA=t=>!!(t.node&&t.node.isConnected&&t.state&&typeof t.state.update=="function"),sK=(t,e)=>{let n=(t.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean);n.indexOf(e)===-1&&n.push(e),t.setAttribute("aria-describedby",n.join(" "))},sA=(t,e)=>{if(!t||typeof t.getAttribute!="function")return;let n=t.getAttribute("aria-describedby");if(n==null)return;let r=n.split(/\s+/).filter(o=>o&&o!==e);r.length?t.setAttribute("aria-describedby",r.join(" ")):t.removeAttribute("aria-describedby")},iK=(t,e,n,r,o)=>{let s={top:t.top,bottom:o-t.bottom,left:t.left,right:r-t.right},i=f=>(f==="top"||f==="bottom"?e.height:e.width)+ui;s[n]<i(n)&&s[nA[n]]>=i(nA[n])&&(n=nA[n]);let a,c;n==="top"||n==="bottom"?(a=t.left+(t.width-e.width)/2,c=n==="bottom"?t.bottom+ui:t.top-e.height-ui):(c=t.top+(t.height-e.height)/2,a=n==="right"?t.right+ui:t.left-e.width-ui);let l=(f,u)=>Math.max(ui,Math.min(u-ui,f));return{left:l(a,r-e.width),top:l(c,o-e.height),side:n}},aK=t=>{let e=t.ownerDocument,n=e&&e.defaultView,r=e&&e.documentElement;return{width:r&&r.clientWidth||n&&n.innerWidth||0,height:r&&r.clientHeight||n&&n.innerHeight||0}},cK=t=>(t.title||"")+(t.description||""),ay=(t,e=0)=>{let r=Te(t).shown;if(!r||!oA(t))return;if(!r.isConnected){cy(t);return}let o=t.node,s=t.state;if(o.textContent!==cK(s)){e<3&&setTimeout(()=>ay(t,e+1),0);return}let i=r.getBoundingClientRect(),a=o.getBoundingClientRect(),c=a.left-(s.x||0),l=a.top-(s.y||0),f=aK(o),u=r.getAttribute("data-tooltip-placement"),d=N$[u]?u:N$[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=iK(i,{width:a.width,height:a.height},d,f.width,f.height);s.update({x:Math.round(p.left-c),y:Math.round(p.top-l),side:p.side,placed:!0})},lK=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},j$=(t,e)=>{let n=Te(t);ly(n),!(!oA(t)||!e.isConnected)&&(n.shown&&n.shown!==e&&sA(n.shown,n.id),n.shown=e,sK(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),lK(()=>ay(t)))};function cy(t){let e=Te(t);ly(e),e.shown&&sA(e.shown,e.id),e.shown=null,oA(t)&&t.state.open&&t.state.update({open:!1})}var iy=(t,e)=>{let n=Te(t);n.dismissed&&n.dismissed!==n.hover&&n.dismissed!==n.focus&&(n.dismissed=null);let r=n.hover&&n.hover!==n.dismissed?n.hover:n.focus&&n.focus!==n.dismissed?n.focus:null;if(r===n.shown){ly(n);return}if(!r){if(n.showTimer&&(clearTimeout(n.showTimer),n.showTimer=null),!n.shown||n.hideTimer)return;if(e){cy(t);return}n.hideTimer=setTimeout(()=>{n.hideTimer=null,cy(t)},B$(t.tooltipHideDelay,100));return}if(n.hideTimer&&(clearTimeout(n.hideTimer),n.hideTimer=null),e||n.shown){j$(t,r);return}n.showTimer&&clearTimeout(n.showTimer),n.showTimer=setTimeout(()=>{n.showTimer=null,j$(t,r)},B$(t.tooltipDelay,250))},U$=t=>{let e=Te(t);e.shown&&(e.dismissed=e.shown,cy(t))},iA={role:"tooltip",id:t=>Te(t).id,data:{tooltipLayer:!0},state:{open:!1,placed:!1,title:"",description:"",x:0,y:0,side:"bottom"},tooltipPlacement:"bottom",display:"flex",flow:"column",gap:"X",theme:"dialog",padding:"Z1 A",round:"Y2",width:"max-content",maxWidth:"F2",textAlign:"center",position:"fixed",zIndex:2500,opacity:(t,e)=>e.open&&e.placed?"1":"0",visibility:(t,e)=>e.open&&e.placed?"visible":"hidden",pointerEvents:(t,e)=>e.open?"auto":"none",transition:"opacity A defaultBezier, visibility A defaultBezier",style:(t,e)=>({top:(e.y||0)+"px",left:(e.x||0)+"px"}),Text:{if:(t,e)=>!!e.title,text:(t,e)=>e.title,fontWeight:500,color:"currentColor"},P:{if:(t,e)=>!!e.description,text:(t,e)=>e.description,fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:400},onDocumentPointerover:{capture:!0,passive:!0,handler:(t,e)=>{if(t.pointerType==="touch")return;let n=Te(e),r=rA(t.target),o=rK(e,r)?n.shown:F$(e,r);o===n.hover&&(o||!n.shown)||(n.hover=o,iy(e,!1))}},onDocumentPointerout:{capture:!0,passive:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=Te(e);n.hover&&(n.hover=null,iy(e,!1))}},onDocumentPointerdown:{capture:!0,passive:!0,handler:(t,e)=>{let n=Te(e),r=rA(t.target);n.shown&&r&&n.shown.contains(r)&&U$(e)}},onDocumentFocusin:{capture:!0,handler:(t,e)=>{let n=Te(e),r=rA(t.target),o=r&&oK(r)?F$(e,r):null;o!==n.focus&&(n.focus=o,iy(e,!0))}},onDocumentFocusout:{capture:!0,handler:(t,e)=>{if(t.relatedTarget)return;let n=Te(e);n.focus&&(n.focus=null,iy(e,!0))}},onDocumentKeydown:{capture:!0,handler:(t,e)=>{(t.key==="Escape"||t.key==="Esc")&&U$(e)}},onDocumentScroll:{capture:!0,passive:!0,handler:(t,e)=>{Te(e).shown&&ay(e)}},onWindowResize:(t,e)=>{Te(e).shown&&ay(e)},onBeforeRemove:t=>{let e=Te(t);ly(e),e.shown&&sA(e.shown,e.id),e.shown=e.hover=e.focus=e.dismissed=null}};var V$={display:"flex",theme:"dialog",background:"black",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>Ut(t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"gray12",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"gray6",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},z$={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)}},H$={position:"relative",zIndex:999,onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})}};var cA={};F(cA,{Avatar:()=>W$});var fK=t=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="32" fill="#71718A"/><text x="32" y="42" font-family="system-ui,sans-serif" font-size="28" font-weight="700" text-anchor="middle" fill="#fff">${String(t||"").trim().charAt(0).toUpperCase()||"?"}</text></svg>`;return"data:image/svg+xml;utf8,"+encodeURIComponent(n)},W$={extends:"Img",display:"block",avatarType:"adventurer-neutral",borderRadius:"100%",boxSize:"C+X C+X",src:t=>`https://api.dicebear.com/7.x/${t.avatarType||"initials"}/svg?seed=${t.key||"no-avatar"}`,onError:(t,e)=>{if(!e.node||e.node.__avatarFallbackApplied)return;e.node.__avatarFallbackApplied=!0;let n=e.node.getAttribute("alt")||(e.key!=="no-avatar"?e.key:"");e.node.src=fK(n)},attr:{alt:t=>t.alt!=null?t.alt:t.text?t.call("exec",t.text,t):t.key&&t.key!=="no-avatar"?t.key:""}};var lA={};F(lA,{Range:()=>K$});var K$={tag:"input",appearance:"none",width:"100%",height:"2px",outline:"none",flex:1,onInput:(t,e,n)=>{n.update({value:parseFloat(e.node.value)})},onChange:(t,e,n)=>{n.update({value:parseFloat(e.node.value)})},"::-webkit-slider-thumb":{boxSizing:"content-box",width:"8px",height:"8px",borderWidth:"2px",borderStyle:"solid",borderRadius:"100%",opacity:".8",appearance:"none"},"::-webkit-slider-runnable-track":{},"@dark":{background:"white.2","::-webkit-slider-thumb":{background:"#232526",borderColor:Ca("#454646",.75)},":hover":{"::-webkit-slider-thumb":{borderColor:Ca("#fff",.35)}},":focus":{"::-webkit-slider-thumb":{borderColor:"#3C6AC0"}}},"@light":{background:"gray9","::-webkit-slider-thumb":{background:"white",borderColor:"gray9"},":hover":{"::-webkit-slider-thumb":{borderColor:"gray7"}},":focus":{"::-webkit-slider-thumb":{borderColor:"blue"}}},deps:{returnPropertyValue:(t,e,n)=>{let r=t.call("exec",t[e],t);return(t.call("isFunction",r)?r(t,t.state):r!==void 0?r:n!==void 0?n:0)+""}},attr:{type:"range",value:(t,e)=>t.call("exec",e.value||t.value||t.defaultValue,t),min:(t,e)=>t.deps.returnPropertyValue(t,"min",0),max:(t,e)=>t.deps.returnPropertyValue(t,"max",100),step:(t,e)=>t.deps.returnPropertyValue(t,"step",1)}};var _A={};F(_A,{Dropdown:()=>b2,DropdownDisclosure:()=>S2,DropdownList:()=>_2,DropdownParent:()=>w2,DropdownParentFocus:()=>x2,DropdownSiblingFocus:()=>k2});Mt();var gy="hover",X$="focus",Td="sibling",zr="disclosure",q$={menu:1,listbox:1,tree:1,grid:1,dialog:1},uK={DIV:1,SPAN:1,LABEL:1,P:1,STRONG:1,B:1,EM:1,SMALL:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1},dK={BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},pK='button, a[href], [role^="menuitem"], [role="option"]',hK={ArrowDown:1,Down:1,ArrowUp:-1,Up:-1,Home:"first",End:"last"},uy=new WeakMap,dy=new WeakMap,py=new WeakMap,uA=new WeakMap,J$=new WeakSet,gK=0,wt=t=>{let e=t&&t.node;return e&&e.nodeType===1?e:null},Rc=(t,e)=>{let n=wt(t);return n?n.getAttribute(e):null},Dt=(t,e)=>{let n=wt(t);return!!n&&!!e&&(n===e||n.contains(e))},fA=t=>{let e=wt(t);return!!e&&e.hasAttribute("dropdown")},dA=t=>{let e=wt(t);return!!e&&e.tagName==="BUTTON"},fy=t=>dA(t)||Rc(t,"role")==="button",G$=t=>{let e=wt(t);return!!e&&uK[e.tagName]===1&&!e.isContentEditable},Z$=t=>{let e=wt(t);return!!e&&!e.disabled&&!e.hidden&&e.getAttribute("aria-disabled")!=="true"},Od=t=>{let e=Rc(t,"role");return!!e&&e.indexOf("menuitem")===0&&Z$(t)},mK=t=>{let e=wt(t);if(!e||!Z$(t))return!1;if(dK[e.tagName]===1)return e.getAttribute("type")!=="hidden";if(e.tagName==="A"&&e.hasAttribute("href"))return!0;let n=e.getAttribute("tabindex");return n!==null&&parseInt(n,10)>=0},di=t=>t&&typeof t.getChildren=="function"?t.getChildren():[],Oe=t=>t&&typeof t.dropdownMode=="string"?t.dropdownMode:null,pA=t=>{let e=t&&t.Input_trigger;return e&&e.__ref?e:null},Q$={tabindex:"tabIndex","aria-expanded":"ariaExpanded","aria-haspopup":"ariaHaspopup","aria-controls":"ariaControls","aria-labelledby":"ariaLabelledby","aria-label":"ariaLabel","aria-hidden":"ariaHidden"},t2=(t,e)=>{if(t[e]!==void 0)return!0;let n=Q$[e];if(n!==void 0&&t[n]!==void 0)return!0;let r=t.attr;if(r&&typeof r=="object"&&r[e]!==void 0)return!0;if(e.indexOf("aria-")===0){let o=t.aria;if(o&&typeof o=="object"&&o[e.slice(5)]!==void 0)return!0}return!1},yK=(t,e)=>{let n=Q$[e],r=t.attr;return typeof t[e]=="function"||n!==void 0&&typeof t[n]=="function"||!!r&&typeof r=="object"&&typeof r[e]=="function"},ar=(t,e,n)=>!e.hasAttribute(n)&&!t2(t,n),jo=(t,e,n)=>{n===null?t.removeAttribute(e):t.setAttribute(e,n)},bK=(t,e)=>{let n=wt(t);if(n)for(let r in e)jo(n,r,e[r])},hy=t=>{let e=wt(t);return!e||typeof e.focus!="function"?!1:(e.focus(),e.ownerDocument.activeElement===e)},_K=t=>{let e=uy.get(t);return e||(e={id:"smbls-dropdown-"+ ++gK,open:null,trigger:null,panel:null,popup:null,popupRole:null,owns:!1,pressedOpen:!1,written:null,outside:null,outsideDoc:null},uy.set(t,e)),e},Y$=(t,e)=>!!e&&!!wt(e)&&!!t&&t[e.key]===e,wK=(t,e)=>{let n=null,r=null;if(e===Td){let s=t.parent?di(t.parent):[];for(let i=s.indexOf(t)+1;i>0&&i<s.length&&s[i];i++)if(fA(s[i])){n=s[i];break}return(fy(t)||G$(t))&&(r=t),{panel:n,trigger:r}}let o=di(t);for(let s=0;s<o.length;s++)if(fA(o[s])){n=o[s];break}if(fy(t))return{panel:n,trigger:t};for(let s=0;s<o.length;s++){let i=o[s];if(!(!wt(i)||i.key==="Input_trigger"||fA(i))){(fy(i)||G$(i))&&(r=i);break}}return{panel:n,trigger:r}},SK=t=>{let e=Rc(t,"role");if(e&&q$[e]===1)return{el:t,role:e};let n=di(t);for(let r=0;r<n.length;r++){let o=Rc(n[r],"role");if(o&&q$[o]===1)return{el:n[r],role:o}}return null},mn=t=>{let e=Oe(t);if(!e||!wt(t))return null;let n=_K(t);if(n.trigger){let p=e===Td?t.parent:t;if((n.trigger===t||Y$(t,n.trigger))&&Y$(p,n.panel))return n}let{panel:r,trigger:o}=wK(t,e);if(!r||!o)return n.trigger=n.panel=n.popup=null,null;n.trigger=o,n.panel=r;let s=e===zr?null:SK(r);n.popup=s?s.el:null,n.popupRole=s?s.role:null;let i=wt(o),a={},c=i.getAttribute("id");n.popupRole==="menu"&&!c&&ar(o,i,"id")&&(a.id=c=n.id+"-trigger"),fy(o)||(ar(o,i,"role")&&(a.role="button"),ar(o,i,"tabindex")&&(a.tabindex="0")),n.popupRole&&ar(o,i,"aria-haspopup")&&(a["aria-haspopup"]=n.popupRole);let l=wt(r),f=l.getAttribute("id");if(!f&&ar(r,l,"id")&&(f=n.id+"-panel",jo(l,"id",f)),f&&ar(o,i,"aria-controls")&&(a["aria-controls"]=f),n.owns=ar(o,i,"aria-expanded"),n.written={open:null,expanded:null},n.owns&&(n.written.expanded=my(t,n)?"true":"false",a["aria-expanded"]=n.written.expanded),bK(o,a),n.popupRole==="menu"&&c){let p=wt(n.popup);ar(n.popup,p,"aria-label")&&ar(n.popup,p,"aria-labelledby")&&jo(p,"aria-labelledby",c)}o!==t&&e===X$&&Rc(t,"tabindex")==="0"&&!yK(t,"tabindex")&&jo(wt(t),"tabindex","-1");let u=pA(t),d=wt(u);return d&&!d.hasAttribute("tabindex")&&(t2(u,"tabindex")||jo(d,"tabindex","-1"),ar(u,d,"aria-hidden")&&jo(d,"aria-hidden","true")),pi(t,n),n},e2=t=>{let e=wt(t),n=e&&e.ownerDocument.activeElement;return n&&n!==e.ownerDocument.body?n:null},n2=t=>Dt(t,e2(t)),my=(t,e,n)=>{if(e.open!==null)return e.open;let r=Oe(t);return n||r===gy||r===zr?!1:n2(t)},pi=(t,e,n)=>{let r=e.open===null?null:String(e.open);if(e.written.open!==r){e.written.open=r;let s=wt(t);s&&jo(s,"data-dropdown-open",r)}if(!e.owns)return;let o=my(t,e,n)?"true":"false";if(e.written.expanded!==o){e.written.expanded=o;let s=wt(e.trigger);s&&jo(s,"aria-expanded",o)}},gi=t=>{let e=dy.get(t);return e||(e={stop:null,stopItem:null,chosen:!1,ready:!1,settling:!1,checks:null,checkRows:null,owned:!1},dy.set(t,e)),e},r2=(t,e)=>{if(t.stopItem===e&&t.stop===e.key)return;let n=t.stopItem&&py.get(t.stopItem);t.stop=e.key,t.stopItem=e,n&&n.set(!1);let r=py.get(e);r&&r.set(!0)},o2=(t,e)=>{let n=gi(t);n.chosen=!0,r2(n,e)},s2=t=>{let e=gi(t);if(e.settling=!1,e.chosen)return;let n=di(t);for(let r=0;r<n.length;r++)if(Od(n[r])){r2(e,n[r]);return}},i2=(t,e)=>{if(!e||!e.contains(t))return!1;let n=[];for(let o=t;o!==e;o=o.parentElement)n.push(o);n.push(e);let r=!1;for(let o=n.length-1;o>=0;o--){let s=typeof n[o].getAnimations=="function"?n[o].getAnimations():[];for(let i=0;i<s.length;i++)s[i].transitionProperty==="visibility"&&(s[i].finish(),r=!0)}return r},a2=(t,e)=>{let n=wt(t);if(!n)return;let r=n.ownerDocument.activeElement,o=hy(t);!o&&e&&n.ownerDocument.activeElement===r&&i2(n,wt(e))&&(o=hy(t));let s=t.parent;o&&s&&dy.has(s)&&o2(s,t)},xK=t=>{let e=t.popupRole==="menu"?t.popup:t.panel;return!e||typeof e.lookdownAll!="function"?[]:e.lookdownAll(t.popupRole==="menu"?Od:mK)},kK=(t,e,n)=>{if(n==="trigger"){let s=e2(t);(!Dt(t,s)&&!Dt(e.panel,s)||Dt(pA(t),s))&&hy(e.trigger);return}let r=xK(e);if(!r.length)return;let o=n==="last"?r[r.length-1]:null;if(!o)for(let s=0;s<r.length&&!o;s++)Rc(r[s],"aria-checked")==="true"&&(o=r[s]);a2(o||r[0],e.panel)},hA=(t,e,n)=>{let r=wt(t),o=r&&r.ownerDocument;n&&!e.outside&&o?(e.outside=s=>{if(!wt(t)||!wt(t).isConnected){hA(t,e,!1);return}Dt(t,s.target)||Dt(e.panel,s.target)||de(t,e,!1)},e.outsideDoc=o,o.addEventListener("pointerdown",e.outside,!0)):!n&&e.outside&&(e.outsideDoc.removeEventListener("pointerdown",e.outside,!0),e.outside=e.outsideDoc=null)},c2=(t,e)=>{let n=wt(t),r=n&&n.ownerDocument&&n.ownerDocument.defaultView;if(!r||typeof r.Event!="function")return;let o=new r.Event("toggle");Object.defineProperty(o,"newState",{value:e?"open":"closed"}),Object.defineProperty(o,"oldState",{value:e?"closed":"open"}),n.dispatchEvent(o)},Pc=(t,e,n)=>{let r=e.open===!0;if(e.open=!0,pi(t,e),Oe(t)===zr){hA(t,e,!0);let o=wt(e.panel);o&&i2(o,o),r||c2(t,!0)}n&&kK(t,e,n)},de=(t,e,n)=>{let r=e.open===!0;e.open=!1,pi(t,e),e.outside&&hA(t,e,!1),n&&hy(e.trigger),r&&Oe(t)===zr&&c2(t,!1)},EK=t=>{let e=t.__ref;if(!e||Oe(t)!==zr||!Object.prototype.hasOwnProperty.call(t,"open"))return;let n=K(()=>{let r=t.open;r!=null&&Xo(()=>{let o=mn(t);!o||!!r==(o.open===!0)||(r?Pc(t,o,null):de(t,o,n2(t)))})},{depth:e.path&&e.path.length||0});e.__effects||(e.__effects=[]),e.__effects.push(n)},yy=(t,e,n)=>e.trigger===t?!Dt(e.panel,n):Dt(e.trigger,n)?!0:Dt(pA(t),n),gA=(t,e)=>{let n=e&&typeof e.closest=="function"?e.closest(pK):null;return!!n&&Dt(t,n)},l2=(t,e,n)=>{let r=t.key;r==="Escape"||r==="Esc"?(t.preventDefault(),de(e,n,!0)):r==="Tab"&&n.popupRole==="menu"&&Dt(n.popup,t.target)&&de(e,n,!1)},by=t=>{Oe(t)===Td&&t.parent&&J$.add(t.parent),mn(t),EK(t)},_y=(t,e)=>{let n=mn(e);n&&(n.pressedOpen=my(e,n))},vK=(t,e)=>{let n=uy.get(e);!n||!n.trigger||n.open!==!1||Oe(e)!==gy||(n.open=null,pi(e,n))},wy=(t,e)=>{if(Oe(e)===zr){CK(t,e);return}if(t.defaultPrevented)return;let n=mn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){if(Oe(e)!==gy||!gA(n.panel,r))return;(n.open===!0||t.detail===0)&&de(e,n,!0);return}if(!yy(e,n,r))return;let o=t.detail===0?n.open===!0:n.pressedOpen;n.pressedOpen=!1,o?de(e,n,!0):Pc(e,n,n.popupRole==="menu"?"first":"trigger")},Sy=(t,e)=>{if(t.defaultPrevented)return;if(Oe(e)===zr){TK(t,e);return}let n=mn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){l2(t,e,n);return}if(!yy(e,n,r))return;let o=t.key;if(o==="ArrowDown"||o==="Down"||o==="ArrowUp"||o==="Up")t.preventDefault(),Pc(e,n,o==="ArrowUp"||o==="Up"?"last":"first");else if(o==="Escape"||o==="Esc"){if(!my(e,n))return;t.preventDefault(),de(e,n,!1)}else(o==="Enter"||o===" "||o==="Spacebar")&&!dA(n.trigger)&&(t.preventDefault(),n.open===!0?de(e,n,!0):Pc(e,n,n.popupRole==="menu"?"first":"trigger"))},AK=t=>!!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey),CK=(t,e)=>{let n=mn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){n.open===!0&&!AK(t)&&e.keepOpen!==!0&&gA(n.panel,r)&&de(e,n,!0);return}if(t.defaultPrevented||!yy(e,n,r))return;let o=t.detail===0?n.open===!0:n.pressedOpen;n.pressedOpen=!1,o?de(e,n,!0):Pc(e,n,"trigger")},TK=(t,e)=>{let n=mn(e);if(!n)return;let r=t.key;if(r==="Escape"||r==="Esc"){if(n.open!==!0)return;t.preventDefault(),de(e,n,!0);return}(r==="Enter"||r===" "||r==="Spacebar")&&!dA(n.trigger)&&!Dt(n.panel,t.target)&&yy(e,n,t.target)&&(t.preventDefault(),n.open===!0?de(e,n,!0):Pc(e,n,"trigger"))},mA=(t,e)=>{let n=mn(e);n&&(n.open===null&&Dt(n.panel,t.target)&&(n.open=!0),pi(e,n))},Rd=(t,e)=>{let n=uy.get(e);if(!n||!n.trigger)return;let r=t.relatedTarget;if(Oe(e)===zr){n.open===!0&&r&&!Dt(e,r)&&!Dt(n.panel,r)&&de(e,n,!1);return}if(r&&(Dt(e,r)||Dt(n.panel,r))){n.open===null&&Dt(n.panel,r)&&(n.open=!0,pi(e,n));return}n.open=null,pi(e,n,!0)},f2=t=>{let e=t.parent;if(!e||!J$.has(e))return null;let n=di(e);for(let r=n.indexOf(t)-1;r>=0&&n[r];r--)if(Oe(n[r])===Td)return n[r];return null},yA=t=>{let e=f2(t),n=e?mn(e):null;return n&&n.panel===t?{ctrl:e,rec:n}:null},u2=t=>{let e=f2(t);e&&mn(e)},d2=(t,e)=>{if(t.defaultPrevented)return;let n=yA(e);n&&l2(t,n.ctrl,n.rec)},p2=(t,e)=>{if(t.defaultPrevented||!gA(e,t.target))return;let n=yA(e);n&&de(n.ctrl,n.rec,!0)},h2=(t,e)=>{let n=yA(e);n&&Rd(t,n.ctrl)},OK=(t,e)=>{let n=e.parent,r=Oe(n)?mn(n):null;if(r&&r.panel===e){de(n,r,!0);return}let o=wt(e),s=o&&o.ownerDocument.activeElement;s&&typeof s.blur=="function"&&s.blur()},g2=(t,e)=>{if(Oe(e.parent)&&mn(e.parent))return;let n=wt(e);n&&n===n.ownerDocument.activeElement&&n.blur()},RK=(t,e)=>{if(t.defaultPrevented)return;let n=hK[t.key];if(!n)return;let r=typeof e.lookdownAll=="function"?e.lookdownAll(Od):[];if(!r.length)return;let o=-1;for(let i=0;i<r.length&&o===-1;i++)Dt(r[i],t.target)&&(o=i);let s;n==="first"?s=0:n==="last"?s=r.length-1:o===-1?s=n>0?0:r.length-1:s=(o+n+r.length)%r.length,t.preventDefault(),a2(r[s])},PK=(t,e)=>{let n=di(e);for(let r=0;r<n.length;r++)if(Dt(n[r],t.target)){Od(n[r])&&o2(e,n[r]);return}},LK=t=>{let e=t.parent;if(!e)return"0";let n=gi(e),r=py.get(t);if(!r){n.stop===null&&(n.stop=t.key);let o=n.stop===t.key;o&&(n.stopItem=t),n.ready&&!n.chosen&&!n.settling&&(n.settling=!0,queueMicrotask(()=>s2(e))),r=wn(o),py.set(t,r)}return r.get()?"0":"-1"},DK=t=>{u2(t);let e=gi(t);e.ready=!0,!(e.stopItem&&e.stopItem.parent===t&&Od(e.stopItem))&&s2(t)},IK=t=>{let e=uA.get(t),n=!e;n&&(e={tick:wn(0),seen:0,checked:!1},uA.set(t,e));let r=e.tick.get();return r===e.seen&&(e.checked=!!Xo(()=>t.isActive)),e.seen=r,n&&t.parent&&NK(t.parent),e.checked?"true":"false"},MK=(t,e)=>{if(e.checkRows.get(),!t.node){y2(t);return}let n=di(t);for(let r=0;r<n.length;r++){let o=uA.get(n[r]);if(!o)continue;let s=!!n[r].isActive;s!==o.checked&&(o.checked=s,o.tick.set(o.tick.peek()+1))}},m2=t=>{let e=gi(t);e.checks||(e.checkRows||(e.checkRows=wn(0)),e.checks=K(()=>MK(t,e),{label:"DropdownList.checks"}))},y2=t=>{let e=dy.get(t);!e||!e.checks||(e.checks.dispose(),e.checks=null)},NK=t=>{let e=gi(t);e.checks?e.checkRows.set(e.checkRows.peek()+1):e.owned||m2(t)},$K=t=>{gi(t).owned=!0},hi={transform:"translate3d(0,0,0)",opacity:1,visibility:"visible"},bA={opacity:0,visibility:"hidden"},b2={attr:{dropdown:!0},position:"absolute",top:"100%",left:"0",zIndex:1e3,theme:"quaternary",padding:"Y",round:"Z2",flow:"column",gap:"X",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden",onComplete:{always:!0,handler:u2},onKeydown:d2,onClick:p2,onFocusout:h2},_2={display:"flex",attr:{dropdown:!0},role:"menu",padding:"0 Y",maxHeight:"G",flow:"column",theme:"quaternary",overflow:"hidden auto",listStyleType:"none",transition:"transform B defaultBezier, opacity B defaultBezier, visibility B defaultBezier",children:t=>t.options||[],childrenAs:"props",".hidden":{transform:"translate3d(0,10%,0)",opacity:0,visibility:"hidden"},onKeydown:(t,e)=>{RK(t,e),d2(t,e)},onInit:{always:!0,handler:$K},onComplete:{always:!0,handler:DK},onRender:{always:!0,handler:m2},onBeforeRemove:{always:!0,handler:y2},onFocusin:PK,onClick:p2,onFocusout:h2,childExtends:{extends:"Button",state:{},role:"menuitemradio",tabindex:t=>LK(t),aria:{checked:t=>IK(t)},isActive:(t,e)=>e.active===t.key,position:"relative",round:"0",align:"center flex-end",flow:"row-reverse",padding:"Z2 C Z2 Y2",margin:"0",gap:"Y2",theme:"quaternary .child",":hover":{style:{svg:{opacity:"0.5"}}},':where([aria-checked="true"])':{style:{svg:{opacity:"1"}}},Icon:{name:"check",opacity:"0.1"},":not(:first-child)":{"@dark":{border:"solid gray4.65"},"@light":{border:"solid gray11"},borderWidth:"1px 0 0"}}},w2={position:"relative",zIndex:999,dropdownMode:gy,":hover":{zIndex:1e3,"& [dropdown]":{...hi}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...hi}},'[data-dropdown-open="false"]:hover':{"& [dropdown]":{...bA}},onComplete:{always:!0,handler:by},onPointerdown:_y,onPointerenter:vK,onClick:wy,onKeydown:Sy,onFocusin:mA,onFocusout:Rd},S2={position:"relative",dropdownMode:zr,'[data-dropdown-open="true"]':{zIndex:1e3,"& > [dropdown]":{...hi}},onComplete:{always:!0,handler:by},onPointerdown:_y,onClick:wy,onKeydown:Sy,onFocusout:Rd},x2={position:"relative",tabindex:"0",dropdownMode:X$,":focus-within":{zIndex:1e3,"& [dropdown]":{...hi}},'[data-dropdown-open="true"]':{zIndex:1e3,"& [dropdown]":{...hi}},'[data-dropdown-open="false"]:focus-within':{"& [dropdown]":{...bA}},onComplete:{always:!0,handler:by},onPointerdown:_y,onClick:wy,onKeydown:Sy,onFocusin:mA,onFocusout:Rd,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>g2(t,e)},Dropdown:{onClick:(t,e)=>OK(t,e)}},k2={position:"relative",tabindex:"0",dropdownMode:Td,":focus-within":{zIndex:1e3,"& ~ [dropdown]":{...hi}},'[data-dropdown-open="true"]':{zIndex:1e3,"& ~ [dropdown]":{...hi}},'[data-dropdown-open="false"]:focus-within':{"& ~ [dropdown]":{...bA}},onComplete:{always:!0,handler:by},onPointerdown:_y,onClick:wy,onKeydown:Sy,onFocusin:mA,onFocusout:Rd,Input_trigger:{type:"checkbox",opacity:"0",position:"absolute",inset:"0",width:"100%",height:"100%",cursor:"pointer",onClick:(t,e)=>g2(t,e)}};var wA={};F(wA,{Notification:()=>E2});var E2={display:"flex",theme:"alert",padding:"Z1 B Z A",round:"A A A Y2",gap:"X2",cursor:"pointer",align:"flex-start center",IconText:{Icon:{name:"info outline"},Text:{":empty":{hide:!0}}},Hgroup:{extends:["Flex","Hgroup"],flow:"y",align:"flex-start",gap:"X2",H:{tag:"h6",margin:"0",fontWeight:"600",lineHeight:"1em",text:"Notification",":empty":{hide:!0}},P:{fontSize:"Z",margin:"0",text:"is not always a distraction",":empty":{hide:!0}}}};var mi=Object.assign({},QE,tv,ev,nv,ov,cv,lv,fv,iv,uv,dv,av,pv,hv,gv,mv,yv,bv,_v,wv,Sv,xv,vv,Jv,Zv,Qv,eA,aA,cA,lA,_A,wA);function xy(t){if(t==null)return 0;if(typeof t!="object")return v2(String(t));let e=2166136261;if(Array.isArray(t)){e=(e^91)*16777619;for(let r=0;r<t.length;r++)e=(e^xy(t[r]))*16777619;return e>>>0}let n=Object.keys(t).sort();for(let r=0;r<n.length;r++)e=(e^v2(n[r]))*16777619,e=(e^xy(t[n[r]]))*16777619;return e>>>0}function v2(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=e*16777619>>>0;return e}function ky(t,e){if(t===e)return!0;if(t===null||e===null||typeof t!=typeof e||typeof t!="object")return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!ky(t[o],e[o]))return!1;return!0}let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++){let s=n[o];if(!Object.prototype.hasOwnProperty.call(e,s)||!ky(t[s],e[s]))return!1}return!0}function SA(t,e){if(e===void 0)return t;if(t===void 0)return e;if(e===null)return null;if(typeof e!="object"||Array.isArray(e))return e;if(typeof t!="object"||Array.isArray(t))return{...e};let n=!1,r={};for(let o in t)if(o in e){let s=SA(t[o],e[o]);r[o]=s,s!==t[o]&&(n=!0)}else r[o]=t[o];for(let o in e)o in t||(r[o]=e[o],n=!0);return n?r:t}function xA(t,e,n){if(!e||typeof e!="object")return t;if(!t||typeof t!="object")return e;if(n||(n=new WeakSet),n.has(e))return t;n.add(e);for(let r in e){let o=e[r];o&&typeof o=="object"&&!Array.isArray(o)&&t[r]&&typeof t[r]=="object"&&!Array.isArray(t[r])?xA(t[r],o,n):t[r]=o}return t}function Uo(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 Dc(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Pd(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Uo(e)}function A2(t){return t.split(`
89
+ `).map(Uo).join(`
90
+ `)}var C2={display:"d",position:"pos",padding:"p",paddingTop:"pt",paddingRight:"pr",paddingBottom:"pb",paddingLeft:"pl",paddingBlock:"pbl",paddingInline:"pin",margin:"m",marginTop:"mt",marginRight:"mr",marginBottom:"mb",marginLeft:"ml",marginBlock:"mbl",marginInline:"min",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",scrollBehavior:"sb",inset:"ins"};function T2(t,e){let n=C2[t]||Uo(t),r=Pd(e),o=`_${n}-${r}`,s=Dc(t),i=UK[s],a=i?`${s}: ${e};${i}: ${e}`:`${s}: ${e}`,c=`.${o}{${a}}`;return`${o}
91
+ ${c}`}var UK={"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"},VK="@media (hover: hover)",zK=/(?:^|[^\\]):hover(?![\w-])/,O2=t=>typeof t=="string"&&(t.indexOf("{")!==-1||t.indexOf("}")!==-1);function R2(t){let e=t.split("\0"),n=[],r=[];for(let o=0;o+1<e.length;o+=2){let s=e[o],i=e[o+1];if(!i||O2(i))continue;let a=C2[s]||Uo(s),c=Pd(i),l=`_${a}-${c}`,f=Dc(s);n.push(l),r.push(`.${l}{${f}:${i}}`)}return n.join(" ")+"\0"+r.join(`
92
+ `)}function P2(t,e,n){let r=t+e,o=`_c${Uo(r)}`,s=e.split("\0"),i="";for(let l=0;l+1<s.length;l+=2){let f=s[l],u=s[l+1];u&&(O2(u)||(i+=`${Dc(f)}:${u};`))}let a,c;if(t.startsWith("@media"))c=`.${o}`,a=`${t}{${c}{${i}}}`;else if(t.startsWith(":")||t.startsWith("&")||t.startsWith("[")&&!t.includes("&")){let l=t.startsWith("&")?t.slice(1):t;c=`.${o}${l}`,a=`${c}{${i}}`}else t.includes("&")?(c=t.replace("&",`.${o}`),a=`${c}{${i}}`):(c=`.${o} ${t}`,a=`${c}{${i}}`);return n!==!1&&zK.test(c)&&(a=`${VK}{${a}}`),`${o}
93
+ ${a}`}var kA=null;function vy(t){kA=t}var In={structuralHash:xy,deepEqual:ky,mergeStructural:SA,overwriteDeep:xA,shortHash:Uo,toKebab:Dc,sanitizeValue:Pd,batchShortHash:A2,atomicCssClass:T2,batchAtomicCss:R2,compoundCssClass:P2},L2=!1,Ey=null;function D2(t){return Ey||(Ey=import(t||"@symbo.ls/wasm/pkg").then(e=>(e.structuralHash&&(In.structuralHash=e.structuralHash),e.deepEqual&&(In.deepEqual=e.deepEqual),e.mergeStructural&&(In.mergeStructural=e.mergeStructural),e.overwriteDeep&&(In.overwriteDeep=e.overwriteDeep),e.shortHash&&(In.shortHash=e.shortHash),e.toKebab&&(In.toKebab=e.toKebab),e.sanitizeValue&&(In.sanitizeValue=e.sanitizeValue),e.batchShortHash&&(In.batchShortHash=e.batchShortHash),e.atomicCssClass&&(In.atomicCssClass=e.atomicCssClass),e.batchAtomicCss&&(In.batchAtomicCss=e.batchAtomicCss),e.compoundCssClass&&(In.compoundCssClass=e.compoundCssClass),L2=!0,kA&&e.batchAtomicCss&&kA({batchAtomicCss:e.batchAtomicCss,compoundCssClass:e.compoundCssClass}),!0)).catch(e=>(console.debug("[smbls] WASM not available, using JS fallbacks:",e.message),!1)),Ey)}function I2(){return L2}M();var Ld={};F(Ld,{BRENDER_REGISTRY_BLOCK:()=>Df,BRENDER_REGISTRY_TREE_BLOCK:()=>If,BRENDER_STAMP_META:()=>Qh,CDN_PROVIDERS:()=>Qe,DESIGN_SYSTEM_BLOCK:()=>Ff,DESIGN_SYSTEM_DEFERRED:()=>$f,DESIGN_SYSTEM_LINK:()=>Nf,DOMQL_EVENTS:()=>W_,DOMQ_PROPERTIES:()=>Qr,ELEMENT_METHOD_OVERRIDE_POINTS:()=>Yi,ENV:()=>hw,HTML_TAGS:()=>na,LIBRARY_PACKAGES:()=>Xh,LIBRARY_SCOPES_KEY:()=>ws,METHODS:()=>eo,METHODS_EXL:()=>xl,NODE_ENV:()=>Sn,OPTIONS:()=>Jl,PACKAGE_MANAGER_TO_CDN:()=>fo,PARSED_DOMQ_PROPERTIES:()=>Sl,POLYGLOT_LANG_STORAGE_KEY:()=>Uh,PROPS_METHODS:()=>to,REVIVED_MARK:()=>Ol,STATE_DATA_MERGE_EXL:()=>gh,STATE_METHODS:()=>Qo,STATE_PROPERTIES:()=>z_,SVG_TAGS:()=>bO,TYPES:()=>hl,UNIVERSAL_RESERVED_KEYS:()=>jh,__resetBuiltinMethodWarnings:()=>gx,addCaching:()=>lh,addContext:()=>ch,addExtend:()=>$w,addExtends:()=>Vn,addItemAfterEveryElement:()=>O_,addProtoToArray:()=>yl,addRef:()=>sh,alternateLinkKey:()=>ks,applyCSS:()=>CA,applyDependentState:()=>nS,applyEvent:()=>mh,applyEventUpdate:()=>yh,applyExtends:()=>SO,applyProps:()=>Hl,arrayContainsOtherArray:()=>x_,arraysEqual:()=>P_,arrayzeValue:()=>As,bareLibraryKey:()=>vf,bindLibraryGlobalScopes:()=>Cf,brenderRegistryBlock:()=>Sx,brenderRegistryTreeBlock:()=>xx,brenderStampMeta:()=>vx,buildImgSrcset:()=>Uf,buildSourcesAndImg:()=>Vf,cache:()=>aS,call:()=>qS,captureSnapshot:()=>YS,checkForStateTypes:()=>Zw,checkIfInherits:()=>hh,checkIfStringIsInArray:()=>I_,clone:()=>Q_,cloneAndMergeArrayExtend:()=>Nl,cloneFunction:()=>Sw,collectExtendsList:()=>ra,concatAddExtends:()=>Iw,copyJavaScriptToClipboard:()=>Px,copyStringToClipboard:()=>Rx,createBasedOnType:()=>oh,createElement:()=>Jw,createElementExtends:()=>Kp,createExtends:()=>Fl,createExtendsFromKeys:()=>oa,createExtendsStack:()=>Xp,createIfConditionFlag:()=>xw,createInheritedState:()=>Qw,createKey:()=>Dl,createNestedObject:()=>aw,createNestedObjectByKeyPath:()=>eS,createObjectWithoutPrototype:()=>Bp,createParent:()=>ih,createPath:()=>ah,createProps:()=>Wl,createPropsStack:()=>nh,createPrunedLibraryIconLoader:()=>og,createRoot:()=>Xw,createScope:()=>oS,createSnapshotId:()=>Ll,currentPathname:()=>ys,customDecodeURIComponent:()=>V_,customEncodeURIComponent:()=>U_,cutArrayAfterValue:()=>C_,cutArrayBeforeValue:()=>A_,debounce:()=>Ml,debounceOnContext:()=>_w,decodeBrenderRegistry:()=>Mf,decodeNewlines:()=>j_,deepClone:()=>pt,deepContains:()=>sw,deepDefaults:()=>_a,deepDestringifyFunctions:()=>be,deepExtend:()=>Wp,deepMerge:()=>bt,deepMergeExtends:()=>zn,deepStringifyFunctions:()=>Al,defineSetter:()=>WS,designSystemBlock:()=>Ex,designSystemLink:()=>kx,destringifyGlobalScope:()=>is,detectHeightOnInit:()=>ex,detectInfiniteLoop:()=>uw,document:()=>kt,encodeBrenderRegistry:()=>Zh,encodeNewlines:()=>B_,error:()=>gs,escapeHtml:()=>U,escapeRegExp:()=>M_,excludeKeysFromObject:()=>pw,exec:()=>St,exposeBagGlobalScopes:()=>Tf,extendCachedRegistry:()=>Mw,extendStackRegistry:()=>Bl,extractArrayExtend:()=>Ul,faviconLinkKey:()=>ho,fetchLibraryData:()=>xa,fibonacciNumberByIndex:()=>nx,fileEntryUrl:()=>tg,filterArrays:()=>L_,filterArraysFast:()=>D_,finalizeExtends:()=>Jp,findClosestNumber:()=>eg,findClosestNumberInFactory:()=>Ox,findInheritedState:()=>ph,findKeyPosition:()=>$_,flattenExtend:()=>sa,formatDate:()=>tx,generateHash:()=>Vp,generateHeadArrayTags:()=>ka,generateKey:()=>Pl,generateMetaTags:()=>Cx,get:()=>US,getActiveRoute:()=>Gv,getCDNDirUrl:()=>Wh,getCDNUrl:()=>vn,getCapitalCaseKeys:()=>jw,getCdnProviderFromConfig:()=>ya,getChildStateInKey:()=>dh,getChildren:()=>HS,getContext:()=>gf,getCookie:()=>Cw,getDB:()=>wf,getEmotionStylesheet:()=>Fx,getExtendsInElement:()=>Fw,getExtendsStack:()=>$l,getExtendsStackRegistry:()=>Hp,getFrequencyInArray:()=>k_,getFunctionSource:()=>Me,getHashedExtend:()=>jl,getImportMapScript:()=>QS,getInObjectByPath:()=>fw,getLocalStorage:()=>Ow,getNev:()=>bw,getPageMetadata:()=>Tx,getParentStateInKey:()=>uh,getPath:()=>lf,getQuery:()=>Sf,getRef:()=>zS,getRoot:()=>df,getRootContext:()=>hf,getRootData:()=>pf,getRootState:()=>uf,getRootStateInKey:()=>fh,getSpreadChildren:()=>Uw,global:()=>__,hasFunction:()=>se,hasHandlerPlugin:()=>Qi,hasOwnProperty:()=>nw,hashContent:()=>Cn,inheritChildExtends:()=>Gp,inheritChildPropsExtends:()=>qp,inheritParentProps:()=>Kl,inheritRecursiveChildExtends:()=>Yp,init:()=>cr,initProps:()=>qw,insertAfterImportMap:()=>Ax,installPrunedLibraryIconLoader:()=>jf,is:()=>ye,isArray:()=>I,isBoolean:()=>Pp,isBuiltinElementMethod:()=>H_,isContextComponent:()=>Vw,isCyclic:()=>dw,isDOMNode:()=>ge,isDate:()=>Dp,isDefined:()=>Ut,isDevelopment:()=>ro,isEmpty:()=>$p,isEmptyObject:()=>rw,isEqualDeep:()=>Fp,isFailedRevival:()=>os,isFunction:()=>L,isHtmlElement:()=>dl,isLazyFunction:()=>tw,isLocal:()=>yw,isLoudDevRuntime:()=>tt,isMalformedDependency:()=>bs,isMethod:()=>GS,isMobile:()=>vw,isNode:()=>dr,isNot:()=>S_,isNotProduction:()=>pr,isNull:()=>Lp,isNumber:()=>me,isObject:()=>k,isObjectLike:()=>V,isPhoto:()=>rx,isPolyglotRetranslatableKey:()=>Xl,isPolyglotWritableKey:()=>cs,isProduction:()=>no,isProtectedElementMethod:()=>ts,isRevived:()=>ss,isStaging:()=>mw,isState:()=>tS,isString:()=>v,isStringFunction:()=>Zi,isStringTag:()=>Tl,isTest:()=>Up,isTesting:()=>gw,isUndefined:()=>Xt,isUniversallyReservedKey:()=>XS,isUnresolvableDependency:()=>uo,isValidDependencyMap:()=>_s,isValidHtmlTag:()=>Pw,isWrappedLibrary:()=>Ne,joinArrays:()=>Ki,jointStacks:()=>Nw,jsonForScript:()=>gr,keys:()=>Fh,lastLevel:()=>oy,lastPathname:()=>Cc,libraryIconPruneReplacer:()=>$x,libraryIdentifier:()=>ng,libraryPackageSpecs:()=>wa,librarySpecsFor:()=>Yh,loadCssFile:()=>ax,loadJavascript:()=>cx,loadJavascriptFile:()=>ox,loadJavascriptFileEmbedSync:()=>ix,loadJavascriptFileSync:()=>sx,loadLazy:()=>Uv,loadRemoteCSS:()=>lx,loadRemoteScript:()=>ba,log:()=>KS,logGroupIf:()=>Ew,logIf:()=>kw,lookdown:()=>BS,lookdownAll:()=>jS,lookup:()=>FS,lowercaseFirstLetter:()=>Zo,makeObjectWithoutPrototype:()=>ow,map:()=>Z_,mapStringsWithContextComponents:()=>Vl,markPolyglotSeeded:()=>Wn,markRevived:()=>Ji,matchRoute:()=>Wv,matchesComponentNaming:()=>Hn,memoize:()=>ww,merge:()=>Lt,mergeSharedLibraries:()=>Of,mergeSharedLibraryDesignSystems:()=>Rf,mergeStateData:()=>so,nextElement:()=>yf,normalizeIgnoreList:()=>Af,normalizeLibraryKey:()=>Ss,objectToString:()=>Cl,objectizeStringProperty:()=>zl,overwrite:()=>Rl,overwriteDeep:()=>ie,overwriteShallow:()=>as,overwriteState:()=>rS,parse:()=>Bh,parseDeep:()=>af,parseQuery:()=>Kv,parseRoutePattern:()=>ry,payloadHasComputedIconName:()=>rg,pickStartLang:()=>Hh,pickupElementFromProps:()=>th,pickupPropsFromElement:()=>Qp,planLibraryIconPrune:()=>Nx,polyglotAddressLang:()=>Vh,polyglotFallbackLang:()=>_r,polyglotLangStorageKey:()=>ha,polyglotLanguages:()=>En,polyglotSeededKeys:()=>io,polyglotStartLang:()=>ms,polyglotStartRule:()=>zh,polyglotStartupScript:()=>JS,previousElement:()=>bf,promoteActiveRootState:()=>da,propExists:()=>Ww,propertizeElement:()=>eh,propertizeUpdate:()=>Hw,readBrenderStamp:()=>ds,readJsonDataBlock:()=>qn,reinit:()=>AA,remove:()=>O1,removeChars:()=>Lx,removeCookie:()=>Tw,removeDuplicateProps:()=>Gl,removeDuplicatesInArray:()=>qi,removeFromArray:()=>E_,removeFromObject:()=>iw,removeNestedKeyByPath:()=>cw,removeValueFromArray:()=>ml,removeValueFromArrayAll:()=>T_,reorderArrayByValues:()=>R_,repairLegacyArrowScopePreamble:()=>kl,replaceLiteralsWithObjectFields:()=>Jt,replaceOctalEscapeSequences:()=>F_,resolveAsset:()=>_e,resolveFileReferences:()=>vs,resolveHandler:()=>ta,resolveRouterElement:()=>Ad,resolveSharedLibraries:()=>Pf,returnValueAsText:()=>rh,router:()=>Dn,runGuards:()=>g$,runPluginHook:()=>oo,saveScrollPosition:()=>Sd,scopeElementParam:()=>Ip,scopeReceiverExpression:()=>Y_,scratchSystem:()=>Ua,scratchUtils:()=>_o,self:()=>w_,set:()=>Ks,setActiveRootState:()=>ff,setCookie:()=>Aw,setHashedExtend:()=>zp,setInObjectByPath:()=>lw,setLocalStorage:()=>Rw,setNodeStyles:()=>$h,setProps:()=>VS,setPropsPrototype:()=>ql,sharedLibrary:()=>hx,sharedLibraryFiles:()=>xs,splitPackageSpecifier:()=>xf,spotByPath:()=>cf,srcsetFor:()=>Ea,stringIncludesAny:()=>_l,stringToObject:()=>ew,stripVersionRangePrefix:()=>kf,swapItemsInArray:()=>v_,syncProps:()=>Yl,themeColorKey:()=>Es,toCamelCase:()=>wr,toDashCase:()=>Bf,toDescriptionCase:()=>Ix,toPriorityOrder:()=>Xe,toTitleCase:()=>Dx,toggleFullscreen:()=>ZS,triggerEventOn:()=>hr,triggerEventOnUpdate:()=>sS,trimStringFromSymbols:()=>N_,unstackArrayOfObjects:()=>gl,update:()=>Kw,updateProps:()=>Gw,variables:()=>_f,verbose:()=>pa,warn:()=>mf,warnLibraryAliasCollision:()=>Sa,window:()=>R});M();M();M();var WK={group:"group",imagePair:"image-pair","image-pair":"image-pair",old:"old",new:"new"},KK=/^(?:\*|\.?-?[_a-zA-Z][\w-]*)$/,qK=/^-?[_a-zA-Z][\w-]*$/,GK=new Set(["root","*"]),YK="@media (prefers-reduced-motion: no-preference)",XK="@media (prefers-reduced-motion: reduce)",JK=(t,e)=>{let n=v(t)?{animation:t}:k(t)?t:null;if(!n)return null;let r;try{r=ee(n,e)}catch{return null}let o={};for(let s in r){let i=r[s];(v(i)||me(i))&&(o[s]=i)}return Object.keys(o).length?o:null},M2=(t,e,n={})=>{if(!k(t))return null;if(globalThis.__SMBLS_BUILD_DROP_F_viewTransition__)return Object.keys(t).length&&qt("viewTransition")||null;let r=!n.scope||n.scope===":root",o=l=>{n.verbose!==!1&&console.warn("[smbls] designSystem.viewTransition: "+l)},s={key:"viewTransition",state:{},context:{designSystem:e}},i={},a={},c=(l,f,u)=>{for(let d in f){if(d==="types"&&!u)continue;let p=WK[d];if(!p){o(`${l}.${d} is not a view-transition part (group, imagePair, old, new)`);continue}let g=`${u}::view-transition-${p}(${l})`,h=JK(f[d],s);h&&(i[g]=h,a[g]={animation:"none"})}};for(let l in t){let f=t[l];if(k(f)){if(!KK.test(l)){o(`"${l}" is not a view-transition name`);continue}if(!r&&GK.has(l)){o(`"${l}" belongs to the document's primary app; a scoped app (${n.scope}) emits its own names only`);continue}if(c(l,f,""),k(f.types))for(let u in f.types){if(!qK.test(u)||!k(f.types[u])){o(`${l}.types.${u} is not a view-transition type with parts`);continue}c(l,f.types[u],`:root:active-view-transition-type(${u})`)}}}return Object.keys(i).length?{[YK]:i,[XK]:a}:null};var ZK=P(),$2=(t=ZK,e)=>{let n=k(e.localFile)?e.localFile:{},r=pt(n.designSystem||{});return bt(t,r,ae)},QK={useVariable:!0,useReset:!0,useFontImport:!0,useIconSprite:!0,useDocumentTheme:!0,useSvgSprite:!0},Ay=(t,e)=>{let n=!e||e===":root",r={};for(let o in t)if(o.startsWith("@media")){let s=n?":root:not([data-theme])":`:root:not([data-theme]) ${e}:not([data-theme])`;r[o]={[s]:t[o]}}else n?r[o]=t[o]:r[`${e}${o}, ${o} ${e}`]=t[o];return r},EA=(t,e)=>{t.CSS_MEDIA_VARS&&Ot(Ay(t.CSS_MEDIA_VARS,e));let n=Hs(t.cssSkinVars,t.cssSkinFallback,e);Object.keys(n).length&&Ot(n)},F2=(t,e)=>{let n=M2(t.viewTransition,t,{scope:e,verbose:t.verbose});n&&Ot(n)},Cy=t=>{if(typeof window<"u"&&window.location)try{let e=new URLSearchParams(window.location.search).get("globalTheme");if(e)return e}catch{}return t},N2=(t,e)=>{t.useVariable&&(Ot({[e]:t.CSS_VARS}),EA(t,e)),t.useReset&&Ot(t.reset);let n=t.animation;if(n){let r={};for(let o in n)r[`@keyframes ${o}`]=n[o];Ot(r)}F2(t,e)},B2=(t,e,n,r,o)=>{t.useFontImport&&Ot(Yf(t.font,t.files));let s=null;return o?ju(o):n.recordCss?s=Bu(()=>N2(t,e)):N2(t,e),(r.svg||t.useSvgSprite)&&vu(t.svg,{document:n.document}),(r.icons||t.useIconSprite)&&zs(t.icons,{document:n.document}),s},cr=(t,e=QK)=>{let n=$2(t||{},e),r=e.scopeSelector||":root",o=Cy(e.globalTheme),s=Ks({verbose:e.verbose,useReset:e.useReset,useFontImport:e.useFontImport,useVariable:e.useVariable,useSvgSprite:e.useSvgSprite,useDocumentTheme:e.useDocumentTheme,useIconSprite:e.useIconSprite,useDefaultConfig:e.useDefaultConfig,globalTheme:o,themeRoot:e.themeRoot,files:e.files,assets:e.assets,...n},{newConfig:e.newConfig,config:e.config});s&&(s.scopeSelector=r);let i={svg:!!t.svg,icons:!!t.icons},a=B2(s,r,e,i);return a&&typeof e.recordCss=="function"&&e.recordCss({rules:a,sprites:i}),s},vA=(t,e,n,r)=>{let o=n.scopeSelector||":root";if(Kg(t.config,e),n.files!==void 0&&(e.files=n.files),n.assets!==void 0&&(e.assets=n.assets),n.themeRoot!==void 0&&(e.themeRoot=n.themeRoot),mo(e),yo(e),Du(e),e.__svgCache={},r){mt(e);try{Lu("font",r)}finally{ht()}}mt(e);try{B2(e,o,n,t.sprites||{},t.rules)}finally{ht()}return e},Ty={},AA=(t,e=Ty)=>{let n=$2(t||{},e),r=e.scopeSelector||":root",o=Ks({verbose:!1,...n});return e.preventInject||(Ot({[r]:o.CSS_VARS}),EA(o,r),Ot(o.reset),F2(o,r)),o},CA=(t,e=Ty)=>{Ot(t)},t7=(t,e=Ty)=>{let n=e.scopeSelector||":root";Ot({[n]:t.CSS_VARS}),EA(t,n)};var e7=(t,e=Ty)=>{};M();var j2=10,n7=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return!!e&&typeof e.requestAnimationFrame=="function"},r7=t=>{try{let e=t.defaultView;return e&&e.frameElement||null}catch{return null}},o7=t=>{let e=t&&t.document||(typeof document<"u"?document:null);if(!e)return()=>!0;let n=!!e.defaultView,r=r7(e);return()=>!(n&&!e.defaultView||r&&!r.isConnected)},U2=Symbol("smbls.bootGone"),V2=t=>{let e,n={live:o7(t),dead:!1,gone:new Promise(r=>{e=r}),lost(){n.dead||(n.dead=!0,e(U2))}};return n},Ic=t=>t?t.dead?!1:t.live()?!0:(gd(t),!1):!0,s7=(t,e)=>e?Promise.race([t,e.gone]):t,Vo=async(t,e)=>await s7(t,e)!==U2&&Ic(e),TA=t=>{if(!(!t||!t.__ref))try{dn(t)}catch{}},z2=new WeakSet,Mc=t=>(z2.add(t),t),Dd=t=>!!t&&typeof t=="object"&&z2.has(t),H2=t=>{let e=t&&typeof t=="object"?t.firstRender:void 0;if(e===!1||!n7(t))return null;if(e===void 0||e===!0)return{budget:j2,progressive:!1};if(e&&typeof e=="object"){let r=e.budget===void 0?j2:sr(e.budget);return r?{budget:r,progressive:e.progressive===!0}:null}let n=sr(e);return n?{budget:n,progressive:!1}:null},OA=new WeakMap,RA=(t,e)=>(OA.set(t,e),e),PA=t=>{OA.delete(t)},W2=t=>{let e=t&&OA.get(t);return!e||e.routeTaken?null:(e.routeTaken=!0,e)},i7=Object.freeze({deferAttach:!0}),K2=async(t,e,n,r,o)=>{let s=o.lease||null;if(await ir(),!Ic(s))return null;let i=r.mountYield;i===void 0&&(r.mountYield=o.budget);let a=r.mountWhole;a===void 0&&(r.mountWhole=!o.progressive),o.pageOptions={mountYield:r.mountYield,mountWhole:r.mountWhole};let c;o.commit=new Promise(d=>{c=d}),o.committed=!1;let l=!o.progressive;RA(n,o);let f=ri(),u=null;s&&(n.__mountLease=s);try{if(u=Yt(t,e,n.key,r,l?i7:void 0),!await Vo(Ur(u),s)||o.routeReady&&!await Vo(o.routeReady,s)||!await Vo(Ce(),s))return Oy(u);for(;!$o();)if(!await Vo(Ce(),s))return Oy(u);return l&&Io(u),o.committed=!0,c(),o.page&&await Ur(o.page),await Ce(),u}finally{o.committed=!0,c(),f(),r.mountYield=i,r.mountWhole=a,s&&(n.__mountLease=null),PA(n)}},Oy=t=>(TA(t),null);var G2=t=>!t||t==="srcdoc"||t==="about:srcdoc"||t==="blank"||t==="about:blank"?"/":t,a7=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},DA={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},c7=(t,e)=>{if(!e)return t;let n=Array.isArray(e)?e:e.split("."),r=t;for(let o of n){if(!r||!r[o])return null;r=r[o]}return r},Id=(t,e)=>(Ad||c7)(t,e),l7=["manual","auto","restore"],LA=new WeakMap,q2=(t,e)=>{let n=e.claims[e.claims.length-1],r=n?n.value:e.found;t.scrollRestoration!==r&&(t.scrollRestoration=r)},f7=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!l7.includes(n)){if(t.verbose!==!1){let r=typeof n=="string"?JSON.stringify(n):`a ${typeof n}`;console.warn(`[smbls/router] router.scrollRestoration must be 'manual', 'auto' or 'restore', got ${r} \u2014 the browser default stays`)}return}try{let r=t.window||R,o=r&&r.history;if(!o||!("scrollRestoration"in o))return;let s=LA.get(o);s||(s={found:o.scrollRestoration,claims:[]},LA.set(o,s));let i={value:n==="restore"?"manual":n};s.claims.push(i),q2(o,s),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{let a=s.claims.indexOf(i);if(a!==-1){s.claims.splice(a,1),s.claims.length||LA.delete(o);try{q2(o,s)}catch{}}})}catch{}}},u7=(t,e)=>{if(!e||e.scrollRestoration!=="restore")return;let n=Sd,r=t.window||R;if(typeof n!="function"||!r||typeof r.addEventListener!="function")return;let o=t.document||r.document,s=()=>n(r),i=()=>{o.visibilityState==="hidden"&&n(r)};r.addEventListener("pagehide",s);let a=!!o&&typeof o.addEventListener=="function";a&&o.addEventListener("visibilitychange",i),t.__teardowns=t.__teardowns||[],t.__teardowns.push(()=>{r.removeEventListener("pagehide",s),a&&o.removeEventListener("visibilitychange",i)})},Y2=(t,e)=>{if(e.router===!1)return;e.router===!0?e.router=DA:e.router=Lt(e.router||{},DA);let n=e.router;f7(e,n),u7(e,n);let r=(i,a)=>{let c=i.context?.window||R,l=a7(n);if(!l){if(!c.location)return;let{pathname:u,search:d,hash:p}=c.location;u=G2(u),l=u+d+p}let f=i;if(n.customRouterElement){let u=Id(i,n.customRouterElement);u&&(f=u,i.routes&&(f.routes=i.routes))}if(f.routes)return Dn(l,f,{},{initialRender:!0,pushState:!1,...a})},o=async(i,a)=>{let c=W2(i.context);if(c)return d7(i,c,r);await r(i)},s=!Xt(t.onRenderRouter);return n&&n.initRouter&&!s&&(t.onRenderRouter=(i,a)=>e.__firstNavigation=o(i,a)),p7(e,n),n},d7=(t,e,n)=>{let r;return e.routeReady=new Promise(s=>{r=s}),(async()=>{try{if(await ir(),!t.__ref||!Ic(e.lease))return;let s=n(t,e.progressive?{mountOptions:e.pageOptions}:{mountOptions:e.pageOptions,firstView:e});await Ce(),r(),await s}finally{r()}})()},IA=(t,e)=>{if(e.router===!1)return;let n=e.router||DA;if(!n.popState)return;let r=e.utils&&e.utils.router?e.utils.router:Dn,o=e.window||R,s=async i=>{let{pathname:a,search:c,hash:l}=o.location;a=G2(a);let f=a+c+l,u=t;if(n.customRouterElement){let d=Id(t,n.customRouterElement);d&&(u=d,t.routes&&(u.routes=t.routes))}await u.call("router",f,u,{},{pushState:!1,scrollToTop:!1,level:0,event:i})};o.addEventListener("popstate",s),e.__teardowns=e.__teardowns||[],e.__teardowns.push(()=>o.removeEventListener("popstate",s))},p7=(t,e)=>{let{components:n}=t;if(e&&e.injectRouterInLinkComponent)return bt(n.Link||n["smbls.Link"],n.RouterLink||n["smbls.RouterLink"])};var FA={};F(FA,{components:()=>NA,functions:()=>Hr});var $A={};F($A,{AlertTemplate:()=>jy,ConfirmTemplate:()=>By,CustomTemplate:()=>Vy,ModalLayer:()=>Fy,ModalRoot:()=>$y,PromptTemplate:()=>Uy,windowsComponents:()=>NA});var MA={};F(MA,{alertDialog:()=>My,closeAllModals:()=>Dy,closeModal:()=>Py,confirmDialog:()=>Iy,getLayer:()=>Ry,openModal:()=>Ly,promptDialog:()=>Ny,windowsFunctions:()=>Hr});function lt(t){let e=t;for(;e;){if(e.layer!==void 0)return e.layer;e=e.parent}return null}function Nc(t){let e=t;for(;e;){if(e.key==="ModalRoot")return e;if(e.ModalRoot&&e.ModalRoot.__ref)return e.ModalRoot;e=e.parent}let n=t?.getRoot?.();return n?.ModalRoot?n.ModalRoot:typeof globalThis<"u"&&globalThis.__SMBLS_WINDOWS_MODAL_ROOT__?.__ref?globalThis.__SMBLS_WINDOWS_MODAL_ROOT__:null}function Ry(){return lt(this)}var h7=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.setProperty!="function"||(r.style.setProperty("display","none","important"),r.style.setProperty("opacity","0","important"),r.style.setProperty("visibility","hidden","important"),r.style.setProperty("pointer-events","none","important"))},X2=(t,e)=>{let n=t&&t["ModalLayer_"+e],r=n?.node||n?.__ref?.node;!r||typeof r.style?.removeProperty!="function"||(r.style.removeProperty("display"),r.style.removeProperty("opacity"),r.style.removeProperty("visibility"),r.style.removeProperty("pointer-events"))};function Py(t){let e=Nc(this);if(!e)return;let n=e.state?.stack||[];if(!n.length)return;let r,o,s;if(t){if(s=[],r=n.filter((i,a)=>{let c=i.id!==t;return c||s.push(a),c}),r.length===n.length)return;o=n.filter(i=>i.id===t)}else r=n.slice(0,-1),o=n.slice(-1),s=[n.length-1];e.state.update({stack:r});for(let i of s)h7(e,i);for(let i of o)if(typeof i.onClose=="function")try{i.onClose()}catch(a){console.warn("[windows] onClose threw:",a)}}function Ly(t={}){let e=Nc(this);if(!e)return console.warn("[windows] openModal: ModalRoot is not mounted on the app root. Add `ModalRoot: {}` to your shell tree and import windowsComponents into context."),null;e.__modalIdCounter=(e.__modalIdCounter||0)+1;let n=t.id||`modal_${e.__modalIdCounter}_${Date.now().toString(36)}`,r={id:n,template:t.template||"custom",title:t.title,message:t.message,icon:t.icon,confirmText:t.confirmText,cancelText:t.cancelText,okText:t.okText,confirmTheme:t.confirmTheme,placeholder:t.placeholder,defaultValue:t.defaultValue,dismissOnBackdrop:t.dismissOnBackdrop,content:t.content,width:t.width,maxWidth:t.maxWidth,maxHeight:t.maxHeight,onConfirm:t.onConfirm,onCancel:t.onCancel,onOk:t.onOk,onClose:t.onClose},o=e.state?.stack||[];if(o.length>=5)return console.warn("[windows] openModal: stack already at the 5-layer maximum, dropping the new layer. Close some modals first."),null;let s=o.length;return X2(e,s),e.state.update({stack:[...o,r]}),n}function Dy(){let t=Nc(this);if(!t)return;let e=t.state?.stack;if(!e?.length)return;let n=e.slice();t.state.update({stack:[]});for(let r=n.length-1;r>=0;r--){let o=n[r];if(typeof o?.onClose=="function")try{o.onClose()}catch(s){console.warn("[windows] onClose threw:",s)}}}function Iy(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"confirm"})}function My(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"alert"})}function Ny(t){let e=typeof t=="string"?{message:t}:t||{};return this.call("openModal",{...e,template:"prompt"})}var Hr={openModal:Ly,closeModal:Py,closeAllModals:Dy,confirmDialog:Iy,alertDialog:My,promptDialog:Ny,getLayer:Ry};var g7=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),J2=t=>{if(!t?.querySelectorAll)return[];let e=t.querySelectorAll(g7),n=[];for(let r=0;r<e.length;r++){let o=e[r];(o.offsetParent!==null||o===document.activeElement)&&n.push(o)}return n},Z2=t=>{let e=t.state?.stack||[];if(!e.length)return null;let n=t["ModalLayer_"+(e.length-1)];return n?.node||n?.__ref?.node||null},$y={tag:"div",position:"fixed",inset:"0",zIndex:"2000",pointerEvents:"none",state:{stack:[]},subscribeTo:["stack"],ModalLayer_0:{__slotIndex:0,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[0]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_1:{__slotIndex:1,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[1]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_2:{__slotIndex:2,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[2]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_3:{__slotIndex:3,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[3]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},ModalLayer_4:{__slotIndex:4,subscribeTo:["stack"],layer:(t,e)=>e?.stack?.[4]||null,opacity:t=>t.layer?"1":"0",visibility:t=>t.layer?"visible":"hidden",pointerEvents:t=>t.layer?"auto":"none"},onInit:(t,e)=>{if(typeof window>"u")return;globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=t;let n=t.context;if(n){n.functions||(n.functions={});for(let c in Hr)c in n.functions||(n.functions[c]=Hr[c])}t.__modalOpeners=t.__modalOpeners||[],t.__prevStackLen=t.state&&t.state.stack&&t.state.stack.length||0;let r=c=>{if(typeof c?.onCancel=="function")try{c.onCancel()}catch(l){console.warn("[windows] onCancel threw:",l)}if(typeof c?.onClose=="function")try{c.onClose()}catch(l){console.warn("[windows] onClose threw:",l)}},o=()=>{let c=t.state?.stack||[];if(!c.length)return;let l=c.length-1,f=c[l];t.state.update({stack:c.slice(0,-1)});let u=t["ModalLayer_"+l],d=u?.node||u?.__ref?.node;d?.style?.setProperty&&(d.style.setProperty("display","none","important"),d.style.setProperty("opacity","0","important"),d.style.setProperty("visibility","hidden","important"),d.style.setProperty("pointer-events","none","important")),r(f)},s=c=>{let l=t.state?.stack;if(l?.length){if(c.key==="Tab"){let f=Z2(t);if(!f)return;let u=J2(f);if(!u.length){c.preventDefault();let m=f.querySelector?.('[role="dialog"]')||f;try{m.focus?.()}catch{}return}let d=u[0],p=u[u.length-1],g=document.activeElement;if(!f.contains(g)){c.preventDefault();try{d.focus()}catch{}return}if(c.shiftKey&&g===d){c.preventDefault();try{p.focus()}catch{}}else if(!c.shiftKey&&g===p){c.preventDefault();try{d.focus()}catch{}}return}c.key!=="Escape"||c.defaultPrevented||l[l.length-1]?.dismissOnBackdrop!==!1&&(c.preventDefault(),o())}};window.addEventListener("keydown",s),t.__escHandler=s;let i=c=>{let l=t.state?.stack||[];if(c<0||c>=l.length)return;let f=l[c];t.state.update({stack:l.filter((p,g)=>g!==c)});let u=t["ModalLayer_"+c],d=u?.node||u?.__ref?.node;d?.style?.setProperty&&(d.style.setProperty("display","none","important"),d.style.setProperty("opacity","0","important"),d.style.setProperty("visibility","hidden","important"),d.style.setProperty("pointer-events","none","important")),r(f)},a=c=>{let l=t.state?.stack||[];if(!l.length)return;let f=c.target?.closest?.('[data-key="Close"]');if(f){for(let u=l.length-1;u>=0;u--){let d=t["ModalLayer_"+u],p=d?.node||d?.__ref?.node;if(p&&p.contains(f)){c.preventDefault(),c.stopPropagation(),i(u);return}}return}for(let u=l.length-1;u>=0;u--){let d=t["ModalLayer_"+u];if((d?.node||d?.__ref?.node)===c.target){if(l[u]?.dismissOnBackdrop===!1)return;c.preventDefault(),c.stopPropagation(),i(u);return}}};document.addEventListener("click",a,!0),t.__clickDelegate=a},onUpdate:t=>{if(typeof window>"u")return;let n=(t.state&&t.state.stack||[]).length,r=t.__prevStackLen||0;if(n!==r)if(t.__prevStackLen=n,t.__modalOpeners=t.__modalOpeners||[],n>r)t.__modalOpeners[n]=document.activeElement&&document.activeElement!==document.body?document.activeElement:t.__modalOpeners[n]||null,typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>{let o=Z2(t);if(!o)return;let i=J2(o)[0]||o.querySelector&&o.querySelector('[role="dialog"]')||o;try{i.focus&&i.focus()}catch{}});else{let o=null;for(let s=r;s>n;s--)t.__modalOpeners[s]&&(o=o||t.__modalOpeners[s]),t.__modalOpeners[s]=null;if(o&&typeof o.focus=="function"&&o.isConnected!==!1)try{o.focus()}catch{}}},onDestroy:t=>{typeof window>"u"||(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__===t&&(globalThis.__SMBLS_WINDOWS_MODAL_ROOT__=null),t.__escHandler&&(window.removeEventListener("keydown",t.__escHandler),delete t.__escHandler),t.__clickDelegate&&(document.removeEventListener("click",t.__clickDelegate,!0),delete t.__clickDelegate))}};var Fy={tag:"div",position:"fixed",inset:"0",alignItems:"center",justifyContent:"center",padding:"A",theme:"backdrop",transition:"opacity C defaultBezier",zIndex:(t,e)=>`${2e3+(t.__slotIndex||0)*10}`,display:(t,e)=>t.layer?"flex":"none",opacity:(t,e)=>t.layer?"1":"0",visibility:(t,e)=>t.layer?"visible":"hidden",pointerEvents:(t,e)=>t.layer?"auto":"none",ModalWindow:{attr:{role:"dialog","aria-modal":"true",tabindex:"-1","aria-labelledby":t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}},width:t=>lt(t)?.width||"H",maxWidth:t=>lt(t)?.maxWidth||"90vw",flow:"y",maxHeight:t=>lt(t)?.maxHeight||"100%",animation:"modalIn",animationDuration:"D",animationTimingFunction:"springBezier",onClick:t=>t.stopPropagation(),onMousedown:t=>t.stopPropagation(),ModalHeader:{display:"none"},overflow:"visible",ConfirmTemplate:{hide:t=>lt(t)?.template!=="confirm"},AlertTemplate:{hide:t=>lt(t)?.template!=="alert"},PromptTemplate:{hide:t=>lt(t)?.template!=="prompt"},CustomTemplate:{hide:t=>lt(t)?.template!=="custom"}}};var $c=(t,e,n)=>lt(t)?.[e]||n,m7=t=>{let e=lt(t)?.icon;return e===null||e===!1},By={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>$c(t,"title","Are you sure?"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{hide:t=>m7(t),Indicator:{extends:"Icon",opacity:".7",icon:t=>$c(t,"icon","warning")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",P:{tag:"p",margin:"0",text:t=>$c(t,"message","This action cannot be undone."),color:"dim"}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>$c(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] confirm.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:t=>$c(t,"confirmTheme","primary"),text:t=>$c(t,"confirmText","Confirm"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onConfirm)try{r.onConfirm()}catch(o){console.warn("[windows] confirm.onConfirm threw:",o)}e.call("closeModal",r?.id)}}}};var Md=(t,e,n)=>lt(t)?.[e]||n,jy={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",ModalHeader:{Hgroup:{H:{text:t=>Md(t,"title","Notice"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}},Icons:{Indicator:{extends:"Icon",opacity:".7",icon:t=>Md(t,"icon","info")}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Md(t,"message",""),P:{tag:"p",margin:"0",text:t=>Md(t,"message",""),color:"dim"}},ModalFooter:{flow:"x",align:"center end",flexShrink:"0",OkBtn:{extends:"Button",theme:"primary",text:t=>Md(t,"okText","OK"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onOk)try{r.onOk()}catch(o){console.warn("[windows] alert.onOk threw:",o)}e.call("closeModal",r?.id)}}}};var Fc=(t,e,n)=>lt(t)?.[e]||n,Uy={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",scope:{value:""},onRender:(t,e)=>{let n=lt(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},onUpdate:(t,e)=>{let n=lt(t);if(!n||t.scope._seededLayerId===n.id)return;t.scope._seededLayerId=n.id,t.scope.value=n.defaultValue||"";let r=t.InputRow&&t.InputRow.node;r&&(r.value=t.scope.value)},ModalHeader:{Hgroup:{H:{text:t=>Fc(t,"title","Enter a value"),attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},P:{if:()=>!1}}},ModalBody:{flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",hide:t=>!Fc(t,"message",""),P:{tag:"p",margin:"0",text:t=>Fc(t,"message",""),color:"dim"}},InputRow:{extends:"Input",flexShrink:"0",autofocus:!0,placeholder:t=>Fc(t,"placeholder",""),value:(t,e)=>t.parent.scope?.value||"",onInput:(t,e,n)=>{e.parent.scope.value=t.target.value},onKeydown:(t,e,n)=>{if(t.key!=="Enter")return;t.preventDefault();let r=lt(e),o=e.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}},ModalFooter:{flow:"x",gap:"Z1",align:"center end",flexShrink:"0",CancelBtn:{extends:"CancelButton",text:t=>Fc(t,"cancelText","Cancel"),onClick:(t,e,n)=>{let r=lt(e);if(r?.onCancel)try{r.onCancel()}catch(o){console.warn("[windows] prompt.onCancel threw:",o)}e.call("closeModal",r?.id)}},ConfirmBtn:{extends:"Button",theme:"primary",text:t=>Fc(t,"confirmText","OK"),onClick:(t,e,n)=>{let r=lt(e),o=e.parent.parent.scope?.value||"";if(r?.onConfirm)try{r.onConfirm(o)}catch(s){console.warn("[windows] prompt.onConfirm threw:",s)}e.call("closeModal",r?.id)}}}};var Vy={tag:"div",flow:"y",gap:"B",flex:"1 1 auto",minHeight:"0",Title:{tag:"h2",text:t=>lt(t)?.title||"",hide:t=>!lt(t)?.title,position:"absolute",width:"1px",height:"1px",margin:"-1px",padding:"0",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0",attr:{id:t=>{let e=lt(t)?.id;return e?"modal-title-"+e:null}}},Slot:{tag:"div",flex:"1 1 auto",minHeight:"0",overflowY:"auto",overscrollBehavior:"contain",onInit:t=>{let e=K(()=>{let n=lt(t),r=n?.content||null,o=n?.id||null;if(!r){t.__lastLayerId!=null&&(t.removeContent(),t.__lastLayerId=null);return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r);let s=t.content?.context;if(s){s.functions||(s.functions={});for(let i in Hr)i in s.functions||(s.functions[i]=Hr[i])}}catch(s){console.warn("[windows] custom.content set failed:",s)}}});t.__ref&&t.__ref.__effects.push(e)}}};var Q2={extends:"Button",theme:"tertiary"};var NA={ModalRoot:$y,ModalLayer:Fy,ConfirmTemplate:By,AlertTemplate:jy,PromptTemplate:Uy,CustomTemplate:Vy,"smbls.CancelButton":Q2};var qA={};F(qA,{components:()=>zA,functions:()=>WA});var HA={};F(HA,{Dropdown:()=>Gy,DropdownList:()=>Yy,DropdownParent:()=>Xy,DropdownParentFocus:()=>Jy,DropdownRoot:()=>Ky,DropdownSiblingFocus:()=>Zy,DropdownTrigger:()=>qy,dropdownComponents:()=>zA});var tF=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),y7=(t,e,n,r)=>{let o=tF(t,n,r),s=i=>o[i]>=e.height+8;return s("bottom")?"bottom":s("top")?"top":o.bottom>=o.top?"bottom":"top"},b7=(t,e,n,r,o)=>{let s=tF(e,r,o),i=t==="top"||t==="bottom"?n.height+8:n.width+8;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i||a&&s[a]>s[t]?a:t};var BA=(t,e,n)=>{let r;return t==="bottom"?r=n-e.bottom-16:t==="top"?r=e.top-16:r=n-16,Math.max(40,Math.floor(r))},zy=(t,e,n)=>Math.max(e,Math.min(n,t)),Wr=(t,e,n="auto")=>{if(!t){let g=typeof window<"u"?window.innerHeight:768;return{left:0,top:0,side:"bottom",align:"start",maxHeight:BA("center",null,g)}}let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s={width:Math.max(120,e?.width||0),height:Math.max(40,e?.height||0)};if(n==="center"){let g=BA("center",t,o),h=Math.min(s.height,g),m=zy((r-s.width)/2,8,Math.max(8,r-s.width-8)),y=zy((o-h)/2,8,Math.max(8,o-h-8));return{left:m,top:y,side:"center",align:"center",maxHeight:g}}let i,a;if(n==="auto")i=y7(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=b7(i,t,s,r,o)}let c=BA(i,t,o),l=Math.min(s.height,c),f,u;i==="bottom"||i==="top"?(a==="start"?f=t.left:a==="end"?f=t.right-s.width:f=t.left+(t.width-s.width)/2,u=i==="bottom"?t.bottom+8:t.top-l-8):(a==="start"?u=t.top:a==="end"?u=t.bottom-l:u=t.top+(t.height-l)/2,f=i==="right"?t.right+8:t.left-s.width-8);let d=Math.max(8,r-s.width-8),p=Math.max(8,o-l-8);return f=zy(f,8,d),u=zy(u,8,p),{left:f,top:u,side:i,align:a,maxHeight:c}},Bc=t=>{switch(t){case"bottom":return"translateY(-6px)";case"top":return"translateY(6px)";case"left":return"translateX(6px)";case"right":return"translateX(-6px)";case"center":return"translateY(0px)";default:return"translateY(-6px)"}};var zo={placement:"auto",trigger:"click",offset:8,minWidth:"180px",maxWidth:"90vw",maxHeight:null},_7=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},jA=t=>t?.getRoot?.()?.DropdownRoot||null,w7=0,S7=()=>`dropdown_${++w7}_${Date.now().toString(36)}`;function Hy(t={}){let e=jA(this);if(!e)return console.warn("[dropdown] openDropdown: DropdownRoot is not mounted on the app root. Add `DropdownRoot: {}` to your shell tree and import dropdown components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||_7(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||S7(),i=t.restoreEl?.node||t.restoreEl||n||(typeof document<"u"?document.activeElement:null),a={id:o,content:t.content||null,anchor:r,placement:t.placement||zo.placement,trigger:t.trigger||zo.trigger,offset:t.offset??zo.offset,minWidth:t.minWidth||zo.minWidth,maxWidth:t.maxWidth||zo.maxWidth,maxHeight:t.maxHeight||zo.maxHeight,theme:t.theme||null,shadow:t.shadow||null,background:t.background||null,round:t.round||null,role:t.role||null,ariaLabel:t.ariaLabel||null,ariaLabelledby:t.ariaLabelledby||null,focusIn:!!t.focusIn,onOpen:t.onOpen,onClose:t.onClose,restoreEl:i},c=e.state?.layer;if(c?.onClose)try{c.onClose(c)}catch(l){console.warn("[dropdown] prev onClose threw:",l)}if(e.state.update({layer:a}),typeof a.onOpen=="function")try{a.onOpen(a)}catch(l){console.warn("[dropdown] onOpen threw:",l)}return o}function Wy(t){let e=jA(this);if(!e)return;let n=e.state?.layer;n&&e.state.update({layer:{...n,inert:!!t}})}function yi(t){let e=jA(this);if(!e)return;let n=e.state?.layer;if(!n)return;let r=typeof t=="string"?t:t?.id;if(r&&n.id&&r!==n.id)return;let o=n.onClose,s=n.restoreEl,i=typeof document<"u"?document:null,a=i?i.activeElement:null,c=e.node?.querySelector?.('[data-smbls-dropdown="panel"]'),l=!a||a===i?.body,f=!!(c&&a&&c.contains(a)),u=l||f;if(e.state.update({layer:null}),u&&s&&typeof s.focus=="function")try{s.focus()}catch(d){console.warn("[dropdown] focus restore threw:",d)}if(typeof o=="function")try{o(n)}catch(d){console.warn("[dropdown] onClose threw:",d)}}var UA=(t,e)=>{let n=`${e.maxHeight}px`;return t?.maxHeight?`min(${t.maxHeight}, ${n})`:n},eF=t=>{let e=t.getBoundingClientRect();return{width:e.width,height:Math.max(e.height,t.scrollHeight||0)}},x7=`
94
94
  @keyframes smbls-dropdown-fade-in {
95
95
  from { opacity: 0; transform: var(--smbls-dropdown-from, translateY(-6px)) scale(0.98); }
96
96
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
@@ -157,22 +157,22 @@ ${a}`}var bA=null;function Sy(t){bA=t}var Dn={structuralHash:by,deepEqual:_y,mer
157
157
  [data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
158
158
  box-shadow: none !important;
159
159
  }
160
- `,f7=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=l7,document.head.appendChild(t)},G2=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},u7=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},d7=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},p7=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],Y2=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of p7){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},h7='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',g7=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(h7)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Vy={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(f7(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),gi.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}gi.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Hr(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Hr(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":$c(Hr(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return NA(e,Hr(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=K(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,Y2(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=u7(t.content)),G2(t,n),Y2(t,n),d7(t),n.focusIn&&g7(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;G2(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=q2(t.node);t._lastSize=i;let a=Hr(s.anchor,i,s.placement);t.node.style.maxHeight=NA(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",$c(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=q2(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let s=Hr(e.anchor,n,e.placement);t.node.style.maxHeight=NA(e,s),t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",$c(s.side))}}}};var $A=t=>{let r=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(r&&t.dropdownId&&r.id===t.dropdownId){t.call("closeDropdown");return}let o={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let s in o)o[s]===void 0&&delete o[s];t.call("openDropdown",o)},Hy={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),$A(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&$A(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>$A(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var zy={extends:"smbls.Dropdown"},Wy={extends:"smbls.DropdownList"},Ky={extends:"smbls.DropdownParent"},qy={extends:"smbls.DropdownParentFocus"},Gy={extends:"smbls.DropdownSiblingFocus"};var FA={DropdownRoot:Vy,DropdownTrigger:Hy,Dropdown:zy,DropdownList:Wy,DropdownParent:Ky,DropdownParentFocus:qy,DropdownSiblingFocus:Gy};var UA={};F(UA,{DROPDOWN_DEFAULTS:()=>Vo,closeDropdown:()=>gi,computePosition:()=>Hr,dropdownFunctions:()=>jA,fadeInTransform:()=>$c,openDropdown:()=>jy,setDropdownInert:()=>Uy});var jA={openDropdown:jy,closeDropdown:gi,setDropdownInert:Uy};var WA={};F(WA,{components:()=>uF,functions:()=>dF});var m7=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),y7=(t,e,n,r,o)=>{let s=m7(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},X2=(t,e,n)=>Math.max(e,Math.min(n,t)),J2=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=y7(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=X2(i,6,r-e.width-6),a=X2(a,6,o-e.height-6),{left:i,top:a,side:s}},Z2=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var Yy={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},b7=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},Q2=t=>t?.getRoot?.()?.TooltipRoot||null,tF=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},eF=(t,e,n=0)=>{let r=tF(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>eF(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},_7=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},w7=0,S7=()=>`tooltip_${++w7}_${Date.now().toString(36)}`;function nF(t={}){let e=Q2(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||b7(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||S7(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||Yy.placement,theme:t.theme||Yy.theme,open:!0,size:null};return e.state.update({tip:s}),_7(()=>eF(e,o)),o}function rF(t){let e=Q2(this);if(!e)return;let n=tF(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var HA=t=>{let e=t.tip;return e?.anchor?J2(e.anchor,e.size||{width:0,height:0},e.placement):null},Xy=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},oF={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=HA(t);return e?e.left+"px":"-9999px"},top:t=>{let e=HA(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||Yy.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>Xy(t)?"1":"0",visibility:t=>Xy(t)?"visible":"hidden",transform:t=>{if(Xy(t))return"none";let e=HA(t);return Z2(e?e.side:"bottom")},transition:t=>{let e=Xy(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var zA=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},x7=t=>{t.tooltipText&&(zA(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},sF=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,x7(t)},t.tooltipDelay??250))},iF=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},aF={onMouseenter:(t,e)=>sF(e),onMouseleave:(t,e)=>iF(e),onFocus:(t,e)=>sF(e),onBlur:(t,e)=>iF(e),onMouseover:(t,e)=>zA(e),onFocusin:(t,e)=>zA(e)};var cF={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},lF={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},fF={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var uF={TooltipRoot:oF,TooltipTrigger:aF,Tooltip:cF,TooltipHidden:lF,TooltipParent:fF};var dF={openTooltip:nF,closeTooltip:rF};var Nd={};F(Nd,{LEVELS:()=>Dd,analyzePlugin:()=>Jy,attachBrowserListeners:()=>ib,attachNetworkListeners:()=>Md,classifyEvent:()=>ZA,createAnalyzeState:()=>xF,createBeaconSink:()=>eC,createConsoleSink:()=>QA,createDedupe:()=>YA,createEnrich:()=>qA,createMemorySink:()=>tC,createPipeline:()=>eb,createRedact:()=>tb,createRemoteSink:()=>rb,createSample:()=>XA,createSummarize:()=>GA,default:()=>Jy,emitFetchEvent:()=>wF,makeEvent:()=>ft,meetsLevel:()=>Zy,normalizeLevel:()=>Id,resolveSinks:()=>sb,summarizeElement:()=>mi});var k7=0,E7=()=>`${Date.now().toString(36)}-${(k7++).toString(36)}`,ft=(t,e,n={})=>({id:E7(),ts:Date.now(),type:t,level:e,...n}),v7=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},mi=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:v7(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var Fc=t=>t?.context?.analyze,A7={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},C7=(t,{category:e,type:n,level:r})=>o=>{let s=Fc(o);!s||!s.shouldCapture(e)||s.emit(ft(n,r,{hook:t,element:mi(o)}))},pF=t=>(e,n)=>{let r=Fc(e);!r||!r.shouldCapture("state")||r.emit(ft("state","debug",{hook:t,element:mi(e),changedKeys:n?.changedKeys||null}))},Jy={name:"analyze",error(t,e){let n=Fc(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(ft("error","error",{hook:e?.hook||"error",element:mi(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=Fc(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(ft("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=Fc(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=Fc(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(ft("update","debug",{hook:"update",element:mi(t),durationMs:n}))},beforeStateUpdate:pF("beforeStateUpdate"),stateUpdate:pF("stateUpdate")};for(let[t,e]of Object.entries(A7))Jy[t]=C7(t,e);M();var Dd={error:0,warn:1,info:2,debug:3,trace:4};var Zy=(t,e)=>{let n=Dd[t],r=Dd[e];return n==null||r==null?!0:n<=r},Id=t=>Dd[t]!=null?t:"warn";M();var Qy=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var T7=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},O7=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},KA=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>KA(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(T7(s,e)||Qy.test(s)){let a=O7(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=KA(t[s],e,n,r+1);return o},tb=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}=r,h=KA(g,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}}};var qA=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=R,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},GA=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},YA=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},XA=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},hF={redact:t=>tb(t.config.redact||[],t.config.maskStrategy),enrich:t=>qA(t),summarize:()=>GA(),dedupe:t=>YA(t.config.cache?.dedupeWindowMs||1e3),sample:t=>XA(t.config.sample||{})},R7=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=hF[t];return n?n(e):null}return null},eb=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(hF.redact(t));for(let s of n){let i=R7(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let g of l)if(d=g(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};M();M();var nb=typeof R<"u"&&typeof R.document<"u",P7=5e3,L7=50,D7=3,I7=1500,M7=1e3,ZA=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",N7=t=>{try{return JSON.stringify(t)}catch{return null}},$7=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},F7=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},B7=()=>{if(!nb)return null;try{let t=R.document?.documentElement?.getAttribute("data-theme")||null,e=typeof R.matchMedia=="function"?R.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},j7=()=>{if(!nb)return null;let t=R.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:R.document?.referrer||null,title:R.document?.title||null,ua:e?.userAgent||null,browser:F7(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:$7(),viewport:R.innerWidth?{w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:B7()}},rb=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:ZA,p=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,h=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:P7,y=t.maxBatch||L7,x=t.maxRetries!=null?t.maxRetries:D7,E=t.backoffMs||I7,C=t.queueLimit||M7,_=t.sampleRate!=null?t.sampleRate:1,b=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,w=t.sessionId||b(),S=[],A=[],T=null,O=null,B=()=>{T||!S.length||(T=setTimeout(Y,m))},$=J=>{if(O)return;let Q=E*Math.pow(2,Math.max(0,J-1));O=setTimeout(()=>{if(O=null,!A.length)return;let it=A.shift();G(it.envelope,it.attempt)},Q)},N=(J,Q=!1)=>{let it=u?JA(u):null,rt={id:w,sentAt:Date.now()};Q&&(rt.endedAt=Date.now());let gt={v:1,session:rt,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:j7(),user:it?.user||null,traits:it?.traits||null,tags:it?.tags||null,events:J};if((h?JA(h)===!0:g)&&(gt.app.debug=!0),p)try{return p(gt)||null}catch{return gt}return gt},G=async(J,Q=1)=>{if(J)try{let it=!0;if(n){let rt=await n(J);it=rt!==!1&&rt?.ok!==!1}else it=await U7(e,J,{apiKey:o,getAuth:f});!it&&Q<x&&(A.push({envelope:J,attempt:Q+1}),$(Q+1))}catch{Q<x&&(A.push({envelope:J,attempt:Q+1}),$(Q+1))}},Y=(J=!1,Q=!1)=>{if(T&&(clearTimeout(T),T=null),!S.length&&!Q)return;let it=S;S=[];let rt=N(it,Q);if(rt){if(J&&nb){if(typeof r=="function"&&JA(()=>r(rt)))return;if(navigator.sendBeacon&&e){let gt=N7(rt);if(gt)try{navigator.sendBeacon(e,new R.Blob([gt],{type:"application/json"}));return}catch{}}}G(rt)}},nt=!1,ot=()=>{nt||(nt=!0,Y(!0,!0))};nb&&(R.addEventListener("pagehide",ot,{passive:!0}),R.addEventListener("beforeunload",ot,{passive:!0}),R.addEventListener("visibilitychange",()=>{R.document.visibilityState==="hidden"&&Y(!0)},{passive:!0}));let st=J=>{if(!J||_<1&&Math.random()>_)return;nt&&(nt=!1);let Q={...J,log_type:d(J)};S.push(Q),S.length>C&&(S=S.slice(-C)),S.length>=y?Y():B()},Z=J=>(Y(!1,!0),w=J||b(),nt=!1,st.sessionId=w,w);return st.flush=()=>Y(!1),st.endSession=ot,st.startNewSession=Z,st.sessionId=w,st},JA=t=>{try{return t()}catch{return null}},U7=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var V7={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},H7="\x1B[0m",ob=typeof R<"u"&&typeof R.document<"u",QA=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(ob)i(a,s);else{let c=V7[s.level]||"";i(`${c}${a}${H7}`,s)}}},tC=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},eC=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=ob?new R.Blob([c],{type:"application/json"}):c;if(ob&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};ob&&(R.addEventListener("pagehide",i,{passive:!0}),R.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},gF={console:QA,memory:tC,beacon:eC,remote:rb},mF=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},sb=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=gF[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?mF(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=gF[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?mF(t,r):r))}return n};M();var z7=typeof R<"u"&&typeof R.document<"u",W7=new Set(["password","hidden"]),yF=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},nC="__analyzeKeyPath",Bc=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[nC])return e[nC];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[nC]=i}catch{}return i},K7=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},q7=t=>!!(!t||t.tagName==="INPUT"&&W7.has(t.type)||Qy.test(t.name||"")||Qy.test(t.id||"")||t.dataset?.analyze==="skip"),ib=t=>{if(!z7)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(R,"error",s=>{t.emit(ft("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(R,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(ft("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(R,"click",i=>{t.emit(ft("pointer","info",{hook:"click",target:Bc(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:bF(i)}))},{passive:!0,capture:!0}),o(R,"dblclick",i=>{t.emit(ft("pointer","info",{hook:"dblclick",target:Bc(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(R,"contextmenu",i=>{t.emit(ft("pointer","info",{hook:"contextmenu",target:Bc(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=yF(i=>{t.emit(ft("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(R,"pointermove",s,{passive:!0})}if(e.keyboard&&o(R,"keydown",s=>{t.emit(ft("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:bF(s),target:Bc(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=q7(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=K7(a.value,t.config.maskStrategy)),t.emit(ft("forms","info",{hook:i.type,target:Bc(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(R,"input",s,{passive:!0,capture:!0}),o(R,"change",s,{passive:!0,capture:!0}),o(R,"submit",i=>{t.emit(ft("forms","info",{hook:"submit",target:Bc(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=yF(()=>{t.emit(ft("scroll","trace",{hook:"scroll",x:R.scrollX,y:R.scrollY}))},n.scroll);o(R,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Dl(()=>{t.emit(ft("viewport","info",{hook:"resize",w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}))},n.resize);o(R,"resize",s,{passive:!0}),o(R,"orientationchange",()=>{t.emit(ft("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(R.document,"visibilitychange",()=>{t.emit(ft("viewport","info",{hook:"visibilitychange",hidden:R.document.hidden}))},{passive:!0}),t.emit(ft("viewport","info",{hook:"initial",w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(ft("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(_F)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(ft("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},bF=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),G7=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=_F(t.cause)),e},_F=t=>{if(t==null)return t;if(t instanceof Error)return G7(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};M();var Y7=typeof R<"u"&&typeof R.document<"u",wF=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(ft("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Md=t=>{if(Y7&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof R.fetch=="function"){let e=R.fetch.bind(R),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(ft("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(ft("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(ft("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};R.fetch=n,t.__teardown.push(()=>{R.fetch=e})}if(typeof R.XMLHttpRequest=="function"){let e=R.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(ft("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(ft("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(ft("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var X7={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},J7={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},Z7={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},Q7={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},tq=t=>{let e={...X7,...t};return e.replay&&Object.assign(e,J7),e.telemetry&&Object.assign(e,Z7),e.remote&&Object.assign(e,Q7),Object.assign(e,t),e},eq=64,nq=()=>{if(typeof R>"u"||!R.location)return null;try{let e=new URLSearchParams(R.location.search).get("analyze");return e||null}catch{return null}},xF=(t={})=>{let e=t===!0?{}:{...t};e.capture=tq(e.capture||{});let n=nq();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=Id(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=eb(r),r.__sinks=sb(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&Zy(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<eq&&r.__preBuffer.push(s);return}o(),SF(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)SF(r,a)}try{ib(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{Md(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=Id(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{Md(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},SF=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var fC={};F(fC,{shorthandPlugin:()=>cb});var lC={};F(lC,{PRESERVE_VALUE_KEYS:()=>re,SKIP_INLINE_KEYS:()=>Ho,abbrToProp:()=>ne,decode:()=>CF,encode:()=>EF,expand:()=>bi,isComponentKey:()=>In,isSelectorKey:()=>Mn,parse:()=>_i,parseFurther:()=>Si,propToAbbr:()=>mn,shorten:()=>$d,shorthandPlugin:()=>cb,stringify:()=>yi,stringifyFurther:()=>wi});var mn={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},ne=Object.create(null);for(let t in mn)ne[mn[t]]=t;var rC=Object.create(null);for(let t in mn){let e=mn[t];if(rC[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${rC[e]}"`);rC[e]=t}var re=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Ho=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function In(t){return/^[A-Z]/.test(t)}function Mn(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function EF(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=mn[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>ab(i));e.push(o+":"+s.join(","))}else e.push(o+":"+ab(r))}return e.join(" ")}function ab(t){return String(t).replace(/ /g,"_")}function $d(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?$d(n):n});let e={};for(let n in t){let r=t[n];if(In(n)){e[n]=oC(r);continue}if(Mn(n)){e[n]=oC(r);continue}let o=mn[n]||n;if(re.has(n)||re.has(o)){e[o]=r;continue}e[o]=oC(r)}return e}function oC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?$d(e):e}):typeof t=="object"?$d(t):t}function yi(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?yi(r):r});let e={},n=[];for(let r in t){let o=t[r];if(In(r)){e[r]=kF(o);continue}if(Mn(r)){e[r]=kF(o);continue}let s=mn[r]||r;if(re.has(r)||re.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Ho.has(r)||Ho.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?yi(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(ab).join(","));continue}if(typeof o=="object"){e[s]=yi(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+ab(o))}return n.length&&(e.in=n.join(" ")),e}function kF(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?yi(e):e}):typeof t=="object"?yi(t):t}function CF(t){if(!t||typeof t!="string")return{};let e={},n=TF(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=ne[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=ne[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=ne[s]||s;if(i.includes(",")){e[a]=i.split(",").map(vF);continue}e[a]=vF(i)}return e}function TF(t){return t.trim().split(/\s+/).filter(Boolean)}function vF(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function AF(t){return t.replace(/_/g," ")}function rq(t){if(!t||typeof t!="string")return{};let e={},n=TF(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=ne[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=ne[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=ne[s]||s;if(i.includes(",")){e[a]=i.split(",").map(AF);continue}e[a]=AF(i)}return e}function bi(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?bi(n):n});let e={};for(let n in t){let r=t[n];if(In(n)){e[n]=sC(r);continue}let o=ne[n]||n;if(Mn(n)&&o===n){e[n]=sC(r);continue}if(re.has(o)||re.has(n)){e[o]=r;continue}e[o]=sC(r)}return e}function sC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?bi(e):e}):typeof t=="object"?bi(t):t}function _i(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?_i(n):n});let e={};if(typeof t.in=="string"){let n=rq(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(In(n)){e[n]=iC(r);continue}let o=ne[n]||n;if(Mn(n)&&o===n){e[n]=iC(r);continue}if(re.has(o)||re.has(n)){e[o]=r;continue}e[o]=iC(r)}return e}function iC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?_i(e):e}):typeof t=="object"?_i(t):t}function OF(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function oq(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function sq(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function RF(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function wi(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?wi(r):r});let e={},n=[];for(let r in t){let o=t[r];if(In(r)){let i=PF(o);e[r]=RF(i)?i.in:i;continue}if(Mn(r)){let i=PF(o);e[r]=RF(i)?i.in:i;continue}let s=mn[r]||r;if(re.has(r)||re.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Ho.has(r)||Ho.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?wi(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(OF).join(","));continue}if(typeof o=="object"){e[s]=wi(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+OF(o))}return n.length&&(e.in=n.join(" ")),e}function PF(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?wi(e):e}):typeof t=="object"?wi(t):t}function LF(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):oq(t)}function aC(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=ne[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=ne[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=ne[s]||s,c=sq(i);if(c.length>1){e[a]=c.map(LF);continue}e[a]=LF(i)}return e}function Si(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Si(n):n});let e={};if(typeof t.in=="string"){let n=aC(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(In(n)){typeof r=="string"?e[n]=aC(r):e[n]=cC(r);continue}let o=ne[n]||n;if(Mn(n)&&o===n){typeof r=="string"?e[n]=aC(r):e[n]=cC(r);continue}if(re.has(o)||re.has(n)){e[o]=r;continue}e[o]=cC(r)}return e}function cC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Si(e):e}):typeof t=="object"?Si(t):t}var iq={shorten:bi,stringify:_i,stringifyFurther:Si};function aq(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var cq=["components","pages","snippets"],cb={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=iq[e===!0?"shorten":e];if(r){for(let o of cq)t[o]&&(t[o]=aq(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var Fd={};F(Fd,{Inspect:()=>lb,inspectPlugin:()=>fq});M();function DF(t){return v(t)?t:I(t)?t.find(e=>v(e)):""}function uC(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&DF(t.extends),r=t.parent&&t.parent.childExtends&&DF(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function fb(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=uC(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?fb(t.parent):o&&(e[o]||n[o])?t:fb(t.parent)}var lq=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},lb={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:lq,onMousemove:(t,e,n)=>{let r=t.target.ref,o=fb(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=uC(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=fb(r);if(!o)return;let s=uC(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(k(e)){let{Content:n,...r}=e;for(let o in r)Rc[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
160
+ `,k7=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=x7,document.head.appendChild(t)},nF=(t,e)=>{if(!t.node)return;let n=e?.background;if(!n)t.node.removeAttribute("data-smbls-surface");else{let r=/^[a-z][\w.+-]*$/i.test(n)?`var(--color-${n})`:n;t.node.style.setProperty("--smbls-dropdown-surface",r),t.node.setAttribute("data-smbls-surface","")}e?.theme?t.node.setAttribute("data-smbls-themed",""):t.node.removeAttribute("data-smbls-themed"),e?.shadow||t.scope?.bodyShadow?t.node.setAttribute("data-smbls-shadowed",""):t.node.removeAttribute("data-smbls-shadowed")},E7=t=>{if(!t)return null;let e=typeof t.shadow=="function"?t.shadow(t,t.state):t.shadow;return typeof e=="string"&&e?e:null},v7=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},A7=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],rF=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of A7){let s=e?.[o];s&&(t.node.setAttribute(r,s),n.add(r))}if(t.__a11yAttrs)for(let r of t.__a11yAttrs)n.has(r)||t.node.removeAttribute(r);t.__a11yAttrs=n,t.__panelTabindex&&(t.node.removeAttribute("tabindex"),t.__panelTabindex=!1)},C7='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',T7=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(C7)){if(n.matches(":disabled"))continue;let r=n.getAttribute("tabindex");if(!(r!==null&&parseInt(r,10)<0)&&(n.focus({preventScroll:!0}),e.ownerDocument.activeElement===n))return}e.setAttribute("tabindex","-1"),t.__panelTabindex=!0,e.focus({preventScroll:!0})}},Ky={tag:"div",attr:{"data-smbls-dropdown-root":"true"},position:"fixed",inset:"0",zIndex:"1500",pointerEvents:"none",state:{layer:null},onInit:t=>{if(k7(),typeof window>"u")return;let e=r=>{r.key!=="Escape"||r.defaultPrevented||t.state?.layer&&(r.preventDefault(),yi.call(t))};window.addEventListener("keydown",e),t.__dropdownEscHandler=e;let n=r=>{let o=t.state?.layer;if(!o)return;let s=t.node?.querySelector('[data-smbls-dropdown="panel"]');if(s&&s.contains(r.target))return;let i=o.anchor;if(i){let a=r.clientX,c=r.clientY;if(a>=i.left&&a<=i.right&&c>=i.top&&c<=i.bottom)return}yi.call(t)};document.addEventListener("mousedown",n,!0),t.__dropdownClickHandler=n},onRemove:t=>{typeof window>"u"||(t.__dropdownEscHandler&&window.removeEventListener("keydown",t.__dropdownEscHandler),t.__dropdownClickHandler&&document.removeEventListener("mousedown",t.__dropdownClickHandler,!0))},PanelHost:{tag:"div",position:"fixed",inset:"0",pointerEvents:"none",subscribeTo:["layer"],layer:(t,e)=>e?.layer||null,Panel:{tag:"div",attr:{"data-smbls-dropdown":"panel"},position:"fixed",subscribeTo:["layer"],left:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Wr(e.anchor,n,e.placement).left+"px"},top:t=>{let e=t.parent?.layer;if(!e?.anchor)return"-9999px";let n=t._lastSize||{width:280,height:200};return Wr(e.anchor,n,e.placement).top+"px"},style:t=>{let e=t.parent?.layer;if(!e?.anchor)return{};let n=t._lastSize||{width:280,height:200};return{"--smbls-dropdown-from":Bc(Wr(e.anchor,n,e.placement).side)}},minWidth:t=>t.parent?.layer?.minWidth||"180px",maxWidth:t=>t.parent?.layer?.maxWidth||"90vw",maxHeight:t=>{let e=t.parent?.layer;if(!e?.anchor)return"none";let n=t._lastSize||{width:280,height:200};return UA(e,Wr(e.anchor,n,e.placement))},overflow:"auto",overscrollBehavior:"contain",padding:"0",round:t=>t.parent?.layer?.round||"radiusCard",theme:t=>t.parent?.layer?.theme||null,border:"none",borderWidth:"0",shadow:t=>t.parent?.layer?.shadow||t.scope?.bodyShadow||null,scope:{bodyShadow:null},animationDuration:"B",animationTimingFunction:"defaultBezier",pointerEvents:t=>{let e=t.parent?.layer;return e?e.inert?"none":"auto":"none"},opacity:t=>t.parent?.layer?"1":"0",onClick:t=>t.stopPropagation(),onInit:t=>{let e=K(()=>{let n=t.parent?.layer,r=n?.content||null,o=n?.id||null;if(!r){if(t.__lastLayerId!=null){try{t.removeContent?.()}catch{}t.__lastLayerId=null,rF(t,null),t.node?.removeAttribute("data-smbls-open"),t.scope&&(t.scope.bodyShadow=null)}return}if(t.__lastLayerId!==o){t.__lastLayerId=o;try{t.set(r)}catch(s){console.warn("[dropdown] content set failed:",s)}t.scope&&(t.scope.bodyShadow=E7(t.content)),nF(t,n),rF(t,n),v7(t),n.focusIn&&T7(t),!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(()=>{if(!t.node)return;nF(t,n);let s=t.parent?.layer;if(!s?.anchor)return;let i=eF(t.node);t._lastSize=i;let a=Wr(s.anchor,i,s.placement);t.node.style.maxHeight=UA(s,a),t.node.style.left=a.left+"px",t.node.style.top=a.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Bc(a.side))})}});t.__ref&&t.__ref.__effects?.push(e)},onRender:t=>{if(!t?.node)return;let e=t.parent?.layer;if(!e?.anchor)return;let n=eF(t.node),r=t._lastSize;(!r||Math.abs(r.width-n.width)>1||Math.abs(r.height-n.height)>1)&&(t._lastSize=n);let s=Wr(e.anchor,n,e.placement);t.node.style.maxHeight=UA(e,s),t.node.style.left=s.left+"px",t.node.style.top=s.top+"px",t.node.style.setProperty("--smbls-dropdown-from",Bc(s.side))}}}};var VA=t=>{let r=t?.getRoot?.()?.DropdownRoot?.state?.layer;if(r&&t.dropdownId&&r.id===t.dropdownId){t.call("closeDropdown");return}let o={anchorEl:t,trigger:t.dropdownTrigger||"click",placement:t.dropdownPlacement||"auto",content:t.dropdownContent||null,minWidth:t.dropdownMinWidth,maxWidth:t.dropdownMaxWidth,maxHeight:t.dropdownMaxHeight,theme:t.dropdownTheme,offset:t.dropdownOffset,id:t.dropdownId,onOpen:t.onDropdownOpen,onClose:t.onDropdownClose};for(let s in o)o[s]===void 0&&delete o[s];t.call("openDropdown",o)},qy={position:"relative",onClick:(t,e)=>{(e.dropdownTrigger||"click")==="click"&&(t.preventDefault(),t.stopPropagation(),VA(e))},onFocus:(t,e)=>{e.dropdownTrigger==="focus"&&VA(e)},onMouseenter:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&clearTimeout(e._hoverTimer),e._hoverTimer=setTimeout(()=>VA(e),120))},onMouseleave:(t,e)=>{e.dropdownTrigger==="hover"&&(e._hoverTimer&&(clearTimeout(e._hoverTimer),e._hoverTimer=null),e._closeTimer=setTimeout(()=>e.call("closeDropdown"),250))}};var Gy={extends:"smbls.Dropdown"},Yy={extends:"smbls.DropdownList"},Xy={extends:"smbls.DropdownParent"},Jy={extends:"smbls.DropdownParentFocus"},Zy={extends:"smbls.DropdownSiblingFocus"};var zA={DropdownRoot:Ky,DropdownTrigger:qy,Dropdown:Gy,DropdownList:Yy,DropdownParent:Xy,DropdownParentFocus:Jy,DropdownSiblingFocus:Zy};var KA={};F(KA,{DROPDOWN_DEFAULTS:()=>zo,closeDropdown:()=>yi,computePosition:()=>Wr,dropdownFunctions:()=>WA,fadeInTransform:()=>Bc,openDropdown:()=>Hy,setDropdownInert:()=>Wy});var WA={openDropdown:Hy,closeDropdown:yi,setDropdownInert:Wy};var XA={};F(XA,{components:()=>_F,functions:()=>wF});var O7=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),R7=(t,e,n,r,o)=>{let s=O7(e,r,o),i=t==="top"||t==="bottom"?n.height+6:n.width+6;if(s[t]>=i)return t;let a={top:"bottom",bottom:"top",left:"right",right:"left"}[t];return a&&s[a]>=i?a:t},oF=(t,e,n)=>Math.max(e,Math.min(n,t)),sF=(t,e,n="bottom")=>{if(!t)return{left:0,top:0,side:"bottom"};let r=typeof window<"u"?window.innerWidth:1024,o=typeof window<"u"?window.innerHeight:768,s=R7(n,t,e,r,o),i,a;return s==="bottom"||s==="top"?(i=t.left+(t.width-e.width)/2,a=s==="bottom"?t.bottom+6:t.top-e.height-6):(a=t.top+(t.height-e.height)/2,i=s==="right"?t.right+6:t.left-e.width-6),i=oF(i,6,r-e.width-6),a=oF(a,6,o-e.height-6),{left:i,top:a,side:s}},iF=t=>{switch(t){case"bottom":return"translate3d(0, -10%, 0)";case"top":return"translate3d(0, 10%, 0)";case"left":return"translate3d(10%, 0, 0)";case"right":return"translate3d(-10%, 0, 0)";default:return"translate3d(0, -10%, 0)"}};var Qy={placement:"bottom",theme:"dialog",delay:250,hideDelay:100},P7=t=>{if(!t||typeof t.getBoundingClientRect!="function")return null;let e=t.getBoundingClientRect();return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}},aF=t=>t?.getRoot?.()?.TooltipRoot||null,cF=t=>{let e=t?.state?.tip;return e?typeof e.$parse=="function"?e.$parse():{...e}:null},lF=(t,e,n=0)=>{let r=cF(t);if(!r||r.id!==e||r.open===!1)return;let o=t.Panel?.node;if(!o||typeof o.getBoundingClientRect!="function")return;if(o.textContent!==(r.text||"")){n<3&&setTimeout(()=>lF(t,e,n+1),0);return}let s=o.getBoundingClientRect();t.state.update({tip:{...r,size:{width:s.width,height:s.height}}})},L7=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},D7=0,I7=()=>`tooltip_${++D7}_${Date.now().toString(36)}`;function fF(t={}){let e=aF(this);if(!e)return console.warn("[tooltip] openTooltip: TooltipRoot is not mounted on the app root. Add `TooltipRoot: {}` to your shell tree and import tooltip components into context."),null;let n=t.anchorEl?.node||t.anchorEl,r=t.anchorRect||P7(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||I7(),s={id:o,text:t.text||"",anchor:r,placement:t.placement||Qy.placement,theme:t.theme||Qy.theme,open:!0,size:null};return e.state.update({tip:s}),L7(()=>lF(e,o)),o}function uF(t){let e=aF(this);if(!e)return;let n=cF(e);if(!n||n.open===!1)return;let r=typeof t=="string"?t:t?.id;r&&n.id&&r!==n.id||e.state.update({tip:{...n,open:!1}})}var GA=t=>{let e=t.tip;return e?.anchor?sF(e.anchor,e.size||{width:0,height:0},e.placement):null},tb=t=>{let e=t.tip;return!!(e&&e.open!==!1&&e.size)},dF={tag:"div",attr:{"data-smbls-tooltip-root":"true"},position:"fixed",inset:"0",zIndex:"2500",pointerEvents:"none",state:{tip:null},Panel:{tag:"div",attr:{"data-smbls-tooltip":"panel"},role:"tooltip",position:"fixed",tip:(t,e)=>e?.tip||null,left:t=>{let e=GA(t);return e?e.left+"px":"-9999px"},top:t=>{let e=GA(t);return e?e.top+"px":"-9999px"},text:t=>t.tip?.text||"",theme:t=>t.tip?.theme||Qy.theme,width:"max-content",maxWidth:"280px",padding:"Y2 Z",round:"Z",fontSize:"Y2",lineHeight:"1.35",whiteSpace:"normal",pointerEvents:"none",opacity:t=>tb(t)?"1":"0",visibility:t=>tb(t)?"visible":"hidden",transform:t=>{if(tb(t))return"none";let e=GA(t);return iF(e?e.side:"bottom")},transition:t=>{let e=tb(t)?"A":"Z";return`${e} opacity defaultBezier, ${e} transform defaultBezier, ${e} visibility defaultBezier`}}};var YA=t=>{if(!t.tooltipText)return;let e=t.node;e&&e.hasAttribute&&e.hasAttribute("title")&&e.removeAttribute("title")},M7=t=>{t.tooltipText&&(YA(t),t.call("openTooltip",{anchorEl:t,text:t.tooltipText,placement:t.tooltipPlacement||"bottom",theme:t.tooltipTheme,id:t.tooltipId||t.key}))},pF=t=>{t._tooltipHideTimer&&(clearTimeout(t._tooltipHideTimer),t._tooltipHideTimer=null),!t._tooltipShowTimer&&(t._tooltipShowTimer=setTimeout(()=>{t._tooltipShowTimer=null,M7(t)},t.tooltipDelay??250))},hF=t=>{t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),!t._tooltipHideTimer&&(t._tooltipHideTimer=setTimeout(()=>{t._tooltipHideTimer=null,t.call("closeTooltip",t.tooltipId||t.key)},t.tooltipHideDelay??100))},gF={onMouseenter:(t,e)=>pF(e),onMouseleave:(t,e)=>hF(e),onFocus:(t,e)=>pF(e),onBlur:(t,e)=>hF(e),onMouseover:(t,e)=>YA(e),onFocusin:(t,e)=>YA(e)};var mF={display:"flex",theme:"dialog",flow:"column",shape:"tooltip",shapeDirection:"left",padding:"Z1 A",round:"Y2",width:"fit-content",minWidth:"D2",maxWidth:"F2",gap:"X",textAlign:"center",attr:{tooltip:!0},Title:{if:t=>t.call("isDefined",t.parent.title)||t.parent.title,width:"fit-content",fontWeight:500,color:"currentColor",text:t=>t.parent.title},P:{if:(t,e)=>t.call("isDefined",t.call("exec",t.parent.description,t))||t.text,width:"fit-content",fontSize:"Z2",margin:"0",color:"currentColor",fontWeight:"400",text:(t,e)=>t.call("exec",t.parent.description,t)}},yF={extends:"Tooltip",position:"absolute",pointerEvents:"none",opacity:"0",visibility:"hidden",transition:"C defaultBezier opacity, C defaultBezier visibility, B defaultBezier transform",onInit:t=>{let e=!t.shapeDirection||t.shapeDirection==="top"?{top:"112%",left:"50%",transform:"translate3d(-50%,10%,0)",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="right"?{transform:"translate3d(10%,-50%,0)",left:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="bottom"?{transform:"translate3d(-50%,-10%,0)",bottom:"112%",left:"50%",".isActive":{transform:"translate3d(-50%,0,0)",opacity:1,visibility:"visible"}}:t.shapeDirection==="left"?{transform:"translate3d(10%,-50%,0)",right:"112%",top:"50%",".isActive":{transform:"translate3d(0%,-50%,0)",opacity:1,visibility:"visible"}}:{};Object.assign(t,e)},style:t=>{if(!t.scope||!t.scope.tooltipOpen)return{opacity:"",visibility:"",transform:""};let e=t.shapeDirection;return{opacity:"1",visibility:"visible",transform:e==="left"||e==="right"?"translate3d(0%,-50%,0)":"translate3d(-50%,0,0)"}},styleDeps:[t=>t.scope&&t.scope.tooltipOpen]},bF={position:"relative",zIndex:999,scope:{tooltipOpen:!1},onInit:t=>{let{Tooltip:e,TooltipHidden:n}=t,r=e||n;if(!r)return;let o=r&&r[".isActive"];Object.assign(t,{":hover, &:focus-visible":{zIndex:1e3,"& [tooltip]":o||{transform:"translate3d(-50%, 0, 0)",opacity:1,visibility:"visible"}}})},onPointerdown:(t,e)=>{t.pointerType!=="touch"||!e.scope||(e.scope.tooltipOpen=!e.scope.tooltipOpen)},onDocumentKeydown:(t,e)=>{t.key!=="Escape"||!e.scope||!e.scope.tooltipOpen||(e.scope.tooltipOpen=!1)},onDocumentPointerdown:(t,e)=>{!e.scope||!e.scope.tooltipOpen||e.node&&e.node.contains(t.target)||(e.scope.tooltipOpen=!1)}};var _F={TooltipRoot:dF,TooltipTrigger:gF,Tooltip:mF,TooltipHidden:yF,TooltipParent:bF};var wF={openTooltip:fF,closeTooltip:uF};var Bd={};F(Bd,{LEVELS:()=>Nd,analyzePlugin:()=>eb,attachBrowserListeners:()=>fb,attachNetworkListeners:()=>Fd,classifyEvent:()=>rC,createAnalyzeState:()=>RF,createBeaconSink:()=>iC,createConsoleSink:()=>oC,createDedupe:()=>tC,createEnrich:()=>ZA,createMemorySink:()=>sC,createPipeline:()=>sb,createRedact:()=>ob,createRemoteSink:()=>ab,createSample:()=>eC,createSummarize:()=>QA,default:()=>eb,emitFetchEvent:()=>TF,makeEvent:()=>ft,meetsLevel:()=>nb,normalizeLevel:()=>$d,resolveSinks:()=>lb,summarizeElement:()=>bi});var N7=0,$7=()=>`${Date.now().toString(36)}-${(N7++).toString(36)}`,ft=(t,e,n={})=>({id:$7(),ts:Date.now(),type:t,level:e,...n}),F7=t=>{let e=[],n=t,r=0;for(;n&&r<32;)n.key!=null&&e.unshift(String(n.key)),n=n.parent,r++;return e.join(" > ")},bi=t=>t?{key:t.key!=null?String(t.key):null,name:t.__name||t.name||null,path:F7(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var jc=t=>t?.context?.analyze,B7={init:{category:"lifecycle",type:"lifecycle",level:"debug"},create:{category:"lifecycle",type:"lifecycle",level:"debug"},render:{category:"lifecycle",type:"lifecycle",level:"debug"},beforeRemove:{category:"lifecycle",type:"lifecycle",level:"debug"},remove:{category:"lifecycle",type:"lifecycle",level:"debug"}},j7=(t,{category:e,type:n,level:r})=>o=>{let s=jc(o);!s||!s.shouldCapture(e)||s.emit(ft(n,r,{hook:t,element:bi(o)}))},SF=t=>(e,n)=>{let r=jc(e);!r||!r.shouldCapture("state")||r.emit(ft("state","debug",{hook:t,element:bi(e),changedKeys:n?.changedKeys||null}))},eb={name:"analyze",error(t,e){let n=jc(t);if(!n||n.config.enabled===!1||!n.shouldCapture("errors"))return;let r=e?.error||e?.err||(e instanceof Error?e:null);n.emit(ft("error","error",{hook:e?.hook||"error",element:bi(t),error:r,message:r?.message||(typeof e?.message=="string"?e.message:null)}))},renderRouter(t){let e=jc(t);e&&(!e.shouldCapture("navigation")&&!e.shouldCapture("lifecycle")||e.emit(ft("navigation","info",{hook:"renderRouter",route:t.context?.routerOptions?.currentRoute||null})))},beforeUpdate(t){let e=jc(t);!e||!e.shouldCapture("updates")||t.__ref&&(t.__ref.__analyzeUpdateStart=typeof performance<"u"?performance.now():Date.now())},update(t){let e=jc(t);if(!e||!e.shouldCapture("updates"))return;let n=null;t.__ref?.__analyzeUpdateStart!=null&&(n=(typeof performance<"u"?performance.now():Date.now())-t.__ref.__analyzeUpdateStart,t.__ref.__analyzeUpdateStart=null),e.emit(ft("update","debug",{hook:"update",element:bi(t),durationMs:n}))},beforeStateUpdate:SF("beforeStateUpdate"),stateUpdate:SF("stateUpdate")};for(let[t,e]of Object.entries(B7))eb[t]=j7(t,e);M();var Nd={error:0,warn:1,info:2,debug:3,trace:4};var nb=(t,e)=>{let n=Nd[t],r=Nd[e];return n==null||r==null?!0:n<=r},$d=t=>Nd[t]!=null?t:"warn";M();var rb=/password|token|secret|ssn|card|cvv|pin|apikey|api_key|auth|email|otp/i;var U7=(t,e)=>{for(let n of e)if(n instanceof RegExp){if(n.test(t))return!0}else if(typeof n=="string"&&t.toLowerCase().includes(n.toLowerCase()))return!0;return!1},V7=(t,e)=>{if(e!=="redact"){if(e==="hash"){let n=0,r=String(t);for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},JA=(t,e,n,r)=>{if(r>6||t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(s=>JA(s,e,n,r+1));let o={};for(let s of Object.keys(t))if(U7(s,e)||rb.test(s)){let a=V7(t[s],n);a!==void 0&&(o[s]=a)}else o[s]=JA(t[s],e,n,r+1);return o},ob=(t=[],e="mask")=>{let n=Array.isArray(t)?t:[t];return r=>{if(!r)return r;let{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...g}=r,h=JA(g,n,e,0);return{id:o,ts:s,type:i,level:a,hook:c,error:l,message:f,durationMs:u,element:d,target:p,...h}}};var ZA=t=>{let e=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,n=typeof navigator<"u"?navigator.userAgent:null,r=t.config.buildHash||null,o=t.config.appId||null;return s=>{if(!s)return s;let i=t.context?.routerOptions?.currentRoute||null,a=R,c=a&&a.innerWidth?{w:a.innerWidth,h:a.innerHeight}:null;return{...s,session:e,app:{id:o,build:r,route:i},meta:{ua:n,viewport:c}}}},QA=()=>t=>{if(!t)return t;if(t.element&&typeof t.element=="object"){let e=t.element;(e.node||e.parent||e.__ref)&&(t={...t,element:{key:e.key!=null?String(e.key):null,name:e.__name||e.name||null,tag:e.tag||null,component:e.component||null}})}return t.error instanceof Error&&(t={...t,error:{name:t.error.name,message:t.error.message,stack:t.error.stack}}),t},tC=(t=1e3,e=500)=>{let n=new Map;return r=>{if(!r)return r;let o=`${r.type}:${r.level}:${r.message||""}:${r.error?.message||""}`,s=n.get(o),i=r.ts||Date.now();if(s&&i-s<t)return null;if(n.set(o,i),n.size>e){let a=Math.ceil(e/10),c=0;for(let l of n.keys()){if(c++>=a)break;n.delete(l)}}return r}},eC=t=>e=>{if(!e)return e;let n=t[e.type];return n==null||n>=1?e:Math.random()>n?null:e},xF={redact:t=>ob(t.config.redact||[],t.config.maskStrategy),enrich:t=>ZA(t),summarize:()=>QA(),dedupe:t=>tC(t.config.cache?.dedupeWindowMs||1e3),sample:t=>eC(t.config.sample||{})},z7=(t,e)=>{if(typeof t=="function")return t;if(typeof t=="string"){let n=xF[t];return n?n(e):null}return null},sb=t=>{let e=t.config,n=Array.isArray(e.transformers)?e.transformers.slice():[],r=n.findIndex(s=>s==="redact");r>=0&&n.splice(r,1);let o=[];e.redact!==!1&&o.push(xF.redact(t));for(let s of n){let i=z7(s,t);i&&o.push(i)}return s=>{let i=s;for(let a of o){if(i==null)return null;let c=a(i);if(c==null)return null;if(Array.isArray(c)){let l=o.slice(o.indexOf(a)+1),f=[];for(let u of c){let d=u,p=!1;for(let g of l)if(d=g(d),d==null){p=!0;break}!p&&d!=null&&f.push(d)}return f}i=c}return i}};M();M();var ib=typeof R<"u"&&typeof R.document<"u",H7=5e3,W7=50,K7=3,q7=1500,G7=1e3,rC=t=>t?t.level==="error"||t.type==="error"?"bug":t.type==="network"?"network":t.type==="console"?t.level==="error"||t.level==="warn"?"bug":"log":t.level==="warn"?"bug":t.level==="info"?"log":"verbose":"verbose",Y7=t=>{try{return JSON.stringify(t)}catch{return null}},X7=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},J7=t=>{if(!t)return null;let e=String(t),n;return(n=e.match(/Edg\/([\d.]+)/))?{name:"Edge",version:n[1]}:(n=e.match(/OPR\/([\d.]+)/))?{name:"Opera",version:n[1]}:(n=e.match(/Firefox\/([\d.]+)/))?{name:"Firefox",version:n[1]}:/Chrome\/([\d.]+)/.test(e)&&/Safari\//.test(e)?(n=e.match(/Chrome\/([\d.]+)/),{name:"Chrome",version:n[1]}):(n=e.match(/Version\/([\d.]+).*Safari/))?{name:"Safari",version:n[1]}:{name:null,version:null}},Z7=()=>{if(!ib)return null;try{let t=R.document?.documentElement?.getAttribute("data-theme")||null,e=typeof R.matchMedia=="function"?R.matchMedia("(prefers-color-scheme: dark)").matches:null;return{active:t||(e?"dark":e===!1?"light":null),forced:t||null,prefers:e==null?null:e?"dark":"light"}}catch{return null}},Q7=()=>{if(!ib)return null;let t=R.location,e=typeof navigator<"u"?navigator:null,n=typeof screen<"u"?screen:null;return{url:t?.href||null,path:t?.pathname||null,referrer:R.document?.referrer||null,title:R.document?.title||null,ua:e?.userAgent||null,browser:J7(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:X7(),viewport:R.innerWidth?{w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}:null,screen:n?{w:n.width||null,h:n.height||null,availW:n.availWidth||null,availH:n.availHeight||null,colorDepth:n.colorDepth||null,orientation:n.orientation?.type||null}:null,theme:Z7()}},ab=(t={})=>{let e=t.url,n=typeof t.transport=="function"?t.transport:null,r=typeof t.syncTransport=="function"?t.syncTransport:null;if(!e&&!n)return()=>{};let o=t.apiKey||null,s=t.appKey||t.appId||null,i=t.tenantKey||t.tenant||null,a=t.release||null,c=t.env||null,l=t.sdk||null,f=typeof t.getAuth=="function"?t.getAuth:null,u=typeof t.getContext=="function"?t.getContext:null,d=typeof t.classify=="function"?t.classify:rC,p=typeof t.beforeSend=="function"?t.beforeSend:null,g=t.debug===!0,h=typeof t.getDebug=="function"?t.getDebug:null,m=t.batchMs!=null?t.batchMs:H7,y=t.maxBatch||W7,x=t.maxRetries!=null?t.maxRetries:K7,E=t.backoffMs||q7,C=t.queueLimit||G7,_=t.sampleRate!=null?t.sampleRate:1,b=()=>typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,w=t.sessionId||b(),S=[],A=[],T=null,O=null,B=()=>{T||!S.length||(T=setTimeout(Y,m))},$=J=>{if(O)return;let Q=E*Math.pow(2,Math.max(0,J-1));O=setTimeout(()=>{if(O=null,!A.length)return;let it=A.shift();G(it.envelope,it.attempt)},Q)},N=(J,Q=!1)=>{let it=u?nC(u):null,rt={id:w,sentAt:Date.now()};Q&&(rt.endedAt=Date.now());let gt={v:1,session:rt,app:{key:s,release:a,env:c},tenant:i,sdk:l,page:Q7(),user:it?.user||null,traits:it?.traits||null,tags:it?.tags||null,events:J};if((h?nC(h)===!0:g)&&(gt.app.debug=!0),p)try{return p(gt)||null}catch{return gt}return gt},G=async(J,Q=1)=>{if(J)try{let it=!0;if(n){let rt=await n(J);it=rt!==!1&&rt?.ok!==!1}else it=await tq(e,J,{apiKey:o,getAuth:f});!it&&Q<x&&(A.push({envelope:J,attempt:Q+1}),$(Q+1))}catch{Q<x&&(A.push({envelope:J,attempt:Q+1}),$(Q+1))}},Y=(J=!1,Q=!1)=>{if(T&&(clearTimeout(T),T=null),!S.length&&!Q)return;let it=S;S=[];let rt=N(it,Q);if(rt){if(J&&ib){if(typeof r=="function"&&nC(()=>r(rt)))return;if(navigator.sendBeacon&&e){let gt=Y7(rt);if(gt)try{navigator.sendBeacon(e,new R.Blob([gt],{type:"application/json"}));return}catch{}}}G(rt)}},nt=!1,ot=()=>{nt||(nt=!0,Y(!0,!0))};ib&&(R.addEventListener("pagehide",ot,{passive:!0}),R.addEventListener("beforeunload",ot,{passive:!0}),R.addEventListener("visibilitychange",()=>{R.document.visibilityState==="hidden"&&Y(!0)},{passive:!0}));let st=J=>{if(!J||_<1&&Math.random()>_)return;nt&&(nt=!1);let Q={...J,log_type:d(J)};S.push(Q),S.length>C&&(S=S.slice(-C)),S.length>=y?Y():B()},Z=J=>(Y(!1,!0),w=J||b(),nt=!1,st.sessionId=w,w);return st.flush=()=>Y(!1),st.endSession=ot,st.startNewSession=Z,st.sessionId=w,st},nC=t=>{try{return t()}catch{return null}},tq=async(t,e,{apiKey:n,getAuth:r})=>{let o={"Content-Type":"application/json","X-Analyze-Beacon":"1"};if(n&&(o["X-Analyze-Key"]=n),r)try{let s=await r();s&&(o.Authorization=`Bearer ${s}`)}catch{}try{return(await fetch(t,{method:"POST",headers:o,body:JSON.stringify(e),keepalive:!0,credentials:"omit",mode:"cors"})).ok}catch{return!1}};var eq={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},nq="\x1B[0m",cb=typeof R<"u"&&typeof R.document<"u",oC=(t={})=>{let e=t.minLevel||null,n=console.error.bind(console),r=console.warn.bind(console),o=console.log.bind(console);return s=>{if(!s)return;let i=s.level==="error"?n:s.level==="warn"?r:o,a=`[analyze:${s.type}]`;if(cb)i(a,s);else{let c=eq[s.level]||"";i(`${c}${a}${nq}`,s)}}},sC=(t,e={})=>{let n=e.max||t.config.cache?.max||500,r=new Array(n),o=0,s=0,i=a=>{r[o]=a,o=(o+1)%n,s<n&&s++};return t.__memory={push:i,snapshot:()=>{let a=new Array(s),c=(o-s+n)%n;for(let l=0;l<s;l++)a[l]=r[(c+l)%n];return a},query:(a={})=>{let c=t.__memory.snapshot(),l=a.sinceMs?Date.now()-a.sinceMs:0;return c.filter(f=>!(!f||a.level&&f.level!==a.level||a.type&&f.type!==a.type||l&&f.ts<l))},clear:()=>{o=0,s=0}},i},iC=(t={})=>{let e=t.url,n=t.batchMs!=null?t.batchMs:5e3,r=t.maxBatch||50;if(!e)return()=>{};let o=[],s=null,i=()=>{if(s&&(clearTimeout(s),s=null),!o.length)return;let c=JSON.stringify({events:o});o=[];let l=cb?new R.Blob([c],{type:"application/json"}):c;if(cb&&navigator.sendBeacon)try{navigator.sendBeacon(e,l);return}catch{}typeof fetch<"u"&&fetch(e,{method:"POST",headers:{"Content-Type":"application/json","X-Analyze-Beacon":"1"},body:c,keepalive:!0}).catch(()=>{})};cb&&(R.addEventListener("pagehide",i,{passive:!0}),R.addEventListener("beforeunload",i,{passive:!0}));let a=c=>{c&&(o.push(c),o.length>=r?i():s||(s=setTimeout(i,n)))};return a.flush=i,a},kF={console:oC,memory:sC,beacon:iC,remote:ab},EF=(t,e)=>e.getDebug!=null||e.debug!=null?e:{...e,getDebug:()=>t.config.debug===!0},lb=t=>{let e=Array.isArray(t.config.sinks)?t.config.sinks:["console"],n=[];for(let r of e)if(typeof r=="function")n.push(r);else if(typeof r=="string"){let o=kF[r];if(!o)continue;n.push(r==="memory"?o(t,{}):o(r==="remote"?EF(t,{}):{}))}else if(r&&typeof r=="object"&&r.type){let o=kF[r.type];if(!o)continue;n.push(r.type==="memory"?o(t,r):o(r.type==="remote"?EF(t,r):r))}return n};M();var rq=typeof R<"u"&&typeof R.document<"u",oq=new Set(["password","hidden"]),vF=(t,e)=>{let n=0,r=null,o=null;return(...s)=>{let i=Date.now();i-n>=e?(n=i,t(...s)):(o=s,r||(r=setTimeout(()=>{n=Date.now(),r=null,o&&(t(...o),o=null)},e-(i-n))))}},aC="__analyzeKeyPath",Uc=t=>{let e=t.target;if(!e)return{selector:null,key:null,path:null};if(e[aC])return e[aC];let n=[],r=e,o=0,s=null;for(;r&&o<64;){if(r.getAttribute){let a=r.getAttribute("data-key");a&&(s==null&&(s=a),n.unshift(a))}r=r.parentNode,o++}let i;if(n.length)i={selector:null,key:s,path:n.join(" > "),tag:e.tagName?.toLowerCase()||null};else{let a=(e.tagName||"unknown").toLowerCase(),c=e.id?`#${e.id}`:"",l=e.className&&typeof e.className=="string"?"."+e.className.trim().split(/\s+/).slice(0,2).join("."):"";i={selector:`${a}${c}${l}`,key:null,path:null}}try{e[aC]=i}catch{}return i},sq=(t,e)=>{if(e==="mask")return"***";if(e!=="redact"){if(e==="hash"){let n=0,r=String(t||"");for(let o=0;o<r.length;o++)n=(n<<5)-n+r.charCodeAt(o)|0;return`#${(n>>>0).toString(36)}`}return"***"}},iq=t=>!!(!t||t.tagName==="INPUT"&&oq.has(t.type)||rb.test(t.name||"")||rb.test(t.id||"")||t.dataset?.analyze==="skip"),fb=t=>{if(!rq)return;let e=t.config.capture,n=t.config.throttle,r=t.__teardown,o=(s,i,a,c)=>{s.addEventListener(i,a,c),r.push(()=>s.removeEventListener(i,a,c))};if(e.errors&&(o(R,"error",s=>{t.emit(ft("error","error",{hook:"window.onerror",message:s.message||null,error:s.error||null,source:s.filename||null,line:s.lineno||null,col:s.colno||null}))}),o(R,"unhandledrejection",s=>{let i=s.reason,a=i instanceof Error?i:null;t.emit(ft("error","error",{hook:"unhandledrejection",message:a?.message||(typeof i=="string"?i:"Unhandled promise rejection"),error:a}))})),e.pointer){o(R,"click",i=>{t.emit(ft("pointer","info",{hook:"click",target:Uc(i),button:i.button,x:i.clientX,y:i.clientY,modifiers:AF(i)}))},{passive:!0,capture:!0}),o(R,"dblclick",i=>{t.emit(ft("pointer","info",{hook:"dblclick",target:Uc(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0}),o(R,"contextmenu",i=>{t.emit(ft("pointer","info",{hook:"contextmenu",target:Uc(i),x:i.clientX,y:i.clientY}))},{passive:!0,capture:!0});let s=vF(i=>{t.emit(ft("pointer","trace",{hook:"pointermove",x:i.clientX,y:i.clientY}))},n.pointermove);o(R,"pointermove",s,{passive:!0})}if(e.keyboard&&o(R,"keydown",s=>{t.emit(ft("keyboard","info",{hook:"keydown",code:s.code,key:s.key&&s.key.length===1?"\xB7":s.key,modifiers:AF(s),target:Uc(s)}))},{passive:!0,capture:!0}),e.forms){let s=i=>{let a=i.target;if(!a||!a.tagName||!["INPUT","TEXTAREA","SELECT"].includes(a.tagName))return;let l=iq(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=sq(a.value,t.config.maskStrategy)),t.emit(ft("forms","info",{hook:i.type,target:Uc(i),field:{name:a.name||null,type:a.type||a.tagName.toLowerCase()},value:u}))};o(R,"input",s,{passive:!0,capture:!0}),o(R,"change",s,{passive:!0,capture:!0}),o(R,"submit",i=>{t.emit(ft("forms","info",{hook:"submit",target:Uc(i)}))},{passive:!0,capture:!0})}if(e.scroll){let s=vF(()=>{t.emit(ft("scroll","trace",{hook:"scroll",x:R.scrollX,y:R.scrollY}))},n.scroll);o(R,"scroll",s,{passive:!0,capture:!0})}if(e.viewport){let s=Ml(()=>{t.emit(ft("viewport","info",{hook:"resize",w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}))},n.resize);o(R,"resize",s,{passive:!0}),o(R,"orientationchange",()=>{t.emit(ft("viewport","info",{hook:"orientationchange",orientation:typeof screen<"u"&&screen.orientation?screen.orientation.type:null}))},{passive:!0}),o(R.document,"visibilitychange",()=>{t.emit(ft("viewport","info",{hook:"visibilitychange",hidden:R.document.hidden}))},{passive:!0}),t.emit(ft("viewport","info",{hook:"initial",w:R.innerWidth,h:R.innerHeight,dpr:R.devicePixelRatio||1}))}if(e.console)for(let s of["log","warn","error","debug"]){let i=console[s];console[s]=function(...a){try{t.emit(ft("console",s==="error"?"error":s==="warn"?"warn":"debug",{hook:`console.${s}`,args:a.map(CF)}))}catch{}return i.apply(console,a)},r.push(()=>{console[s]=i})}if(e.performance&&typeof PerformanceObserver<"u")try{let s=new PerformanceObserver(a=>{for(let c of a.getEntries())t.emit(ft("performance","info",{hook:c.entryType,name:c.name,startTime:c.startTime,duration:c.duration,value:c.value!=null?c.value:null}))}),i=["largest-contentful-paint","layout-shift","longtask","paint","first-input","event"];for(let a of i)try{s.observe({type:a,buffered:!0})}catch{}r.push(()=>s.disconnect())}catch{}},AF=t=>({shift:!!t.shiftKey,ctrl:!!t.ctrlKey,alt:!!t.altKey,meta:!!t.metaKey}),aq=t=>{let e={name:t.name||"Error",message:typeof t.message=="string"?t.message:String(t),stack:typeof t.stack=="string"?t.stack:null};return t.cause!==void 0&&(e.cause=CF(t.cause)),e},CF=t=>{if(t==null)return t;if(t instanceof Error)return aq(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};M();var cq=typeof R<"u"&&typeof R.document<"u",TF=(t,e)=>{let n=t?.analyze;if(!n||!n.shouldCapture("network"))return;let r=e.phase==="error"?"error":"info";n.emit(ft("network",r,{hook:`fetch.${e.phase}`,source:"symbo-fetch",...e}))},Fd=t=>{if(cq&&t.config.capture.network&&!t.__networkListeners){if(t.__networkListeners=!0,t.__teardown.push(()=>{t.__networkListeners=!1}),typeof R.fetch=="function"){let e=R.fetch.bind(R),n=function(r,o){if(o?.headers?.["X-Analyze-Beacon"]||!t.shouldCapture("network"))return e(r,o);let s=typeof r=="string"?r:r&&r.url||"",i=(o?.method||typeof r=="object"&&r?.method||"GET").toUpperCase(),a=typeof performance<"u"?performance.now():Date.now();return t.emit(ft("network","info",{hook:"fetch.start",source:"window.fetch",url:s,method:i})),e(r,o).then(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;return t.emit(ft("network",c.ok?"info":"warn",{hook:"fetch.success",source:"window.fetch",url:s,method:i,status:c.status,ok:c.ok,durationMs:l})),c}).catch(c=>{let l=(typeof performance<"u"?performance.now():Date.now())-a;throw t.emit(ft("network","error",{hook:"fetch.error",source:"window.fetch",url:s,method:i,error:c,durationMs:l})),c})};R.fetch=n,t.__teardown.push(()=>{R.fetch=e})}if(typeof R.XMLHttpRequest=="function"){let e=R.XMLHttpRequest,n=e.prototype.open,r=e.prototype.send;e.prototype.open=function(o,s){return this.__analyze={method:String(o).toUpperCase(),url:String(s)},n.apply(this,arguments)},e.prototype.send=function(o){let s=this.__analyze;if(!s||!t.shouldCapture("network"))return r.apply(this,arguments);let i=typeof performance<"u"?performance.now():Date.now();t.emit(ft("network","info",{hook:"xhr.start",source:"xhr",url:s.url,method:s.method}));let a=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i,f=this.status>=200&&this.status<400;t.emit(ft("network",f?"info":"warn",{hook:"xhr.success",source:"xhr",url:s.url,method:s.method,status:this.status,ok:f,durationMs:l}))},c=()=>{let l=(typeof performance<"u"?performance.now():Date.now())-i;t.emit(ft("network","error",{hook:"xhr.error",source:"xhr",url:s.url,method:s.method,status:this.status,durationMs:l}))};return this.addEventListener("loadend",a),this.addEventListener("error",c),r.apply(this,arguments)},t.__teardown.push(()=>{e.prototype.open=n,e.prototype.send=r})}}};var lq={errors:!0,warnings:!0,pointer:!1,keyboard:!1,forms:!1,scroll:!1,viewport:!1,network:!1,performance:!1,navigation:!1,console:!1,lifecycle:!1,state:!1,updates:!1,replay:!1,telemetry:!1},fq={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},uq={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},dq={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},pq=t=>{let e={...lq,...t};return e.replay&&Object.assign(e,fq),e.telemetry&&Object.assign(e,uq),e.remote&&Object.assign(e,dq),Object.assign(e,t),e},hq=64,gq=()=>{if(typeof R>"u"||!R.location)return null;try{let e=new URLSearchParams(R.location.search).get("analyze");return e||null}catch{return null}},RF=(t={})=>{let e=t===!0?{}:{...t};e.capture=pq(e.capture||{});let n=gq();(n==="debug"||e.debug)&&(e.level="debug",e.debug=!0,e.capture={...e.capture,lifecycle:!0,state:!0,updates:!0,console:!0,network:!0}),n==="off"&&(e.enabled=!1),e.level=$d(e.level||"warn"),e.cache={max:500,dedupeWindowMs:1e3,...e.cache||{}},e.throttle={pointermove:80,mousemove:80,scroll:100,resize:200,...e.throttle||{}},e.maskFormValues==null&&(e.maskFormValues=!0),e.maskStrategy||(e.maskStrategy="mask"),Array.isArray(e.sinks)||(e.sinks=["console","memory"]),Array.isArray(e.transformers)||(e.transformers=["enrich","summarize"]);let r={config:e,context:null,__ready:!1,__paused:!1,__preBuffer:[],__teardown:[],__pipeline:null,__sinks:null,__memory:null,__initialSnapshot:null},o=()=>{r.__pipeline||(r.__pipeline=sb(r),r.__sinks=lb(r))};return r.shouldCapture=s=>r.config.enabled===!1?!1:!!r.config.capture[s],r.emit=s=>{if(s&&r.config.enabled!==!1&&!r.__paused&&nb(s.level,r.config.level)){if(!r.__ready){if(s.level!=="error"&&!r.config.captureDuringHydration)return;r.__preBuffer.length<hq&&r.__preBuffer.push(s);return}o(),OF(r,s)}},r.activate=s=>{if(r.context==null&&(r.context=s||null),r.__ready)return;r.__ready=!0;let i=r.__preBuffer;if(r.__preBuffer=[],i.length){o();for(let a of i)OF(r,a)}try{fb(r)}catch(a){console.error("[analyze] browser attach error:",a)}try{Fd(r)}catch(a){console.error("[analyze] network attach error:",a)}for(let a of r.__onActivate||[])try{a(r)}catch(c){console.error("[analyze] onActivate error:",c)}},r.pause=()=>{r.__paused=!0},r.resume=()=>{r.__paused=!1},r.setLevel=s=>{r.config.level=$d(s)},r.setCapture=(s,i)=>{if(r.config.capture[s]=!!i,s==="network"&&i&&r.__ready)try{Fd(r)}catch(a){console.error("[analyze] network attach error:",a)}},r.query=s=>r.__memory?r.__memory.query(s):[],r.snapshot=()=>r.__memory?r.__memory.snapshot():[],r.emitNetwork=s=>{if(!r.shouldCapture("network"))return;let i=s?.phase,a=i==="error"?"error":i==="success"&&s.ok===!1?"warn":"info";r.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:"network",level:a,hook:`fetch.${i||"unknown"}`,...s})},r.flush=()=>{if(r.__sinks)for(let s of r.__sinks)typeof s.flush=="function"&&s.flush()},r.startNewSession=s=>{let i=s||(typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),a=Array.isArray(r.config.sinks)?r.config.sinks:[];for(let c of a)c&&typeof c=="object"&&c.type==="remote"&&(c.sessionId=i);if(r.__sinks)for(let c of r.__sinks)typeof c.startNewSession=="function"&&c.startNewSession(i);return i},r.replay=()=>({initialSnapshot:r.__initialSnapshot,events:r.snapshot()}),r.destroy=()=>{for(let s of r.__teardown)try{s()}catch{}r.__teardown=[],r.__ready=!1,r.__paused=!0},r.__onActivate=[],r.onActivate=s=>{r.__onActivate.push(s)},r},OF=(t,e)=>{let n=t.__pipeline(e);if(n==null)return;let r=Array.isArray(n)?n:[n];for(let o of r){if(typeof t.config.onEvent=="function")try{t.config.onEvent(o)}catch{}for(let s of t.__sinks)try{s(o)}catch(i){console.error("[analyze] sink error:",i)}}};var gC={};F(gC,{shorthandPlugin:()=>db});var hC={};F(hC,{PRESERVE_VALUE_KEYS:()=>oe,SKIP_INLINE_KEYS:()=>Ho,abbrToProp:()=>re,decode:()=>MF,encode:()=>LF,expand:()=>wi,isComponentKey:()=>Mn,isSelectorKey:()=>Nn,parse:()=>Si,parseFurther:()=>ki,propToAbbr:()=>yn,shorten:()=>jd,shorthandPlugin:()=>db,stringify:()=>_i,stringifyFurther:()=>xi});var yn={attr:"at",childExtends:"cex",childExtendsRecursive:"cexr",childProps:"cp",children:"ch",childrenAs:"cha",class:"cl",content:"cnt",context:"ctx",data:"dt",extends:"ext",hide:"hd",html:"htm",if:"if",ignoreChildExtends:"icex",key:"ky",query:"qy",routes:"rt",scope:"scp",show:"shw",state:"st",style:"sy",tag:"tg",text:"tx",align:"aln",boxSize:"bsz",flow:"fl",heightRange:"hr",horizontalInset:"hi",round:"rnd",shadow:"shd",size:"sz",templateColumns:"tcol",verticalInset:"vi",widthRange:"wr",wrap:"wrp",aspectRatio:"ar",blockSize:"bks",boxSizing:"bxs",height:"h",inlineSize:"ins",margin:"m",marginBottom:"mb",marginLeft:"ml",marginRight:"mr",marginTop:"mt",maxBlockSize:"mxbs",maxHeight:"mxh",maxInlineSize:"mxis",maxWidth:"mxw",minBlockSize:"mnbs",minHeight:"mnh",minInlineSize:"mnis",minWidth:"mnw",padding:"p",paddingBottom:"pb",paddingInline:"pil",paddingLeft:"pl",paddingRight:"pr",paddingTop:"pt",width:"w",alignContent:"ac",alignItems:"ai",alignSelf:"as",flex:"fx",flexBasis:"fxb",flexDirection:"fxd",flexFlow:"fxf",flexGrow:"fxg",flexShrink:"fxs",flexWrap:"fxw",gap:"g",justifyContent:"jc",justifyItems:"ji",justifySelf:"js",order:"od",placeContent:"pcn",placeItems:"pit",placeSelf:"psl",rowGap:"rg",columnGap:"cg",gridArea:"ga",gridAutoColumns:"gac",gridAutoFlow:"gaf",gridAutoRows:"gar",gridColumn:"gc",gridColumnEnd:"gce",gridColumnStart:"gcs",gridRow:"gr",gridRowEnd:"gre",gridRowStart:"grs",gridTemplateAreas:"gta",gridTemplateColumns:"gtc",gridTemplateRows:"gtr",bottom:"bot",float:"flt",inset:"ist",left:"lft",position:"pos",right:"rgt",top:"tp",zIndex:"zi",clear:"clr",contain:"ctn",cursor:"cur",display:"d",opacity:"op",overflow:"ov",overflowX:"ovx",overflowY:"ovy",pointerEvents:"pe",resize:"rsz",userSelect:"us",visibility:"vis",background:"bg",backgroundAttachment:"bga",backgroundBlendMode:"bgbm",backgroundClip:"bgcl",backgroundColor:"bgc",backgroundImage:"bgi",backgroundOrigin:"bgo",backgroundPosition:"bgp",backgroundPositionX:"bgpx",backgroundPositionY:"bgpy",backgroundRepeat:"bgr",backgroundRepeatX:"bgrx",backgroundRepeatY:"bgry",backgroundSize:"bgs",color:"c",theme:"thm",themeModifier:"thmm",border:"bd",borderBottom:"bdb",borderBottomLeftRadius:"bdblr",borderBottomRightRadius:"bdbrr",borderCollapse:"bdcl",borderColor:"bdc",borderImage:"bdi",borderImageOutset:"bdio",borderImageRepeat:"bdir",borderImageSlice:"bdis",borderImageSource:"bdisrc",borderImageWidth:"bdiw",borderLeft:"bdl",borderRadius:"bdr",borderRight:"bdrg",borderSpacing:"bdsp",borderStyle:"bdst",borderTop:"bdt",borderTopLeftRadius:"bdtlr",borderTopRightRadius:"bdtrr",borderWidth:"bdw",outline:"ol",outlineColor:"olc",outlineOffset:"olo",outlineStyle:"ols",outlineWidth:"olw",boxShadow:"bxsh",textShadow:"txsh",direction:"dir",fontDisplay:"fdi",fontFamily:"ff",fontFeatureSettings:"ffs",fontKerning:"fk",fontOpticalSizing:"fos",fontPalette:"fpl",fontSize:"fs",fontSizeAdjust:"fsa",fontSmooth:"fsm",fontStretch:"fsr",fontStyle:"fsy",fontSynthesis:"fsyn",fontVariant:"fv",fontVariationSettings:"fvs",fontWeight:"fw",hyphens:"hyp",letterSpacing:"ls",lineHeight:"lh",tabSize:"tsz",textAlign:"ta",textDecoration:"td",textDecorationColor:"tdc",textDecorationLine:"tdl",textDecorationStyle:"tds",textIndent:"ti",textOverflow:"tov",textStroke:"tsk",textTransform:"tt",unicodeBidi:"ub",verticalAlign:"va",whiteSpace:"ws",wordBreak:"wbr",wordSpacing:"wsp",wordWrap:"wwr",writingMode:"wm",captionSide:"cps",counterIncrement:"ci",counterReset:"cr",emptyCells:"ec",listStyle:"lst",listStyleImage:"lsi",listStylePosition:"lsp",listStyleType:"lsty",quotes:"qt",tableLayout:"tl",columnCount:"cc",columnFill:"cf",columnRule:"crl",columnRuleColor:"crlc",columnRuleStyle:"crls",columnRuleWidth:"crlw",columnSpan:"cspn",columnWidth:"cwi",columns:"col",backdropFilter:"bdf",boxDecorationBreak:"bxdb",clipPath:"cpth",filter:"fil",isolation:"iso",mixBlendMode:"mbm",objectFit:"obf",objectPosition:"obp",perspective:"prs",perspectiveOrigin:"prso",willChange:"wc",transform:"tf",transformOrigin:"tfo",transformStyle:"tfs",transition:"trn",transitionDelay:"trnd",transitionDuration:"trndr",transitionProperty:"trnp",transitionTimingFunction:"trntf",animation:"an",animationDelay:"and",animationDirection:"andr",animationDuration:"andur",animationFillMode:"anfm",animationIterationCount:"anic",animationName:"ann",animationPlayState:"anps",animationTimingFunction:"antf",scrollBehavior:"sb",scrollMargin:"smr",scrollMarginBottom:"smrb",scrollMarginLeft:"smrl",scrollMarginRight:"smrr",scrollMarginTop:"smrt",scrollPadding:"spd",scrollPaddingBottom:"spdb",scrollPaddingLeft:"spdl",scrollPaddingRight:"spdr",scrollPaddingTop:"spdt",scrollSnapAlign:"ssa",scrollSnapStop:"sss",scrollSnapType:"sst",breakAfter:"bka",breakBefore:"bkb",breakInside:"bki",pageBreakAfter:"pbka",pageBreakBefore:"pbkb",pageBreakInside:"pbki",accessKey:"ack",className:"cn",contentEditable:"ced",contextMenu:"cmu",draggable:"drg",hidden:"hid",id:"id",is:"is",lang:"lng",nonce:"nnc",spellCheck:"spc",tabIndex:"tbi",title:"ttl",translate:"trl",accept:"acp",acceptCharset:"accs",action:"act",autoComplete:"atc",autoFocus:"atf",capture:"cap",challenge:"chg",checked:"chk",cols:"cls",colSpan:"csn",controls:"ctl",default:"def",defer:"dfr",disabled:"dis",encType:"ect",form:"frm",formAction:"fac",formEncType:"fect",formMethod:"fme",formNoValidate:"fnv",formTarget:"ftg",high:"hgh",inputMode:"imd",kind:"knd",label:"lbl",list:"lis",loop:"lp",low:"lw",max:"mx",maxLength:"mxl",method:"mtd",min:"mn",minLength:"mnl",multiple:"mul",muted:"mut",name:"nm",open:"opn",optimum:"opt",pattern:"ptn",placeholder:"phd",readOnly:"ro",required:"req",reversed:"rev",rows:"rws",rowSpan:"rsn",selected:"sel",span:"spn",start:"srt",step:"stp",type:"typ",value:"val",download:"dl",href:"hrf",hrefLang:"hrl",ping:"png",referrerPolicy:"rfp",rel:"rl",target:"tgt",allow:"alw",allowFullScreen:"afs",allowPaymentRequest:"apr",alt:"alt",cellPadding:"cpg",cellSpacing:"csg",cite:"cit",coords:"crd",crossOrigin:"cor",dateTime:"dtm",fetchPriority:"fpr",headers:"hds",httpEquiv:"hte",integrity:"itg",isMap:"ism",keyType:"kty",loading:"ldg",manifest:"mft",media:"mda",poster:"pst",preload:"prl",radioGroup:"rdg",sandbox:"sbx",scoped:"scod",seamless:"sml",shape:"shp",sizes:"szs",src:"src",srcDoc:"srd",srcLang:"srl",srcSet:"srs",useMap:"ump",ariaActiveDescendant:"aad",ariaAtomic:"aat",ariaBusy:"abu",ariaChecked:"achk",ariaControls:"acl",ariaCurrent:"acr",ariaDescribedBy:"adb",ariaDetails:"adt",ariaDisabled:"adis",ariaDropEffect:"ade",ariaErrorMessage:"aem",ariaExpanded:"aexp",ariaGrabbed:"agr",ariaHasPopup:"ahp",ariaHidden:"ahid",ariaInvalid:"ainv",ariaLabel:"alb",ariaLabelledBy:"alby",ariaLive:"alv",ariaModal:"amod",ariaMultiSelectable:"ams",ariaOrientation:"aor",ariaOwns:"aow",ariaPosInSet:"apis",ariaPressed:"aprs",ariaReadOnly:"aro",ariaRelevant:"arl",ariaRequired:"areq",ariaSelected:"asel",ariaSetSize:"assz",ariaValueMax:"avmx",ariaValueMin:"avmn",ariaValueNow:"avn",role:"role",onInit:"@in",onRender:"@rn",onUpdate:"@up",onStateChange:"@sc",onStateUpdate:"@su",onClick:"@ck",onContextMenu:"@cm",onDblClick:"@dc",onMouseDown:"@md",onMouseEnter:"@me",onMouseLeave:"@ml",onMouseMove:"@mm",onMouseOut:"@mo",onMouseOver:"@mv",onMouseUp:"@mu",onKeyDown:"@kd",onKeyPress:"@kp",onKeyUp:"@ku",onBlur:"@bl",onFocus:"@fc",onFocusIn:"@fi",onFocusOut:"@fo",onBeforeInput:"@bi",onChange:"@cg",onFormData:"@fd",onInput:"@ip",onInvalid:"@iv",onReset:"@rs",onSearch:"@sr",onSelect:"@sl",onSubmit:"@sm",onTouchCancel:"@tc",onTouchEnd:"@te",onTouchMove:"@tm",onTouchStart:"@ts",onPointerCancel:"@pc",onPointerDown:"@pd",onPointerEnter:"@pe",onPointerLeave:"@ple",onPointerMove:"@pm",onPointerOut:"@po",onPointerOver:"@pov",onPointerUp:"@pu",onDrag:"@dg",onDragEnd:"@dge",onDragEnter:"@dgn",onDragLeave:"@dgl",onDragOver:"@dgo",onDragStart:"@dgs",onDrop:"@dp",onResize:"@rz",onScroll:"@scl",onWheel:"@wh",onCopy:"@cy",onCut:"@ct",onPaste:"@pt",onCompositionEnd:"@cpe",onCompositionStart:"@cps",onCompositionUpdate:"@cpu",onAnimationEnd:"@ae",onAnimationIteration:"@ai",onAnimationStart:"@as",onTransitionEnd:"@tre",onTransitionStart:"@trs",onAbort:"@ab",onCanPlay:"@cap",onCanPlayThrough:"@cpt",onDurationChange:"@duc",onEmptied:"@em",onEncrypted:"@enc",onEnded:"@end",onError:"@er",onLoad:"@ld",onLoadedData:"@ldd",onLoadedMetadata:"@ldm",onPause:"@pa",onPlay:"@pl",onPlaying:"@plg",onProgress:"@prg",onRateChange:"@rc",onSeeked:"@sk",onSeeking:"@skg",onStalled:"@stl",onSuspend:"@ssp",onTimeUpdate:"@tu",onVolumeChange:"@vc",onWaiting:"@wt",icon:"ico",iconText:"ict",lookup:"lkp",router:"rtr",shapeModifier:"shpm"},re=Object.create(null);for(let t in yn)re[yn[t]]=t;var cC=Object.create(null);for(let t in yn){let e=yn[t];if(cC[e])throw new Error(`Duplicate abbreviation "${e}" for "${t}" \u2014 already used by "${cC[e]}"`);cC[e]=t}var oe=new Set(["state","st","scope","scp","attr","at","style","sy","data","dt","context","ctx","query","qy","class","cl"]),Ho=new Set(["text","tx","html","htm","content","cnt","placeholder","phd","src","href","hrf"]);function Mn(t){return/^[A-Z]/.test(t)}function Nn(t){return/^[:@.!$>&]/.test(t)||t.startsWith("> ")}function LF(t){if(!t||typeof t!="object")return"";let e=[];for(let n in t){let r=t[n];if(typeof r=="function"||r!==null&&typeof r=="object"&&!Array.isArray(r)||r===void 0)continue;let o=yn[n]||n;if(r===!0)e.push(o);else if(r===!1)e.push("!"+o);else if(Array.isArray(r)){let s=r.map(i=>ub(i));e.push(o+":"+s.join(","))}else e.push(o+":"+ub(r))}return e.join(" ")}function ub(t){return String(t).replace(/ /g,"_")}function jd(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?jd(n):n});let e={};for(let n in t){let r=t[n];if(Mn(n)){e[n]=lC(r);continue}if(Nn(n)){e[n]=lC(r);continue}let o=yn[n]||n;if(oe.has(n)||oe.has(o)){e[o]=r;continue}e[o]=lC(r)}return e}function lC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?jd(e):e}):typeof t=="object"?jd(t):t}function _i(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?_i(r):r});let e={},n=[];for(let r in t){let o=t[r];if(Mn(r)){e[r]=PF(o);continue}if(Nn(r)){e[r]=PF(o);continue}let s=yn[r]||r;if(oe.has(r)||oe.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Ho.has(r)||Ho.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?_i(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map(ub).join(","));continue}if(typeof o=="object"){e[s]=_i(o);continue}o===!0?n.push(s):o===!1?n.push("!"+s):typeof o=="number"||typeof o=="string"&&(o.includes(",")||o.includes("_"))?e[s]=o:n.push(s+":"+ub(o))}return n.length&&(e.in=n.join(" ")),e}function PF(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?_i(e):e}):typeof t=="object"?_i(t):t}function MF(t){if(!t||typeof t!="string")return{};let e={},n=NF(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=re[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=re[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=re[s]||s;if(i.includes(",")){e[a]=i.split(",").map(DF);continue}e[a]=DF(i)}return e}function NF(t){return t.trim().split(/\s+/).filter(Boolean)}function DF(t){let e=t.replace(/_/g," ");return/^-?\d+(\.\d+)?$/.test(e)?Number(e):e}function IF(t){return t.replace(/_/g," ")}function mq(t){if(!t||typeof t!="string")return{};let e={},n=NF(t);for(let r of n){if(r.startsWith("!")){let c=r.slice(1),l=re[c]||c;e[l]=!1;continue}let o=r.indexOf(":");if(o===-1){let c=re[r]||r;e[c]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=re[s]||s;if(i.includes(",")){e[a]=i.split(",").map(IF);continue}e[a]=IF(i)}return e}function wi(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?wi(n):n});let e={};for(let n in t){let r=t[n];if(Mn(n)){e[n]=fC(r);continue}let o=re[n]||n;if(Nn(n)&&o===n){e[n]=fC(r);continue}if(oe.has(o)||oe.has(n)){e[o]=r;continue}e[o]=fC(r)}return e}function fC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?wi(e):e}):typeof t=="object"?wi(t):t}function Si(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?Si(n):n});let e={};if(typeof t.in=="string"){let n=mq(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(Mn(n)){e[n]=uC(r);continue}let o=re[n]||n;if(Nn(n)&&o===n){e[n]=uC(r);continue}if(oe.has(o)||oe.has(n)){e[o]=r;continue}e[o]=uC(r)}return e}function uC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?Si(e):e}):typeof t=="object"?Si(t):t}function $F(t){return String(t).replace(/\\/g,"\\\\").replace(/_/g,"\\_").replace(/,/g,"\\,").replace(/ /g,"_")}function yq(t){let e="",n=0;for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){let r=t[n+1];if(r===","||r==="_"||r==="\\"){e+=r,n+=2;continue}}t[n]==="_"?e+=" ":e+=t[n],n++}return e}function bq(t){let e=[],n="",r=0;for(;r<t.length;){if(t[r]==="\\"&&r+1<t.length){n+=t[r]+t[r+1],r+=2;continue}if(t[r]===","){e.push(n),n="",r++;continue}n+=t[r],r++}return e.push(n),e}function FF(t){if(t==null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);return e.length===1&&e[0]==="in"&&typeof t.in=="string"}function xi(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(r){return r!==null&&typeof r=="object"?xi(r):r});let e={},n=[];for(let r in t){let o=t[r];if(Mn(r)){let i=BF(o);e[r]=FF(i)?i.in:i;continue}if(Nn(r)){let i=BF(o);e[r]=FF(i)?i.in:i;continue}let s=yn[r]||r;if(oe.has(r)||oe.has(s)){e[s]=o;continue}if(typeof o=="function"){e[s]=o;continue}if(o==null){e[s]=o;continue}if(Ho.has(r)||Ho.has(s)){e[s]=o;continue}if(Array.isArray(o)){if(o.some(function(a){return a!==null&&typeof a=="object"})){e[s]=o.map(function(a){return a!==null&&typeof a=="object"?xi(a):a});continue}if(o.length<=1){e[s]=o;continue}n.push(s+":"+o.map($F).join(","));continue}if(typeof o=="object"){e[s]=xi(o);continue}if(o===!0){n.push(s);continue}if(o===!1){n.push("!"+s);continue}if(typeof o=="number"){n.push(s+":#"+o);continue}n.push(s+":"+$F(o))}return n.length&&(e.in=n.join(" ")),e}function BF(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?xi(e):e}):typeof t=="object"?xi(t):t}function jF(t){return t.startsWith("#")&&/^#-?\d+(\.\d+)?$/.test(t)?Number(t.slice(1)):yq(t)}function dC(t){if(!t||typeof t!="string")return{};let e={},n=t.trim().split(/\s+/).filter(Boolean);for(let r of n){if(r.startsWith("!")){let l=r.slice(1),f=re[l]||l;e[f]=!1;continue}let o=r.indexOf(":");if(o===-1){let l=re[r]||r;e[l]=!0;continue}let s=r.slice(0,o),i=r.slice(o+1),a=re[s]||s,c=bq(i);if(c.length>1){e[a]=c.map(jF);continue}e[a]=jF(i)}return e}function ki(t){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(function(n){return n!==null&&typeof n=="object"?ki(n):n});let e={};if(typeof t.in=="string"){let n=dC(t.in);for(let r in n)e[r]=n[r]}for(let n in t){if(n==="in")continue;let r=t[n];if(Mn(n)){typeof r=="string"?e[n]=dC(r):e[n]=pC(r);continue}let o=re[n]||n;if(Nn(n)&&o===n){typeof r=="string"?e[n]=dC(r):e[n]=pC(r);continue}if(oe.has(o)||oe.has(n)){e[o]=r;continue}e[o]=pC(r)}return e}function pC(t){return t==null||typeof t=="function"?t:Array.isArray(t)?t.map(function(e){return e!==null&&typeof e=="object"?ki(e):e}):typeof t=="object"?ki(t):t}var _q={shorten:wi,stringify:Si,stringifyFurther:ki};function wq(t,e){if(!t||typeof t!="object")return t;if(Array.isArray(t))return t.map(r=>e(r));let n={};for(let r in t){let o=t[r];n[r]=o&&typeof o=="object"?e(o):o}return n}var Sq=["components","pages","snippets"],db={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=_q[e===!0?"shorten":e];if(r){for(let o of Sq)t[o]&&(t[o]=wq(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var Ud={};F(Ud,{Inspect:()=>pb,inspectPlugin:()=>kq});M();function UF(t){return v(t)?t:I(t)?t.find(e=>v(e)):""}function mC(t){if(!t)return;let e=t.__ref.__componentKey,n=t.extends&&UF(t.extends),r=t.parent&&t.parent.childExtends&&UF(t.parent.childExtends);return(e||n||r||"").split("_")[0].split(".")[0].split("+")[0]}function hb(t){if(!t||!t.__ref)return;let{components:e,pages:n,editor:r}=t.context,o=mC(t);return r&&r.onInitInspect&&!r.onInitInspect(o,t,t.state)?hb(t.parent):o&&(e[o]||n[o])?t:hb(t.parent)}var xq=(t,e,n)=>{let r=n.window||window;r.onkeydown=o=>{o.altKey&&o.shiftKey&&t.state.update({debugging:!0,preventSelect:!0},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0})},r.onkeyup=o=>{t.state.preventSelect&&(!o.altKey||!o.shiftKey)&&(t.state.replace({debugging:!1,preventSelect:!1},{preventUpdate:!0,preventContentUpdate:!0,preventRecursive:!0}),t.Inspector.state.update({area:!1}))}},pb={".preventSelect":{userSelect:"none"},"!preventSelect":{userSelect:"auto"},onInspect:xq,onMousemove:(t,e,n)=>{let r=t.target.ref,o=hb(r),s=e.Inspector.state;if(!o||!n.debugging||!o.__ref)return s.update({area:!1});let i=mC(o),a=l=>{s.update({area:l,focusKey:i})},c=()=>{if(t.altKey&&t.shiftKey){let{x:l,y:f,width:u,height:d}=o.node.getBoundingClientRect(),p={x:l,y:f,width:u,height:d};if(!s.area)return a(p);s.area.x!==p.x&&a(p)}else s.area&&s.update({area:!1})};window.requestAnimationFrame(()=>{c(),window.requestAnimationFrame(c)})},onMousedown:(t,e,n)=>{if(!n.debugging)return;let r=t.target.ref,o=hb(r);if(!o)return;let s=mC(o);if(!s)return;let i=r.context.editor;if(i&&i.onInspect)return i.onInspect(s,r,r.state,{allowRouterWhileInspect:!0});let a=JSON.stringify({componentKey:`${s}`});return r.context.socket?.emit&&r.context.socket.emit("route",a),t.preventDefault(),t.stopPropagation(),!1},Inspector:{state:{},transition:"all, defaultBezier, X",position:"fixed",hide:(t,e)=>!(e.area&&e.parent.debugging),style:{boxShadow:"0 0 10px #3686F733, 0 0 0 3px #3686F766, 0 0 100vmax 100vmax #000A",zIndex:"9999999",borderRadius:"10px",pointerEvents:"none"},Span:{position:"absolute",margin:"A2 0",fontSize:"Z",color:"text",zIndex:"99999999",transition:"all, defaultBezier, X",textDecoration:"underline",fontWeight:"500",top:"100%",style:{boxShadow:"0 25px 10px 35px black",textShadow:"0 0 10px black"},text:"{{ focusKey }}"},onInit:({context:t})=>{let{components:e}=t;if(k(e)){let{Content:n,...r}=e;for(let o in r)Lc[o]||(r[o].__ref||(r[o].__ref={}),r[o].__ref.__componentKey||(r[o].__ref.__componentKey=o))}},onBeforeUpdate:(t,e,n)=>{let{area:r}=n,o=n.area&&n.parent.debugging,s;if(!o)s="display: none !important";else if(r){let{x:i,y:a,width:c,height:l}=r;s=`
161
161
  display: block !important;
162
162
  top: ${a-6}px;
163
163
  left: ${i-6}px;
164
164
  width: ${c+12}px;
165
165
  height: ${l+12}px;
166
- `}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},fq={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(lb):t.extends?t.extends=[t.extends,lb]:t.extends=[lb]}};var zC={};F(zC,{DefaultSyncApp:()=>tG,FORBIDDEN_SEGMENTS:()=>Bd,Notifications:()=>pb,SyncComponent:()=>HC,applyOpsToCtx:()=>jd,connectToSocket:()=>PB,deletePath:()=>dC,isSafePath:()=>ub,liveSyncTransport:()=>db,notificationsPlugin:()=>oG,onOps:()=>mC,onSnapshot:()=>gC,seedRawDesignSystem:()=>jc,setPath:()=>pC,syncPlugin:()=>rG,wantsLiveSync:()=>xi});M();M();var Bd=new Set(["__proto__","constructor","prototype"]),ub=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Bd.has(t[e]))return!1;return!0},dC=(t,e)=>{!t||!ub(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},pC=(t,e,n,r=!1)=>{!t||!ub(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},jd=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":dC(t,o);break;case"update":case"set":pC(t,o,s,!0);break;default:break}return n},MF=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))Bd.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},uq=()=>typeof R<"u"&&!!R&&!!R.__SYMBOLS_ENV__,dq=()=>{try{if(R.self!==R.top)return!0}catch{return!0}try{return new URLSearchParams(R.location.search).has("liveSync")}catch{return!1}},IF=Object.freeze({mode:null,baseUrl:null}),db=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?uq()&&!dq()?IF:{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:IF},xi=t=>db(t).mode!==null,jc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},NF=(t,e,n,r="designSystem")=>{for(let o in e){if(Bd.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}NF(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},hC=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};jd(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Tf(n,r,NF)};M();var gC=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(jc(n,c),r){let l=hC(n);l&&ir(l)}}else is(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},mC=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=jd(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=hC(n,s);c?ir(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=MF(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var pq={success:"green",error:"red",warning:"yellow"},$F=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},pb={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:pq[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var Gq=!1,Yq=()=>Gq?"http://localhost:8080":"https://api.symbols.app",VC=null,Xq=()=>(VC||(VC=Promise.resolve().then(()=>(OB(),TB)).then(t=>{let e=t&&(t.io||t.default);if(typeof e!="function")throw new TypeError("socket.io-client exports no io()");return e}).catch(t=>(console.warn("[sync] socket.io-client failed to load \u2014 live sync disabled",t),null))),VC),Jq=async t=>{try{let e=t||Yq(),n=await R.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.warn("[sync] Failed to fetch service-token",e)}},RB=(t,e,n,r)=>{t.on("snapshot",gC(e,n,r)),t.on("ops",mC(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&$F(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},Zq=async(t,e,n,r,o)=>{let s=await Jq(r);if(!s)return console.warn("[sync] no service token \u2014 collab disabled"),null;let i=n.key;if(!i)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let a=n.editor?.projectId||null,c=await o;if(!c)return null;let l=c(r,{path:"/collab-socket",transports:["websocket"],auth:{token:s,projectId:a,projectKey:i,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return l.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),RB(l,t,e,n),l},Qq=async(t,e,n,r)=>{let o=await r;if(!o)return null;let s=o({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return s.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),RB(s,t,e,n),s.on("reload",()=>{typeof R<"u"&&R.location&&R.location.reload()}),s},PB=async(t,e,n)=>{let{mode:r,baseUrl:o}=db(n);if(!r)return null;let s=Xq();return r==="collab"?Zq(t,e,n,o,s):r==="runner"?Qq(t,e,n,s):null},HC={onInit:PB},tG={extends:[HC,pb]},LB=t=>typeof t>"u",eG=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),nG=t=>t?.editor?.runtime==="runner",DB=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},rG={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!LB(n.liveSync)?n.liveSync:xi(e))&&(eG(e)&&!nG(e)&&!e?.key||DB(t,HC))}},oG={name:"notifications",beforeCreate(t,e){if(!e)return;let n=LB(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&DB(t,pb)}};Ph();var KC={};F(KC,{fetchAsync:()=>lG,fetchSync:()=>cG});M();var IB=R&&R.location&&typeof R.location.host=="string"?R.location.host:null,WC=IB!==null?IB.includes("dev."):eo(),MB=WC?"http://localhost:8080/get":"https://api.symbols.app/get",sG={endpoint:MB},NB=async(t,e=sG)=>{let n=e.endpoint||MB,r=e.serviceRoute?I(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(L(e.onError))return e.onError(s);console.error(s)}},iG=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await NB(t,n),o=WC||e.isDevelopment?ye(r):ye(r.releases[0]);n.serviceRoute?I(n.serviceRoute)?n.serviceRoute.forEach(s=>{se(e[s],o[s.toLowerCase()])}):se(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{se(e[s],o[s.toLowerCase()])})}return e},aG=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await NB(t,r),s=WC||e.isDevelopment?ye(o):ye(o.releases[0]);n(s)}},cG=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await iG(t,e)}catch(n){console.error(n)}},lG=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&aG(e,n,r||(o=>{let s=o.designSystem;k(s)&&n.utils.init(s),k(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var fG={windows:()=>Promise.resolve(DA),dropdown:()=>Promise.resolve(VA),tooltip:()=>Promise.resolve(WA),analyze:()=>Promise.resolve(Nd),shorthand:()=>Promise.resolve(fC),inspect:()=>Promise.resolve(Fd),sync:()=>Promise.resolve(zC),fetch:()=>Promise.resolve(la),fetchOnCreate:()=>Promise.resolve(KC)},We=(t,e)=>Array.isArray(t.plugins)&&t.plugins.some(n=>n&&n.name===e),$B=t=>{let e=[];return t.shorthand&&e.push("shorthand"),t.analyze&&!We(t,"analyze")&&e.push("analyze"),t.inspect&&!We(t,"inspect")&&e.push("inspect"),t.fetch&&e.push("fetch"),t.windows!==!1&&e.push("windows"),t.dropdown!==!1&&e.push("dropdown"),t.tooltip!==!1&&e.push("tooltip"),e},Jd={},FB={},pe=t=>{if(Jd[t])return Jd[t];let e=fG[t];return e?(Jd[t]=e().then(n=>(FB[t]=n,n),n=>(delete Jd[t],console.error(`[smbls] the ${t} module failed to load; the app runs without it`,n),null)),Jd[t]):Promise.resolve(null)},Gc=t=>FB[t]||null;var Li=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{un(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var ZC={};F(ZC,{Helmet:()=>ij,applyElementMetadata:()=>Ib,applyMetadata:()=>gG,default:()=>LG,extractMetadata:()=>pG,generateHeadHtml:()=>PG,helmetPlugin:()=>Mb,resolveMetadata:()=>Zd});M();Mt();var yn={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},Yr=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key){let e=`${t.tag}[${t.attr}="${t.key}"]`;return t.key==="theme-color"?`${e}:not([data-smbls-theme-color])`:e}},BB=t=>ye({v:t}).v,jB=(t,e,n,r)=>{try{return St(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},Rb=Object.freeze({authored:!0}),Zd=(t,e,n,r)=>{if(!t)return{};let o=t;v(o)&&oe(o)&&(o=BB(o));let s=L(o),i=!s&&r?.authored===!0,a=s?jB(o,e,n,"metadata"):k(o)?{...o}:{};if(!k(a))return{};for(let c in a){let l=a[c],f=i&&v(l)&&!oe(l);v(l)&&oe(l)&&(l=BB(l)),L(l)?l=jB(l,e,n,c):v(l)&&oe(l)&&(l=void 0),v(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,Rb):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},uG=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),dG=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(uG(t[n]))return t[n]},pG=(t,e="/",n,r,o)=>{let s=t.pages||{},i=dG(s,e),a={};if(t.integrations?.seo&&(a={...t.integrations.seo}),t.app?.metadata){let f=Zd(t.app.metadata,n,r,Rb);a={...a,...f}}let c=new Set;if(i){let f=i.metadata||i.helmet||{},u=o?Zd(f,o,o.state,Rb):Zd(f,n,r,Rb);for(let d in u)c.add(d);a={...a,...u},!a.title&&i.state?.title&&(a.title=i.state.title,c.add("title")),!a.description&&i.state?.description&&(a.description=i.state.description,c.add("description"))}a.title||(a.title=t.name||"Symbols"),a.title&&(c.has("title")||!a["og:title"])&&(c.has("og:title")||(a["og:title"]=a.title)),a.description&&(c.has("description")||!a["og:description"])&&(c.has("og:description")||(a["og:description"]=a.description)),a.title&&!a["twitter:title"]&&(a["twitter:title"]=a.title),a.description&&!a["twitter:description"]&&(a["twitter:description"]=a.description);let l=c.has("og:url")?a["og:url"]:c.has("url")?a.url:void 0;if(l)a["og:url"]=l;else if(a["og:url"]||a.url){let f=(a["og:url"]||a.url||"").replace(/\/$/,"");if(f&&e&&e!=="/"){let u=e.startsWith("/")?e:"/"+e;a["og:url"]=f+u}}return Es(a,Ss(t.files,t.sharedLibraries))},KB=(t,e)=>Es(Zd(t,e,e.state),e.context?.files),qB=t=>t.context?.document||typeof document<"u"&&document,GB=t=>Object.prototype.hasOwnProperty.call(yn,t),Lb=new Map;for(let t in yn){let e=Yr(yn[t]);Lb.has(e)||Lb.set(e,yn[t])}var Db=t=>t.head||t.querySelector("head"),YC=(t,e)=>{let n=Db(t);return n?n.querySelector(e):null},qC=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),XC=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},JC=(t,e)=>{let n=Db(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},Di=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Map;n.forEach((a,c)=>{i.has(a)||i.set(a,c)});for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a,i.get(a));c&&(c.setAttribute(e,a),o.appendChild(c))}},YB=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>v(s)?s:JSON.stringify(s)),o=r.map(An);Di(t,"data-smbls-jsonld",o,(s,i)=>{let a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},XB=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(An);Di(t,"data-smbls-style",r,(o,s)=>{let i=t.createElement("style");return i.textContent=String(n[s]),i})},JB=t=>(t||[]).filter(e=>e&&(v(e)?e.trim():e.src)),ZB=t=>v(t)?t:String(t.src),QB=(t,e)=>{let n=t.createElement("script");return v(e)?n.setAttribute("src",e):(e.src&&n.setAttribute("src",e.src),e.type&&n.setAttribute("type",e.type),e.async&&(n.async=!0),e.defer&&(n.defer=!0),e.integrity&&n.setAttribute("integrity",e.integrity),e.crossorigin&&n.setAttribute("crossorigin",e.crossorigin),e.referrerpolicy&&n.setAttribute("referrerpolicy",e.referrerpolicy),e.nomodule&&(n.noModule=!0),e.body&&(n.textContent=String(e.body))),n},hG=(t,e)=>{let n=JB(e),r=n.map(ZB);Di(t,"data-smbls-script",r,(o,s)=>QB(t,n[s]))},tj=(t,e)=>{let n=(e||[]).filter(o=>k(o)),r=n.map(xs);Di(t,"data-smbls-alternate",r,(o,s)=>{let i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},ej=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(po);Di(t,"data-smbls-favicon",r,(o,s)=>{let i=n[s],a=t.createElement("link");if(a.setAttribute("rel","icon"),k(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})},nj=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Di(t,"data-smbls-single-icon",n?[n]:[],o=>{let s=t.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})},rj=(t,e)=>{let n=(e||[]).filter(o=>k(o)),r=n.map(ks);Di(t,"data-smbls-theme-color",r,(o,s)=>{let i=n[s],a=t.createElement("meta");return a.setAttribute("name","theme-color"),i.content!==void 0&&a.setAttribute("content",i.content),i.media!==void 0&&a.setAttribute("media",i.media),a})},gG=(t,e)=>{if(!(!k(t)||!e)){for(let n in t){let r=t[n];if(r==null||!GB(n)||n==="theme-color"&&Array.isArray(r))continue;let o=yn[n],s=YC(e,Yr(o))||JC(o,e);s&&XC(s,o,r)}Array.isArray(t.jsonLd)&&YB(e,t.jsonLd),Array.isArray(t.styles)&&XB(e,t.styles),Array.isArray(t.scripts)&&hG(e,t.scripts),Array.isArray(t.alternate)&&tj(e,t.alternate),Array.isArray(t.favicons)&&ej(e,t.favicons),(t.icon||t.favicon)&&nj(e,t.icon||t.favicon),Array.isArray(t["theme-color"])&&rj(e,t["theme-color"])}},UB=new WeakMap,GC=new WeakMap,oj=t=>{let e=t.location;return e&&v(e.pathname)?e.pathname:null},mG=t=>{let e=UB.get(t);return e||(e={doc:t,layers:[],servedPath:oj(t),originals:new Map,owned:new Set,lists:new Set},UB.set(t,e)),e},yG=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},VB=t=>{try{return JSON.stringify(t===void 0?null:t)??null}catch{return null}},bG=t=>{if(!k(t))return!0;for(let e in t)if(t[e]!==void 0&&t[e]!==null)return!1;return!0},_G=(t,e)=>{let n=GC.get(t);if(n)return n;let r=mG(e),o={element:t,values:null,signature:VB(null),disposed:!1,set(i){if(o.disposed)return;let a=VB(i);o.values=i,!(a!==null&&a===o.signature)&&(o.signature=a,zB(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);if(i!==-1&&r.layers.splice(i,1),!bG(o.values))try{zB(r)}catch(a){console.warn("[helmet] could not re-render the head after an element left:",a&&a.message||a)}}},s=r.layers.length;for(let i=0;i<r.layers.length;i++)if(yG(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),GC.set(t,o),o},sj=(t,e,n,r)=>{let o=_G(t,e),s=K(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},wG=Yr(yn.title),SG=Yr(yn.description),xG=Yr(yn["og:title"]),kG=Yr(yn["og:description"]),EG=Yr(yn["twitter:title"]),vG=Yr(yn["twitter:description"]),HB=(t,e,n,r)=>{let o=t.get(e);if(!o||!o.value)return;let s=t.get(n);(!s||!s.value||s.rank<o.rank)&&t.set(n,o);let i=t.get(r);(!i||!i.value)&&t.set(r,o)},Pb={jsonLd:YB,styles:XB,alternate:tj,favicons:ej,icon:nj,"theme-color":rj},AG=Object.keys(Pb).filter(t=>t!=="icon"),CG=t=>{let e=new Map,n={},r=[];for(let o=0;o<t.length;o++){let s=t[o].values;if(!k(s))continue;for(let a in s){let c=s[a];c==null||!GB(a)||a==="theme-color"&&Array.isArray(c)||e.set(Yr(yn[a]),{value:String(c),rank:o})}for(let a of AG)Array.isArray(s[a])&&(n[a]=s[a]);let i=s.icon||s.favicon;i&&(n.icon=i),Array.isArray(s.scripts)&&r.push(...s.scripts)}return HB(e,wG,xG,EG),HB(e,SG,kG,vG),{tags:e,lists:n,scripts:r}},TG=(t,e,n)=>{let{doc:r,originals:o}=t,s=Lb.get(e),i=YC(r,e),a=o.get(e);a||(a={value:i?qC(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=JC(s,r)),i&&(qC(i,s)!==n&&XC(i,s,n),t.owned.add(e))},OG=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=Lb.get(e),o=YC(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&oj(n)===t.servedPath){let a=o||JC(r,n);a&&qC(a,r)!==s.value&&XC(a,r,s.value)}else o&&o.remove()},RG=(t,e)=>{let n=JB(e);if(!n.length)return;let r=Db(t),o=new Set;for(let s of r.querySelectorAll("[data-smbls-script]"))o.add(s.getAttribute("data-smbls-script"));for(let s of n){let i=ZB(s);if(o.has(i))continue;let a=QB(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},zB=t=>{let{doc:e}=t;if(!Db(e))return;let{tags:n,lists:r,scripts:o}=CG(t.layers);for(let s of[...t.owned])n.has(s)||OG(t,s);for(let[s,{value:i}]of n)TG(t,s,i);for(let s in Pb)r[s]!==void 0?(Pb[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&Pb[s](e,null);RG(e,o)},PG=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${U(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${U(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${U(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=U(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u} data-smbls-single-icon="${f}">`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(k(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${U(p)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${U(po(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${U(f)}" data-smbls-favicon="${U(po(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(k(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${U(p)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${U(xs(f))}">`)}});continue}if(o==="theme-color"&&Array.isArray(s)){s.forEach(f=>{if(!k(f))return;let u=['name="theme-color"'];f.content!==void 0&&u.push(`content="${U(f.content)}"`),f.media!==void 0&&u.push(`media="${U(f.media)}"`),u.push(`data-smbls-theme-color="${U(ks(f))}"`),e.push(`<meta ${u.join(" ")}>`)});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${U(f)}" content="${U(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${U(f)}" content="${U(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${U(o)}" content="${U(f)}">`)):e.push(`<meta property="${U(o)}" content="${U(s)}">`):l?e.push(`<meta name="${U(o)}" content="${U(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${U(o)}" content="${U(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${U(o)}" content="${U(s)}">`)}return r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),e.push(...Sa(t)),e.join(`
167
- `)},ij={define:{metadata:(t,e)=>{Ib(t,e,n=>{let r=e.state?.root;k(r)&&(r.$helmet=n)})}}},Ib=(t,e,n)=>{let r=qB(e);r&&sj(e,r,()=>KB(t,e),n)},WB=t=>{let e=t.metadata;return e?KB(e,t):null},Mb={name:"helmet",create(t){if(!t.metadata)return;let e=qB(t);e&&sj(t,e,()=>WB(t))},update(t){let e=GC.get(t);if(!e)return Mb.create(t);e.disposed||e.set(WB(t))}},LG=ij;var aj=(t,e,n,r)=>{if(!t||!r?.fetch)return;let o=Gc("fetch");if(o){o.executeFetch(t,e,n,r);return}pe("fetch").then(s=>{s&&s.executeFetch(t,e,n,r)})},cj=(t,e)=>{t&&Ib(t,e)},lj=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Yc={routes:t=>t,metadata:cj,fetch:aj,$router:lj},fj=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=cj),t.fetch!==!1&&(e.fetch=aj),t.router!==!1&&(e.$router=lj),e};var QC={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},Nb={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},tT={...QC,router:Nb},DG={state:{},pages:{},components:{},router:Nb,define:Yc},Wo=DG;M();M();var uj=(t,e)=>V(t.extends)?t.extends:[];M();var dj=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let[o,s]of ba(t,_a))r[o]||(r[o]=s);return r};var eT={};F(eT,{apiUrl:()=>$b,channelByApiUrl:()=>mj,channelNames:()=>MG,channels:()=>Re,currentChannel:()=>Ko,defaultChannel:()=>zG,deployTarget:()=>UG,isKnownChannel:()=>HG,mermaidUrl:()=>jG,normalizeOwnerSegment:()=>WG,normalizeProjectKey:()=>qG,normalizeProjectSlug:()=>KG,parseSymboLsHost:()=>GG,previewProjectUrl:()=>BG,previewUrl:()=>yj,resolveChannel:()=>Mi,screenshotCdnHost:()=>bj,screenshotCdnUrl:()=>VG,setChannel:()=>NG,shellUrl:()=>FG,socketUrl:()=>$G});var Re={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var MG=Object.keys(Re.channels),$n=t=>!!(t&&Re.channels[t]),Mi=t=>$n(t)?Re.channels[t]:Re.channels[Re.defaultChannel],NG=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=$n(t)?t:null,Xc=void 0)},Xc,Ii=t=>typeof process<"u"&&process.env&&process.env[t]||null,Ko=()=>{if(Xc!==void 0)return Xc;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Ii("SYMBOLS_CHANNEL"),n=Ii("NODE_ENV"),r=Ii("SYMBOLS_API_URL")||Ii("SYMBOLS_API_BASE_URL"),o=r?mj(String(r).trim().replace(/\/+$/,"")):null;return Xc=$n(t)&&t||$n(e)&&e||$n(o)&&o||$n(n)&&n||Re.defaultChannel,Xc===Re.defaultChannel&&!$n(t)&&!$n(e)&&!$n(o)&&!$n(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Re.defaultChannel}". Outbound URLs (shellUrl${r?"":"/apiUrl"}) will target production`+(r?` (the API follows ${r}, which is no known channel)`:"")+"; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel."),Xc},pj=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],hj=t=>{let e=pj.indexOf(t);return e===-1?pj.length:e},mj=t=>{if(!t)return null;let e=Object.keys(Re.channels).filter(n=>Re.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>hj(n)-hj(r))[0]},$b=(t=Ko())=>Ii("SYMBOLS_API_URL")||Mi(t).api,$G=(t=Ko())=>Ii("SYMBOLS_SOCKET_URL")||Mi(t).socket,FG=(t=Ko())=>Mi(t).shell||null,yj=(t=Ko())=>Mi(t).preview||null,BG=({owner:t,key:e,env:n="production"}={},r=Ko())=>{let o=yj(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},jG=({owner:t,key:e,env:n="production"}={},r=Ko())=>{let o=Mi(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},UG=(t=Ko())=>Mi(t).deploy||{},bj=()=>Ii("SYMBOLS_SCREENSHOT_CDN")||Re.screenshotCdn,VG=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${bj()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},HG=$n,zG=Re.defaultChannel,WG=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",KG=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",qG=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},gj={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},GG=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=gj[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?gj[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};M();var xj='meta[name="brender"]',YG=3e3,nT=t=>t.document||(typeof document<"u"?document:null),kj=(t,e)=>{let n=t.parent;return n&&n.nodeType===1?n:n&&n.node&&n.node.nodeType===1?n.node:e?e.body:null},Ej=(t,e)=>{if(e&&e.__BRENDER__)return!0;let n=nT(t);if(!n||typeof n.querySelector!="function")return!1;let r=n.documentElement;if(r&&typeof r.hasAttribute=="function"&&r.hasAttribute("data-brender")||n.querySelector(xj))return!0;let o=kj(t,n);for(let s=o&&o.firstElementChild;s;s=s.nextElementSibling)if(s.hasAttribute("data-br"))return!0;return!1},vj=t=>{let e=nT(t);return!e||!e.head?null:Array.from(e.head.querySelectorAll('style[data-emotion="smbls"], style[data-brender]'))},Aj=(t,e)=>{if(!e||!e.length)return;let n=[];for(let o of e){let s=null;try{s=o.sheet&&o.sheet.cssRules}catch{s=null}if(s&&s.length)for(let i=0;i<s.length;i++){let a=s[i].cssText||"";(s[i].type===5||/^\s*@font-face/i.test(a))&&n.push(a)}else{let i=String(o.textContent||"").match(/@font-face\s*\{[^}]*\}/gi);i&&n.push(...i)}}let r=e.find(o=>o.parentNode);if(n.length&&r&&t&&typeof t.createElement=="function"){let o=t.createElement("style");o.setAttribute("data-smbls-faces",""),o.textContent=n.join(`
168
- `),r.parentNode.insertBefore(o,r)}e.forEach(o=>{o.parentNode&&o.remove()})},XG=t=>{console.warn("[smbls] the pre-render registry is not JSON \u2014 the page renders fresh:",t.message)},JG=(t,e)=>{let n=pr(e,Pf,{warn:XG});return n?{map:k(n.value)?n.value:null,block:n.block}:t&&k(t.__BR_REGISTRY__)?{map:t.__BR_REGISTRY__,legacy:!0}:null},ZG=(t,e,n)=>!n||!n.map||t.hydrate===!1?!1:n.legacy?t.hydrate===!0||k(t.hydrate)||!!e&&e.__BRENDER_HYDRATE__===!0:!0,QG=t=>{let e=k(t.hydrate)?t.hydrate.timeout:void 0;return typeof e=="number"&&e>=0?e:YG},Cj=(t,e,n)=>{if(t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__),n&&n.block&&n.block.parentNode&&n.block.remove(),e&&typeof e.querySelector=="function"){let r=e.querySelector(xj);r&&r.remove();let o=e.documentElement;o&&typeof o.hasAttribute=="function"&&o.hasAttribute("data-brender")&&o.removeAttribute("data-brender")}},tY=()=>new Promise(t=>{if(typeof MessageChannel=="function"){let e=new MessageChannel;e.port1.onmessage=()=>{e.port1.close(),t()},e.port2.postMessage(null)}else setTimeout(t,0)}),Tj=async(t,e)=>{let n=t.__firstNavigation;if(n&&typeof n.then=="function")try{await n}catch{}for(let r=0;r<20&&e.pending.size;r++){let o=Gc("fetch"),s=o&&typeof o.whenRequestsIdle=="function"?o.whenRequestsIdle:null;if(s&&await s(),await tY(),!s||!(o.requestsInFlight()>0))return}},eY=["click","keydown"],Oj=(t,e,n,r,o,s)=>{let i=!1,a=null,c=()=>f(),l=u=>{let d=u?"addEventListener":"removeEventListener";if(n&&typeof n[d]=="function")for(let p of eY)n[d](p,c,!0);e&&typeof e[d]=="function"&&e[d]("popstate",c)},f=()=>{if(i)return;i=!0,a!==null&&clearTimeout(a),l(!1),t.__hydration===r&&delete t.__hydration;let u=0;for(let d of r.pending)d.parentNode&&(d.remove(),u++);r.pending.clear(),r.pendingIn.clear(),r.whole=null,Io(r),Aj(n,s),e&&(e.__BRENDER_HYDRATION__={adopted:r.adopted,misses:r.misses,removed:u}),Cj(e,n,o),Rj(t,e,r.root,!0)};if(!r.pending.size)return f();a=setTimeout(f,QG(t)),l(!0),Tj(t,r).then(f,f)},nY=1e3,rY=(t,e)=>{t&&typeof t.requestIdleCallback=="function"?t.requestIdleCallback(e,{timeout:nY}):setTimeout(e,0)},_j=(t,e)=>{let n=Gc("fetch");!n||typeof n.seedIsStale!="function"||!n.seedIsStale()||rY(t,()=>{n.revalidateSeed(e).then(r=>{r&&t&&((t.__BRENDER_HYDRATION__||(t.__BRENDER_HYDRATION__={replaced:!0})).refreshed=r)},r=>console.error("[smbls] refreshing a stale pre-rendered page failed:",r))})},Rj=(t,e,n,r)=>{let o=Gc("fetch");if(!o||typeof o.seedIsStale!="function")return;let s=()=>{let i=()=>_j(e,n);Tj(t,{pending:{size:1}}).then(i,i)};if(o.seedIsStale())return r?_j(e,n):s();typeof o.whenSeedTaken=="function"&&o.whenSeedTaken(s)},oY=t=>({bubbles:!0,cancelable:!0,composed:!0,detail:t.detail,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons}),sY=(t,e,n,r)=>{if(!t||typeof t.addEventListener!="function")return{replay(){}};let o=[],s=a=>{for(let c=a;c&&c!==n;c=c.parentNode)if(r.pending.has(c))return!0;return!1},i=a=>{s(a.target)&&(a.preventDefault(),a.stopImmediatePropagation(),o.push({target:a.target,init:oY(a)}))};return t.addEventListener("click",i,!0),{replay(){t.removeEventListener("click",i,!0);let a=e&&e.MouseEvent||(typeof MouseEvent=="function"?MouseEvent:null);if(a)for(let{target:c,init:l}of o)c.isConnected&&r.claimed.has(iY(c,n,r))&&c.dispatchEvent(new a("click",l))}}},iY=(t,e,n)=>{for(let r=t;r&&r!==e;r=r.parentNode)if(n.claimed.has(r))return r;return null},aY=async()=>{for(await Ae();!No();)await Ae()},cY=async(t,e,n,r,o,s,i,a,c,l,f,u)=>{let d=f.mountYield,p=f.mountWhole;d===void 0&&(f.mountYield=u.budget),p===void 0&&(f.mountWhole=!0);let g=vA(o,{budget:u.budget,progressive:!0,pageOptions:{mountYield:f.mountYield,mountWhole:f.mountWhole}}),h=ni(),m=sY(i,s,r,a),y=u.lease||null;g.lease=y,y&&(o.__mountLease=y);let x=null,E=!1;try{try{x=t(e,n,o.key,f)}catch(C){console.error("[smbls] hydration failed, rendering fresh:",C),delete o.__hydration,Io(a);for(let _ of a.claimed)_.parentNode&&_.remove();return null}E=!await Uo(Br(x),y)||g.routeReady&&!await Uo(g.routeReady,y)||!await Uo(aY(),y),E&&(o.__hydration===a&&delete o.__hydration,Io(a),kA(x))}finally{f.mountYield=d,f.mountWhole=p,y&&(o.__mountLease=null),AA(o),h(),x||m.replay()}return E?(m.replay(),Dc(k(e)?e:{})):(a.root=x,Oj(o,s,i,a,c,l),m.replay(),x)},wj=(t,e,n,r,o,s,i,a,c,l,f)=>{if(!r||typeof r.querySelectorAll!="function")return null;let u=E=>{for(let C=E;C&&C!==r;C=C.parentNode)if(C.parentNode===r&&C.localName==="svg"&&C.id)return!0;return!1},d={};for(let E of r.querySelectorAll("[data-br]")){let C=E.getAttribute("data-br");u(E)?E.removeAttribute("data-br"):d[C]=E}let p={},g=new Set,h=new Map,m=a.map;for(let E in m){let C=m[E],_=d[C];if(!_||p[C])continue;p[C]=_,g.add(_);let b=_.parentNode;b&&h.set(b,(h.get(b)||0)+1)}for(let E in d)p[E]||d[E].removeAttribute("data-br");let y={registry:m,nodes:p,claimed:new Set,pending:g,pendingIn:h,adopted:0,misses:0};if(o.__hydration=y,f)return cY(t,e,n,r,o,s,i,y,a,c,l,f);let x;try{x=t(e,n,o.key,l)}catch(E){console.error("[smbls] hydration failed, rendering fresh:",E),delete o.__hydration,Io(y);for(let C of y.claimed)C.parentNode&&C.remove();return null}return y.root=x,Oj(o,s,i,y,a,c),x},Sj=(t,e,n,r,o,s,i,a,c,l)=>{if(Aj(i,c),r){let u=[];for(let d of r.childNodes){if(d.nodeType===1){let p=d.localName;if(p==="script"||p==="link"||p==="style"||p==="svg"&&d.id)continue}u.push(d)}u.forEach(d=>d.remove())}i&&typeof i.querySelectorAll=="function"&&i.querySelectorAll("[data-br]").forEach(u=>u.removeAttribute("data-br")),s&&(s.__BRENDER_HYDRATION__={replaced:!0});let f=t(e,n,o.key,l);return Cj(s,i,a),Promise.resolve(f).then(u=>Rj(o,s,u,!1),()=>{}),f},Pj=(t,e,n,r,o,s,i,a=null)=>{let c=nT(r),l=n&&n.nodeType?n:n&&n.node||kj(r,c),f=JG(o,c);r.prerendered=!0;let u=us(c);if(u&&(r.prerender=u),ZG(r,o,f)){if(a)return or().then(()=>Lc(a.lease)?wj(t,e,n,l,r,o,c,f,s,i,a):Dc(k(e)?e:{})).then(p=>p||Sj(t,e,n,l,r,o,c,f,s,i));let d=wj(t,e,n,l,r,o,c,f,s,i,a);if(d)return d}return Sj(t,e,n,l,r,o,c,f,s,i)};M();var Lj=t=>{let e={faces:0,links:0,kept:0};if(!t)return e;let n=dY(Gn());for(let r in t){let o=t[r];if(!o||!o.fontFace)continue;let s=Array.isArray(o.fontFace)?o.fontFace:[o.fontFace];for(let i of s){if(Dj(i)){let a=fY(i);a&&uY(a)&&e.links++;continue}if(lY(i)){if(n.has(oT(i))){e.kept++;continue}Ot(i.trim()),e.faces++;continue}if(typeof i=="string"&&i.includes("font-family")){if(n.has(oT(i))){e.kept++;continue}Ot(`@font-face { ${i} }`),e.faces++}}}return e},Dj=t=>typeof t=="string"&&t.trim().startsWith("@import"),lY=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),fY=t=>{if(!Dj(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},uY=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Gn();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s},rT=(t,e)=>{let n=new RegExp(`(?:^|[;{\\s])${e}\\s*:\\s*([^;}]+)`,"i").exec(t);return n?n[1].trim().toLowerCase():null},oT=t=>{let e=String(t||""),n=rT(e,"font-family");if(!n)return null;let r=rT(e,"font-weight")||"400";return r==="normal"?r="400":r==="bold"&&(r="700"),n.replace(/^['"]|['"]$/g,"")+"|"+r+"|"+(rT(e,"font-style")||"normal")},dY=t=>{let e=new Set,n=t&&t.styleSheets;if(!n)return e;for(let r=0;r<n.length;r++){let o;try{o=n[r].cssRules}catch{continue}if(o)for(let s=0;s<o.length;s++){let i=o[s].cssText||"";if(o[s].type===5||/^\s*@font-face/i.test(i)){let a=oT(i);a&&e.add(a)}}}return e};var Fj=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},Ij=(t="smbls")=>{let e={};for(let n in hi)Object.prototype.hasOwnProperty.call(hi,n)&&(Hn(n)?e[`smbls.${n}`]=hi[n]:e[n]=hi[n]);return e},Bj=t=>t.components?{...Ij(),...t.components}:Ij(),jj=t=>({...Od,...Ac,...bo,...t.utils,...t.snippets,...t.functions}),Uj=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var Vj=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,pY=3e3,hY=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=()=>n(e),s=Promise.resolve().then(o).then(a=>(a&&!r[t]&&(r[t]=a),r[t]||null)).catch(()=>null);return new Promise(a=>{let c=setTimeout(()=>a(null),pY);s.then(l=>{clearTimeout(c),a(l)})})}catch{return Promise.resolve(null)}},Mj={},cT=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=hY})=>{if(o||(o=lo[s]||ga(i)||"esmsh"),!t)return null;if(!bs(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=eo()&&r?`?${Math.random()}`:"",f=async(d,p)=>{let g=En(d,p,o)+l;try{await Promise.race([ma(g,{document:n,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=En(d,p,"symbols")+l;await Promise.race([ma(m,{document:n,type:"module"}),new Promise((y,x)=>setTimeout(()=>x(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let p=t[d];if(!(e&&e[d])&&!Mj[d]&&(Mj[d]=!0,!fo(d))){if(ys(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}Vj(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},Nj=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,gY=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Ie=="function"?Ie(t):Function.prototype.toString.call(t)}catch{return""}return""},mY=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=gY(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;Nj.lastIndex=0;let l;for(;(l=Nj.exec(c))!==null;)e.add(l[1])}}return e},yY=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},bY=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},Hj=(t,{syncRead:e=mY(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=yY(n)}={})=>{let o=t&&t.dependencies;if(!bs(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&bY(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},_Y=t=>import(t),sT={},wY=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},SY=(t,{importModule:e=_Y}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)if(!(fo(r)||ys(r))&&!Vj(r)){if(!sT[r]){let o=()=>e(r);sT[r]=Promise.resolve().then(o).then(s=>(wY(r,s),s||null),()=>null)}n.push(sT[r])}return Promise.all(n)},xY=2e3,kY=3e3,zj=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=kY}={})=>t?new Promise(o=>{let s=()=>{SY(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:xY}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,Wj=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||ga(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&fo(a))return await u.require(a,c);if(!u.packages[a]){let d=eo()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=En(a,p,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=En(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=En(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let h=En(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=Lt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},EY=/\s+/g,Kj=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,vY=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${Kj(o,e)}`)}return n},AY=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=vY(t,e));let o=t.replace(EY," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},CY=()=>(t,e,n)=>{let r=Kj(t,e);if(t){let{__ref:o}=e;o.__class.style=r}qj()(e.classlist,e,e.state,!0)},qj=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=je(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&AY(i,e,e.node)}},TY=()=>({style:CY(),classlist:qj()}),OY=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],iT=new WeakSet,aT=!1,RY=t=>!!t&&typeof t=="object",PY=new Set(["key","document","files","assets","themeRoot","config","newConfig","recordCss","router"]),Gj=t=>t.toLowerCase()==="font",LY=t=>{let e=2166136261,n=16777619^t.length;for(let r=0;r<t.length;r++){let o=t.charCodeAt(r);e=Math.imul(e^o,16777619),n=Math.imul(n^o,1540483477)}return(e>>>0).toString(36)+"."+(n>>>0).toString(36)+"."+t.length.toString(36)},$j=(t,e)=>typeof e=="function"?"fn:"+String(e):e,Yj=(t,e)=>{let n={};for(let o in t||{})Gj(o)||(n[o]=t[o]);let r={};for(let o in e)PY.has(o)||(r[o]=e[o]);return r.globalTheme=ky(e.globalTheme)||"auto",LY(1+"|"+JSON.stringify(n,$j)+"|"+JSON.stringify(r,$j))},DY=t=>{let e={};for(let n in t||{})Gj(n)&&k(t[n])&&bt(e,pt(t[n]),ie);return k(si.font)&&bt(e,pt(si.font),ie),e},IY=(t,e)=>{if(t.preparedDesignSystem!==void 0){let r=t.preparedDesignSystem;return delete t.preparedDesignSystem,r}let n=pr(e,If);return n?n.value:null},Xj=t=>{if(!t||t.preparedDesignSystem!==void 0)return null;let e=t.document||(typeof document<"u"?document:null);if(!e||typeof e.querySelector!="function"||typeof globalThis.fetch!="function")return null;try{let n=e.querySelector(Lf),r=n&&n.href;if(r)return globalThis.fetch(r,{credentials:"same-origin"}).then(c=>c&&c.ok?c.json():null).catch(()=>null);let o=e.querySelector(Df),s=o&&o.getAttribute("content");if(!s)return null;let i=new URL(s,e.baseURI||void 0).href,a=globalThis.fetch(i,{credentials:"same-origin",priority:"low"}).then(c=>c&&c.ok?c.json():null).catch(()=>null);return NY(a,i,t.window||e.defaultView)}catch{return null}},MY=(t,e)=>{let n=e&&e.performance||(typeof performance<"u"?performance:null);if(!n||typeof n.getEntriesByName!="function")return!1;try{let r=n.getEntriesByName(t);for(let o=0;o<r.length;o++)if(r[o].responseEnd>0)return!0}catch{}return!1},NY=(t,e,n)=>{let r=!1,o=t.then(s=>(r=!0,s));return o.deferred=!0,o.ready=()=>r||MY(e,n),o},Jj=t=>!!t&&(t.deferred!==!0||t.ready()),$Y=t=>k(t)&&t.format===1&&typeof t.fingerprint=="string"&&k(t.config)&&Array.isArray(t.rules),FY=(t,e,n,r)=>{if(r.localFile)return null;let o=Ug(t);return o?{format:1,fingerprint:Yj(n.designSystem,r),config:o,rules:e.rules,sprites:e.sprites}:null},Zj=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||TY(),s=()=>e.designSystem?bt(pt(e.designSystem),pt(si),ie):pt(si),i={};for(let m of OY)e[m]!==void 0&&(i[m]=e[m]);let a,c=RY(n),f=c&&iT.has(n)&&!e.skipDesignSystemInit,u=!f&&!aT,d=f?`[data-smbls-app="${t}"]`:":root";e.scopeSelector=d;let p={key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...tT,...i,...r};if(e.skipDesignSystemInit){if(a=P(t)||P(),a&&(a.__domDocument=n),a?.CSS_VARS){mt(a);try{Ot({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&Ot(xy(a.CSS_MEDIA_VARS,d));let m=Hs(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(m).length&&Ot(m)}finally{ht()}}}else if(e.isolateDesignSystem&&!f){let m=Sg();m.__domDocument=n;let y=null,x=e.captureDesignSystem?E=>{y=E}:void 0;mt(m);try{a=ir(s(),{...p,config:m,recordCss:x})}finally{ht()}y&&(e.preparedDesignSystem=FY(a,y,e,p))}else if(u){let m=P();m&&(m.__domDocument=n);let y=m&&m._scratchConfig&&!p.localFile?IY(e,n):null;$Y(y)&&y.fingerprint===Yj(e.designSystem,p)?(a=wA(y,m,p,DY(e.designSystem)),e.designSystemSource="prepared"):(a=ir(s(),p),e.designSystemSource="processed"),a&&a!==m&&(a.__domDocument=n),c&&iT.add(n),aT=!0}else{let m=Xf(t,s(),{cleanBase:!0});for(let y in i)m[y]=i[y];if(m.__domDocument=n,f){let y=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=y,m.varPrefix=y}mt(m);try{a=ir(m,p)}finally{ht()}c&&iT.add(n),aT=!0}let g=a?.CONFIG||a,h=g?.font;if(h){mt(g);try{Lj(h)}finally{ht()}}return[a,o]},Qj=(t,e)=>{let n={};e.state&&ro(n,e.state),t&&t.state&&ro(n,t.state);let r=e.polyglot;if(r){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=gs({polyglot:r,pathname:ms(e.window),stored:o,stateLang:n.lang});(o||s!==yr(n.lang,r))&&s!==n.lang&&(n.lang=s),r.translations&&BY(e,r,n,s)}return n.isRootState=!0,pt(n)},BY=(t,e,n,r)=>{let o=new Set,s=new Set,i=(l,f)=>{if(!s.has(l)){if(!as(t,l,n)){o.add(l);return}n[l]=f,s.add(l),zn(t,l,f)}},a=e.translations[r];if(a&&typeof a=="object")for(let l in a)i(l,a[l]);let c=new Set(kn(e,!1));for(let l in e.translations)c.has(l)||i(l,e.translations[l]);o.size&&e.verbose!==!1&&t.verbose!==!1&&console.warn(`[polyglot] ${o.size} translation key${o.size===1?"":"s"} collide${o.size===1?"s":""} with a declared root-state key (${[...o].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)},t3=(t,e)=>{k(t.routes)&&k(e.pages)&&Lt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},lT=t=>{Cf(t,t.sharedLibraries)};var pT={};F(pT,{default:()=>XY,getActiveLang:()=>$i,getLanguages:()=>tp,getLocalStateLang:()=>op,getPendingLang:()=>Qd,initPolyglot:()=>Bb,loadTranslations:()=>Ni,polyglotPlugin:()=>Zc,setLang:()=>np,trackLoadTranslations:()=>dT,translate:()=>ep,upsertTranslation:()=>rp});M();Mt();var jY="smbls_t_",UY="smbls_tv_",fT=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return e?e.localStorage:null},Jc={get(t,e){try{return fT(t)?.getItem(e)??null}catch{return null}},set(t,e,n){try{fT(t)?.setItem(e,n)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t,e){try{fT(t)?.removeItem(e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}}},e3=new WeakMap,n3=t=>{let e=e3.get(t);return e||(e={},e3.set(t,e)),e},r3=new WeakMap,c3=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,l3=t=>{let e=r3.get(t);return e||(e={seq:0,pending:_n(null),wake:null},r3.set(t,e)),e},o3=(t,e,n)=>new Promise(r=>{let o=null,s=()=>{o!==null&&clearTimeout(o),o=null,t.wake===s&&(t.wake=null),r()};t.wake=s,Promise.resolve(e).then(s,s),n>0&&(o=setTimeout(s,n))}),s3=(t,e)=>!!(t?.translations&&t.translations[e]),VY=3e3,HY=2147483647,zY=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,HY):0:VY},WY=new RegExp("\\p{L}","gu"),KY=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(WY);if(s)for(let i=0;i<s.length;i++)e.add(s[i])}else if(r&&typeof r=="object"&&o<8)for(let s in r)n(r[s],o+1)};for(let r=0;r<t.length;r++)n(t[r],0);return Array.from(e).join("")},qY=(t,e)=>{let n=t?.fonts;if(!e||!n||!t.body||typeof n.check!="function"||typeof n.load!="function")return null;try{let o=(t.defaultView||globalThis).getComputedStyle(t.body).fontFamily;if(!o)return null;let s="1em "+o;return n.check(s,e)?null:Promise.resolve(n.load(s,e)).then(()=>{},()=>{})}catch{return null}};function $i(){let t=this?.context,e=t?.polyglot,n=this?.state?.root||t?.state?.root;return yr(n?.lang||t?.state?.lang,e)}function Qd(){let t=this?.context,e=c3(t,this?.state?.root||t?.state?.root);return e?l3(e).pending.get():null}function tp(){let t=this?.context?.polyglot;return t?kn(t):[]}var Fb=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},i3=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Fb(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function ep(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=i3(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Fb(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Fb(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=i3(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Fb(l,t);if(f!==void 0)return f}}return t}async function Ni(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root;if(!r||!o)return;if(e&&e.inFlight===!0)return n3(o)[(r.storagePrefix||"smbls")+":"+t];let s=r.storagePrefix||jY,i=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):UY);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let f=Jc.get(n,s+t);if(f)try{let u=JSON.parse(f),d={translations:{...o.translations||{}}};d.translations[t]=u,o.update&&o.update(d)}catch(u){console.warn("[polyglot] Failed to apply language update:",u.message)}}let a=n3(o),c=(r.storagePrefix||"smbls")+":"+t;if(a[c])return a[c];let l=this;return a[c]=(async()=>{try{let f=r.fetch,u=parseInt(Jc.get(n,i+t),10)||0,d,p,g;if(L(f)){let m=await f(t,u,l);if(!m||m.changed===!1)return;d=m.translations||m.data||m,p=m.version||0,g=!0}else if(k(f)){let m=l.getDB||(()=>n.fetch),y=L(m)?await m.call(l):n.fetch;if(!y)return;let x=f.rpc||f.from||"get_translations_if_changed",E={p_lang:t,p_cached_version:u,...f.params||{}},C=await y.rpc({from:x,params:E});if(C.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,C.error;let _=C.data;if(!_||!_.changed)return;d=_.translations||{},p=_.version||0,g=!0}else return;if(!g||!d)return;Jc.set(n,s+t,JSON.stringify(d)),p&&Jc.set(n,i+t,String(p));let h={translations:{...o.translations||{}}};h.translations[t]=d,o.update&&o.update(h)}catch(f){if(r.verbose!==!1){let u=f?.message||f?.details||(typeof f=="object"?JSON.stringify(f):String(f));console.warn("[polyglot] Failed to load translations for",t,"-",u)}}finally{delete a[c]}})(),a[c]}var uT=new WeakMap,a3=Symbol.for("@symbo.ls/polyglot:trackedLoadTranslations");function dT(t){if(!L(t)||t[a3]||t===Ni)return t;let e=function(n,r){let o=this?.context,s=this?.state?.root||o?.state?.root,a=(o?.polyglot?.storagePrefix||"smbls")+":"+n;if(r&&r.inFlight===!0){let l=s&&uT.get(s);return l&&l[a]?l[a]:Ni.call(this,n,r)}let c=t.call(this,n,r);if(s&&c&&typeof c.then=="function"){let l=uT.get(s);l||uT.set(s,l={});let f=Promise.resolve(c);l[a]=f;let u=()=>{l[a]===f&&delete l[a]};f.then(u,u)}return c};return e[a3]=!0,e}var GY=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function np(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;e?.persist!==!1&&Jc.set(n,da(r),t);let i=l3(c3(n,o)),a=++i.seq;i.wake&&i.wake();let c=()=>i.seq===a;if(this.call("getActiveLang")===t){i.pending.set(null),s?.documentElement&&(s.documentElement.lang=t);return}try{if(r?.fetch){let f=this.call("loadTranslations",t);if(!s3(o,t)){i.pending.set(t);let u=null;if(await o3(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!s3(o,t)&&!r.translations?.[t])return}}let l=zY(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=qY(s,KY(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await o3(i,f,l),!c()))return}i.pending.set(null),YY(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function YY(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>Gl(t,c,n);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}n.update&&n.update(i);for(let c in i)c!=="lang"&&zn(t,c,i[c]);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&n[c]&&typeof n[c]=="object"&&!Array.isArray(n[c])){for(let f in l)n[c][f]=l[f];zn(t,c,n[c])}}if(r&&s){let c=r.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{GY(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function rp(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&k(o.fetch)){let i=this.getDB||(()=>r.fetch),a=L(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function Bb(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=Jc.get(t,da(e)),o=gs({polyglot:e,pathname:ms(t.window),stored:r,stateLang:n.lang||t?.state?.lang}),s=t?.document||globalThis.document;s?.documentElement&&(s.documentElement.lang=o),n.update&&n.lang!==o&&n.update({lang:o}),e.fetch&&!(e.translations&&e.translations[o])&&await this.call("loadTranslations",o)}function op(t){try{let e=$i.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var Zc={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,Bb.call(t))}},XY=Zc;var sp={polyglot:ep,getLocalStateLang:op,getActiveLang:$i,getLang:$i,setLang:np,getPendingLang:Qd,getLanguages:tp,loadTranslations:Ni,upsertTranslation:rp};var gT={};F(gT,{SYSTEM_METRICS:()=>ip,capsizeHandler:()=>hT,capsizePlugin:()=>Ub,computeCapsize:()=>f3,default:()=>JY,resolveFontSizePx:()=>u3,resolveMetrics:()=>d3});var ip={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},jb=t=>parseFloat(t.toFixed(4)),f3=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,p=(r-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${jb(t/16)}rem`,lineHeight:`${jb(f)}px`,capHeightTrim:`${jb(-p)}em`,baselineTrim:`${jb(-g)}em`}},u3=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},d3=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(ip[i])return ip[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(ip[a])return ip[a]}}return null},hT=(t,e,n,r)=>{if(!t)return;let o=u3(e.fontSize,r);if(!o)return;let s=d3(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=f3(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Ub={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},JY=Ub;var ZY="@symbo.ls/fetch:EARLY",QY=()=>new Promise(t=>setTimeout(t,0)),mT=t=>{let e=typeof globalThis<"u"?globalThis[Symbol.for(ZY)]:null,n=e&&e.afterFirstView;return typeof n!="function"||e.afterFirstViewRan?null:(e.afterFirstViewRan=!0,Promise.resolve(t&&t.__firstNavigation).catch(()=>{}).then(QY).then(()=>{try{n(e.ctx||{})}catch(r){console.error("[smbls] fetch.early afterFirstView failed:",r)}}))};var _T=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),wT=t=>Me(t)?t.library!==void 0?t.library:t.key??t.name:t,tX=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=wT(i);if(!_T(a))return i;let c=s(a);return c?Me(i)?{...i,library:c}:c:null}).filter(Boolean)},ST=new WeakMap,eX={lazy:!0,window:globalThis},p3=["components","pages","functions","methods","snippets"],nX=p3.filter(t=>t!=="methods"),yT=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,n=[t];for(;n.length;){let r=n.pop();if(!r||typeof r!="object"||e.has(r))continue;e.add(r);let o;try{o=Object.keys(r)}catch{continue}for(let s of o){let i;try{i=r[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&n.push(i)}}return!1},rX=(t,e)=>{if(os(e)||os(t))return"boot-revived";if(yT(t))return"local";if(e&&typeof e=="object"){if(yT(e.app))return"local";for(let n of nX)if(yT(e[n]))return"local"}return"raw-json"},h3=(t,e)=>{let n=e?t[e]:t;if(!k(n))return;let r=ye(n,{},eX);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},oX=t=>{if(!k(t)||os(t))return t;for(let e of[...p3,"app"])h3(t,e);return Yi(t)},sX=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=Me(n)?n.library:n;k(r)&&!e.has(r)&&oX(r)}return t},xT=new WeakMap,bT=t=>{let e=ST.get(t);e&&(ST.delete(t),zj(e))},g3=t=>t.notifications===!0||t.notifications!==!1&&!!t.editor&&t.editor.verbose===!0,m3=t=>t.sync!==!1&&xi(t)||g3(t),y3=t=>{let e={shorthand:null,analyze:null,inspect:null,fetch:null,sync:null,windows:null,dropdown:null,tooltip:null};for(let n of $B(t))e[n]=pe(n);return m3(t)&&(e.sync=pe("sync")),e},kT=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(v(t)?t:"smblsapp");e.define=e.define||Yc,e.cssPropsRegistry=xt,e.window=Fj(e);let s=y3(e),i=rX(t,e);if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__&&e.sharedLibraries&&e.sharedLibraries.length)lT(e);else if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(x=>{let E=wT(x);return typeof E=="string"||_T(E)})){e.sharedLibraries=tX(e.sharedLibraries,e.symbolsConfig);let x=new Set(e.sharedLibraries.map(C=>wT(C)).filter(C=>k(C)&&!_T(C))),E=await Of(e.sharedLibraries,{apiBaseUrl:$b()});e.sharedLibraries=i==="raw-json"?E:sX(E,x)}dj(e.sharedLibraries),lT(e)}xi(e)&&jc(e,e.designSystem);let a=xT.get(e);a&&(xT.delete(e),Jj(a)&&(e.preparedDesignSystem=await a));let[c,l]=Zj(o,e);if(e.designSystem=c,e.registry=l,Nf(e,{apiBaseUrl:$b()}),e.cases||(e.cases={}),e.shorthand){let y=await(s.shorthand||pe("shorthand"));y&&y.shorthandPlugin.prepareContext(e)}let f=Qj(t,e);if(e.state=f,cf(f),e.pages=t3(t,e),e.components=Bj(e),e.utils=jj(e),lo[e.packageManager]){let y=Hj(e);y&&y.deferred?(y.blocking&&await cT({...e,dependencies:y.blocking}),ST.set(e,y.deferred)):e.dependencies=await cT(e)}if(e.methods=Uj(e),e.routerOptions=U2(t,e),e.defaultExtends=[Gm],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.globalScope=e.globalScope||{},e.plugins.some(y=>!y||typeof y!="object")){let y=e.plugins.filter(x=>!x||typeof x!="object");e.plugins=e.plugins.filter(x=>x&&typeof x=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${y.length} non-plugin entr${y.length===1?"y":"ies"} (${y.map(x=>JSON.stringify(x)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}let u=e.globalScope;e.globalScope&&k(e.globalScope)&&(e.globalScope=ss(e.globalScope));let d=(y,x)=>{i==="raw-json"&&h3(y,x)};d(t),d(e,"components"),d(e,"pages"),d(e,"functions"),d(e,"methods"),d(e,"snippets"),d(e,"app"),vf(e,u),Af(e);let p=y=>y&&typeof y.select=="function";if(e.fetch?.__resolved&&!p(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!p(e.db.__resolved)&&delete e.db.__resolved,e.polyglot&&!We(e,"polyglot")){e.plugins.push(Zc);for(let y in sp)typeof e.functions[y]!="function"&&(e.functions[y]=sp[y])}if(e.polyglot&&e.functions&&typeof e.functions.loadTranslations=="function"&&(e.functions.loadTranslations=dT(e.functions.loadTranslations)),We(e,"helmet")||e.plugins.push(Mb),We(e,"inertOutside")||e.plugins.push(Hm),e.fetch){let y=await(s.fetch||pe("fetch"));if(y){We(e,"fetch")||e.plugins.push(y.fetchPlugin);let{fetchFunctions:x}=y;for(let E in x)typeof e.functions[E]!="function"&&(e.functions[E]=x[E])}}if(e.designSystem?.typography?.useCapsize!==!1&&!We(e,"capsize")&&(e.plugins.push(Ub),e.cssPropsRegistry.useCapsize=hT),e.shorthand&&!We(e,"shorthand")){let y=await(s.shorthand||pe("shorthand"));y&&e.plugins.push(y.shorthandPlugin)}if(e.analyze&&!We(e,"analyze")){let y=await(s.analyze||pe("analyze"));if(y){let x=e.analyze===!0?{}:e.analyze;e.analyze=y.createAnalyzeState(x),e.plugins.push(y.analyzePlugin)}}let g=e.sync!==!1&&xi(e),h=m3(e)?await(s.sync||pe("sync")):null;if(h&&g&&!We(e,"sync")&&e.plugins.push(h.syncPlugin),e.inspect&&!We(e,"inspect")){let y=await(s.inspect||pe("inspect"));y&&e.plugins.push(y.inspectPlugin)}h&&g3(e)&&!We(e,"notifications")&&e.plugins.push(h.notificationsPlugin);let m=async y=>{if(e[y]===!1)return;let x=await(s[y]||pe(y));if(!x)return;let{components:E,functions:C}=x;for(let _ in E)k(e.components[_])||(e.components[_]=E[_]);for(let _ in C)typeof e.functions[_]!="function"&&(e.functions[_]=C[_])};return await m("windows"),await m("dropdown"),await m("tooltip"),e},ap=async(t,e)=>{k(e)||(e={});let n=N2(e);y3(e);let r=Xj(e);if(r&&xT.set(e,r),n&&(n.lease=I2(e),await or(),!n.lease.live()))return Dc(k(t)?t:{});fr(t)?(e.parent=t,t={}):v(t)?(e.key=t,t={}):k(t)?t={...t}:t={};let o=e.window||(typeof window<"u"?window:null),s=Ej(e,o),i=s?vj(e):null;if(await kT(t,e),e.useReset!==!1){let u=e.document||(typeof document<"u"?document:null);if(u){let d=u.head.querySelector("style[data-smbls]");d||(d=u.createElement("style"),d.setAttribute("data-smbls",""),u.head.appendChild(d));let p=d.sheet;if(p){try{p.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{p.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&k(e.app))for(let u in e.app)t[u]===void 0&&(t[u]=e.app[u]);t.extends=uj(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await Wj({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let u of e.plugins)if(typeof u.beforeCreate=="function")try{u.beforeCreate(t,e)}catch(d){console.error(`[smbls] plugin "${u.name||"?"}" beforeCreate error:`,d)}let a=e.document;if(!a||!a.createElement)return bT(e),t;let c=e.parent||a.body,l={verbose:e.verbose,context:e,...e.domqlOptions};if(s){let u=await Pj(Gt,t,c,e,o,i,l,n);return Rd(u)||(bT(e),mT(e)),u}let f=n?await F2(t,c,e,l,n):Gt(t,c,e.key,l);return f?(bT(e),mT(e),typeof window<"u"&&!e.document&&(window.__smblsApp=f),f):Dc(t)};var ET=(t,e)=>{if(!k(e))return bt(t,{});let{state:n,...r}=e;return bt(t,r),n!==void 0&&(k(t.state)&&k(n)?ro(t.state,n):t.state===void 0&&(t.state=n)),t},iX=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},aX=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},b3=t=>{let e=aX();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},vT=(t,e=Wo,n)=>{let r={...Wo,...ET(e,n)};return b3(r),iX(r),ap(t,r).then(s=>{if(Rd(s))return s.destroy=()=>Li(s),s;if(OA(s,r),s.destroy=()=>Li(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Pd(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},cX=(t,e=Wo,n)=>{let r=vT(t,e,n),o={...Wo,...ET(e,n)},s=o.key;return s&&o.editor&&o.editor.async&&pe("fetchOnCreate").then(i=>{i&&i.fetchAsync(r,s,{utils:Od,...o})}),r},lX=async(t,e=Wo,n)=>{let r={...Wo,...ET(e,n)};b3(r);let o=e.key;if(o&&r.editor){let i=await pe("fetchOnCreate");i&&await i.fetchSync(o,r)}let s=await ap(t,r);return Rd(s)?(s.destroy=()=>Li(s),s):(OA(s,r),s.destroy=()=>Li(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Pd(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s)},fX=(t={},e=Wo,n)=>vT({deps:{isUndefined:Yt},...t},bt({domqlOptions:{onlyResolveExtends:!0}},e),n);Mt();M();Ph();var _3={"@symbo.ls/signal":al,"@symbo.ls/scratch":B0,"@symbo.ls/element":zm,"@symbo.ls/css":Zg,"@symbo.ls/utils":Bf,"@symbo.ls/state":Gk,"@symbo.ls/router":Ac,"@symbo.ls/polyglot":pT,"@symbo.ls/helmet":ZC,"@symbo.ls/fetch":la,"@symbo.ls/capsize":gT,"@symbo.ls/shorthand":lC,"@symbo.ls/analyze":Nd,"@symbo.ls/inspect":Fd,"@symbo.ls/channels":eT},w3=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in _3)r[o]||(r[o]=_3[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},S3=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},x3=["@symbo.ls/sdk"],k3=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r};var TT={};F(TT,{BUILD_DOMQL_SYSTEM_PROMPT:()=>M3,DEFAULT_MAX_TOKENS:()=>qb,DEFAULT_MODEL:()=>qo,DEFAULT_PROVIDER:()=>fp,DEFAULT_TEMPERATURE:()=>Kb,MODEL_TIER_ALIASES:()=>CT,PROVIDER_MODELS:()=>lp,SIMONE_BASE_URL:()=>cp,SIMONE_CHAT_PATH:()=>Vb,SIMONE_CODE_PATH:()=>Hb,SIMONE_CODE_SYMBOLS_PATH:()=>zb,SIMONE_HEALTH_PATH:()=>Wb,SIMONE_TOOLS_PATH:()=>E3,WORKSPACE_SYSTEM_PROMPT:()=>I3,buildMessages:()=>O3,chat:()=>up,health:()=>T3,parseSimoneResponse:()=>L3,resolveModel:()=>N3,streamChat:()=>up,streamCode:()=>A3,streamCodeSymbols:()=>C3,toLegacyEnvelope:()=>D3});var cp="https://symbols-service-production.up.railway.app",Vb="/api/chat",Hb="/api/code",zb="/api/code-symbols",Wb="/api/health",E3="/api/tools",lp={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},fp="gemini",qo=lp[fp][0],Kb=.7,qb=4096;function uX(t){if(!t)return null;for(let[e,n]of Object.entries(lp))if(n.includes(t))return e;return null}function v3(t,e){return t?t.replace(/\/$/,"")+e:e}function dX(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function up(t,e={},n){let{baseUrl:r=cp,path:o=Vb,model:s=qo,provider:i=uX(s)||fp,temperature:a=Kb,maxTokens:c=qb,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let p={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let g=await fetch(v3(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let C=g.statusText;try{let b=await g.text();try{let w=JSON.parse(b);C=w.error||w.detail||C}catch{C=b||C}}catch{}let _=new Error(`simone: HTTP ${g.status} \u2014 ${C}`);throw _.status=g.status,_}if(!g.body||typeof g.body.getReader!="function"){let C=await g.text();return n&&n(C),{text:C,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,y=[],x=[],E="";try{for(;;){let{done:C,value:_}=await h.read();if(C)break;E+=m.decode(_,{stream:!0});let b=E.indexOf(`
169
- `);for(;b!==-1;){let w=E.slice(0,b).trim();if(E=E.slice(b+1),w){let S=dX(w);if(S?.done)return{text:y.join(""),errors:x};let A=S?.chunk;A?.delta&&(y.push(A.delta),n&&n(A.delta)),A?.error&&x.push(A.error)}b=E.indexOf(`
170
- `)}}return{text:y.join(""),errors:x}}finally{h.cancel().catch(()=>{})}}function A3(t,e={},n){return up(t,{...e,path:Hb},n)}function C3(t,e={},n){return up(t,{...e,path:zb},n)}async function T3(t={}){let{baseUrl:e=cp,signal:n,headers:r}=t,o=await fetch(v3(e,Wb),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function O3({system:t,history:e=[],user:n,context:r}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(n){let s=n;if(r!=null){let i=typeof r=="string"?r:JSON.stringify(r,null,2);s=`${s}
166
+ `}return e.node.style=s,e.Span.node.innerText=n.focusKey,!1}}},kq={name:"inspect",beforeCreate(t,e){Array.isArray(t.extends)?t.extends.push(pb):t.extends?t.extends=[t.extends,pb]:t.extends=[pb]}};var YC={};F(YC,{DefaultSyncApp:()=>pG,FORBIDDEN_SEGMENTS:()=>Vd,Notifications:()=>yb,SyncComponent:()=>GC,applyOpsToCtx:()=>zd,connectToSocket:()=>BB,deletePath:()=>yC,isSafePath:()=>gb,liveSyncTransport:()=>mb,notificationsPlugin:()=>yG,onOps:()=>SC,onSnapshot:()=>wC,seedRawDesignSystem:()=>Vc,setPath:()=>bC,syncPlugin:()=>mG,wantsLiveSync:()=>Ei});M();M();var Vd=new Set(["__proto__","constructor","prototype"]),gb=t=>{if(!Array.isArray(t))return!1;for(let e=0;e<t.length;e++)if(Vd.has(t[e]))return!1;return!0},yC=(t,e)=>{!t||!gb(e)||e.reduce((n,r,o,s)=>{if(n&&r in n){if(o!==s.length-1)return n[r];delete n[r]}},t)},bC=(t,e,n,r=!1)=>{!t||!gb(e)||e.reduce((o,s,i,a)=>{if(o){if(i!==a.length-1)return!o[s]&&r&&(o[s]={}),o[s];o[s]=n}},t)},zd=(t,e)=>{let n=new Set;if(!Array.isArray(e))return n;for(let[r,o,s]of e)if(!(!Array.isArray(o)||!o.length))switch(n.add(o[0]),r){case"delete":yC(t,o);break;case"update":case"set":bC(t,o,s,!0);break;default:break}return n},zF=(t,e)=>{if(!e||typeof e!="object"||Array.isArray(e))return null;let n=t&&(t.__raw||t)||{},r=null;for(let o of Object.keys(e))Vd.has(o)||Object.prototype.hasOwnProperty.call(n,o)||(r||(r={}),r[o]=e[o]);return r},Eq=()=>typeof R<"u"&&!!R&&!!R.__SYMBOLS_ENV__,vq=()=>{try{if(R.self!==R.top)return!0}catch{return!0}try{return new URLSearchParams(R.location.search).has("liveSync")}catch{return!1}},VF=Object.freeze({mode:null,baseUrl:null}),mb=t=>{let e=t&&t.editor&&t.editor.socketUrl||t&&t.settings&&t.settings.socketUrl;return typeof e=="string"&&e?Eq()&&!vq()?VF:{mode:"collab",baseUrl:e}:t&&t.editor&&t.editor.runtime==="runner"?{mode:"runner",baseUrl:null}:VF},Ei=t=>mb(t).mode!==null,Vc=(t,e)=>{!t||!e||typeof e!="object"||(t.__rawDesignSystem=JSON.parse(JSON.stringify(e)))},HF=(t,e,n,r="designSystem")=>{for(let o in e){if(Vd.has(o))continue;let s=`${r}/${o}`;if(n.has(s))continue;let i=e[o],a=t[o];if(i&&typeof i=="object"&&!Array.isArray(i)){if(!a||typeof a!="object"||Array.isArray(a)){if(o in t)continue;t[o]={}}HF(t[o],i,n,s)}else o in t||(t[o]=Array.isArray(i)?JSON.parse(JSON.stringify(i)):i)}},_C=(t,e)=>{if(!t||!t.__rawDesignSystem)return null;if(Array.isArray(e)&&e.length){let o={designSystem:t.__rawDesignSystem};zd(o,e)}let n=JSON.parse(JSON.stringify(t.__rawDesignSystem)),r=Array.isArray(t.sharedLibraries)?t.sharedLibraries:[];return Rf(n,r,HF)};M();var wC=(t,e,n)=>{let r=!1;return(o={})=>{let{data:s}=o,{schema:i}=o;s&&(s=t.call("deepDestringifyFunctions",s,Array.isArray(s)?[]:{}),Object.entries(s).forEach(([a,c])=>{if(n[a]&&typeof n[a]=="object")if(a==="designSystem"){if(Vc(n,c),r){let l=_C(n);l&&cr(l)}}else as(n[a],c);else n[a]=c}),r=!0,i&&(n.schema=i))}},SC=(t,e,n)=>(r={})=>{let{changes:o}=r;if(!o||!Array.isArray(o)||!o.length)return;o=t.call("deepDestringifyFunctions",o,Array.isArray(o)?[]:{});let s=o.filter(c=>Array.isArray(c)&&Array.isArray(c[1])&&c[1][0]==="designSystem"),i=s.length?o.filter(c=>!s.includes(c)):o,a=zd(n,i);if(s.length&&a.add("designSystem"),a.has("designSystem")){let c=_C(n,s);c?cr(c):n.__warnedNoRawDesignSystem||(n.__warnedNoRawDesignSystem=!0,console.warn("[sync] design-system op ignored: no raw design system was seeded on this client. Re-initing from the processed config would corrupt every token, so the update is skipped \u2014 reload to pick it up. Seed it at boot with seedRawDesignSystem(ctx, ds)."))}if(a.has("state")){let c=zF(e,n.state);if(c){let l=typeof e.$update=="function"?e.$update:e.update;typeof l=="function"&&l.call(e,c)}}if(["pages","components","snippets","functions","assets"].some(c=>a.has(c))){let{pathname:c,search:l,hash:f}=n.window.location;t.call("router",c+l+f,t.__ref.root,{},{scrollToTop:!1,force:!0})}};var Aq={success:"green",error:"red",warning:"yellow"},WF=(t,e,n)=>{if(t.symbols){if(!n.connected){n.notifications.connected={title:"Connected",message:"to the Symbols live server"},n.update({connected:!0});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}}else if(n.connected){n.notifications.connected={title:"Disconnected",type:"error"},n.update({connected:!1});let r=setTimeout(()=>{delete n.notifications.connected,e.notifications.content.connected&&e.notifications.content.connected.update({animation:"fadeOutDown"}),n.update({connected:!0}),clearTimeout(r)},3e3)}},yb={state:{notifications:[]},Notifications:{position:"fixed",left:"A2",bottom:"Z2",zIndex:"999",childExtends:"Notification",childProps:({state:t})=>({animationDuration:"C",background:Aq[t.type||"success"],icon:null,Flex:{Title:{text:"{{ title }}"},P:{text:"{{ title }}"}},onRender:(e,n,r)=>{n.update({animation:"fadeInUp"})},onClick:(e,n,r)=>{delete r.notifications[n.key],n.update({animation:"fadeOutDown"}),r.onClose&&r.onClose(e,n,r)}}),IconText:null,childrenAs:"state",children:({state:t})=>t.notifications}};var aG=!1,cG=()=>aG?"http://localhost:8080":"https://api.symbols.app",qC=null,lG=()=>(qC||(qC=Promise.resolve().then(()=>($B(),NB)).then(t=>{let e=t&&(t.io||t.default);if(typeof e!="function")throw new TypeError("socket.io-client exports no io()");return e}).catch(t=>(console.warn("[sync] socket.io-client failed to load \u2014 live sync disabled",t),null))),qC),fG=async t=>{try{let e=t||cG(),n=await R.fetch(`${e}/service-token`,{method:"GET"}),r;try{let o=await n.clone().json();if(o&&typeof o.token=="string")return o.token.trim();r=await n.text()}catch{r=await n.text()}return(r||"").replace(/\s+/gu,"")||void 0}catch(e){console.warn("[sync] Failed to fetch service-token",e)}},FB=(t,e,n,r)=>{t.on("snapshot",wC(e,n,r)),t.on("ops",SC(e,n,r)),t.on("clients",o=>{r.editor?.verbose&&WF(o,e,n)}),t.on("disconnect",o=>{r.editor?.verbose&&console.info("[sync] disconnected",o)})},uG=async(t,e,n,r,o)=>{let s=await fG(r);if(!s)return console.warn("[sync] no service token \u2014 collab disabled"),null;let i=n.key;if(!i)return console.warn("[sync] ctx.key missing \u2014 collab cannot authenticate"),null;let a=n.editor?.projectId||null,c=await o;if(!c)return null;let l=c(r,{path:"/collab-socket",transports:["websocket"],auth:{token:s,projectId:a,projectKey:i,branch:"main",live:!0,clientType:"platform"},reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return l.on("connect",()=>{n.editor?.verbose&&console.info("[sync] connected (collab)")}),FB(l,t,e,n),l},dG=async(t,e,n,r)=>{let o=await r;if(!o)return null;let s=o({transports:["websocket","polling"],reconnectionAttempts:1/0,reconnectionDelayMax:4e3});return s.on("connect",()=>{n.editor?.verbose!==!1&&console.info("[sync] connected (runner)")}),FB(s,t,e,n),s.on("reload",()=>{typeof R<"u"&&R.location&&R.location.reload()}),s},BB=async(t,e,n)=>{let{mode:r,baseUrl:o}=mb(n);if(!r)return null;let s=lG();return r==="collab"?uG(t,e,n,o,s):r==="runner"?dG(t,e,n,s):null},GC={onInit:BB},pG={extends:[GC,yb]},jB=t=>typeof t>"u",hG=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),gG=t=>t?.editor?.runtime==="runner",UB=(t,e)=>{Array.isArray(t.extends)?t.extends.push(e):t.extends?t.extends=[t.extends,e]:t.extends=[e]},mG={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!jB(n.liveSync)?n.liveSync:Ei(e))&&(hG(e)&&!gG(e)&&!e?.key||UB(t,GC))}},yG={name:"notifications",beforeCreate(t,e){if(!e)return;let n=jB(e.notifications)?null:e.notifications,r=e.editor&&e.editor.verbose===!0;(n===!0||n!==!1&&r)&&UB(t,yb)}};Ih();var JC={};F(JC,{fetchAsync:()=>xG,fetchSync:()=>SG});M();var VB=R&&R.location&&typeof R.location.host=="string"?R.location.host:null,XC=VB!==null?VB.includes("dev."):ro(),zB=XC?"http://localhost:8080/get":"https://api.symbols.app/get",bG={endpoint:zB},HB=async(t,e=bG)=>{let n=e.endpoint||zB,r=e.serviceRoute?I(e.serviceRoute)?e.serviceRoute.map(s=>s.toLowerCase()+"=true").join("&"):e.serviceRoute:"",o;try{return o=await globalThis.fetch(n+"/?"+r,{method:"GET",headers:{"Content-Type":"application/json","X-AppKey":t,"X-Metadata":e.metadata}}),await o.json()}catch(s){if(L(e.onError))return e.onError(s);console.error(s)}},_G=async(t,e)=>{let{editor:n}=e;if(n&&n.remote){let r=await HB(t,n),o=XC||e.isDevelopment?be(r):be(r.releases[0]);n.serviceRoute?I(n.serviceRoute)?n.serviceRoute.forEach(s=>{ie(e[s],o[s.toLowerCase()])}):ie(e[n.serviceRoute],o):["state","designSystem","components","snippets","pages","utils","files","assets","packages","functions","globalScope"].forEach(s=>{ie(e[s],o[s.toLowerCase()])})}return e},wG=async(t,e,n)=>{let{editor:r}=e;if(r&&r.remote){let o=await HB(t,r),s=XC||e.isDevelopment?be(o):be(o.releases[0]);n(s)}},SG=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await _G(t,e)}catch(n){console.error(n)}},xG=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&wG(e,n,r||(o=>{let s=o.designSystem;k(s)&&n.utils.init(s),k(o.state)&&t.state.set(o.state)}))}catch(o){console.error(o)}};var kG={windows:()=>Promise.resolve(FA),dropdown:()=>Promise.resolve(qA),tooltip:()=>Promise.resolve(XA),analyze:()=>Promise.resolve(Bd),shorthand:()=>Promise.resolve(gC),inspect:()=>Promise.resolve(Ud),sync:()=>globalThis.__SMBLS_BUILD_DROP_F_liveSync__?Promise.resolve(qt("liveSync")):Promise.resolve(YC),fetch:()=>Promise.resolve(ua),fetchOnCreate:()=>Promise.resolve(JC)},Ke=(t,e)=>Array.isArray(t.plugins)&&t.plugins.some(n=>n&&n.name===e),WB=t=>{let e=[];return t.shorthand&&e.push("shorthand"),t.analyze&&!Ke(t,"analyze")&&e.push("analyze"),t.inspect&&!Ke(t,"inspect")&&e.push("inspect"),t.fetch&&e.push("fetch"),t.windows!==!1&&e.push("windows"),t.dropdown!==!1&&e.push("dropdown"),t.tooltip!==!1&&e.push("tooltip"),e},tp={},KB={},he=t=>{if(tp[t])return tp[t];let e=kG[t];return e?(tp[t]=e().then(n=>(KB[t]=n,n),n=>(delete tp[t],console.error(`[smbls] the ${t} module failed to load; the app runs without it`,n),null)),tp[t]):Promise.resolve(null)},Xc=t=>KB[t]||null;var Ii=t=>{if(!t||t.__destroyed)return!1;let e=t.context;if(!e)return t.__destroyed=!0,!1;if(Array.isArray(e.__teardowns)){for(let n of e.__teardowns)try{n()}catch(r){console.error("[smbls] destroy teardown error:",r)}e.__teardowns.length=0}try{dn(t)}catch(n){console.error("[smbls] dispose error:",n)}if(e.fetch&&e.fetch.__resolved&&delete e.fetch.__resolved,e.fetch&&e.fetch.__resolving&&delete e.fetch.__resolving,e.db&&e.db.__resolved&&delete e.db.__resolved,e.db&&e.db.__resolving&&delete e.db.__resolving,e.analyze?.destroy)try{e.analyze.destroy()}catch(n){console.error("[analyze] destroy error:",n)}return t.__destroyed=!0,!0};var rT={};F(rT,{Helmet:()=>hj,applyElementMetadata:()=>Fb,applyMetadata:()=>TG,default:()=>WG,extractMetadata:()=>AG,generateHeadHtml:()=>HG,helmetPlugin:()=>Bb,resolveMetadata:()=>ep});M();Mt();var bn={title:{tag:"title"},description:{tag:"meta",attr:"name",key:"description"},keywords:{tag:"meta",attr:"name",key:"keywords"},robots:{tag:"meta",attr:"name",key:"robots"},author:{tag:"meta",attr:"name",key:"author"},canonical:{tag:"link",attr:"rel",key:"canonical",valueAttr:"href"},image:{tag:"meta",attr:"property",key:"og:image"},url:{tag:"meta",attr:"property",key:"og:url"},siteName:{tag:"meta",attr:"property",key:"og:site_name"},type:{tag:"meta",attr:"property",key:"og:type"},locale:{tag:"meta",attr:"property",key:"og:locale"},"og:title":{tag:"meta",attr:"property",key:"og:title"},"og:description":{tag:"meta",attr:"property",key:"og:description"},"og:image":{tag:"meta",attr:"property",key:"og:image"},"og:url":{tag:"meta",attr:"property",key:"og:url"},"og:type":{tag:"meta",attr:"property",key:"og:type"},"og:site_name":{tag:"meta",attr:"property",key:"og:site_name"},"og:locale":{tag:"meta",attr:"property",key:"og:locale"},"twitter:card":{tag:"meta",attr:"name",key:"twitter:card"},"twitter:title":{tag:"meta",attr:"name",key:"twitter:title"},"twitter:description":{tag:"meta",attr:"name",key:"twitter:description"},"twitter:image":{tag:"meta",attr:"name",key:"twitter:image"},"twitter:site":{tag:"meta",attr:"name",key:"twitter:site"},"theme-color":{tag:"meta",attr:"name",key:"theme-color"}},Jr=t=>{if(t.tag==="link")return`link[${t.attr}="${t.key}"]`;if(t.tag&&!t.attr&&!t.key)return t.tag;if(t.tag&&t.attr&&t.key){let e=`${t.tag}[${t.attr}="${t.key}"]`;return t.key==="theme-color"?`${e}:not([data-smbls-theme-color])`:e}},qB=t=>be({v:t}).v,GB=(t,e,n,r)=>{try{return St(t,e,n)}catch(o){console.warn(`[helmet] metadata factory for "${r}" threw; treating as unset:`,o&&o.message||o);return}},Ib=Object.freeze({authored:!0}),ep=(t,e,n,r)=>{if(!t)return{};let o=t;v(o)&&se(o)&&(o=qB(o));let s=L(o),i=!s&&r?.authored===!0,a=s?GB(o,e,n,"metadata"):k(o)?{...o}:{};if(!k(a))return{};for(let c in a){let l=a[c],f=i&&v(l)&&!se(l);v(l)&&se(l)&&(l=qB(l)),L(l)?l=GB(l,e,n,c):v(l)&&se(l)&&(l=void 0),v(l)&&l.includes("{{")&&e?.call&&(l=f?e.call("replaceLiteralsWithObjectFields",l,n,Ib):e.call("replaceLiteralsWithObjectFields",l,n)),a[c]=l}return a},EG=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),vG=(t,e)=>{if(Object.prototype.hasOwnProperty.call(t,e))return t[e];if(t["/*"])return t["/*"];if(t["*"])return t["*"];for(let n in t)if(EG(t[n]))return t[n]},AG=(t,e="/",n,r,o)=>{let s=t.pages||{},i=vG(s,e),a={};if(t.integrations?.seo&&(a={...t.integrations.seo}),t.app?.metadata){let f=ep(t.app.metadata,n,r,Ib);a={...a,...f}}let c=new Set;if(i){let f=i.metadata||i.helmet||{},u=o?ep(f,o,o.state,Ib):ep(f,n,r,Ib);for(let d in u)c.add(d);a={...a,...u},!a.title&&i.state?.title&&(a.title=i.state.title,c.add("title")),!a.description&&i.state?.description&&(a.description=i.state.description,c.add("description"))}a.title||(a.title=t.name||"Symbols"),a.title&&(c.has("title")||!a["og:title"])&&(c.has("og:title")||(a["og:title"]=a.title)),a.description&&(c.has("description")||!a["og:description"])&&(c.has("og:description")||(a["og:description"]=a.description)),a.title&&!a["twitter:title"]&&(a["twitter:title"]=a.title),a.description&&!a["twitter:description"]&&(a["twitter:description"]=a.description);let l=c.has("og:url")?a["og:url"]:c.has("url")?a.url:void 0;if(l)a["og:url"]=l;else if(a["og:url"]||a.url){let f=(a["og:url"]||a.url||"").replace(/\/$/,"");if(f&&e&&e!=="/"){let u=e.startsWith("/")?e:"/"+e;a["og:url"]=f+u}}return vs(a,xs(t.files,t.sharedLibraries))},tj=(t,e)=>vs(ep(t,e,e.state),e.context?.files),ej=t=>t.context?.document||typeof document<"u"&&document,nj=t=>Object.prototype.hasOwnProperty.call(bn,t),Nb=new Map;for(let t in bn){let e=Jr(bn[t]);Nb.has(e)||Nb.set(e,bn[t])}var $b=t=>t.head||t.querySelector("head"),tT=(t,e)=>{let n=$b(t);return n?n.querySelector(e):null},ZC=(t,e)=>e.tag==="title"?t.textContent:t.getAttribute(e.valueAttr||"content"),eT=(t,e,n)=>{e.tag==="title"?t.textContent=n:t.setAttribute(e.valueAttr||"content",n)},nT=(t,e)=>{let n=$b(e);if(!n)return null;let r=e.createElement(t.tag);return t.attr&&r.setAttribute(t.attr,t.key),n.appendChild(r),r},Mi=(t,e,n,r)=>{let o=t.head||t.querySelector("head");if(!o)return;let s=new Map;for(let a of o.querySelectorAll(`[${e}]`))s.set(a.getAttribute(e),a);let i=new Map;n.forEach((a,c)=>{i.has(a)||i.set(a,c)});for(let[a,c]of s)i.has(a)||c.remove();for(let a of n){if(s.has(a))continue;let c=r(a,i.get(a));c&&(c.setAttribute(e,a),o.appendChild(c))}},rj=(t,e)=>{let r=(e||[]).filter(s=>s!=null).map(s=>v(s)?s:JSON.stringify(s)),o=r.map(Cn);Mi(t,"data-smbls-jsonld",o,(s,i)=>{let a=t.createElement("script");return a.setAttribute("type","application/ld+json"),a.textContent=r[i],a})},oj=(t,e)=>{let n=(e||[]).filter(o=>o!=null&&String(o).trim()),r=n.map(Cn);Mi(t,"data-smbls-style",r,(o,s)=>{let i=t.createElement("style");return i.textContent=String(n[s]),i})},sj=t=>(t||[]).filter(e=>e&&(v(e)?e.trim():e.src)),ij=t=>v(t)?t:String(t.src),aj=(t,e)=>{let n=t.createElement("script");return v(e)?n.setAttribute("src",e):(e.src&&n.setAttribute("src",e.src),e.type&&n.setAttribute("type",e.type),e.async&&(n.async=!0),e.defer&&(n.defer=!0),e.integrity&&n.setAttribute("integrity",e.integrity),e.crossorigin&&n.setAttribute("crossorigin",e.crossorigin),e.referrerpolicy&&n.setAttribute("referrerpolicy",e.referrerpolicy),e.nomodule&&(n.noModule=!0),e.body&&(n.textContent=String(e.body))),n},CG=(t,e)=>{let n=sj(e),r=n.map(ij);Mi(t,"data-smbls-script",r,(o,s)=>aj(t,n[s]))},cj=(t,e)=>{let n=(e||[]).filter(o=>k(o)),r=n.map(ks);Mi(t,"data-smbls-alternate",r,(o,s)=>{let i=t.createElement("link");i.setAttribute("rel","alternate");for(let[a,c]of Object.entries(n[s]))i.setAttribute(a,c);return i})},lj=(t,e)=>{let n=(e||[]).filter(o=>o!=null),r=n.map(ho);Mi(t,"data-smbls-favicon",r,(o,s)=>{let i=n[s],a=t.createElement("link");if(a.setAttribute("rel","icon"),k(i))for(let[c,l]of Object.entries(i))a.setAttribute(c,l);else a.setAttribute("href",String(i));return a})},fj=(t,e)=>{let n=e?String(e):"",r=n.endsWith(".svg")?"image/svg+xml":n.endsWith(".png")?"image/png":"";Mi(t,"data-smbls-single-icon",n?[n]:[],o=>{let s=t.createElement("link");return s.setAttribute("rel","icon"),s.setAttribute("href",o),r&&s.setAttribute("type",r),s})},uj=(t,e)=>{let n=(e||[]).filter(o=>k(o)),r=n.map(Es);Mi(t,"data-smbls-theme-color",r,(o,s)=>{let i=n[s],a=t.createElement("meta");return a.setAttribute("name","theme-color"),i.content!==void 0&&a.setAttribute("content",i.content),i.media!==void 0&&a.setAttribute("media",i.media),a})},TG=(t,e)=>{if(!(!k(t)||!e)){for(let n in t){let r=t[n];if(r==null||!nj(n)||n==="theme-color"&&Array.isArray(r))continue;let o=bn[n],s=tT(e,Jr(o))||nT(o,e);s&&eT(s,o,r)}Array.isArray(t.jsonLd)&&rj(e,t.jsonLd),Array.isArray(t.styles)&&oj(e,t.styles),Array.isArray(t.scripts)&&CG(e,t.scripts),Array.isArray(t.alternate)&&cj(e,t.alternate),Array.isArray(t.favicons)&&lj(e,t.favicons),(t.icon||t.favicon)&&fj(e,t.icon||t.favicon),Array.isArray(t["theme-color"])&&uj(e,t["theme-color"])}},YB=new WeakMap,QC=new WeakMap,dj=t=>{let e=t.location;return e&&v(e.pathname)?e.pathname:null},OG=t=>{let e=YB.get(t);return e||(e={doc:t,layers:[],servedPath:dj(t),originals:new Map,owned:new Set,lists:new Set},YB.set(t,e)),e},RG=(t,e)=>{for(let n=e.parent;n&&n!==n.parent;n=n.parent)if(n===t)return!0;return!1},XB=t=>{try{return JSON.stringify(t===void 0?null:t)??null}catch{return null}},PG=t=>{if(!k(t))return!0;for(let e in t)if(t[e]!==void 0&&t[e]!==null)return!1;return!0},LG=(t,e)=>{let n=QC.get(t);if(n)return n;let r=OG(e),o={element:t,values:null,signature:XB(null),disposed:!1,set(i){if(o.disposed)return;let a=XB(i);o.values=i,!(a!==null&&a===o.signature)&&(o.signature=a,ZB(r))},dispose(){if(o.disposed)return;o.disposed=!0;let i=r.layers.indexOf(o);if(i!==-1&&r.layers.splice(i,1),!PG(o.values))try{ZB(r)}catch(a){console.warn("[helmet] could not re-render the head after an element left:",a&&a.message||a)}}},s=r.layers.length;for(let i=0;i<r.layers.length;i++)if(RG(t,r.layers[i].element)){s=i;break}return r.layers.splice(s,0,o),QC.set(t,o),o},pj=(t,e,n,r)=>{let o=LG(t,e),s=K(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},DG=Jr(bn.title),IG=Jr(bn.description),MG=Jr(bn["og:title"]),NG=Jr(bn["og:description"]),$G=Jr(bn["twitter:title"]),FG=Jr(bn["twitter:description"]),JB=(t,e,n,r)=>{let o=t.get(e);if(!o||!o.value)return;let s=t.get(n);(!s||!s.value||s.rank<o.rank)&&t.set(n,o);let i=t.get(r);(!i||!i.value)&&t.set(r,o)},Mb={jsonLd:rj,styles:oj,alternate:cj,favicons:lj,icon:fj,"theme-color":uj},BG=Object.keys(Mb).filter(t=>t!=="icon"),jG=t=>{let e=new Map,n={},r=[];for(let o=0;o<t.length;o++){let s=t[o].values;if(!k(s))continue;for(let a in s){let c=s[a];c==null||!nj(a)||a==="theme-color"&&Array.isArray(c)||e.set(Jr(bn[a]),{value:String(c),rank:o})}for(let a of BG)Array.isArray(s[a])&&(n[a]=s[a]);let i=s.icon||s.favicon;i&&(n.icon=i),Array.isArray(s.scripts)&&r.push(...s.scripts)}return JB(e,DG,MG,$G),JB(e,IG,NG,FG),{tags:e,lists:n,scripts:r}},UG=(t,e,n)=>{let{doc:r,originals:o}=t,s=Nb.get(e),i=tT(r,e),a=o.get(e);a||(a={value:i?ZC(i,s):null,rendered:!1},o.set(e,a)),a.value===n&&(a.rendered=!0),i||(i=nT(s,r)),i&&(ZC(i,s)!==n&&eT(i,s,n),t.owned.add(e))},VG=(t,e)=>{let{doc:n}=t;t.owned.delete(e);let r=Nb.get(e),o=tT(n,e),s=t.originals.get(e);if(s&&s.value!==null&&!s.rendered&&dj(n)===t.servedPath){let a=o||nT(r,n);a&&ZC(a,r)!==s.value&&eT(a,r,s.value)}else o&&o.remove()},zG=(t,e)=>{let n=sj(e);if(!n.length)return;let r=$b(t),o=new Set;for(let s of r.querySelectorAll("[data-smbls-script]"))o.add(s.getAttribute("data-smbls-script"));for(let s of n){let i=ij(s);if(o.has(i))continue;let a=aj(t,s);a.setAttribute("data-smbls-script",i),r.appendChild(a),o.add(i)}},ZB=t=>{let{doc:e}=t;if(!$b(e))return;let{tags:n,lists:r,scripts:o}=jG(t.layers);for(let s of[...t.owned])n.has(s)||VG(t,s);for(let[s,{value:i}]of n)UG(t,s,i);for(let s in Mb)r[s]!==void 0?(Mb[s](e,r[s]),t.lists.add(s)):t.lists.delete(s)&&Mb[s](e,null);zG(e,o)},HG=t=>{let e=['<meta charset="UTF-8">'],n=new Set(["charset","jsonLd","styles","scripts"]),r=!1;for(let[o,s]of Object.entries(t)){if(!s&&s!==0&&s!==!1||n.has(o)||typeof s=="function")continue;if(o==="title"){e.push(`<title>${U(s)}</title>`);continue}if(o==="viewport"){r||(e.push(`<meta name="viewport" content="${U(s)}">`),r=!0);continue}if(o==="canonical"){e.push(`<link rel="canonical" href="${U(s)}">`);continue}if(o==="icon"||o==="favicon"){let f=U(s),u=f.endsWith(".svg")?' type="image/svg+xml"':f.endsWith(".png")?' type="image/png"':"";e.push(`<link rel="icon" href="${f}"${u} data-smbls-single-icon="${f}">`);continue}if(o==="favicons"&&Array.isArray(s)){s.forEach(f=>{if(k(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${U(p)}"`).join(" ");e.push(`<link rel="icon" ${u} data-smbls-favicon="${U(ho(f))}">`)}else typeof f=="string"&&e.push(`<link rel="icon" href="${U(f)}" data-smbls-favicon="${U(ho(f))}">`)});continue}if(o==="alternate"&&Array.isArray(s)){s.forEach(f=>{if(k(f)){let u=Object.entries(f).map(([d,p])=>`${d}="${U(p)}"`).join(" ");e.push(`<link rel="alternate" ${u} data-smbls-alternate="${U(ks(f))}">`)}});continue}if(o==="theme-color"&&Array.isArray(s)){s.forEach(f=>{if(!k(f))return;let u=['name="theme-color"'];f.content!==void 0&&u.push(`content="${U(f.content)}"`),f.media!==void 0&&u.push(`media="${U(f.media)}"`),u.push(`data-smbls-theme-color="${U(Es(f))}"`),e.push(`<meta ${u.join(" ")}>`)});continue}let i=["og:","article:","product:","fb:","profile:","book:","business:","music:","video:"],a=["twitter:","DC:","DCTERMS:"],c=i.some(f=>o.startsWith(f)),l=a.some(f=>o.startsWith(f));if(o.startsWith("http-equiv:")){let f=o.replace("http-equiv:","");e.push(`<meta http-equiv="${U(f)}" content="${U(s)}">`)}else if(o.startsWith("itemprop:")){let f=o.replace("itemprop:","");e.push(`<meta itemprop="${U(f)}" content="${U(s)}">`)}else c?Array.isArray(s)?s.forEach(f=>e.push(`<meta property="${U(o)}" content="${U(f)}">`)):e.push(`<meta property="${U(o)}" content="${U(s)}">`):l?e.push(`<meta name="${U(o)}" content="${U(s)}">`):Array.isArray(s)?s.forEach(f=>e.push(`<meta name="${U(o)}" content="${U(f)}">`)):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&e.push(`<meta name="${U(o)}" content="${U(s)}">`)}return r||e.splice(1,0,'<meta name="viewport" content="width=device-width, initial-scale=1">'),e.push(...ka(t)),e.join(`
167
+ `)},hj={define:{metadata:(t,e)=>{Fb(t,e,n=>{let r=e.state?.root;k(r)&&(r.$helmet=n)})}}},Fb=(t,e,n)=>{let r=ej(e);r&&pj(e,r,()=>tj(t,e),n)},QB=t=>{let e=t.metadata;return e?tj(e,t):null},Bb={name:"helmet",create(t){if(!t.metadata)return;let e=ej(t);e&&pj(t,e,()=>QB(t))},update(t){let e=QC.get(t);if(!e)return Bb.create(t);e.disposed||e.set(QB(t))}},WG=hj;var gj=(t,e,n,r)=>{if(!t||!r?.fetch)return;let o=Xc("fetch");if(o){o.executeFetch(t,e,n,r);return}he("fetch").then(s=>{s&&s.executeFetch(t,e,n,r)})},mj=(t,e)=>{t&&Fb(t,e)},yj=async(t,e)=>{if(!t)return;let n={tag:"fragment",...t},r=async()=>{await e.set(n,{preventDefineUpdate:"$router"})};return e.lazyLoad?window.requestAnimationFrame(r):await r(),n},Jc={routes:t=>t,metadata:mj,fetch:gj,$router:yj},bj=(t={})=>{let e={routes:n=>n};return t.metadata!==!1&&(e.metadata=mj),t.fetch!==!1&&(e.fetch=gj),t.router!==!1&&(e.$router=yj),e};var oT={useReset:!0,useVariable:!0,useIconSprite:!0,useSvgSprite:!0,useDocumentTheme:!0,useDefaultIcons:!0,useFontImport:!0,useDefaultConfig:!0},jb={initRouter:!0,popState:!0,injectRouterInLinkComponent:!0},sT={...oT,router:jb},KG={state:{},pages:{},components:{},router:jb,define:Jc},Ko=KG;M();M();var _j=(t,e)=>V(t.extends)?t.extends:[];M();var wj=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!Array.isArray(t))return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let[o,s]of wa(t,Sa))r[o]||(r[o]=s);return r};var iT={};F(iT,{apiUrl:()=>Ub,channelByApiUrl:()=>Ej,channelNames:()=>GG,channels:()=>Pe,currentChannel:()=>qo,defaultChannel:()=>rY,deployTarget:()=>tY,isKnownChannel:()=>nY,mermaidUrl:()=>QG,normalizeOwnerSegment:()=>oY,normalizeProjectKey:()=>iY,normalizeProjectSlug:()=>sY,parseSymboLsHost:()=>aY,previewProjectUrl:()=>ZG,previewUrl:()=>vj,resolveChannel:()=>$i,screenshotCdnHost:()=>Aj,screenshotCdnUrl:()=>eY,setChannel:()=>YG,shellUrl:()=>JG,socketUrl:()=>XG});var Pe={channels:{local:{api:"http://localhost:8080",socket:"http://localhost:8080",shell:"http://my.localhost:1355",preview:"http://preview.localhost:1355",mermaidApex:"localhost:1355",deploy:{}},development:{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.my.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},"demo-dev":{api:"https://dev.api.symbols.app",socket:"https://dev.api.symbols.app",shell:"https://dev.demo.symbols.app",preview:"https://dev.preview.symbols.app",mermaidApex:"dev.symbo.ls",deploy:{shellBucket:"smbls-my-demo-dev",previewWorker:"smbls-preview-dev",mermaidWorker:"mermaid-dev"}},next:{api:"https://next.api.symbols.app",socket:"https://next.api.symbols.app",shell:"https://next.my.symbols.app",preview:"https://next.preview.symbols.app",mermaidApex:"next.symbo.ls",deploy:{shellBucket:"smbls-my-next",previewWorker:"smbls-preview-next",mermaidWorker:"mermaid-next"}},test:{api:"https://test.api.symbols.app",socket:"https://test.api.symbols.app",shell:"https://test.my.symbols.app",preview:"https://test.preview.symbols.app",mermaidApex:"test.symbo.ls",deploy:{shellBucket:"smbls-my-test",previewWorker:"smbls-preview-test",mermaidWorker:"mermaid-test"}},upcoming:{api:"https://upcoming.api.symbols.app",socket:"https://upcoming.api.symbols.app",shell:"https://upcoming.my.symbols.app",preview:"https://upcoming.preview.symbols.app",mermaidApex:"upcoming.symbo.ls",deploy:{shellBucket:"smbls-my-upcoming",previewWorker:"smbls-preview-upcoming",mermaidWorker:"mermaid-upcoming"}},staging:{api:"https://staging.api.symbols.app",socket:"https://staging.api.symbols.app",shell:"https://staging.my.symbols.app",preview:"https://staging.preview.symbols.app",mermaidApex:"staging.symbo.ls",deploy:{shellBucket:"smbls-my-staging",previewWorker:"smbls-preview-staging",mermaidWorker:"mermaid-staging"}},demo:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://demo.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-demo",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}},production:{api:"https://api.symbols.app",socket:"https://api.symbols.app",shell:"https://my.symbols.app",preview:"https://preview.symbols.app",mermaidApex:"at.symbo.ls",deploy:{shellBucket:"smbls-my-prod",previewWorker:"smbls-preview",mermaidWorker:"mermaid"}}},defaultChannel:"production",screenshotCdn:"screenshots.api.symbols.app"};var GG=Object.keys(Pe.channels),Fn=t=>!!(t&&Pe.channels[t]),$i=t=>Fn(t)?Pe.channels[t]:Pe.channels[Pe.defaultChannel],YG=t=>{typeof globalThis>"u"||(globalThis.__SYMBOLS_CHANNEL__=Fn(t)?t:null,Zc=void 0)},Zc,Ni=t=>typeof process<"u"&&process.env&&process.env[t]||null,qo=()=>{if(Zc!==void 0)return Zc;let t=typeof globalThis<"u"?globalThis.__SYMBOLS_CHANNEL__:null,e=Ni("SYMBOLS_CHANNEL"),n=Ni("NODE_ENV"),r=Ni("SYMBOLS_API_URL")||Ni("SYMBOLS_API_BASE_URL"),o=r?Ej(String(r).trim().replace(/\/+$/,"")):null;return Zc=Fn(t)&&t||Fn(e)&&e||Fn(o)&&o||Fn(n)&&n||Pe.defaultChannel,Zc===Pe.defaultChannel&&!Fn(t)&&!Fn(e)&&!Fn(o)&&!Fn(n)&&typeof process<"u"&&process.versions&&process.versions.node&&console.warn(`[channels] no channel configured (NODE_ENV=${n||"unset"}, __SYMBOLS_CHANNEL__ unset) \u2014 falling back to "${Pe.defaultChannel}". Outbound URLs (shellUrl${r?"":"/apiUrl"}) will target production`+(r?` (the API follows ${r}, which is no known channel)`:"")+"; set SYMBOLS_CHANNEL (preferred), NODE_ENV, or globalThis.__SYMBOLS_CHANNEL__ to a known channel."),Zc},Sj=["production","staging","upcoming","next","test","development","local","demo","demo-dev"],xj=t=>{let e=Sj.indexOf(t);return e===-1?Sj.length:e},Ej=t=>{if(!t)return null;let e=Object.keys(Pe.channels).filter(n=>Pe.channels[n].api===t);return e.length===0?null:e.length===1?e[0]:e.sort((n,r)=>xj(n)-xj(r))[0]},Ub=(t=qo())=>Ni("SYMBOLS_API_URL")||$i(t).api,XG=(t=qo())=>Ni("SYMBOLS_SOCKET_URL")||$i(t).socket,JG=(t=qo())=>$i(t).shell||null,vj=(t=qo())=>$i(t).preview||null,ZG=({owner:t,key:e,env:n="production"}={},r=qo())=>{let o=vj(r);if(!o||!t||!e)return null;let s=o.match(/^(https?:\/\/)(.+)$/);if(!s)return null;let[,i,a]=s,c=`${encodeURIComponent(t)}--${encodeURIComponent(e)}`,l=`${i}${c}.${a}/`;return!n||n==="production"||n==="prod"?l:`${l}?env=${encodeURIComponent(n)}`},QG=({owner:t,key:e,env:n="production"}={},r=qo())=>{let o=$i(r).mermaidApex;if(!o||!t||!e)return null;let i=!n||n==="production"||n==="prod"?"":`--${encodeURIComponent(n)}`,a=`${encodeURIComponent(t)}--${encodeURIComponent(e)}${i}`;return`${o.startsWith("localhost")?"http":"https"}://${a}.${o}`},tY=(t=qo())=>$i(t).deploy||{},Aj=()=>Ni("SYMBOLS_SCREENSHOT_CDN")||Pe.screenshotCdn,eY=({owner:t,key:e,page:n="root",componentKey:r,env:o="production",width:s}={})=>{if(!t||!e)return null;let i=r?`component/${encodeURIComponent(r)}`:encodeURIComponent(String(n||"root").replace(/^\/+/,"").replace(/\//g,"-")||"root"),a=[];o&&o!=="production"&&a.push(`env=${encodeURIComponent(o)}`),s&&a.push(`w=${Number(s)}`);let c=a.length?`?${a.join("&")}`:"";return`https://${Aj()}/${encodeURIComponent(t)}/${encodeURIComponent(e)}/${i}.webp${c}`},nY=Fn,rY=Pe.defaultChannel,oY=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"",sY=t=>t==null||typeof t!="string"?"":String(t).toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"",iY=(t,e={})=>{let n=String(t||"").trim();if(!n)return"";/\.symbo\.ls$/iu.test(n)&&(n=n.replace(/\.symbo\.ls$/iu,"")),n.includes("/")&&(n=n.split("/").pop());let r=typeof e.owner=="string"?e.owner.trim():"";return r&&n.startsWith(`${r}--`)?n=n.slice(r.length+2):!r&&n.includes("--")&&(n=n.slice(n.indexOf("--")+2)),n},kj={at:"production",prod:"production",production:"production",dev:"development",development:"development",next:"next",upcoming:"upcoming",test:"test",staging:"staging"},aY=t=>{if(typeof t!="string"||!t)return null;let e=t.toLowerCase().replace(/^www\./,"").replace(/\/$/,"");if(!e.endsWith(".symbo.ls"))return null;let n=e.split(".");if(n.length<4||n.slice(-2).join(".")!=="symbo.ls")return null;if(n.length===4){let s=n[1],i=n[0],a=kj[s];if(a&&i.includes("--")){let c=i.split("--");if(c.length===2||c.length===3){let[l,f,u]=c;if(l&&f){let d=u?kj[u]||u:null;return{projectKey:f,owner:l,env:d||a,sysEnv:a}}}}}if(n.length>=5)return{projectKey:n[1],owner:n[2],env:n[0]};let r=n[1],o=n[0];if(o.includes("--")){let[s,i]=o.split("--",2);return!s||!i?null:{projectKey:s,owner:r,env:i}}return{projectKey:o,owner:r,env:"production"}};M();var Pj='meta[name="brender"]',cY=3e3,aT=t=>t.document||(typeof document<"u"?document:null),Lj=(t,e)=>{let n=t.parent;return n&&n.nodeType===1?n:n&&n.node&&n.node.nodeType===1?n.node:e?e.body:null},Dj=(t,e)=>{if(e&&e.__BRENDER__)return!0;let n=aT(t);if(!n||typeof n.querySelector!="function")return!1;let r=n.documentElement;if(r&&typeof r.hasAttribute=="function"&&r.hasAttribute("data-brender")||n.querySelector(Pj))return!0;let o=Lj(t,n);for(let s=o&&o.firstElementChild;s;s=s.nextElementSibling)if(s.hasAttribute("data-br"))return!0;return!1},Ij=t=>{let e=aT(t);return!e||!e.head?null:Array.from(e.head.querySelectorAll('style[data-emotion="smbls"], style[data-brender]'))},Mj=(t,e)=>{if(!e||!e.length)return;let n=[];for(let o of e){let s=null;try{s=o.sheet&&o.sheet.cssRules}catch{s=null}if(s&&s.length)for(let i=0;i<s.length;i++){let a=s[i].cssText||"";(s[i].type===5||/^\s*@font-face/i.test(a))&&n.push(a)}else{let i=String(o.textContent||"").match(/@font-face\s*\{[^}]*\}/gi);i&&n.push(...i)}}let r=e.find(o=>o.parentNode);if(n.length&&r&&t&&typeof t.createElement=="function"){let o=t.createElement("style");o.setAttribute("data-smbls-faces",""),o.textContent=n.join(`
168
+ `),r.parentNode.insertBefore(o,r)}e.forEach(o=>{o.parentNode&&o.remove()})},Cj=t=>{console.warn("[smbls] the pre-render registry is not JSON \u2014 the page renders fresh:",t.message)},cT=["paths","tree"],lY=(t,e)=>{let n=qn(e,If,{warn:Cj});if(n)return{map:Mf(n.value),block:n.block};let r=qn(e,Df,{warn:Cj});return r?{map:k(r.value)?r.value:null,block:r.block}:t&&k(t.__BR_REGISTRY__)?{map:t.__BR_REGISTRY__,legacy:!0}:null},fY=(t,e,n)=>!n||!n.map||t.hydrate===!1?!1:n.legacy?t.hydrate===!0||k(t.hydrate)||!!e&&e.__BRENDER_HYDRATE__===!0:!0,uY=t=>{let e=k(t.hydrate)?t.hydrate.timeout:void 0;return typeof e=="number"&&e>=0?e:cY},Nj=(t,e,n)=>{if(t&&(delete t.__BRENDER__,delete t.__BR_REGISTRY__,delete t.__BRENDER_HYDRATE__),n&&n.block&&n.block.parentNode&&n.block.remove(),e&&typeof e.querySelector=="function"){let r=e.querySelector(Pj);r&&r.remove();let o=e.documentElement;o&&typeof o.hasAttribute=="function"&&o.hasAttribute("data-brender")&&o.removeAttribute("data-brender")}},dY=()=>new Promise(t=>{if(typeof MessageChannel=="function"){let e=new MessageChannel;e.port1.onmessage=()=>{e.port1.close(),t()},e.port2.postMessage(null)}else setTimeout(t,0)}),$j=async(t,e)=>{let n=t.__firstNavigation;if(n&&typeof n.then=="function")try{await n}catch{}for(let r=0;r<20&&e.pending.size;r++){let o=Xc("fetch"),s=o&&typeof o.whenRequestsIdle=="function"?o.whenRequestsIdle:null;if(s&&await s(),await dY(),!s||!(o.requestsInFlight()>0))return}},pY=["click","keydown"],Fj=(t,e,n,r,o,s)=>{let i=!1,a=null,c=()=>f(),l=u=>{let d=u?"addEventListener":"removeEventListener";if(n&&typeof n[d]=="function")for(let p of pY)n[d](p,c,!0);e&&typeof e[d]=="function"&&e[d]("popstate",c)},f=()=>{if(i)return;i=!0,a!==null&&clearTimeout(a),l(!1),t.__hydration===r&&delete t.__hydration;let u=0;for(let d of r.pending)d.parentNode&&(d.remove(),u++);r.pending.clear(),r.pendingIn.clear(),r.whole=null,Mo(r),Mj(n,s),e&&(e.__BRENDER_HYDRATION__={adopted:r.adopted,misses:r.misses,removed:u}),Nj(e,n,o),Bj(t,e,r.root,!0)};if(!r.pending.size)return f();a=setTimeout(f,uY(t)),l(!0),$j(t,r).then(f,f)},hY=1e3,gY=(t,e)=>{t&&typeof t.requestIdleCallback=="function"?t.requestIdleCallback(e,{timeout:hY}):setTimeout(e,0)},Tj=(t,e)=>{let n=Xc("fetch");!n||typeof n.seedIsStale!="function"||!n.seedIsStale()||gY(t,()=>{n.revalidateSeed(e).then(r=>{r&&t&&((t.__BRENDER_HYDRATION__||(t.__BRENDER_HYDRATION__={replaced:!0})).refreshed=r)},r=>console.error("[smbls] refreshing a stale pre-rendered page failed:",r))})},Bj=(t,e,n,r)=>{let o=Xc("fetch");if(!o||typeof o.seedIsStale!="function")return;let s=()=>{let i=()=>Tj(e,n);$j(t,{pending:{size:1}}).then(i,i)};if(o.seedIsStale())return r?Tj(e,n):s();typeof o.whenSeedTaken=="function"&&o.whenSeedTaken(s)},mY=t=>({bubbles:!0,cancelable:!0,composed:!0,detail:t.detail,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons}),yY=(t,e,n,r)=>{if(!t||typeof t.addEventListener!="function")return{replay(){}};let o=[],s=a=>{for(let c=a;c&&c!==n;c=c.parentNode)if(r.pending.has(c))return!0;return!1},i=a=>{s(a.target)&&(a.preventDefault(),a.stopImmediatePropagation(),o.push({target:a.target,init:mY(a)}))};return t.addEventListener("click",i,!0),{replay(){t.removeEventListener("click",i,!0);let a=e&&e.MouseEvent||(typeof MouseEvent=="function"?MouseEvent:null);if(a)for(let{target:c,init:l}of o)c.isConnected&&r.claimed.has(bY(c,n,r))&&c.dispatchEvent(new a("click",l))}}},bY=(t,e,n)=>{for(let r=t;r&&r!==e;r=r.parentNode)if(n.claimed.has(r))return r;return null},_Y=async()=>{for(await Ce();!$o();)await Ce()},wY=async(t,e,n,r,o,s,i,a,c,l,f,u)=>{let d=f.mountYield,p=f.mountWhole;d===void 0&&(f.mountYield=u.budget),p===void 0&&(f.mountWhole=!0);let g=RA(o,{budget:u.budget,progressive:!0,pageOptions:{mountYield:f.mountYield,mountWhole:f.mountWhole}}),h=ri(),m=yY(i,s,r,a),y=u.lease||null;g.lease=y,y&&(o.__mountLease=y);let x=null,E=!1;try{try{x=t(e,n,o.key,f)}catch(C){console.error("[smbls] hydration failed, rendering fresh:",C),delete o.__hydration,Mo(a);for(let _ of a.claimed)_.parentNode&&_.remove();return null}E=!await Vo(Ur(x),y)||g.routeReady&&!await Vo(g.routeReady,y)||!await Vo(_Y(),y),E&&(o.__hydration===a&&delete o.__hydration,Mo(a),TA(x))}finally{f.mountYield=d,f.mountWhole=p,y&&(o.__mountLease=null),PA(o),h(),x||m.replay()}return E?(m.replay(),Mc(k(e)?e:{})):(a.root=x,Fj(o,s,i,a,c,l),m.replay(),x)},Oj=(t,e,n,r,o,s,i,a,c,l,f)=>{if(!r||typeof r.querySelectorAll!="function")return null;let u=E=>{for(let C=E;C&&C!==r;C=C.parentNode)if(C.parentNode===r&&C.localName==="svg"&&C.id)return!0;return!1},d={};for(let E of r.querySelectorAll("[data-br]")){let C=E.getAttribute("data-br");u(E)?E.removeAttribute("data-br"):d[C]=E}let p={},g=new Set,h=new Map,m=a.map;for(let E in m){let C=m[E],_=d[C];if(!_||p[C])continue;p[C]=_,g.add(_);let b=_.parentNode;b&&h.set(b,(h.get(b)||0)+1)}for(let E in d)p[E]||d[E].removeAttribute("data-br");let y={registry:m,nodes:p,claimed:new Set,pending:g,pendingIn:h,adopted:0,misses:0};if(o.__hydration=y,f)return wY(t,e,n,r,o,s,i,y,a,c,l,f);let x;try{x=t(e,n,o.key,l)}catch(E){console.error("[smbls] hydration failed, rendering fresh:",E),delete o.__hydration,Mo(y);for(let C of y.claimed)C.parentNode&&C.remove();return null}return y.root=x,Fj(o,s,i,y,a,c),x},Rj=(t,e,n,r,o,s,i,a,c,l)=>{if(Mj(i,c),r){let u=[];for(let d of r.childNodes){if(d.nodeType===1){let p=d.localName;if(p==="script"||p==="link"||p==="style"||p==="svg"&&d.id)continue}u.push(d)}u.forEach(d=>d.remove())}i&&typeof i.querySelectorAll=="function"&&i.querySelectorAll("[data-br]").forEach(u=>u.removeAttribute("data-br")),s&&(s.__BRENDER_HYDRATION__={replaced:!0});let f=t(e,n,o.key,l);return Nj(s,i,a),Promise.resolve(f).then(u=>Bj(o,s,u,!1),()=>{}),f},jj=(t,e,n,r,o,s,i,a=null)=>{let c=aT(r),l=n&&n.nodeType?n:n&&n.node||Lj(r,c),f=lY(o,c);r.prerendered=!0;let u=ds(c);if(u&&(r.prerender=u),fY(r,o,f)){if(a)return ir().then(()=>Ic(a.lease)?Oj(t,e,n,l,r,o,c,f,s,i,a):Mc(k(e)?e:{})).then(p=>p||Rj(t,e,n,l,r,o,c,f,s,i));let d=Oj(t,e,n,l,r,o,c,f,s,i,a);if(d)return d}return Rj(t,e,n,l,r,o,c,f,s,i)};M();var Uj=t=>{let e={faces:0,links:0,kept:0};if(!t)return e;let n=EY(Xn());for(let r in t){let o=t[r];if(!o||!o.fontFace)continue;let s=Array.isArray(o.fontFace)?o.fontFace:[o.fontFace];for(let i of s){if(Vj(i)){let a=xY(i);a&&kY(a)&&e.links++;continue}if(SY(i)){if(n.has(fT(i))){e.kept++;continue}Ot(i.trim()),e.faces++;continue}if(typeof i=="string"&&i.includes("font-family")){if(n.has(fT(i))){e.kept++;continue}Ot(`@font-face { ${i} }`),e.faces++}}}return e},Vj=t=>typeof t=="string"&&t.trim().startsWith("@import"),SY=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),xY=t=>{if(!Vj(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},kY=(t,e)=>{if(typeof t!="string"||!t)return null;let n=e||Xn();if(!n||!n.head)return null;let r="data-smbls-font",o=n.head.querySelectorAll(`link[rel="stylesheet"][${r}]`);for(let i=0;i<o.length;i++)if(o[i].getAttribute(r)===t)return o[i];let s=n.createElement("link");return s.setAttribute("rel","stylesheet"),s.setAttribute("href",t),s.setAttribute(r,t),n.head.appendChild(s),s},lT=(t,e)=>{let n=new RegExp(`(?:^|[;{\\s])${e}\\s*:\\s*([^;}]+)`,"i").exec(t);return n?n[1].trim().toLowerCase():null},fT=t=>{let e=String(t||""),n=lT(e,"font-family");if(!n)return null;let r=lT(e,"font-weight")||"400";return r==="normal"?r="400":r==="bold"&&(r="700"),n.replace(/^['"]|['"]$/g,"")+"|"+r+"|"+(lT(e,"font-style")||"normal")},EY=t=>{let e=new Set,n=t&&t.styleSheets;if(!n)return e;for(let r=0;r<n.length;r++){let o;try{o=n[r].cssRules}catch{continue}if(o)for(let s=0;s<o.length;s++){let i=o[s].cssText||"";if(o[s].type===5||/^\s*@font-face/i.test(i)){let a=fT(i);a&&e.add(a)}}}return e};var qj=t=>{let e=typeof window<"u"?window:globalThis||{};e.document||(e.document={body:{}});let n=typeof document<"u"?document:e.document;t.document=t.document||n;let r=t.window;return r&&r!==e&&typeof r.URL!="function"?(typeof console<"u"&&console.warn&&!globalThis.__smblsRouterUrlWarned&&(globalThis.__smblsRouterUrlWarned=!0,console.warn("[smbls/router] context.window lacks URL, falling back to globalThis \u2014 passed-in window may be a stub (warned once; applies to every embed app this session)")),t.window=e):t.window=r||e,t.window},zj=(t="smbls")=>{let e={};for(let n in mi)Object.prototype.hasOwnProperty.call(mi,n)&&(Hn(n)?e[`smbls.${n}`]=mi[n]:e[n]=mi[n]);return e},Gj=t=>t.components?{...zj(),...t.components}:zj(),Yj=t=>({...Ld,...Tc,..._o,...t.utils,...t.snippets,...t.functions}),Xj=t=>({...t.methods||{},require:t.utils.require,requireOnDemand:t.utils.requireOnDemand,router:t.utils.router});var Jj=t=>typeof globalThis<"u"&&globalThis.__SMBLS_PKGS__&&globalThis.__SMBLS_PKGS__[t]||null,vY=3e3,AY=(t,e,n=r=>import(r))=>{if(typeof globalThis>"u")return Promise.resolve(null);try{let r=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});if(r[t])return Promise.resolve(r[t]);let o=()=>n(e),s=Promise.resolve().then(o).then(a=>(a&&!r[t]&&(r[t]=a),r[t]||null)).catch(()=>null);return new Promise(a=>{let c=setTimeout(()=>a(null),vY);s.then(l=>{clearTimeout(c),a(l)})})}catch{return Promise.resolve(null)}},Hj={},hT=async({dependencies:t,dependenciesOnDemand:e,document:n,preventCaching:r=!1,cdnProvider:o,packageManager:s,symbolsConfig:i,registerDependency:a=AY})=>{if(o||(o=fo[s]||ya(i)||"esmsh"),!t)return null;if(!_s(t))return console.warn(`[smbls] dependencies is ${Array.isArray(t)?"an ARRAY":`a ${typeof t}`}, not a package-name-keyed object \u2014 skipping the CDN fetch loop. This usually means a project's config.js declares its own "dependencies" field that collides with the platform package map once context.js spreads them together.`),null;let c=!1;for(let d in t){c=!0;break}if(!c)return null;let l=ro()&&r?`?${Math.random()}`:"",f=async(d,p)=>{let g=vn(d,p,o)+l;try{await Promise.race([ba(g,{document:n,type:"module"}),new Promise((h,m)=>setTimeout(()=>m(new Error(`Timeout loading ${d}`)),1e4))]),await a(d,g)}catch(h){if(console.error(`Failed to load ${d} from ${o}:`,h),o!=="symbols")try{let m=vn(d,p,"symbols")+l;await Promise.race([ba(m,{document:n,type:"module"}),new Promise((y,x)=>setTimeout(()=>x(new Error(`Timeout fallback ${d}`)),2e4))]),console.log(`Successfully loaded ${d} from fallback (symbols.ls)`),await a(d,m)}catch(m){console.error(`Failed to load ${d} from fallback:`,m)}}},u=[];for(let d in t){let p=t[d];if(!(e&&e[d])&&!Hj[d]&&(Hj[d]=!0,!uo(d))){if(bs(d)){console.warn(`[smbls] dependency "${d}" looks like an un-interpolated template placeholder, not a real package specifier \u2014 skipping the CDN fetch (this is a bug upstream of the dependency loader, not a network failure).`);continue}Jj(d)||u.push(f(d,p))}}return u.length&&await Promise.allSettled(u),t},Wj=/\[smbls\] runtime dependency "([^"]+)" is not registered on globalThis\.__SMBLS_PKGS__/g,CY=t=>{if(typeof t=="string")return t;if(typeof t=="function")try{return typeof Me=="function"?Me(t):Function.prototype.toString.call(t)}catch{return""}return""},TY=t=>{let e=new Set;if(!t)return e;let n=[t.globalScope,t.functions,t.methods,t.snippets];for(let r=0;r<n.length;r++){let o=n[r];if(!o||typeof o!="object")continue;let s=Object.keys(o);for(let i=0;i<s.length;i++){let a;try{a=o[s[i]]}catch{continue}let c=CY(a);if(!c||c.indexOf("__SMBLS_PKGS__")===-1)continue;Wj.lastIndex=0;let l;for(;(l=Wj.exec(c))!==null;)e.add(l[1])}}return e},OY=t=>{let e=new Set;if(!t||typeof t.querySelectorAll!="function")return e;let n;try{n=t.querySelectorAll('script[type="importmap"]')}catch{return e}for(let r=0;r<n.length;r++){let o;try{o=JSON.parse(n[r].textContent||"")}catch{continue}let s=o&&typeof o=="object"?o.imports:null;if(s&&typeof s=="object"){let i=Object.keys(s);for(let a=0;a<i.length;a++)e.add(i[a])}}return e},RY=(t,e)=>{if(!e||!e.size)return!1;if(e.has(t))return!0;for(let n of e)if(n.length>1&&n.endsWith("/")&&t.length>n.length&&t.startsWith(n))return!0;return!1},Zj=(t,{syncRead:e=TY(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=OY(n)}={})=>{let o=t&&t.dependencies;if(!_s(o))return null;let s=!t.document||t.document===n,i=t.dependenciesOnDemand,a=null,c=null;for(let l in o)s&&!(i&&i[l])&&!e.has(l)&&RY(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},PY=t=>import(t),uT={},LY=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},DY=(t,{importModule:e=PY}={})=>{let n=[];if(!t)return Promise.resolve([]);for(let r in t)if(!(uo(r)||bs(r))&&!Jj(r)){if(!uT[r]){let o=()=>e(r);uT[r]=Promise.resolve().then(o).then(s=>(LY(r,s),s||null),()=>null)}n.push(uT[r])}return Promise.all(n)},IY=2e3,MY=3e3,Qj=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=MY}={})=>t?new Promise(o=>{let s=()=>{DY(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:IY}):setTimeout(s,0)},a=e&&e.document;if(a&&a.readyState&&a.readyState!=="complete"&&typeof e.addEventListener=="function"){let c=!0,l=null,f=()=>{c&&(c=!1,clearTimeout(l),typeof e.removeEventListener=="function"&&e.removeEventListener("load",f),i())};e.addEventListener("load",f,{once:!0}),l=setTimeout(f,r)}else i()}):null,t3=async(t,e)=>{let n=e.window||window,r=e.cdnProvider||ya(e.symbolsConfig)||"esmsh",o=async i=>async(a,c)=>{let f=(i.window||window).packages[a];return typeof f=="function"?f():f},s=async i=>async(a,c=r)=>{let{dependenciesOnDemand:l}=i,f=i.document||document,u=i.window||window;if(!u.packages[a]&&uo(a))return await u.require(a,c);if(!u.packages[a]){let d=ro()?`?${Math.random()}`:"";if(l&&l[a]){let p=l[a],g=vn(a,p,c)+d;try{await i.utils.loadRemoteScript(g,{window:u,document:f})}catch(h){if(console.error(`Failed to load ${a} from ${c}:`,h),c!=="symbols"){let m=vn(a,p,"symbols")+d;await i.utils.loadRemoteScript(m,{window:u,document:f})}}}else{let p=vn(a,"latest",c)+d;try{await i.utils.loadRemoteScript(p,{window:u,document:f})}catch(g){if(console.error(`Failed to load ${a} from ${c}:`,g),c!=="symbols"){let h=vn(a,"latest","symbols")+d;await i.utils.loadRemoteScript(h,{window:u,document:f})}}u.packages[a]="loadedOnDeman"}}return await u.require(a,c)};n.packages?n.packages=Lt(n.packages,t):n.packages=t,n.require||(e.utils.require=await o(e),n.require=e.utils.require),n.requireOnDemand||(e.utils.requireOnDemand=await s(e),n.requireOnDemand=e.utils.requireOnDemand)},NY=/\s+/g,e3=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,$Y=(t,e)=>{let n="";for(let r in t){let o=t[r];typeof o=="boolean"&&o?n+=` ${r}`:typeof o=="string"?n+=` ${o}`:typeof o=="function"&&(n+=` ${e3(o,e)}`)}return n},FY=(t,e,n)=>{if(!t)return;let{key:r}=e;t===!0&&(t=e.classlist={key:r}),typeof t=="string"&&(t=e.classlist={default:t}),t!==null&&typeof t=="object"&&!Array.isArray(t)&&(t=$Y(t,e));let o=t.replace(NY," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},BY=()=>(t,e,n)=>{let r=e3(t,e);if(t){let{__ref:o}=e;o.__class.style=r}n3()(e.classlist,e,e.state,!0)},n3=()=>(t,e,n,r)=>{if(e.style&&!r)return;let{__ref:o}=e,{__class:s,__classNames:i}=o;if(!(t===null||typeof t!="object"||Array.isArray(t))){e.class&&(i.classProps=e.class),e.attr?.class&&(i.class=e.attr.class);for(let a in s){let c=s[a];if(!c){delete i[a];continue}let l;typeof c=="string"||typeof c=="number"?l=c:typeof c=="boolean"?l=e.key:l=Ue(c),i[a]=l}for(let a in i)a==="classProps"||a==="class"||s[a]===void 0&&delete i[a];e.node&&FY(i,e,e.node)}},jY=()=>({style:BY(),classlist:n3()}),UY=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],dT=new WeakSet,pT=!1,VY=t=>!!t&&typeof t=="object",zY=new Set(["key","document","files","assets","themeRoot","config","newConfig","recordCss","router"]),r3=t=>t.toLowerCase()==="font",HY=t=>{let e=2166136261,n=16777619^t.length;for(let r=0;r<t.length;r++){let o=t.charCodeAt(r);e=Math.imul(e^o,16777619),n=Math.imul(n^o,1540483477)}return(e>>>0).toString(36)+"."+(n>>>0).toString(36)+"."+t.length.toString(36)},Kj=(t,e)=>typeof e=="function"?"fn:"+String(e):e,o3=(t,e)=>{let n={};for(let o in t||{})r3(o)||(n[o]=t[o]);let r={};for(let o in e)zY.has(o)||(r[o]=e[o]);return r.globalTheme=Cy(e.globalTheme)||"auto",HY(1+"|"+JSON.stringify(n,Kj)+"|"+JSON.stringify(r,Kj))},WY=t=>{let e={};for(let n in t||{})r3(n)&&k(t[n])&&bt(e,pt(t[n]),ae);return k(ai.font)&&bt(e,pt(ai.font),ae),e},KY=(t,e)=>{if(t.preparedDesignSystem!==void 0){let r=t.preparedDesignSystem;return delete t.preparedDesignSystem,r}let n=qn(e,Ff);return n?n.value:null},s3=t=>{if(!t||t.preparedDesignSystem!==void 0)return null;let e=t.document||(typeof document<"u"?document:null);if(!e||typeof e.querySelector!="function"||typeof globalThis.fetch!="function")return null;try{let n=e.querySelector(Nf),r=n&&n.href;if(r)return globalThis.fetch(r,{credentials:"same-origin"}).then(c=>c&&c.ok?c.json():null).catch(()=>null);let o=e.querySelector($f),s=o&&o.getAttribute("content");if(!s)return null;let i=new URL(s,e.baseURI||void 0).href,a=globalThis.fetch(i,{credentials:"same-origin",priority:"low"}).then(c=>c&&c.ok?c.json():null).catch(()=>null);return GY(a,i,t.window||e.defaultView)}catch{return null}},qY=(t,e)=>{let n=e&&e.performance||(typeof performance<"u"?performance:null);if(!n||typeof n.getEntriesByName!="function")return!1;try{let r=n.getEntriesByName(t);for(let o=0;o<r.length;o++)if(r[o].responseEnd>0)return!0}catch{}return!1},GY=(t,e,n)=>{let r=!1,o=t.then(s=>(r=!0,s));return o.deferred=!0,o.ready=()=>r||qY(e,n),o},i3=t=>!!t&&(t.deferred!==!0||t.ready()),YY=t=>k(t)&&t.format===1&&typeof t.fingerprint=="string"&&k(t.config)&&Array.isArray(t.rules),XY=(t,e,n,r)=>{if(r.localFile)return null;let o=Wg(t);return o?{format:1,fingerprint:o3(n.designSystem,r),config:o,rules:e.rules,sprites:e.sprites}:null},a3=(t,e)=>{let n=e.document||(e.parent&&e.parent.documentElement?e.parent:null)||document,r=e.initOptions||{},o=e.registry||jY(),s=()=>e.designSystem?bt(pt(e.designSystem),pt(ai),ae):pt(ai),i={};for(let m of UY)e[m]!==void 0&&(i[m]=e[m]);let a,c=VY(n),f=c&&dT.has(n)&&!e.skipDesignSystemInit,u=!f&&!pT,d=f?`[data-smbls-app="${t}"]`:":root";e.scopeSelector=d;let p={key:t,document:n,files:e.files,assets:e.assets,scopeSelector:d,...sT,...i,...r};if(e.skipDesignSystemInit){if(a=P(t)||P(),a&&(a.__domDocument=n),a?.CSS_VARS){mt(a);try{Ot({[d]:a.CSS_VARS}),a.CSS_MEDIA_VARS&&Ot(Ay(a.CSS_MEDIA_VARS,d));let m=Hs(a.cssSkinVars,a.cssSkinFallback,d);Object.keys(m).length&&Ot(m)}finally{ht()}}}else if(e.isolateDesignSystem&&!f){let m=vg();m.__domDocument=n;let y=null,x=e.captureDesignSystem?E=>{y=E}:void 0;mt(m);try{a=cr(s(),{...p,config:m,recordCss:x})}finally{ht()}y&&(e.preparedDesignSystem=XY(a,y,e,p))}else if(u){let m=P();m&&(m.__domDocument=n);let y=m&&m._scratchConfig&&!p.localFile?KY(e,n):null;YY(y)&&y.fingerprint===o3(e.designSystem,p)?(a=vA(y,m,p,WY(e.designSystem)),e.designSystemSource="prepared"):(a=cr(s(),p),e.designSystemSource="processed"),a&&a!==m&&(a.__domDocument=n),c&&dT.add(n),pT=!0}else{let m=tu(t,s(),{cleanBase:!0});for(let y in i)m[y]=i[y];if(m.__domDocument=n,f){let y=t.replace(/[^a-zA-Z0-9]/g,"").substring(0,6);e.cssPrefix=y,m.varPrefix=y}mt(m);try{a=cr(m,p)}finally{ht()}c&&dT.add(n),pT=!0}let g=a?.CONFIG||a,h=g?.font;if(h){mt(g);try{Uj(h)}finally{ht()}}return[a,o]},c3=(t,e)=>{let n={};e.state&&so(n,e.state),t&&t.state&&so(n,t.state);let r=e.polyglot;if(r){let o=null;try{typeof localStorage<"u"&&(o=localStorage.getItem(r.storageLangKey||"smbls_lang")||localStorage.getItem("lang"))}catch{}let s=ms({polyglot:r,pathname:ys(e.window),stored:o,stateLang:n.lang});(o||s!==_r(n.lang,r))&&s!==n.lang&&(n.lang=s),r.translations&&JY(e,r,n,s)}return n.isRootState=!0,pt(n)},JY=(t,e,n,r)=>{let o=new Set,s=new Set,i=(l,f)=>{if(!s.has(l)){if(!cs(t,l,n)){o.add(l);return}n[l]=f,s.add(l),Wn(t,l,f)}},a=e.translations[r];if(a&&typeof a=="object")for(let l in a)i(l,a[l]);let c=new Set(En(e,!1));for(let l in e.translations)c.has(l)||i(l,e.translations[l]);o.size&&e.verbose!==!1&&t.verbose!==!1&&console.warn(`[polyglot] ${o.size} translation key${o.size===1?"":"s"} collide${o.size===1?"s":""} with a declared root-state key (${[...o].join(", ")}) \u2014 the declared value wins and the translation is NOT seeded into state. Rename the translation key, or read it with \`{{ key | polyglot }}\` instead of a bare \`{{ key }}\`.`)},l3=(t,e)=>{k(t.routes)&&k(e.pages)&&Lt(t.routes,e.pages);let n=t.routes||e.pages||{},r=[];for(let o in n){if(o.charCodeAt(0)===47)continue;let i="/"+(o==="index"?"":o);Object.prototype.hasOwnProperty.call(n,i)?r.push(`${o} -> ${i}`):n[i]=n[o],delete n[o]}return r.length&&e&&e.verbose!==!1&&console.warn(`[smbls] preparePages kept ${r.length} explicitly declared route${r.length===1?"":"s"} over a same-named page key (${r.join(", ")}). A bare page NAME never overwrites a declared '/route'. This usually means a shared library ships a page under its export name that collides with one of your routes \u2014 add it to that library's ignoreList if you did not intend the collision.`),n},gT=t=>{Of(t,t.sharedLibraries)};var _T={};F(_T,{default:()=>cX,getActiveLang:()=>Bi,getLanguages:()=>rp,getLocalStateLang:()=>ap,getPendingLang:()=>np,initPolyglot:()=>zb,loadTranslations:()=>Fi,polyglotPlugin:()=>tl,setLang:()=>sp,trackLoadTranslations:()=>bT,translate:()=>op,upsertTranslation:()=>ip});M();Mt();var ZY="smbls_t_",QY="smbls_tv_",mT=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return e?e.localStorage:null},Qc={get(t,e){try{return mT(t)?.getItem(e)??null}catch{return null}},set(t,e,n){try{mT(t)?.setItem(e,n)}catch(r){console.warn("[polyglot] localStorage unavailable:",r.message)}},remove(t,e){try{mT(t)?.removeItem(e)}catch(n){console.warn("[polyglot] localStorage unavailable:",n.message)}}},f3=new WeakMap,u3=t=>{let e=f3.get(t);return e||(e={},f3.set(t,e)),e},d3=new WeakMap,y3=(t,e)=>t&&typeof t=="object"?t:e&&typeof e=="object"?e:null,b3=t=>{let e=d3.get(t);return e||(e={seq:0,pending:wn(null),wake:null},d3.set(t,e)),e},p3=(t,e,n)=>new Promise(r=>{let o=null,s=()=>{o!==null&&clearTimeout(o),o=null,t.wake===s&&(t.wake=null),r()};t.wake=s,Promise.resolve(e).then(s,s),n>0&&(o=setTimeout(s,n))}),h3=(t,e)=>!!(t?.translations&&t.translations[e]),tX=3e3,eX=2147483647,nX=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,eX):0:tX},rX=new RegExp("\\p{L}","gu"),oX=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(rX);if(s)for(let i=0;i<s.length;i++)e.add(s[i])}else if(r&&typeof r=="object"&&o<8)for(let s in r)n(r[s],o+1)};for(let r=0;r<t.length;r++)n(t[r],0);return Array.from(e).join("")},sX=(t,e)=>{let n=t?.fonts;if(!e||!n||!t.body||typeof n.check!="function"||typeof n.load!="function")return null;try{let o=(t.defaultView||globalThis).getComputedStyle(t.body).fontFamily;if(!o)return null;let s="1em "+o;return n.check(s,e)?null:Promise.resolve(n.load(s,e)).then(()=>{},()=>{})}catch{return null}};function Bi(){let t=this?.context,e=t?.polyglot,n=this?.state?.root||t?.state?.root;return _r(n?.lang||t?.state?.lang,e)}function np(){let t=this?.context,e=y3(t,this?.state?.root||t?.state?.root);return e?b3(e).pending.get():null}function rp(){let t=this?.context?.polyglot;return t?En(t):[]}var Vb=(t,e)=>{if(!t||!e)return;if(t[e]!==void 0)return t[e];if(e.indexOf(".")===-1)return;let n=e.split("."),r=t;for(let o=0;o<n.length;o++){if(r==null)return;r=r[n[o]]}return r},g3=(t,e,n)=>{let r=e.lastIndexOf(".");if(r===-1)return t[e+"_"+n];let o=Vb(t,e.substring(0,r));if(o!=null)return o[e.substring(r+1)+"_"+n]};function op(t,e){if(!t)return"";let n=this?.context,r=n?.polyglot,o=e||this.call("getActiveLang"),s=this?.state;if(s){let l=g3(s,t,o);if(l!==void 0)return l}if(r?.translations){let l=r.translations[o];if(l){let f=Vb(l,t);if(f!==void 0)return f}}let a=(s?.root||n?.state?.root)?.translations;if(a){let l=a[o];if(l){let f=Vb(l,t);if(f!==void 0)return f}}let c=r?.defaultLang||"en";if(s){let l=g3(s,t,c);if(l!==void 0)return l}if(r?.translations){let l=r.translations[c];if(l){let f=Vb(l,t);if(f!==void 0)return f}}return t}async function Fi(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root;if(!r||!o)return;if(e&&e.inFlight===!0)return u3(o)[(r.storagePrefix||"smbls")+":"+t];let s=r.storagePrefix||ZY,i=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):QY);if(r.translations&&r.translations[t]&&!r.fetch||!r.fetch||r._fetchFailed?.[t])return;if(!o.translations?.[t]){let f=Qc.get(n,s+t);if(f)try{let u=JSON.parse(f),d={translations:{...o.translations||{}}};d.translations[t]=u,o.update&&o.update(d)}catch(u){console.warn("[polyglot] Failed to apply language update:",u.message)}}let a=u3(o),c=(r.storagePrefix||"smbls")+":"+t;if(a[c])return a[c];let l=this;return a[c]=(async()=>{try{let f=r.fetch,u=parseInt(Qc.get(n,i+t),10)||0,d,p,g;if(L(f)){let m=await f(t,u,l);if(!m||m.changed===!1)return;d=m.translations||m.data||m,p=m.version||0,g=!0}else if(k(f)){let m=l.getDB||(()=>n.fetch),y=L(m)?await m.call(l):n.fetch;if(!y)return;let x=f.rpc||f.from||"get_translations_if_changed",E={p_lang:t,p_cached_version:u,...f.params||{}},C=await y.rpc({from:x,params:E});if(C.error)throw r._fetchFailed||(r._fetchFailed={}),r._fetchFailed[t]=!0,C.error;let _=C.data;if(!_||!_.changed)return;d=_.translations||{},p=_.version||0,g=!0}else return;if(!g||!d)return;Qc.set(n,s+t,JSON.stringify(d)),p&&Qc.set(n,i+t,String(p));let h={translations:{...o.translations||{}}};h.translations[t]=d,o.update&&o.update(h)}catch(f){if(r.verbose!==!1){let u=f?.message||f?.details||(typeof f=="object"?JSON.stringify(f):String(f));console.warn("[polyglot] Failed to load translations for",t,"-",u)}}finally{delete a[c]}})(),a[c]}var yT=new WeakMap,m3=Symbol.for("@symbo.ls/polyglot:trackedLoadTranslations");function bT(t){if(!L(t)||t[m3]||t===Fi)return t;let e=function(n,r){let o=this?.context,s=this?.state?.root||o?.state?.root,a=(o?.polyglot?.storagePrefix||"smbls")+":"+n;if(r&&r.inFlight===!0){let l=s&&yT.get(s);return l&&l[a]?l[a]:Fi.call(this,n,r)}let c=t.call(this,n,r);if(s&&c&&typeof c.then=="function"){let l=yT.get(s);l||yT.set(s,l={});let f=Promise.resolve(c);l[a]=f;let u=()=>{l[a]===f&&delete l[a]};f.then(u,u)}return c};return e[m3]=!0,e}var iX=(t,e,n)=>{let r=t.__ref;if(!r||r.contentManaged||n==null||typeof n=="object")return;let o=r.__textNode;if(!o||o.parentNode!==e)return;let s=String(n);o.nodeValue!==s&&(o.nodeValue=s)};async function sp(t,e){let n=this?.context,r=n?.polyglot,o=this?.state?.root||n?.state?.root,s=n?.document||globalThis.document;if(!o)return;e?.persist!==!1&&Qc.set(n,ha(r),t);let i=b3(y3(n,o)),a=++i.seq;i.wake&&i.wake();let c=()=>i.seq===a;if(this.call("getActiveLang")===t){i.pending.set(null),s?.documentElement&&(s.documentElement.lang=t);return}try{if(r?.fetch){let f=this.call("loadTranslations",t);if(!h3(o,t)){i.pending.set(t);let u=null;if(await p3(i,Promise.resolve(f).then(null,d=>{u=d}),0),!c())return;if(u)throw u;if(!h3(o,t)&&!r.translations?.[t])return}}let l=nX(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=sX(s,oX(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await p3(i,f,l),!c()))return}i.pending.set(null),aX(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function aX(t,e,n,r,o){t?.state&&(t.state.lang=o);let s=e?.translations?.[o],i={lang:o},a=c=>Xl(t,c,n);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];(Array.isArray(l)||typeof l=="string"||typeof l=="number")&&(i[c]=l)}n.update&&n.update(i);for(let c in i)c!=="lang"&&Wn(t,c,i[c]);if(s&&typeof s=="object")for(let c in s){if(!a(c))continue;let l=s[c];if(l&&typeof l=="object"&&!Array.isArray(l)&&n[c]&&typeof n[c]=="object"&&!Array.isArray(n[c])){for(let f in l)n[c][f]=l[f];Wn(t,c,n[c])}}if(r&&s){let c=r.querySelectorAll("[data-key]");for(let l of c){let f=l.ref;if(!f)continue;let u=f.__ref?.__exec?.text;if(typeof u=="string"&&u.includes("{{"))try{iX(f,l,f.call("replaceLiteralsWithObjectFields",u,f.state))}catch{}}}r?.documentElement&&(r.documentElement.lang=o)}async function ip(t,e,n){let r=this?.context,o=r?.polyglot,s=this?.state?.root||r?.state?.root;if(s?.translations?.[e]&&(s.translations[e][t]=n),o?.translations?.[e]&&(o.translations[e][t]=n),o?.fetch&&k(o.fetch)){let i=this.getDB||(()=>r.fetch),a=L(i)?await i.call(this):r.fetch;if(!a)return;let c=o.fetch.table||"translations",l=await a.upsert({from:c,data:{key:t,lang:e,text:n}});if(l?.error)throw l.error;return l.data}}async function zb(){let t=this?.context,e=t?.polyglot;if(!e)return;let n=this?.state?.root||t?.state?.root;if(!n)return;let r=Qc.get(t,ha(e)),o=ms({polyglot:e,pathname:ys(t.window),stored:r,stateLang:n.lang||t?.state?.lang}),s=t?.document||globalThis.document;s?.documentElement&&(s.documentElement.lang=o),n.update&&n.lang!==o&&n.update({lang:o}),e.fetch&&!(e.translations&&e.translations[o])&&await this.call("loadTranslations",o)}function ap(t){try{let e=Bi.call(this),n=this?.state;if(!n)return"";let r=t.lastIndexOf(".");if(r===-1)return n[t+e]??"";let o=t.substring(0,r).split("."),s=n;for(let i=0;i<o.length;i++){if(s==null)return"";s=s[o[i]]}return s==null?"":s[t.substring(r+1)+e]??""}catch{return""}}var tl={name:"polyglot",render(t){t.parent&&t.parent.parent||t.__polyglotInitialized||(t.__polyglotInitialized=!0,zb.call(t))}},cX=tl;var cp={polyglot:op,getLocalStateLang:ap,getActiveLang:Bi,getLang:Bi,setLang:sp,getPendingLang:np,getLanguages:rp,loadTranslations:Fi,upsertTranslation:ip};var ST={};F(ST,{SYSTEM_METRICS:()=>lp,capsizeHandler:()=>wT,capsizePlugin:()=>Wb,computeCapsize:()=>_3,default:()=>lX,resolveFontSizePx:()=>w3,resolveMetrics:()=>S3});var lp={arial:{capHeight:716,ascent:1854,descent:-434,lineGap:67,unitsPerEm:2048},helvetica:{capHeight:714,ascent:770,descent:-230,lineGap:0,unitsPerEm:1e3},"helvetica neue":{capHeight:714,ascent:952,descent:-213,lineGap:28,unitsPerEm:1e3},georgia:{capHeight:1419,ascent:1878,descent:-449,lineGap:0,unitsPerEm:2048},"times new roman":{capHeight:1356,ascent:1825,descent:-443,lineGap:87,unitsPerEm:2048},"courier new":{capHeight:1170,ascent:1705,descent:-615,lineGap:0,unitsPerEm:2048},verdana:{capHeight:1489,ascent:2059,descent:-430,lineGap:0,unitsPerEm:2048},roboto:{capHeight:1456,ascent:1900,descent:-500,lineGap:0,unitsPerEm:2048},"open sans":{capHeight:1462,ascent:2189,descent:-600,lineGap:0,unitsPerEm:2048},inter:{capHeight:1490,ascent:2048,descent:-512,lineGap:0,unitsPerEm:2048},lato:{capHeight:1434,ascent:1974,descent:-426,lineGap:0,unitsPerEm:2e3},"source sans":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans pro":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},"source sans 3":{capHeight:660,ascent:984,descent:-273,lineGap:0,unitsPerEm:1e3},montserrat:{capHeight:700,ascent:968,descent:-251,lineGap:0,unitsPerEm:1e3},poppins:{capHeight:700,ascent:1050,descent:-350,lineGap:100,unitsPerEm:1e3},raleway:{capHeight:710,ascent:1e3,descent:-250,lineGap:0,unitsPerEm:1e3},"dm sans":{capHeight:700,ascent:992,descent:-312,lineGap:0,unitsPerEm:1e3},nunito:{capHeight:705,ascent:1011,descent:-353,lineGap:0,unitsPerEm:1e3},"work sans":{capHeight:684,ascent:930,descent:-243,lineGap:0,unitsPerEm:1e3},manrope:{capHeight:708,ascent:980,descent:-300,lineGap:0,unitsPerEm:1e3},"ibm plex sans":{capHeight:698,ascent:1025,descent:-275,lineGap:0,unitsPerEm:1e3},"plus jakarta sans":{capHeight:720,ascent:1060,descent:-300,lineGap:0,unitsPerEm:1e3}},Hb=t=>parseFloat(t.toFixed(4)),_3=(t,e,n)=>{let{ascent:r,descent:o,lineGap:s,unitsPerEm:i,capHeight:a}=e,c=Math.abs(o),l=r+c+s,f=n!==void 0?n:l/i*t,u=f/t,d=l/i,p=(r-a+s/2)/i-(u-d)/2,g=(c+s/2)/i-(u-d)/2;return{fontSize:`${Hb(t/16)}rem`,lineHeight:`${Hb(f)}px`,capHeightTrim:`${Hb(-p)}em`,baselineTrim:`${Hb(-g)}em`}},w3=(t,e)=>{if(typeof t=="number")return t;let n=e?.designSystem;if(!n)return null;let{typography:r}=n;if(r?.sequence){let s=String(t).toUpperCase(),i=r.sequence[s];if(i)return i.decimal||i.val}let o=parseFloat(t);return isNaN(o)?null:typeof t=="string"&&t.endsWith("rem")?o*(n.typography?.browserDefault||16):o},S3=(t,e)=>{let r=e?.designSystem?.font_family||{};if(t){let s=r[t];if(s?.metrics)return s.metrics;let i=String(t).toLowerCase().replace(/['"]/g,"").trim();if(lp[i])return lp[i]}let o=r.default||Object.keys(r)[0];if(o){let s=r[o];if(s?.metrics)return s.metrics;if(s?.value&&Array.isArray(s.value))for(let i of s.value){let a=i.toLowerCase().replace(/['"]/g,"").trim();if(lp[a])return lp[a]}}return null},wT=(t,e,n,r)=>{if(!t)return;let o=w3(e.fontSize,r);if(!o)return;let s=S3(e.fontFamily,r);if(!s)return;let i=e.lineHeight?parseFloat(e.lineHeight):void 0,{lineHeight:a,capHeightTrim:c,baselineTrim:l}=_3(o,s,i),f={};return e.lineHeight||(f.lineHeight=a),f["::before"]={content:'""',marginBottom:c,display:"table"},f["::after"]={content:'""',marginTop:l,display:"table"},f},Wb={name:"capsize",init(t){t.useCapsize===void 0&&t.fontSize&&(t.useCapsize=!0)}},lX=Wb;var fX="@symbo.ls/fetch:EARLY",uX=()=>new Promise(t=>setTimeout(t,0)),xT=t=>{let e=typeof globalThis<"u"?globalThis[Symbol.for(fX)]:null,n=e&&e.afterFirstView;return typeof n!="function"||e.afterFirstViewRan?null:(e.afterFirstViewRan=!0,Promise.resolve(t&&t.__firstNavigation).catch(()=>{}).then(uX).then(()=>{try{n(e.ctx||{})}catch(r){console.error("[smbls] fetch.early afterFirstView failed:",r)}}))};var vT=t=>!!(t&&typeof t=="object"&&t.__isStub===!0),AT=t=>Ne(t)?t.library!==void 0?t.library:t.key??t.name:t,dX=(t,e)=>{let n=e?.sharedLibraries,r=Array.isArray(n)?n.map(i=>typeof i=="string"?i:i?.key||i?.name):n&&typeof n=="object"?Object.keys(n):null,o=0,s=i=>{let a=o++;if(typeof i.__libraryKey=="string"&&i.__libraryKey)return i.__libraryKey;if(r&&r[a])return r[a];if(typeof i.__stubId=="string"){let c=i.__stubId.match(/^@symbo[-.]ls\/([^/]+)/);if(c)return c[1]}return null};return t.map(i=>{let a=AT(i);if(!vT(a))return i;let c=s(a);return c?Ne(i)?{...i,library:c}:c:null}).filter(Boolean)},CT=new WeakMap,pX={lazy:!0,window:globalThis},x3=["components","pages","functions","methods","snippets"],hX=x3.filter(t=>t!=="methods"),kT=t=>{if(!t||typeof t!="object")return!1;let e=new WeakSet,n=[t];for(;n.length;){let r=n.pop();if(!r||typeof r!="object"||e.has(r))continue;e.add(r);let o;try{o=Object.keys(r)}catch{continue}for(let s of o){let i;try{i=r[s]}catch{continue}if(typeof i=="function")return!0;i&&typeof i=="object"&&n.push(i)}}return!1},gX=(t,e)=>{if(ss(e)||ss(t))return"boot-revived";if(kT(t))return"local";if(e&&typeof e=="object"){if(kT(e.app))return"local";for(let n of hX)if(kT(e[n]))return"local"}return"raw-json"},k3=(t,e)=>{let n=e?t[e]:t;if(!k(n))return;let r=be(n,{},pX);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},mX=t=>{if(!k(t)||ss(t))return t;for(let e of[...x3,"app"])k3(t,e);return Ji(t)},yX=(t,e)=>{if(!Array.isArray(t))return t;for(let n of t){let r=Ne(n)?n.library:n;k(r)&&!e.has(r)&&mX(r)}return t},TT=new WeakMap,ET=t=>{let e=CT.get(t);e&&(CT.delete(t),Qj(e))},E3=t=>t.notifications===!0||t.notifications!==!1&&!!t.editor&&t.editor.verbose===!0,v3=t=>t.sync!==!1&&Ei(t)||E3(t),A3=t=>{let e={shorthand:null,analyze:null,inspect:null,fetch:null,sync:null,windows:null,dropdown:null,tooltip:null};for(let n of WB(t))e[n]=he(n);return v3(t)&&(e.sync=he("sync")),e},OT=async(t,e={})=>{let n=e.symbolsConfig,r=n?.owner&&n?.key?`${n.owner}--${n.key}`:n?.key,o=e.key=e.key||r||(v(t)?t:"smblsapp");e.define=e.define||Jc,e.cssPropsRegistry=xt,e.window=qj(e);let s=A3(e),i=gX(t,e);if(globalThis.__SMBLS_BUILD_NO_SHARED_LIBRARIES__&&e.sharedLibraries&&e.sharedLibraries.length)gT(e);else if(e.sharedLibraries&&e.sharedLibraries.length){if(e.sharedLibraries.some(x=>{let E=AT(x);return typeof E=="string"||vT(E)})){e.sharedLibraries=dX(e.sharedLibraries,e.symbolsConfig);let x=new Set(e.sharedLibraries.map(C=>AT(C)).filter(C=>k(C)&&!vT(C))),E=await Pf(e.sharedLibraries,{apiBaseUrl:Ub()});e.sharedLibraries=i==="raw-json"?E:yX(E,x)}wj(e.sharedLibraries),gT(e)}Ei(e)&&Vc(e,e.designSystem);let a=TT.get(e);a&&(TT.delete(e),i3(a)&&(e.preparedDesignSystem=await a));let[c,l]=a3(o,e);if(e.designSystem=c,e.registry=l,jf(e,{apiBaseUrl:Ub()}),e.cases||(e.cases={}),e.shorthand){let y=await(s.shorthand||he("shorthand"));y&&y.shorthandPlugin.prepareContext(e)}let f=c3(t,e);if(e.state=f,ff(f),e.pages=l3(t,e),e.components=Gj(e),e.utils=Yj(e),fo[e.packageManager]){let y=Zj(e);y&&y.deferred?(y.blocking&&await hT({...e,dependencies:y.blocking}),CT.set(e,y.deferred)):e.dependencies=await hT(e)}if(e.methods=Xj(e),e.routerOptions=Y2(t,e),e.defaultExtends=[Zm],e.snippets=e.snippets||{},e.functions=e.functions||{},e.plugins=e.plugins||[],e.globalScope=e.globalScope||{},e.plugins.some(y=>!y||typeof y!="object")){let y=e.plugins.filter(x=>!x||typeof x!="object");e.plugins=e.plugins.filter(x=>x&&typeof x=="object"),e.verbose!==!1&&console.warn(`[smbls] context.plugins carried ${y.length} non-plugin entr${y.length===1?"y":"ies"} (${y.map(x=>JSON.stringify(x)).join(", ")}) \u2014 dropped. A published project that imports a framework plugin it does not declare ships a stub phantom here; the runtime registers polyglot/helmet/fetch/... itself from the context config, so remove the import instead.`)}let u=e.globalScope;e.globalScope&&k(e.globalScope)&&(e.globalScope=is(e.globalScope));let d=(y,x)=>{i==="raw-json"&&k3(y,x)};d(t),d(e,"components"),d(e,"pages"),d(e,"functions"),d(e,"methods"),d(e,"snippets"),d(e,"app"),Cf(e,u),Tf(e);let p=y=>y&&typeof y.select=="function";if(e.fetch?.__resolved&&!p(e.fetch.__resolved)&&delete e.fetch.__resolved,e.db?.__resolved&&!p(e.db.__resolved)&&delete e.db.__resolved,e.polyglot&&!Ke(e,"polyglot")){e.plugins.push(tl);for(let y in cp)typeof e.functions[y]!="function"&&(e.functions[y]=cp[y])}if(e.polyglot&&e.functions&&typeof e.functions.loadTranslations=="function"&&(e.functions.loadTranslations=bT(e.functions.loadTranslations)),Ke(e,"helmet")||e.plugins.push(Bb),Ke(e,"inertOutside")||e.plugins.push(qm),e.fetch){let y=await(s.fetch||he("fetch"));if(y){Ke(e,"fetch")||e.plugins.push(y.fetchPlugin);let{fetchFunctions:x}=y;for(let E in x)typeof e.functions[E]!="function"&&(e.functions[E]=x[E])}}if(e.designSystem?.typography?.useCapsize!==!1&&!Ke(e,"capsize")&&(e.plugins.push(Wb),e.cssPropsRegistry.useCapsize=wT),e.shorthand&&!Ke(e,"shorthand")){let y=await(s.shorthand||he("shorthand"));y&&e.plugins.push(y.shorthandPlugin)}if(e.analyze&&!Ke(e,"analyze")){let y=await(s.analyze||he("analyze"));if(y){let x=e.analyze===!0?{}:e.analyze;e.analyze=y.createAnalyzeState(x),e.plugins.push(y.analyzePlugin)}}let g=e.sync!==!1&&Ei(e),h=v3(e)?await(s.sync||he("sync")):null;if(h&&g&&!Ke(e,"sync")&&e.plugins.push(h.syncPlugin),e.inspect&&!Ke(e,"inspect")){let y=await(s.inspect||he("inspect"));y&&e.plugins.push(y.inspectPlugin)}h&&E3(e)&&!Ke(e,"notifications")&&e.plugins.push(h.notificationsPlugin);let m=async y=>{if(e[y]===!1)return;let x=await(s[y]||he(y));if(!x)return;let{components:E,functions:C}=x;for(let _ in E)k(e.components[_])||(e.components[_]=E[_]);for(let _ in C)typeof e.functions[_]!="function"&&(e.functions[_]=C[_])};return await m("windows"),await m("dropdown"),await m("tooltip"),e},fp=async(t,e)=>{k(e)||(e={});let n=H2(e);A3(e);let r=s3(e);if(r&&TT.set(e,r),n&&(n.lease=V2(e),await ir(),!n.lease.live()))return Mc(k(t)?t:{});dr(t)?(e.parent=t,t={}):v(t)?(e.key=t,t={}):k(t)?t={...t}:t={};let o=e.window||(typeof window<"u"?window:null),s=Dj(e,o);globalThis.__SMBLS_BUILD_DROP_F_prerender__&&s&&qt("prerender");let i=!globalThis.__SMBLS_BUILD_DROP_F_prerender__&&s?Ij(e):null;if(await OT(t,e),e.useReset!==!1){let u=e.document||(typeof document<"u"?document:null);if(u){let d=u.head.querySelector("style[data-smbls]");d||(d=u.createElement("style"),d.setAttribute("data-smbls",""),u.head.appendChild(d));let p=d.sheet;if(p){try{p.insertRule("*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }",0)}catch{}try{p.insertRule("h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }",1)}catch{}}}}if(e.app&&k(e.app))for(let u in e.app)t[u]===void 0&&(t[u]=e.app[u]);t.extends=_j(t,e),e.router!==!1&&(t.routes=e.pages),t.state=e.state,t.context=e,t.data=t.data||{},e.skipDesignSystemInit||await t3({functions:e.functions,utils:e.utils,snippets:e.snippets,...e.files},e);for(let u of e.plugins)if(typeof u.beforeCreate=="function")try{u.beforeCreate(t,e)}catch(d){console.error(`[smbls] plugin "${u.name||"?"}" beforeCreate error:`,d)}let a=e.document;if(!a||!a.createElement)return ET(e),t;let c=e.parent||a.body,l={verbose:e.verbose,context:e,...e.domqlOptions};if(!globalThis.__SMBLS_BUILD_DROP_F_prerender__&&s){let u=await jj(Yt,t,c,e,o,i,l,n);return Dd(u)||(ET(e),xT(e)),u}let f=n?await K2(t,c,e,l,n):Yt(t,c,e.key,l);return f?(ET(e),xT(e),typeof window<"u"&&!e.document&&(window.__smblsApp=f),f):Mc(t)};var RT=(t,e)=>{if(!k(e))return bt(t,{});let{state:n,...r}=e;return bt(t,r),n!==void 0&&(k(t.state)&&k(n)?so(t.state,n):t.state===void 0&&(t.state=n)),t},bX=t=>{if(typeof document>"u")return;let e=t.themeRoot||t.document&&t.document.documentElement||document.documentElement;if(!e||typeof e.setAttribute!="function")return;let n=t.globalTheme||"auto";try{if(typeof window<"u"&&window.location){let s=new URLSearchParams(window.location.search).get("globalTheme");s&&(n=s)}}catch{}let r=t.themeStorageKey;if(n==="auto"&&r&&typeof localStorage<"u")try{let s=localStorage.getItem(r);s&&(n=s)}catch{}let o=n==="auto"?(()=>{try{return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch{return"light"}})():n;e.setAttribute("data-theme",o),t.globalTheme=n,t.themeRoot=e},_X=()=>{if(typeof document>"u")return null;try{let t=document.querySelector('meta[name="symbols-runtime"]'),e=t&&t.getAttribute("content");return typeof e=="string"&&e?e:null}catch{return null}},C3=t=>{let e=_X();e&&(t.editor||(t.editor={}),t.editor.runtime||(t.editor.runtime=e),e==="runner"&&typeof t.editor.livesync>"u"&&(t.editor.livesync=!0))},PT=(t,e=Ko,n)=>{let r={...Ko,...RT(e,n)};return C3(r),bX(r),fp(t,r).then(s=>{if(Dd(s))return s.destroy=()=>Ii(s),s;if(IA(s,r),s.destroy=()=>Ii(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Id(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},s.onCreate&&!s.__ref&&s.onCreate(s,s.state,s.context,r),s.context?.analyze?.activate)try{s.context.analyze.activate(s.context)}catch(i){console.error("[analyze] activate error:",i)}return s}).catch(s=>{throw console.error("[smbls] create error:",s),s})},wX=(t,e=Ko,n)=>{let r=PT(t,e,n),o={...Ko,...RT(e,n)},s=o.key;return s&&o.editor&&o.editor.async&&he("fetchOnCreate").then(i=>{i&&i.fetchAsync(r,s,{utils:Ld,...o})}),r},SX=async(t,e=Ko,n)=>{let r={...Ko,...RT(e,n)};C3(r);let o=e.key;if(o&&r.editor){let i=await he("fetchOnCreate");i&&await i.fetchSync(o,r)}let s=await fp(t,r);return Dd(s)?(s.destroy=()=>Ii(s),s):(IA(s,r),s.destroy=()=>Ii(s),s.navigate=(i,a={})=>{let c=s,l=s.context&&s.context.routerOptions;if(l&&l.customRouterElement){let f=Id(s,l.customRouterElement);f&&(c=f)}return c.call("router",i,c,a.state||{},{pushState:!0,...a})},r.onCreate&&await r.onCreate(s,s.state,s.context,r),s)},xX=(t={},e=Ko,n)=>PT({deps:{isUndefined:Xt},...t},bt({domqlOptions:{onlyResolveExtends:!0}},e),n);Mt();M();Ih();var T3={"@symbo.ls/signal":ll,"@symbo.ls/scratch":H0,"@symbo.ls/element":Gm,"@symbo.ls/css":nm,"@symbo.ls/utils":zf,"@symbo.ls/state":Qk,"@symbo.ls/router":Tc,"@symbo.ls/polyglot":_T,"@symbo.ls/helmet":rT,"@symbo.ls/fetch":ua,"@symbo.ls/capsize":ST,"@symbo.ls/shorthand":hC,"@symbo.ls/analyze":Bd,"@symbo.ls/inspect":Ud,"@symbo.ls/channels":iT},O3=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:{}),r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in T3)r[o]||(r[o]=T3[o]);if(e)for(let o in e)r[o]||(r[o]=e[o]);return r},R3=(t,e)=>{let n=t||(typeof globalThis<"u"?globalThis:null);if(!n||!e||typeof e!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in e){let s=e[o];if(typeof s!="function"||Object.prototype.hasOwnProperty.call(r,o))continue;let i=a=>(Object.defineProperty(r,o,{configurable:!0,enumerable:!0,writable:!0,value:a}),a);Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>i(s()),set:i})}return r},P3=["@symbo.ls/sdk"],L3=(t,e)=>{let n=e||(typeof globalThis<"u"?globalThis:null);if(!n||!t||typeof t!="object")return null;let r=n.__SMBLS_PKGS__||(n.__SMBLS_PKGS__={});for(let o in t){let s=t[o];!s||typeof s!="object"&&typeof s!="function"||r[o]||(r[o]=s)}return r};var IT={};F(IT,{BUILD_DOMQL_SYSTEM_PROMPT:()=>H3,DEFAULT_MAX_TOKENS:()=>Jb,DEFAULT_MODEL:()=>Go,DEFAULT_PROVIDER:()=>pp,DEFAULT_TEMPERATURE:()=>Xb,MODEL_TIER_ALIASES:()=>DT,PROVIDER_MODELS:()=>dp,SIMONE_BASE_URL:()=>up,SIMONE_CHAT_PATH:()=>Kb,SIMONE_CODE_PATH:()=>qb,SIMONE_CODE_SYMBOLS_PATH:()=>Gb,SIMONE_HEALTH_PATH:()=>Yb,SIMONE_TOOLS_PATH:()=>D3,WORKSPACE_SYSTEM_PROMPT:()=>z3,buildMessages:()=>F3,chat:()=>hp,health:()=>$3,parseSimoneResponse:()=>U3,resolveModel:()=>W3,streamChat:()=>hp,streamCode:()=>M3,streamCodeSymbols:()=>N3,toLegacyEnvelope:()=>V3});var up="https://symbols-service-production.up.railway.app",Kb="/api/chat",qb="/api/code",Gb="/api/code-symbols",Yb="/api/health",D3="/api/tools",dp={"openai-compatible":["claude-sonnet-4-6","claude-opus-4-6","gpt-4o","gpt-4o-mini","deepseek-chat"],anthropic:["claude-sonnet-4-6","claude-sonnet-4-5-20250929","claude-opus-4-1-20250805","claude-haiku-4-5-20251001"],openrouter:["google/gemini-3-pro-preview"],gemini:["gemini-2.5-pro","gemini-3.1-pro-preview"]},pp="gemini",Go=dp[pp][0],Xb=.7,Jb=4096;function kX(t){if(!t)return null;for(let[e,n]of Object.entries(dp))if(n.includes(t))return e;return null}function I3(t,e){return t?t.replace(/\/$/,"")+e:e}function EX(t){if(!t.startsWith("data: "))return null;let e=t.slice(6);if(e==="[DONE]")return{done:!0};try{return{chunk:JSON.parse(e)}}catch{return{raw:e}}}async function hp(t,e={},n){let{baseUrl:r=up,path:o=Kb,model:s=Go,provider:i=kX(s)||pp,temperature:a=Xb,maxTokens:c=Jb,effort:l,apiKeys:f,signal:u,headers:d}=e;if(!Array.isArray(t)||t.length===0)throw new TypeError("simone: messages must be a non-empty array");let p={messages:t,provider:i,model:s,temperature:a,maxTokens:c};l&&(p.effort=l),f&&(p.apiKeys=f);let g=await fetch(I3(r,o),{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...d},body:JSON.stringify(p),signal:u});if(!g.ok){let C=g.statusText;try{let b=await g.text();try{let w=JSON.parse(b);C=w.error||w.detail||C}catch{C=b||C}}catch{}let _=new Error(`simone: HTTP ${g.status} \u2014 ${C}`);throw _.status=g.status,_}if(!g.body||typeof g.body.getReader!="function"){let C=await g.text();return n&&n(C),{text:C,errors:[]}}let h=g.body.getReader(),m=new TextDecoder,y=[],x=[],E="";try{for(;;){let{done:C,value:_}=await h.read();if(C)break;E+=m.decode(_,{stream:!0});let b=E.indexOf(`
169
+ `);for(;b!==-1;){let w=E.slice(0,b).trim();if(E=E.slice(b+1),w){let S=EX(w);if(S?.done)return{text:y.join(""),errors:x};let A=S?.chunk;A?.delta&&(y.push(A.delta),n&&n(A.delta)),A?.error&&x.push(A.error)}b=E.indexOf(`
170
+ `)}}return{text:y.join(""),errors:x}}finally{h.cancel().catch(()=>{})}}function M3(t,e={},n){return hp(t,{...e,path:qb},n)}function N3(t,e={},n){return hp(t,{...e,path:Gb},n)}async function $3(t={}){let{baseUrl:e=up,signal:n,headers:r}=t,o=await fetch(I3(e,Yb),{method:"GET",headers:r,signal:n});if(!o.ok)throw new Error(`simone health: HTTP ${o.status}`);return o.json()}function F3({system:t,history:e=[],user:n,context:r}){let o=[];t&&o.push({role:"system",content:t});for(let s of e)!s||!s.role||typeof s.content!="string"||!s.content||o.push({role:s.role,content:s.content});if(n){let s=n;if(r!=null){let i=typeof r=="string"?r:JSON.stringify(r,null,2);s=`${s}
171
171
 
172
172
  ---
173
173
  Context:
174
174
  \`\`\`json
175
175
  ${i}
176
- \`\`\``}o.push({role:"user",content:s})}return o}var P3=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,pX=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function hX(t){let e=[];for(let n of t.matchAll(P3))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function gX(t){return t.replace(P3,"").trim()}function AT(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function R3(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&pX.has(t.type)}function L3(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=hX(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=gX(e);for(let i of o){let a=AT(i.code);if(R3(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(r.length>0){let i=r[0].code,a=AT("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=AT(e);if(R3(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function D3(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var I3=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),M3=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
177
- `),CT={Starter:qo,Free:qo,Pro:"claude-opus-4-6"};function N3(t){return t?CT[t]||t:qo}Sy(Du);w3(void 0,{smbls:OT,"@symbo-ls/simone-server":TT});S3(void 0,{"@symbo.ls/windows":()=>({...LA,...RA}),"@symbo.ls/dropdown":()=>({...BA,...UA})});var $3=Symbol.for("smbls.serverUtils");globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__&&typeof globalThis[$3]!="function"&&(globalThis[$3]=()=>import("@symbo.ls/utils/serverUtils.js"));
176
+ \`\`\``}o.push({role:"user",content:s})}return o}var j3=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,vX=new Set(["component","components","page","pages","function","method","state","theme","color","font","icon"]);function AX(t){let e=[];for(let n of t.matchAll(j3))e.push({lang:(n.groups?.lang||"").toLowerCase(),code:n.groups?.code??""});return e}function CX(t){return t.replace(j3,"").trim()}function LT(t){if(!t||!/[{[]/.test(t))return null;try{return JSON.parse(t)}catch{}try{return JSON.parse(t.replace(/,\s*([}\]])/g,"$1"))}catch{}return null}function B3(t){return!!t&&typeof t=="object"&&typeof t.type=="string"&&vX.has(t.type)}function U3(t){let e=(typeof t=="string"?t:"").trim();if(!e)return{kind:"text",text:"",message:""};let n=AX(e),r=n.filter(i=>/^(js|javascript|ts|typescript|jsx|tsx)$/.test(i.lang)),o=n.filter(i=>i.lang==="json"),s=CX(e);for(let i of o){let a=LT(i.code);if(B3(a))return{kind:"asset",text:s||a.description||"",asset:a,message:a.description||s||`Generated ${a.type}: ${a.title||a.key||""}`.trim()}}if(r.length>0){let i=r[0].code,a=LT("["+i+"]");return Array.isArray(a)&&a.length>1?{kind:"multi",text:s,assets:a,code:i,message:s||`Generated ${a.length} items`}:{kind:"component",text:s,code:i,message:s||"Generated a component"}}if(e.startsWith("{")){let i=LT(e);if(B3(i))return{kind:"asset",text:i.description||"",asset:i,message:i.description||`Generated ${i.type}: ${i.title||i.key||""}`.trim()}}return{kind:"text",text:e,message:e}}function V3(t){if(!t)return{code_response:{type:"error",content:"Empty response from assistant"}};switch(t.kind){case"asset":return{code_response:{type:"json_response",data:t.asset}};case"multi":return{code_response:{type:"symbols_component_code",component_code:t.code}};case"component":return{code_response:{type:"symbols_component_code",component_code:t.code,analysis_text:t.text}};default:return{code_response:{type:"plain_text_response",content:t.text||t.message||""}}}}var z3=["You are Simone, the Symbols.app assistant.","You help users build DOMQL v3 components, pages, and design-system entries.",'When the user asks for a component or page, return a single ```json fenced block whose body is one asset object with shape { type, key, title, description, value }. type is one of "component", "page", "function", "state", "color", "font", "icon", "theme".',"For multiple assets, return one ```js fenced block with comma-separated asset objects.","For general questions, reply with prose only."].join(" "),H3=["You are a DOMQL v3.14 code generator for the Symbols workspace.","Output EXECUTABLE DOMQL v3.14 for the requested page(s)/component(s) \u2014 never a description, never a plan, never an explanation.","Author data-first object schemas: child elements are UPPERCASE keys; styling lives in flat element props (NO attr/props/on wrappers); use design-system tokens (color/typography/spacing keys), never raw px/rem/hex/rgba; `extends` and `childExtends` are quoted strings; event handlers are flat (onClick, onInit) \u2014 never on:{} or props:{} wrappers.","OUTPUT FORMAT \u2014 pick ONE:","- SINGLE page/component: emit exactly one ```js fenced code block whose body is a single DOMQL object literal (an expression \u2014 start with `{`, no `export`, no variable assignment, no surrounding prose).",'- MULTIPLE pages/components: emit exactly one ```json fenced code block whose body is an object of the shape { "pages": { "PageKey": "<DOMQL object-literal source string>" }, "components": { "CompKey": "<DOMQL object-literal source string>" } }. Include only the sections you produce; each value is the DOMQL source for that key.',"Keys are PascalCase. Default to a single page unless the request clearly needs several distinct pages/components.","Emit ONLY the single fenced block. No text before or after it."].join(`
177
+ `),DT={Starter:Go,Free:Go,Pro:"claude-opus-4-6"};function W3(t){return t?DT[t]||t:Go}vy($u);O3(void 0,{smbls:MT,"@symbo-ls/simone-server":IT});R3(void 0,{"@symbo.ls/windows":()=>({...$A,...MA}),"@symbo.ls/dropdown":()=>({...HA,...KA})});var K3=Symbol.for("smbls.serverUtils");globalThis.__SMBLS_BUILD_BROWSER_BUNDLE__&&typeof globalThis[K3]!="function"&&(globalThis[K3]=()=>import("@symbo.ls/utils/serverUtils.js"));
178
178
  //# sourceMappingURL=smbls.cjs.map