smbls 3.14.848 → 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.
- package/CHANGELOG.md +9 -0
- package/core.js +6 -0
- package/dist/smbls.cjs +38 -38
- package/dist/smbls.cjs.map +3 -3
- package/dist/{smbls.core.chunk-2F2YRPHM.esm.js → smbls.core.chunk-7SZUGO5L.esm.js} +6 -6
- package/dist/smbls.core.chunk-7SZUGO5L.esm.js.map +1 -0
- package/dist/smbls.core.chunk-CCELIELA.esm.js +2 -0
- package/dist/smbls.core.chunk-CCELIELA.esm.js.map +1 -0
- package/dist/{smbls.core.chunk-GBRQOSKJ.esm.js → smbls.core.chunk-DF7QFXYQ.esm.js} +9 -9
- package/dist/smbls.core.chunk-DF7QFXYQ.esm.js.map +1 -0
- package/dist/smbls.core.chunk-PJSRIWW6.esm.js +7 -0
- package/dist/smbls.core.chunk-PJSRIWW6.esm.js.map +6 -0
- package/dist/{smbls.core.dropdown-KNMDR2TZ.esm.js → smbls.core.dropdown-WHTRDSTC.esm.js} +2 -2
- package/dist/smbls.core.esm.js +1 -1
- package/dist/smbls.core.fetch-MDXDXO47.esm.js +2 -0
- package/dist/smbls.core.fetch-MDXDXO47.esm.js.map +1 -0
- package/dist/{smbls.core.inspect-BY4NJMHD.esm.js → smbls.core.inspect-2Y3VVWKT.esm.js} +2 -2
- package/dist/{smbls.core.sync-7IUHWBAH.esm.js → smbls.core.sync-CFCAWBC2.esm.js} +2 -2
- package/dist/{smbls.core.windows-RLXGBXPA.esm.js → smbls.core.windows-ICMSWA7V.esm.js} +2 -2
- package/dist/smbls.embed.iife.js +1 -1
- package/dist/smbls.esm.js +40 -40
- package/dist/smbls.esm.js.map +1 -1
- package/dist/smbls.iife-string.js +2 -2
- package/dist/smbls.iife.js +1 -1
- package/dist/smbls.iife.js.map +1 -1
- package/dist/smbls.server-utils.esm.js +2 -2
- package/dist/smbls.server-utils.esm.js.map +1 -1
- package/dist/smbls.tree-shake.json +18 -2
- package/index.js +11 -0
- package/package.json +3 -2
- package/dist/smbls.core.chunk-2F2YRPHM.esm.js.map +0 -6
- package/dist/smbls.core.chunk-EI3G25LW.esm.js +0 -7
- package/dist/smbls.core.chunk-EI3G25LW.esm.js.map +0 -6
- package/dist/smbls.core.chunk-GBRQOSKJ.esm.js.map +0 -6
- package/dist/smbls.core.chunk-YN5FXJKZ.esm.js +0 -2
- package/dist/smbls.core.chunk-YN5FXJKZ.esm.js.map +0 -6
- package/dist/smbls.core.fetch-LOKOAP2Y.esm.js +0 -2
- package/dist/smbls.core.fetch-LOKOAP2Y.esm.js.map +0 -6
- /package/dist/{smbls.core.dropdown-KNMDR2TZ.esm.js.map → smbls.core.dropdown-WHTRDSTC.esm.js.map} +0 -0
- /package/dist/{smbls.core.inspect-BY4NJMHD.esm.js.map → smbls.core.inspect-2Y3VVWKT.esm.js.map} +0 -0
- /package/dist/{smbls.core.sync-7IUHWBAH.esm.js.map → smbls.core.sync-CFCAWBC2.esm.js.map} +0 -0
- /package/dist/{smbls.core.windows-RLXGBXPA.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 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,XT,JT=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,XT=$t.VERSION});var ll={};F(ll,{RESERVED_STORE_METHODS:()=>GT,SIGNAL_ENGINE_KEY:()=>zi,SIGNAL_INSTANCES_KEY:()=>Ui,STORE_METHOD_NAMES:()=>qT,VERSION:()=>XT,__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(()=>{JT()});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&&!w4(this,t))return t;let i=_4[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_,_4,bl,w4,Zo,$_,S4,F_,B_,j_,x4,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,"")},_4={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),w4=(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}},
|
|
3
|
-
`).replace(/\/\/\/\/\/tilde/g,"`").replace(/\/\/\/\/\/dlrsgn/g,"$"),
|
|
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
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=
|
|
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
7
|
`:V(c)&&c!==null?o+=`${r} ${Cl(c,e+2)},
|
|
8
|
-
`:v(c)?o+=`${r} ${
|
|
8
|
+
`:v(c)?o+=`${r} ${ZT(c)},
|
|
9
9
|
`:o+=`${r} ${c},
|
|
10
|
-
`;o+=`${r} ]`}else V(i)?o+=Cl(i,e+1):v(i)?o+=
|
|
11
|
-
`}return o+=`${r}}`,o},
|
|
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},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=
|
|
14
|
-
First 200 chars of source: `+String(t).slice(0,200)),t)}},
|
|
15
|
-
First 200 chars of source: `+String(t.src).slice(0,200))),t.fn=n,t.opts=null,n},
|
|
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},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},G4=new Set(["node","__ref"]),sw=(t,e,n=G4)=>{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(ZT==="test"||ZT==="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,Y4,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}}},Y4=/^\s*(?:async\s+)?(?:function\b|\([^)]*\)\s*=>|[a-zA-Z_$][\w$]*\s*=>)/,Zi=t=>Y4.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,m1=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,y1=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,b1=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,_1,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"])},_1=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,w1,ra,Xe,oa,Fl,Vn,Iw,Vp,Bl,Mw,jl,zp,Hp,Ul,Wp,sa,X4,zn,S1,Nl,Vl,Nw,$l,$w,Fw,Kp,qp,Gp,Yp,Xp,Jp,x1,Zp=D(()=>{"use strict";Gi();Bw();jn();Wt();Dw="production",w1=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},X4=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(X4.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]||{},S1(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},S1=(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]||{},S1(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=w1(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(w1(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},x1=(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 k1(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 E1=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(A1.has(u)){t.props[r]=o,delete t[r],n.push(r);continue}let d=zw.test(r)||v1.test(r)||Z4(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){k1(r,t),delete t.props[r];continue}if(n.includes(r)||r==="childProps")continue;let a=r.charAt(0);if(A1.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)||v1.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,v1,A1,J4,Z4,Wl,zl,Ww,Kl,Gl,Yl,nh,Hl,qw,Gw,Yw=D(()=>{"use strict";es();E1();jn();Wt();wl();ea();zw=/^[A-Z]/,v1=/^\d+$/,A1=new Set([":","@","[","*","+","~","&",">","$","-",".","!"]),J4=new Set(["extend","props","text","tag","on","if","childExtend","children","childrenAs","state","html","attr","define","content"]),Z4=t=>{if(!t||typeof t!="object"||Array.isArray(t))return!1;for(let e in t)if(J4.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 C1,rh,oh,sh,ih,Xw,ah,ch,lh,Jw,T1=D(()=>{"use strict";Zp();jp();pl();Yw();Lw();Wt();C1="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(C1==="test"||C1==="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,O1,Q4,L1,so,rS,R1,io,cs,P1,D1,I1,Xl,Wn,M1=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"]),O1=new Set,Q4=t=>{O1.has(t)||(O1.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").'))},L1=(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)){Q4(s);continue}let i=t[o],a=e[o];V(i)&&V(a)?(r.push(t,e),L1(i,a,s,r),r.length-=2):i===void 0&&(t[o]=a)}return t},so=(t,e)=>!V(t)||!V(e)?t:L1(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)},R1="__polyglotSeededKeys",io=t=>{if(!k(t))return new Set;let e=t[R1];if(!(e instanceof Set)){e=new Set;try{Object.defineProperty(t,R1,{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,P1="__polyglotSeededValues",D1=t=>{if(!k(t))return new Map;let e=t[P1];if(!(e instanceof Map)){e=new Map;try{Object.defineProperty(t,P1,{value:e,enumerable:!1,writable:!0,configurable:!0})}catch{}}return e},I1=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=D1(t);if(!r.has(e))return!0;let o=k(n)||Array.isArray(n)?n[e]:void 0,s=I1(o);return s!==null&&s===r.get(e)},Wn=(t,e,...n)=>(io(t).add(e),n.length&&D1(t).set(e,I1(n[0])),e)});var t5,oS,N1=D(()=>{"use strict";t5=(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&&!t5(t.scope,i)&&Object.setPrototypeOf(t.scope,i)}}});var $1,mh,hr,yh,sS,iS=D(()=>{"use strict";Wt();ea();$1=(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=$1(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=$1(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,F1,B1,dS,pS,j1,Zl,U1,e5,hS,n5,gS,ls,V1,bh,mS,z1,H1,W1,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},F1=(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},B1=(t,e,n)=>{let r=Kn();if(e5(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={})},j1=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]',U1=t=>{let e=j1(t);return e.length?'<script type="application/json" data-fetch-seed>'+gr(e)+"<\/script>":""},e5=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=n5(t,i.stamp,i.time);a?(o.stale=a,o.seedConfig=t&&typeof t=="object"?t:null):ls=null},hS="data-smbls-stale",n5=(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,V1=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)},z1=()=>{let t=globalThis[Kn()];return!!(t&&t.stale&&!t.revalidated)},H1=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},W1=t=>{let e=j1(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 K1,q1,G1,yS=D(()=>{"use strict";ia();K1=()=>globalThis[Symbol.for(co)],q1=(t,e=fs,n,r)=>{let o=K1(),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},G1=()=>{let t=K1();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 Y1,_h,X1,J1,Z1,Q1,bS=D(()=>{"use strict";Y1=Symbol.for("@symbo.ls/fetch:IN_FLIGHT"),_h=()=>globalThis[Y1]||(globalThis[Y1]={count:0,waiters:[]}),X1=()=>{_h().count++},J1=()=>{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()}},Z1=()=>_h().count,Q1=()=>{let t=_h();return t.count===0?Promise.resolve():new Promise(e=>{t.waiters.push(e)})}});var r5,tO,eO=D(()=>{"use strict";ia();r5=(t,e)=>{let n=new URL(t);return n.searchParams.delete("limit"),n.searchParams.sort(),n.toString()+" "+(e||"")},tO=(t,e,n,r=fs)=>{let o=globalThis[Symbol.for(co)],s=o&&o.slices&&o.slices[r5(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:()=>iO,restAdapter:()=>wh,selectQuery:()=>wS,setup:()=>p5,withQuery:()=>tf});var Ql,wS,rO,SS,o5,s5,i5,nO,oO,Je,sO,a5,c5,iO,_S,l5,f5,u5,d5,tf,p5,wh,aO=D(()=>{"use strict";ia();yS();bS();eO();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},rO=t=>Object.prototype.toString.call(t).slice(8,-1),SS=["auto","json","text","blob","arrayBuffer","stream","response"],o5={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},s5=t=>{let e=t.headers.get("content-type");return e&&e.includes("json")?t.json():t.text()},i5=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},nO=(t,e)=>t?.message||t?.error||e.statusText||`HTTP ${e.status}`,oO=(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(", ")}`);X1();try{return await sO(t,e,o,r)}finally{J1()}},sO=async(t,e,n,r)=>{let o=r?await r:null;if(o&&o.seeded===!0){let i=oO(o,n);if(o.taken&&i!==!1){let a=i||await sO(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 s5(s);return{data:i,error:s.ok?null:nO(i,s),status:s.status}}if(!s.ok){let i=await i5(n==="response"?s.clone():s);return{data:n==="response"?s:i,error:nO(i,s),status:s.status}}return{data:await o5[n](s),error:null,status:s.status}},a5=["FormData","Blob","File","URLSearchParams","ReadableStream","ArrayBuffer"],c5=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||a5.includes(rO(t))),iO=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 iO(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},l5={"Content-Type":"application/json"},f5={"Content-Type":void 0},u5=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"}},d5="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()},p5=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=B1(F1(o,s),e,i),l=u5(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===d5)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?tO(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 q1(us(_,B),c.maxAge,()=>g(w,S,A,_,T,O),N=>oO(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(!c5(b))return y({method:_,headers:_S(e,h(),l5,w),body:JSON.stringify(b)});let S={method:_,headers:_S(e,h(),f5,w),body:b};return rO(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 lO={};F(lO,{localAdapter:()=>cO,setup:()=>g5});var Sh,h5,g5,cO,fO=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},h5=(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}},g5=async({data:t,...e})=>cO(t,e),cO=(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 h5(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:()=>S5,createEarlySeedBlock:()=>U1,createEarlySeedScript:()=>W1,default:()=>V5,earlyKey:()=>us,executeFetch:()=>NS,fetchFunctions:()=>F5,fetchPlugin:()=>U5,hasAdapter:()=>w5,initAdapterAuth:()=>Ah,parseDuration:()=>ao,queryClient:()=>$5,registerAdapter:()=>_5,requestsInFlight:()=>Z1,resolveDb:()=>yO,revalidateSeed:()=>B5,seedFromPage:()=>TO,seedIsStale:()=>z1,whenRequestsIdle:()=>Q1,whenSeedTaken:()=>V1});var m5,mO,xh,ps,kh,AS,y5,b5,_5,w5,S5,yO,DS,bO,xn,uO,Ze,Oh,kS,Rh,la,ca,vh,CS,Ch,_O,Ph,wO,x5,Eh,k5,dO,ES,SO,xO,aa,pO,E5,TS,v5,kO,Lh,fa,nf,of,hs,IS,Ah,MS,kn,Gn,ef,sf,A5,OS,mr,Th,RS,yr,hO,EO,br,C5,T5,O5,R5,vS,rf,P5,Dh,vO,PS,LS,AO,CO,L5,D5,I5,M5,TO,N5,NS,$5,gO,F5,B5,j5,U5,V5,Ih=D(()=>{"use strict";M();Mt();ia();yS();lS();aO();ia();bS();m5=["select","rpc","insert","update","upsert","delete","subscribe"],mO={rest:()=>Promise.resolve(xS),local:()=>Promise.resolve().then(()=>(fO(),lO))},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})(),y5=5e3,b5=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,y5)}),_5=(t,e)=>{ps[t]=e;let n=AS[t];if(n&&n.length){AS[t]=[];for(let r of n)r()}},w5=t=>typeof t=="string"&&!!(ps[t]||mO[t]),S5=t=>{let e={};for(let n of m5)t[n]&&(e[n]=t[n]);return e.name=t.name||"custom",e},yO=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]||mO[r];if(!o&&(o=await b5(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,bO=()=>({cache:new Map,subscribers:new Map,active:new Map,invalidatedAt:new Map,mounted:new Set}),xn=bO(),uO=new WeakMap,Ze=t=>{if(!DS(t))return xn;let e=uO.get(t);return e||uO.set(t,e=bO()),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)},_O=(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},wO=t=>!!t.ref&&t.element.__ref===t.ref,x5=({config:t,element:e,context:n})=>{try{return IS(t,e,n)}catch{return null}},Eh=null,k5=()=>{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)wO(i)||s.delete(i)},3e4),Eh.unref&&Eh.unref())};k5();dO=3,ES=t=>Math.min(1e3*2**t,3e4),SO=(t,e)=>{let n=t.retry;return n===void 0&&e?{count:0}:n===!1?{count:0}:n===!0||n===void 0?{count:dO,delay:ES}:typeof n=="number"?{count:n,delay:ES}:{count:n.count??dO,delay:L(n.delay)?n.delay:typeof n.delay=="number"?()=>n.delay:ES}},xO=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},pO=!1,E5=()=>{if(pO||typeof window>"u")return;pO=!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},v5=["insert","update","upsert","delete"],kO=t=>v5.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=yO(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",A5=["Blob","File","ArrayBuffer","ReadableStream","Response"],OS=t=>t!==null&&typeof t=="object"&&(ArrayBuffer.isView(t)||A5.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)},hO=(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)},EO=(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=SO(t,it||kO(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],hO(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=EO(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=xO(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&&vO(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(),hO(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)}},C5=(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"&&T5(t,e,n,s)},T5=(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())},O5=(t,e,n)=>{let r=e.__ref;r.__fetchCleanups||(r.__fetchCleanups=[]),E5();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))}},R5=(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},P5=(t,e)=>{let n=[];for(let r of t.mounted){if(!wO(r)){t.mounted.delete(r);continue}let o=x5(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 P5(t,e)},vO=(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)&&_O(t,n);for(let[n]of t.active)e(n)&&Ch(t,n)},LS=()=>!0,AO=(t,e)=>la(t,e)?.data??void 0,CO=(t,e,n)=>{let r=la(t,e),o=L(n)?n(r?.data):n;ca(t,e,o,null)},L5=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?R5(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 $=SO(t,!0),N=await xO(()=>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&&vO(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}},D5=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=[]},I5=(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},M5=t=>t.on==="create"&&(t.method==="select"||t.method==="rpc")&&!Lh(t)&&!t.infinite&&!sf(t),TO=t=>{let e=t&&t.context;if(!e||!e.fetch||DS(e))return;let n=t.__ref;if(!n||!t.fetch||!G1())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||!M5(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=I5(e.fetch,e);if(!c||!L(c.seeded))return;N5(i,a,c,t,e,n)}},N5=(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=EO(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:()=>D5(a)},a.__effects.push(a.__fetchDisposer));let l=!DS(r);for(let f of i){let u=kO(f.method),d=u?L5:br,p=!u&&!Lh(f)&&f.method!=="subscribe";if(f.on==="create"?d(f,e,r):queueMicrotask(()=>C5({...f,__runner:d},e,r)),p&&f.on==="create"&&(l&&(f.refetchInterval||f.refetchOnWindowFocus!==!1||f.refetchOnReconnect!==!1)&&O5(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})}},$5={invalidateQueries:t=>Dh(xn,rf(t)),removeQueries:t=>{PS(xn,t?rf(t):LS)},getQueryData:t=>AO(xn,t),setQueryData:(t,e)=>{CO(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)||_O(xn,n))}},gO=(t,e)=>k(t)?IS({method:"select",...t},e,e?.context):t,F5={invalidateQueries(t){return Dh(Ze(this?.context),rf(t))},removeQueries(t){PS(Ze(this?.context),t?rf(t):LS)},getQueryData(t){return AO(Ze(this?.context),gO(t,this))},setQueryData(t,e){CO(Ze(this?.context),gO(t,this),e)}},B5=async t=>{let e=await H1();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(j5(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}},j5=(t,e)=>{if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}},U5={name:"fetch",init(t){t.fetch&&TO(t)},create(t){let e=t.fetch;e&&(t.parent||Ze(t.context).active.clear(),NS(e,t,t.state,t.context))}},V5=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 RO(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=OO();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=OO()),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=
|
|
23
|
-
${
|
|
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
|
-
`):""},
|
|
26
|
-
${
|
|
27
|
-
}`,
|
|
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}`},
|
|
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 tx,FO=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,BO=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,jO=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,UO=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,VO=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 zO,An,fx=D(()=>{"use strict";zO=new Set,An=t=>{zO.has(t)||(zO.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;if((e.provider||"kv")==="api")return tR(t,e);let r=await L6(t,e);return r||tR(t,e)}async function L6(t,e={}){let n=e.kvBaseUrl||t6,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 tR(t,e={}){let n=e.apiBaseUrl||e6,{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 eR(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 eR(sR(r),e);return o?{library:o,ignoreList:r.ignoreList}:null}return eR(r,e)}))).filter(Boolean)}var ux,t6,e6,_a,nR,n6,r6,HO,Kh,WO,rR,o6,oR,s6,Af,hx,Ne,sR,dx,gx,i6,a6,mx,yx,iR,KO,ws,bx,c6,po,l6,aR,cR,qO,f6,u6,d6,p6,GO,qh,h6,lR,px,g6,m6,YO,y6,b6,_6,w6,Gh,_x,S6,x6,k6,XO,Cf,E6,vf,Yh,wa,Sa,JO,Xh,Ef,v6,A6,ZO,QO,Tf,C6,T6,O6,R6,P6,fR,uR,Of,xs,Rf,Jh=D(()=>{"use strict";Wt();es();Il();jn();fx();ux="system",t6="https://smbls-kv.nika-980.workers.dev",e6="https://api.symbols.app";_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])}},nR=(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]=nR(t[i],e,a))}return s},n6=new Set,r6=new Set(["components","pages","functions","snippets","methods"]),HO=(t,e)=>e===""&&r6.has(t),Kh=["fontFamily","fontfamily","font_family","FONT_FAMILY"],WO=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},rR=(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)}},o6=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},oR=(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)}},s6=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=>s6(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),sR=t=>t.library!==void 0?t.library:t.key??t.name,dx=new Set,gx=()=>{dx.clear()},i6=(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.`)}},a6=(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"],iR=["components","pages"],KO=Symbol.for("smbls.libraryScope"),ws="__libraryScopes",bx=new Map,c6=()=>Math.random().toString(36).slice(2,10)+Date.now().toString(36).slice(-4),po=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l6=/const __scope = |const __peers_* = |const _s_* = el\?\.scope|\?\.context\?\.globalScope\?\./,aR=t=>{try{return Me(t)}catch{return null}},cR=t=>{if(typeof t!="function")return null;let e=aR(t);return v(e)&&l6.test(e)&&se(e)?e:null},qO=t=>v(t)&&se(t)||cR(t)!==null,f6=t=>{let e=t.globalScope;return k(e)&&Object.keys(e).some(n=>qO(e[n]))?!0:yx.some(n=>{let r=t[n];return!!r&&typeof r=="object"&&Object.keys(r).some(o=>qO(r[o]))})},u6=(t,e,n)=>{let r=t.globalScope,o=e.globalScope;if(n.has("globalScope")||!k(r)||!k(o)||!f6(e))return 0;let s=0;for(let i of Object.keys(o))n.has(`globalScope/${i}`)||po(r,i)&&s++;return s},d6=[[/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)?."]],p6=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("")},GO=(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 d6){let i=p6(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 GO(t,e);let n=cR(t);return n===null?t:GO(n,e)},h6={lazy:!0,window:globalThis},lR=(t,e)=>{let n=qh(t,e);if(n===t||!v(n))return n;try{let r=be({v:n},{},h6).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},g6=(t,e)=>{let n=new WeakMap,r=o=>{if(v(o)||typeof o=="function")return lR(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)},m6=(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]=lR(s[a],e);n[o]=i}for(let o of iR)px(t[o])&&(n[o]=g6(t[o],e));return n},YO=new WeakMap,y6=(t,e,n)=>{let r=YO.get(t);r||YO.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},b6=t=>!!t&&typeof t=="object"&&!!t.__raw&&typeof t.__raw=="object",_6=(t,e)=>{let n=bx.get(t);return n?e===n.consumerGs?n.libGs:b6(e)?y6(e,n.libGs,n.consumerGs):e:e},w6=()=>{typeof globalThis[KO]!="function"&&Object.defineProperty(globalThis,KO,{value:_6,configurable:!0})},Gh=t=>{let e=t[ws];return Array.isArray(e)?e:null},_x=t=>Ne(t)?t.library:t,S6=(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)&&x6(t,o.id))},x6=(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,...iR])if(o(t[s]))return!0;return!1},k6=(t,e)=>{let n={};for(let r of Object.keys(t))n[r]=qh(t[r],e);return n},XO=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=XO.get(r);s||XO.set(r,s=new Set),w6();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"?aR(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(k6(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},E6=/^@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&&!E6.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}".`)},JO=["functions","methods","snippets"],Xh=Symbol.for("smbls.libraryPackages"),Ef=new WeakMap,v6=t=>!!t&&typeof t=="object"&&!Array.isArray(t),A6=t=>({get globalScope(){return t()}}),ZO=(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:A6(e)}),Ef.set(r,n),r},QO=t=>!v6(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 JO){let o=t[r];QO(o)||Ef.get(o)===t||(t[r]=ZO(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 JO)QO(a[u])||(f[u]=ZO(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{}}},C6=(t,e,n,r="library",o=-1)=>{let s=mx(e,n),i=!S6(t,o,e)&&u6(t,e,s)>0?`${r}#${c6()}`:null,a=i?m6(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]?HO(f,t[f][u])&&!HO(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"?a6(u,s,l):u;t[f]=nR(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&&i6(r,l)},T6=(t,e,n)=>{if(t!==e){let r=sR(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}]`},O6=`${ux}/default`,R6=t=>v(t)&&t!==""&&Ss(t).full===O6,P6=(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},fR=t=>{let e=[],n=[];for(let r=0;r<t.length;r++){let o=t[r],s=o,i=n6;if(Ne(s)&&(i=Af(s.ignoreList),s=s.library),!k(s))continue;let a={entry:o,lib:s,ignore:i,index:r};R6(P6(o,s))?n.push(a):e.push(a)}return{linked:e,bases:n}},uR=(t,e,n)=>{let r=e(),o=WO(r),s=o6(r),{linked:i,bases:a}=fR(t);for(let f of i)n(f);let c=!o.size&&a.length?WO(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}=uR(e,()=>t.designSystem,({entry:s,lib:i,ignore:a,index:c})=>C6(t,i,a,T6(s,i,c),c));t.designSystem!==n&&(t.designSystem={...t.designSystem}),oR(t.designSystem,o),r&&rR(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}=fR(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}=uR(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 oR(t,o),r&&rR(t,r),t}});function vs(t,e){if(!e||typeof e!="object")return t;let n=o=>!j6(o)||!Object.prototype.hasOwnProperty.call(e,o)?o:tg(e[o])||o,r={...t};for(let[o,s]of Object.entries(r))U6.has(o)?r[o]=Array.isArray(s)?s.map(i=>pR(i,n)):pR(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 V6(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 z6(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=V6(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 hR(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=hR(a),l=new Set(Object.keys(c)),f=t.app?.metadata||{},u=hR(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=z6(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,D6,Zh,Mf,xx,Nf,$f,Ff,I6,kx,Ex,Qh,vx,ds,M6,Ax,dR,Cn,N6,$6,ka,ks,ho,Es,F6,B6,Cx,j6,Lf,tg,U6,pR,gR=D(()=>{"use strict";Wt();ea();Jh();El();U=t=>{if(t==null)return"";let e={"&":"&","<":"<",">":">",'"':""","'":"'"};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"]',D6=/^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"?D6.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"]',I6=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=>I6(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}},M6=/<script\b(?:[^>"']|"[^"]*"|'[^']*')*\btype\s*=\s*["']?importmap["']?(?:[^>"']|"[^"]*"|'[^']*')*>[\s\S]*?<\/script\s*>/gi,Ax=(t,e)=>{let n=-1;for(let r of String(t).matchAll(M6))n=r.index+r[0].length;return n===-1?null:t.slice(0,n)+`
|
|
36
|
-
`+e+t.slice(n)},
|
|
37
|
-
`)},j6=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},U6=new Set(["icon","favicon","icons","favicons"]),pR=(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,mR=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 yR,bR,H6,wR,_R,W6,ng,K6,rg,Nx,$x,og,jf,SR=D(()=>{"use strict";Wt();Jh();Mx();fx();yR=/[A-Za-z_$][A-Za-z0-9_$-]*/g,bR=/[A-Za-z_$][A-Za-z0-9_$]*(?: [A-Za-z0-9_$]+){1,5}/g,H6=(t,e)=>{yR.lastIndex=0;let n;for(;n=yR.exec(t);){let o=n[0];if(e.add(o),o.indexOf("-")!==-1)for(let s of o.split("-"))s&&e.add(s)}bR.lastIndex=0;let r;for(;r=bR.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},wR=t=>Ne(t)?t.library:t,_R=["components","pages","snippets"],W6=["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)},K6=/^\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 W6){let s=r[o];if(typeof s=="string"&&K6.test(s))return!0}for(let o of Object.keys(r))if(n(r[o]))return!0;return!1};for(let r of _R)if(n(t[r]))return!0;for(let r of t.sharedLibraries||[]){let o=wR(r);if(k(o)){for(let s of _R)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=wR(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=H6(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 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 An("createPrunedLibraryIconLoader"),null;let r=new Map,o=s=>{let i=r.get(s);return i||(i=Promise.resolve().then(()=>xa(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}},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,xR=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,kR=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:()=>_1,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:()=>x1,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:()=>RO,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();m1();y1();wl();ul();b1();Lw();Bw();Yw();Zp();T1();M1();es();N1();LO();cS();DO();iS();IO();X_();MO();NO();$O();FO();BO();jO();UO();VO();gR();mR();Jh();SR();Mx();xR();kR()});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 Eq,Gd,vq,nB,rB=D(()=>{bb();eB();Eq=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:vq(t.substring(1),e)}:Hd[n]?t.length>1?{type:Hd[n],data:t.substring(1)}:{type:Hd[n]}:Wd},vq=(t,e)=>{if(Eq){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 Aq(t)}function Aq(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=Cq.bind(pe),t.clearTimeoutFn=Tq.bind(pe)):(t.setTimeoutFn=pe.setTimeout.bind(pe),t.clearTimeoutFn=pe.clearTimeout.bind(pe))}function fB(t){return typeof t=="string"?Rq(t):Math.ceil((t.byteLength||t.size)*Oq)}function Rq(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 Cq,Tq,Oq,Ci=D(()=>{Ai();Cq=pe.setTimeout,Tq=pe.clearTimeout;Oq=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 Pq(){}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,Lq,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=Pq,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)}}Lq=(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=Lq&&!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=Dq.exec(t||""),s={},i=14;for(;i--;)s[Iq[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=Mq(s,s.path),s.queryKey=Nq(s,s.query),s}function Mq(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 Nq(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,s){o&&(n[o]=s)}),n}var Dq,Iq,DC=D(()=>{Dq=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Iq=["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 Ipt,Tb=D(()=>{MC();MC();Yd();LC();Ci();DC();Ai();_B();Eb();Eb();vb();vb();RC();Ipt=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 $q&&(t instanceof ArrayBuffer||Fq(t))||Bq&&t instanceof Blob||jq&&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 $q,Fq,xB,Bq,jq,NC=D(()=>{$q=typeof ArrayBuffer=="function",Fq=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,xB=Object.prototype.toString,Bq=typeof Blob=="function"||typeof Blob<"u"&&xB.call(Blob)==="[object BlobConstructor]",jq=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((Qpt,AB)=>{var qc=1e3,Gc=qc*60,Yc=Gc*60,Ri=Yc*24,Uq=Ri*7,Vq=Ri*365.25;AB.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return zq(t);if(n==="number"&&isFinite(t))return e.long?Wq(t):Hq(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function zq(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*Vq;case"weeks":case"week":case"w":return n*Uq;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 Hq(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 Wq(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((tht,TB)=>{function Kq(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=Kq});var RB=Qb((Re,Rb)=>{Re.formatArgs=Gq;Re.save=Yq;Re.load=Xq;Re.useColors=qq;Re.storage=Jq();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 qq(){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 Gq(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 Yq(t){try{t?Re.storage.setItem("debug",t):Re.storage.removeItem("debug")}catch{}}function Xq(){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 Jq(){try{return localStorage}catch{}}Rb.exports=OB()(Re);var{formatters:Zq}=Rb.exports;Zq.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:()=>nG,protocol:()=>zC});function Qq(t){return typeof t=="string"}function tG(t){return t===void 0||DB(t)}function Pb(t){return Object.prototype.toString.call(t)==="[object Object]"}function eG(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 nG(t){return Qq(t.nsp)&&tG(t.id)&&eG(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 rG,Pi,KC=D(()=>{Lb();WC();vi();rG=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(rG.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:()=>wH,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:()=>XT,__resetBuiltinMethodWarnings:()=>gx,__resetSignalEngine:()=>y_,__resetSignalInstances:()=>g_,__resetSkinWarnings:()=>B0,__resetStateShadowWarnings:()=>YT,activateConfig:()=>TR,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:()=>yX,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:()=>_X,createSnapshotId:()=>Ll,createState:()=>Xk,createStore:()=>lr,createSync:()=>bX,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:()=>OH,exetuteClassPerComponent:()=>Zz,exposeBagGlobalScopes:()=>Tf,extendCachedRegistry:()=>Mw,extendStackRegistry:()=>Bl,extractArrayExtend:()=>Ul,extractConditionalAttrs:()=>oE,faviconLinkKey:()=>ho,fetchLibraryData:()=>xa,fibonacciNumberByIndex:()=>nx,fileEntryUrl:()=>tg,filterArrays:()=>L_,filterArraysFast:()=>D_,filterAttributesByTagName:()=>TH,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:()=>CR,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:()=>AR,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:()=>ZK,setClassname:()=>Qz,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:()=>JK,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:()=>FP,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:()=>TR,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:()=>ER,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:()=>CR,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:()=>AR,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:()=>vR,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"],y4=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),b4=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${Wi.filter(t=>t!=="auto").map(y4).join("|")})$`),fl=t=>b4.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)/,q6=/^(?:#[0-9a-f]{3,8}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix|light-dark)\([\s\S]*\))$/i,Os=t=>q6.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&&!G6(t,o,s,e))return!1;o=s+1}}return!0},G6=(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=Y6(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)},Y6=(t,e,n,r,o)=>t?Ft(t)?`var(${t})`:Os(t)||n!==void 0&&n.has(t)?t:e(t,r,o):"",X6=/^([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(X6);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(`,
|
|
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={"&":"&","<":"<",">":">",'"':""","'":"'"};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?`
|
|
@@ -43,23 +43,23 @@ FROM ${a}${l}`},Y5=t=>{let e=[],n=(r,o)=>{for(let s in r){let i=o?`${o}/${s}`:s;
|
|
|
43
43
|
font-display: ${r.fontDisplay};`:""}${r.unicodeRange?`
|
|
44
44
|
unicode-range: ${r.unicodeRange};`:""}
|
|
45
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:()=>ER,font:()=>Gx,fontFace:()=>Jx,fontFamily:()=>Yx,fontFamilyTypes:()=>Xx,gradient:()=>e0,grid:()=>p0,icons:()=>o0,media:()=>Zx,reset:()=>vR,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 J6={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=J6;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 Z6={base:Xf.base,type:"spacing",ratio:Er.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Qx=Z6;var t0={},e0={};var n0={};var r0={};var o0={},s0={};var Q6={default:150,base:150,type:"timing",ratio:Er["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},i0=Q6;var ER={};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 tU={},p0=tU;var h0={};var vR={},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},AR=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},CR=t=>t?yo(t):null;mo(Ls);yo(Ls);var Jf=pt(Ls),$e={active:"0",0:Ls},TR=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},eU=["useReset","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig"],nU=["useVariable","globalTheme","verbose"],rU=[["fontfamily","fontFamily","font_family"],["fontfamilytypes","fontFamilyTypes"],["semanticicons","semanticIcons"],["svgdata","svgData","svg_data"]],Ia=t=>{for(let e of rU){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)}},OR=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=()=>OR(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 eU)delete o[i];for(let i of nU)Object.prototype.hasOwnProperty.call(Jf,i)?o[i]=Jf[i]:delete o[i];let s=OR(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"},oU=Object.keys(rn).reduce((t,e)=>(t[rn[e]]=Number(e),t),{}),sU=(t,e,n,r)=>{if(Rn.test(e)){if(t&&Object.keys(t).length)return t[e]!==void 0;let o=oU[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=RR.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",iU=(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},aU=(t,e)=>t.indexOf(S0)===-1?t:t.replace(/\u0000(\d+)\u0000/g,(n,r)=>e[Number(r)]),cU=/^(calc|min|max|clamp)\((.*)\)$/,lU=(t,e)=>{let n=cU.exec(t);return n?`${n[1]}(${su(n[2],e)})`:t.indexOf("(")!==-1?t:Ds(t,e)},RR=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),eu=(t,e)=>{let{base:n,type:r,unit:o}=e,s=RR.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(PR,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)})},PR=1.618,fU=(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(PR,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=fU(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?sU(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 iU(t,o).split(r).map(i=>{let a=aU(i,o),c=a.trim();return!c||["+","-","*","/",","].includes(c)?a:lU(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})`},LR=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=LR.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=LR.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 IR=pr(),cu=t=>{let e=P(),n="";for(let r in t)e.__svgCache[r]||(e.__svgCache[r]=!0,n+=t[r]);return n},uU=t=>{let e=t&&(t.default||t);if(!v(e))return IR&&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},{}):{}},dU=(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},DR=new Set,lu=(t,e)=>{let n=e&&e.default?e.default:e;if(!v(n))return IR&&!DR.has(t)&&(DR.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=uU(e),{width:s,height:i}=o,a=o.viewBox||`0 0 ${s||24} ${i||24}`,f=dU(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=gU(f),f},pU="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",hU=new RegExp(`<(${pU})\\b([^>]*?)\\s*/>`,"g"),gU=t=>t.replace(hU,"<$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,FR=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"]),BR=["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"],jR=new Set(BR.map(t=>t.toLowerCase())),mU=new Set(BR),v0=0,Is=t=>{v0++;try{return t()}finally{v0--}},yU=/(^|[^\w-])(not\s+)?\(\s*forced-colors\s*(?::\s*(active|none)\s*)?\)/i,Ms=t=>{if(!v(t))return!1;let e=t.match(yU);return!e||e[2]||e[3]&&e[3].toLowerCase()==="none"?!1:!/^\s*(?:@media\s+)?not\b/i.test(t)},UR=t=>v0>0||mU.has(t),Ns=t=>v(t)&&jR.has(t.toLowerCase())&&UR(t),bU=/^(?:#[0-9a-f]{3,8}$|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color|color-mix)\()/i,_U=/gradient\(|url\(|image-set\(|var\(/i,wU=new Set(["transparent","currentColor","currentcolor"]),wo=t=>{if(!v(t))return!1;let e=t.trim();return _U.test(e)?!1:bU.test(e)?!0:FR.has(e)||wU.has(e)},Tg=new Set,MR=t=>{if(!t)return!1;let{color:e,gradient:n}=t;return!!(k(e)&&Object.keys(e).length||k(n)&&Object.keys(n).length)},NR=new Set,A0=0,$s=t=>{A0++;try{return t()}finally{A0--}},SU=(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=SU(t,n);if(r){if(!NR.has(t)){NR.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)&&MR(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=jR.has(s);if(!FR.has(s)&&!i||i&&UR(e)||!MR(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.`)}},VR=(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?VR(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})`},$R=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}},xU=(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 $R(t);if(v(c)){let d;if(on.has(s))d=$R(c);else{on.add(s);try{d=Fs(c,r,n)}finally{on.delete(s)}}return d?xU(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}},zR=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||!zR(t[n])))return null;let e=So(t);return e.length?e:null},kU=t=>v(t&&t.var)&&T0(t)!==null,EU=(t,e,n,r,o)=>{let s=T0(e);if(!s)return;if(v(e.var)){let c=`var(${e.var})`;return n||r?VR(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=EU(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(zR(t))return r.useVariable&&t.var&&(r.cssVars[t.var]=t.value),t;if(!r.useVariable&&kU(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}},vU=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"||vU.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 HR=new Set,qt=(t,e)=>{if(HR.has(t)||(HR.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 AU=t=>{let n=P().spacing||{},r=parseFloat(t.spacingRatio),o={...n,ratio:Number.isFinite(r)?r:n.ratio,sequence:{},scales:{}};return we(o),o},CU=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),CU(e)},TU=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=TU(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=AU(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 OU={commas:!0},Us=(t,e,n)=>v(t)?xr(t,RU,OU,e,n):t,RU=(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 PU=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),LU={commas:!1,keywords:PU},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,DU,LU,e,n)},DU=(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 IU=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"]),WR=["color","Color","background","Background","fill","Fill","stroke","Stroke"],YR=t=>{for(let e=0;e<WR.length;e++)if(t.includes(WR[e]))return!0;return!1},MU={boxShadow:Us,textShadow:Us,border:ce,borderTop:ce,borderRight:ce,borderBottom:ce,borderLeft:ce,outline:ce,columnRule:ce},NU=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},KR=new Set,$U=(t,e,n,r,o,s)=>{if(!tt())return;let i=`${t}::${e}::${n||""}::${r}`;KR.has(i)||(KR.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=MU[e];if(!o)return dt(n,r);let s=null,i=o(n,r,a=>{!s&&NU(a)&&(s=a)});return s&&$U(t,e,r,n,i,s),i},D0=(t,e)=>sn(t,e),FU=t=>k(t)&&V(t.value),BU=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 FU(t)?!n.useVariable&&BU(t)?t:Fa(t.value,e):Fa(t,e)},XR=(t,e)=>{let n=new Set;for(let r of e){let o=r.slice(0,1);if(!(o==="@"||o==="."||o===":")&&YR(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)&&!IU.has(a)&&n.add(s)}}return n},JR=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},qR=(t,e,n,r,o)=>yu(t,Or(r,o,s=>({[e]:n[s]}))),ZR=(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(YR(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");qR(o,t,e,c,r)}else n!==void 0&&(o[t]=n),qR(o,t,e,s,r);return o},jU=new Set(["backdropFilter","WebkitBackdropFilter"]),QR=new WeakSet,tP=(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=XR(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]=tP(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=ZR(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=XR(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(jU.has(u)){let _=ZR(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)JR(u)&&V(c[u])&&QR.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=tP(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(JR(r)&&(e||QR.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},eP=(t,e)=>{let n=e.shift();return t[n]?eP(t[n],e):t},GR=(t,e)=>I(e)?eP(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=GR(s,o):s&&e&&(s=GR(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}},oP=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"]),UU=t=>oP.has(t.toLowerCase())||/[\s,'"(]/.test(t.trim()),nP=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(!UU(t))return pr()&&!nP.has(t)&&(nP.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)},rP=t=>{let e=t.trim(),n=e.replace(/^(['"])(.*)\1$/,"$2").trim(),r=n.replace(/\s+/g," ").toLowerCase();return n!==e&&oP.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(rP(g));for(let p of String(o[i]??"").split(",")){let g=p.trim();if(!l(g))continue;let h=rP(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},sP=new WeakMap,iP=new WeakMap,VU=128,aP=1048576,I0=8192,$0=t=>t.nodeType===1&&t.localName==="symbol"&&t.getAttribute("id"),fP=t=>t.nodeType===8||t.nodeType===3&&!t.textContent.trim(),zU=(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},HU=(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];dP(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];dP(r,e)},uP=(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},WU=t=>{let e=t&&t.defaultView;return e&&typeof e.DOMParser=="function"?e.DOMParser:typeof DOMParser<"u"?DOMParser:null},KU=(t,e)=>{let n=WU(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},qU=(t,e,n)=>{let r=String(n),o=iP.get(e),s=o?.entries.get(r);if(s)return o.entries.delete(r),o.entries.set(r,s),s.root;let i=KU(t,r);if(i||(i=uP(t,{isRoot:!1}),i.innerHTML=r),r.length>aP)return i;let a=zU(i,I0);if(a>I0)return i;for(o||(o={entries:new Map,units:0,nodes:0},iP.set(e,o));o.entries.size>=VU||o.units+r.length>aP||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},cP=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},GU=t=>t.replace(/["\\\u0000-\u001f\u007f]/g,e=>`\\${e.charCodeAt(0).toString(16)} `),lP=(t,e,n,r)=>{let o=0,s=e.childElementCount>8?cP(n):null,i=a=>{if(!s)try{return[...n.querySelectorAll(`symbol[id="${GU(a)}"]`)].filter(c=>c.parentNode===n)}catch{s=cP(n)}return s.get(a)};for(let a of e.childNodes){if(fP(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])}},dP=(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||uP(r);if(!i||!i.nodeType)return;let a=d=>qU(r,i,d),c=a(s),l=sP.get(i);l||sP.set(i,l=new WeakMap);let f=l.get(n);if(f||l.set(n,f=new Map),[...c.childNodes].some(d=>!fP(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}),lP(r,d.length===1?c:a(t[p]),i,g),g.complete=!0}}else{lP(r,c,i);for(let d in t)f.has(d)||f.set(d,{nodes:[],complete:!0})}o||HU(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 YU=new Set(["fallback"]),F0=new Set,pP=(t,e)=>{F0.has(t)||(F0.add(t),tt()&&console.warn(e))},B0=()=>{F0.clear()},hP=t=>{for(let e in t)delete t[e];return t},Cu=()=>{let t=P(),e=k(t.cssSkinVars)?hP(t.cssSkinVars):t.cssSkinVars={},n=k(t.cssSkinFallback)?hP(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(YU.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)&&pP(`${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]||(pP(`${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},gP=(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[gP(s,n)]=t[s];let o={};for(let s in e||{}){let i=t[e[s]];i&&(o[gP(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=XU(t,e,n);if(r!==void 0)return r}return j0(t,e)},XU=(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,ZU,JU,e),JU={commas:!0,keywords:new Set(["inset","none"])},ZU=(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"]),QU=(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=>QU(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}),tV=(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?tV(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)},mP=(t,e,n)=>{if(!(!t||!e)){za(t),t.__prefersListener=n,t.__prefersMq=e;try{e.addEventListener("change",n)}catch{e.addListener(n)}}},eV=(t,e)=>{let n=P(),{cssVars:r}=n,o=e.startsWith("--")?e:`--${e}`;return r[o]=t,t},le=t=>t,nV=(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:eV,sizes:nV,shape:le,skins:le,viewTransition:le},rV=(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)?rV(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",mP(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,mP(t,a,i)}else za(t),o.setAttribute("data-theme","light"),t.resolvedTheme="light",o.style.colorScheme="light",o[Va]=t},oV={},Ks=(t,e=oV)=>{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"],sV=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},iV=t=>t.startsWith("__")||sV.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(!iV(s)&&(o[s]=r(t[s]),n))return null;return o},aV=(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&&!aV(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),cV=(()=>{let t=z("border","width style color image");for(let e of G0.split(" "))t.push("border-"+e,...z("border-"+e,Lr));return t})(),yP=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:cV};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"]=yP("block");vt["border-inline"]=yP("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 lV="block-start block-end inline-start inline-end".split(" ");for(let t of lV)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,bP=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,bP(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)?bP(e):0}var fV=/^(?: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)$/,_P=/^(?:border(?:-(?:top|right|bottom|left|block|inline)(?:-(?:start|end))?)?|outline|column-rule)$/,uV=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(fV.test(t))return!0;if(!_P.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=>uV.has(s.toLowerCase()))}var dV=new Set(["thin","medium","thick"]),pV=t=>/^[+-]?\.?\d/.test(t)||dV.has(t.toLowerCase())||/^(?:calc|min|max|clamp)\(/i.test(t)||/^var\(--(?:[a-zA-Z0-9]{1,6}-)?spacing-/.test(t),hV=t=>t==="transparent"||t==="currentcolor"||Object.prototype.hasOwnProperty.call(Aa,t),gV=t=>Os(t)||/^var\(--(?:(?!theme-|shadow-)[a-zA-Z0-9]{1,6}-)?color-/.test(t)||hV(t.toLowerCase()),mV=/-(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(_P.test(t)){if(n.indexOf("border-image")===0)return!1;let o=mV.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(pV)}if(t==="background"&&n==="background-color"){let o=K0(e);return o.length===1&&gV(o[0])}return!1}var Xa=new Map,DP=null,Y0=null,yV=null;function $u(t){t.batchAtomicCss&&(Y0=t.batchAtomicCss),t.compoundCssClass&&(yV=t.compoundCssClass)}var bV=new Set,SP=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&&bV.add(t)}function Xn(){try{let t=P();if(t){if(SP(t.__domDocument))return t.__domDocument;if(SP(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 _V(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 wV(){try{let t=LV();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 SV(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")}.
|
|
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
52
|
emitted : ${JSON.stringify(ke)}
|
|
53
|
-
sheets : the style[data-smbls] tiers currently hold ${
|
|
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
|
|
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(vP(o[f],o[f+1],e));let l=[];for(let f=0;f<a.length;f++)l.push($V(a[f][0],a[f][1],e,r));return i.concat(l).join(" ").trim()}var LP=new Map,IV=/^&?:(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 MV(t){return typeof t!="string"||!t||Ja(t)?!1:Ir(t).every(e=>IV.test(e))}var $P=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 NV(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)||!$P(s)||n.length>nk||++r>rk)))return n.push(s),s})}}function $V(t,e,n,r){let o=NV(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 _=LP.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=MV(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):$P(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 LP.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+=EP(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+=EP(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 FP(){Xa.clear(),lk.clear(),DP=null,ok=!1}function dk(){return Xa.size}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,FV={passive:!0},BV={passive:!0,capture:!0},zP=(t,e)=>sm.has(t)?e?BV:FV: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 jV(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);jV(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 UV=/^[A-Za-z_$][\w$]*$/;function zu(t,e){return typeof e!="string"||!UV.test(e)?e:function(r){return t.call(e,r)}}function VV(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 zV(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 HV(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=HV(o,a,i));let l=!om.has(t)&&VV(t)&&!WP(r),f=l?null:zV(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 WV(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 KV(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,qV=/^[@[.#&:>*~+]/,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 GV(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:qV.test(s)?(UP(n,`names "${s}", which is not a media query`),null):s}function YV(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=WV(e,n,t.eventName);if(!o||t.target==="mediaQuery"&&t.eventName!=="change"||t.target==="mediaQuery"&&(o.query=GV(e,o.query),!o.query))return;let s=KV(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(!YV(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&&XV(e,i,d,()=>l)}function XV(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"),JV=new Set(["inView","leaveView"]),ZV=new Set(["bridgeMount","bridgeUpdate","bridgeDestroy"]),nc=new WeakMap,qP=new WeakMap,wk=!1,yk=t=>t!==null&&typeof t=="object"&&t.always===!0;function QV(t){let e=am(t);return JV.has(e)?!0:Jn.has(e)&&!ZV.has(e)}var GP=new Set;function tz(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 rz(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 ez(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 nz(t,e,n){let r=yk(e),o=!r&&wk&&typeof e=="function"&&nc.has(e);if(!r&&!o&&!yk(n))return mk;if(!QV(t))return tz(t),mk;let s=r?_k(e):o?e:null;return s?ez(s,n):_k(n)}function YP(t,e,n,r){if(!ln(e))return!1;let o=nz(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 rz(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]:oz(i):o}function oz(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 sz=1e-6,XP=new WeakMap;function iz(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=>az(a,l),c)}catch{return null}return s.set(i,a),a}function az(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-sz;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){cz(f)}}}}}function cz(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=iz(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"],lz=["none","forwards","backwards","both"],fz=["normal","reverse","alternate","alternate-reverse"],uz=["running","paused"],dz=/^(?: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*\))$/,pz=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=>dz.test(r.replace(/\s+/g,"")))},tL=t=>/^(?:\s*0[a-z%]*)+\s*$/.test(String(t).toLowerCase())||/^(none|initial|unset)$/.test(String(t).trim().toLowerCase()),hz={transform:pz,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},gz=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},mz=t=>{if(!k(t))return null;let e=null,n=-1;for(let r in t){let o=gz(r);o==null||!k(t[r])||o>=n&&(n=o,e=t[r])}return e},yz=t=>{let e=mz(t);if(!e)return!1;let n=Object.keys(e);if(!n.length)return!1;for(let r of n){let o=hz[r];if(!o)return!1;let s=e[r];if(s==null||typeof s=="object"||typeof s=="function"||!o(s))return!1}return!0},bz=(t,e)=>{if(k(t))return t;let{animation:n}=e.context&&e.context.designSystem||{},r=n&&n[t];return k(r)?r:null},_z=["reverse","alternate","alternate-reverse"],oL=(t,e,n)=>{let r=n||e.animationDirection;return r&&_z.includes(String(r))?"both":yz(bz(t,e))?"backwards":"both"},wz=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-${wz++}`,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,Sz=/^(?:\d+(?:\.\d*)?|\.\d+)$/,iL=/^(?:cubic-bezier|steps|linear)\(/,xz=/^(?:calc|min|max|clamp)\(/,kz=t=>t.includes("(")||t.startsWith("--"),Ez=(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]])},vz=t=>{if(!v(t))return!1;let e=t.trim();return rL.includes(e)||iL.test(e)||e.startsWith("var(")},Az=(t,e)=>!!e&&vz(e[t]||e[wr(t)]),Cz=["duration","timingFunction","delay","iterationCount","direction","fillMode","playState"],Tz=t=>ut(String(t)),Oz=(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 Tz(t))e&&e[u]?o=u:sL.test(u)||Ez(u,n)?a("duration",u)||a("delay",u):rL.includes(u)||Az(u,n)?c("timingFunction",u):iL.test(u)?a("timingFunction",u):u==="infinite"?c("iterationCount",u):Sz.test(u)?a("iterationCount",Number(u)):fz.includes(u)?c("direction",u):lz.includes(u)?c("fillMode",u):uz.includes(u)?c("playState",u):kz(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=Cz.find(p=>r[p]==null);if(!d)break;r[d]=u.startsWith("--")?`var(${u})`:u,f.add(d)}return{name:l,...r,opaqueSlots:f}},Rz=(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=>Oz(o,n,r))},nL=(t,e)=>sL.test(t)||e&&!xz.test(t)&&!/^(?:var|env)\(/.test(t)?t:Se(t).timing||t,Pz=(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}},Lz={animationName:"none",animationPlayState:"running",animationDirection:"normal"},Dz=(t,e)=>{let n=t.map(o=>Pz(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??Lz[o]).join(", "))}return r},kk={animation:(t,e)=>{if(t!=null){if(v(t)&&/[\s,]/.test(t)){let n=Rz(t,e);if(n.length)return Dz(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 Iz=/(^|[^\w.-])([A-Za-z_][\w-]*)/g,cL=t=>{if(!v(t))return t;let e=P().sizes;return e?t.replace(Iz,(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",Mz=new Set(["window","media"]),fL=/^-?[A-Za-z_][\w-]*$/,uL=new Set(["none","and","or","not","initial","inherit","unset","revert","revert-layer","default"]),Nz=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||Mz.has(n)?null:n==="container"?Nz(e)||lL:fL.test(n)&&!uL.has(n)?n:null},$z=/^@media\s+/i,Fz=/^(?:only\s+)?(?:screen|all)\s+and\s+/i,Bz=/(?:^|[^\w-])(?:(?:min|max)-)?(?:width|inline-size)(?![\w-])/i,jz=/height|block-size|aspect-ratio|orientation|device-|resolution/i,Pk=t=>{if(typeof t!="string")return null;let e=t.trim().replace($z,"").replace(Fz,"").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||!Bz.test(s)||jz.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 Uz=/^[a-z][0-9]?$/,dL=/var\(\s*(--[A-Za-z0-9-]+)/g,Vz=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}},zz=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"&&zz.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),Hz=(t,e)=>{if(!e.size)return[];let n=o=>e.has(o),r=Ik(t,o=>Mk(o,n));return r?[...new Set(r)]:[]},Wz=(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(!Uz.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}=Vz(r);if(!o.size&&!s.size)return;let i=Hz(e,o),a=Wz(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 Kz=/^\[data-theme=(?:"([^"]+)"|'([^']+)')\]$/,qz=(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(Kz),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},Gz=(t,e,n)=>{let r=t.slice(1),o=Nk(r,n);if(o===void 0&&(o=!!n[r]),!!o)return ee(e,n)},Yz=(t,e,n)=>({[t]:e}),Xz=(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)},Jz=(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={"@":qz,":":Ku,"[":Ku,"*":Ku,"+":Ku,"~":Ku,"&":gL,">":gL,$:Gz,"-":Yz,".":Xz,"!":Jz};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},Zz=(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)},Qz=(t,e)=>{let n=_L(t);return typeof e=="function"?e(n):Ue(n)};M();var wL=/\s*!important\s*$/,tH=()=>{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))}},eH=(t,e)=>{let n=String(t).split(Dk);for(let r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},nH=(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,rH=(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}"`))},oH=(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(eH(o,s))return!1;n=!0}}return n},sH=(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||nH(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(!oH(c,a))return rH(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=sH(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,tH());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){iH(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 iH(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"]),aH=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 aH.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 cH(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&&cH(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 lH=(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 fH(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,fH(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,lH(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),uH=new Set,zL=t=>VL(Kk,t)&&!(Yi||uH).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 dH(...t){return Gk(this,"warn",t),mf.apply(this,t)}function pH(...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:dH,error:pH,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 hH(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=hH(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",gH(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 gH(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=yH(t,e);return!n||!n.state?qL:_H(n.state)},Zk=()=>Ie()!=null,mH=128;function yH(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<mH&&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 bH={get(t,e){return t[e]}},KL=new WeakMap,_H=t=>{let e=KL.get(t);return e||(e=new Proxy(t,bH),KL.set(t,e)),e},qL=new Proxy(Object.create(null),{get(){},has(){return!1}});M();var wH=["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"],SH=["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"],xH=["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"]},kH=new Set(["linearGradient","radialGradient","stop","clipPath","mask","marker","pattern","filter","symbol"]),EH=()=>{let t={};for(let e in GL)t[e]=[...GL[e],...kH.has(e)?[]:xH,...SH];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"],...EH()},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),vH=new Set(["draggable","contenteditable","spellcheck","autocorrect","writingsuggestions","translate"]),AH=new Map([["autocorrect",["on","off"]],["translate",["yes","no"]]]),ti=t=>typeof t=="string"&&(vH.has(t)||t.startsWith("aria-")),nr=(t,e)=>{if(e!==!0&&e!==!1)return e;if(ti(t)){let n=AH.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=CH(t,e),s.answers.set(e,i)),i},CH=(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)},TH=(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},OH=(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},RH=(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},PH=new Set(["$",".","!"]),oE=(t,e,n,r=RH)=>{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(!PH.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.813";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 LH=new Set(["rows","cols","wrap","fill","stroke","offset"]),Em=(t,e)=>LH.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 DH=250,IH=1e3;function MH(){return td&&(td!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||BD())?!0:_c()-FD>=IH}function NH(){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,DH);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(!MH())return;let t=mc;if(mc=null,t)try{t()}catch{}}NH()}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&&U9(),!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 $H(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(;FH(t,n);)n="$"+n;return n!==e&&BH(t,e,n),n}function FH(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 BH(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=i9(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=HH(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)&&jH(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 jH(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?`
|
|
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 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 UH=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=a9(t,p&&p.__runtimeSource);return p&&(p.__declaredArrays=g||void 0),fc(t),WH(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&&UH.has(e)?t[e]={...r,...n}:s&&VD(e)?t[e]=Ve(r,n):t[e]=n}var VH=new Set(["key","parent","context","__ref"]);function zH(t,e){for(let r of Object.keys(t))VH.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 HH(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 WH(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),qH(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 KH(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 qH(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=KH(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 GH=new Set(["s","state","ctx","context"]),cE=new WeakMap;function YH(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 XH(t){let e=YH(t);return e?e.params.map(n=>n.split("=")[0].trim()).filter(Boolean):[]}var JH=3,ZH=/^(is|has)[A-Z0-9_$]/,QH=new Set(["routerOptions"]),lD=new WeakSet;function t9(t,e){if(typeof t!="function"||t.length!==2||e&&(ZH.test(e)||QH.has(e))||lD.has(t))return!1;let n=XH(t);if(n.length<2)return!1;let r=n[1].replace(/[{}[\]]/g,"").trim();return r.length<JH||GH.has(r)?!1:(lD.add(t),!0)}function e9(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()&&t9(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 n9(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 n9(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,r9=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},o9=(t,e)=>{let n=r9(t);if(n)for(let r=0;r<n.length;r++)e.add(n[r])},s9=(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"&&s9(t,r)&&o9(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),i9=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)}}},a9=(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"],c9=t=>{if(XD.includes(t))return!0;let e=t.charCodeAt(0);return e===46||e===33||e===64},l9=(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(!c9(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=l9(t,n.__runtimeSource);if(n.__authoredTemplates)for(let c of o)n.__authoredTemplates.add(c);else n.__authoredTemplates=o;if(e9(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&&d9(_)){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(g9(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(x9(t),D9(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)}C9(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),B9(t),dI(t),J9(t),X9(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,zH(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 f9(t,e){return e!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function u9(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=f9(t,e);n==null?t.removeAttribute(e):t.setAttribute(e,n),u9(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 d9(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 p9(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)||p9(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 h9(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 g9(t){let e=t.__ref,n=t.vars;if(typeof n=="function"){m9(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 m9(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 y9(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 b9(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=y9(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 _9(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)h9(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&&w9(t,r)}function w9(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)+`
|
|
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
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 S9(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 x9(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()&&S9(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=k9(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 k9(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 E9(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 v9(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=v9(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()&&E9(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 A9(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 C9(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 T9=()=>!0,O9=(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 R9(t,e,n){let r={},o=!1;for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(a!=="data"&&a!=="aria"&&(O9(a,n[a])||Gt.has(a))?r[a]=!0:o=!0);if(!o)return null;let s=oE({[e]:n},t.tag||"div",r,T9),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 P9(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,L9=()=>fE===void 0?fE=tt():fE;function ED(t,e){let n=Tp;typeof n=="function"?t.untrackedReads+=n(e):e()}function D9(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=R9(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&&P9(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);L9()&&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 I9(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 M9(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 N9(t,e){let n=t.ownerDocument;if(n&&!I9(n)){if(ct.hydration!==null&&e&&e.context&&e.context.__hydration){M9(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 $9(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"]),F9=(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()&&F9(_,b)};if(typeof t.class=="string"){let _=A9(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?$9(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(b9(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&&N9(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}_9(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 B9(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 j9(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=z9(n),a=H9(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=W9(n,i),u=f!=null&&l<f?f:l,d=G9(i),p=d!=null&&u>d;n.style.height=q9(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,V9(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 U9(){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 V9(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 z9(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 H9(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 W9(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)||K9(t,e);return r>0?n*r+DE(e):null}var Zu=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],PD=new WeakMap;function K9(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 q9(t,e){return e?e.boxSizing==="border-box"?t+mI(e):e.boxSizing==="content-box"?Math.max(0,t-DE(e)):t:t}function G9(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"],Y9=(t,e)=>t==="muted"?e===!0||e===""||e==="true"||e==="muted":e??null;function X9(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=Y9(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 J9(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}j9(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($H(a),t,s,i)}Z9(t),n&&ct.viewEvents&&ct.viewEvents(t)}function Z9(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)}},Q9=Object.freeze([]);function tW(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?Q9:null;return!!s&&tW(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},eW=new Set(["src","srcset"]),nW=new Set(["sizes","loading","fetchpriority","decoding","crossorigin","referrerpolicy","width","height"]),rW=new Set(["sizes","media","type","width","height"]),oW=t=>t==="img"?nW:t==="source"?rW:null,sW=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))}},iW=(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=oW(s.localName);for(let d of Array.from(s.getAttributeNames?s.getAttributeNames():[]))eW.has(d)||d==="data-key"||u&&u.has(d)||(sW(d)?(f||(f=[])).push(d):s.removeAttribute(d));if(f&&!iW(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&&cW(s),s}var aW=500;function cW(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),aW)}},0)}function lW(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 fW(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:lW,whole:fW,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 uW(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"){uW(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,dW=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);function qE(){No=0,hd=!1,jr=si,KE()}function pW(){VE||(VE=!0,dW(()=>{VE=!1,oi===0&&qE()}))}function DI(){oi>0&&oi--,!(oi!==0||ze!==null)&&(Ec?pW():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 hW(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 gW(){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),hW(t),hd||zm()-No>=jr)break}if(oi=0,qE(),Ln.length){WE(II);return}Ec=!1,gW()}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 mW(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(()=>yW(t,e,p,r,o,s,i),s,YE(t));return}}}catch(c){if(!a)throw c;Dm(t,c)}a&&He(t)}function yW(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 bW(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 _W(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,wW(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 wW(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 SW(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:mW,run:NI,rows:_W,defer:bW,hold:Hm,finish:SW,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",kW=new Set(["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT","BASE","TITLE"]),EW='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',vW={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 AW(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 CW(t){let e=t.activeElement;return e&&e!==t.body&&e!==t.documentElement?e:null}var WI=t=>!!(t.closest&&t.closest("[inert]"));function TW(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&&!kW.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=CW(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?TW(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,vW);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(()=>OW(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(EW))if(i(a,!0))return;o&&o!==r.body&&typeof o.blur=="function"&&o.blur()}function OW(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=AW(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 RW(){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(RW)},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,
|
|
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}`},Y5=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 PW={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"}}}},LW={alert:{"@dark":{color:"white",background:"red"}},warning:{"@dark":{color:"black",background:"yellow"}},success:{"@dark":{color:"black",background:"green"}}},DW={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"}},...PW,...LW,...DW,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 IW={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:IW};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:()=>MW,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%"},MW=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 NW=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:NW},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,$W=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=$W(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 FW=new Set;var yN=t=>FW.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,BW=t=>{let e=SN.get(t);return e||(e={pending:new Map,waiting:new Map,failed:new Set},SN.set(t,e)),e},jW=(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},UW=(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()}},VW=(t,e,n,r,o)=>{let s=t&&t.designSystem,i=s&&s.iconsLoader;if(typeof i!="function"||!s.icons)return!1;let a=BW(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=jW(u,n);return d?UW(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},zW="0 0 24 24",HW=/<(symbol|svg)\b[^>]*>/i,WW={viewBox:/\sviewBox\s*=\s*(?:"([^"]*)"|'([^']*)')/i,width:/\swidth\s*=\s*(?:"([^"]*)"|'([^']*)')/i,height:/\sheight\s*=\s*(?:"([^"]*)"|'([^']*)')/i},kv=(t,e)=>{let n=t.match(WW[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},KW=(t,e)=>{if(typeof t!="string")return;let n=t.match(HW);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 KW(t.call("exec",t.src,t),r)||zW},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&&(VW(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:()=>D8,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,qW=0,Tv=()=>Date.now().toString(36)+(++qW).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)},GW=(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,YW=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)},XW=(t,e,n,r,o,s,i)=>{n.restore&&n.restore.end("replaced"),n.restore=r;let a=typeof i=="number"&&i>=0?i:YW,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)},JW=(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},ZW=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&&GW(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=JW(a,c):ZW(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)},QW=(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};QW(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"||XW(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},t8=(t,e)=>{let n=qN(t,e);return Ht(n)&&typeof n.when=="function"?n.when:null},e8=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",n8=(t,e)=>typeof kd(t,e)!="function"?"error":XN(ty.get(t)?.get(e)),r8=(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:n8(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},o8=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[o8(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)}},s8=t=>Ht(t)?!Object.keys(t).some(n=>WN.has(n))&&Ht(t.default)?t.default:t:{},i8=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}},a8=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]},c8=(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 a8(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)},l8=(t,e,n,r)=>{let o=t.context,s=s8(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=i8(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&&c8(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",f8=(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=t8(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,e8(e);return a=o(r.attempts++)},d=Promise.resolve().then(f).then(u).then(p=>{c=!0,r.disposed||l8(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&&f8(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:r8(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 u8=(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},d8=t=>{let e=t&&t.context&&t.context.__hydration;return!!e&&e.adopted>0},p8=t=>{let e=Wm;return typeof e!="function"||!e(t)?null:Ur(t)},Hv=Object.freeze({holdTail:!0}),h8=t=>typeof t.holdPage=="function"&&typeof He=="function",f$=(t,e)=>{let n=()=>He(t);Ed(e)?e.then(n,n):n()},g8=(t,e)=>{let n=null;try{n=t.holdPage(e)}catch{}f$(e,n)},u$=Object.freeze({holdTail:!0,deferAttach:!0}),m8=(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)},y8=async()=>{await Ce();let t=$o;if(typeof t=="function")for(;!t();)await Ce()},b8=(t,e,n,r)=>{if(e===Hv){t.firstView.page=n,f$(n,t.firstView.commit);return}e===u$&&y8().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=_8(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}},_8=(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,w8=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},S8=(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,x8=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())},k8=(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,E8=t=>t===!0?{}:t&&typeof t=="object"&&!Array.isArray(t)?t:null,v8=(t,e,n,r)=>{let o=E8(t.transition);return!o||!e||ny(e.content)||!n||typeof n.startViewTransition!="function"||vd.get(n)>0||!y$(n,r)?null:o},A8=t=>{let e=t.__routeTransition;if(!(!e||e.updating))try{e.transition.skipTransition()}catch{}},C8=t=>{let e=typeof t.types=="string"?[t.types]:t.types;return Array.isArray(e)?e.filter(n=>typeof n=="string"&&n):[]},T8=t=>{try{let e=t&&t.ViewTransition;return!!e&&"types"in e.prototype}catch{return!1}},O8=100,R8=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()},P8=t=>{t&&typeof t.then=="function"&&t.then(null,()=>{})},L8=(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=C8(n),h=null;try{h=g.length&&T8(o)?r.startViewTransition({update:d,types:g}):r.startViewTransition(d)}catch{}if(!h)return p(),null;u.transition=h,e.__routeTransition=u,P8(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,O8),_=a$(n.timeout,R8);_!==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=S8(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=x8(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>=w8;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=k8(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?v8(a,S,i,s):null;if(J&&A8(l),a.pushState){let q=g+(h||"")+(m||"");BN(N,n,q,a.replace,s)}else N&&Mv(N);FN(l,s);let it=u8(o,a,f),rt=()=>{let q=J?m8(a,o,f,it):null,W=(!!S||l$(it))&&!!$&&$.scrollTop===0&&!$.scrollLeft,Rt=!S&&!!a.initialRender&&!!$&&d8(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&&h8(a),at=o.set(Le,it,q||(X?Hv:void 0));at&&q?b8(a,q,at,()=>l.__routerNavSeq===nt):at&&X&&g8(a,at),Ct=p8(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?L8(o,l,Q,i,s,nt,rt):null;if(gt){await gt;return}return rt()},D8=Dn;var I8=(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")},M8=(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||I8(t,e))return;if(a.startsWith("#")){t.preventDefault(),M8(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 N8={ok:1,cancel:1},fi=new WeakMap,$8=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-"+ ++$8,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"],F8=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||!F8(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)}))})},B8=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)},j8=t=>t.dialogTitle===!0,U8=t=>{for(let e=t;e;e=e.parent)if(e.tag==="dialog")return e;return null},L$=t=>{let e=U8(t);return!e||!e.locked},V8=t=>t.key==="Escape"||t.key==="Esc",z8=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&&V8(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)}},H8=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(j8):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)},W8=(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(N8[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)},K8=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()},q8=t=>{let e=fi.get(t),n=gn(t);e&&e.want!==void 0&&n&&!n.isConnected&&n.hasAttribute("open")&&n.removeAttribute("open")},G8=t=>{let e=fi.get(t);e&&e.want&&P$(t)},Y8=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=>Y8(t)},onComplete:{always:!0,handler:t=>{B8(t),z8(t),H8(t)}},onRender:{always:!0,handler:t=>G8(t)},onClick:(t,e)=>W8(t,e),onBeforeRemove:{always:!0,handler:t=>K8(t)},onRemove:{always:!0,handler:t=>q8(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 X8='[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,J8=0,Te=t=>{let e=$$.get(t);return e||(e={id:"smbls-tooltip-"+ ++J8,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},Z8=t=>{let e=t.parent&&t.parent.node;return e&&e.nodeType===1?e:null},Q8=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=Z8(t);if(!e||!n)return null;let r;try{r=e.closest(X8)}catch{return null}if(!r||!n.contains(r))return null;for(let o=r;o&&o!==n;o=o.parentElement)if(Q8(o))return null;return r},tK=(t,e)=>!!(e&&t.node&&t.node.contains(e)),eK=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"),nK=(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")},rK=(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}},oK=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}},sK=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!==sK(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=oK(o),u=r.getAttribute("data-tooltip-placement"),d=N$[u]?u:N$[t.tooltipPlacement]?t.tooltipPlacement:"bottom",p=rK(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})},iK=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,nK(e,n.id),t.state.update({open:!0,placed:!1,title:e.getAttribute("data-tooltip")||"",description:e.getAttribute("data-tooltip-description")||""}),iK(()=>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=tK(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&&eK(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 aK=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=aK(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},cK={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},lK={BUTTON:1,INPUT:1,SELECT:1,TEXTAREA:1},fK='button, a[href], [role^="menuitem"], [role="option"]',uK={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,dK=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&&cK[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)},pK=t=>{let e=wt(t);if(!e||!Z$(t))return!1;if(lK[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},hK=(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)},gK=(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)},mK=t=>{let e=uy.get(t);return e||(e={id:"smbls-dropdown-"+ ++dK,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,yK=(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}},bK=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=mK(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}=yK(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:bK(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),gK(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"&&!hK(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)},_K=t=>{let e=t.popupRole==="menu"?t.popup:t.panel;return!e||typeof e.lookdownAll!="function"?[]:e.lookdownAll(t.popupRole==="menu"?Od:pK)},wK=(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=_K(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&&wK(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)},SK=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(fK):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),SK(t)},_y=(t,e)=>{let n=mn(e);n&&(n.pressedOpen=my(e,n))},xK=(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){EK(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){vK(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"))},kK=t=>!!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey),EK=(t,e)=>{let n=mn(e);if(!n)return;let r=t.target;if(Dt(n.panel,r)){n.open===!0&&!kK(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")},vK=(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)},AK=(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()},CK=(t,e)=>{if(t.defaultPrevented)return;let n=uK[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])},TK=(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}},OK=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"},RK=t=>{u2(t);let e=gi(t);e.ready=!0,!(e.stopItem&&e.stopItem.parent===t&&Od(e.stopItem))&&s2(t)},PK=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&&DK(t.parent),e.checked?"true":"false"},LK=(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(()=>LK(t,e),{label:"DropdownList.checks"}))},y2=t=>{let e=dy.get(t);!e||!e.checks||(e.checks.dispose(),e.checks=null)},DK=t=>{let e=gi(t);e.checks?e.checkRows.set(e.checkRows.peek()+1):e.owned||m2(t)},IK=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)=>{CK(t,e),d2(t,e)},onInit:{always:!0,handler:IK},onComplete:{always:!0,handler:RK},onRender:{always:!0,handler:m2},onBeforeRemove:{always:!0,handler:y2},onFocusin:TK,onClick:p2,onFocusout:h2,childExtends:{extends:"Button",state:{},role:"menuitemradio",tabindex:t=>OK(t),aria:{checked:t=>PK(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:xK,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)=>AK(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(`
|
|
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
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=
|
|
91
|
-
${c}`}var
|
|
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&&
|
|
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:()=>_1,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:()=>x1,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:()=>RO,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 VK={group:"group",imagePair:"image-pair","image-pair":"image-pair",old:"old",new:"new"},zK=/^(?:\*|\.?-?[_a-zA-Z][\w-]*)$/,HK=/^-?[_a-zA-Z][\w-]*$/,WK=new Set(["root","*"]),KK="@media (prefers-reduced-motion: no-preference)",qK="@media (prefers-reduced-motion: reduce)",GK=(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=VK[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=GK(f[d],s);h&&(i[g]=h,a[g]={animation:"none"})}};for(let l in t){let f=t[l];if(k(f)){if(!zK.test(l)){o(`"${l}" is not a view-transition name`);continue}if(!r&&WK.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(!HK.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?{[KK]:i,[qK]:a}:null};var YK=P(),$2=(t=YK,e)=>{let n=k(e.localFile)?e.localFile:{},r=pt(n.designSystem||{});return bt(t,r,ae)},XK={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=XK)=>{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)},JK=(t,e=Ty)=>{let n=e.scopeSelector||":root";Ot({[n]:t.CSS_VARS}),EA(t,n)};var ZK=(t,e=Ty)=>{};M();var j2=10,QK=t=>{let e=t&&t.window||(typeof window<"u"?window:null);return!!e&&typeof e.requestAnimationFrame=="function"},t7=t=>{try{let e=t.defaultView;return e&&e.frameElement||null}catch{return null}},e7=t=>{let e=t&&t.document||(typeof document<"u"?document:null);if(!e)return()=>!0;let n=!!e.defaultView,r=t7(e);return()=>!(n&&!e.defaultView||r&&!r.isConnected)},U2=Symbol("smbls.bootGone"),V2=t=>{let e,n={live:e7(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,n7=(t,e)=>e?Promise.race([t,e.gone]):t,Vo=async(t,e)=>await n7(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||!QK(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)},r7=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?r7: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,o7=t=>{let e=t&&t.initialPath;return typeof e!="string"||!e?null:e[0]==="/"?e:"/"+e},DA={initRouter:!0,injectRouterInLinkComponent:!0,popState:!0},s7=(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||s7)(t,e),i7=["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)},a7=(t,e)=>{let n=e&&e.scrollRestoration;if(n!=null){if(!i7.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{}}},c7=(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;a7(e,n),c7(e,n);let r=(i,a)=>{let c=i.context?.window||R,l=o7(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 l7(i,c,r);await r(i)},s=!Xt(t.onRenderRouter);return n&&n.initRouter&&!s&&(t.onRenderRouter=(i,a)=>e.__firstNavigation=o(i,a)),f7(e,n),n},l7=(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))},f7=(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 u7=(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)u7(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 d7=["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(d7),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,p7=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=>p7(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}),h7=(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"},g7=(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=h7(t,s,r,o),a="start";else{let g=n.split("-");i=g[0],a=g[1]||"start",i=g7(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},m7=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,y7=0,b7=()=>`dropdown_${++y7}_${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||m7(n);if(!r)return console.warn("[dropdown] openDropdown: no anchor element/rect provided \u2014 pass anchorEl or anchorRect."),null;let o=t.id||b7(),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)}},_7=`
|
|
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 kA=null;function vy(t){kA=t}var In={structuralHash:xy,deepEqual:ky,mer
|
|
|
157
157
|
[data-smbls-dropdown="panel"]:not([data-smbls-shadowed]) {
|
|
158
158
|
box-shadow: none !important;
|
|
159
159
|
}
|
|
160
|
-
`,w7=()=>{if(typeof document>"u"||document.getElementById("smbls-dropdown-css"))return;let t=document.createElement("style");t.id="smbls-dropdown-css",t.textContent=_7,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")},S7=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},x7=t=>{t.node&&(t.node.removeAttribute("data-smbls-open"),t.node.offsetWidth,t.node.setAttribute("data-smbls-open","true"))},k7=[["role","role"],["aria-label","ariaLabel"],["aria-labelledby","ariaLabelledby"]],rF=(t,e)=>{if(!t.node)return;let n=new Set;for(let[r,o]of k7){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)},E7='a[href], button, input:not([type="hidden"]), select, textarea, summary, [tabindex], [contenteditable]:not([contenteditable="false"])',v7=t=>{let e=t.node;if(e){for(let n of e.querySelectorAll(E7)){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(w7(),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=S7(t.content)),nF(t,n),rF(t,n),x7(t),n.focusIn&&v7(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 A7=(t,e,n)=>({bottom:n-t.bottom,top:t.top,right:e-t.right,left:t.left}),C7=(t,e,n,r,o)=>{let s=A7(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=C7(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},T7=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}}})},O7=t=>{typeof queueMicrotask=="function"?queueMicrotask(t):Promise.resolve().then(t)},R7=0,P7=()=>`tooltip_${++R7}_${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||T7(n);if(!r)return console.warn("[tooltip] openTooltip: no anchor element/rect provided."),null;let o=t.id||P7(),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}),O7(()=>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")},L7=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,L7(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 D7=0,I7=()=>`${Date.now().toString(36)}-${(D7++).toString(36)}`,ft=(t,e,n={})=>({id:I7(),ts:Date.now(),type:t,level:e,...n}),M7=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:M7(t),tag:t.tag||null,component:t.component||null,route:t.context?.routerOptions?.currentRoute||null}:null;var jc=t=>t?.context?.analyze,N7={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"}},$7=(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(N7))eb[t]=$7(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 F7=(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},B7=(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(F7(s,e)||rb.test(s)){let a=B7(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||{})},j7=(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=j7(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",U7=5e3,V7=50,z7=3,H7=1500,W7=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",K7=t=>{try{return JSON.stringify(t)}catch{return null}},q7=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||null}catch{return null}},G7=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}},Y7=()=>{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}},X7=()=>{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:G7(e?.userAgent),language:e?.language||null,languages:e?.languages||null,timezone:q7(),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:Y7()}},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:U7,y=t.maxBatch||V7,x=t.maxRetries!=null?t.maxRetries:z7,E=t.backoffMs||H7,C=t.queueLimit||W7,_=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:X7(),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 J7(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=K7(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}},J7=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 Z7={error:"\x1B[31m",warn:"\x1B[33m",info:"\x1B[36m",debug:"\x1B[90m",trace:"\x1B[90m"},Q7="\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=Z7[s.level]||"";i(`${c}${a}${Q7}`,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 tq=typeof R<"u"&&typeof R.document<"u",eq=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},nq=(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"***"}},rq=t=>!!(!t||t.tagName==="INPUT"&&eq.has(t.type)||rb.test(t.name||"")||rb.test(t.id||"")||t.dataset?.analyze==="skip"),fb=t=>{if(!tq)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=rq(a),f=a.dataset?.analyze==="track",u=null;f&&!l?u=a.value:t.config.maskFormValues!==!1&&(u=nq(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}),oq=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 oq(t);if(typeof t=="object")try{return JSON.parse(JSON.stringify(t))}catch{return String(t)}return t};M();var sq=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(sq&&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 iq={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},aq={errors:!0,warnings:!0,pointer:!0,keyboard:!0,forms:!0,scroll:!0,viewport:!0,navigation:!0,state:!0},cq={errors:!0,warnings:!0,pointer:!0,navigation:!0,performance:!0,viewport:!0},lq={errors:!0,warnings:!0,console:!0,network:!1,navigation:!0,performance:!0,viewport:!0,lifecycle:!1,state:!1,updates:!1},fq=t=>{let e={...iq,...t};return e.replay&&Object.assign(e,aq),e.telemetry&&Object.assign(e,cq),e.remote&&Object.assign(e,lq),Object.assign(e,t),e},uq=64,dq=()=>{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=fq(e.capture||{});let n=dq();(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<uq&&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 pq(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=pq(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 hq(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 gq(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)):hq(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=gq(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 mq={shorten:wi,stringify:Si,stringifyFurther:ki};function yq(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 bq=["components","pages","snippets"],db={name:"shorthand",prepareContext(t){let e=t.shorthand;if(!e)return;let r=mq[e===!0?"shorten":e];if(r){for(let o of bq)t[o]&&(t[o]=yq(t[o],r));t.app&&typeof t.app=="object"&&(t.app=r(t.app))}}};var Ud={};F(Ud,{Inspect:()=>pb,inspectPlugin:()=>wq});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 _q=(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:_q,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=`
|
|
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}}},wq={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:()=>fG,FORBIDDEN_SEGMENTS:()=>Vd,Notifications:()=>yb,SyncComponent:()=>GC,applyOpsToCtx:()=>zd,connectToSocket:()=>BB,deletePath:()=>yC,isSafePath:()=>gb,liveSyncTransport:()=>mb,notificationsPlugin:()=>hG,onOps:()=>SC,onSnapshot:()=>wC,seedRawDesignSystem:()=>Vc,setPath:()=>bC,syncPlugin:()=>pG,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},Sq=()=>typeof R<"u"&&!!R&&!!R.__SYMBOLS_ENV__,xq=()=>{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?Sq()&&!xq()?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 kq={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:kq[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 oG=!1,sG=()=>oG?"http://localhost:8080":"https://api.symbols.app",qC=null,iG=()=>(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),aG=async t=>{try{let e=t||sG(),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)})},cG=async(t,e,n,r,o)=>{let s=await aG(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},lG=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=iG();return r==="collab"?cG(t,e,n,o,s):r==="runner"?lG(t,e,n,s):null},GC={onInit:BB},fG={extends:[GC,yb]},jB=t=>typeof t>"u",uG=t=>!!(t?.editor?.socketUrl||t?.settings?.socketUrl),dG=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]},pG={name:"sync",beforeCreate(t,e){let n=e&&e.editor;(n&&!jB(n.liveSync)?n.liveSync:Ei(e))&&(uG(e)&&!dG(e)&&!e?.key||UB(t,GC))}},hG={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:()=>_G,fetchSync:()=>bG});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",gG={endpoint:zB},HB=async(t,e=gG)=>{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)}},mG=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},yG=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)}},bG=async(t,e)=>{if(t&&e.editor)try{e.editor.async||await mG(t,e)}catch(n){console.error(n)}},_G=(t,e,n,r)=>{if(e&&n.editor)try{n.editor.async&&yG(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 wG={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=wG[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:()=>vG,default:()=>VG,extractMetadata:()=>kG,generateHeadHtml:()=>UG,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},SG=t=>!!t&&typeof t=="object"&&(t.notFound===!0||t.metadata?.notFound===!0),xG=(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(SG(t[n]))return t[n]},kG=(t,e="/",n,r,o)=>{let s=t.pages||{},i=xG(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},EG=(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})},vG=(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)&&EG(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},AG=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},CG=(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}},TG=t=>{if(!k(t))return!0;for(let e in t)if(t[e]!==void 0&&t[e]!==null)return!1;return!0},OG=(t,e)=>{let n=QC.get(t);if(n)return n;let r=AG(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),!TG(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(CG(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=OG(t,e),s=K(()=>{let a=n();o.set(a),r&&r(a)}),i=t.__ref?.__effects;i&&i.push(s,o)},RG=Jr(bn.title),PG=Jr(bn.description),LG=Jr(bn["og:title"]),DG=Jr(bn["og:description"]),IG=Jr(bn["twitter:title"]),MG=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},NG=Object.keys(Mb).filter(t=>t!=="icon"),$G=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 NG)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,RG,LG,IG),JB(e,PG,DG,MG),{tags:e,lists:n,scripts:r}},FG=(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))},BG=(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()},jG=(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}=$G(t.layers);for(let s of[...t.owned])n.has(s)||BG(t,s);for(let[s,{value:i}]of n)FG(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);jG(e,o)},UG=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))}},
|
|
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"],iY=(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},aY=(t,e,n)=>!n||!n.map||t.hydrate===!1?!1:n.legacy?t.hydrate===!0||k(t.hydrate)||!!e&&e.__BRENDER_HYDRATE__===!0:!0,cY=t=>{let e=k(t.hydrate)?t.hydrate.timeout:void 0;return typeof e=="number"&&e>=0?e:sY},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")}},lY=()=>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 lY(),!s||!(o.requestsInFlight()>0))return}},fY=["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 fY)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,cY(t)),l(!0),$j(t,r).then(f,f)},uY=1e3,dY=(t,e)=>{t&&typeof t.requestIdleCallback=="function"?t.requestIdleCallback(e,{timeout:uY}):setTimeout(e,0)},Tj=(t,e)=>{let n=Xc("fetch");!n||typeof n.seedIsStale!="function"||!n.seedIsStale()||dY(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)},pY=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}),hY=(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:pY(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(gY(c,n,r))&&c.dispatchEvent(new a("click",l))}}},gY=(t,e,n)=>{for(let r=t;r&&r!==e;r=r.parentNode)if(n.claimed.has(r))return r;return null},mY=async()=>{for(await Ce();!$o();)await Ce()},yY=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=hY(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(mY(),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 yY(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=iY(o,c);r.prerendered=!0;let u=ds(c);if(u&&(r.prerender=u),aY(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=SY(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=_Y(i);a&&wY(a)&&e.links++;continue}if(bY(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"),bY=t=>typeof t=="string"&&t.trim().startsWith("@font-face"),_Y=t=>{if(!Vj(t))return null;let e=String(t).match(/url\(\s*['"]?([^'")]+)['"]?\s*\)/);return e?e[1].trim():null},wY=(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")},SY=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,xY=3e3,kY=(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),xY);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=kY})=>{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,EY=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""},vY=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=EY(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},AY=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},CY=(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=vY(t),runtimeDocument:n=typeof document<"u"?document:null,importMap:r=AY(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)&&CY(l,r)?(c||(c={}))[l]=o[l]:(a||(a={}))[l]=o[l];return{blocking:a,deferred:c}},TY=t=>import(t),uT={},OY=(t,e)=>{if(!e||typeof globalThis>"u")return;let n=globalThis.__SMBLS_PKGS__||(globalThis.__SMBLS_PKGS__={});n[t]||(n[t]=e)},RY=(t,{importModule:e=TY}={})=>{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=>(OY(r,s),s||null),()=>null)}n.push(uT[r])}return Promise.all(n)},PY=2e3,LY=3e3,Qj=(t,{win:e=typeof window<"u"?window:null,importModule:n,loadTimeoutMs:r=LY}={})=>t?new Promise(o=>{let s=()=>{RY(t,{importModule:n}).then(o,o)},i=()=>{e&&typeof e.requestIdleCallback=="function"?e.requestIdleCallback(s,{timeout:PY}):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)},DY=/\s+/g,e3=(t,e)=>typeof t=="function"?t(e,e?.state,e?.context):t,IY=(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},MY=(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=IY(t,e));let o=t.replace(DY," ").trim();if(n&&typeof n.setAttribute=="function")n.setAttribute("class",o);else if(n)try{n.className=o}catch{}return o},NY=()=>(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&&MY(i,e,e.node)}},$Y=()=>({style:NY(),classlist:n3()}),FY=["useReset","useVariable","useFontImport","useIconSprite","useSvgSprite","useDocumentTheme","useDefaultIcons","useDefaultConfig","verbose","globalTheme"],dT=new WeakSet,pT=!1,BY=t=>!!t&&typeof t=="object",jY=new Set(["key","document","files","assets","themeRoot","config","newConfig","recordCss","router"]),r3=t=>t.toLowerCase()==="font",UY=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)jY.has(o)||(r[o]=e[o]);return r.globalTheme=Cy(e.globalTheme)||"auto",UY(1+"|"+JSON.stringify(n,Kj)+"|"+JSON.stringify(r,Kj))},VY=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},zY=(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 WY(a,i,t.window||e.defaultView)}catch{return null}},HY=(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},WY=(t,e,n)=>{let r=!1,o=t.then(s=>(r=!0,s));return o.deferred=!0,o.ready=()=>r||HY(e,n),o},i3=t=>!!t&&(t.deferred!==!0||t.ready()),KY=t=>k(t)&&t.format===1&&typeof t.fingerprint=="string"&&k(t.config)&&Array.isArray(t.rules),qY=(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||$Y(),s=()=>e.designSystem?bt(pt(e.designSystem),pt(ai),ae):pt(ai),i={};for(let m of FY)e[m]!==void 0&&(i[m]=e[m]);let a,c=BY(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=qY(a,y,e,p))}else if(u){let m=P();m&&(m.__domDocument=n);let y=m&&m._scratchConfig&&!p.localFile?zY(e,n):null;KY(y)&&y.fingerprint===o3(e.designSystem,p)?(a=vA(y,m,p,VY(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&&GY(e,r,n,s)}return n.isRootState=!0,pt(n)},GY=(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:()=>sX,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 YY="smbls_t_",XY="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]),JY=3e3,ZY=2147483647,QY=t=>{let e=t?.fontWait;return e===!1?0:typeof e=="number"?e>0?Math.min(e,ZY):0:JY},tX=new RegExp("\\p{L}","gu"),eX=(...t)=>{let e=new Set,n=(r,o)=>{if(typeof r=="string"){let s=r.match(tX);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("")},nX=(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||YY,i=r.storageVersionPrefix||(r.storagePrefix?r.storagePrefix.replace(/_$/,"v_"):XY);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 rX=(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=QY(r);if(l>0&&s?.fonts&&s.documentElement?.lang!==t){let f=nX(s,eX(r?.translations?.[t],o.translations?.[t]));if(f&&(i.pending.set(t),await p3(i,f,l),!c()))return}i.pending.set(null),oX(n,r,o,s,t)}finally{c()&&i.pending.set(null)}}function oX(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{rX(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))}},sX=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:()=>iX,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)}},iX=Wb;var aX="@symbo.ls/fetch:EARLY",cX=()=>new Promise(t=>setTimeout(t,0)),xT=t=>{let e=typeof globalThis<"u"?globalThis[Symbol.for(aX)]:null,n=e&&e.afterFirstView;return typeof n!="function"||e.afterFirstViewRan?null:(e.afterFirstViewRan=!0,Promise.resolve(t&&t.__firstNavigation).catch(()=>{}).then(cX).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,lX=(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,fX={lazy:!0,window:globalThis},x3=["components","pages","functions","methods","snippets"],uX=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},dX=(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 uX)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,{},fX);try{Object.assign(n,r)}catch(o){if(e)t[e]=r;else throw o}},pX=t=>{if(!k(t)||ss(t))return t;for(let e of[...x3,"app"])k3(t,e);return Ji(t)},hX=(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)&&pX(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=dX(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=lX(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:hX(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},gX=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},mX=()=>{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=mX();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),gX(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})},yX=(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},bX=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)},_X=(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 wX(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 SX(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=wX(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=
|
|
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
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 j3=/```(?<lang>[a-zA-Z0-9_+-]*)\n(?<code>[\s\S]*?)```/g,
|
|
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
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
|