smbls 3.14.47 → 3.14.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- "use strict";var SymbolsEmbed=(()=>{var Ve=Object.defineProperty;var bs=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Ss=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var Dt=(t,e)=>{for(var r in e)Ve(t,r,{get:e[r],enumerable:!0})},ws=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _s(e))!Ss.call(t,o)&&o!==r&&Ve(t,o,{get:()=>e[o],enumerable:!(n=bs(e,o))||n.enumerable});return t};var Cs=t=>ws(Ve({},"__esModule",{value:!0}),t);var Y,Et,ye=w(()=>{"use strict";Y=globalThis,Et=Y.document});var me,tr=w(()=>{"use strict";ye();me=t=>typeof Y<"u"&&(Y.Node&&t instanceof Y.Node||Y.Window&&t instanceof Y.Window||t===Y||t===document)});var I,_,xe,v,R,bt,Hr,Ht=w(()=>{"use strict";I=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,_=t=>typeof t=="string",xe=t=>typeof t=="number",v=t=>typeof t=="function",R=t=>Array.isArray(t),bt=t=>t===null?!1:typeof t=="object",Hr=t=>t===void 0});var Kr,er=w(()=>{"use strict";be();Kr=(t,e=[])=>t.reduce((r,n)=>rr(r,$t(n,{exclude:e}),e),{})});function _e(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=Es[n],i=e||this.state||{},c=this;return t.replace(s,(a,l,f,u)=>{let p=f.trim();if(u){let d=c?.context,h=d?.functions?.[u]||d?.utils?.[u]||d?.methods?.[u]||d?.snippets?.[u]||c?.[u];if(h&&typeof h=="function")try{return String(h.call(c,p)??"")}catch{return""}return""}if(l){let d=(l.match(/\.\.\//g)||[]).length,h=i;for(let x=0;x<d;x++){if(!h||!h.parent)return"";h=h.parent}if(p==="parent")return String(h.value??"");let g=Kt(h,p);return String(g??"")}else{let d=Kt(i,p);if(d!=null)return String(d);let h=c?.context?.polyglot;if(h?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||h.defaultLang||"en",x=h.translations[g];if(x){let y=Kt(x,p);if(y!=null&&typeof y!="object")return String(y);for(let b in x){let C=x[b];if(C&&typeof C=="object"&&!Array.isArray(C)){let S=Kt(C,p);if(S!=null&&typeof S!="object")return String(S)}}}let m=Kt(h.translations,p);if(m!=null&&typeof m!="object")return String(m)}return""}})}var Es,Kt,qr=w(()=>{"use strict";Es={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},Kt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var $s,Ts,Ps,Qr,nr=w(()=>{"use strict";$s=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"]),Ts=new Set(["update","__element"]),Ps=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Qr=new Set(["node","context","extends","__element","__ref",...Ps,...$s,...Ts])});var Jr,Ft,rr,Zr,$t,be=w(()=>{"use strict";ye();Ht();er();tr();nr();Jr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Ft=(t,e,r,n)=>{if(v(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(R(t)||I(t)&&!me(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 Ft(i,e,r,n)}}return t},rr=(t,e,r=Qr)=>Zr(t,e,r,null),Zr=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Jr(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],c=e[s];if(bt(i)&&bt(c)){let a=n||[];a.push(t,e),Zr(i,c,r,a),a.length-=2}else i===void 0&&(t[s]=c)}return t},$t=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,window:s,visited:i=new WeakMap,handleExtends:c=!1}=e,a=s||Y||globalThis;if(!bt(t)||me(t))return t;if(i.has(t))return i.get(t);let f=R(t)?[]:{};i.set(t,f);let u=r instanceof Set?r:r.length>3?new Set(r):null;for(let p in t){if(!Object.prototype.hasOwnProperty.call(t,p)||Jr(p)||p==="__proto__"||(u?u.has(p):r.includes(p)))continue;let d=t[p];if(!(n&&d===void 0)&&!(o&&d===null)){if(me(d)){f[p]=d;continue}if(c&&p==="extends"&&R(d)){f[p]=Kr(d,r);continue}if(v(d)){f[p]=d;continue}bt(d)?f[p]=$t(d,{...e,visited:i}):f[p]=d}}return f}});var Xr=w(()=>{"use strict"});var Yr,Rs,or,tn=w(()=>{"use strict";Yr="production",Rs=(t=Yr)=>t==="production",or=(t=Yr)=>!Rs(t)});var qt,Se=w(()=>{"use strict";qt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o}});var en=w(()=>{"use strict"});var rn=w(()=>{"use strict"});var wa,nn=w(()=>{"use strict";wa=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var on=w(()=>{"use strict"});var sn=w(()=>{"use strict"});var cn=w(()=>{"use strict"});var an=w(()=>{"use strict"});var fn=w(()=>{"use strict"});var ln=w(()=>{"use strict"});var un=w(()=>{"use strict"});var pn=w(()=>{"use strict"});var dn,sr=w(()=>{"use strict";dn={}});var yn={};Dt(yn,{setup:()=>Ds,supabaseAdapter:()=>gn});var hn,Is,Ds,ir,Fs,gn,mn=w(()=>{"use strict";hn=new Map,Is=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,Ds=async({url:t,key:e,projectId:r,createClient:n,auth:o,retry:s,adapter:i,...c})=>{let a=t||r&&`https://${r}.supabase.co`;if(!a||!e)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");n||(n=(await import("@supabase/supabase-js")).createClient),o===!1&&(c.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let l=Is(a,e,o===!1),f=hn.get(l);return f||(f=await n(a,e,c),f?.auth&&hn.set(l,f)),!f||!f.auth?null:gn(f)},ir=(t,e)=>{if(!e)return t;for(let r in e){let n=e[r];if(n===null)t=t.is(r,null);else if(Array.isArray(n))t=t.in(r,n);else if(typeof n=="object")for(let o in n)o==="gt"?t=t.gt(r,n[o]):o==="gte"?t=t.gte(r,n[o]):o==="lt"?t=t.lt(r,n[o]):o==="lte"?t=t.lte(r,n[o]):o==="neq"?t=t.neq(r,n[o]):o==="like"?t=t.like(r,n[o]):o==="ilike"?t=t.ilike(r,n[o]):o==="in"?t=t.in(r,n[o]):o==="is"?t=t.is(r,n[o]):o==="contains"?t=t.contains(r,n[o]):o==="containedBy"?t=t.containedBy(r,n[o]):o==="textSearch"&&(t=t.textSearch(r,n[o]));else t=t.eq(r,n)}return t},Fs=(t,{limit:e,offset:r,order:n,single:o}={})=>{if(n)if(Array.isArray(n))for(let s of n){let i=typeof s=="string"?s:s.by;t=t.order(i,{ascending:s.asc!==!1})}else{let s=typeof n=="string"?n:n.by;t=t.order(s,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),o&&(t=t.single()),t},gn=t=>({name:"supabase",client:t,getSession:async()=>{let{data:e}=await t.auth.getSession();return e?.session||null},getUser:async()=>{let{data:e}=await t.auth.getUser();return e?.user||null},signIn:e=>e.provider?t.auth.signInWithOAuth({provider:e.provider}):e.token?t.auth.signInWithIdToken(e):t.auth.signInWithPassword(e),signUp:e=>t.auth.signUp(e),signOut:()=>t.auth.signOut(),onAuthStateChange:e=>{let{data:{subscription:r}}=t.auth.onAuthStateChange((n,o)=>e(n,o));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:o,headers:s,...i})=>{let a=(r?t.schema(r):t).from(e).select(n||"*");if(a=ir(a,o),a=Fs(a,i),s)try{for(let l in s)a.setHeader?a=a.setHeader(l,s[l]):t.rest&&(t.rest.headers[l]=s[l])}catch(l){console.warn("[supabase] setHeader failed:",l.message)}return a},rpc:({from:e,params:r})=>t.rpc(e,r),insert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).insert(n).select(o||"*"),update:({from:e,schema:r,data:n,params:o,select:s})=>{let c=(r?t.schema(r):t).from(e).update(n);return c=ir(c,o),c.select(s||"*")},upsert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).upsert(n).select(o||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=ir(n,r),n},subscribe:({from:e,params:r,on:n},o)=>{let s=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},c=>o(c.new,c.old,c)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:o})=>t.storage.from(e).upload(r,n,o),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var bn={};Dt(bn,{restAdapter:()=>xn,setup:()=>Ms});var js,_t,Ms,xn,_n=w(()=>{"use strict";js=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},_t=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},Ms=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return xn(t,e,r,n)},xn=(t,e={},r,n={})=>{let o=r?.token||null,s=f=>{let u={...e,...f};return o&&(u.Authorization=`Bearer ${o}`),u},i=f=>({...s(f),"Content-Type":"application/json"}),c=f=>({...n,...f}),a=(f,u)=>{let p=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let d=f&&!f.startsWith("/")?"/":"";return`${p}${d}${f||""}`};return{name:"rest",setToken:f=>{o=f},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let f=await _t(a(r.sessionUrl,r.baseUrl),c({headers:s()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await _t(a(r.signInUrl,r.baseUrl),c({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await _t(a(r.signOutUrl,r.baseUrl),c({method:"POST",headers:s()})),o=null,{error:null}),select:({from:f,params:u,select:p,limit:d,offset:h,order:g,single:x,headers:m,baseUrl:y})=>{let b={...u};return p&&(b.select=p),d&&(b.limit=d),h&&(b.offset=h),x&&(b.single=!0),g&&(typeof g=="string"?b.order=g:Array.isArray(g)?b.order=g.map(C=>`${C.by}:${C.asc===!1?"desc":"asc"}`).join(","):g.by&&(b.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(js(y||t,f||"",b),c({headers:s(m)}))},rpc:({from:f,params:u,headers:p,baseUrl:d})=>_t(a(`rpc/${f}`,d),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:p,baseUrl:d})=>_t(a(f,d),c({method:"POST",headers:i(p),body:JSON.stringify(u)})),update:({from:f,data:u,params:p,method:d,headers:h,baseUrl:g})=>{let x=p?.id||u?.id,m=x?`${f}/${x}`:f;return _t(a(m,g),c({method:d||"PATCH",headers:i(h),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:p,baseUrl:d})=>{let h=u?.id,g=h?`${f}/${h}`:f;return _t(a(g,d),c({method:"DELETE",headers:s(p)}))}}}});var wn={};Dt(wn,{localAdapter:()=>Sn,setup:()=>Ls});var cr,Ns,Ls,Sn,Cn=w(()=>{"use strict";cr=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},Ns=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,c=e.asc!==!1;s.sort((a,l)=>a[i]<l[i]?c?-1:1:a[i]>l[i]?c?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Ls=async({data:t,...e})=>Sn(t,e),Sn=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(o)try{let u=localStorage.getItem(s+f);r[f]=u?JSON.parse(u):t[f]||[]}catch{r[f]=t[f]||[]}else r[f]=t[f]||[];return r[f]},c=f=>{if(o)try{localStorage.setItem(s+f,JSON.stringify(r[f]))}catch{}},a=(f,u,p,d)=>{let h=n[f];if(h)for(let g of h)g(p,d,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...p})=>{let h=i(f).filter(g=>cr(g,u));return Ns(h,p)},insert:async({from:f,data:u})=>{let p=i(f),h=(Array.isArray(u)?u:[u]).map(g=>{let x={id:g.id||++l,...g};return p.push(x),x});c(f);for(let g of h)a(f,"INSERT",g,null);return{data:Array.isArray(u)?h:h[0],error:null}},update:async({from:f,data:u,params:p})=>{let d=i(f),h=[];for(let g=0;g<d.length;g++)if(cr(d[g],p)){let x={...d[g]};Object.assign(d[g],u),h.push(d[g]),a(f,"UPDATE",d[g],x)}return c(f),{data:h,error:null}},delete:async({from:f,params:u})=>{let p=i(f),d=[];for(let h=p.length-1;h>=0;h--)cr(p[h],u)&&(d.push(p[h]),p.splice(h,1),a(f,"DELETE",null,d[d.length-1]));return c(f),{data:d,error:null}},subscribe:({from:f,on:u},p)=>{n[f]||(n[f]=[]);let d=(h,g,x)=>{u&&u!=="*"&&u!==x.event||p(h,g,x)};return n[f].push(d),()=>{let h=n[f].indexOf(d);h>-1&&n[f].splice(h,1)}}}}});var ee={};Dt(ee,{createAdapter:()=>Us,default:()=>Ys,executeFetch:()=>pr,fetchPlugin:()=>Xs,initAdapterAuth:()=>ke,parseDuration:()=>Jt,queryClient:()=>Zs,registerAdapter:()=>Bs,resolveDb:()=>En});var Vs,we,On,Bs,Us,En,Jt,H,$n,Qt,Ws,te,Zt,Xt,Ce,lr,ve,Gs,vn,ar,Tn,Pn,jt,kn,zs,An,Hs,Ae,Rn,ke,ur,nt,ft,Yt,Tt,pt,St,Ks,qs,Qs,fr,Js,pr,Zs,Xs,Ys,re=w(()=>{"use strict";j();Vs=["select","rpc","insert","update","delete","subscribe"],we=Symbol.for("@symbo.ls/fetch:BUILTIN_ADAPTERS"),On=(()=>{if(typeof globalThis<"u"&&globalThis[we])return globalThis[we];let t={supabase:()=>Promise.resolve().then(()=>(mn(),yn)),rest:()=>Promise.resolve().then(()=>(_n(),bn)),local:()=>Promise.resolve().then(()=>(Cn(),wn))};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,we,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[we]}catch{}return t})(),Bs=(t,e)=>{On[t]=e},Us=t=>{let e={};for(let r of Vs)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},En=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=On[n];if(!o)throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);return(await o()).setup(r)},Jt=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 r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},H=new Map,$n=new Map,Qt=new Map,Ws=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=Hs(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},te=t=>H.get(t)||null,Zt=(t,e,r)=>{let n=H.get(t),o={data:e,error:r,time:Date.now(),stale:!1};H.set(t,o);let s=$n.get(t);if(s)for(let i of s)v(i)&&i(o);return o},Xt=t=>{if(t){let e=H.get(t);e&&(e.stale=!0);return}for(let[,e]of H)e.stale=!0},Ce=t=>{if(t){H.delete(t);return}H.clear()},lr=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)}:_(t)?{staleTime:Jt(t),gcTime:3e5}:{staleTime:Jt(t.stale||t.staleTime)||6e4,gcTime:Jt(t.gc||t.gcTime||t.expire)||3e5,key:t.key},ve=null,Gs=()=>{ve||(ve=setInterval(()=>{let t=Date.now();for(let[e,r]of H){let n=$n.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&H.delete(e)}},3e4),ve.unref&&ve.unref())};Gs();vn=3,ar=t=>Math.min(1e3*2**t,3e4),Tn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:vn,delay:ar}:typeof e=="number"?{count:e,delay:ar}:{count:e.count??vn,delay:v(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:ar}},Pn=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let c=v(n)?n(s,o):n;await new Promise(a=>setTimeout(a,c));continue}return i}return i}catch(i){if(o=i,s<r){let c=v(n)?n(s,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:o}},jt={focus:new Set,online:new Set},kn=!1,zs=()=>{if(kn||typeof window>"u")return;kn=!0;let t=()=>{for(let r of jt.focus)r()},e=()=>{for(let r of jt.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},An=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(_(t))return{from:t,method:"select",query:!0,on:"create"};if(I(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},Hs=t=>(!t||v(t),t),Ae=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},Rn=(t,e,r)=>{let n;if(!t)n=void 0;else if(v(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=v(s)?s(e,e.state):s}}return n},ke=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},ur=async(t,e)=>{if(v(t.select))return t.auth!==!1&&await ke(t,e),t;if(t.__resolved)return t.auth!==!1&&await ke(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=En(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await ke(r,e),r):null},nt=(t,e,...r)=>{let n=v(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},ft=(t,e,r,...n)=>{let o=t&&v(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Yt=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[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},Tt=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},pt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},St=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||v(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||v(t.skip)&&t.skip(e,e.state))return;let s=await ur(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:p,single:d,auth:h,fields:g,as:x,limit:m,offset:y,order:b,headers:C,baseUrl:S,page:T,cursor:E,getNextPageParam:Z,getPreviousPageParam:B,infinite:X,placeholderData:U,initialData:gt,select:M,keepPreviousData:D}=t,it=_(M)?M:void 0;if(l&&v(e.getQuery)){let P=e.getQuery(s.name||"paths");P&&(it=P.select||P.length&&P.join(",")||it)}let ut=Rn(f,e,r),ct=lr(u),ue=Tn(t),Me=Ae(e,r),ms=Me?`:${Me}`:"",N=ct?u?.key||`${c}:${a}:${JSON.stringify(ut||"")}${X?":infinite":""}${T?":p"+JSON.stringify(T):""}${ms}`:null;if(!i.__fetchInitialized&&N&&(i.__fetchInitialized=!0,gt!==void 0)){let P=v(gt)?gt():gt;Zt(N,P,null)}if((a==="select"||a==="rpc")&&N&&ct){let P=te(N);if(P&&!P.error){let $=Date.now()-P.time,F=P.stale||$>(ct.staleTime||0),A=P.data;if(v(M)&&(A=M(A,e,e.state)),p&&(A=p(A,e,e.state)),Tt(e,A,x),!F){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(U!==void 0){let $=v(U)?U(e,e.state):U;$!==void 0&&Tt(e,$,x)}}if(N&&Qt.has(N)&&!n.force){let P=Qt.get(N);try{let $=await Promise.race([P,new Promise((F,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if($?.data!==void 0){let F=$.data;v(M)&&(F=M(F,e,e.state)),p&&(F=p(F,e,e.state)),Tt(e,F,x),nt(e,"onFetchComplete",F),ft(t,e,"onFetchComplete",F)}}catch{}return}let xs=!te(N)?.data;pt(e,{isFetching:!0,isLoading:xs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),nt(e,"onFetchStart"),ft(t,e,"onFetchStart");let yt=r?.analyze?.emitNetwork,Ne=yt?typeof performance<"u"?performance.now():Date.now():0;yt&&yt({phase:"start",mode:"query",from:c,method:a,cacheKey:N,lang:Me});let Br=Pn(async()=>{if(h!==!1&&s.auth!==!1&&s.getSession){let A=await s.getSession();if(h===!0&&!A){let z={message:"Not authenticated"};return pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:z,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",z),ft(t,e,"onFetchError",z),{data:null,error:z}}}let P=s[a];if(!v(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let $={from:c,select:it,params:ut,single:d,limit:m,offset:y,order:b,headers:C,baseUrl:S},F=Ae(e,r);if(F&&($.headers={...$.headers,"Accept-Language":F}),T!==void 0){if(I(T))T.offset!==void 0&&($.offset=T.offset),T.limit!==void 0&&($.limit=T.limit),T.cursor!==void 0&&($.params={...$.params,cursor:T.cursor});else if(typeof T=="number"){let A=t.pageSize||m||20;$.offset=(T-1)*A,$.limit=A}}if(E!==void 0&&($.params={...$.params,cursor:E}),a==="insert"||a==="update"||a==="upsert"){let A;if(g===!0||t.on==="submit")A=Yt(e);else if(R(g)){let z=Yt(e);A={};for(let Le of g)A[Le]=z[Le]}else e.state?.parse?A=e.state.parse():I(e.state)&&(A={...e.state});p&&(A=p(A,e,e.state)),$.data=A}if(a==="rpc"){let A=ut;if(t.on==="submit"){let z=Yt(e);A=t.transformParams?t.transformParams(z,e,e.state):z}$.params=A}if(a==="subscribe"){let A=s.subscribe({from:c,params:ut,on:t.subscribeOn},(z,Le,Vc)=>{Tt(e,z,x),nt(e,"onFetchComplete",z),ft(t,e,"onFetchComplete",z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return P($)},ue);N&&Qt.set(N,Br);try{let P=await Br;if(P?.subscribed)return;let{data:$,error:F}=P||{};if(F){N&&Zt(N,null,F),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:F,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",F),ft(t,e,"onFetchError",F),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:N,error:F.message||F,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ne});return}if($!==void 0){if((a==="select"||a==="rpc")&&N){let z=Zt(N,$,null);z.gcTime=ct?.gcTime||3e5}let A=$;X&&R($)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift($):i.__pages.push($),A=i.__pages.flat(),Z&&(i.__nextPageParam=Z($,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B($,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),v(M)&&(A=M(A,e,e.state)),p&&(A=p(A,e,e.state)),(!D||A!==void 0)&&Tt(e,A,x),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),nt(e,"onFetchComplete",A),ft(t,e,"onFetchComplete",A),yt&&yt({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:N,durationMs:(typeof performance<"u"?performance.now():Date.now())-Ne})}}catch(P){pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",P),ft(t,e,"onFetchError",P),yt&&yt({phase:"error",mode:"query",from:c,method:a,cacheKey:N,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-Ne})}finally{N&&Qt.delete(N)}},Ks=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||St;if(n==="submit"){let i=a=>{a.preventDefault(),s(t,e,r)},c=e.node;c&&(c.addEventListener("submit",i),o.__fetchListeners.push(()=>c.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),c=e.node;c&&(c.addEventListener("click",i),o.__fetchListeners.push(()=>c.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},qs=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),zs();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:Jt(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&St(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=Ae(e,r),c=Ws(t,i),a=te(c),l=lr(t.cache);(!a||a.stale||Date.now()-a.time>(l?.staleTime||0))&&St(t,e,r,{force:!0})};jt.focus.add(s),n.__fetchCleanups.push(()=>jt.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>St(t,e,r,{force:!0});jt.online.add(s),n.__fetchCleanups.push(()=>jt.online.delete(s))}},Qs=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():I(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=v(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Tt(t,i,o),s},fr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Tt(t,n,e.as),delete r.__optimisticSnapshot)},Js=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await ur(n,r);if(!o)return;let s=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:p,headers:d,baseUrl:h,invalidates:g,optimistic:x,onMutate:m,onSuccess:y,onError:b,onSettled:C}=t,S;if(a===!0||u==="submit")S=Yt(e);else if(R(a)){let B=Yt(e);S={};for(let X of a)S[X]=B[X]}else e.state?.parse?S=e.state.parse():I(e.state)&&(S={...e.state});l&&(S=l(S,e,e.state)),v(m)&&m(S,e,e.state);let T=x?Qs(e,t,S):null;s.__fetching=!0,pt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),nt(e,"onFetchStart"),ft(t,e,"onFetchStart");let E=r?.analyze?.emitNetwork,Z=E?typeof performance<"u"?performance.now():Date.now():0;E&&E({phase:"start",mode:"mutation",from:c,method:i});try{if(p!==!1&&o.auth!==!1&&o.getSession){let ut=await o.getSession();if(p===!0&&!ut){T!==void 0&&fr(e,t);let ct={message:"Not authenticated"};nt(e,"onFetchError",ct),ft(t,e,"onFetchError",ct);return}}let B=o[i];if(!v(B))return;let X={from:c,data:S,headers:d,baseUrl:h};t.params&&(X.params=Rn(t.params,e,r));let U=Ae(e,r);U&&(X.headers={...X.headers,"Accept-Language":U});let gt=Tn(t),M=await Pn(()=>B(X),gt),{data:D,error:it}=M||{};if(it){T!==void 0&&fr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:it,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",it),v(b)&&b(it,S,e),v(C)&&C(null,it,S,e),E&&E({phase:"error",mode:"mutation",from:c,method:i,error:it.message||String(it),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z});return}if(delete s.__optimisticSnapshot,D!==void 0){let ut=f?{[f]:D}:D;e.state?.update&&e.state.update(ut,{preventFetch:!0})}if(pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),nt(e,"onFetchComplete",D),ft(t,e,"onFetchComplete",D),v(y)&&y(D,S,e),v(C)&&C(D,null,S,e),E&&E({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-Z}),g){let ut=R(g)?g:[g];for(let ct of ut)if(ct===!0||ct==="*")for(let[ue]of H)ue.startsWith(c+":")&&Xt(ue);else Xt(ct)}}catch(B){T!==void 0&&fr(e,t),pt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),nt(e,"onFetchError",B),ft(t,e,"onFetchError",B),v(b)&&b(B,S,e),v(C)&&C(null,B,S,e),E&&E({phase:"error",mode:"mutation",from:c,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-Z})}finally{s.__fetching=!1}},pr=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=Ft(t,e);if(!s)return;let i=R(s)?s.map(a=>An(Ft(a,e),e)).filter(Boolean):[An(s,e)].filter(Boolean);for(let a of i){let l=a.method==="insert"||a.method==="update"||a.method==="upsert"||a.method==="delete",f=l?Js:St;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{Ks({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&qs(a,e,n)}let c=e.__ref;c.refetch=a=>{for(let l of i)St(l,e,n,{force:!0,...a})},c.fetchNextPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__nextPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"next",force:!0})},c.fetchPreviousPage=()=>{let a=i[0];if(!a||!a.infinite)return;let l=c.__prevPageParam;if(l==null)return;let f={...a,cursor:l};St(f,e,n,{direction:"previous",force:!0})}},Zs={invalidateQueries:t=>{if(!t){Xt();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Xt(e);else if(R(t)){let e=t.join(":");for(let[r]of H)r.includes(e)&&Xt(r)}},removeQueries:t=>{if(!t){Ce();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Ce(e)},getQueryData:t=>te(t)?.data??void 0,setQueryData:(t,e)=>{let r=te(t),n=v(e)?e(r?.data):e;Zt(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await ur(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!v(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let c=Zt(o,i.data,null);c.gcTime=lr(t.cache)?.gcTime||3e5}return i},getCache:()=>H,clear:()=>Ce(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of H)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Ce(r))}},Xs={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Qt.clear(),pr(e,t,t.state,t.context))}},Ys=pr});function Fn(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function jn(){return this.getRef("__children").map(e=>this[e])}function Mn(){return this.getRef().path}function Nn(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=In();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=v(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=In()),t?e?.[t]:e}function Ln(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Vn(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Bn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Un(t){let e=this.context;return t?e[t]:e}function hr(...t){if(Mt!=="test"&&Mt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
2
- `,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(o=>console.log(`%c${o}:`,"font-weight: bold",e[o]))),console.log(e),console.groupEnd(e.key),e}function Wn(...t){(Mt==="test"||Mt==="development")&&console.warn(...t)}function Gn(...t){if(Mt==="test"||Mt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&hr.call(this),new Error(...t)}}function zn(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Hn(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function Kn(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,$t(r));for(let c in n)r[c]=n[c];return i},timeout:(s,i)=>{if(!o)return;let c=setTimeout(()=>{s(n),clearTimeout(c)},i)}}}async function qn(){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 Promise.resolve().then(()=>(re(),ee));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(re(),ee));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(re(),ee)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(re(),ee));await o(n,t.context)}return n}function Qn(t){let e=this,r=t||dn.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(dr(e,n),r===!0)return n;let o=ai[r];return o?o(n):n}var Mt,ti,In,dr,ei,Jn,ri,ni,oi,si,ii,ci,ai,Zn=w(()=>{"use strict";Ht();be();sr();Mt="production";ti=null,In=()=>ti||null;dr=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&ei(e,n);let o=r.__children;if(o)for(let c=0;c<o.length;c++){let a=t[o[c]];a&&a.__ref&&dr(a,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&dr(i,e)},ei=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),o=t;for(let s=0;s<n.length;s++){let i=n[s];s===n.length-1?o[i]||(o[i]=!0):(o[i]===!0&&(o[i]={}),o[i]||(o[i]={}),o=o[i])}},Jn=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([s,i])=>i===!0?`${r}${s}`:`${r}${s} {
3
- ${Jn(i,e+1)}
1
+ "use strict";var SymbolsEmbed=(()=>{var Le=Object.defineProperty;var xs=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Ss=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var Rt=(t,e)=>{for(var r in e)Le(t,r,{get:e[r],enumerable:!0})},ws=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _s(e))!Ss.call(t,o)&&o!==r&&Le(t,o,{get:()=>e[o],enumerable:!(n=xs(e,o))||n.enumerable});return t};var vs=t=>ws(Le({},"__esModule",{value:!0}),t);var ct,$t,Ze=w(()=>{ct=globalThis,$t=ct.document});var me,Ye=w(()=>{Ze();me=t=>typeof ct<"u"&&(ct.Node&&t instanceof ct.Node||ct.Window&&t instanceof ct.Window||t===ct||t===document)});var R,_,ye,k,j,xt,zr,Ht=w(()=>{R=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,_=t=>typeof t=="string",ye=t=>typeof t=="number",k=t=>typeof t=="function",j=t=>Array.isArray(t),xt=t=>t===null?!1:typeof t=="object",zr=t=>t===void 0});var Hr,tr=w(()=>{be();Hr=(t,e=[])=>t.reduce((r,n)=>er(r,It(n,{exclude:e}),e),{})});function xe(t,e,r={}){let{bracketsLength:n=2}=r,o=n===3?"{{{":"{{";if(!t.includes(o))return t;let s=$s[n],i=e||this.state||{},a=this;return t.replace(s,(c,f,l,u)=>{let h=l.trim();if(u){let p=a?.context,d=p?.functions?.[u]||p?.utils?.[u]||p?.methods?.[u]||p?.snippets?.[u]||a?.[u];if(d&&typeof d=="function")try{return String(d.call(a,h)??"")}catch{return""}return""}if(f){let p=(f.match(/\.\.\//g)||[]).length,d=i;for(let b=0;b<p;b++){if(!d||!d.parent)return"";d=d.parent}if(h==="parent")return String(d.value??"");let g=qt(d,h);return String(g??"")}else{let p=qt(i,h);if(p!=null)return String(p);let d=a?.context?.polyglot;if(d?.translations){let g=i?.root?.lang||i?.lang||a?.context?.state?.lang||d.defaultLang||"en",b=d.translations[g];if(b){let m=qt(b,h);if(m!=null&&typeof m!="object")return String(m);for(let x in b){let v=b[x];if(v&&typeof v=="object"&&!Array.isArray(v)){let S=qt(v,h);if(S!=null&&typeof S!="object")return String(S)}}}let y=qt(d.translations,h);if(y!=null&&typeof y!="object")return String(y)}return""}})}var $s,qt,qr=w(()=>{$s={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},qt=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var Es,Ts,Ps,Kr,rr=w(()=>{Es=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"]),Ts=new Set(["update","__element"]),Ps=new Set(["set","reset","update","remove","updateContent","removeContent","lookup","lookdown","lookdownAll","getRef","getPath","setNodeStyles","spotByPath","keys","parse","setProps","parseDeep","variables","if","log","verbose","warn","error","call","nextElement","previousElement","getRootState","getRoot","getRootData","getRootContext","getContext","getQuery","getDB","getChildren","preventContentUpdate","preventContentRecreate"]),Kr=new Set(["node","context","extends","__element","__ref",...Ps,...Es,...Ts])});var Qr,Ft,er,Jr,It,be=w(()=>{Ht();tr();Ye();rr();Qr=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Ft=(t,e,r,n)=>{if(k(t))return e?typeof t.call!="function"?t:t.call(e,e,r||e.state,n||e.context):void 0;if(t!=null&&e?.context?.plugins&&(j(t)||R(t)&&!me(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 Ft(i,e,r,n)}}return t},er=(t,e,r=Kr)=>Jr(t,e,r,null),Jr=(t,e,r,n)=>{if(t===e)return t;if(n){for(let s=0;s<n.length;s+=2)if(n[s]===t&&n[s+1]===e)return t}let o=r instanceof Set;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||Qr(s)||s==="constructor"||s==="prototype"||(o?r.has(s):r.includes(s)))continue;let i=t[s],a=e[s];if(xt(i)&&xt(a)){let c=n||[];c.push(t,e),Jr(i,a,r,c),c.length-=2}else i===void 0&&(t[s]=a)}return t},It=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:o=!1,visited:s=new WeakMap,handleExtends:i=!1}=e;if(!xt(t)||me(t))return t;if(s.has(t))return s.get(t);let a=r instanceof Set?r:r.length>3?new Set(r):null,c=u=>a?a.has(u):r.includes(u),f=j(t)?[]:{};s.set(t,f);let l=[[t,f]];for(;l.length;){let[u,h]=l.pop();for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||Qr(p)||p==="__proto__"||c(p))continue;let d=u[p];if(!(n&&d===void 0)&&!(o&&d===null)){if(me(d)){h[p]=d;continue}if(i&&p==="extends"&&j(d)){h[p]=Hr(d,r);continue}if(k(d)){h[p]=d;continue}if(xt(d))if(s.has(d))h[p]=s.get(d);else{let g=j(d)?[]:{};s.set(d,g),h[p]=g,l.push([d,g])}else h[p]=d}}}return f}});var Xr=w(()=>{});var Zr,js,nr,Yr=w(()=>{Zr="production",js=(t=Zr)=>t==="production",nr=(t=Zr)=>!js(t)});var tn=w(()=>{});var en=w(()=>{});var rn=w(()=>{});var Sc,nn=w(()=>{Sc=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var on=w(()=>{});var sn=w(()=>{});var an=w(()=>{});var cn=w(()=>{});var ln=w(()=>{});var fn=w(()=>{});var un=w(()=>{});var dn=w(()=>{});var pn,or=w(()=>{pn={}});var mn={};Rt(mn,{setup:()=>Is,supabaseAdapter:()=>gn});var hn,Rs,Is,sr,Fs,gn,yn=w(()=>{"use strict";hn=new Map,Rs=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,Is=async({url:t,key:e,projectId:r,createClient:n,auth:o,retry:s,adapter:i,...a})=>{let c=t||r&&`https://${r}.supabase.co`;if(!c||!e)throw new Error("@symbo.ls/fetch supabase: url (or projectId) and key are required");n||(n=(await import("@supabase/supabase-js")).createClient),o===!1&&(a.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let f=Rs(c,e,o===!1),l=hn.get(f);return l||(l=await n(c,e,a),l?.auth&&hn.set(f,l)),!l||!l.auth?null:gn(l)},sr=(t,e)=>{if(!e)return t;for(let r in e){let n=e[r];if(n===null)t=t.is(r,null);else if(Array.isArray(n))t=t.in(r,n);else if(typeof n=="object")for(let o in n)o==="gt"?t=t.gt(r,n[o]):o==="gte"?t=t.gte(r,n[o]):o==="lt"?t=t.lt(r,n[o]):o==="lte"?t=t.lte(r,n[o]):o==="neq"?t=t.neq(r,n[o]):o==="like"?t=t.like(r,n[o]):o==="ilike"?t=t.ilike(r,n[o]):o==="in"?t=t.in(r,n[o]):o==="is"?t=t.is(r,n[o]):o==="contains"?t=t.contains(r,n[o]):o==="containedBy"?t=t.containedBy(r,n[o]):o==="textSearch"&&(t=t.textSearch(r,n[o]));else t=t.eq(r,n)}return t},Fs=(t,{limit:e,offset:r,order:n,single:o}={})=>{if(n)if(Array.isArray(n))for(let s of n){let i=typeof s=="string"?s:s.by;t=t.order(i,{ascending:s.asc!==!1})}else{let s=typeof n=="string"?n:n.by;t=t.order(s,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),o&&(t=t.single()),t},gn=t=>({name:"supabase",client:t,getSession:async()=>{let{data:e}=await t.auth.getSession();return e?.session||null},getUser:async()=>{let{data:e}=await t.auth.getUser();return e?.user||null},signIn:e=>e.provider?t.auth.signInWithOAuth({provider:e.provider}):e.token?t.auth.signInWithIdToken(e):t.auth.signInWithPassword(e),signUp:e=>t.auth.signUp(e),signOut:()=>t.auth.signOut(),onAuthStateChange:e=>{let{data:{subscription:r}}=t.auth.onAuthStateChange((n,o)=>e(n,o));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:o,headers:s,...i})=>{let c=(r?t.schema(r):t).from(e).select(n||"*");if(c=sr(c,o),c=Fs(c,i),s)try{for(let f in s)c.setHeader?c=c.setHeader(f,s[f]):t.rest&&(t.rest.headers[f]=s[f])}catch(f){console.warn("[supabase] setHeader failed:",f.message)}return c},rpc:({from:e,params:r})=>t.rpc(e,r),insert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).insert(n).select(o||"*"),update:({from:e,schema:r,data:n,params:o,select:s})=>{let a=(r?t.schema(r):t).from(e).update(n);return a=sr(a,o),a.select(s||"*")},upsert:({from:e,schema:r,data:n,select:o})=>(r?t.schema(r):t).from(e).upsert(n).select(o||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=sr(n,r),n},subscribe:({from:e,params:r,on:n},o)=>{let s=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:s,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},a=>o(a.new,a.old,a)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:o})=>t.storage.from(e).upload(r,n,o),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var xn={};Rt(xn,{restAdapter:()=>bn,setup:()=>Ms});var Ds,_t,Ms,bn,_n=w(()=>{"use strict";Ds=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",o=new URL(`${t}${n}${e}`);if(r)for(let s in r){let i=r[s];i!=null&&o.searchParams.set(s,typeof i=="object"?JSON.stringify(i):i)}return o.toString()},_t=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),o=n&&n.includes("json")?await r.json():await r.text();return{data:o,error:r.ok?null:o?.message||o?.error||r.statusText,status:r.status}},Ms=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return bn(t,e,r,n)},bn=(t,e={},r,n={})=>{let o=r?.token||null,s=l=>{let u={...e,...l};return o&&(u.Authorization=`Bearer ${o}`),u},i=l=>({...s(l),"Content-Type":"application/json"}),a=l=>({...n,...l}),c=(l,u)=>{let h=u||t;if(l&&(l.startsWith("http://")||l.startsWith("https://")))return l;let p=l&&!l.startsWith("/")?"/":"";return`${h}${p}${l||""}`};return{name:"rest",setToken:l=>{o=l},getSession:async()=>{if(!r?.sessionUrl)return o?{token:o}:null;let l=await _t(c(r.sessionUrl,r.baseUrl),a({headers:s()}));return l.error?null:l.data},signIn:async l=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await _t(c(r.signInUrl,r.baseUrl),a({method:"POST",headers:i(),body:JSON.stringify(l)}));return u.data?.token&&(o=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await _t(c(r.signOutUrl,r.baseUrl),a({method:"POST",headers:s()})),o=null,{error:null}),select:({from:l,params:u,select:h,limit:p,offset:d,order:g,single:b,headers:y,baseUrl:m})=>{let x={...u};return h&&(x.select=h),p&&(x.limit=p),d&&(x.offset=d),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(v=>`${v.by}:${v.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),_t(Ds(m||t,l||"",x),a({headers:s(y)}))},rpc:({from:l,params:u,headers:h,baseUrl:p})=>_t(c(`rpc/${l}`,p),a({method:"POST",headers:i(h),body:JSON.stringify(u)})),insert:({from:l,data:u,headers:h,baseUrl:p})=>_t(c(l,p),a({method:"POST",headers:i(h),body:JSON.stringify(u)})),update:({from:l,data:u,params:h,method:p,headers:d,baseUrl:g})=>{let b=h?.id||u?.id,y=b?`${l}/${b}`:l;return _t(c(y,g),a({method:p||"PATCH",headers:i(d),body:JSON.stringify(u)}))},delete:({from:l,params:u,headers:h,baseUrl:p})=>{let d=u?.id,g=d?`${l}/${d}`:l;return _t(c(g,p),a({method:"DELETE",headers:s(h)}))}}}});var wn={};Rt(wn,{localAdapter:()=>Sn,setup:()=>Ns});var ir,Ls,Ns,Sn,vn=w(()=>{"use strict";ir=(t,e)=>{if(!e)return!0;for(let r in e){let n=e[r];if(n===null){if(t[r]!==null&&t[r]!==void 0)return!1}else if(Array.isArray(n)){if(!n.includes(t[r]))return!1}else if(typeof n=="object"){for(let o in n)if(o==="gt"&&!(t[r]>n[o])||o==="gte"&&!(t[r]>=n[o])||o==="lt"&&!(t[r]<n[o])||o==="lte"&&!(t[r]<=n[o])||o==="neq"&&t[r]===n[o]||o==="like"&&!String(t[r]).includes(n[o]))return!1}else if(t[r]!==n)return!1}return!0},Ls=(t,{order:e,limit:r,offset:n,single:o})=>{let s=[...t];if(e){let i=typeof e=="string"?e:e.by,a=e.asc!==!1;s.sort((c,f)=>c[i]<f[i]?a?-1:1:c[i]>f[i]?a?1:-1:0)}return n&&(s=s.slice(n)),r&&(s=s.slice(0,r)),o?{data:s[0]||null,error:null}:{data:s,error:null}},Ns=async({data:t,...e})=>Sn(t,e),Sn=(t={},e={})=>{let r={},n={},o=e.persist!==!1&&typeof localStorage<"u",s=e.prefix||"smbls_db_",i=l=>{if(!r[l])if(o)try{let u=localStorage.getItem(s+l);r[l]=u?JSON.parse(u):t[l]||[]}catch{r[l]=t[l]||[]}else r[l]=t[l]||[];return r[l]},a=l=>{if(o)try{localStorage.setItem(s+l,JSON.stringify(r[l]))}catch{}},c=(l,u,h,p)=>{let d=n[l];if(d)for(let g of d)g(h,p,{event:u,table:l})},f=Date.now();return{name:"local",store:r,select:async({from:l,params:u,...h})=>{let d=i(l).filter(g=>ir(g,u));return Ls(d,h)},insert:async({from:l,data:u})=>{let h=i(l),d=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++f,...g};return h.push(b),b});a(l);for(let g of d)c(l,"INSERT",g,null);return{data:Array.isArray(u)?d:d[0],error:null}},update:async({from:l,data:u,params:h})=>{let p=i(l),d=[];for(let g=0;g<p.length;g++)if(ir(p[g],h)){let b={...p[g]};Object.assign(p[g],u),d.push(p[g]),c(l,"UPDATE",p[g],b)}return a(l),{data:d,error:null}},delete:async({from:l,params:u})=>{let h=i(l),p=[];for(let d=h.length-1;d>=0;d--)ir(h[d],u)&&(p.push(h[d]),h.splice(d,1),c(l,"DELETE",null,p[p.length-1]));return a(l),{data:p,error:null}},subscribe:({from:l,on:u},h)=>{n[l]||(n[l]=[]);let p=(d,g,b)=>{u&&u!=="*"&&u!==b.event||h(d,g,b)};return n[l].push(p),()=>{let d=n[l].indexOf(p);d>-1&&n[l].splice(d,1)}}}}});var te={};Rt(te,{createAdapter:()=>Us,default:()=>Ys,executeFetch:()=>ur,fetchPlugin:()=>Zs,initAdapterAuth:()=>ve,parseDuration:()=>Qt,queryClient:()=>Xs,registerAdapter:()=>Bs,resolveDb:()=>$n});var Vs,_e,On,Bs,Us,$n,Qt,H,En,Kt,Ws,Yt,Jt,Xt,Se,lr,we,Gs,kn,ar,Tn,Pn,Dt,Cn,zs,An,Hs,ke,jn,ve,fr,rt,lt,Zt,Et,dt,St,qs,Ks,Qs,cr,Js,ur,Xs,Zs,Ys,ee=w(()=>{"use strict";D();Vs=["select","rpc","insert","update","delete","subscribe"],_e=Symbol.for("@symbo.ls/fetch:BUILTIN_ADAPTERS"),On=(()=>{if(typeof globalThis<"u"&&globalThis[_e])return globalThis[_e];let t={supabase:()=>Promise.resolve().then(()=>(yn(),mn)),rest:()=>Promise.resolve().then(()=>(_n(),xn)),local:()=>Promise.resolve().then(()=>(vn(),wn))};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,_e,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[_e]}catch{}return t})(),Bs=(t,e)=>{On[t]=e},Us=t=>{let e={};for(let r of Vs)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},$n=async t=>{if(!t)return null;if(typeof t.select=="function")return t;let{adapter:e,...r}=t,n=typeof e=="string"?e:typeof t=="string"?t:null;if(!n)return null;let o=On[n];if(!o)throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);return(await o()).setup(r)},Qt=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 r=parseInt(e[1]),n=e[2];return n==="ms"?r:n==="s"?r*1e3:n==="m"?r*6e4:n==="h"?r*36e5:0},H=new Map,En=new Map,Kt=new Map,Ws=(t,e)=>{if(t.cache?.key)return t.cache.key;let r=Hs(t.params),n=`${t.from}:${t.method}:${JSON.stringify(r||"")}`;return e?`${n}:${e}`:n},Yt=t=>H.get(t)||null,Jt=(t,e,r)=>{let n=H.get(t),o={data:e,error:r,time:Date.now(),stale:!1};H.set(t,o);let s=En.get(t);if(s)for(let i of s)k(i)&&i(o);return o},Xt=t=>{if(t){let e=H.get(t);e&&(e.stale=!0);return}for(let[,e]of H)e.stale=!0},Se=t=>{if(t){H.delete(t);return}H.clear()},lr=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)}:_(t)?{staleTime:Qt(t),gcTime:3e5}:{staleTime:Qt(t.stale||t.staleTime)||6e4,gcTime:Qt(t.gc||t.gcTime||t.expire)||3e5,key:t.key},we=null,Gs=()=>{we||(we=setInterval(()=>{let t=Date.now();for(let[e,r]of H){let n=En.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&H.delete(e)}},3e4),we.unref&&we.unref())};Gs();kn=3,ar=t=>Math.min(1e3*2**t,3e4),Tn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:kn,delay:ar}:typeof e=="number"?{count:e,delay:ar}:{count:e.count??kn,delay:k(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:ar}},Pn=async(t,e)=>{let{count:r,delay:n}=e,o;for(let s=0;s<=r;s++)try{let i=await t();if(i?.error){if(o=i.error,s<r){let a=k(n)?n(s,o):n;await new Promise(c=>setTimeout(c,a));continue}return i}return i}catch(i){if(o=i,s<r){let a=k(n)?n(s,i):n;await new Promise(c=>setTimeout(c,a));continue}throw i}return{data:null,error:o}},Dt={focus:new Set,online:new Set},Cn=!1,zs=()=>{if(Cn||typeof window>"u")return;Cn=!0;let t=()=>{for(let r of Dt.focus)r()},e=()=>{for(let r of Dt.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},An=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(_(t))return{from:t,method:"select",query:!0,on:"create"};if(R(t)){let n={...t};return n.from=n.from||r.__state||e.key,n.method=n.method||"select",n.on=n.on||"create",n.query===void 0&&(n.query=!0),n}return null},Hs=t=>(!t||k(t),t),ke=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},jn=(t,e,r)=>{let n;if(!t)n=void 0;else if(k(t))n=t(e,e.state);else{n={};for(let o in t){let s=t[o];n[o]=k(s)?s(e,e.state):s}}return n},ve=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,o)=>{let s=e.state?.root;s?.update&&s.update({auth:{user:n,session:o,loading:!1}})};try{let n=await t.getSession();r(n?.user||null,n)}catch(n){console.warn("[fetch] Failed to restore auth session:",n.message)}t.onAuthStateChange&&t.onAuthStateChange((n,o)=>{r(o?.user||null,o)})},fr=async(t,e)=>{if(k(t.select))return t.auth!==!1&&await ve(t,e),t;if(t.__resolved)return t.auth!==!1&&await ve(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=$n(t);let r=await t.__resolving;return delete t.__resolving,r?(r.auth=t.auth,r.url=t.url,r.key=t.key,t.__resolved=r,e.fetch=r,t.auth!==!1&&await ve(r,e),r):null},rt=(t,e,...r)=>{let n=k(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},lt=(t,e,r,...n)=>{let o=t&&k(t[r])?t[r]:null;o&&o.call(e,...n,e,e.state,e.context)},Zt=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let o=new FormData(r);for(let[s,i]of o.entries())e[s]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let o=0;o<n.length;o++){let s=n[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},Et=(t,e,r,n={})=>{let o=r&&r.startsWith("~/"),s=o&&t.state?.root||t.state;if(s?.update)if(o){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?s.update(e,{preventFetch:!0,...n}):s.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;s.update(i,{preventFetch:!0,...n})}},dt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},St=async(t,e,r,n={})=>{let o=r?.fetch;if(!o||!e||!e.__ref||t.enabled===!1||k(t.enabled)&&!t.enabled(e,e.state)||t.skip===!0||k(t.skip)&&t.skip(e,e.state))return;let s=await fr(o,r);if(!s||!e.__ref)return;let i=e.__ref,{from:a,method:c,query:f,params:l,cache:u,transform:h,single:p,auth:d,fields:g,as:b,limit:y,offset:m,order:x,headers:v,baseUrl:S,page:T,cursor:$,getNextPageParam:X,getPreviousPageParam:B,infinite:Z,placeholderData:U,initialData:gt,select:M,keepPreviousData:I}=t,st=_(M)?M:void 0;if(f&&k(e.getQuery)){let P=e.getQuery(s.name||"paths");P&&(st=P.select||P.length&&P.join(",")||st)}let ut=jn(l,e,r),it=lr(u),ue=Tn(t),Fe=ke(e,r),ys=Fe?`:${Fe}`:"",L=it?u?.key||`${a}:${c}:${JSON.stringify(ut||"")}${Z?":infinite":""}${T?":p"+JSON.stringify(T):""}${ys}`:null;if(!i.__fetchInitialized&&L&&(i.__fetchInitialized=!0,gt!==void 0)){let P=k(gt)?gt():gt;Jt(L,P,null)}if((c==="select"||c==="rpc")&&L&&it){let P=Yt(L);if(P&&!P.error){let E=Date.now()-P.time,F=P.stale||E>(it.staleTime||0),A=P.data;if(k(M)&&(A=M(A,e,e.state)),h&&(A=h(A,e,e.state)),Et(e,A,b),!F){dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(U!==void 0){let E=k(U)?U(e,e.state):U;E!==void 0&&Et(e,E,b)}}if(L&&Kt.has(L)&&!n.force){let P=Kt.get(L);try{let E=await Promise.race([P,new Promise((F,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if(E?.data!==void 0){let F=E.data;k(M)&&(F=M(F,e,e.state)),h&&(F=h(F,e,e.state)),Et(e,F,b),rt(e,"onFetchComplete",F),lt(t,e,"onFetchComplete",F)}}catch{}return}let bs=!Yt(L)?.data;dt(e,{isFetching:!0,isLoading:bs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),lt(t,e,"onFetchStart");let mt=r?.analyze?.emitNetwork,De=mt?typeof performance<"u"?performance.now():Date.now():0;mt&&mt({phase:"start",mode:"query",from:a,method:c,cacheKey:L,lang:Fe});let Vr=Pn(async()=>{if(d!==!1&&s.auth!==!1&&s.getSession){let A=await s.getSession();if(d===!0&&!A){let z={message:"Not authenticated"};return dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:z,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",z),lt(t,e,"onFetchError",z),{data:null,error:z}}}let P=s[c];if(!k(P))return{data:null,error:{message:`Method "${c}" not found on adapter`}};let E={from:a,select:st,params:ut,single:p,limit:y,offset:m,order:x,headers:v,baseUrl:S},F=ke(e,r);if(F&&(E.headers={...E.headers,"Accept-Language":F}),T!==void 0){if(R(T))T.offset!==void 0&&(E.offset=T.offset),T.limit!==void 0&&(E.limit=T.limit),T.cursor!==void 0&&(E.params={...E.params,cursor:T.cursor});else if(typeof T=="number"){let A=t.pageSize||y||20;E.offset=(T-1)*A,E.limit=A}}if($!==void 0&&(E.params={...E.params,cursor:$}),c==="insert"||c==="update"||c==="upsert"){let A;if(g===!0||t.on==="submit")A=Zt(e);else if(j(g)){let z=Zt(e);A={};for(let Me of g)A[Me]=z[Me]}else e.state?.parse?A=e.state.parse():R(e.state)&&(A={...e.state});h&&(A=h(A,e,e.state)),E.data=A}if(c==="rpc"){let A=ut;if(t.on==="submit"){let z=Zt(e);A=t.transformParams?t.transformParams(z,e,e.state):z}E.params=A}if(c==="subscribe"){let A=s.subscribe({from:a,params:ut,on:t.subscribeOn},(z,Me,Va)=>{Et(e,z,b),rt(e,"onFetchComplete",z),lt(t,e,"onFetchComplete",z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return P(E)},ue);L&&Kt.set(L,Vr);try{let P=await Vr;if(P?.subscribed)return;let{data:E,error:F}=P||{};if(F){L&&Jt(L,null,F),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:F,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",F),lt(t,e,"onFetchError",F),mt&&mt({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:F.message||F,durationMs:(typeof performance<"u"?performance.now():Date.now())-De});return}if(E!==void 0){if((c==="select"||c==="rpc")&&L){let z=Jt(L,E,null);z.gcTime=it?.gcTime||3e5}let A=E;Z&&j(E)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift(E):i.__pages.push(E),A=i.__pages.flat(),X&&(i.__nextPageParam=X(E,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),B&&(i.__prevPageParam=B(E,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),k(M)&&(A=M(A,e,e.state)),h&&(A=h(A,e,e.state)),(!I||A!==void 0)&&Et(e,A,b),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",A),lt(t,e,"onFetchComplete",A),mt&&mt({phase:"success",mode:"query",ok:!0,from:a,method:c,cacheKey:L,durationMs:(typeof performance<"u"?performance.now():Date.now())-De})}}catch(P){dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",P),lt(t,e,"onFetchError",P),mt&&mt({phase:"error",mode:"query",from:a,method:c,cacheKey:L,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-De})}finally{L&&Kt.delete(L)}},qs=(t,e,r)=>{let n=t.on,o=e.__ref;o.__fetchListeners||(o.__fetchListeners=[]);let s=t.__runner||St;if(n==="submit"){let i=c=>{c.preventDefault(),s(t,e,r)},a=e.node;a&&(a.addEventListener("submit",i),o.__fetchListeners.push(()=>a.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>s(t,e,r),a=e.node;a&&(a.addEventListener("click",i),o.__fetchListeners.push(()=>a.removeEventListener("click",i)))}else n==="stateChange"&&(o.__fetchOnStateChange=()=>s(t,e,r))},Ks=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),zs();let o=t.refetchInterval;if(o){let s=typeof o=="number"?o:Qt(o);if(s>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&St(t,e,r,{force:!0})},s);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let s=()=>{let i=ke(e,r),a=Ws(t,i),c=Yt(a),f=lr(t.cache);(!c||c.stale||Date.now()-c.time>(f?.staleTime||0))&&St(t,e,r,{force:!0})};Dt.focus.add(s),n.__fetchCleanups.push(()=>Dt.focus.delete(s))}if(t.refetchOnReconnect!==!1){let s=()=>St(t,e,r,{force:!0});Dt.online.add(s),n.__fetchCleanups.push(()=>Dt.online.delete(s))}},Qs=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,o=e.as,s=t.state?.parse?t.state.parse():R(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=s;let i=k(e.optimistic)?e.optimistic(r,s,t):e.optimistic;return i!==void 0&&Et(t,i,o),s},cr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Et(t,n,e.as),delete r.__optimisticSnapshot)},Js=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let o=await fr(n,r);if(!o)return;let s=e.__ref,{method:i,from:a,fields:c,transform:f,as:l,on:u,auth:h,headers:p,baseUrl:d,invalidates:g,optimistic:b,onMutate:y,onSuccess:m,onError:x,onSettled:v}=t,S;if(c===!0||u==="submit")S=Zt(e);else if(j(c)){let B=Zt(e);S={};for(let Z of c)S[Z]=B[Z]}else e.state?.parse?S=e.state.parse():R(e.state)&&(S={...e.state});f&&(S=f(S,e,e.state)),k(y)&&y(S,e,e.state);let T=b?Qs(e,t,S):null;s.__fetching=!0,dt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),rt(e,"onFetchStart"),lt(t,e,"onFetchStart");let $=r?.analyze?.emitNetwork,X=$?typeof performance<"u"?performance.now():Date.now():0;$&&$({phase:"start",mode:"mutation",from:a,method:i});try{if(h!==!1&&o.auth!==!1&&o.getSession){let ut=await o.getSession();if(h===!0&&!ut){T!==void 0&&cr(e,t);let it={message:"Not authenticated"};rt(e,"onFetchError",it),lt(t,e,"onFetchError",it);return}}let B=o[i];if(!k(B))return;let Z={from:a,data:S,headers:p,baseUrl:d};t.params&&(Z.params=jn(t.params,e,r));let U=ke(e,r);U&&(Z.headers={...Z.headers,"Accept-Language":U});let gt=Tn(t),M=await Pn(()=>B(Z),gt),{data:I,error:st}=M||{};if(st){T!==void 0&&cr(e,t),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:st,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",st),k(x)&&x(st,S,e),k(v)&&v(null,st,S,e),$&&$({phase:"error",mode:"mutation",from:a,method:i,error:st.message||String(st),durationMs:(typeof performance<"u"?performance.now():Date.now())-X});return}if(delete s.__optimisticSnapshot,I!==void 0){let ut=l?{[l]:I}:I;e.state?.update&&e.state.update(ut,{preventFetch:!0})}if(dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),rt(e,"onFetchComplete",I),lt(t,e,"onFetchComplete",I),k(m)&&m(I,S,e),k(v)&&v(I,null,S,e),$&&$({phase:"success",mode:"mutation",ok:!0,from:a,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-X}),g){let ut=j(g)?g:[g];for(let it of ut)if(it===!0||it==="*")for(let[ue]of H)ue.startsWith(a+":")&&Xt(ue);else Xt(it)}}catch(B){T!==void 0&&cr(e,t),dt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:B,status:"error",fetchStatus:"idle"}),rt(e,"onFetchError",B),lt(t,e,"onFetchError",B),k(x)&&x(B,S,e),k(v)&&v(null,B,S,e),$&&$({phase:"error",mode:"mutation",from:a,method:i,error:B.message||String(B),durationMs:(typeof performance<"u"?performance.now():Date.now())-X})}finally{s.__fetching=!1}},ur=(t,e,r,n)=>{if(!t||!n?.fetch)return;let s=Ft(t,e);if(!s)return;let i=j(s)?s.map(c=>An(Ft(c,e),e)).filter(Boolean):[An(s,e)].filter(Boolean);for(let c of i){let f=c.method==="insert"||c.method==="update"||c.method==="upsert"||c.method==="delete",l=f?Js:St;c.on==="create"?l(c,e,n):Promise.resolve().then(()=>{qs({...c,__runner:l},e,n)}),!f&&c.on==="create"&&(c.refetchInterval||c.refetchOnWindowFocus!==!1||c.refetchOnReconnect!==!1)&&Ks(c,e,n)}let a=e.__ref;a.refetch=c=>{for(let f of i)St(f,e,n,{force:!0,...c})},a.fetchNextPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__nextPageParam;if(f==null)return;let l={...c,cursor:f};St(l,e,n,{direction:"next",force:!0})},a.fetchPreviousPage=()=>{let c=i[0];if(!c||!c.infinite)return;let f=a.__prevPageParam;if(f==null)return;let l={...c,cursor:f};St(l,e,n,{direction:"previous",force:!0})}},Xs={invalidateQueries:t=>{if(!t){Xt();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Xt(e);else if(j(t)){let e=t.join(":");for(let[r]of H)r.includes(e)&&Xt(r)}},removeQueries:t=>{if(!t){Se();return}if(_(t))for(let[e]of H)(e.startsWith(t)||e.includes(t))&&Se(e)},getQueryData:t=>Yt(t)?.data??void 0,setQueryData:(t,e)=>{let r=Yt(t),n=k(e)?e(r?.data):e;Jt(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await fr(r,e);if(!n)return;let o=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,s=n[t.method||"select"];if(!k(s))return;let i=await s({from:t.from,params:t.params,limit:t.limit,offset:t.offset,order:t.order,single:t.single});if(i?.data!==void 0&&!i?.error){let a=Jt(o,i.data,null);a.gcTime=lr(t.cache)?.gcTime||3e5}return i},getCache:()=>H,clear:()=>Se(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of H)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||Se(r))}},Zs={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||Kt.clear(),ur(e,t,t.state,t.context))}},Ys=ur});function Fn(t){let e=this,{__ref:r}=e,n=[].concat(t),o=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;o.key===n[0]&&(n.shift(),!!n.length);)if(o=o[n[0]],!o)return;return o}function Dn(){return this.getRef("__children").map(t=>this[t])}function Mn(){return this.getRef().path}function Ln(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=Rn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),o=k(this.state)&&this.parent.state&&r(this.parent.state);(n||o)&&(e=this.state.root||this.parent.state.root)}return e||(e=Rn()),t?e?.[t]:e}function Nn(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function Vn(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function Bn(t){let e=this.getRoot()?.context;return t?e[t]:e}function Un(t){let e=this.context;return t?e[t]:e}function pr(...t){if(Mt!=="test"&&Mt!=="development")return;let e=this,{__ref:r}=e;return console.groupCollapsed(e.key),t.length?t.forEach(n=>console.log(`%c${n}:
2
+ `,"font-weight: bold",e[n])):(console.log(r.path),e.keys().forEach(n=>console.log(`%c${n}:`,"font-weight: bold",e[n]))),console.log(e),console.groupEnd(e.key),e}function Wn(...t){(Mt==="test"||Mt==="development")&&console.warn(...t)}function Gn(...t){if(Mt==="test"||Mt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&pr.call(this),new Error(...t)}}function zn(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,o=n.indexOf(e),s=n[o+1];return r[s]}function Hn(t){let e=t||this,{key:r,parent:n}=e,{__children:o}=n.__ref;if(!o)return;let s=o.indexOf(r);return n[o[s-1]]}function qn(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},o;for(let s in t)t[s]!==r[s]&&(o=!0,n[s]=t[s]);return{changed:s=>{if(!o)return;let i=s(n,It(r));for(let a in n)r[a]=n[a];return i},timeout:(s,i)=>{if(!o)return;let a=setTimeout(()=>{s(n),clearTimeout(a)},i)}}}async function Kn(){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 Promise.resolve().then(()=>(ee(),te));await o(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ee(),te));await o(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(ee(),te)).then(({resolveDb:o})=>o(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:o}=await Promise.resolve().then(()=>(ee(),te));await o(n,t.context)}return n}function Qn(t){let e=this,r=t||pn.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(dr(e,n),r===!0)return n;let o=ci[r];return o?o(n):n}var Mt,ti,Rn,dr,ei,Jn,ri,ni,oi,si,ii,ai,ci,Xn=w(()=>{Ht();be();or();Mt="production";ti=null,Rn=()=>ti||null;dr=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&ei(e,n);let o=r.__children;if(o)for(let a=0;a<o.length;a++){let c=t[o[a]];c&&c.__ref&&dr(c,e)}let s=r.contentElementKey||"content",i=t[s];i&&i.__ref&&dr(i,e)},ei=(t,e)=>{let r=e.replaceAll("../","").replaceAll("~/","").split("/"),n=t;for(let o=0;o<r.length;o++){let s=r[o];o===r.length-1?n[s]||(n[s]=!0):(n[s]===!0&&(n[s]={}),n[s]||(n[s]={}),n=n[s])}},Jn=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([o,s])=>s===!0?`${r}${o}`:`${r}${o} {
3
+ ${Jn(s,e+1)}
4
4
  ${r}}`).join(`
5
5
  `):""},ri=t=>`{
6
6
  ${Jn(t,1)}
7
- }`,ni=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let c=o?`${o}.${i}`:i;e.include.push(c),r(n[i],c)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},oi=t=>{let e=s=>{let i=[],c=[];for(let a in s)if(s[a]===!0)i.push(a);else{let l=e(s[a]),f=[];l.select&&f.push(`$select=${l.select}`),l.expand&&f.push(`$expand=${l.expand}`),c.push(f.length?`${a}(${f.join(";")})`:a)}return{select:i.length?i.join(","):"",expand:c.length?c.join(","):""}},{select:r,expand:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},si=(t,e)=>{let r=[],n=[],o=new Set,s=(f,u,p)=>{o.add(u),p&&n.push(`LEFT JOIN ${u} ON ${u}.${p}_id = ${p}.id`);for(let d in f)f[d]===!0?r.push(`${u}.${d}`):s(f[d],d,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?s(t[i[0]],i[0],null):s(t,"_root",null);let c=[...o][0]||"_root",a=r.length?r.join(", "):"*",l=n.length?`
7
+ }`,ni=t=>{let e={fields:{},include:[]},r=(n,o)=>{let s=[];for(let i in n)if(n[i]===!0)s.push(i);else{let a=o?`${o}.${i}`:i;e.include.push(a),r(n[i],a)}s.length&&(e.fields[o||"_root"]=s)};return r(t,""),e},oi=t=>{let e=s=>{let i=[],a=[];for(let c in s)if(s[c]===!0)i.push(c);else{let f=e(s[c]),l=[];f.select&&l.push(`$select=${f.select}`),f.expand&&l.push(`$expand=${f.expand}`),a.push(l.length?`${c}(${l.join(";")})`:c)}return{select:i.length?i.join(","):"",expand:a.length?a.join(","):""}},{select:r,expand:n}=e(t),o=[];return r&&o.push(`$select=${r}`),n&&o.push(`$expand=${n}`),o.join("&")},si=(t,e)=>{let r=[],n=[],o=new Set,s=(l,u,h)=>{o.add(u),h&&n.push(`LEFT JOIN ${u} ON ${u}.${h}_id = ${h}.id`);for(let p in l)l[p]===!0?r.push(`${u}.${p}`):s(l[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=r.length?r.join(", "):"*",f=n.length?`
8
8
  `+n.join(`
9
- `):"";return`SELECT ${a}
10
- FROM ${c}${l}`},ii=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},ci=t=>{let e=n=>{let o=[];for(let s in n)n[s]===!0?o.push(s):o.push(`${s}(${e(n[s])})`);return o.join(", ")},r=Object.keys(t);return r.length===1&&t[r[0]]!==!0?{from:r[0],select:e(t[r[0]])}:{from:null,select:e(t)}},ai={graphql:ri,"json-api":ni,odata:oi,sql:si,supabase:ci,paths:ii}});var Xn=w(()=>{"use strict"});var Yn=w(()=>{});var to=w(()=>{"use strict"});var eo=w(()=>{"use strict"});var ro=w(()=>{"use strict"});var no=w(()=>{"use strict"});var oo=w(()=>{"use strict"});var so=w(()=>{"use strict"});var io=w(()=>{"use strict"});var co=w(()=>{"use strict"});var ao=w(()=>{"use strict"});var fo=w(()=>{"use strict"});var lo,uo,po,ho=w(()=>{"use strict";Ht();lo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),uo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),po=t=>{if(R(t))return t;if(_(t))return t.split(" ");if(I(t))return Object.values(t);if(xe(t))return[t]}});var go=w(()=>{"use strict"});var yo=w(()=>{"use strict"});var j=w(()=>{"use strict";Xr();tn();Ht();be();Se();er();tr();en();rn();qr();ye();nn();on();cn();an();sn();fn();ln();nr();un();Zn();sr();Xn();pn();Yn();to();eo();ro();no();oo();so();io();co();ao();fo();ho();go();yo()});var Nc={};Dt(Nc,{FACTORY:()=>Pe,REGISTRY:()=>q,applyExtends:()=>ae,batch:()=>mt,create:()=>st,createEffect:()=>L,createElement:()=>jc,createSignal:()=>at,createStore:()=>et,getActiveConfig:()=>O,mount:()=>Mc,popConfig:()=>K,pushConfig:()=>Q,registerEvent:()=>ce});var At=null,pe=0,de=[],he=()=>At;function at(t){let e=new Set;function r(){return At&&(e.add(At),At._sources.add(s)),t}function n(i){i!==t&&(t=i,As(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var Be=new Set,Ue=!1;function L(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Ur(n);let o=At;At=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{At=o}},_notify(){n._disposed||(pe>0?de.push(n):Wr(n))},dispose(){n._disposed=!0,Ur(n)}};return n._execute(),n}function mt(t){pe++;try{t()}finally{pe--,pe===0&&ks()}}function Wr(t){Be.add(t),Ue||(Ue=!0,queueMicrotask(vs))}function vs(){Ue=!1;let t=Array.from(Be).sort((e,r)=>e._depth-r._depth);Be=new Set;for(let e=0;e<t.length;e++){let r=t[e];r._disposed||r._execute()}}function ks(){for(let t=0;t<de.length;t++)Wr(de[t]);de.length=0}function As(t){let e=Array.from(t);for(let r=0;r<e.length;r++)e[r]._notify()}function Ur(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ot=Symbol("store"),ze=Symbol("signals"),We=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ot]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function et(t,e,r){r===void 0&&(r=0);let n={},o={},s=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let m in t){if(m==="__proto__"||!Object.prototype.hasOwnProperty.call(t,m))continue;let y=t[m];r<s&&y&&typeof y=="object"&&!We(y)?(o[m]=y,n[m]=at(et(y,e,r+1))):(o[m]=y,n[m]=at(y))}let i=new Proxy(o,{get(m,y){if(y===Ot)return!0;if(y===ze)return n;if(y==="__raw")return m;if(y==="update")return c;if(y==="parse")return l;if(y==="clean")return f;if(y==="keys")return u;if(y==="values")return p;if(y==="replace")return d;if(y==="add")return h;if(y==="remove")return g;if(y==="destroy")return x;if(y==="quietUpdate")return a;if(y==="__element")return m.__element;if(y==="parent")return m.parent;if(y==="root")return m.root;if(Object.prototype.hasOwnProperty.call(n,y))return n[y].get();if(m[y]!==void 0)return m[y];if(y!=="root"&&m.root&&m.root!==i)return m.root[y];if(typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&he()!=null)return n[y]=at(void 0),n[y].get()},set(m,y,b){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=b,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=b,b&&typeof b=="object"&&!We(b)?n[y].set(et(b,e,r+1)):n[y].set(b)):(m[y]=b,b&&typeof b=="object"&&!We(b)?n[y]=at(et(b,e,r+1)):n[y]=at(b)),!0)},has(m,y){return y in n||y in m},ownKeys(m){return Object.keys(n)},getOwnPropertyDescriptor(m,y){return y in n?{enumerable:!0,configurable:!0,value:n[y].peek()}:Object.getOwnPropertyDescriptor(m,y)},deleteProperty(m,y){return n[y]&&(n[y].set(void 0),delete n[y]),delete m[y],!0}});function c(m,y){mt(()=>{for(let C in m)C!=="__proto__"&&(i[C]=m[C])});let b=o.__element;return b&&b.onUpdate&&!y?.quiet&&b.onUpdate(b,i,b.context),i}function a(m){return c(m,{quiet:!0})}function l(m){if(m||(m=new Set),m.has(i))return"[Circular]";m.add(i);let y={};for(let b in n){if(b==="parent"||b==="root"||b.startsWith("__"))continue;let C=n[b].peek();C&&C[Ot]?y[b]=C.parse(m):y[b]=C}return y}function f(){return mt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function p(){return Object.keys(n).map(m=>n[m].peek())}function d(m){return mt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)y!=="__proto__"&&(i[y]=m[y])}),i}function h(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function x(){f(),o.__element=null,o.parent=null}return i}function rt(t){return t&&t[Ot]===!0}function He(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=at(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[ze];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[Ot]?c[Ge]:null}return null};return new Proxy(n,{get(i,c){return c===Ot?!0:c===ze?r:c===Ge?e:c==="__raw"?i:Object.prototype.hasOwnProperty.call(r,c)?r[c].get():e&&c!=="then"&&c!=="constructor"?e[c]:i[c]},set(i,c,a){let l=o(c);return l?(l===r&&(i[c]=a),l[c].set(a),!0):(i[c]=a,r[c]=at(a),!0)},has(i,c){if(c in r||c in i)return!0;let a=e;for(;a;){if(c in a)return!0;a=a[Ot]?a[Ge]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,c){return c in r?{enumerable:!0,configurable:!0,value:r[c].peek()}:Object.getOwnPropertyDescriptor(i,c)}})}var Ge=Symbol("scope.parent");var Ke="http://www.w3.org/2000/svg",Je=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"]),Os=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 qe(t){return Os.has(t)||Je.has(t)}function Ze(t){return Je.has(t)}function Wt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&qe(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),qe(o)&&!n.has(o)?o:"div"}var Gr={};function Qe(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(Ze(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===Ke)return r.createElementNS(Ke,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Gt(t){let e=t.tag=Wt(t),n=Ze(e)&&(e==="svg"||t.parent?.node?.namespaceURI===Ke)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Gr[n];if(s||(s=Gr[n]=Qe(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?Qe(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var q=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","__name","__ref","__hash","__text","parent","node"]);var zt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),zr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Xe=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","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var Ye=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ge=["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"];j();var mo=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(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&&Et&&Y){let e=Et.body.appendChild(Et.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){Et.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return Et.body.removeChild(e),[0,0,0,0];t=Y.getComputedStyle(e).color,Et.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]};var fi=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var li=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var ui=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},pi=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],di=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)};var W=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Pt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,hi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ne=t=>{if(!_(t))return null;if(Pt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(hi);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Nt=t=>_(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Oe=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},xo=(t,e)=>{_(t)&&t.includes("rgb")&&(t=mo(t).join(", ")),_(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),xe(e)&&(e+="");let r=li(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=di(r,parseFloat(e));return fi(o).join(", ")}else{let[o,s,i]=t,c=ui(o,s,i),[a,l,f]=c;return pi(a,l,parseFloat(e)/100*255)}};var gr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value};j();j();j();var Ee={};Dt(Ee,{animation:()=>Fi,breakpoints:()=>Ii,class:()=>Bi,color:()=>vi,devices:()=>Di,document:()=>Ri,font:()=>mi,fontFace:()=>_i,fontFamily:()=>xi,fontFamilyTypes:()=>bi,gradient:()=>ki,grid:()=>Vi,icons:()=>Ei,media:()=>Si,reset:()=>Ui,semanticIcons:()=>$i,sequence:()=>Rt,shadow:()=>Oi,spacing:()=>Ci,svg:()=>ji,svgData:()=>Mi,templates:()=>Ni,theme:()=>Ai,timing:()=>Pi,typography:()=>yr,unit:()=>gi,vars:()=>Wi});var Rt={"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 gi={default:"em"};var yi={browserDefault:16,base:16,type:"font-size",ratio:Rt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},yr=yi;var mi={};var xi={},bi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},_i={};var Si={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var wi={base:yr.base,type:"spacing",ratio:Rt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},Ci=wi;var vi={},ki={};var Ai={};var Oi={};var Ei={},$i={};var Ti={default:150,base:150,type:"timing",ratio:Rt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Pi=Ti;var Ri={};var Ii={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Di={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 Fi={};var ji={},Mi={};var Ni={};var Li={},Vi=Li;var Bi={};var Ui={},Wi={};var bo={},_o={},$e=Ee,Te={},So=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in $e){let e=t.toLowerCase();Te[e]=$e[t];let r=So(e);r!==e&&(Te[r]=$e[t]),e!==t&&(Te[t]=$e[t])}var mr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:bo,cssMediaVars:_o,CSS_VARS:bo,CSS_MEDIA_VARS:_o,_scratchConfig:!0,...Te},Il=$t(mr),Pe={active:"0",0:mr};var oe=[],Q=t=>{t&&t._scratchConfig&&oe.push(t)},K=()=>{oe.pop()},O=t=>oe.length?oe[oe.length-1]:Pe[t||Pe.active]||mr;var Re={"-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"},wo=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:c}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:c,variable:n},e.scales[r]=s;let a=Co.has(e.unit)?"rem":e.unit;e.vars[n]=s+a},Lt=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},Co=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Gi=(t,e)=>{let{base:r,type:n,unit:o}=e,s=Co.has(o)?"rem":o,i=(Ye(s)?1:r)+s;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${a}-ratio`;if(t>0){let f=Re[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Re[t+1],u=Math.abs(t),p=Math.pow(vo,2*u),d=Re[u];return d?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${d}) / ${p.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},zi=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Hi=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]};var Ki=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:c}=t,l=~~(o*s)-~~o,f,[u,p,d]=Hi(o,s);l>16?f=[u,p,d]:f=[u,d],f.forEach((h,g)=>{let x=~~(h/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,b=zi(g+1,f,i,e),C={key:r+(g+1),variable:m,value:h,scaling:x,scalingVariable:b,index:y};wo(C,e)})},vo=1.618,qi=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(vo,2*n);return Math.max(o,s)},se=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=o[1]-l,u=Re[f],p=qi(f,r,n),d=~~(p/r*100)/100,h=a+u,g=Gi(f,t),x={key:u,variable:h,value:p,base:r,scaling:d,scalingVariable:g,ratio:n,index:f};wo(x,t),s&&Ki(x,t)}return t};var ko=(t="A",e)=>{let r=O(),{unit:n}=r;if(_(t)&&W(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(ge.some(b=>t.includes(b))||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let p=`--${e.varPrefix?e.varPrefix+"-":""}${uo(e.type.replace(".","-"))}-`,d=t.toUpperCase(),h=d.slice(0,1)==="-"?"-":"",g=h?d.slice(1):d,x="";g.includes("_")&&(x="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=b=>c.test(b)?`var(${p}${b}${x})`:b;if(g.includes("+")){let[b,C]=g.split("+"),S=`${m(b)} + ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[b,C]=g.split("*"),S=`${m(b)} * ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[b,C]=g.split("-"),S=`${m(b)} - ${m(C)}`;return h?`calc((${S}) * -1)`:`calc(${S})`}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let b=`var(${p}${g}${x})`;return h?`calc(${b} * -1)`:b}let y=o?o[g]:null;return y?s==="ms"||s==="s"?h+y.val+s:h+y.scaling+s:console.warn("can't find",o,g)},Qi=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:ko(i,e)}).join("")},It=(t,e,r,n)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Lt(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Qi(t,r):t=ko(t,r),{[e]:n?`${n}(${t})`:t}};j();var Ql=or();var Ji="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Jl=new RegExp(`<(${Ji})\\b([^>]*?)\\s*/>`,"g");j();var dt=(t,e,r)=>{let n=r||O();if(!_(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(R(t))[o,s,i]=t;else{let u=ne(t);if(!u){let{color:p,gradient:d}=n,h=d[t]||p[t];return h?n.useVariable?`var(${h.var})`:h.value:t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;o=u.name,s=u.alpha,i=u.tone}let{color:c,gradient:a}=n,l=c[o]||a[o];if(!l)return n.verbose&&console.warn("Can't find color ",o),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;return f?(i&&!l[i]&&(f=xo(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),s?`rgba(${f}, ${s})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`):n.useVariable?`var(${l.var})`:l.value},ot=(t,e,r)=>{let n=r||O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!_(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let o;if(R(t))o=t[0];else{let l=ne(t);if(!l)return t;if(l.passthrough)return l.passthrough;if(l.cssVar)return`var(${l.cssVar})`;o=l.name}let{color:s,gradient:i}=n,c=s[o]||i[o],a=I(c);if(a&&c.value)return dt(t,`@${e}`,r);if(a){if(n.useVariable&&c.var)return`var(${c.var})`;if(e)return dt(t,`@${e}`,r);{let l={};for(let f in c){if(f.charCodeAt(0)!==64)continue;let u=n.media[f.slice(1)];if(!u)continue;let p="@media "+(u==="print"?`${u}`:`screen and ${u}`);l[p]=dt(t,f,r)}return l}}else return n.verbose&&console.warn("Can't find color",t),t};j();var xr=t=>{let e=O(),r={};for(let n in t){let o=n.slice(0,1);if(bt(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=xr(t[n]):o==="."&&(r[`&${n}`]=xr(t[n]))}else r[n]=t[n]}return r},Oo=(t,e)=>{let r=e.shift();return t[r]?Oo(t[r],e):t},Ao=(t,e)=>R(e)?Oo(t,e):_(e)&&t[e]?t[e]:t;var ie=(t,e)=>{let r=O();if(_(t)&&W(t)&&(t=ie(t.slice(2))),!t||!_(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=R(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Ao(s,o):s&&e&&(s=Ao(s,e)),xr(s)};var Eo=(t,e)=>{let r=O(),{fontFamily:n}=r;return gr(e||n,t)};var To=t=>{let e=O(),{typography:r}=e;return It(t,"fontSize",r)};j();j();var Yi=t=>{let r=O().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return se(o),o};var Po=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var tc=t=>{let e=O(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:se(t)},G=(t,e="padding",r,n)=>{let o=tc(r);if(_(t)&&!n&&t.includes("(")){let i=Lt(t);n=i[0],t=i[1]}let s=n?[t]:po(t);if(R(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let c={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},a=(l,f)=>It(s[f],e+l+i,o,n);return c[s.length].map((l,f)=>a(l,f))}return It(t,e,o,n)}},Vt=(t,e,r,n)=>{let o=O(),{spacing:s}=o,i=r||t[e];if(!n&&_(i)&&i.includes("(")){let c=Lt(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=Yi(t);return G(i,e,c,n)}return G(i,e,s,n)},Ro=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=ge.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};j();var Io=(t,e)=>{let r=O();if(e||(e=r.globalTheme),!_(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let[n]=R(t)?t:t.split(" "),s=r.shadow[n],i=I(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let c={};for(let a in s){let l=r.media[a.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);c[f]=s.value}return c}return r.verbose&&console.warn("Can't find color",t),t};j();var xt=t=>{let e=O(),{timing:r}=e;return r[t]||r[lo(t)]||t},ht=(t,e="timing")=>{let r=O(),{timing:n}=r;return It(t,e,n)};j();var rc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),nc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),oc=t=>rc.has(t),wt=t=>{let e=t+"";if(Pt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(W(o))return`var(${o})`;if(oc(o)||/^\d/.test(o)||o==="0")return o;let s=dt(o);if(Nt(s))return s;let i=G(o,"border");return i&&i.border?i.border:o}).join(" ")},Do=t=>Pt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(W(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=dt(e);return Nt(r)?r:e}).join(" "),Fo=(t,e)=>Io(t,e),br=(t,e)=>Pt.test(t)?t:Oe(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(W(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=dt(n);if(Nt(o)){let i=ot(n,e);return I(i)?Object.values(i).filter(c=>c.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=G(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),_r=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",c=Oe(o).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||nc.has(f)||f==="transparent"||Pt.test(f))return f;let u=dt(f);return Nt(u)?u:f}).join(" ")));return n+c.join(", ")+s},jo=(t,e)=>{let r=O();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?_r(n,e):r.gradient[t]?{backgroundImage:ot(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!ne(n)?`url(${n})`:n).join(" ")},Mo=t=>_(t)&&t.split(" ").map(e=>G(e,"gap").gap).join(" "),sc=t=>{let e=t.split(" ");return e.length?e.map(r=>W(r)?`var(${r})`:r.length<3||r.includes("ms")?ht(r).timing||r:xt(r)?xt(r):r).join(" "):t},Sr=(t,e,r)=>{if(_(t))return t.split(",").map(n=>ht(n).timing||n).join(",")},No=t=>{let e=t.split(",");if(e.length)return e.map(sc).join(",")};function V(t,e,r={},n={}){let o=Ft.call(this,e||r[t]);if(o==null)return;let s;if(_(o)){if(o.includes("(")){let a=Lt(o);s=a[0],o=a[1]}let i=r.scaleBoxSize,c=Po(t);!i&&c&&!n.ratio&&(o=Ro(o))}return n.ratio?Vt(r,t,o,s):G(o,t,void 0,s)}var k=(t,e=null,r)=>V(t,e,r,{ratio:!0}),wr=(t,e,r)=>{if(_(t))return{borderRadius:t.split(" ").map((n,o)=>Vt(e,r,n)[r]).join(" ")}};var Cr=new WeakMap,ic={passive:!0},cc={passive:!0,capture:!0},vr=(t,e)=>zr.has(t)?e?cc:ic:e||!1;function Vo(t){let e=Cr.get(t);return e||(e={handlers:new Map,installed:new Set},Cr.set(t,e)),e}function ac(t,e){let r=Vo(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let c=r.handlers.get(t);if(c){let a=c.get(i);if(a){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(a(s),s.cancelBubble)return}}i=i.parentNode}},vr(t,n))}function Bo(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Vo(n);ac(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Uo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Cr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function Lo(t){return Xe.has(t)&&!zt.has(t)}function ce(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=c=>{s&&Q(s);try{let a=r.call(e,c,e,e.state,o);if(a&&typeof a.then=="function"){a.catch(l=>{e.error=l,console.error("[DOMQL] Async event error:",l)}).finally(()=>{s&&K()});return}}catch(a){if(e.error=a,console.error("[DOMQL] Event error:",a),o?.strictMode)throw a}s&&K()};if(Lo(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Bo(t,n,i,c)}else n.addEventListener(t,i,vr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(Lo(t)){let c=o?.rootNode||n.ownerDocument?.documentElement;Uo(t,n,c)}else n.removeEventListener(t,i,vr(t,!1))})}function Wo(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 ae(t,e,r){let n=Wo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=Go(n[i],s);c&&c!==e&&zo(t,c,r,new Set([e]))}}function Go(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function zo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Wo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<o.length;c++){let a=Go(o[c],i);a&&zo(t,a,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Ho(t[s],i):t[s]=i}}function Ho(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ho(o,s):r[n]=s}return r}Se();function kr(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(mt(()=>{if(t.state&&rt(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),c=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,c,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(q.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let c=o.charCodeAt(0);c>=65&&c<=90&&st(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return qt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function Ar(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Ar(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function Or(){Ar(this)}j();var fe=new Map,fc=null,Ko=null;function Zo(){try{let t=O();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var lc={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 Ie(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function De(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function uc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():De(e)}function qo(t,e,r){let n=(r?r+"":"")+t+":"+e,o=fe.get(n),s=o?null:Ie(t);if(!o){let c=lc[t]||De(t),a=uc(e);o=r?`_${r}_${c}-${a}`:`_${c}-${a}`,fe.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Ie(t)}:${e}}`;return Ct(i),o}var Qo=new WeakMap;function Ct(t,e){let r=pc(e);if(!r)return;let n=Qo.get(r);if(n||(n=new Set,Qo.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var Jo=new WeakMap;function pc(t){let e=t||Zo();if(!e||!e.head)return null;let r=Jo.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return Jo.set(e,o),fc=o,o}var dc=8;function $r(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let a in t){let l=t[a];l==null||l===!1||l===""||(typeof l=="object"?i.push([a,l]):Ko?(n||(n=[]),n.push(a,String(l)),o++):s.push(qo(a,String(l),r)))}if(n&&o>=dc){let a=n.join("\0"),l=Ko(a),f=l.indexOf("\0"),u=l.substring(0,f),p=l.substring(f+1);if(p){let d=p.split(`
11
- `);for(let h=0;h<d.length;h++)d[h]&&Ct(d[h])}s.push(u)}else if(n)for(let a=0;a<n.length;a+=2)s.push(qo(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(hc(i[a][0],i[a][1],r));return s.concat(c).join(" ").trim()}var Er=new Map;function hc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=fe.get(n);if(o){let p=Er.get(o);if(p)for(let d=0;d<p.length;d++)Ct(p[d]);return o}o=r?`_${r}_c${De(n)}`:`_c${De(n)}`;let s="",i=[],c=p=>typeof p=="string"&&(p.indexOf("{")!==-1||p.indexOf("}")!==-1),a=(p,d)=>{let h="";for(let g in d){let x=d[g];if(x!=null)if(typeof x=="object")a([...p,g],x);else{if(c(x))continue;h+=`${Ie(g)}:${x};`}}h&&(p.length===0?s+=h:i.push({chain:p,body:h}))};a([],e);let l=p=>{if(!p.length)return`.${o}`;let d=p[0].split(",").map(h=>h.trim()).map(h=>h.includes("&")?h.replace(/&/g,`.${o}`):h.startsWith(":")?`.${o}${h}`:`.${o} ${h}`);for(let h=1;h<p.length;h++){let g=p[h].split(",").map(m=>m.trim()),x=[];for(let m of d)for(let y of g)y.includes("&")?x.push(y.replace(/&/g,m)):y.startsWith(":")?x.push(m+y):x.push(m+" "+y);d=x}return d.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let p=`${t}{.${o}{${s}}}`;f.push(p),Ct(p)}for(let p of i){let d=l(p.chain),h=`${t}{${d}{${p.body}}}`;f.push(h),Ct(h)}return Er.set(o,f),fe.set(n,o),o}let u=l([t]);if(s){let p=`${u}{${s}}`;f.push(p),Ct(p)}for(let p of i){let h=`${l([t,...p.chain])}{${p.body}}`;f.push(h),Ct(h)}return Er.set(o,f),fe.set(n,o),o}function Fe(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Ie(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return Ct(`@keyframes ${t}{${r}}`),t}var gc=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],yc=["none","forwards","backwards","both"],mc=["normal","reverse","alternate","alternate-reverse"],xc=["running","paused"],bc=t=>/^[\d.]+m?s$/.test(t),_c=0,Tr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(I(t)){let o=`smbls-anim-${_c++}`;return{animationName:Fe(o,t)}}let n=r&&r[t];return I(n)?Fe(t,n):t},Sc=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,c=null,a=null,l=null,f=null;for(let u of n)r&&r[u]?o=u:bc(u)?s.push(u):gc.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):mc.includes(u)?a=u:yc.includes(u)?l=u:xc.includes(u)?f=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},Xo={animation:(t,e)=>{if(_(t)&&t.includes(" ")){let r=Sc(t,e);return{animationName:Tr(r.name||t,e),animationDuration:r.durations[0]||ht(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||xt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Tr(t,e),animationDuration:ht(e.animationDuration||"A").timing,animationDelay:ht(e.animationDelay||"0s").timing,animationTimingFunction:xt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Tr(t,e)}),animationDuration:t=>({animationDuration:ht(t).timing}),animationDelay:t=>({animationDelay:ht(t).timing}),animationTimingFunction:t=>({animationTimingFunction:xt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};j();var Yo={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>k("height",t,e),width:(t,e)=>k("width",t,e),boxSizing:t=>Hr(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("height",e),...V("width",r||e)}},inlineSize:(t,e)=>k("inlineSize",t,e),blockSize:(t,e)=>k("blockSize",t,e),minWidth:(t,e)=>k("minWidth",t,e),maxWidth:(t,e)=>k("maxWidth",t,e),widthRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minWidth",e),...V("maxWidth",r||e)}},minHeight:(t,e)=>k("minHeight",t,e),maxHeight:(t,e)=>k("maxHeight",t,e),heightRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minHeight",e),...V("maxHeight",r||e)}},size:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...k("inlineSize",e),...k("blockSize",r||e)}},minBlockSize:(t,e)=>k("minBlockSize",t,e),minInlineSize:(t,e)=>k("minInlineSize",t,e),maxBlockSize:(t,e)=>k("maxBlockSize",t,e),maxInlineSize:(t,e)=>k("maxInlineSize",t,e),minSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minInlineSize",e),...V("minBlockSize",r||e)}},maxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("maxInlineSize",e),...V("maxBlockSize",r||e)}},borderWidth:(t,e)=>k("borderWidth",t,e),padding:(t,e)=>k("padding",t,e),scrollPadding:(t,e)=>k("scrollPadding",t,e),paddingInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingInlineStart",e),...V("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingBlockStart",e),...V("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>k("paddingBlockStart",t,e),paddingBottom:(t,e)=>k("paddingBlockEnd",t,e),paddingLeft:(t,e)=>k("paddingInlineStart",t,e),paddingRight:(t,e)=>k("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>k("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>k("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>k("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>k("paddingInlineEnd",t,e),margin:(t,e)=>k("margin",t,e),marginInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("marginInlineStart",e),...V("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!_(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...V("marginBlockStart",r),...V("marginBlockEnd",n||r)}},marginTop:(t,e)=>k("marginBlockStart",t,e),marginBottom:(t,e)=>k("marginBlockEnd",t,e),marginLeft:(t,e)=>k("marginInlineStart",t,e),marginRight:(t,e)=>k("marginInlineEnd",t,e),marginInlineStart:(t,e)=>k("marginInlineStart",t,e),marginInlineEnd:(t,e)=>k("marginInlineEnd",t,e),marginBlockStart:(t,e)=>k("marginBlockStart",t,e),marginBlockEnd:(t,e)=>k("marginBlockEnd",t,e),gap:t=>({gap:Mo(t)}),columnGap:(t,e)=>Vt(e,"columnGap",t),rowGap:(t,e)=>Vt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!_(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>wr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>wr(t??e.round,e,"borderRadius")};var ts={fontSize:t=>To(t)||t,fontFamily:t=>({fontFamily:Eo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var es={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 rs={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>G(r,"k").k).join(" ")}},left:t=>G(t,"left"),top:t=>G(t,"top"),right:t=>G(t,"right"),bottom:t=>G(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};j();var lt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},ns={theme:(t,e)=>{if(t)return e.themeModifier?ie(t,`@${e.themeModifier}`):ie(t)},color:(t,e)=>{let r=lt(e);if(t)return{color:ot(t,r)}},background:(t,e)=>{let r=lt(e);if(t)return _(t)&&t.includes("gradient")?{background:_r(t,r)}:{background:ot(t,r)}},backgroundColor:(t,e)=>{let r=lt(e);if(t)return{backgroundColor:ot(t,r)}},backgroundImage:(t,e,r,n)=>{let o=lt(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:jo(t,o)}},textStroke:t=>({WebkitTextStroke:Do(t)}),outline:t=>({outline:wt(t)}),outlineOffset:(t,e)=>k("outlineOffset",t,e),border:t=>({border:wt(t)}),borderColor:(t,e)=>{let r=lt(e);if(t)return{borderColor:ot(t,r)}},borderTopColor:(t,e)=>{let r=lt(e);if(t)return{borderTopColor:ot(t,r)}},borderBottomColor:(t,e)=>{let r=lt(e);if(t)return{borderBottomColor:ot(t,r)}},borderLeftColor:(t,e)=>{let r=lt(e);if(t)return{borderLeftColor:ot(t,r)}},borderRightColor:(t,e)=>{let r=lt(e);if(t)return{borderRightColor:ot(t,r)}},borderLeft:t=>({borderLeft:wt(t)}),borderTop:t=>({borderTop:wt(t)}),borderRight:t=>({borderRight:wt(t)}),borderBottom:t=>({borderBottom:wt(t)}),shadow:(t,e)=>{let r=lt(e);if(t)return{boxShadow:Fo(t,r)}},boxShadow:(t,e)=>{if(!_(t))return;let[r,n]=t.split("!importan"),o=lt(e),s=n?" !important":"";return{boxShadow:br(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:br(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:wt(t)})};var os={transition:t=>({transition:No(t)}),transitionDuration:t=>({transitionDuration:Sr(t)}),transitionDelay:t=>({transitionDelay:Sr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:xt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};j();var ss={flow:(t,e)=>{let r=e.reverse;if(!_(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var is={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var J={...Xo,...Yo,...ts,...es,...rs,...ns,...os,...ss,...is};var tt=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","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","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);j();function fs(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.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:r})}function wc(...t){return fs(this,"warn",t),Wn.apply(this,t)}function Cc(...t){return fs(this,"error",t),Gn.apply(this,t)}var cs={update:kr,remove:Or,getDB:qn,getQuery:Qn,getRootData:Vn,getChildren:jn,getPath:Mn,nextElement:zn,previousElement:Hn,verbose:hr,warn:wc,error:Cc,variables:Kn,spotByPath:Fn,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];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(){return this.__ref},getRoot:Ln,getRootState:Nn,getRootContext:Bn,getContext:Un,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];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 r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},as=new WeakMap;function vc(t){if(!t)return cs;let e=as.get(t);if(e)return e;e=Object.create(cs);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return as.set(t,e),e}function Pr(t){let e=vc(t.context);Object.setPrototypeOf(t,e)}j();Se();var kc=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},vt=(t,e)=>{if(rt(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,c={}){let a=s.split("."),l=e;for(let f=0;f<a.length-1;f++)l[a[f]]===void 0&&(l[a[f]]={}),l=l[a[f]];return l[a[a.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value:function(s){let i=s.split("."),c=e;for(let a=0;a<i.length;a++){if(c==null)return;c=c[i[a]]}return c},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let c=s.split("."),a=e;for(let l=0;l<c.length-1;l++){if(a==null)return e;a=a[c[l]]}return a&&delete a[c[c.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let c=s(e);return e.update(c,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let c=e;for(;c?.parent&&rt(c.parent);)c=c.parent;return c.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e;for(;s?.parent&&rt(s.parent);)s=s.parent;return s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={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;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&kc(e,o,n[o])};var ih=new Proxy(Object.create(null),{get(){},has(){return!1}});j();var Rr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Ac=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,le=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Ac(e)||Rr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Rr,t)?Rr[t].includes(e):!1;var je=(t,e)=>{let r=t.call("exec",e,t);if(r)return _(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},ls=(t,e)=>{let r=(t.preSrc||"")+(je(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},us={src:t=>ls(t,t.src),href:t=>je(t,t.href),action:t=>je(t,t.action),poster:t=>ls(t,t.poster),data:t=>je(t,t.data)},ps=t=>{let e=t.tag||"div",r={};for(let n in us)if(t[n]!==void 0&&le(e,n)){let o=us[n](t);o!==void 0&&(r[n]=o)}return r};var Oc=1;function Ut(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function Ec(t){return t.charAt(2).toLowerCase()+t.slice(3)}function $c(t){return t.toLowerCase()}function Fr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Fr(o,s):r[n]=s}return r}function st(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Oc++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=st);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let x=r.substring(0,g),m=s.context?.components;m&&(m[x]||m["smbls."+x])&&(t={extends:x,...t})}}ae(s,t,n);let c=new Set(["childProps","attr","style","scope","data"]),a=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let x=t[g],m=s[g],y=m&&x&&typeof m=="object"&&typeof x=="object"&&!Array.isArray(m)&&!Array.isArray(x)&&typeof m!="function"&&typeof x!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Fr(m,x):y&&c.has(g)?s[g]={...m,...x}:s[g]=x}function l(g){for(let x in g){let m=g[x],y=s[x],b=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";b&&x.charCodeAt(0)>=65&&x.charCodeAt(0)<=90?s[x]=Fr(y,m):b&&c.has(x)?s[x]={...y,...m}:s[x]=m}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let f=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,p=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,d=u||p||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=He(g,d)}else d&&(s.scope=d);if(t.if!==void 0&&(s.if=t.if),Pr(s),Tc(s,e,t),s.if!=null){let g=typeof s.if=="function"?s.if(s,s.state,s.context):s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&jr(s,{if:t.if}),s;s.tag||(s.tag=Wt(s)),kt("Init",s,n);let h=s.node=Gt(s);if(!h)return s;kt("AttachNode",s,n),h.setAttribute&&s.key&&h.setAttribute("data-key",s.key),h.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&h.setAttribute("data-smbls-app",s.context.key),s.id&&h.setAttribute&&(h.id=s.id),jr(s,t),Mr(s),hs(s),gs(s,n);try{ys(s,n)}catch(g){if(typeof console<"u"&&console.error){let x=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${x}:`,g?.message||g,g?.stack?`
9
+ `):"";return`SELECT ${c}
10
+ FROM ${a}${f}`},ii=t=>{let e=[],r=(n,o)=>{for(let s in n){let i=o?`${o}/${s}`:s;n[s]===!0?e.push(i):r(n[s],i)}};return r(t,""),e},ai=t=>{let e=n=>{let o=[];for(let s in n)n[s]===!0?o.push(s):o.push(`${s}(${e(n[s])})`);return o.join(", ")},r=Object.keys(t);return r.length===1&&t[r[0]]!==!0?{from:r[0],select:e(t[r[0]])}:{from:null,select:e(t)}},ci={graphql:ri,"json-api":ni,odata:oi,sql:si,supabase:ai,paths:ii}});var Zn=w(()=>{});var Yn=w(()=>{});var to=w(()=>{});var eo=w(()=>{});var ro=w(()=>{});var no=w(()=>{});var oo=w(()=>{});var so=w(()=>{});var io=w(()=>{});var ao=w(()=>{});var co=w(()=>{});var lo=w(()=>{});var fo,uo,po,ho=w(()=>{Ht();fo=t=>(typeof t!="string"&&(t=String(t||"")),t.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,r){return r===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")),uo=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),po=t=>{if(j(t))return t;if(_(t))return t.split(" ");if(R(t))return Object.values(t);if(ye(t))return[t]}});var go=w(()=>{});var mo=w(()=>{});var D=w(()=>{Xr();Yr();Ht();be();tn();tr();Ye();en();rn();qr();Ze();nn();on();an();cn();sn();ln();fn();rr();un();Xn();or();Zn();dn();Yn();to();eo();ro();no();oo();so();io();ao();co();lo();ho();go();mo()});var La={};Rt(La,{FACTORY:()=>Ee,REGISTRY:()=>K,applyExtends:()=>ae,batch:()=>yt,create:()=>ot,createEffect:()=>N,createElement:()=>Da,createSignal:()=>at,createStore:()=>tt,getActiveConfig:()=>O,mount:()=>Ma,popConfig:()=>q,pushConfig:()=>Q,registerEvent:()=>ie});var At=null,de=0,pe=[],he=()=>At;function at(t){let e=new Set;function r(){return At&&(e.add(At),At._sources.add(s)),t}function n(i){i!==t&&(t=i,As(e))}function o(){return t}let s={get:r,set:n,peek:o,_subscribers:e,_type:"signal"};return s}var Ne=new Set,Ve=!1;function N(t,e){let r=e?.depth??0,n={_sources:new Set,_type:"effect",_depth:r,_disposed:!1,_subscribers:new Set,_execute(){if(n._disposed)return;Br(n);let o=At;At=n;try{t()}catch(s){console.error("[smbls] effect error:",s)}finally{At=o}},_notify(){n._disposed||(de>0?pe.push(n):Ur(n))},dispose(){n._disposed=!0,Br(n)}};return n._execute(),n}function yt(t){de++;try{t()}finally{de--,de===0&&Cs()}}function Ur(t){Ne.add(t),Ve||(Ve=!0,queueMicrotask(ks))}function ks(){Ve=!1;let t=Array.from(Ne).sort((e,r)=>e._depth-r._depth);Ne=new Set;for(let e=0;e<t.length;e++){let r=t[e];r._disposed||r._execute()}}function Cs(){for(let t=0;t<pe.length;t++)Ur(pe[t]);pe.length=0}function As(t){let e=Array.from(t);for(let r=0;r<e.length;r++)e[r]._notify()}function Br(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var Ot=Symbol("store"),We=Symbol("signals"),Be=t=>!t||typeof t!="object"||Array.isArray(t)||t[Ot]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function tt(t,e,r){r===void 0&&(r=0);let n={},o={},s=e&&e.maxDepth||8;if(t&&typeof t=="object")for(let y in t){if(y==="__proto__"||!Object.prototype.hasOwnProperty.call(t,y))continue;let m=t[y];r<s&&m&&typeof m=="object"&&!Be(m)?(o[y]=m,n[y]=at(tt(m,e,r+1))):(o[y]=m,n[y]=at(m))}let i=new Proxy(o,{get(y,m){if(m===Ot)return!0;if(m===We)return n;if(m==="__raw")return y;if(m==="update")return a;if(m==="parse")return f;if(m==="clean")return l;if(m==="keys")return u;if(m==="values")return h;if(m==="replace")return p;if(m==="add")return d;if(m==="remove")return g;if(m==="destroy")return b;if(m==="quietUpdate")return c;if(m==="__element")return y.__element;if(m==="parent")return y.parent;if(m==="root")return y.root;if(Object.prototype.hasOwnProperty.call(n,m))return n[m].get();if(y[m]!==void 0)return y[m];if(m!=="root"&&y.root&&y.root!==i)return y.root[m];if(typeof m=="string"&&!m.startsWith("__")&&m!=="then"&&m!=="constructor"&&he()!=null)return n[m]=at(void 0),n[m].get()},set(y,m,x){return m==="__proto__"?!1:m==="__element"||m==="parent"||m==="root"?(y[m]=x,!0):(Object.prototype.hasOwnProperty.call(n,m)?(y[m]=x,x&&typeof x=="object"&&!Be(x)?n[m].set(tt(x,e,r+1)):n[m].set(x)):(y[m]=x,x&&typeof x=="object"&&!Be(x)?n[m]=at(tt(x,e,r+1)):n[m]=at(x)),!0)},has(y,m){return m in n||m in y},ownKeys(y){return Object.keys(n)},getOwnPropertyDescriptor(y,m){return m in n?{enumerable:!0,configurable:!0,value:n[m].peek()}:Object.getOwnPropertyDescriptor(y,m)},deleteProperty(y,m){return n[m]&&(n[m].set(void 0),delete n[m]),delete y[m],!0}});function a(y,m){yt(()=>{for(let v in y)v!=="__proto__"&&(i[v]=y[v])});let x=o.__element;return x&&x.onUpdate&&!m?.quiet&&x.onUpdate(x,i,x.context),i}function c(y){return a(y,{quiet:!0})}function f(y){if(y||(y=new Set),y.has(i))return"[Circular]";y.add(i);let m={};for(let x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let v=n[x].peek();v&&v[Ot]?m[x]=v.parse(y):m[x]=v}return m}function l(){return yt(()=>{for(let y in n)delete i[y]}),i}function u(){return Object.keys(n)}function h(){return Object.keys(n).map(y=>n[y].peek())}function p(y){return yt(()=>{for(let m in n)m in y||delete i[m];for(let m in y)m!=="__proto__"&&(i[m]=y[m])}),i}function d(y,m){return i[y]=m,i}function g(y){return delete i[y],i}function b(){l(),o.__element=null,o.parent=null}return i}function et(t){return t&&t[Ot]===!0}function Ge(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=at(t[i]);let o=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let a=e;for(;a;){let c=a[We];if(c&&Object.prototype.hasOwnProperty.call(c,i))return c;a=a[Ot]?a[Ue]:null}return null};return new Proxy(n,{get(i,a){return a===Ot?!0:a===We?r:a===Ue?e:a==="__raw"?i:Object.prototype.hasOwnProperty.call(r,a)?r[a].get():e&&a!=="then"&&a!=="constructor"?e[a]:i[a]},set(i,a,c){let f=o(a);return f?(f===r&&(i[a]=c),f[a].set(c),!0):(i[a]=c,r[a]=at(c),!0)},has(i,a){if(a in r||a in i)return!0;let c=e;for(;c;){if(a in c)return!0;c=c[Ot]?c[Ue]:null}return!1},ownKeys(){return Object.keys(r)},getOwnPropertyDescriptor(i,a){return a in r?{enumerable:!0,configurable:!0,value:r[a].peek()}:Object.getOwnPropertyDescriptor(i,a)}})}var Ue=Symbol("scope.parent");var ze="http://www.w3.org/2000/svg",Ke=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"]),Os=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 He(t){return Os.has(t)||Ke.has(t)}function Qe(t){return Ke.has(t)}function Wt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&He(e))return e;if(!r||typeof r!="string")return"div";let n=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template"]),o=r.toLowerCase();return o.includes(".")&&(o=o.split(".")[0]),o.includes("_")&&(o=o.split("_")[0]),He(o)&&!n.has(o)?o:"div"}var Wr={};function qe(t,e){let r=e?.context?.document||globalThis.document;if(!r)return null;if(t==="string")return r.createTextNode(e?.text||"");if(t==="fragment")return r.createDocumentFragment();if(Qe(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===ze)return r.createElementNS(ze,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Gt(t){let e=t.tag=Wt(t),n=Qe(e)&&(e==="svg"||t.parent?.node?.namespaceURI===ze)?"svg:"+e:e,o=t?.context?.document||globalThis.document,s=Wr[n];if(s||(s=Wr[n]=qe(e,t)),!s)return null;let i=o&&s.ownerDocument!==o?qe(e,t):s.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var K=new Set(["extends","children","content","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","__name","__ref","__hash","__text","parent","node"]);var zt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","error","beforeRemove","remove"]),Gr=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),Je=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","scroll","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var Xe=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",ge=["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"];D();var yo=t=>{if(t==="")return[0,0,0,0];if(t.toLowerCase()==="transparent")return[0,0,0,0];if(t[0]==="#")return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(t.indexOf("rgb")===-1&&$t&&ct){let e=$t.body.appendChild($t.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){$t.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return $t.body.removeChild(e),[0,0,0,0];t=ct.getComputedStyle(e).color,$t.body.removeChild(e)}return t.indexOf("rgb")===0?(t.indexOf("rgba")===-1&&(t=`${t}, 1`),t.match(/[\.\d]+/g).map(e=>+e)):[0,0,0,0]};var li=(t,e=1)=>{let[r,n,o]=t.match(/\w\w/g).map(s=>parseInt(s,16));return[r,n,o]};var fi=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var ui=(t,e,r)=>{let n=Math.max(t,e,r),o=n-Math.min(t,e,r),s=1-Math.abs(n+n-o-1),i=o&&(n==t?(e-r)/o:n==e?2+(r-t)/o:4+(t-e)/o);return[60*(i<0?i+6:i),s?o/s:0,(n+n-o)/2]},di=(t,e,r,n=e*Math.min(r,1-r),o=(s,i=(s+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[o(0),o(8),o(4)],pi=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let o=(r>>8&255)+e;o>255?o=255:o<0&&(o=0);let s=(r&255)+e;return s>255?s=255:s<0&&(s=0),((s|o<<8|n<<16)+16777216).toString(16).slice(1)};var W=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,Tt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,hi=/^([a-zA-Z]\w*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,re=t=>{if(!_(t))return null;if(Tt.test(t))return{passthrough:t};if(W(t))return{cssVar:t};let e=t.match(hi);if(!e)return null;let[,r,n,o]=e,s=n!==void 0?`0.${n}`:void 0,i=o&&o[0]==="="?o.slice(1):o;return{name:r,alpha:s,tone:i}},Lt=t=>_(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),Ce=t=>{let e=[],r="",n=0;for(let o of t){if(o==="("?n+=1:o===")"&&n>0&&(n-=1),o===","&&n===0){e.push(r),r="";continue}r+=o}return(r.length||!e.length)&&e.push(r),e},bo=(t,e)=>{_(t)&&t.includes("rgb")&&(t=yo(t).join(", ")),_(t)&&(t=t.split(",").map(o=>parseFloat(o.trim()))),ye(e)&&(e+="");let r=fi(t),n=e.slice(0,1);if(n==="-"||n==="+"){let o=pi(r,parseFloat(e));return li(o).join(", ")}else{let[o,s,i]=t,a=ui(o,s,i),[c,f,l]=a;return di(c,f,parseFloat(e)/100*255)}};var hr=(t,e)=>{if(t[e])return t[e].value;if(t.default)return t[t.default].value;let r=Object.keys(t)[0];return r&&t[r]&&t[r].value};D();D();D();var Ae={};Rt(Ae,{animation:()=>Fi,breakpoints:()=>Ri,class:()=>Bi,color:()=>ki,devices:()=>Ii,document:()=>ji,font:()=>yi,fontFace:()=>_i,fontFamily:()=>bi,fontFamilyTypes:()=>xi,gradient:()=>Ci,grid:()=>Vi,icons:()=>$i,media:()=>Si,reset:()=>Ui,semanticIcons:()=>Ei,sequence:()=>Pt,shadow:()=>Oi,spacing:()=>vi,svg:()=>Di,svgData:()=>Mi,templates:()=>Li,theme:()=>Ai,timing:()=>Pi,typography:()=>gr,unit:()=>gi,vars:()=>Wi});var Pt={"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 gi={default:"em"};var mi={browserDefault:16,base:16,type:"font-size",ratio:Pt["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},gr=mi;var yi={};var bi={},xi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},_i={};var Si={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var wi={base:gr.base,type:"spacing",ratio:Pt.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},vi=wi;var ki={},Ci={};var Ai={};var Oi={};var $i={},Ei={};var Ti={default:150,base:150,type:"timing",ratio:Pt["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},Pi=Ti;var ji={};var Ri={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},Ii={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 Fi={};var Di={},Mi={};var Li={};var Ni={},Vi=Ni;var Bi={};var Ui={},Wi={};var xo={},_o={},Oe=Ae,$e={},So=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Oe){let e=t.toLowerCase();$e[e]=Oe[t];let r=So(e);r!==e&&($e[r]=Oe[t]),e!==t&&($e[t]=Oe[t])}var mr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:xo,cssMediaVars:_o,CSS_VARS:xo,CSS_MEDIA_VARS:_o,_scratchConfig:!0,...$e},jf=It(mr),Ee={active:"0",0:mr};var ne=[],Q=t=>{t&&t._scratchConfig&&ne.push(t)},q=()=>{ne.pop()},O=t=>ne.length?ne[ne.length-1]:Ee[t||Ee.active]||mr;var Te={"-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"},wo=(t,e)=>{let{key:r,variable:n,value:o,scaling:s,index:i,scalingVariable:a}=t;e.sequence[r]={key:r,decimal:~~(o*100)/100,val:~~o,scaling:s,index:i,scalingVariable:a,variable:n},e.scales[r]=s;let c=vo.has(e.unit)?"rem":e.unit;e.vars[n]=s+c},Nt=t=>{if(!t.includes("("))return t;let e=t.split("(")[0],r=t.slice(t.indexOf("(")+1,t.lastIndexOf(")"));return[e,r]},vo=new Set(["vw","vh","vmin","vmax","svw","svh","lvw","lvh","dvw","dvh"]),Gi=(t,e)=>{let{base:r,type:n,unit:o}=e,s=vo.has(o)?"rem":o,i=(Xe(s)?1:r)+s;if(t===0)return i;let c="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),f=`${c}-ratio`;if(t>0){let l=Te[t-1];return`calc(var(${c}-${l}) * var(${f}))`}if(t<0){let l=Te[t+1],u=Math.abs(t),h=Math.pow(ko,2*u),p=Te[u];return p?`max(calc(var(${c}-${l}) / var(${f})), calc(var(${c}-${p}) / ${h.toFixed(4)}))`:`calc(var(${c}-${l}) / var(${f}))`}},zi=(t,e,r,n)=>{let{type:o}=n,i=t===2&&e.length===2?t+1:t,f=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(o&&o.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${f+i}))`},Hi=(t,e)=>{let n=(t*e-t)/1.618,o=t*e-n,s=t+n,i=(o+s)/2;return[o,i,s]};var qi=(t,e)=>{let{key:r,base:n,value:o,ratio:s,variable:i,index:a}=t,f=~~(o*s)-~~o,l,[u,h,p]=Hi(o,s);f>16?l=[u,h,p]:l=[u,p],l.forEach((d,g)=>{let b=~~(d/n*1e3)/1e3,y=i+(g+1),m=a+(g+1)/10,x=zi(g+1,l,i,e),v={key:r+(g+1),variable:y,value:d,scaling:b,scalingVariable:x,index:m};wo(v,e)})},ko=1.618,Ki=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),o=e*Math.pow(r,t),s=e*Math.pow(r,n)/Math.pow(ko,2*n);return Math.max(o,s)},oe=t=>{let{type:e,base:r,ratio:n,range:o,subSequence:s}=t,i=Math.abs(o[0])+Math.abs(o[1]),c="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let f=0;f<=i;f++){let l=o[1]-f,u=Te[l],h=Ki(l,r,n),p=~~(h/r*100)/100,d=c+u,g=Gi(l,t),b={key:u,variable:d,value:h,base:r,scaling:p,scalingVariable:g,ratio:n,index:l};wo(b,t),s&&qi(b,t)}return t};var Co=(t="A",e)=>{let r=O(),{unit:n}=r;if(_(t)&&W(t))return`var(${t})`;let{sequence:o,unit:s=n.default,useVariable:i}=e,a=/^-?[a-zA-Z]/i,c=a.test(t);if(ge.some(x=>t.includes(x))||!c||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let h=`--${e.varPrefix?e.varPrefix+"-":""}${uo(e.type.replace(".","-"))}-`,p=t.toUpperCase(),d=p.slice(0,1)==="-"?"-":"",g=d?p.slice(1):p,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let y=x=>a.test(x)?`var(${h}${x}${b})`:x;if(g.includes("+")){let[x,v]=g.split("+"),S=`${y(x)} + ${y(v)}`;return d?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("*")){let[x,v]=g.split("*"),S=`${y(x)} * ${y(v)}`;return d?`calc((${S}) * -1)`:`calc(${S})`}else if(g.includes("-")){let[x,v]=g.split("-"),S=`${y(x)} - ${y(v)}`;return d?`calc((${S}) * -1)`:`calc(${S})`}if(!o[g]&&g.length===2&&(r.verbose&&console.warn(g,"- value is not found because `subSequence` is set to false"),g=g.slice(0,1)),i||r.useVariable){let x=`var(${h}${g}${b})`;return d?`calc(${x} * -1)`:x}let m=o?o[g]:null;return m?s==="ms"||s==="s"?d+m.val+s:d+m.scaling+s:console.warn("can't find",o,g)},Qi=(t,e)=>{if(!["+","-","*","/",","].filter(s=>t.includes(s+" ")).length)return t;let n=/(\s*[+\-*/,]\s*)/;return t.split(n).map(s=>{let i=s.trim();return!i||["+","-","*","/",","].includes(i)?s:Co(i,e)}).join("")},jt=(t,e,r,n)=>{if(typeof t!="string")return O().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){let s=Nt(t);n=s[0],t=s[1]}return["+","-","*","/",","].filter(s=>t.includes(s+" ")).length?t=Qi(t,r):t=Co(t,r),{[e]:n?`${n}(${t})`:t}};D();var Kf=nr();var Ji="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",Qf=new RegExp(`<(${Ji})\\b([^>]*?)\\s*/>`,"g");D();var pt=(t,e,r)=>{let n=r||O();if(!_(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let o,s,i;if(j(t))[o,s,i]=t;else{let u=re(t);if(!u){let{color:h,gradient:p}=n,d=p[t]||h[t];return d?n.useVariable?`var(${d.var})`:d.value:t}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}=n,f=a[o]||c[o];if(!f)return n.verbose&&console.warn("Can't find color ",o),t;e&&(f[e]?f=f[e]:n.verbose&&console.warn(t," - does not have ",e));let l=f.rgb;return l?(i&&!f[i]&&(l=bo(l,i),f[i]={rgb:l,var:`${f.var}-${i}`}),f[i]&&(l=f[i].rgb),s?`rgba(${l}, ${s})`:i?`rgba(${l}, 1)`:n.useVariable?`var(${f.var})`:`rgb(${l})`):n.useVariable?`var(${f.var})`:f.value},nt=(t,e,r)=>{let n=r||O();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!_(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let o;if(j(t))o=t[0];else{let f=re(t);if(!f)return t;if(f.passthrough)return f.passthrough;if(f.cssVar)return`var(${f.cssVar})`;o=f.name}let{color:s,gradient:i}=n,a=s[o]||i[o],c=R(a);if(c&&a.value)return pt(t,`@${e}`,r);if(c){if(n.useVariable&&a.var)return`var(${a.var})`;if(e)return pt(t,`@${e}`,r);{let f={};for(let l in a){if(l.charCodeAt(0)!==64)continue;let u=n.media[l.slice(1)];if(!u)continue;let h="@media "+(u==="print"?`${u}`:`screen and ${u}`);f[h]=pt(t,l,r)}return f}}else return n.verbose&&console.warn("Can't find color",t),t};D();var yr=t=>{let e=O(),r={};for(let n in t){let o=n.slice(0,1);if(xt(t[n])){if(o==="@")continue;o===":"?r[`&${n}`]=yr(t[n]):o==="."&&(r[`&${n}`]=yr(t[n]))}else r[n]=t[n]}return r},Oo=(t,e)=>{let r=e.shift();return t[r]?Oo(t[r],e):t},Ao=(t,e)=>j(e)?Oo(t,e):_(e)&&t[e]?t[e]:t;var se=(t,e)=>{let r=O();if(_(t)&&W(t)&&(t=se(t.slice(2))),!t||!_(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...o]=j(t)?t:t.split(" "),s=r.theme[n];return s&&o.length?s=Ao(s,o):s&&e&&(s=Ao(s,e)),yr(s)};var $o=(t,e)=>{let r=O(),{fontFamily:n}=r;return hr(e||n,t)};var To=t=>{let e=O(),{typography:r}=e;return jt(t,"fontSize",r)};D();D();var Yi=t=>{let r=O().spacing||{},n=parseFloat(t.spacingRatio),o={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return oe(o),o};var Po=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var ta=t=>{let e=O(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:oe(t)},G=(t,e="padding",r,n)=>{let o=ta(r);if(_(t)&&!n&&t.includes("(")){let i=Nt(t);n=i[0],t=i[1]}let s=n?[t]:po(t);if(j(s)){if(s.length>1){let i="";e==="borderWidth"&&(e="border",i="Width");let a={2:["Block","Inline"],3:["BlockStart","Inline","BlockEnd"],4:["BlockStart","InlineEnd","BlockEnd","InlineStart"]},c=(f,l)=>jt(s[l],e+f+i,o,n);return a[s.length].map((f,l)=>c(f,l))}return jt(t,e,o,n)}},Vt=(t,e,r,n)=>{let o=O(),{spacing:s}=o,i=r||t[e];if(!n&&_(i)&&i.includes("(")){let a=Nt(i);n=a[0],i=a[1]}if(t.spacingRatio){let a=Yi(t);return G(i,e,a,n)}return G(i,e,s,n)},jo=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),o=ge.some(i=>t.includes(i));return n||o?r:r.length<3&&/[A-Z]/.test(r)?r+"_default":r};return t.split(",").map(r=>r.trim()).map(e).join(",").split(" ").map(e).join(" ")};D();var Ro=(t,e)=>{let r=O();if(e||(e=r.globalTheme),!_(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(W(t))return`var(${t})`;let[n]=j(t)?t:t.split(" "),s=r.shadow[n],i=R(s);if(!s)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(s[e])return s[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&s.value)return s.value;if(i){let a={};for(let c in s){let f=r.media[c.slice(1)],l="@media "+(f==="print"?`${f}`:`screen and ${f}`);a[l]=s.value}return a}return r.verbose&&console.warn("Can't find color",t),t};D();var bt=t=>{let e=O(),{timing:r}=e;return r[t]||r[fo(t)]||t},ht=(t,e="timing")=>{let r=O(),{timing:n}=r;return jt(t,e,n)};D();var ra=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),na=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),oa=t=>ra.has(t),wt=t=>{let e=t+"";if(Tt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(o=>{if(o=o.trim(),!o)return"";if(W(o))return`var(${o})`;if(oa(o)||/^\d/.test(o)||o==="0")return o;let s=pt(o);if(Lt(s))return s;let i=G(o,"border");return i&&i.border?i.border:o}).join(" ")},Io=t=>Tt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(W(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=pt(e);return Lt(r)?r:e}).join(" "),Fo=(t,e)=>Ro(t,e),br=(t,e)=>Tt.test(t)?t:Ce(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(W(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let o=pt(n);if(Lt(o)){let i=nt(n,e);return R(i)?Object.values(i).filter(a=>a.includes(": "+e))[0]:i}if(/^\d/.test(n)||n==="0"||n.includes("px")||n.slice(-2)==="em")return n;let s=G(n,"shadow");return s&&s.shadow?s.shadow:n}).join(" "):"")).join(", "),xr=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),o=t.slice(r+1,t.lastIndexOf(")")),s=")",a=Ce(o).map(c=>(c=c.trim(),c.split(/\s+/).map(l=>{if(!l||/^\d/.test(l)||l==="0"||na.has(l)||l==="transparent"||Tt.test(l))return l;let u=pt(l);return Lt(u)?u:l}).join(" ")));return n+a.join(", ")+s},Do=(t,e)=>{let r=O();return t.split(", ").map(n=>W(n)?`var(${n})`:n.includes("url")?n:n.includes("gradient")?xr(n,e):r.gradient[t]?{backgroundImage:nt(t,e||r.globalTheme)}:n.includes("/")||n.startsWith("http")||n.includes(".")&&!re(n)?`url(${n})`:n).join(" ")},Mo=t=>_(t)&&t.split(" ").map(e=>G(e,"gap").gap).join(" "),sa=t=>{let e=t.split(" ");return e.length?e.map(r=>W(r)?`var(${r})`:r.length<3||r.includes("ms")?ht(r).timing||r:bt(r)?bt(r):r).join(" "):t},_r=(t,e,r)=>{if(_(t))return t.split(",").map(n=>ht(n).timing||n).join(",")},Lo=t=>{let e=t.split(",");if(e.length)return e.map(sa).join(",")};function V(t,e,r={},n={}){let o=Ft.call(this,e||r[t]);if(o==null)return;let s;if(_(o)){if(o.includes("(")){let c=Nt(o);s=c[0],o=c[1]}let i=r.scaleBoxSize,a=Po(t);!i&&a&&!n.ratio&&(o=jo(o))}return n.ratio?Vt(r,t,o,s):G(o,t,void 0,s)}var C=(t,e=null,r)=>V(t,e,r,{ratio:!0}),Sr=(t,e,r)=>{if(_(t))return{borderRadius:t.split(" ").map((n,o)=>Vt(e,r,n)[r]).join(" ")}};var wr=new WeakMap,ia={passive:!0},aa={passive:!0,capture:!0},vr=(t,e)=>Gr.has(t)?e?aa:ia:e||!1;function Vo(t){let e=wr.get(t);return e||(e={handlers:new Map,installed:new Set},wr.set(t,e)),e}function ca(t,e){let r=Vo(e);if(r.installed.has(t))return;r.installed.add(t);let n=t==="focus"||t==="blur"||t==="focusin"||t==="focusout"||t==="mouseenter"||t==="mouseleave",o=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,s=>{let i=s.target;for(;i&&i!==e;){let a=r.handlers.get(t);if(a){let c=a.get(i);if(c){if(o&&s.relatedTarget&&i.contains(s.relatedTarget)){i=i.parentNode;continue}if(c(s),s.cancelBubble)return}}i=i.parentNode}},vr(t,n))}function Bo(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let o=Vo(n);ca(t,n),o.handlers.has(t)||o.handlers.set(t,new WeakMap),o.handlers.get(t).set(e,r)}function Uo(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=wr.get(r);if(!n)return;let o=n.handlers.get(t);o&&o.delete(e)}function No(t){return Je.has(t)&&!zt.has(t)}function ie(t,e,r){let{node:n,context:o}=e;if(!n)return;let s=o?.designSystem,i=a=>{s&&Q(s);try{let c=r.call(e,a,e,e.state,o);if(c&&typeof c.then=="function"){c.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{s&&q()});return}}catch(c){if(e.error=c,console.error("[DOMQL] Event error:",c),o?.strictMode)throw c}s&&q()};if(No(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Bo(t,n,i,a)}else n.addEventListener(t,i,vr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(No(t)){let a=o?.rootNode||n.ownerDocument?.documentElement;Uo(t,n,a)}else n.removeEventListener(t,i,vr(t,!1))})}function Wo(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 ae(t,e,r){let n=Wo(e);if(!n.length)return;let s=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let a=Go(n[i],s);a&&a!==e&&zo(t,a,r,new Set([e]))}}function Go(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(o=>o.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let o=1;o<r.length&&n;o++)n=n[r[o]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function zo(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let o=Wo(e);if(o.length){let i=(t.context||r?.context||{}).components||{};for(let a=0;a<o.length;a++){let c=Go(o[a],i);c&&zo(t,c,r,n)}}for(let s in e){if(s==="extends"||s==="extend")continue;let i=e[s];t[s]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[s]={...i}:t[s]=i:typeof t[s]=="object"&&typeof i=="object"&&!Array.isArray(t[s])&&!Array.isArray(i)&&t[s]!==null&&i!==null?t[s]=Ho(t[s],i):t[s]=i}}function Ho(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ho(o,s):r[n]=s}return r}var ce=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let o=!1;for(let s of n)typeof s[t]=="function"&&(s[t](e,...r),o=!0);return o};function kr(t={},e={}){let r=this,n=r.__ref;if(n){if((typeof t=="string"||typeof t=="number")&&(t={text:t}),!e.preventListeners&&typeof r.onBeforeUpdate=="function"&&r.onBeforeUpdate(r,r.state,r.context,e)===!1)return r;if(yt(()=>{if(t.state&&et(r.state)&&r.state.update(t.state),t.text!==void 0&&(r.text=t.text,!n.__exec.text&&r.node&&(r.tag==="string"?r.node.nodeValue=t.text??"":r.node.textContent=t.text??"")),t.html!==void 0&&(r.html=t.html,!n.__exec.html&&r.node&&(r.node.innerHTML=t.html)),t.style&&r.node?.style){if(!n.__exec.style)for(let o in t.style){let s=t.style[o];if(s==null)continue;let i=o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=String(s).replace(/\s*!important\s*$/,"");r.node.style.setProperty(i,a,"important")}r.style||(r.style={}),Object.assign(r.style,t.style)}if(t.attr&&r.node?.setAttribute){for(let o in t.attr){let s=t.attr[o];s==null||s===!1?r.node.removeAttribute(o):typeof s!="function"&&typeof s!="object"&&r.node.setAttribute(o,s===!0?"":s)}r.attr||(r.attr={}),Object.assign(r.attr,t.attr)}if(t.data&&r.node?.dataset){for(let o in t.data)r.node.dataset[o]=t.data[o];r.data||(r.data={}),Object.assign(r.data,t.data)}for(let o in t){if(K.has(o)||o==="state")continue;let s=t[o],i=r[o];if(i&&i.__ref&&typeof i.update=="function")i.update(s,e);else if(typeof s=="object"&&s!==null){let a=o.charCodeAt(0);a>=65&&a<=90&&ot(s,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=s)}}),r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return ce("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}}function Cr(t){if(!t)return;let e=t.__ref;if(e){try{typeof t.onBeforeRemove=="function"&&t.onBeforeRemove(t,t.state,t.context)}catch(r){console.error("[smbls] onBeforeRemove error:",r)}if(e.__effects){for(let r=0;r<e.__effects.length;r++)e.__effects[r].dispose();e.__effects.length=0}if(e.__eventCleanup){for(let r=0;r<e.__eventCleanup.length;r++)e.__eventCleanup[r]();e.__eventCleanup.length=0}if(e.__children){for(let r=0;r<e.__children.length;r++){let n=e.__children[r],o=t[n];o&&o.__ref&&Cr(o)}e.__children.length=0}if(t.node?.parentNode&&t.node.remove(),t.state?.destroy&&t.state.__element===t&&t.state.destroy(),t.parent?.__ref?.__children){let r=t.parent.__ref.__children.indexOf(t.key);r!==-1&&t.parent.__ref.__children.splice(r,1),delete t.parent[t.key]}try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(r){console.error("[smbls] onRemove error:",r)}t.node=null,t.parent=null,t.__ref=null}}function Ar(){Cr(this)}D();var le=new Map,la=null,qo=null;function Xo(){try{let t=O();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var fa={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 Pe(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function je(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e*16777619>>>0;return e.toString(36)}function ua(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():je(e)}function Ko(t,e,r){let n=(r?r+"":"")+t+":"+e,o=le.get(n),s=o?null:Pe(t);if(!o){let a=fa[t]||je(t),c=ua(e);o=r?`_${r}_${a}-${c}`:`_${a}-${c}`,le.set(n,o)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return o;let i=`.${o}{${s||Pe(t)}:${e}}`;return vt(i),o}var Qo=new WeakMap;function vt(t,e){let r=da(e);if(!r)return;let n=Qo.get(r);if(n||(n=new Set,Qo.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var Jo=new WeakMap;function da(t){let e=t||Xo();if(!e||!e.head)return null;let r=Jo.get(e);if(r&&r.ownerNode&&r.ownerNode.parentNode===e.head)return r;let n=e.head.querySelector("style[data-smbls]");n||(n=e.createElement("style"),n.setAttribute("data-smbls",""),e.head.appendChild(n));let o=n.sheet;return Jo.set(e,o),la=o,o}var pa=8;function $r(t,e,r){if(!t||typeof t!="object")return"";let n=null,o=0,s=[],i=[];for(let c in t){let f=t[c];f==null||f===!1||f===""||(typeof f=="object"?i.push([c,f]):qo?(n||(n=[]),n.push(c,String(f)),o++):s.push(Ko(c,String(f),r)))}if(n&&o>=pa){let c=n.join("\0"),f=qo(c),l=f.indexOf("\0"),u=f.substring(0,l),h=f.substring(l+1);if(h){let p=h.split(`
11
+ `);for(let d=0;d<p.length;d++)p[d]&&vt(p[d])}s.push(u)}else if(n)for(let c=0;c<n.length;c+=2)s.push(Ko(n[c],n[c+1],r));let a=[];for(let c=0;c<i.length;c++)a.push(ha(i[c][0],i[c][1],r));return s.concat(a).join(" ").trim()}var Or=new Map;function ha(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),o=le.get(n);if(o){let h=Or.get(o);if(h)for(let p=0;p<h.length;p++)vt(h[p]);return o}o=r?`_${r}_c${je(n)}`:`_c${je(n)}`;let s="",i=[],a=h=>typeof h=="string"&&(h.indexOf("{")!==-1||h.indexOf("}")!==-1),c=(h,p)=>{let d="";for(let g in p){let b=p[g];if(b!=null)if(typeof b=="object")c([...h,g],b);else{if(a(b))continue;d+=`${Pe(g)}:${b};`}}d&&(h.length===0?s+=d:i.push({chain:h,body:d}))};c([],e);let f=h=>{if(!h.length)return`.${o}`;let p=h[0].split(",").map(d=>d.trim()).map(d=>d.includes("&")?d.replace(/&/g,`.${o}`):d.startsWith(":")?`.${o}${d}`:`.${o} ${d}`);for(let d=1;d<h.length;d++){let g=h[d].split(",").map(y=>y.trim()),b=[];for(let y of p)for(let m of g)m.includes("&")?b.push(m.replace(/&/g,y)):m.startsWith(":")?b.push(y+m):b.push(y+" "+m);p=b}return p.join(", ")},l=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(s){let h=`${t}{.${o}{${s}}}`;l.push(h),vt(h)}for(let h of i){let p=f(h.chain),d=`${t}{${p}{${h.body}}}`;l.push(d),vt(d)}return Or.set(o,l),le.set(n,o),o}let u=f([t]);if(s){let h=`${u}{${s}}`;l.push(h),vt(h)}for(let h of i){let d=`${f([t,...h.chain])}{${h.body}}`;l.push(d),vt(d)}return Or.set(o,l),le.set(n,o),o}function Re(t,e){let r="";for(let n in e){let o="";for(let s in e[n])o+=`${Pe(s)}:${e[n][s]};`;r+=`${n}{${o}}`}return vt(`@keyframes ${t}{${r}}`),t}var ga=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],ma=["none","forwards","backwards","both"],ya=["normal","reverse","alternate","alternate-reverse"],ba=["running","paused"],xa=t=>/^[\d.]+m?s$/.test(t),_a=0,Er=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(R(t)){let o=`smbls-anim-${_a++}`;return{animationName:Re(o,t)}}let n=r&&r[t];return R(n)?Re(t,n):t},Sa=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),o=null,s=[],i=null,a=null,c=null,f=null,l=null;for(let u of n)r&&r[u]?o=u:xa(u)?s.push(u):ga.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?a=u==="infinite"?u:Number(u):ya.includes(u)?c=u:ma.includes(u)?f=u:ba.includes(u)?l=u:o||(o=u);return{name:o,durations:s,timingFunction:i,iterationCount:a,direction:c,fillMode:f,playState:l}},Zo={animation:(t,e)=>{if(_(t)&&t.includes(" ")){let r=Sa(t,e);return{animationName:Er(r.name||t,e),animationDuration:r.durations[0]||ht(e.animationDuration||"A").timing,animationDelay:r.durations[1]||ht(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||bt(e.animationTimingFunction||"ease"),animationFillMode:r.fillMode||e.animationFillMode||"both",animationIterationCount:r.iterationCount!=null?r.iterationCount:e.animationIterationCount||1,animationPlayState:r.playState||e.animationPlayState,animationDirection:r.direction||e.animationDirection}}return{animationName:Er(t,e),animationDuration:ht(e.animationDuration||"A").timing,animationDelay:ht(e.animationDelay||"0s").timing,animationTimingFunction:bt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Er(t,e)}),animationDuration:t=>({animationDuration:ht(t).timing}),animationDelay:t=>({animationDelay:ht(t).timing}),animationTimingFunction:t=>({animationTimingFunction:bt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};D();var Yo={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>C("height",t,e),width:(t,e)=>C("width",t,e),boxSizing:t=>zr(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("height",e),...V("width",r||e)}},inlineSize:(t,e)=>C("inlineSize",t,e),blockSize:(t,e)=>C("blockSize",t,e),minWidth:(t,e)=>C("minWidth",t,e),maxWidth:(t,e)=>C("maxWidth",t,e),widthRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minWidth",e),...V("maxWidth",r||e)}},minHeight:(t,e)=>C("minHeight",t,e),maxHeight:(t,e)=>C("maxHeight",t,e),heightRange:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minHeight",e),...V("maxHeight",r||e)}},size:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...C("inlineSize",e),...C("blockSize",r||e)}},minBlockSize:(t,e)=>C("minBlockSize",t,e),minInlineSize:(t,e)=>C("minInlineSize",t,e),maxBlockSize:(t,e)=>C("maxBlockSize",t,e),maxInlineSize:(t,e)=>C("maxInlineSize",t,e),minSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("minInlineSize",e),...V("minBlockSize",r||e)}},maxSize:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("maxInlineSize",e),...V("maxBlockSize",r||e)}},borderWidth:(t,e)=>C("borderWidth",t,e),padding:(t,e)=>C("padding",t,e),scrollPadding:(t,e)=>C("scrollPadding",t,e),paddingInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingInlineStart",e),...V("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("paddingBlockStart",e),...V("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>C("paddingBlockStart",t,e),paddingBottom:(t,e)=>C("paddingBlockEnd",t,e),paddingLeft:(t,e)=>C("paddingInlineStart",t,e),paddingRight:(t,e)=>C("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>C("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>C("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>C("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>C("paddingInlineEnd",t,e),margin:(t,e)=>C("margin",t,e),marginInline:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{...V("marginInlineStart",e),...V("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!_(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...V("marginBlockStart",r),...V("marginBlockEnd",n||r)}},marginTop:(t,e)=>C("marginBlockStart",t,e),marginBottom:(t,e)=>C("marginBlockEnd",t,e),marginLeft:(t,e)=>C("marginInlineStart",t,e),marginRight:(t,e)=>C("marginInlineEnd",t,e),marginInlineStart:(t,e)=>C("marginInlineStart",t,e),marginInlineEnd:(t,e)=>C("marginInlineEnd",t,e),marginBlockStart:(t,e)=>C("marginBlockStart",t,e),marginBlockEnd:(t,e)=>C("marginBlockEnd",t,e),gap:t=>({gap:Mo(t)}),columnGap:(t,e)=>Vt(e,"columnGap",t),rowGap:(t,e)=>Vt(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!_(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},flexAlign:t=>{if(!_(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Sr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Sr(t??e.round,e,"borderRadius")};var ts={fontSize:t=>To(t)||t,fontFamily:t=>({fontFamily:$o(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t})};var es={overflow:t=>({overflow:t,scrollBehavior:"smooth"}),cursor:(t,e,r,n)=>{if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=`url(${o.content.src})`;else{let s=n.files&&n.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 rs={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>G(r,"k").k).join(" ")}},left:t=>G(t,"left"),top:t=>G(t,"top"),right:t=>G(t,"right"),bottom:t=>G(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(r,"k").k);return{top:e[0],bottom:e[1]||e[0]}},horizontalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>G(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};D();var ft=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},ns={theme:(t,e)=>{if(t)return e.themeModifier?se(t,`@${e.themeModifier}`):se(t)},color:(t,e)=>{let r=ft(e);if(t)return{color:nt(t,r)}},background:(t,e)=>{let r=ft(e);if(t)return _(t)&&t.includes("gradient")?{background:xr(t,r)}:{background:nt(t,r)}},backgroundColor:(t,e)=>{let r=ft(e);if(t)return{backgroundColor:nt(t,r)}},backgroundImage:(t,e,r,n)=>{let o=ft(e);if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=s.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Do(t,o)}},textStroke:t=>({WebkitTextStroke:Io(t)}),outline:t=>({outline:wt(t)}),outlineOffset:(t,e)=>C("outlineOffset",t,e),border:t=>({border:wt(t)}),borderColor:(t,e)=>{let r=ft(e);if(t)return{borderColor:nt(t,r)}},borderTopColor:(t,e)=>{let r=ft(e);if(t)return{borderTopColor:nt(t,r)}},borderBottomColor:(t,e)=>{let r=ft(e);if(t)return{borderBottomColor:nt(t,r)}},borderLeftColor:(t,e)=>{let r=ft(e);if(t)return{borderLeftColor:nt(t,r)}},borderRightColor:(t,e)=>{let r=ft(e);if(t)return{borderRightColor:nt(t,r)}},borderLeft:t=>({borderLeft:wt(t)}),borderTop:t=>({borderTop:wt(t)}),borderRight:t=>({borderRight:wt(t)}),borderBottom:t=>({borderBottom:wt(t)}),shadow:(t,e)=>{let r=ft(e);if(t)return{boxShadow:Fo(t,r)}},boxShadow:(t,e)=>{if(!_(t))return;let[r,n]=t.split("!importan"),o=ft(e),s=n?" !important":"";return{boxShadow:br(r.trim(),o)+s}},textShadow:(t,{context:e})=>({textShadow:br(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:wt(t)})};var os={transition:t=>({transition:Lo(t)}),transitionDuration:t=>({transitionDuration:_r(t)}),transitionDelay:t=>({transitionDelay:_r(t)}),transitionTimingFunction:t=>({transitionTimingFunction:bt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};D();var ss={flow:(t,e)=>{let r=e.reverse;if(!_(t))return;let[n,o]=(t||"row").split(" ");return(t.startsWith("x")||t==="row")&&(n="row"),(t.startsWith("y")||t==="column")&&(n="column"),{display:"flex",flexFlow:(n||"")+(!n.includes("-reverse")&&r?"-reverse":"")+" "+(o||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var is={area:t=>({gridArea:t}),template:t=>({gridTemplate:t}),templateAreas:t=>({gridTemplateAreas:t}),column:t=>({gridColumn:t}),columns:t=>({gridTemplateColumns:t}),templateColumns:t=>({gridTemplateColumns:t}),autoColumns:t=>({gridAutoColumns:t}),columnStart:t=>({gridColumnStart:t}),row:t=>({gridRow:t}),rows:t=>({gridTemplateRows:t}),templateRows:t=>({gridTemplateRows:t}),autoRows:t=>({gridAutoRows:t}),rowStart:t=>({gridRowStart:t}),autoFlow:t=>({gridAutoFlow:t})};var J={...Zo,...Yo,...ts,...es,...rs,...ns,...os,...ss,...is};var Y=new Set(["accentColor","alignContent","alignItems","alignSelf","alignmentBaseline","all","animation","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","aspectRatio","backdropFilter","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundRepeatX","backgroundRepeatY","backgroundSize","baselineShift","blockSize","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","bottom","boxDecorationBreak","boxShadow","boxSizing","breakAfter","breakBefore","breakInside","captionSide","caretColor","clear","clip","clipPath","color","colorAdjust","colorInterpolation","colorInterpolationFilters","colorRendering","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","content","counterIncrement","counterReset","cursor","direction","display","emptyCells","filter","flex","flexBasis","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantNumeric","fontVariantPosition","fontWeight","fontVariationSettings","fontSynthesis","forcedColorAdjust","gap","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","height","hyphens","imageOrientation","imageRendering","imeMode","inset","insetBlock","insetBlockEnd","insetBlockStart","insetInline","insetInlineEnd","insetInlineStart","initialLetter","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","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","perspective","perspectiveOrigin","placeContent","placeItems","placeSelf","pointerEvents","position","resize","right","rotate","rowGap","scrollBehavior","scrollPadding","scrollSnapAlign","scrollSnapType","scrollbarColor","scrollbarWidth","shapeImageThreshold","shapeMargin","shapeOutside","tabSize","tableLayout","textAlign","textAlignLast","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textIndent","textOverflow","textShadow","textTransform","textUnderlineOffset","top","transform","transformOrigin","transformStyle","transition","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","unicodeBidi","userSelect","verticalAlign","visibility","whiteSpace","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","zIndex"]);D();function ls(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let o=r.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.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:r})}function wa(...t){return ls(this,"warn",t),Wn.apply(this,t)}function va(...t){return ls(this,"error",t),Gn.apply(this,t)}var as={update:kr,remove:Ar,getDB:Kn,getQuery:Qn,getRootData:Vn,getChildren:Dn,getPath:Mn,nextElement:zn,previousElement:Hn,verbose:pr,warn:wa,error:va,variables:qn,spotByPath:Fn,set(t,e){if(this.removeContent(),t!=null){let r=this.context?.__create;r&&r(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)},reset(t){let e=this.context?.__create;if(!e)return this;let r=this.parent,n=this.key,o=this.parse();return this.remove(),e(o,r,n,t)},lookup(t){let e=this.parent;for(;e;){if(typeof t=="function"){if(t(e))return e}else if(typeof t=="string"){if(e.key===t)return e;if(e[t]&&e[t].__ref)return e[t]}e=e.parent}return null},lookdown(t){let e=this.__ref;if(!e?.__children)return null;for(let r of e.__children){let n=this[r];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;let o=n.lookdown?.(t);if(o)return o}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let o=this[n];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(){return this.__ref},getRoot:Nn,getRootState:Ln,getRootContext:Bn,getContext:Un,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let o in this)if(!(o==="parent"||o==="node"||o==="__ref")&&!r?.has(o)){if(n&&n[o]!==void 0){e[o]=n[o];continue}typeof this[o]!="function"&&(e[o]=this[o])}return e},parseDeep(t){let e=this.parse(t),r=this.__ref;if(r?.__children)for(let n of r.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){let e={};for(let r of t)e[r]=this[r];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 r=t[e];if(r==null)continue;let n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),o=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,o,"important")}},call(t,...e){let r=this.context,n=r?.methods?.[t]||r?.functions?.[t]||r?.utils?.[t]||this[t];if(typeof n=="function")return n.call(this,...e)},removeContent(){let t=this.__ref;if(!t?.__children)return;let e=this.content;if(e?.remove){e.remove(),delete this.content;let r=t.__children.indexOf("content");r!==-1&&t.__children.splice(r,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},cs=new WeakMap;function ka(t){if(!t)return as;let e=cs.get(t);if(e)return e;e=Object.create(as);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return cs.set(t,e),e}function Tr(t){let e=ka(t.context);Object.setPrototypeOf(t,e)}D();var Ca=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},kt=(t,e)=>{if(et(e)){let o=e.__raw||e;e.toggle||Object.defineProperty(o,"toggle",{value:function(s,i={}){e[s]=!e[s]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(o,"set",{value:function(s,i={}){return e.clean({preventStateUpdate:!0}),typeof s=="object"&&s!==null&&e.update(s,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(o,"setByPath",{value:function(s,i,a={}){let c=s.split("."),f=e;for(let l=0;l<c.length-1;l++)f[c[l]]===void 0&&(f[c[l]]={}),f=f[c[l]];return f[c[c.length-1]]=i,e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"getByPath",{value: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},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"removeByPath",{value:function(s,i={}){let a=s.split("."),c=e;for(let f=0;f<a.length-1;f++){if(c==null)return e;c=c[a[f]]}return c&&delete c[a[a.length-1]],e},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"reset",{value:function(s={}){let i=e.parse();return e.set(i,s)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"apply",{value:function(s,i={}){if(typeof s=="function"){let a=s(e);return e.update(a,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"applyFunction",{value:function(s,i={}){if(typeof s=="function")return s(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"rootUpdate",{value:function(s,i={}){let a=e;for(;a?.parent&&et(a.parent);)a=a.parent;return a.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"parentUpdate",{value:function(s,i={}){if(e.parent)return e.parent.update(s,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(o,"quietReplace",{value:function(s,i={}){return e.replace(s,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(o,"root")||Object.defineProperty(o,"root",{get:function(){let s=e;for(;s?.parent&&et(s.parent);)s=s.parent;return s},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o]},n={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;r();for(let s in o)e[s]=o[s];return e},replace(o){return e.set(o)},clean(){return r(),e}};for(let o in n)typeof e[o]!="function"&&Ca(e,o,n[o])};var ih=new Proxy(Object.create(null),{get(){},has(){return!1}});D();var Pr={default:["accesskey","autofocus","class","contenteditable","contextmenu","dir","draggable","hidden","id","lang","part","placeholder","slot","spellcheck","style","tabindex","title","translate","inert","radiogroup","role","about","datatype","inlist","prefix","property","resource","typeof","vocab","autocapitalize","autocorrect","autosave","color","itemprop","itemscope","itemtype","itemid","itemref","results","security","unselectable","is"],a:["accesskey","charset","coords","download","href","hreflang","name","rel","rev","shape","target","type"],aria:["aria-activedescendant","aria-atomic","aria-autocomplete","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],anchor:["download","href","hreflang","media","ping","rel","target","type","referrerpolicy"],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],area:["alt","coords","download","href","hreflang","media","referrerpolicy","rel","shape","target","ping"],base:["href","target"],blockquote:["cite"],button:["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","type","value"],canvas:["height","width"],col:["span","width"],colgroup:["span"],data:["value"],details:["open"],del:["cite","datetime"],dialog:["open"],embed:["height","src","type","width"],fieldset:["disabled","form","name"],form:["acceptcharset","action","autocomplete","enctype","method","name","novalidate","target","rel"],html:["manifest"],iframe:["allow","allowfullscreen","allowtransparency","frameborder","height","loading","marginheight","marginwidth","mozallowfullscreen","name","referrerpolicy","sandbox","scrolling","seamless","src","srcdoc","webkitallowfullscreen","width"],img:["alt","crossorigin","decoding","height","ismap","loading","referrerpolicy","sizes","src","srcset","usemap","width"],ins:["cite","datetime"],input:["accept","alt","autocomplete","capture","checked","crossorigin","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","indeterminate","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","type","value","width"],keygen:["challenge","disabled","form","keytype","keyparams","name"],label:["form","for"],li:["value"],link:["as","crossorigin","href","hreflang","integrity","media","imagesrcset","imagesizes","referrerpolicy","rel","sizes","type","charset"],map:["name"],menu:["type"],media:["autoplay","controls","currenttime","defaultmuted","defaultplaybackrate","loop","mediagroup","muted","playsinline","preload","src","volume"],meta:["charset","content","http-equiv","name","media"],meter:["form","high","low","max","min","optimum","value"],quote:["cite"],object:["classid","data","form","height","name","type","usemap","width","wmode"],ol:["reversed","start","type"],optgroup:["disabled","label"],option:["disabled","label","selected","value"],output:["form","for","name"],param:["name","value"],progress:["max","value"],slot:["name"],script:["async","charset","crossorigin","defer","integrity","nomodule","nonce","referrerpolicy","src","type"],select:["autocomplete","disabled","form","multiple","name","required","size","value","onchange"],source:["height","media","sizes","src","srcset","type","width"],style:["media","nonce","scoped","type"],table:["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"],textarea:["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","value","wrap"],td:["align","colspan","headers","rowspan","scope","abbr","height","width","valign"],th:["align","colspan","headers","rowspan","scope","abbr"],time:["datetime"],track:["default","kind","label","src","srclang"],video:["autoplay","controls","crossorigin","disablepictureinpicture","disableremoteplayback","height","loop","muted","playsinline","poster","preload","src","width"],svg:["className","class","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabindex","crossorigin","accent-height","accumulate","additive","alignment-baseline","allowReorder","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","clip","clip-path","clipPathUnits","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","externalResourcesRequired","fill","fill-opacity","fill-rule","filter","filterRes","filterUnits","flood-color","flood-opacity","focusable","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","href","horiz-adv-x","horiz-origin-x","ideographic","image-rendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","markerHeight","marker-mid","marker-start","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","paint-order","panose-1","path","pathLength","patternContentUnits","patternTransform","patternUnits","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","surfaceScale","systemLanguage","tableValues","targetX","targetY","text-anchor","text-decoration","textLength","text-rendering","to","transform","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","v-hanging","v-ideographic","viewBox","viewTarget","visibility","v-mathematical","widths","word-spacing","writing-mode","x1","x2","x","xChannelSelector","x-height","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xmlns","xmlns:xlink","xml:space","y1","y2","y","yChannelSelector","z","zoomAndPan"]};var Aa=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,fe=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||Aa(e)||Pr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Pr,t)?Pr[t].includes(e):!1;var Ie=(t,e)=>{let r=t.call("exec",e,t);if(r)return _(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},fs=(t,e)=>{let r=(t.preSrc||"")+(Ie(t,e)||"");if(!r)return;try{return new URL(r),r}catch{}let{context:n}=t;if(!n.files&&!n.assets)return r;if(r.startsWith("/assets/")){let o=r.slice(8),s=n.assets&&(n.assets[r]||n.assets[o]);return s&&s.content?s.content.src:r}if(r.startsWith("/files/")){let o=r.slice(7),s=n.files&&(n.files[r]||n.files[o]);return s&&s.content?s.content.src:r}if(n.assets){let o=n.assets[r];if(o&&o.content)return o.content.src}if(n.files){let o=n.files[r];if(o&&o.content)return o.content.src}return r},us={src:t=>fs(t,t.src),href:t=>Ie(t,t.href),action:t=>Ie(t,t.action),poster:t=>fs(t,t.poster),data:t=>Ie(t,t.data)},ds=t=>{let e=t.tag||"div",r={};for(let n in us)if(t[n]!==void 0&&fe(e,n)){let o=us[n](t);o!==void 0&&(r[n]=o)}return r};var Oa=1;function Ut(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function $a(t){return t.charAt(2).toLowerCase()+t.slice(3)}function Ea(t){return t.toLowerCase()}function Ir(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Ir(o,s):r[n]=s}return r}function ot(t,e,r,n={},o){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let s=Object.create(null);s.key=r||t.key||`_${Oa++}`,s.parent=e||null,s.context=t.context||e?.context||n.context||{},s.context.__create||(s.context.__create=ot);let i=s.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||s,path:e?.__ref?.path?[...e.__ref.path,s.key]:[s.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),y=s.context?.components;y&&(y[b]||y["smbls."+b])&&(t={extends:b,...t})}}ae(s,t,n);let a=new Set(["childProps","attr","style","scope","data"]),c=s.props&&typeof s.props=="object"?s.props:null;for(let g in t){if(g==="parent"||g==="node"||g==="__ref"||g==="extends"||g==="context"||g==="props")continue;let b=t[g],y=s[g],m=y&&b&&typeof y=="object"&&typeof b=="object"&&!Array.isArray(y)&&!Array.isArray(b)&&typeof y!="function"&&typeof b!="function";m&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?s[g]=Ir(y,b):m&&a.has(g)?s[g]={...y,...b}:s[g]=b}function f(g){for(let b in g){let y=g[b],m=s[b],x=m&&y&&typeof m=="object"&&typeof y=="object"&&!Array.isArray(m)&&!Array.isArray(y)&&typeof m!="function"&&typeof y!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?s[b]=Ir(m,y):x&&a.has(b)?s[b]={...m,...y}:s[b]=y}}c&&f(c),t.props&&typeof t.props=="object"&&f(t.props),t.data!==void 0&&(s.data=t.data),t.classlist!==void 0&&(s.classlist=t.classlist),t.text!==void 0&&(s.text=t.text),t.html!==void 0&&(s.html=t.html);let l=s.scope&&typeof s.scope=="object"?s.scope:null,u=e?.scope,h=s.context&&typeof s.context.globalScope=="object"&&s.context.globalScope||null,p=u||h||null;if(t.scope!==void 0||l){let g={};l&&Object.assign(g,l),t.scope!==void 0&&Object.assign(g,t.scope),s.scope=Ge(g,p)}else p&&(s.scope=p);if(t.if!==void 0&&(s.if=t.if),Tr(s),Ta(s,e,t),s.if!=null){let g=typeof s.if=="function"?s.if(s,s.state,s.context):s.if;i.__if=!!g}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[s.key]=s),typeof t.if=="function"&&Fr(s,{if:t.if}),s;s.tag||(s.tag=Wt(s)),Ct("Init",s,n);let d=s.node=Gt(s);if(!d)return s;Ct("AttachNode",s,n),d.setAttribute&&s.key&&d.setAttribute("data-key",s.key),d.setAttribute&&s.context?.scopeSelector&&s.context.scopeSelector!==":root"&&s.context.key&&s.key===s.context.key&&d.setAttribute("data-smbls-app",s.context.key),s.id&&d.setAttribute&&(d.id=s.id),Fr(s,t),Dr(s),hs(s),gs(s,n);try{ms(s,n)}catch(g){if(typeof console<"u"&&console.error){let b=s.__ref?.path?.join(".")||s.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,g?.message||g,g?.stack?`
12
12
  `+g.stack.split(`
13
13
  `).slice(0,6).join(`
14
- `):"")}}if(Vr(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&Q(g);try{let x=s.html(s,s.state,s.context);x!=null&&typeof x!="function"&&(s.node.innerHTML=x)}catch{}finally{g&&K()}}if(kt("Create",s,n),kt("Complete",s,n),kt("Render",s,n),kt("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,x=s.context?.designSystem,m=()=>{if(s.node){if(s.node.isConnected){x&&Q(x);try{g(s,s.state,s.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{x&&K()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return s}function Tc(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!rt(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,vt(t,t.state);else if(t.context?.state){let c=t.context.state,a={...c},l=t.context?.polyglot;if(l?.translations){let f=c.lang||l.defaultLang||"en",u=l.translations[f];if(u&&typeof u=="object")for(let d in u)a[d]===void 0&&(a[d]=u[d]);let p=new Set(l.languages||[]);for(let d in l.translations)!p.has(d)&&a[d]===void 0&&(a[d]=l.translations[d])}t.state=rt(a)?a:et(a),t.state.__element=t,t.state.root=t.state,vt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),vt(t,t.state);return}if(typeof i=="string"){if(t.state=ds(i,e),t.state&&typeof t.state=="object"&&!rt(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}vt(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=et(c||{})}else t.state=et({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,vt(t,t.state)}function Ir(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function ds(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?Ir(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?Ir(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Ir(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function Pc(t){let e=t.__ref,r=t.tag||"div",n=t.context?.designSystem,o=[],s=Object.keys(t);for(let i=0;i<s.length;i++){let c=s[i];if(typeof t[c]!="function"||q.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||Ut(c)||J[c]||tt&&tt.has(c)||le(r,c)||o.push({prop:c,fn:t[c]})}for(let i=0;i<o.length;i++){let{prop:c,fn:a}=o[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){n&&Q(n);try{return a(t,t.state,t.context)}catch{return}finally{n&&K()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function jr(t,e){let r=t.__ref;if(Pc(t),typeof t.text=="function"){let o=t.text,s=L(()=>{if(!r.contentManaged)try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=_e.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=L(()=>{if(r.contentManaged)return;let i=_e.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!q.has(o)&&!Ut(o)&&!r.__exec[o]){if(J[o]){let s=t[o],i=o,c=L(()=>{let a=t.context?.designSystem;a&&Q(a);try{let l=s(t,t.state,t.context),f=J[i](l,t,t.state,t.context);f&&t.node?Bt(t.node,f):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{a&&K()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}else if(tt&&tt.has(o)){let s=t[o],i=o,c=L(()=>{let a=t.context?.designSystem;a&&Q(a);try{let l=s(t,t.state,t.context);t.node&&(l!=null?Bt(t.node,{[i]:l}):t.node.style[i]="")}finally{a&&K()}},{depth:r.path.length});r.__effects.push(c),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=L(()=>{let i=t.context?.designSystem;i&&Q(i);try{let c=o(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&(t.node.innerHTML=c)}finally{i&&K()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=L(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let c=i==null?"":String(i);if(t.node.value===c)return;let a=typeof document<"u"&&document.activeElement===t.node,l=a&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,f=a&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=c,a&&l!=null&&f!=null)try{t.node.setSelectionRange(l,f)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s=L(()=>{let i=o(t,t.state,t.context);Bt(t.node,i)},{depth:r.path.length});r.__effects.push(s),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i=L(()=>{try{let c=s(t,t.state,t.context);t.node&&Bt(t.node,{[o]:c})}catch{}},{depth:r.path.length});r.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,c=L(()=>{try{let a=s(t,t.state,t.context);t.node?.setAttribute&&(a==null||a===!1?t.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(i,a===!0?"":a))}catch{}},{depth:r.path.length});r.__effects.push(c)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),c=L(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(i):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(i,a===!0?"":a)}catch{}},{depth:r.path.length});r.__effects.push(c)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let c="data-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=L(()=>{try{let l=s(t,t.state,t.context);if(!t.node?.setAttribute)return;l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&t.node.setAttribute(c,l===!0?"":l)}catch{}},{depth:r.path.length});r.__effects.push(a)}let n=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(n)for(let o in n){let s=n[o];if(typeof s!="function")continue;let i=L(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.classList)return;typeof c=="string"?t.node.classList.add(c):c?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=L(()=>{let i=o(t,t.state,t.context),c=r.__if;if(r.__if=!!i,c&&!r.__if&&t.node)t.node.remove();else if(!c&&r.__if)if(r.__ifInitialized){t.node||(t.node=Gt(t));let a=t.parent,l=a?.node;if(l&&t.node){let f=null,u=Object.keys(a),p=u.indexOf(t.key);for(let d=p+1;d<u.length;d++){let h=a[u[d]];if(h?.node?.parentNode===l){f=h.node;break}}f?l.insertBefore(t.node,f):l.appendChild(t.node)}else Vr(t,t.parent);Mr(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=Wt(t)),kt("Init",t,{}),t.node||(t.node=Gt(t)),!t.node)return;kt("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);let a=e.if;delete e.if;try{jr(t,e)}finally{e.if=a}Mr(t),hs(t),gs(t,{}),ys(t,{}),Vr(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||q.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||Ut(o))continue;let i=t[o];r.__exec[o]=i;let c=t.tag||"div";if(le(c,o)&&!J[o]&&!(tt&&tt.has(o))){let a=o,l=L(()=>{try{let f=i(t,t.state,t.context);t.node?.setAttribute&&(f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&(a==="src"&&"src"in t.node?t.node.src=f:t.node.setAttribute(a,f===!0?"":f)))}catch{}},{depth:r.path.length});r.__effects.push(l)}}Dc(t)}function Mr(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Fc(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Bt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Bt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=s.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&Ic(t,r)}var Rc=0;function Ic(t,e){let r=`_ds${Rc++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let c="."+r,a=i.replace(/&/g,c).split(",").map(f=>{let u=f.trim();return u.includes(c)?u:c+u}).join(", "),l=e[i];if(typeof l=="object"){let f="",u="";for(let p in l){let d=l[p];if(typeof d=="object"){let h=p.includes("&")?a.split(", ").map(x=>p.replace(/&/g,x)).join(", "):a.split(", ").map(x=>`${x} ${p}`).join(", "),g="";for(let x in d)g+=`${x.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${d[x]};`;u+=`${h} { ${g} }
15
- `}else f+=`${p.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${d};`}f&&(s+=`${a} { ${f} }
16
- `),u&&(s+=u)}}s&&(o.textContent+=s)}function Dc(t){let e=t.__ref;e.__conditionalRunners=[];for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=r.charAt(0);if(n!=="."&&n!=="!")continue;let o=r.slice(1);if(!o)continue;let s=t[r];if(!s||typeof s!="object")continue;let i=n==="!",c={lastMatch:!1,appliedKeys:null},a=()=>{if(!t.node)return;let f,u=t[o];if(u===void 0)if(t.state&&o in t.state)f=t.state[o];else{let h=t.context?.cases?.[o];if(h===void 0)return;f=typeof h=="function"?h.call(t,t):h}else typeof u=="function"?f=u(t,t.state,t.context):f=u;let p=i?!f:!!f;if(p===c.lastMatch)return;c.lastMatch=p;let d=t.context?.designSystem;d&&Q(d);try{if(p){let h={};for(let x in s){if(!Object.prototype.hasOwnProperty.call(s,x))continue;let m=typeof s[x]=="function"?s[x](t,t.state,t.context):s[x];if(m!=null)if(J[x]){let y=J[x](m,t,t.state,t.context);if(y){let b=Array.isArray(y)?y:[y];for(let C of b)C&&Object.assign(h,C)}}else tt&&tt.has(x)&&(h[x]=m)}let g=Object.keys(h);g.length?(Bt(t.node,h),c.appliedKeys=g):c.appliedKeys=null}else if(c.appliedKeys){for(let h of c.appliedKeys)t.node.style[h]="";c.appliedKeys=null}}finally{d&&K()}};e.__conditionalRunners.push(a);let l=L(a,{depth:e.path.length});e.__effects.push(l)}}var Dr=new WeakSet;function Fc(t){let{node:e}=t;if(!e)return;if(Dr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Dr.add(t);let r=t.context?.designSystem;r&&Q(r);try{let n={},o=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||q.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Ut(s)){if(J[s]){let c=t[s],a=J[s](c,t,t.state,t.context);if(a){if(Array.isArray(a))for(let l of a)l&&Object.assign(n,l);else Object.assign(n,a);o=!0}}else if(tt&&tt.has(s)){let c=t[s];c!=null&&typeof c!="object"&&(n[s]=c,o=!0)}else if(s.charCodeAt(0)===45){let c=t[s];c!=null&&typeof c!="object"&&(n[s]=c,o=!0)}else if(s.charAt(0)==="&"){let c=t[s];c&&typeof c=="object"&&(n[s]=c,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let c=t[s];if(c&&typeof c=="object"){let a={};for(let l in c){let f=c[l];if(typeof f=="function"&&(f=f(t,t.state,t.context)),!(f==null||typeof f=="function"))if(J[l]){let u=J[l](f,t,t.state,t.context);if(u)if(Array.isArray(u))for(let p of u)p&&Object.assign(a,p);else Object.assign(a,u)}else a[l]=f}if(Object.keys(a).length){if(s.length>1&&s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")&&!s.startsWith("@supports")&&(s==="@dark"||s==="@light"||!t.context?.designSystem?.media?.[s.slice(1)])){let f={};for(let p in a){let d=a[p];f[p]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}let u=s.slice(1);n[`[data-theme="${u}"] &`]=f}else{let f=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let p=s.slice(1),d=t.context?.designSystem?.media?.[p]||t.context?.designSystem?.media?.[p];d&&(f=`@media ${d}`)}let u={};for(let p in a){let d=a[p];if(d&&typeof d=="object"&&!Array.isArray(d)){let h={};for(let x in d)if(J[x]){let m=J[x](d[x],t,t.state,t.context);if(m)if(Array.isArray(m))for(let y of m)y&&Object.assign(h,y);else Object.assign(h,m)}else h[x]=d[x];let g=p.startsWith(":")?"":" ";if(f.includes(",")){let x=f.split(",").map(m=>`${m.trim()}${g}${p}`).join(", ");n[x]=h}else n[`${f}${g}${p}`]=h}else u[p]=d}Object.keys(u).length&&(n[f]=u)}o=!0}o=!0}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=$r(n,null,t.context?.cssPrefix);s&&e.classList&&s.split(" ").forEach(c=>c&&e.classList.add(c));let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let c=n.display;if(c&&c!==i)if(i==="none"){let a=[];for(let l of e.classList)l.startsWith("_d-")&&l!=="_d-none"&&a.push(l);for(let l of a)e.classList.remove(l);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&K(),Dr.delete(t)}}function hs(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||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.setAttribute(i,s===!0?"":s)}let r=ps(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||q.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Ut(o)&&!(J[o]||tt&&tt.has(o))&&le(n,o)){let i=t[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=_e(i,t,t.state,t.context),t[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(o,i===!0?"":i)}}}function gs(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Ut(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(c){return t.call(s,c)}}if(typeof n!="function")continue;let o=Ec(r);zt.has(o)||ce($c(o),t,n)}}function Nr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Nr(o,s):r[n]=s}return r}function Lr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!s)return;let i=t.childProps,c=t.childrenAs;for(let a=0;a<e.length;a++){let l=e[a],f=l;(typeof l=="string"||typeof l=="number")&&(l={text:l});let u=i;if(typeof i=="function")try{u=i(t,l)}catch{u=null}if(c==="state"){let h=f;(typeof f=="string"||typeof f=="number")&&(h={value:f,text:f}),l=u?{...u,state:h}:{state:h}}else u&&(l=Nr(u,l));if(n&&!l.ignoreChildExtends)if(l.extends){let h=Array.isArray(l.extends)?l.extends:[l.extends],g=Array.isArray(n)?n:[n];l={...l,extends:[...g,...h]}}else l={extends:n,...l};let p=l?.key||`${a}`,d=st(l,t,p,r);d?.node&&s.appendChild(d.node)}t.node.appendChild(s);return}if(typeof e=="string"){let o=ds(e,t);if(Array.isArray(o)){Lr(t,o,r);return}}if(typeof e=="object")for(let o in e){if(q.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Nr(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],c=Array.isArray(n)?n:[n];s={...s,extends:[...c,...i]}}else s={extends:n,...s};st(s,t,o,r)}}}function ys(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let c=t.__ref,a=!1,l=L(()=>{let f=i(t,t.state,t.context);if(!a){a=!0;return}if(f===t.children)return;if(t.children=f,Array.isArray(f)&&t.childrenAs==="state"){let d=t.childProps,h=[],g=new Map;for(let S=0;S<f.length;S++){let T=f[S],E=d;if(typeof d=="function")try{E=d(t,T)}catch{E=null}let Z=E&&E.key||T&&T.key||`${S}`;h.push(Z),g.set(Z,{rawChild:T,childProps:E})}let x=new Set(h),m=c.__children.slice();for(let S of m)if(!x.has(S)){let T=t[S];T?.remove&&T.remove(),delete t[S]}let y=t.childExtends,C=(t.context?.document||globalThis.document)?.createDocumentFragment();for(let S of h){let T=g.get(S),E=T.rawChild,Z=t[S];if(Z&&Z.state){if(E&&typeof E=="object"){let M=Z.state;if(typeof M.replace=="function")M.replace(E);else if(typeof M.update=="function"){for(let D in M)if(!(D==="__element"||D==="root"||D==="parent"||D==="update")&&!Object.prototype.hasOwnProperty.call(E,D))try{M[D]=void 0}catch{}M.update(E)}else for(let D in E)M[D]=E[D]}continue}let B=E;(typeof E=="string"||typeof E=="number")&&(B={value:E,text:E});let X=T.childProps,U=X?{...X,state:B}:{state:B};if(y&&!U.ignoreChildExtends)if(U.extends){let M=Array.isArray(U.extends)?U.extends:[U.extends],D=Array.isArray(y)?y:[y];U={...U,extends:[...D,...M]}}else U={extends:y,...U};let gt=st(U,t,S,e);gt?.node&&C&&C.appendChild(gt.node)}C&&C.childNodes.length&&t.node&&t.node.appendChild(C),c.__children=h;return}for(let d of[...c.__children]){let h=t[d];h?.remove&&h.remove(),delete t[d]}c.__children=[],Lr(t,f,e)},{depth:c.path.length});c.__effects.push(l)}if(Lr(t,r||n,e),r||n)return;let s=t.context?.components||{};{let i=Object.keys(t);for(let c=0;c<i.length;c++){let a=i[c];if(!a.endsWith("Extends")||typeof t[a]!="string")continue;let l=a.slice(0,-7);if(!l||l.charCodeAt(0)<65||l.charCodeAt(0)>90)continue;let f={extends:t[a]};delete t[a];for(let u=c+1;u<i.length;u++){let p=i[u],d=p.charCodeAt(0);if(d>=65&&d<=90||q.has(p)||typeof t[p]=="function"&&(p.startsWith("on")||p.startsWith(".")))break;let h=t[p];h!==void 0&&(f[p]=h,delete t[p])}t[l]&&typeof t[l]=="object"?t[l]={...f,...t[l]}:t[l]=f}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||q.has(i)||typeof t[i]!="object"||t[i]===null)continue;let c=i.charCodeAt(0);if(c<65||c>90)continue;let a=t[i];if(!a.__ref){if(!a.extends&&!a.extend){let l=s[i]||s[`smbls.${i}`];l&&(a={extends:l,...a})}if(t.childProps&&(a={...t.childProps,...a}),o&&!a.ignoreChildExtends)if(a.extends){let l=Array.isArray(a.extends)?a.extends:[a.extends],f=Array.isArray(o)?o:[o];a={...a,extends:[...f,...l]}}else a={extends:o,...a};st(a,t,i,e)}}}function Vr(t,e,r){let{node:n}=t;if(!n)return;let o=e?.node||(e?.nodeType?e:null);if(o)if(r?.position==="before"&&r.node)o.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let s=r.node.nextSibling;s?o.insertBefore(n,s):o.appendChild(n)}else o.appendChild(n)}function kt(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&qt(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let i=e.context?.designSystem;i&&Q(i);try{if(s(e,e.state,e.context,r)===!1)return!1}catch(c){if(e.context?.plugins?.length&&qt("error",e,{hook:o,error:c})||console.error(`[DOMQL] Lifecycle "${o}" error:`,c),e.context?.strictMode)throw c}finally{i&&K()}}return!0}var jc=st;var Mc=(t,e,r={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let n=r.state?et(r.state):void 0;return st(t,e,"Root",{state:n,context:r.context||{}})};return Cs(Nc);})();
14
+ `):"")}}if(Nr(s,e,o),e&&(e[s.key]=s,e.__ref?.__children&&(e.__ref.__children.includes(s.key)||e.__ref.__children.push(s.key))),typeof s.html=="function"&&s.node&&!s.node.innerHTML){let g=s.context?.designSystem;g&&Q(g);try{let b=s.html(s,s.state,s.context);b!=null&&typeof b!="function"&&(s.node.innerHTML=b)}catch{}finally{g&&q()}}if(Ct("Create",s,n),Ct("Complete",s,n),Ct("Render",s,n),Ct("RenderRouter",s,n),typeof s.onFrame=="function"){let g=s.onFrame,b=s.context?.designSystem,y=()=>{if(s.node){if(s.node.isConnected){b&&Q(b);try{g(s,s.state,s.context)}catch(m){console.error("[DOMQL] onFrame error:",m)}finally{b&&q()}}requestAnimationFrame(y)}};requestAnimationFrame(y)}return s}function Ta(t,e,r){let n=!e,o=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,s=n&&o&&t.context?.state,i=r.state!==void 0&&!s?r.state:t.state&&!et(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,kt(t,t.state);else if(t.context?.state){let a=t.context.state,c={...a},f=t.context?.polyglot;if(f?.translations){let l=a.lang||f.defaultLang||"en",u=f.translations[l];if(u&&typeof u=="object")for(let p in u)c[p]===void 0&&(c[p]=u[p]);let h=new Set(f.languages||[]);for(let p in f.translations)!h.has(p)&&c[p]===void 0&&(c[p]=f.translations[p])}t.state=et(c)?c:tt(c),t.state.__element=t,t.state.root=t.state,kt(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),kt(t,t.state);return}if(typeof i=="string"){if(t.state=ps(i,e),t.state&&typeof t.state=="object"&&!et(t.state)){let a=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:a,enumerable:!1,configurable:!0,writable:!0})}kt(t,t.state);return}if(typeof i=="function"){let a=i(t,e?.state);t.state=tt(a||{})}else t.state=tt({...i});t.state.__element=t,e?.state?(t.state.parent=e.state,t.state.root=e.state.root||e.state):t.state.root=t.state,kt(t,t.state)}function jr(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let o of r){if(n==null)return{};n=n[o]}return n??{}}function ps(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let o=t.slice(3);return o?jr(e.state,o):e.state??{}}if(t.startsWith("~/")){let o=e.state?.root||e.state,s=t.slice(2);return s?jr(o,s):o??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=jr(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let o=e.state?.root?.lang||n.defaultLang||"en",s=n.translations[o];if(s?.[t]!==void 0)return s[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function Pa(t){let e=t.__ref,r=t.tag||"div",n=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"||K.has(a))continue;let c=a.charCodeAt(0);c>=65&&c<=90||Ut(a)||J[a]||Y&&Y.has(a)||fe(r,a)||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(){n&&Q(n);try{return c(t,t.state,t.context)}catch{return}finally{n&&q()}},set(f){delete e.__exec[a],Object.defineProperty(t,a,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Fr(t,e){let r=t.__ref;if(Pa(t),typeof t.text=="function"){let o=t.text,s=N(()=>{if(!r.contentManaged)try{let i=o(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=xe.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,s=N(()=>{if(r.contentManaged)return;let i=xe.call(t,o,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:r.path.length});r.__effects.push(s),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!K.has(o)&&!Ut(o)&&!r.__exec[o]){if(J[o]){let s=t[o],i=o,a=N(()=>{let c=t.context?.designSystem;c&&Q(c);try{let f=s(t,t.state,t.context),l=J[i](f,t,t.state,t.context);l&&t.node?Bt(t.node,l):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{c&&q()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}else if(Y&&Y.has(o)){let s=t[o],i=o,a=N(()=>{let c=t.context?.designSystem;c&&Q(c);try{let f=s(t,t.state,t.context);t.node&&(f!=null?Bt(t.node,{[i]:f}):t.node.style[i]="")}finally{c&&q()}},{depth:r.path.length});r.__effects.push(a),r.__exec[o]=s}}if(typeof e.html=="function"){let o=e.html,s=N(()=>{let i=t.context?.designSystem;i&&Q(i);try{let a=o(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{i&&q()}},{depth:r.path.length});r.__effects.push(s),r.__exec.html=o}if(typeof e.value=="function"){let o=e.value,s=N(()=>{try{let i=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=i==null?"":String(i);if(t.node.value===a)return;let c=typeof document<"u"&&document.activeElement===t.node,f=c&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,l=c&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,c&&f!=null&&l!=null)try{t.node.setSelectionRange(f,l)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(s),r.__exec.value=o}if(typeof e.style=="function"){let o=e.style,s=N(()=>{let i=o(t,t.state,t.context);Bt(t.node,i)},{depth:r.path.length});r.__effects.push(s),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let s=t.style[o];if(typeof s!="function")continue;let i=N(()=>{try{let a=s(t,t.state,t.context);t.node&&Bt(t.node,{[o]:a})}catch{}},{depth:r.path.length});r.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let s=t.attr[o],i=o,a=N(()=>{try{let c=s(t,t.state,t.context);t.node?.setAttribute&&(c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let s=t.aria[o];if(typeof s!="function")continue;let i="aria-"+o.replace(/[A-Z]/g,c=>"-"+c.toLowerCase()),a=N(()=>{try{let c=s(t,t.state,t.context);if(!t.node?.setAttribute)return;c==null||c===!1?t.node.removeAttribute(i):typeof c!="function"&&typeof c!="object"&&t.node.setAttribute(i,c===!0?"":c)}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.data&&typeof t.data=="object")for(let o in t.data){let s=t.data[o];if(typeof s!="function")continue;let a="data-"+o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=N(()=>{try{let f=s(t,t.state,t.context);if(!t.node?.setAttribute)return;f==null||f===!1?t.node.removeAttribute(a):typeof f!="function"&&typeof f!="object"&&t.node.setAttribute(a,f===!0?"":f)}catch{}},{depth:r.path.length});r.__effects.push(c)}let n=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(n)for(let o in n){let s=n[o];if(typeof s!="function")continue;let i=N(()=>{try{let a=s(t,t.state,t.context);if(!t.node?.classList)return;typeof a=="string"?t.node.classList.add(a):a?t.node.classList.add(o):t.node.classList.remove(o)}catch{}},{depth:r.path.length});r.__effects.push(i)}if(typeof e.if=="function"){let o=e.if,s=N(()=>{let i=o(t,t.state,t.context),a=r.__if;if(r.__if=!!i,a&&!r.__if&&t.node)t.node.remove();else if(!a&&r.__if)if(r.__ifInitialized){t.node||(t.node=Gt(t));let c=t.parent,f=c?.node;if(f&&t.node){let l=null,u=Object.keys(c),h=u.indexOf(t.key);for(let p=h+1;p<u.length;p++){let d=c[u[p]];if(d?.node?.parentNode===f){l=d.node;break}}l?f.insertBefore(t.node,l):f.appendChild(t.node)}else Nr(t,t.parent);Dr(t)}else{if(r.__ifInitialized=!0,t.tag||(t.tag=Wt(t)),Ct("Init",t,{}),t.node||(t.node=Gt(t)),!t.node)return;Ct("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);let c=e.if;delete e.if;try{Fr(t,e)}finally{e.if=c}Dr(t),hs(t),gs(t,{}),ms(t,{}),Nr(t,t.parent)}},{depth:r.path.length});r.__effects.push(s)}for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||K.has(o)||typeof t[o]!="function")continue;let s=o.charCodeAt(0);if(s>=65&&s<=90||Ut(o))continue;let i=t[o];r.__exec[o]=i;let a=t.tag||"div";if(fe(a,o)&&!J[o]&&!(Y&&Y.has(o))){let c=o,f=N(()=>{try{let l=i(t,t.state,t.context);t.node?.setAttribute&&(l==null||l===!1?t.node.removeAttribute(c):typeof l!="function"&&typeof l!="object"&&(c==="src"&&"src"in t.node?t.node.src=l:t.node.setAttribute(c,l===!0?"":l)))}catch{}},{depth:r.path.length});r.__effects.push(f)}}Ia(t)}function Dr(t){let{node:e}=t;if(e){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?e.nodeValue=t.text:e.textContent=t.text:typeof t.text=="number"&&(e.textContent=t.text),Fa(t),typeof t.html=="string"&&(e.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in e){let r=String(t.value);e.value!==r&&(e.value=r)}if(t.style&&typeof t.style=="object"&&Bt(e,t.style),t.attr&&typeof t.attr=="object")for(let r in t.attr){let n=t.attr[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.setAttribute&&e.setAttribute(r,n===!0?"":n)}if(t.data&&typeof t.data=="object")for(let r in t.data){let n=t.data[r];typeof n=="function"||typeof n=="object"||n==null||n===!1||e.dataset&&(e.dataset[r]=n===!0?"":n)}if(t.classlist||t.class){let r=t.classlist||t.class;if(typeof r=="string")r.split(" ").forEach(n=>n&&e.classList.add(n));else if(typeof r=="object")for(let n in r){let o=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];o&&e.classList.add(typeof o=="string"?o:n)}}}}function Bt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let o=e[n];if(o!=null){if(n.charAt(0)==="&"&&typeof o=="object"){r||(r={}),r[n]=o;continue}try{let s=String(o),i=n.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=s.trim(),c=/\s*!important\s*$/.test(a),f=a.replace(/\s*!important\s*$/,"");t.style.setProperty(i,f,c?"important":"")}catch{}}}r&&Ra(t,r)}var ja=0;function Ra(t,e){let r=`_ds${ja++}`;t.classList.add(r);let n=t.ownerDocument,o=n.querySelector("style[data-smbls-scoped]");o||(o=n.createElement("style"),o.setAttribute("data-smbls-scoped",""),n.head.appendChild(o));let s="";for(let i in e){let a="."+r,c=i.replace(/&/g,a).split(",").map(l=>{let u=l.trim();return u.includes(a)?u:a+u}).join(", "),f=e[i];if(typeof f=="object"){let l="",u="";for(let h in f){let p=f[h];if(typeof p=="object"){let d=h.includes("&")?c.split(", ").map(b=>h.replace(/&/g,b)).join(", "):c.split(", ").map(b=>`${b} ${h}`).join(", "),g="";for(let b in p)g+=`${b.replace(/[A-Z]/g,y=>"-"+y.toLowerCase())}: ${p[b]};`;u+=`${d} { ${g} }
15
+ `}else l+=`${h.replace(/[A-Z]/g,d=>"-"+d.toLowerCase())}: ${p};`}l&&(s+=`${c} { ${l} }
16
+ `),u&&(s+=u)}}s&&(o.textContent+=s)}function Ia(t){let e=t.__ref;e.__conditionalRunners=[];for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let n=r.charAt(0);if(n!=="."&&n!=="!")continue;let o=r.slice(1);if(!o)continue;let s=t[r];if(!s||typeof s!="object")continue;let i=n==="!",a={lastMatch:!1,appliedKeys:null},c=()=>{if(!t.node)return;let l,u=t[o];if(u===void 0)if(t.state&&o in t.state)l=t.state[o];else{let d=t.context?.cases?.[o];if(d===void 0)return;l=typeof d=="function"?d.call(t,t):d}else typeof u=="function"?l=u(t,t.state,t.context):l=u;let h=i?!l:!!l;if(h===a.lastMatch)return;a.lastMatch=h;let p=t.context?.designSystem;p&&Q(p);try{if(h){let d={};for(let b in s){if(!Object.prototype.hasOwnProperty.call(s,b))continue;let y=typeof s[b]=="function"?s[b](t,t.state,t.context):s[b];if(y!=null)if(J[b]){let m=J[b](y,t,t.state,t.context);if(m){let x=Array.isArray(m)?m:[m];for(let v of x)v&&Object.assign(d,v)}}else Y&&Y.has(b)&&(d[b]=y)}let g=Object.keys(d);g.length?(Bt(t.node,d),a.appliedKeys=g):a.appliedKeys=null}else if(a.appliedKeys){for(let d of a.appliedKeys)t.node.style[d]="";a.appliedKeys=null}}finally{p&&q()}};e.__conditionalRunners.push(c);let f=N(c,{depth:e.path.length});e.__effects.push(f)}}var Rr=new WeakSet;function Fa(t){let{node:e}=t;if(!e)return;if(Rr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Rr.add(t);let r=t.context?.designSystem;r&&Q(r);try{let n={},o=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||K.has(s))continue;let i=s.charCodeAt(0);if(!(i>=65&&i<=90)&&!Ut(s)){if(J[s]){let a=t[s],c=J[s](a,t,t.state,t.context);if(c){if(Array.isArray(c))for(let f of c)f&&Object.assign(n,f);else Object.assign(n,c);o=!0}}else if(Y&&Y.has(s)){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charCodeAt(0)===45){let a=t[s];a!=null&&typeof a!="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="&"){let a=t[s];a&&typeof a=="object"&&(n[s]=a,o=!0)}else if(s.charAt(0)==="@"||s.charAt(0)===":"){let a=t[s];if(a&&typeof a=="object"){let c={};for(let f in a){let l=a[f];if(typeof l=="function"&&(l=l(t,t.state,t.context)),!(l==null||typeof l=="function"))if(J[f]){let u=J[f](l,t,t.state,t.context);if(u)if(Array.isArray(u))for(let h of u)h&&Object.assign(c,h);else Object.assign(c,u)}else c[f]=l}if(Object.keys(c).length){if(s.length>1&&s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")&&!s.startsWith("@supports")&&(s==="@dark"||s==="@light"||!t.context?.designSystem?.media?.[s.slice(1)])){let l={};for(let h in c){let p=c[h];l[h]=typeof p=="string"&&!p.includes("!important")?p+" !important":p}let u=s.slice(1);n[`[data-theme="${u}"] &`]=l}else{let l=s;if(s.charAt(0)==="@"&&!s.startsWith("@media")&&!s.startsWith("@keyframes")){let h=s.slice(1),p=t.context?.designSystem?.media?.[h]||t.context?.designSystem?.media?.[h];p&&(l=`@media ${p}`)}let u={};for(let h in c){let p=c[h];if(p&&typeof p=="object"&&!Array.isArray(p)){let d={};for(let b in p)if(J[b]){let y=J[b](p[b],t,t.state,t.context);if(y)if(Array.isArray(y))for(let m of y)m&&Object.assign(d,m);else Object.assign(d,y)}else d[b]=p[b];let g=h.startsWith(":")?"":" ";if(l.includes(",")){let b=l.split(",").map(y=>`${y.trim()}${g}${h}`).join(", ");n[b]=d}else n[`${l}${g}${h}`]=d}else u[h]=p}Object.keys(u).length&&(n[l]=u)}o=!0}o=!0}}}}if(o){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let s=$r(n,null,t.context?.cssPrefix);s&&e.classList&&s.split(" ").forEach(a=>a&&e.classList.add(a));let i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){let a=n.display;if(a&&a!==i)if(i==="none"){let c=[];for(let f of e.classList)f.startsWith("_d-")&&f!=="_d-none"&&c.push(f);for(let f of c)e.classList.remove(f);e.classList.add("_d-none")}else e.style.display=t.display}}}finally{r&&q(),Rr.delete(t)}}function hs(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||s===!1)continue;let i="aria-"+o.replace(/[A-Z]/g,a=>"-"+a.toLowerCase());e.setAttribute(i,s===!0?"":s)}let r=ds(t);for(let o in r){let s=r[o];s!=null&&s!==!1&&typeof s!="function"&&typeof s!="object"&&e.setAttribute(o,s===!0?"":s)}let n=t.tag||"div";for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||K.has(o)||o==="on"||r[o]!==void 0)continue;let s=o.charCodeAt(0);if(!(s>=65&&s<=90)&&!Ut(o)&&!(J[o]||Y&&Y.has(o))&&fe(n,o)){let i=t[o];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=xe(i,t,t.state,t.context),t[o]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(o,i===!0?"":i)}}}function gs(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!Ut(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let s=n;n=function(a){return t.call(s,a)}}if(typeof n!="function")continue;let o=$a(r);zt.has(o)||ie(Ea(o),t,n)}}function Mr(t,e){let r={...t};for(let n in e){let o=r[n],s=e[n];o&&s&&typeof o=="object"&&typeof s=="object"&&!Array.isArray(o)&&!Array.isArray(s)&&typeof o!="function"&&typeof s!="function"?r[n]=Mr(o,s):r[n]=s}return r}function Lr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!s)return;let i=t.childProps,a=t.childrenAs;for(let c=0;c<e.length;c++){let f=e[c],l=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let u=i;if(typeof i=="function")try{u=i(t,f)}catch{u=null}if(a==="state"){let d=l;(typeof l=="string"||typeof l=="number")&&(d={value:l,text:l}),f=u?{...u,state:d}:{state:d}}else u&&(f=Mr(u,f));if(n&&!f.ignoreChildExtends)if(f.extends){let d=Array.isArray(f.extends)?f.extends:[f.extends],g=Array.isArray(n)?n:[n];f={...f,extends:[...g,...d]}}else f={extends:n,...f};let h=f?.key||`${c}`,p=ot(f,t,h,r);p?.node&&s.appendChild(p.node)}t.node.appendChild(s);return}if(typeof e=="string"){let o=ps(e,t);if(Array.isArray(o)){Lr(t,o,r);return}}if(typeof e=="object")for(let o in e){if(K.has(o))continue;let s=e[o];if(!(s==null||s===!1)){if((typeof s=="string"||typeof s=="number")&&(s={text:s}),t.childProps&&(s=Mr(t.childProps,s)),n&&!s.ignoreChildExtends)if(s.extends){let i=Array.isArray(s.extends)?s.extends:[s.extends],a=Array.isArray(n)?n:[n];s={...s,extends:[...a,...i]}}else s={extends:n,...s};ot(s,t,o,r)}}}function ms(t,e){let{children:r,content:n}=t,o=t.childExtends;if(typeof r=="function"){let i=r;r=i(t,t.state,t.context),t.children=r;let a=t.__ref,c=!1,f=N(()=>{let l=i(t,t.state,t.context);if(!c){c=!0;return}if(l===t.children)return;if(t.children=l,Array.isArray(l)&&t.childrenAs==="state"){let p=t.childProps,d=[],g=new Map;for(let S=0;S<l.length;S++){let T=l[S],$=p;if(typeof p=="function")try{$=p(t,T)}catch{$=null}let X=$&&$.key||T&&T.key||`${S}`;d.push(X),g.set(X,{rawChild:T,childProps:$})}let b=new Set(d),y=a.__children.slice();for(let S of y)if(!b.has(S)){let T=t[S];T?.remove&&T.remove(),delete t[S]}let m=t.childExtends,v=(t.context?.document||globalThis.document)?.createDocumentFragment();for(let S of d){let T=g.get(S),$=T.rawChild,X=t[S];if(X&&X.state){if($&&typeof $=="object"){let M=X.state;if(typeof M.replace=="function")M.replace($);else if(typeof M.update=="function"){for(let I in M)if(!(I==="__element"||I==="root"||I==="parent"||I==="update")&&!Object.prototype.hasOwnProperty.call($,I))try{M[I]=void 0}catch{}M.update($)}else for(let I in $)M[I]=$[I]}continue}let B=$;(typeof $=="string"||typeof $=="number")&&(B={value:$,text:$});let Z=T.childProps,U=Z?{...Z,state:B}:{state:B};if(m&&!U.ignoreChildExtends)if(U.extends){let M=Array.isArray(U.extends)?U.extends:[U.extends],I=Array.isArray(m)?m:[m];U={...U,extends:[...I,...M]}}else U={extends:m,...U};let gt=ot(U,t,S,e);gt?.node&&v&&v.appendChild(gt.node)}v&&v.childNodes.length&&t.node&&t.node.appendChild(v),a.__children=d;return}for(let p of[...a.__children]){let d=t[p];d?.remove&&d.remove(),delete t[p]}a.__children=[],Lr(t,l,e)},{depth:a.path.length});a.__effects.push(f)}if(Lr(t,r||n,e),r||n)return;let s=t.context?.components||{};{let i=Object.keys(t);for(let a=0;a<i.length;a++){let c=i[a];if(!c.endsWith("Extends")||typeof t[c]!="string")continue;let f=c.slice(0,-7);if(!f||f.charCodeAt(0)<65||f.charCodeAt(0)>90)continue;let l={extends:t[c]};delete t[c];for(let u=a+1;u<i.length;u++){let h=i[u],p=h.charCodeAt(0);if(p>=65&&p<=90||K.has(h)||typeof t[h]=="function"&&(h.startsWith("on")||h.startsWith(".")))break;let d=t[h];d!==void 0&&(l[h]=d,delete t[h])}t[f]&&typeof t[f]=="object"?t[f]={...l,...t[f]}:t[f]=l}}for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||K.has(i)||typeof t[i]!="object"||t[i]===null)continue;let a=i.charCodeAt(0);if(a<65||a>90)continue;let c=t[i];if(!c.__ref){if(!c.extends&&!c.extend){let f=s[i]||s[`smbls.${i}`];f&&(c={extends:f,...c})}if(t.childProps&&(c={...t.childProps,...c}),o&&!c.ignoreChildExtends)if(c.extends){let f=Array.isArray(c.extends)?c.extends:[c.extends],l=Array.isArray(o)?o:[o];c={...c,extends:[...l,...f]}}else c={extends:o,...c};ot(c,t,i,e)}}}function Nr(t,e,r){let{node:n}=t;if(!n)return;let o=e?.node||(e?.nodeType?e:null);if(o)if(r?.position==="before"&&r.node)o.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let s=r.node.nextSibling;s?o.insertBefore(n,s):o.appendChild(n)}else o.appendChild(n)}function Ct(t,e,r){let n=t.charAt(0).toLowerCase()+t.slice(1);e.context?.plugins?.length&&ce(n,e,r);let o="on"+t,s=e[o];if(typeof s=="function"){let i=e.context?.designSystem;i&&Q(i);try{if(s(e,e.state,e.context,r)===!1)return!1}catch(a){if(e.context?.plugins?.length&&ce("error",e,{hook:o,error:a})||console.error(`[DOMQL] Lifecycle "${o}" error:`,a),e.context?.strictMode)throw a}finally{i&&q()}}return!0}var Da=ot;var Ma=(t,e,r={})=>{if(!t||typeof t!="object")throw new Error("[SymbolsEmbed.mount] rootDef must be an object");if(typeof Node>"u"||!(e instanceof Node))throw new Error("[SymbolsEmbed.mount] host must be a DOM element");let n=r.state?tt(r.state):void 0;return ot(t,e,"Root",{state:n,context:r.context||{}})};return vs(La);})();