smbls 3.14.600 → 3.14.608
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/smbls.cjs +7 -7
- package/dist/smbls.embed.iife.js +6 -6
- package/dist/smbls.esm.js +8 -8
- package/dist/smbls.iife-string.js +1 -1
- package/dist/smbls.iife.js +7 -7
- package/package.json +3 -3
package/dist/smbls.embed.iife.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var SymbolsEmbed=(()=>{var Xe=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var qs=Object.prototype.hasOwnProperty;var C=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Lt=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},Qs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ks(e))!qs.call(t,s)&&s!==r&&Xe(t,s,{get:()=>e[s],enumerable:!(n=Hs(e,s))||n.enumerable});return t};var Js=t=>Qs(Xe({},"__esModule",{value:!0}),t);var dt,yt,gr=C(()=>{"use strict";dt=globalThis,yt=dt.document});var Ae,yr=C(()=>{"use strict";gr();Ae=t=>typeof dt<"u"&&(dt.Node&&t instanceof dt.Node||dt.Window&&t instanceof dt.Window||t===dt||yt!==void 0&&t===yt)});var L,S,Ee,v,I,At,ln,Zt=C(()=>{"use strict";L=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",Ee=t=>typeof t=="number",v=t=>typeof t=="function",I=t=>Array.isArray(t),At=t=>t===null?!1:typeof t=="object",ln=t=>t===void 0});var un,mr=C(()=>{"use strict";Oe();un=(t,e=[])=>t.reduce((r,n)=>br(r,Vt(n,{exclude:e}),e),{})});function Te(t,e,r={}){let{bracketsLength:n=2}=r,s=n===3?"{{{":"{{";if(!t.includes(s))return t;let o=si[n],i=e||this.state||{},c=this;return t.replace(o,(a,l,f,u)=>{let d=f.trim();if(u){let h=c?.context,p=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||c?.[u];if(p&&typeof p=="function")try{return String(p.call(c,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,p=i;for(let b=0;b<h;b++){if(!p||!p.parent)return"";p=p.parent}if(d==="parent")return String(p.value??"");let g=te(p,d);return String(g??"")}else{let h=te(i,d);if(h!=null)return String(h);let p=c?.context?.polyglot;if(p?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||p.defaultLang||"en",b=p.translations[g];if(b){let y=te(b,d);if(y!=null&&typeof y!="object")return String(y);for(let x in b){let _=b[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=te(_,d);if(w!=null&&typeof w!="object")return String(w)}}}let m=te(p.translations,d);if(m!=null&&typeof m!="object")return String(m)}return""}})}var si,te,dn=C(()=>{"use strict";si={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},te=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var ii,ci,ai,pn,xr=C(()=>{"use strict";ii=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"]),ci=new Set(["update","__element"]),ai=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"]),pn=new Set(["node","context","extends","__element","__ref",...ai,...ii,...ci])});var hn,Bt,br,gn,Vt,Oe=C(()=>{"use strict";Zt();mr();yr();xr();hn=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Bt=(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&&(I(t)||L(t)&&!Ae(t))){let s=e.context.plugins;for(let o of s)if(o.resolveHandler){let i=o.resolveHandler(t,e);if(typeof i=="function")return Bt(i,e,r,n)}}return t},br=(t,e,r=pn)=>gn(t,e,r,null),gn=(t,e,r,n)=>{if(t===e)return t;if(n){for(let o=0;o<n.length;o+=2)if(n[o]===t&&n[o+1]===e)return t}let s=r instanceof Set;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||hn(o)||o==="constructor"||o==="prototype"||(s?r.has(o):r.includes(o)))continue;let i=t[o],c=e[o];if(At(i)&&At(c)){let a=n||[];a.push(t,e),gn(i,c,r,a),a.length-=2}else i===void 0&&(t[o]=c)}return t},Vt=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:s=!1,visited:o=new WeakMap,handleExtends:i=!1}=e;if(!At(t)||Ae(t))return t;if(o.has(t))return o.get(t);let c=r instanceof Set?r:r.length>3?new Set(r):null,a=u=>c?c.has(u):r.includes(u),l=I(t)?[]:{};o.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||hn(h)||h==="__proto__"||a(h))continue;let p=u[h];if(!(n&&p===void 0)&&!(s&&p===null)){if(Ae(p)){d[h]=p;continue}if(i&&h==="extends"&&I(p)){d[h]=un(p,r);continue}if(v(p)){d[h]=p;continue}if(At(p))if(o.has(p))d[h]=o.get(p);else{let g=I(p)?[]:{};o.set(p,g),d[h]=g,f.push([p,g])}else d[h]=p}}}return l}});var yn=C(()=>{"use strict"});var mn,fi,_r,bn=C(()=>{"use strict";mn="production",fi=(t=mn)=>t==="production",_r=(t=mn)=>!fi(t)});var mt,$e=C(()=>{"use strict";mt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let s=!1;for(let o of n)typeof o[t]=="function"&&(o[t](e,...r),s=!0);return s}});var xn=C(()=>{"use strict"});var _n=C(()=>{"use strict"});var af,Sn=C(()=>{"use strict";af=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var wn=C(()=>{"use strict"});var Cn=C(()=>{"use strict"});var vn=C(()=>{"use strict"});var kn=C(()=>{"use strict"});var An=C(()=>{"use strict"});var En=C(()=>{"use strict"});var On=C(()=>{"use strict"});var Tn=C(()=>{"use strict"});var $n,Sr=C(()=>{"use strict";$n={}});var In={};Lt(In,{setup:()=>ui,supabaseAdapter:()=>Rn});var Pn,li,ui,wr,di,Rn,Dn=C(()=>{"use strict";Pn=new Map,li=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,ui=async({url:t,key:e,projectId:r,createClient:n,auth:s,retry:o,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),s===!1&&(c.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let l=li(a,e,s===!1),f=Pn.get(l);return f||(f=await n(a,e,c),f?.auth&&Pn.set(l,f)),!f||!f.auth?null:Rn(f)},wr=(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 s in n)s==="gt"?t=t.gt(r,n[s]):s==="gte"?t=t.gte(r,n[s]):s==="lt"?t=t.lt(r,n[s]):s==="lte"?t=t.lte(r,n[s]):s==="neq"?t=t.neq(r,n[s]):s==="like"?t=t.like(r,n[s]):s==="ilike"?t=t.ilike(r,n[s]):s==="in"?t=t.in(r,n[s]):s==="is"?t=t.is(r,n[s]):s==="contains"?t=t.contains(r,n[s]):s==="containedBy"?t=t.containedBy(r,n[s]):s==="textSearch"&&(t=t.textSearch(r,n[s]));else t=t.eq(r,n)}return t},di=(t,{limit:e,offset:r,order:n,single:s}={})=>{if(n)if(Array.isArray(n))for(let o of n){let i=typeof o=="string"?o:o.by;t=t.order(i,{ascending:o.asc!==!1})}else{let o=typeof n=="string"?n:n.by;t=t.order(o,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),s&&(t=t.single()),t},Rn=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,s)=>e(n,s));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:s,headers:o,...i})=>{let a=(r?t.schema(r):t).from(e).select(n||"*");if(a=wr(a,s),a=di(a,i),o)try{for(let l in o)a.setHeader?a=a.setHeader(l,o[l]):t.rest&&(t.rest.headers[l]=o[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:s})=>(r?t.schema(r):t).from(e).insert(n).select(s||"*"),update:({from:e,schema:r,data:n,params:s,select:o})=>{let c=(r?t.schema(r):t).from(e).update(n);return c=wr(c,s),c.select(o||"*")},upsert:({from:e,schema:r,data:n,select:s})=>(r?t.schema(r):t).from(e).upsert(n).select(s||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=wr(n,r),n},subscribe:({from:e,params:r,on:n},s)=>{let o=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:o,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},c=>s(c.new,c.old,c)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:s})=>t.storage.from(e).upload(r,n,s),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var Fn={};Lt(Fn,{restAdapter:()=>jn,setup:()=>hi});var pi,Ct,hi,jn,Mn=C(()=>{"use strict";pi=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",s=new URL(`${t}${n}${e}`);if(r)for(let o in r){let i=r[o];i!=null&&s.searchParams.set(o,typeof i=="object"?JSON.stringify(i):i)}return s.toString()},Ct=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),s=n&&n.includes("json")?await r.json():await r.text();return{data:s,error:r.ok?null:s?.message||s?.error||r.statusText,status:r.status}},hi=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return jn(t,e,r,n)},jn=(t,e={},r,n={})=>{let s=r?.token||null,o=f=>{let u={...e,...f};return s&&(u.Authorization=`Bearer ${s}`),u},i=f=>({...o(f),"Content-Type":"application/json"}),c=f=>({...n,...f}),a=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{s=f},getSession:async()=>{if(!r?.sessionUrl)return s?{token:s}:null;let f=await Ct(a(r.sessionUrl,r.baseUrl),c({headers:o()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await Ct(a(r.signInUrl,r.baseUrl),c({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(s=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await Ct(a(r.signOutUrl,r.baseUrl),c({method:"POST",headers:o()})),s=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:p,order:g,single:b,headers:m,baseUrl:y})=>{let x={...u};return d&&(x.select=d),h&&(x.limit=h),p&&(x.offset=p),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),Ct(pi(y||t,f||"",x),c({headers:o(m)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Ct(a(`rpc/${f}`,h),c({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Ct(a(f,h),c({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:p,baseUrl:g})=>{let b=d?.id||u?.id,m=b?`${f}/${b}`:f;return Ct(a(m,g),c({method:h||"PATCH",headers:i(p),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:p,baseUrl:g})=>{let b=d?.id||u?.id,m=b?`${f}/${b}`:f;return Ct(a(m,g),c({method:h||"PUT",headers:i(p),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let p=u?.id,g=p?`${f}/${p}`:f;return Ct(a(g,h),c({method:"DELETE",headers:o(d)}))}}}});var Nn={};Lt(Nn,{localAdapter:()=>Ln,setup:()=>yi});var Pe,gi,yi,Ln,Vn=C(()=>{"use strict";Pe=(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 s in n)if(s==="gt"&&!(t[r]>n[s])||s==="gte"&&!(t[r]>=n[s])||s==="lt"&&!(t[r]<n[s])||s==="lte"&&!(t[r]<=n[s])||s==="neq"&&t[r]===n[s]||s==="like"&&!String(t[r]).includes(n[s]))return!1}else if(t[r]!==n)return!1}return!0},gi=(t,{order:e,limit:r,offset:n,single:s})=>{let o=[...t];if(e){let i=typeof e=="string"?e:e.by,c=e.asc!==!1;o.sort((a,l)=>a[i]<l[i]?c?-1:1:a[i]>l[i]?c?1:-1:0)}return n&&(o=o.slice(n)),r&&(o=o.slice(0,r)),s?{data:o[0]||null,error:null}:{data:o,error:null}},yi=async({data:t,...e})=>Ln(t,e),Ln=(t={},e={})=>{let r={},n={},s=e.persist!==!1&&typeof localStorage<"u",o=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(s)try{let u=localStorage.getItem(o+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(s)try{localStorage.setItem(o+f,JSON.stringify(r[f]))}catch{}},a=(f,u,d,h)=>{let p=n[f];if(p)for(let g of p)g(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let p=i(f).filter(g=>Pe(g,u));return gi(p,d)},insert:async({from:f,data:u})=>{let d=i(f),p=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++l,...g};return d.push(b),b});c(f);for(let g of p)a(f,"INSERT",g,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),p=[];for(let g=0;g<h.length;g++)if(Pe(h[g],d)){let b={...h[g]};Object.assign(h[g],u),p.push(h[g]),a(f,"UPDATE",h[g],b)}return c(f),{data:p,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),p=Array.isArray(u)?u:[u],g=[];for(let b of p){let m=d||(b.id!==void 0?{id:b.id}:null),y=m?h.findIndex(x=>Pe(x,m)):-1;if(y>-1){let x={...h[y]};Object.assign(h[y],b),g.push(h[y]),a(f,"UPDATE",h[y],x)}else{let x={id:b.id||++l,...b};h.push(x),g.push(x),a(f,"INSERT",x,null)}}return c(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let p=d.length-1;p>=0;p--)Pe(d[p],u)&&(h.push(d[p]),d.splice(p,1),a(f,"DELETE",null,h[h.length-1]));return c(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let h=(p,g,b)=>{u&&u!=="*"&&u!==b.event||d(p,g,b)};return n[f].push(h),()=>{let p=n[f].indexOf(h);p>-1&&n[f].splice(p,1)}}}}});var fe={};Lt(fe,{createAdapter:()=>wi,default:()=>Ii,executeFetch:()=>Er,fetchPlugin:()=>Ri,initAdapterAuth:()=>Fe,parseDuration:()=>oe,queryClient:()=>Pi,registerAdapter:()=>Si,resolveDb:()=>Wn});var mi,bi,Re,re,Ie,ne,xi,_i,Si,wi,Wn,oe,tt,zn,ee,Ci,ae,se,ie,De,kr,je,vi,Bn,Cr,Hn,Kn,Ut,Un,ki,Gn,Ai,Me,qn,Qn,Fe,Ar,at,pt,ce,Dt,bt,Et,Ei,Oi,Ti,vr,$i,Er,Pi,Ri,Ii,le=C(()=>{"use strict";V();mi=["select","rpc","insert","update","upsert","delete","subscribe"],bi={supabase:()=>Promise.resolve().then(()=>(Dn(),In)),rest:()=>Promise.resolve().then(()=>(Mn(),Fn)),local:()=>Promise.resolve().then(()=>(Vn(),Nn))},Re=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),re=(()=>{if(typeof globalThis<"u"&&globalThis[Re])return globalThis[Re];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Re,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Re]}catch{}return t})(),Ie=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),ne=(()=>{if(typeof globalThis<"u"&&globalThis[Ie])return globalThis[Ie];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ie,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ie]}catch{}return t})(),xi=5e3,_i=t=>new Promise(e=>{if(re[t])return e(re[t]);let r=ne[t]||(ne[t]=[]),n=!1,s=()=>{n||(n=!0,e(re[t]||null))};r.push(s),setTimeout(s,xi)}),Si=(t,e)=>{re[t]=e;let r=ne[t];if(r&&r.length){ne[t]=[];for(let n of r)n()}},wi=t=>{let e={};for(let r of mi)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},Wn=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 s=re[n]||bi[n];if(!s&&(s=await _i(n),!s))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let o=await s();if(!o||typeof o.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(o||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return o.setup(r)},oe=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},tt=new Map,zn=new Map,ee=new Map,Ci=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let n=Ai(t.params),s=r?`${r}:`:"",o=`${t.from}:${t.method}:${s}${JSON.stringify(n||"")}`;return e?`${o}:${e}`:o},ae=t=>tt.get(t)||null,se=(t,e,r)=>{let n=tt.get(t),s={data:e,error:r,time:Date.now(),stale:!1};tt.set(t,s);let o=zn.get(t);if(o)for(let i of o)v(i)&&i(s);return s},ie=t=>{if(t){let e=tt.get(t);e&&(e.stale=!0);return}for(let[,e]of tt)e.stale=!0},De=t=>{if(t){tt.delete(t);return}tt.clear()},kr=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)}:S(t)?{staleTime:oe(t),gcTime:3e5}:{staleTime:oe(t.stale||t.staleTime)||6e4,gcTime:oe(t.gc||t.gcTime||t.expire)||3e5,key:t.key},je=null,vi=()=>{je||(je=setInterval(()=>{let t=Date.now();for(let[e,r]of tt){let n=zn.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&tt.delete(e)}},3e4),je.unref&&je.unref())};vi();Bn=3,Cr=t=>Math.min(1e3*2**t,3e4),Hn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Bn,delay:Cr}:typeof e=="number"?{count:e,delay:Cr}:{count:e.count??Bn,delay:v(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:Cr}},Kn=async(t,e)=>{let{count:r,delay:n}=e,s;for(let o=0;o<=r;o++)try{let i=await t();if(i?.error){if(s=i.error,o<r){let c=v(n)?n(o,s):n;await new Promise(a=>setTimeout(a,c));continue}return i}return i}catch(i){if(s=i,o<r){let c=v(n)?n(o,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:s}},Ut={focus:new Set,online:new Set},Un=!1,ki=()=>{if(Un||typeof window>"u")return;Un=!0;let t=()=>{for(let r of Ut.focus)r()},e=()=>{for(let r of Ut.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Gn=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(L(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},Ai=t=>(!t||v(t),t),Me=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},qn=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},Qn=(t,e,r)=>{let n;if(!t)n=void 0;else if(v(t))n=t(e,e.state);else{n={};for(let s in t){let o=t[s];n[s]=v(o)?o(e,e.state):o}}return n},Fe=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,s)=>{let o=e.state?.root;o?.update&&o.update({auth:{user:n,session:s,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,s)=>{r(s?.user||null,s)})},Ar=async(t,e)=>{if(v(t.select))return t.auth!==!1&&await Fe(t,e),t;if(t.__resolved)return t.auth!==!1&&await Fe(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Wn(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 Fe(r,e),r):null},at=(t,e,...r)=>{let n=v(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},pt=(t,e,r,...n)=>{let s=t&&v(t[r])?t[r]:null;s&&s.call(e,...n,e,e.state,e.context)},ce=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let s=new FormData(r);for(let[o,i]of s.entries())e[o]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let s=0;s<n.length;s++){let o=n[s],i=o.name||o.getAttribute("name");i&&(o.type==="checkbox"?e[i]=o.checked:o.type==="file"?e[i]=o.files:e[i]=o.value)}return e},Dt=(t,e,r,n={})=>{let s=r&&r.startsWith("~/"),o=s&&t.state?.root||t.state;if(o?.update)if(s){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?o.update(e,{preventFetch:!0,...n}):o.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;o.update(i,{preventFetch:!0,...n})}},bt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Et=async(t,e,r,n={})=>{let s=r?.fetch;if(!s||!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 o=await Ar(s,r);if(!o||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:d,single:h,auth:p,fields:g,as:b,limit:m,offset:y,order:x,headers:_,baseUrl:w,page:R,cursor:T,getNextPageParam:X,getPreviousPageParam:D,infinite:K,placeholderData:j,initialData:H,select:$,keepPreviousData:q}=t,Y=S($)?$:void 0;if(l&&v(e.getQuery)){let P=e.getQuery(o.name||"paths");P&&(Y=P.select||P.length&&P.join(",")||Y)}let nt=Qn(f,e,r),F=kr(u),Pt=Hn(t),ot=Me(e,r),et=qn(e,r),Gs=ot?`:${ot}`:"",Ws=et?`${et}:`:"",B=F?u?.key||`${c}:${a}:${Ws}${JSON.stringify(nt||"")}${K?":infinite":""}${R?":p"+JSON.stringify(R):""}${Gs}`:null;if(!i.__fetchInitialized&&B&&(i.__fetchInitialized=!0,H!==void 0)){let P=v(H)?H():H;se(B,P,null)}if((a==="select"||a==="rpc")&&B&&F){let P=ae(B);if(P&&!P.error){let O=Date.now()-P.time,N=P.stale||O>(F.staleTime||0),A=P.data;if(v($)&&(A=$(A,e,e.state)),d&&(A=d(A,e,e.state)),Dt(e,A,b),!N){bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(j!==void 0){let O=v(j)?j(e,e.state):j;O!==void 0&&Dt(e,O,b)}}if(B&&ee.has(B)&&!n.force){let P=ee.get(B);try{let O=await Promise.race([P,new Promise((N,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if(O?.data!==void 0){let N=O.data;v($)&&(N=$(N,e,e.state)),d&&(N=d(N,e,e.state)),Dt(e,N,b),at(e,"onFetchComplete",N),pt(t,e,"onFetchComplete",N)}}catch{}return}let zs=!ae(B)?.data;bt(e,{isFetching:!0,isLoading:zs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),at(e,"onFetchStart"),pt(t,e,"onFetchStart");let _t=r?.analyze?.emitNetwork,Qe=_t?typeof performance<"u"?performance.now():Date.now():0;_t&&_t({phase:"start",mode:"query",from:c,method:a,cacheKey:B,lang:ot});let nn=Kn(async()=>{if(p!==!1&&o.auth!==!1&&o.getSession){let A=await o.getSession();if(p===!0&&!A){let Z={message:"Not authenticated"};return bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Z,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",Z),pt(t,e,"onFetchError",Z),{data:null,error:Z}}}let P=o[a];if(!v(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let O={from:c,select:Y,params:nt,single:h,limit:m,offset:y,order:x,headers:_,baseUrl:w},N=Me(e,r);if(N&&(O.headers={...O.headers,"Accept-Language":N}),R!==void 0){if(L(R))R.offset!==void 0&&(O.offset=R.offset),R.limit!==void 0&&(O.limit=R.limit),R.cursor!==void 0&&(O.params={...O.params,cursor:R.cursor});else if(typeof R=="number"){let A=t.pageSize||m||20;O.offset=(R-1)*A,O.limit=A}}if(T!==void 0&&(O.params={...O.params,cursor:T}),a==="insert"||a==="update"||a==="upsert"){let A;if(g===!0||t.on==="submit")A=ce(e);else if(I(g)){let Z=ce(e);A={};for(let Je of g)A[Je]=Z[Je]}else e.state?.parse?A=e.state.parse():L(e.state)&&(A={...e.state});d&&(A=d(A,e,e.state)),O.data=A}if(a==="rpc"){let A=nt;if(t.on==="submit"){let Z=ce(e);A=t.transformParams?t.transformParams(Z,e,e.state):Z}O.params=A}if(a==="subscribe"){let A=o.subscribe({from:c,params:nt,on:t.subscribeOn},(Z,Je,Aa)=>{Dt(e,Z,b),at(e,"onFetchComplete",Z),pt(t,e,"onFetchComplete",Z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return P(O)},Pt);B&&ee.set(B,nn);try{let P=await nn;if(P?.subscribed)return;let{data:O,error:N}=P||{};if(N){B&&se(B,null,N),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",N),pt(t,e,"onFetchError",N),_t&&_t({phase:"error",mode:"query",from:c,method:a,cacheKey:B,error:N.message||N,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe});return}if(O!==void 0){if((a==="select"||a==="rpc")&&B){let Z=se(B,O,null);Z.gcTime=F?.gcTime||3e5}let A=O;K&&I(O)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift(O):i.__pages.push(O),A=i.__pages.flat(),X&&(i.__nextPageParam=X(O,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(O,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),v($)&&(A=$(A,e,e.state)),d&&(A=d(A,e,e.state)),(!q||A!==void 0)&&Dt(e,A,b),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),at(e,"onFetchComplete",A),pt(t,e,"onFetchComplete",A),_t&&_t({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:B,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe})}}catch(P){bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",P),pt(t,e,"onFetchError",P),_t&&_t({phase:"error",mode:"query",from:c,method:a,cacheKey:B,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe})}finally{B&&ee.delete(B)}},Ei=(t,e,r)=>{let n=t.on,s=e.__ref;s.__fetchListeners||(s.__fetchListeners=[]);let o=t.__runner||Et;if(n==="submit"){let i=a=>{a.preventDefault(),o(t,e,r)},c=e.node;c&&(c.addEventListener("submit",i),s.__fetchListeners.push(()=>c.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>o(t,e,r),c=e.node;c&&(c.addEventListener("click",i),s.__fetchListeners.push(()=>c.removeEventListener("click",i)))}else n==="stateChange"&&(s.__fetchOnStateChange=()=>o(t,e,r))},Oi=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),ki();let s=t.refetchInterval;if(s){let o=typeof s=="number"?s:oe(s);if(o>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Et(t,e,r,{force:!0})},o);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let o=()=>{let i=Me(e,r),c=qn(e,r),a=Ci(t,i,c),l=ae(a),f=kr(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Et(t,e,r,{force:!0})};Ut.focus.add(o),n.__fetchCleanups.push(()=>Ut.focus.delete(o))}if(t.refetchOnReconnect!==!1){let o=()=>Et(t,e,r,{force:!0});Ut.online.add(o),n.__fetchCleanups.push(()=>Ut.online.delete(o))}},Ti=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,s=e.as,o=t.state?.parse?t.state.parse():L(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=o;let i=v(e.optimistic)?e.optimistic(r,o,t):e.optimistic;return i!==void 0&&Dt(t,i,s),o},vr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Dt(t,n,e.as),delete r.__optimisticSnapshot)},$i=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let s=await Ar(n,r);if(!s)return;let o=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:p,invalidates:g,optimistic:b,onMutate:m,onSuccess:y,onError:x,onSettled:_}=t,w;if(a===!0||u==="submit")w=ce(e);else if(I(a)){let D=ce(e);w={};for(let K of a)w[K]=D[K]}else e.state?.parse?w=e.state.parse():L(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),v(m)&&m(w,e,e.state);let R=b?Ti(e,t,w):null;o.__fetching=!0,bt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),at(e,"onFetchStart"),pt(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,X=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:c,method:i});try{if(d!==!1&&s.auth!==!1&&s.getSession){let nt=await s.getSession();if(d===!0&&!nt){R!==void 0&&vr(e,t);let F={message:"Not authenticated"};at(e,"onFetchError",F),pt(t,e,"onFetchError",F);return}}let D=s[i];if(!v(D))return;let K={from:c,data:w,headers:h,baseUrl:p};t.params&&(K.params=Qn(t.params,e,r));let j=Me(e,r);j&&(K.headers={...K.headers,"Accept-Language":j});let H=Hn(t),$=await Kn(()=>D(K),H),{data:q,error:Y}=$||{};if(Y){R!==void 0&&vr(e,t),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Y,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",Y),v(x)&&x(Y,w,e),v(_)&&_(null,Y,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:Y.message||String(Y),durationMs:(typeof performance<"u"?performance.now():Date.now())-X});return}if(delete o.__optimisticSnapshot,q!==void 0){let nt=f?{[f]:q}:q;e.state?.update&&e.state.update(nt,{preventFetch:!0})}if(bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),at(e,"onFetchComplete",q),pt(t,e,"onFetchComplete",q),v(y)&&y(q,w,e),v(_)&&_(q,null,w,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-X}),g){let nt=I(g)?g:[g];for(let F of nt)if(F===!0||F==="*")for(let[Pt]of tt)Pt.startsWith(c+":")&&ie(Pt);else ie(F)}}catch(D){R!==void 0&&vr(e,t),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",D),pt(t,e,"onFetchError",D),v(x)&&x(D,w,e),v(_)&&_(null,D,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-X})}finally{o.__fetching=!1}},Er=(t,e,r,n)=>{if(!t||!n?.fetch)return;let o=Bt(t,e);if(!o)return;let i=I(o)?o.map(a=>Gn(Bt(a,e),e)).filter(Boolean):[Gn(o,e)].filter(Boolean);for(let a of i){let l=a.method==="insert"||a.method==="update"||a.method==="upsert"||a.method==="delete",f=l?$i:Et;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{Ei({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&Oi(a,e,n)}let c=e.__ref;c.refetch=a=>{for(let l of i)Et(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};Et(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};Et(f,e,n,{direction:"previous",force:!0})}},Pi={invalidateQueries:t=>{if(!t){ie();return}if(S(t))for(let[e]of tt)(e.startsWith(t)||e.includes(t))&&ie(e);else if(I(t)){let e=t.join(":");for(let[r]of tt)r.includes(e)&&ie(r)}},removeQueries:t=>{if(!t){De();return}if(S(t))for(let[e]of tt)(e.startsWith(t)||e.includes(t))&&De(e)},getQueryData:t=>ae(t)?.data??void 0,setQueryData:(t,e)=>{let r=ae(t),n=v(e)?e(r?.data):e;se(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await Ar(r,e);if(!n)return;let s=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,o=n[t.method||"select"];if(!v(o))return;let i=await o({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=se(s,i.data,null);c.gcTime=kr(t.cache)?.gcTime||3e5}return i},getCache:()=>tt,clear:()=>De(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of tt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||De(r))}},Ri={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||ee.clear(),Er(e,t,t.state,t.context))}},Ii=Er});function Yn(t){let e=this,{__ref:r}=e,n=[].concat(t),s=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;s.key===n[0]&&(n.shift(),!!n.length);)if(s=s[n[0]],!s)return;return s}function Zn(){return this.getRef("__children").map(e=>this[e])}function to(){return this.getRef().path}function eo(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=Jn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),s=v(this.state)&&this.parent.state&&r(this.parent.state);(n||s)&&(e=this.state.root||this.parent.state.root)}return e||(e=Jn()),t?e?.[t]:e}function ro(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function no(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function oo(t){let e=this.getRoot()?.context;return t?e[t]:e}function so(t){let e=this.context;return t?e[t]:e}function Tr(...t){if(Gt!=="test"&&Gt!=="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(s=>console.log(`%c${s}:`,"font-weight: bold",e[s]))),console.log(e),console.groupEnd(e.key),e}function io(...t){(
|
|
1
|
+
"use strict";var SymbolsEmbed=(()=>{var Xe=Object.defineProperty;var Hs=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var qs=Object.prototype.hasOwnProperty;var C=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(n){throw r=[n],n}};var Lt=(t,e)=>{for(var r in e)Xe(t,r,{get:e[r],enumerable:!0})},Qs=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ks(e))!qs.call(t,s)&&s!==r&&Xe(t,s,{get:()=>e[s],enumerable:!(n=Hs(e,s))||n.enumerable});return t};var Js=t=>Qs(Xe({},"__esModule",{value:!0}),t);var dt,yt,gr=C(()=>{"use strict";dt=globalThis,yt=dt.document});var Ae,yr=C(()=>{"use strict";gr();Ae=t=>typeof dt<"u"&&(dt.Node&&t instanceof dt.Node||dt.Window&&t instanceof dt.Window||t===dt||yt!==void 0&&t===yt)});var L,S,Ee,k,I,At,ln,Zt=C(()=>{"use strict";L=t=>t===null?!1:typeof t=="object"&&t.constructor===Object,S=t=>typeof t=="string",Ee=t=>typeof t=="number",k=t=>typeof t=="function",I=t=>Array.isArray(t),At=t=>t===null?!1:typeof t=="object",ln=t=>t===void 0});var un,mr=C(()=>{"use strict";Oe();un=(t,e=[])=>t.reduce((r,n)=>br(r,Vt(n,{exclude:e}),e),{})});function Te(t,e,r={}){let{bracketsLength:n=2}=r,s=n===3?"{{{":"{{";if(!t.includes(s))return t;let o=si[n],i=e||this.state||{},c=this;return t.replace(o,(a,l,f,u)=>{let d=f.trim();if(u){let h=c?.context,p=h?.functions?.[u]||h?.utils?.[u]||h?.methods?.[u]||h?.snippets?.[u]||c?.[u];if(p&&typeof p=="function")try{return String(p.call(c,d)??"")}catch{return""}return""}if(l){let h=(l.match(/\.\.\//g)||[]).length,p=i;for(let b=0;b<h;b++){if(!p||!p.parent)return"";p=p.parent}if(d==="parent")return String(p.value??"");let g=te(p,d);return String(g??"")}else{let h=te(i,d);if(h!=null)return String(h);let p=c?.context?.polyglot;if(p?.translations){let g=i?.root?.lang||i?.lang||c?.context?.state?.lang||p.defaultLang||"en",b=p.translations[g];if(b){let y=te(b,d);if(y!=null&&typeof y!="object")return String(y);for(let x in b){let _=b[x];if(_&&typeof _=="object"&&!Array.isArray(_)){let w=te(_,d);if(w!=null&&typeof w!="object")return String(w)}}}let m=te(p.translations,d);if(m!=null&&typeof m!="object")return String(m)}return""}})}var si,te,dn=C(()=>{"use strict";si={2:/{{\s*((?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}/g,3:/{{{(\s*(?:\.\.\/)*)([\w\d.]+)\s*(?:\|\s*([\w\d.]+))?\s*}}}/g},te=(t,e)=>e.split(".").reduce((r,n)=>r?.[n],t)});var ii,ci,ai,pn,xr=C(()=>{"use strict";ii=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"]),ci=new Set(["update","__element"]),ai=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"]),pn=new Set(["node","context","extends","__element","__ref",...ai,...ii,...ci])});var hn,Bt,br,gn,Vt,Oe=C(()=>{"use strict";Zt();mr();yr();xr();hn=t=>t.charCodeAt(0)===95&&t.charCodeAt(1)===95,Bt=(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&&(I(t)||L(t)&&!Ae(t))){let s=e.context.plugins;for(let o of s)if(o.resolveHandler){let i=o.resolveHandler(t,e);if(typeof i=="function")return Bt(i,e,r,n)}}return t},br=(t,e,r=pn)=>gn(t,e,r,null),gn=(t,e,r,n)=>{if(t===e)return t;if(n){for(let o=0;o<n.length;o+=2)if(n[o]===t&&n[o+1]===e)return t}let s=r instanceof Set;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o)||hn(o)||o==="constructor"||o==="prototype"||(s?r.has(o):r.includes(o)))continue;let i=t[o],c=e[o];if(At(i)&&At(c)){let a=n||[];a.push(t,e),gn(i,c,r,a),a.length-=2}else i===void 0&&(t[o]=c)}return t},Vt=(t,e={})=>{let{exclude:r=[],cleanUndefined:n=!1,cleanNull:s=!1,visited:o=new WeakMap,handleExtends:i=!1}=e;if(!At(t)||Ae(t))return t;if(o.has(t))return o.get(t);let c=r instanceof Set?r:r.length>3?new Set(r):null,a=u=>c?c.has(u):r.includes(u),l=I(t)?[]:{};o.set(t,l);let f=[[t,l]];for(;f.length;){let[u,d]=f.pop();for(let h in u){if(!Object.prototype.hasOwnProperty.call(u,h)||hn(h)||h==="__proto__"||a(h))continue;let p=u[h];if(!(n&&p===void 0)&&!(s&&p===null)){if(Ae(p)){d[h]=p;continue}if(i&&h==="extends"&&I(p)){d[h]=un(p,r);continue}if(k(p)){d[h]=p;continue}if(At(p))if(o.has(p))d[h]=o.get(p);else{let g=I(p)?[]:{};o.set(p,g),d[h]=g,f.push([p,g])}else d[h]=p}}}return l}});var yn=C(()=>{"use strict"});var mn,fi,_r,bn=C(()=>{"use strict";mn="production",fi=(t=mn)=>t==="production",_r=(t=mn)=>!fi(t)});var mt,$e=C(()=>{"use strict";mt=(t,e,...r)=>{let n=e?.context?.plugins;if(!n)return!1;let s=!1;for(let o of n)typeof o[t]=="function"&&(o[t](e,...r),s=!0);return s}});var xn=C(()=>{"use strict"});var _n=C(()=>{"use strict"});var af,Sn=C(()=>{"use strict";af=typeof navigator>"u"?!1:/Mobi/.test(navigator.userAgent)});var wn=C(()=>{"use strict"});var Cn=C(()=>{"use strict"});var vn=C(()=>{"use strict"});var kn=C(()=>{"use strict"});var An=C(()=>{"use strict"});var En=C(()=>{"use strict"});var On=C(()=>{"use strict"});var Tn=C(()=>{"use strict"});var $n,Sr=C(()=>{"use strict";$n={}});var In={};Lt(In,{setup:()=>ui,supabaseAdapter:()=>Rn});var Pn,li,ui,wr,di,Rn,Dn=C(()=>{"use strict";Pn=new Map,li=(t,e,r)=>`${t}|${e}|${r?"off":"on"}`,ui=async({url:t,key:e,projectId:r,createClient:n,auth:s,retry:o,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),s===!1&&(c.auth={autoRefreshToken:!1,persistSession:!1,detectSessionInUrl:!1});let l=li(a,e,s===!1),f=Pn.get(l);return f||(f=await n(a,e,c),f?.auth&&Pn.set(l,f)),!f||!f.auth?null:Rn(f)},wr=(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 s in n)s==="gt"?t=t.gt(r,n[s]):s==="gte"?t=t.gte(r,n[s]):s==="lt"?t=t.lt(r,n[s]):s==="lte"?t=t.lte(r,n[s]):s==="neq"?t=t.neq(r,n[s]):s==="like"?t=t.like(r,n[s]):s==="ilike"?t=t.ilike(r,n[s]):s==="in"?t=t.in(r,n[s]):s==="is"?t=t.is(r,n[s]):s==="contains"?t=t.contains(r,n[s]):s==="containedBy"?t=t.containedBy(r,n[s]):s==="textSearch"&&(t=t.textSearch(r,n[s]));else t=t.eq(r,n)}return t},di=(t,{limit:e,offset:r,order:n,single:s}={})=>{if(n)if(Array.isArray(n))for(let o of n){let i=typeof o=="string"?o:o.by;t=t.order(i,{ascending:o.asc!==!1})}else{let o=typeof n=="string"?n:n.by;t=t.order(o,{ascending:n.asc!==!1})}return e&&(t=t.limit(e)),r&&(t=t.range(r,r+(e||20)-1)),s&&(t=t.single()),t},Rn=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,s)=>e(n,s));return()=>r.unsubscribe()},select:async({from:e,schema:r,select:n,params:s,headers:o,...i})=>{let a=(r?t.schema(r):t).from(e).select(n||"*");if(a=wr(a,s),a=di(a,i),o)try{for(let l in o)a.setHeader?a=a.setHeader(l,o[l]):t.rest&&(t.rest.headers[l]=o[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:s})=>(r?t.schema(r):t).from(e).insert(n).select(s||"*"),update:({from:e,schema:r,data:n,params:s,select:o})=>{let c=(r?t.schema(r):t).from(e).update(n);return c=wr(c,s),c.select(o||"*")},upsert:({from:e,schema:r,data:n,select:s})=>(r?t.schema(r):t).from(e).upsert(n).select(s||"*"),delete:({from:e,params:r})=>{let n=t.from(e).delete();return n=wr(n,r),n},subscribe:({from:e,params:r,on:n},s)=>{let o=n||"*",i=t.channel(`db-${e}-${Date.now()}`).on("postgres_changes",{event:o,schema:"public",table:e,...r?.id?{filter:`id=eq.${r.id}`}:{}},c=>s(c.new,c.old,c)).subscribe();return()=>t.removeChannel(i)},upload:({bucket:e,path:r,file:n,options:s})=>t.storage.from(e).upload(r,n,s),download:({bucket:e,path:r})=>t.storage.from(e).download(r),getPublicUrl:({bucket:e,path:r})=>t.storage.from(e).getPublicUrl(r)})});var Fn={};Lt(Fn,{restAdapter:()=>jn,setup:()=>hi});var pi,Ct,hi,jn,Mn=C(()=>{"use strict";pi=(t,e,r)=>{let n=e&&!e.startsWith("/")?"/":"",s=new URL(`${t}${n}${e}`);if(r)for(let o in r){let i=r[o];i!=null&&s.searchParams.set(o,typeof i=="object"?JSON.stringify(i):i)}return s.toString()},Ct=async(t,e)=>{let r=await globalThis.fetch(t,e),n=r.headers.get("content-type"),s=n&&n.includes("json")?await r.json():await r.text();return{data:s,error:r.ok?null:s?.message||s?.error||r.statusText,status:r.status}},hi=async({url:t,headers:e,auth:r,fetchOptions:n})=>{if(!t)throw new Error("@symbo.ls/fetch rest: url is required");return jn(t,e,r,n)},jn=(t,e={},r,n={})=>{let s=r?.token||null,o=f=>{let u={...e,...f};return s&&(u.Authorization=`Bearer ${s}`),u},i=f=>({...o(f),"Content-Type":"application/json"}),c=f=>({...n,...f}),a=(f,u)=>{let d=u||t;if(f&&(f.startsWith("http://")||f.startsWith("https://")))return f;let h=f&&!f.startsWith("/")?"/":"";return`${d}${h}${f||""}`};return{name:"rest",setToken:f=>{s=f},getSession:async()=>{if(!r?.sessionUrl)return s?{token:s}:null;let f=await Ct(a(r.sessionUrl,r.baseUrl),c({headers:o()}));return f.error?null:f.data},signIn:async f=>{if(!r?.signInUrl)throw new Error("rest: auth.signInUrl not configured");let u=await Ct(a(r.signInUrl,r.baseUrl),c({method:"POST",headers:i(),body:JSON.stringify(f)}));return u.data?.token&&(s=u.data.token),u},signOut:async()=>(r?.signOutUrl&&await Ct(a(r.signOutUrl,r.baseUrl),c({method:"POST",headers:o()})),s=null,{error:null}),select:({from:f,params:u,select:d,limit:h,offset:p,order:g,single:b,headers:m,baseUrl:y})=>{let x={...u};return d&&(x.select=d),h&&(x.limit=h),p&&(x.offset=p),b&&(x.single=!0),g&&(typeof g=="string"?x.order=g:Array.isArray(g)?x.order=g.map(_=>`${_.by}:${_.asc===!1?"desc":"asc"}`).join(","):g.by&&(x.order=`${g.by}:${g.asc===!1?"desc":"asc"}`)),Ct(pi(y||t,f||"",x),c({headers:o(m)}))},rpc:({from:f,params:u,headers:d,baseUrl:h})=>Ct(a(`rpc/${f}`,h),c({method:"POST",headers:i(d),body:JSON.stringify(u)})),insert:({from:f,data:u,headers:d,baseUrl:h})=>Ct(a(f,h),c({method:"POST",headers:i(d),body:JSON.stringify(u)})),update:({from:f,data:u,params:d,method:h,headers:p,baseUrl:g})=>{let b=d?.id||u?.id,m=b?`${f}/${b}`:f;return Ct(a(m,g),c({method:h||"PATCH",headers:i(p),body:JSON.stringify(u)}))},upsert:({from:f,data:u,params:d,method:h,headers:p,baseUrl:g})=>{let b=d?.id||u?.id,m=b?`${f}/${b}`:f;return Ct(a(m,g),c({method:h||"PUT",headers:i(p),body:JSON.stringify(u)}))},delete:({from:f,params:u,headers:d,baseUrl:h})=>{let p=u?.id,g=p?`${f}/${p}`:f;return Ct(a(g,h),c({method:"DELETE",headers:o(d)}))}}}});var Nn={};Lt(Nn,{localAdapter:()=>Ln,setup:()=>yi});var Pe,gi,yi,Ln,Vn=C(()=>{"use strict";Pe=(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 s in n)if(s==="gt"&&!(t[r]>n[s])||s==="gte"&&!(t[r]>=n[s])||s==="lt"&&!(t[r]<n[s])||s==="lte"&&!(t[r]<=n[s])||s==="neq"&&t[r]===n[s]||s==="like"&&!String(t[r]).includes(n[s]))return!1}else if(t[r]!==n)return!1}return!0},gi=(t,{order:e,limit:r,offset:n,single:s})=>{let o=[...t];if(e){let i=typeof e=="string"?e:e.by,c=e.asc!==!1;o.sort((a,l)=>a[i]<l[i]?c?-1:1:a[i]>l[i]?c?1:-1:0)}return n&&(o=o.slice(n)),r&&(o=o.slice(0,r)),s?{data:o[0]||null,error:null}:{data:o,error:null}},yi=async({data:t,...e})=>Ln(t,e),Ln=(t={},e={})=>{let r={},n={},s=e.persist!==!1&&typeof localStorage<"u",o=e.prefix||"smbls_db_",i=f=>{if(!r[f])if(s)try{let u=localStorage.getItem(o+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(s)try{localStorage.setItem(o+f,JSON.stringify(r[f]))}catch{}},a=(f,u,d,h)=>{let p=n[f];if(p)for(let g of p)g(d,h,{event:u,table:f})},l=Date.now();return{name:"local",store:r,select:async({from:f,params:u,...d})=>{let p=i(f).filter(g=>Pe(g,u));return gi(p,d)},insert:async({from:f,data:u})=>{let d=i(f),p=(Array.isArray(u)?u:[u]).map(g=>{let b={id:g.id||++l,...g};return d.push(b),b});c(f);for(let g of p)a(f,"INSERT",g,null);return{data:Array.isArray(u)?p:p[0],error:null}},update:async({from:f,data:u,params:d})=>{let h=i(f),p=[];for(let g=0;g<h.length;g++)if(Pe(h[g],d)){let b={...h[g]};Object.assign(h[g],u),p.push(h[g]),a(f,"UPDATE",h[g],b)}return c(f),{data:p,error:null}},upsert:async({from:f,data:u,params:d})=>{let h=i(f),p=Array.isArray(u)?u:[u],g=[];for(let b of p){let m=d||(b.id!==void 0?{id:b.id}:null),y=m?h.findIndex(x=>Pe(x,m)):-1;if(y>-1){let x={...h[y]};Object.assign(h[y],b),g.push(h[y]),a(f,"UPDATE",h[y],x)}else{let x={id:b.id||++l,...b};h.push(x),g.push(x),a(f,"INSERT",x,null)}}return c(f),{data:Array.isArray(u)?g:g[0],error:null}},delete:async({from:f,params:u})=>{let d=i(f),h=[];for(let p=d.length-1;p>=0;p--)Pe(d[p],u)&&(h.push(d[p]),d.splice(p,1),a(f,"DELETE",null,h[h.length-1]));return c(f),{data:h,error:null}},subscribe:({from:f,on:u},d)=>{n[f]||(n[f]=[]);let h=(p,g,b)=>{u&&u!=="*"&&u!==b.event||d(p,g,b)};return n[f].push(h),()=>{let p=n[f].indexOf(h);p>-1&&n[f].splice(p,1)}}}}});var fe={};Lt(fe,{createAdapter:()=>wi,default:()=>Ii,executeFetch:()=>Er,fetchPlugin:()=>Ri,initAdapterAuth:()=>Fe,parseDuration:()=>oe,queryClient:()=>Pi,registerAdapter:()=>Si,resolveDb:()=>Gn});var mi,bi,Re,re,Ie,ne,xi,_i,Si,wi,Gn,oe,tt,zn,ee,Ci,ae,se,ie,De,kr,je,vi,Bn,Cr,Hn,Kn,Ut,Un,ki,Wn,Ai,Me,qn,Qn,Fe,Ar,at,pt,ce,Dt,bt,Et,Ei,Oi,Ti,vr,$i,Er,Pi,Ri,Ii,le=C(()=>{"use strict";V();mi=["select","rpc","insert","update","upsert","delete","subscribe"],bi={supabase:()=>Promise.resolve().then(()=>(Dn(),In)),rest:()=>Promise.resolve().then(()=>(Mn(),Fn)),local:()=>Promise.resolve().then(()=>(Vn(),Nn))},Re=Symbol.for("@symbo.ls/fetch:CUSTOM_ADAPTERS"),re=(()=>{if(typeof globalThis<"u"&&globalThis[Re])return globalThis[Re];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Re,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Re]}catch{}return t})(),Ie=Symbol.for("@symbo.ls/fetch:PENDING_ADAPTERS"),ne=(()=>{if(typeof globalThis<"u"&&globalThis[Ie])return globalThis[Ie];let t={};if(typeof globalThis<"u")try{return Object.defineProperty(globalThis,Ie,{value:t,writable:!1,configurable:!1,enumerable:!1}),globalThis[Ie]}catch{}return t})(),xi=5e3,_i=t=>new Promise(e=>{if(re[t])return e(re[t]);let r=ne[t]||(ne[t]=[]),n=!1,s=()=>{n||(n=!0,e(re[t]||null))};r.push(s),setTimeout(s,xi)}),Si=(t,e)=>{re[t]=e;let r=ne[t];if(r&&r.length){ne[t]=[];for(let n of r)n()}},wi=t=>{let e={};for(let r of mi)t[r]&&(e[r]=t[r]);return e.name=t.name||"custom",e},Gn=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 s=re[n]||bi[n];if(!s&&(s=await _i(n),!s))throw new Error(`Unknown db adapter: "${n}". Use registerAdapter() for adapters with optional deps.`);let o=await s();if(!o||typeof o.setup!="function")throw new Error(`Adapter "${n}" loader returned a module without a setup() function. Got keys: [${Object.keys(o||{}).join(", ")}]. Likely a bundler chunk-resolution issue.`);return o.setup(r)},oe=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},tt=new Map,zn=new Map,ee=new Map,Ci=(t,e,r)=>{if(t.cache?.key)return t.cache.key;let n=Ai(t.params),s=r?`${r}:`:"",o=`${t.from}:${t.method}:${s}${JSON.stringify(n||"")}`;return e?`${o}:${e}`:o},ae=t=>tt.get(t)||null,se=(t,e,r)=>{let n=tt.get(t),s={data:e,error:r,time:Date.now(),stale:!1};tt.set(t,s);let o=zn.get(t);if(o)for(let i of o)k(i)&&i(s);return s},ie=t=>{if(t){let e=tt.get(t);e&&(e.stale=!0);return}for(let[,e]of tt)e.stale=!0},De=t=>{if(t){tt.delete(t);return}tt.clear()},kr=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)}:S(t)?{staleTime:oe(t),gcTime:3e5}:{staleTime:oe(t.stale||t.staleTime)||6e4,gcTime:oe(t.gc||t.gcTime||t.expire)||3e5,key:t.key},je=null,vi=()=>{je||(je=setInterval(()=>{let t=Date.now();for(let[e,r]of tt){let n=zn.get(e);!(n&&n.size>0)&&t-r.time>(r.gcTime||3e5)&&tt.delete(e)}},3e4),je.unref&&je.unref())};vi();Bn=3,Cr=t=>Math.min(1e3*2**t,3e4),Hn=t=>{let e=t.retry;return e===!1?{count:0}:e===!0||e===void 0?{count:Bn,delay:Cr}:typeof e=="number"?{count:e,delay:Cr}:{count:e.count??Bn,delay:k(e.delay)?e.delay:typeof e.delay=="number"?()=>e.delay:Cr}},Kn=async(t,e)=>{let{count:r,delay:n}=e,s;for(let o=0;o<=r;o++)try{let i=await t();if(i?.error){if(s=i.error,o<r){let c=k(n)?n(o,s):n;await new Promise(a=>setTimeout(a,c));continue}return i}return i}catch(i){if(s=i,o<r){let c=k(n)?n(o,i):n;await new Promise(a=>setTimeout(a,c));continue}throw i}return{data:null,error:s}},Ut={focus:new Set,online:new Set},Un=!1,ki=()=>{if(Un||typeof window>"u")return;Un=!0;let t=()=>{for(let r of Ut.focus)r()},e=()=>{for(let r of Ut.online)r()};window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&t()}),window.addEventListener("focus",t),window.addEventListener("online",e)},Wn=(t,e)=>{let r=e.__ref;if(t===!0)return{from:r.__state||e.key,method:"select",query:!0,on:"create"};if(S(t))return{from:t,method:"select",query:!0,on:"create"};if(L(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},Ai=t=>(!t||k(t),t),Me=(t,e)=>{let r=t?.state?.root||e?.state?.root;if(r?.lang)return r.lang},qn=(t,e)=>{let n=(t?.state?.root||e?.state?.root)?.__fetchScope;return n?String(n):void 0},Qn=(t,e,r)=>{let n;if(!t)n=void 0;else if(k(t))n=t(e,e.state);else{n={};for(let s in t){let o=t[s];n[s]=k(o)?o(e,e.state):o}}return n},Fe=async(t,e)=>{if(!t||t.__authInitialized||(t.__authInitialized=!0,!t.getSession))return;let r=(n,s)=>{let o=e.state?.root;o?.update&&o.update({auth:{user:n,session:s,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,s)=>{r(s?.user||null,s)})},Ar=async(t,e)=>{if(k(t.select))return t.auth!==!1&&await Fe(t,e),t;if(t.__resolved)return t.auth!==!1&&await Fe(t.__resolved,e),t.__resolved;if(t.__resolving)return t.__resolving;t.__resolving=Gn(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 Fe(r,e),r):null},at=(t,e,...r)=>{let n=k(t[e])?t[e]:null;n&&n.call(t,...r,t,t.state,t.context)},pt=(t,e,r,...n)=>{let s=t&&k(t[r])?t[r]:null;s&&s.call(e,...n,e,e.state,e.context)},ce=t=>{let e={},r=t.node;if(!r)return e;if(r.tagName==="FORM"){let s=new FormData(r);for(let[o,i]of s.entries())e[o]=i;return e}let n=r.querySelectorAll("input, textarea, select");for(let s=0;s<n.length;s++){let o=n[s],i=o.name||o.getAttribute("name");i&&(o.type==="checkbox"?e[i]=o.checked:o.type==="file"?e[i]=o.files:e[i]=o.value)}return e},Dt=(t,e,r,n={})=>{let s=r&&r.startsWith("~/"),o=s&&t.state?.root||t.state;if(o?.update)if(s){let i=r.slice(2);e&&typeof e=="object"&&!Array.isArray(e)&&i in e?o.update(e,{preventFetch:!0,...n}):o.update({[i]:e},{preventFetch:!0,...n})}else{let i=r?{[r]:e}:e;o.update(i,{preventFetch:!0,...n})}},bt=(t,e)=>{let r=t?.__ref;r&&(r.__fetchStatus=e,r.__fetching=e.isFetching,r.__fetchError=e.error)},Et=async(t,e,r,n={})=>{let s=r?.fetch;if(!s||!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 o=await Ar(s,r);if(!o||!e.__ref)return;let i=e.__ref,{from:c,method:a,query:l,params:f,cache:u,transform:d,single:h,auth:p,fields:g,as:b,limit:m,offset:y,order:x,headers:_,baseUrl:w,page:R,cursor:T,getNextPageParam:X,getPreviousPageParam:D,infinite:K,placeholderData:j,initialData:H,select:$,keepPreviousData:q}=t,Y=S($)?$:void 0;if(l&&k(e.getQuery)){let P=e.getQuery(o.name||"paths");P&&(Y=P.select||P.length&&P.join(",")||Y)}let nt=Qn(f,e,r),F=kr(u),Pt=Hn(t),ot=Me(e,r),et=qn(e,r),Ws=ot?`:${ot}`:"",Gs=et?`${et}:`:"",B=F?u?.key||`${c}:${a}:${Gs}${JSON.stringify(nt||"")}${K?":infinite":""}${R?":p"+JSON.stringify(R):""}${Ws}`:null;if(!i.__fetchInitialized&&B&&(i.__fetchInitialized=!0,H!==void 0)){let P=k(H)?H():H;se(B,P,null)}if((a==="select"||a==="rpc")&&B&&F){let P=ae(B);if(P&&!P.error){let O=Date.now()-P.time,N=P.stale||O>(F.staleTime||0),A=P.data;if(k($)&&(A=$(A,e,e.state)),d&&(A=d(A,e,e.state)),Dt(e,A,b),!N){bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"});return}}else if(j!==void 0){let O=k(j)?j(e,e.state):j;O!==void 0&&Dt(e,O,b)}}if(B&&ee.has(B)&&!n.force){let P=ee.get(B);try{let O=await Promise.race([P,new Promise((N,A)=>setTimeout(()=>A("DEDUP_TIMEOUT"),15e3))]);if(O?.data!==void 0){let N=O.data;k($)&&(N=$(N,e,e.state)),d&&(N=d(N,e,e.state)),Dt(e,N,b),at(e,"onFetchComplete",N),pt(t,e,"onFetchComplete",N)}}catch{}return}let zs=!ae(B)?.data;bt(e,{isFetching:!0,isLoading:zs,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),at(e,"onFetchStart"),pt(t,e,"onFetchStart");let _t=r?.analyze?.emitNetwork,Qe=_t?typeof performance<"u"?performance.now():Date.now():0;_t&&_t({phase:"start",mode:"query",from:c,method:a,cacheKey:B,lang:ot});let nn=Kn(async()=>{if(p!==!1&&o.auth!==!1&&o.getSession){let A=await o.getSession();if(p===!0&&!A){let Z={message:"Not authenticated"};return bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Z,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",Z),pt(t,e,"onFetchError",Z),{data:null,error:Z}}}let P=o[a];if(!k(P))return{data:null,error:{message:`Method "${a}" not found on adapter`}};let O={from:c,select:Y,params:nt,single:h,limit:m,offset:y,order:x,headers:_,baseUrl:w},N=Me(e,r);if(N&&(O.headers={...O.headers,"Accept-Language":N}),R!==void 0){if(L(R))R.offset!==void 0&&(O.offset=R.offset),R.limit!==void 0&&(O.limit=R.limit),R.cursor!==void 0&&(O.params={...O.params,cursor:R.cursor});else if(typeof R=="number"){let A=t.pageSize||m||20;O.offset=(R-1)*A,O.limit=A}}if(T!==void 0&&(O.params={...O.params,cursor:T}),a==="insert"||a==="update"||a==="upsert"){let A;if(g===!0||t.on==="submit")A=ce(e);else if(I(g)){let Z=ce(e);A={};for(let Je of g)A[Je]=Z[Je]}else e.state?.parse?A=e.state.parse():L(e.state)&&(A={...e.state});d&&(A=d(A,e,e.state)),O.data=A}if(a==="rpc"){let A=nt;if(t.on==="submit"){let Z=ce(e);A=t.transformParams?t.transformParams(Z,e,e.state):Z}O.params=A}if(a==="subscribe"){let A=o.subscribe({from:c,params:nt,on:t.subscribeOn},(Z,Je,Aa)=>{Dt(e,Z,b),at(e,"onFetchComplete",Z),pt(t,e,"onFetchComplete",Z)});return i.__unsubscribe=A,{data:null,error:null,subscribed:!0}}return P(O)},Pt);B&&ee.set(B,nn);try{let P=await nn;if(P?.subscribed)return;let{data:O,error:N}=P||{};if(N){B&&se(B,null,N),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:N,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",N),pt(t,e,"onFetchError",N),_t&&_t({phase:"error",mode:"query",from:c,method:a,cacheKey:B,error:N.message||N,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe});return}if(O!==void 0){if((a==="select"||a==="rpc")&&B){let Z=se(B,O,null);Z.gcTime=F?.gcTime||3e5}let A=O;K&&I(O)&&(i.__pages||(i.__pages=[]),n.direction==="previous"?i.__pages.unshift(O):i.__pages.push(O),A=i.__pages.flat(),X&&(i.__nextPageParam=X(O,i.__pages),i.__hasNextPage=i.__nextPageParam!=null),D&&(i.__prevPageParam=D(O,i.__pages),i.__hasPreviousPage=i.__prevPageParam!=null)),k($)&&(A=$(A,e,e.state)),d&&(A=d(A,e,e.state)),(!q||A!==void 0)&&Dt(e,A,b),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),at(e,"onFetchComplete",A),pt(t,e,"onFetchComplete",A),_t&&_t({phase:"success",mode:"query",ok:!0,from:c,method:a,cacheKey:B,durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe})}}catch(P){bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:P,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",P),pt(t,e,"onFetchError",P),_t&&_t({phase:"error",mode:"query",from:c,method:a,cacheKey:B,error:P.message||String(P),durationMs:(typeof performance<"u"?performance.now():Date.now())-Qe})}finally{B&&ee.delete(B)}},Ei=(t,e,r)=>{let n=t.on,s=e.__ref;s.__fetchListeners||(s.__fetchListeners=[]);let o=t.__runner||Et;if(n==="submit"){let i=a=>{a.preventDefault(),o(t,e,r)},c=e.node;c&&(c.addEventListener("submit",i),s.__fetchListeners.push(()=>c.removeEventListener("submit",i)))}else if(n==="click"){let i=()=>o(t,e,r),c=e.node;c&&(c.addEventListener("click",i),s.__fetchListeners.push(()=>c.removeEventListener("click",i)))}else n==="stateChange"&&(s.__fetchOnStateChange=()=>o(t,e,r))},Oi=(t,e,r)=>{let n=e.__ref;n.__fetchCleanups||(n.__fetchCleanups=[]),ki();let s=t.refetchInterval;if(s){let o=typeof s=="number"?s:oe(s);if(o>0){let i=setInterval(()=>{(t.refetchIntervalInBackground||typeof document>"u"||document.visibilityState==="visible")&&Et(t,e,r,{force:!0})},o);n.__fetchCleanups.push(()=>clearInterval(i))}}if(t.refetchOnWindowFocus!==!1){let o=()=>{let i=Me(e,r),c=qn(e,r),a=Ci(t,i,c),l=ae(a),f=kr(t.cache);(!l||l.stale||Date.now()-l.time>(f?.staleTime||0))&&Et(t,e,r,{force:!0})};Ut.focus.add(o),n.__fetchCleanups.push(()=>Ut.focus.delete(o))}if(t.refetchOnReconnect!==!1){let o=()=>Et(t,e,r,{force:!0});Ut.online.add(o),n.__fetchCleanups.push(()=>Ut.online.delete(o))}},Ti=(t,e,r)=>{if(!e.optimistic)return null;let n=t.__ref,s=e.as,o=t.state?.parse?t.state.parse():L(t.state)?{...t.state}:t.state;n.__optimisticSnapshot=o;let i=k(e.optimistic)?e.optimistic(r,o,t):e.optimistic;return i!==void 0&&Dt(t,i,s),o},vr=(t,e)=>{let r=t.__ref,n=r.__optimisticSnapshot;n!==void 0&&(Dt(t,n,e.as),delete r.__optimisticSnapshot)},$i=async(t,e,r)=>{let n=r?.fetch;if(!n)return;let s=await Ar(n,r);if(!s)return;let o=e.__ref,{method:i,from:c,fields:a,transform:l,as:f,on:u,auth:d,headers:h,baseUrl:p,invalidates:g,optimistic:b,onMutate:m,onSuccess:y,onError:x,onSettled:_}=t,w;if(a===!0||u==="submit")w=ce(e);else if(I(a)){let D=ce(e);w={};for(let K of a)w[K]=D[K]}else e.state?.parse?w=e.state.parse():L(e.state)&&(w={...e.state});l&&(w=l(w,e,e.state)),k(m)&&m(w,e,e.state);let R=b?Ti(e,t,w):null;o.__fetching=!0,bt(e,{isFetching:!0,isLoading:!1,isStale:!1,isSuccess:!1,error:null,status:"pending",fetchStatus:"fetching"}),at(e,"onFetchStart"),pt(t,e,"onFetchStart");let T=r?.analyze?.emitNetwork,X=T?typeof performance<"u"?performance.now():Date.now():0;T&&T({phase:"start",mode:"mutation",from:c,method:i});try{if(d!==!1&&s.auth!==!1&&s.getSession){let nt=await s.getSession();if(d===!0&&!nt){R!==void 0&&vr(e,t);let F={message:"Not authenticated"};at(e,"onFetchError",F),pt(t,e,"onFetchError",F);return}}let D=s[i];if(!k(D))return;let K={from:c,data:w,headers:h,baseUrl:p};t.params&&(K.params=Qn(t.params,e,r));let j=Me(e,r);j&&(K.headers={...K.headers,"Accept-Language":j});let H=Hn(t),$=await Kn(()=>D(K),H),{data:q,error:Y}=$||{};if(Y){R!==void 0&&vr(e,t),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:Y,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",Y),k(x)&&x(Y,w,e),k(_)&&_(null,Y,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:Y.message||String(Y),durationMs:(typeof performance<"u"?performance.now():Date.now())-X});return}if(delete o.__optimisticSnapshot,q!==void 0){let nt=f?{[f]:q}:q;e.state?.update&&e.state.update(nt,{preventFetch:!0})}if(bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!0,error:null,status:"success",fetchStatus:"idle"}),at(e,"onFetchComplete",q),pt(t,e,"onFetchComplete",q),k(y)&&y(q,w,e),k(_)&&_(q,null,w,e),T&&T({phase:"success",mode:"mutation",ok:!0,from:c,method:i,durationMs:(typeof performance<"u"?performance.now():Date.now())-X}),g){let nt=I(g)?g:[g];for(let F of nt)if(F===!0||F==="*")for(let[Pt]of tt)Pt.startsWith(c+":")&&ie(Pt);else ie(F)}}catch(D){R!==void 0&&vr(e,t),bt(e,{isFetching:!1,isLoading:!1,isStale:!1,isSuccess:!1,error:D,status:"error",fetchStatus:"idle"}),at(e,"onFetchError",D),pt(t,e,"onFetchError",D),k(x)&&x(D,w,e),k(_)&&_(null,D,w,e),T&&T({phase:"error",mode:"mutation",from:c,method:i,error:D.message||String(D),durationMs:(typeof performance<"u"?performance.now():Date.now())-X})}finally{o.__fetching=!1}},Er=(t,e,r,n)=>{if(!t||!n?.fetch)return;let o=Bt(t,e);if(!o)return;let i=I(o)?o.map(a=>Wn(Bt(a,e),e)).filter(Boolean):[Wn(o,e)].filter(Boolean);for(let a of i){let l=a.method==="insert"||a.method==="update"||a.method==="upsert"||a.method==="delete",f=l?$i:Et;a.on==="create"?f(a,e,n):Promise.resolve().then(()=>{Ei({...a,__runner:f},e,n)}),!l&&a.on==="create"&&(a.refetchInterval||a.refetchOnWindowFocus!==!1||a.refetchOnReconnect!==!1)&&Oi(a,e,n)}let c=e.__ref;c.refetch=a=>{for(let l of i)Et(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};Et(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};Et(f,e,n,{direction:"previous",force:!0})}},Pi={invalidateQueries:t=>{if(!t){ie();return}if(S(t))for(let[e]of tt)(e.startsWith(t)||e.includes(t))&&ie(e);else if(I(t)){let e=t.join(":");for(let[r]of tt)r.includes(e)&&ie(r)}},removeQueries:t=>{if(!t){De();return}if(S(t))for(let[e]of tt)(e.startsWith(t)||e.includes(t))&&De(e)},getQueryData:t=>ae(t)?.data??void 0,setQueryData:(t,e)=>{let r=ae(t),n=k(e)?e(r?.data):e;se(t,n,null)},prefetchQuery:async(t,e)=>{let r=e?.fetch;if(!r)return;let n=await Ar(r,e);if(!n)return;let s=t.cache?.key||`${t.from}:${t.method||"select"}:${JSON.stringify(t.params||"")}`,o=n[t.method||"select"];if(!k(o))return;let i=await o({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=se(s,i.data,null);c.gcTime=kr(t.cache)?.gcTime||3e5}return i},getCache:()=>tt,clear:()=>De(),dropNonLang:t=>{if(!t)return;let e=`:${t}`;for(let[r]of tt)r.match(/:([a-z]{2,3})$/i)&&(r.endsWith(e)||De(r))}},Ri={name:"fetch",create(t){let e=t.fetch;e&&(t.parent||ee.clear(),Er(e,t,t.state,t.context))}},Ii=Er});function Yn(t){let e=this,{__ref:r}=e,n=[].concat(t),s=r.root[n[0]];if(!n||!n.length)return console.log(n,"on",e.key,"is undefined");for(;s.key===n[0]&&(n.shift(),!!n.length);)if(s=s[n[0]],!s)return;return s}function Zn(){return this.getRef("__children").map(e=>this[e])}function to(){return this.getRef().path}function eo(t){let e=null,r=n=>n.__element&&n.root?.isRootState;if(!this)e=Jn();else if(r(this))e=this.root;else if(this.__ref&&this.__ref.path){let n=this.state&&r(this.state),s=k(this.state)&&this.parent.state&&r(this.parent.state);(n||s)&&(e=this.state.root||this.parent.state.root)}return e||(e=Jn()),t?e?.[t]:e}function ro(t){let e=this.getRootState()?.__element;return e&&Object.keys(e).length>0&&t?e[t]:e}function no(t){return this.getRoot("data")&&Object.keys(this.getRoot("data")).length>0&&t?this.getRoot("data")[t]:this.getRoot("data")}function oo(t){let e=this.getRoot()?.context;return t?e[t]:e}function so(t){let e=this.context;return t?e[t]:e}function Tr(...t){if(Wt!=="test"&&Wt!=="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(s=>console.log(`%c${s}:`,"font-weight: bold",e[s]))),console.log(e),console.groupEnd(e.key),e}function io(...t){(Wt==="test"||Wt==="development")&&console.warn(...t)}function co(...t){if(Wt==="test"||Wt==="development"){if(t[t.length-1]?.debugger)debugger;throw t[t.length-1]?.verbose&&Tr.call(this),new Error(...t)}}function ao(){let t=this,{key:e,parent:r}=t,{__children:n}=r.__ref,s=n.indexOf(e),o=n[s+1];return r[o]}function fo(t){let e=t||this,{key:r,parent:n}=e,{__children:s}=n.__ref;if(!s)return;let o=s.indexOf(r);return n[s[o-1]]}function lo(t={}){let e=this;e.data||(e.data={}),e.data.varCaches||(e.data.varCaches={});let r=e.data.varCaches,n={},s;for(let o in t)t[o]!==r[o]&&(s=!0,n[o]=t[o]);return{changed:o=>{if(!s)return;let i=o(n,Vt(r));for(let c in n)r[c]=n[c];return i},timeout:(o,i)=>{if(!s)return;let c=setTimeout(()=>{o(n),clearTimeout(c)},i)}}}async function uo(){let t=this,e=t.context?.fetch;if(!e)return null;if(typeof e.select=="function"){if(!e.__authInitialized&&e.getSession){let{initAdapterAuth:s}=await Promise.resolve().then(()=>(le(),fe));await s(e,t.context)}return e}if(e.__resolved){if(!e.__resolved.__authInitialized&&e.__resolved.getSession){let{initAdapterAuth:s}=await Promise.resolve().then(()=>(le(),fe));await s(e.__resolved,t.context)}return e.__resolved}if(e.__resolving)return e.__resolving;let r=Promise.resolve().then(()=>(le(),fe)).then(({resolveDb:s})=>s(e));e.__resolving=r;let n=await r;if(e.__resolved=n,t.context.fetch=n,delete e.__resolving,n?.getSession){let{initAdapterAuth:s}=await Promise.resolve().then(()=>(le(),fe));await s(n,t.context)}return n}function po(t){let e=this,r=t||$n.useStateQuery||e.context?.useStateQuery;if(!r)return null;let n={};if(Or(e,n),r===!0)return n;let s=Ui[r];return s?s(n):n}var Wt,Di,Jn,Or,ji,ho,Fi,Mi,Li,Ni,Vi,Bi,Ui,go=C(()=>{"use strict";Zt();Oe();Sr();Wt="production";Di=null,Jn=()=>Di||null;Or=(t,e)=>{let r=t.__ref;if(!r)return;let n=r.__state;n&&typeof n=="string"&&ji(e,n);let s=r.__children;if(s)for(let c=0;c<s.length;c++){let a=t[s[c]];a&&a.__ref&&Or(a,e)}let o=r.contentElementKey||"content",i=t[o];i&&i.__ref&&Or(i,e)},ji=(t,e)=>{let n=e.replaceAll("../","").replaceAll("~/","").split("/"),s=t;for(let o=0;o<n.length;o++){let i=n[o];o===n.length-1?s[i]||(s[i]=!0):(s[i]===!0&&(s[i]={}),s[i]||(s[i]={}),s=s[i])}},ho=(t,e=0)=>{let r=" ".repeat(e),n=Object.entries(t);return n.length?n.map(([o,i])=>i===!0?`${r}${o}`:`${r}${o} {
|
|
3
3
|
${ho(i,e+1)}
|
|
4
4
|
${r}}`).join(`
|
|
5
5
|
`):""},Fi=t=>`{
|
|
@@ -7,10 +7,10 @@ ${ho(t,1)}
|
|
|
7
7
|
}`,Mi=t=>{let e={fields:{},include:[]},r=(n,s)=>{let o=[];for(let i in n)if(n[i]===!0)o.push(i);else{let c=s?`${s}.${i}`:i;e.include.push(c),r(n[i],c)}o.length&&(e.fields[s||"_root"]=o)};return r(t,""),e},Li=t=>{let e=o=>{let i=[],c=[];for(let a in o)if(o[a]===!0)i.push(a);else{let l=e(o[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),s=[];return r&&s.push(`$select=${r}`),n&&s.push(`$expand=${n}`),s.join("&")},Ni=(t,e)=>{let r=[],n=[],s=new Set,o=(f,u,d)=>{s.add(u),d&&n.push(`LEFT JOIN ${u} ON ${u}.${d}_id = ${d}.id`);for(let h in f)f[h]===!0?r.push(`${u}.${h}`):o(f[h],h,u)},i=Object.keys(t);i.length===1&&t[i[0]]!==!0?o(t[i[0]],i[0],null):o(t,"_root",null);let c=[...s][0]||"_root",a=r.length?r.join(", "):"*",l=n.length?`
|
|
8
8
|
`+n.join(`
|
|
9
9
|
`):"";return`SELECT ${a}
|
|
10
|
-
FROM ${c}${l}`},Vi=t=>{let e=[],r=(n,s)=>{for(let o in n){let i=s?`${s}/${o}`:o;n[o]===!0?e.push(i):r(n[o],i)}};return r(t,""),e},Bi=t=>{let e=n=>{let s=[];for(let o in n)n[o]===!0?s.push(o):s.push(`${o}(${e(n[o])})`);return s.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)}},Ui={graphql:Fi,"json-api":Mi,odata:Li,sql:Ni,supabase:Bi,paths:Vi}});var yo=C(()=>{"use strict"});var mo=C(()=>{});var bo=C(()=>{"use strict"});var xo=C(()=>{"use strict"});var _o=C(()=>{"use strict"});var So=C(()=>{"use strict"});var wo=C(()=>{"use strict"});var Co=C(()=>{"use strict"});var vo=C(()=>{"use strict"});var ko=C(()=>{"use strict"});var Ao=C(()=>{"use strict"});var Eo=C(()=>{"use strict"});var Oo,To,$o,Po=C(()=>{"use strict";Zt();Oo=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,"")),To=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),$o=t=>{if(I(t))return t;if(S(t))return t.split(" ");if(L(t))return Object.values(t);if(Ee(t))return[t]}});var Ro=C(()=>{"use strict"});var Io=C(()=>{"use strict"});var V=C(()=>{"use strict";yn();bn();Zt();Oe();$e();mr();yr();xn();_n();dn();gr();Sn();wn();vn();kn();Cn();An();En();xr();On();go();Sr();yo();Tn();mo();bo();xo();_o();So();wo();Co();vo();ko();Ao();Eo();Po();Ro();Io()});var va={};Lt(va,{FACTORY:()=>Be,REGISTRY:()=>rt,applyExtends:()=>me,batch:()=>wt,create:()=>lt,createEffect:()=>M,createElement:()=>wa,createSignal:()=>it,createStore:()=>ct,getActiveConfig:()=>E,mount:()=>Ca,popConfig:()=>G,pushConfig:()=>z,registerEvent:()=>ye});var Rt=null,we=0,Ce=[],ke=()=>Rt;var ve=0,Ye=[];function it(t){let e=new Set;function r(){return Rt&&(e.add(Rt),Rt._sources.add(o)),t}function n(i){i!==t&&(t=i,ei(e))}function s(){return t}let o={get:r,set:n,peek:s,_subscribers:e,_type:"signal"};return o}var St=new Set,Ze=!1;function M(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;sn(n);let s=Rt;Rt=n;try{t()}catch(o){console.error("[smbls] effect error:",o)}finally{Rt=s}},_notify(){n._disposed||(we>0?Ce.push(n):ve>0?Ye.push(n):er(n))},dispose(){n._disposed=!0,sn(n)}};return n._execute(),n}function wt(t){we++;try{t()}finally{we--,we===0&&Zs()}}var tr=!1,on=1e3;function er(t){St.add(t),!tr&&(Ze||(Ze=!0,queueMicrotask(Ys)))}var Nt=[];function Xs(){if(St.size===1){let[t]=St;St.clear(),t._disposed||t._execute();return}Nt.length=0;for(let t of St)Nt.push(t);St.clear(),Nt.sort((t,e)=>t._depth-e._depth);for(let t=0;t<Nt.length;t++){let e=Nt[t];e._disposed||e._execute()}Nt.length=0}function Ys(){if(Ze=!1,St.size!==0){tr=!0;try{let t=0;for(;St.size>0;){if(++t>on){console.error("[smbls] reactive effect cascade exceeded",on,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on."),St.clear();break}Xs()}}finally{tr=!1}}}function Zs(){for(let t=0;t<Ce.length;t++)er(Ce[t]);Ce.length=0}function ti(t){ve++;try{for(let e of t)e._notify()}finally{if(ve--,ve===0&&Ye.length>0){let e=Ye.splice(0);for(let r=0;r<e.length;r++)er(e[r])}}}function ei(t){ti(t)}function sn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var It=Symbol("store"),or=Symbol("signals"),rr=t=>!t||typeof t!="object"||Array.isArray(t)||t[It]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function ct(t,e,r){r===void 0&&(r=0);let n={},s={},o=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<o&&y&&typeof y=="object"&&!rr(y)?(s[m]=y,n[m]=it(ct(y,e,r+1))):(s[m]=y,n[m]=it(y))}let i=new Proxy(s,{get(m,y){if(y===It)return!0;if(y===or)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 d;if(y==="replace")return h;if(y==="add")return p;if(y==="remove")return g;if(y==="destroy")return b;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)){let _=n[y].get();if(_!==void 0||!(y!=="root"&&m.root&&m.root!==i))return _}if(m[y]!==void 0)return m[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&ke()!=null;if(y!=="root"&&m.root&&m.root!==i){let _=m.root[y];return _===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=it(void 0),n[y].get()):_}if(x)return n[y]=it(void 0),n[y].get()},set(m,y,x){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=x,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=x,x&&typeof x=="object"&&!rr(x)?n[y].set(ct(x,e,r+1)):n[y].set(x)):(m[y]=x,x&&typeof x=="object"&&!rr(x)?n[y]=it(ct(x,e,r+1)):n[y]=it(x)),!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){wt(()=>{for(let _ in m)_!=="__proto__"&&(i[_]=m[_])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,i,x.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 x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let _=n[x].peek();_&&_[It]?y[x]=_.parse(m):y[x]=_}return y}function f(){return wt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function d(){return Object.keys(n).map(m=>n[m].peek())}function h(m){return wt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)y!=="__proto__"&&(i[y]=m[y])}),i}function p(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function b(){f(),s.__element=null,s.parent=null}return i}function W(t){return t&&t[It]===!0}function sr(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=it(t[i]);let s=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[or];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[It]?c[nr]:null}return null};return new Proxy(n,{get(i,c){return c===It?!0:c===or?r:c===nr?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=s(c);return l?(l===r&&(i[c]=a),l[c].set(a),!0):(i[c]=a,r[c]=it(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[It]?a[nr]: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 nr=Symbol("scope.parent");var ir="http://www.w3.org/2000/svg",fr=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"]),ri=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 cr(t){return ri.has(t)||fr.has(t)}function lr(t){return fr.has(t)}function Jt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&cr(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","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),s=r.toLowerCase();return s.includes(".")&&(s=s.split(".")[0]),s.includes("_")&&(s=s.split("_")[0]),cr(s)&&!n.has(s)?s:"div"}var cn={};function ar(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(lr(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===ir)return r.createElementNS(ir,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Xt(t){let e=t.tag=Jt(t),n=lr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===ir)?"svg:"+e:e,s=t?.context?.document||globalThis.document,o=cn[n];if(o||(o=cn[n]=ar(e,t)),!o)return null;let i=s&&o.ownerDocument!==s?ar(e,t):o.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var rt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]);var Yt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),ur=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),an=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),dr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var pr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",hr=["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"],ni=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),oi=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${hr.filter(t=>t!=="auto").map(ni).join("|")})$`),fn=t=>oi.test(String(t).trim());V();var Do=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&&yt&&dt){let e=yt.body.appendChild(yt.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){yt.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return yt.body.removeChild(e),[0,0,0,0];t=dt.getComputedStyle(e).color,yt.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 Gi=(t,e=1)=>{let[r,n,s]=t.match(/\w\w/g).map(o=>parseInt(o,16));return[r,n,s]};var Wi=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var zi=(t,e,r)=>{let n=Math.max(t,e,r),s=n-Math.min(t,e,r),o=1-Math.abs(n+n-s-1),i=s&&(n==t?(e-r)/s:n==e?2+(r-t)/s:4+(t-e)/s);return[60*(i<0?i+6:i),o?s/o:0,(n+n-s)/2]},Hi=(t,e,r,n=e*Math.min(r,1-r),s=(o,i=(o+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[s(0),s(8),s(4)],Ki=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let s=(r>>8&255)+e;s>255?s=255:s<0&&(s=0);let o=(r&255)+e;return o>255?o=255:o<0&&(o=0),((o|s<<8|n<<16)+16777216).toString(16).slice(1)};var Q=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,jt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,qi=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ue=t=>{if(!S(t))return null;if(jt.test(t))return{passthrough:t};if(Q(t))return{cssVar:t};let e=t.match(qi);if(!e)return null;let[,r,n,s]=e,o=n!==void 0?`0.${n}`:void 0,i=s&&s[0]==="="?s.slice(1):s;return{name:r,alpha:o,tone:i}},Wt=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),de=t=>{let e=[],r="",n=0;for(let s of t){if(s==="("?n+=1:s===")"&&n>0&&(n-=1),s===","&&n===0){e.push(r),r="";continue}r+=s}return(r.length||!e.length)&&e.push(r),e},jo=(t,e)=>{S(t)&&t.includes("rgb")&&(t=Do(t).join(", ")),S(t)&&(t=t.split(",").map(s=>parseFloat(s.trim()))),Ee(e)&&(e+="");let r=Wi(t),n=e.slice(0,1);if(n==="-"||n==="+"){let s=Ki(r,parseFloat(e));return Gi(s).join(", ")}else{let[s,o,i]=t,c=zi(s,o,i),[a,l,f]=c;return Hi(a,l,parseFloat(e)/100*255)}};var $r=(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};V();V();V();var Le={};Lt(Le,{animation:()=>gc,breakpoints:()=>pc,class:()=>Sc,color:()=>oc,devices:()=>hc,document:()=>dc,font:()=>Xi,fontFace:()=>tc,fontFamily:()=>Yi,fontFamilyTypes:()=>Zi,gradient:()=>sc,grid:()=>_c,icons:()=>ac,media:()=>ec,reset:()=>wc,semanticIcons:()=>fc,sequence:()=>Ft,shadow:()=>cc,sizes:()=>vc,spacing:()=>nc,svg:()=>yc,svgData:()=>mc,templates:()=>bc,theme:()=>ic,timing:()=>uc,typography:()=>Pr,unit:()=>Qi,vars:()=>Cc});var Ft={"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 Qi={default:"em"};var Ji={browserDefault:16,base:16,type:"font-size",ratio:Ft["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Pr=Ji;var Xi={};var Yi={},Zi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},tc={};var ec={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var rc={base:Pr.base,type:"spacing",ratio:Ft.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},nc=rc;var oc={},sc={};var ic={};var cc={};var ac={},fc={};var lc={default:150,base:150,type:"timing",ratio:Ft["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},uc=lc;var dc={};var pc={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},hc={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 gc={};var yc={},mc={};var bc={};var xc={},_c=xc;var Sc={};var wc={},Cc={},vc={};var Fo={},Mo={},Ne=Le,Ve={},Lo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ne){let e=t.toLowerCase();Ve[e]=Ne[t];let r=Lo(e);r!==e&&(Ve[r]=Ne[t]),e!==t&&(Ve[t]=Ne[t])}var Rr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Fo,cssMediaVars:Mo,CSS_VARS:Fo,CSS_MEDIA_VARS:Mo,_scratchConfig:!0,...Ve},bu=Vt(Rr),Be={active:"0",0:Rr};var pe=[],z=t=>{t&&t._scratchConfig&&pe.push(t)},G=()=>{pe.pop()},E=t=>pe.length?pe[pe.length-1]:Be[t||Be.active]||Rr;var Ue={"-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"},No=(t,e)=>{let{key:r,variable:n,value:s,scaling:o,index:i,scalingVariable:c}=t;e.sequence[r]={key:r,decimal:~~(s*100)/100,val:~~s,scaling:o,index:i,scalingVariable:c,variable:n},e.scales[r]=o;let a=Vo.has(e.unit)?"rem":e.unit;e.vars[n]=o+a},zt=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"]),kc=(t,e)=>{let{base:r,type:n,unit:s}=e,o=Vo.has(s)?"rem":s,i=(pr(o)?1:r)+o;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${a}-ratio`;if(t>0){let f=Ue[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Ue[t+1],u=Math.abs(t),d=Math.pow(Bo,2*u),h=Ue[u];return h?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${h}) / ${d.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},Ac=(t,e,r,n)=>{let{type:s}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(s&&s.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Ec=(t,e)=>{let n=(t*e-t)/1.618,s=t*e-n,o=t+n,i=(s+o)/2;return[s,i,o]};var Oc=(t,e)=>{let{key:r,base:n,value:s,ratio:o,variable:i,index:c}=t,l=~~(s*o)-~~s,f,[u,d,h]=Ec(s,o);l>16?f=[u,d,h]:f=[u,h],f.forEach((p,g)=>{let b=~~(p/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,x=Ac(g+1,f,i,e),_={key:r+(g+1),variable:m,value:p,scaling:b,scalingVariable:x,index:y};No(_,e)})},Bo=1.618,Tc=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),s=e*Math.pow(r,t),o=e*Math.pow(r,n)/Math.pow(Bo,2*n);return Math.max(s,o)},he=t=>{let{type:e,base:r,ratio:n,range:s,subSequence:o}=t,i=Math.abs(s[0])+Math.abs(s[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=s[1]-l,u=Ue[f],d=Tc(f,r,n),h=~~(d/r*100)/100,p=a+u,g=kc(f,t),b={key:u,variable:p,value:d,base:r,scaling:h,scalingVariable:g,ratio:n,index:f};No(b,t),o&&Oc(b,t)}return t};var Uo=(t="A",e)=>{let r=E(),{unit:n}=r;if(S(t)&&Q(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let x=r.sizes;if(x){let _=x[t]||x[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:s,unit:o=n.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(fn(t)||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${To(e.type.replace(".","-"))}-`,h=t.toUpperCase(),p=h.slice(0,1)==="-"?"-":"",g=p?h.slice(1):h,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=x=>c.test(x)?`var(${d}${x}${b})`:x;if(g.includes("+")){let[x,_]=g.split("+"),w=`${m(x)} + ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[x,_]=g.split("*"),w=`${m(x)} * ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[x,_]=g.split("-"),w=`${m(x)} - ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!s[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(${d}${g}${b})`;return p?`calc(${x} * -1)`:x}let y=s?s[g]:null;return y?o==="ms"||o==="s"?p+y.val+o:p+y.scaling+o:console.warn("can't find",s,g)},$c=(t,e)=>{if(!["+","-","*","/",","].filter(o=>t.includes(o+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(o=>{let i=o.trim();return!i||["+","-","*","/",","].includes(i)?o:Uo(i,e)}).join("")},Mt=(t,e,r,n)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let o=zt(t);n=o[0],t=o[1]}return["+","-","*","/",","].filter(o=>t.includes(o+" ")).length?t=$c(t,r):t=Uo(t,r),{[e]:n?`${n}(${t})`:t}};V();var Du=_r();var Pc="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",ju=new RegExp(`<(${Pc})\\b([^>]*?)\\s*/>`,"g");V();var ht=(t,e,r)=>{let n=r||E();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let s,o,i;if(I(t))[s,o,i]=t;else{let u=ue(t);if(!u){let{color:d,gradient:h}=n,p=h[t]||d[t];return p?(e&&p[e]&&(p=p[e]),n.useVariable?`var(${p.var})`:p.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;s=u.name,o=u.alpha,i=u.tone}let{color:c,gradient:a}=n,l=c[s]||a[s];if(!l)return n.verbose&&console.warn("Can't find color ",s),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(o&&u){let d=Math.round(parseFloat(o)*100);return`color-mix(in srgb, ${u} ${d}%, transparent)`}return u}return i&&!l[i]&&(f=jo(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),o?`rgba(${f}, ${o})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},ft=(t,e,r)=>{let n=r||E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;let s,o,i;if(I(t))s=t[0];else{let u=ue(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;s=u.name,o=u.alpha,i=u.tone}else s=t}let{color:c,gradient:a}=n,l=c[s]||a[s],f=L(l);if(f&&l.value)return ht(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return o||i?ht(t,null,r):`var(${l.var})`;if(e)return ht(t,`@${e}`,r);{let u={};for(let d in l){if(d.charCodeAt(0)!==64)continue;let h=n.media[d.slice(1)];if(!h)continue;let p="@media "+(h==="print"?`${h}`:`screen and ${h}`);u[p]=ht(t,d,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t};V();var Ir=t=>{let e=E(),r={};for(let n in t){let s=n.slice(0,1);if(At(t[n])){if(s==="@")continue;s===":"?r[`&${n}`]=Ir(t[n]):s==="."&&(r[`&${n}`]=Ir(t[n]))}else r[n]=t[n]}return r},Wo=(t,e)=>{let r=e.shift();return t[r]?Wo(t[r],e):t},Go=(t,e)=>I(e)?Wo(t,e):S(e)&&t[e]?t[e]:t;var ge=(t,e)=>{let r=E();if(S(t)&&Q(t)&&(t=ge(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...s]=I(t)?t:t.split(" "),o=r.theme[n];return o&&s.length?o=Go(o,s):o&&e&&(o=Go(o,e)),Ir(o)};var zo=(t,e)=>{let r=E(),{fontFamily:n}=r;return $r(e||n,t)};var Ko=t=>{let e=E(),{typography:r}=e;return Mt(t,"fontSize",r)};V();V();var Dc=t=>{let r=E().spacing||{},n=parseFloat(t.spacingRatio),s={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return he(s),s};var qo=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var jc=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:he(t)},J=(t,e="padding",r,n)=>{let s=jc(r);if(S(t)){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=zt(t);n=i[0],t=i[1]}}let o=n?[t]:$o(t);if(I(o)){if(o.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)=>Mt(o[f],e+l+i,s,n);return c[o.length].map((l,f)=>a(l,f))}return Mt(t,e,s,n)}},Ht=(t,e,r,n)=>{let s=E(),{spacing:o}=s,i=r||t[e];if(S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let c=zt(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=Dc(t);return J(i,e,c,n)}return J(i,e,o,n)},Qo=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),s=hr.some(i=>t.includes(i));return n||s?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(" ")};V();var Jo=(t,e)=>{let r=E();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;let[n]=I(t)?t:t.split(" "),o=r.shadow[n],i=L(o);if(!o)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(o[e])return o[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&o.value)return o.value;if(i){let c={};for(let a in o){let l=r.media[a.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);c[f]=o.value}return c}return r.verbose&&console.warn("Can't find color",t),t};V();var vt=t=>{let e=E(),{timing:r}=e;return r[t]||r[Oo(t)]||t},xt=(t,e="timing")=>{let r=E(),{timing:n}=r;return Mt(t,e,n)};V();var Mc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Lc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Nc=t=>Mc.has(t),Ot=t=>{let e=t+"";if(jt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(Q(s))return`var(${s})`;if(Nc(s)||/^\d/.test(s)||s==="0")return s;let o=ht(s);if(Wt(o))return o;let i=J(s,"border");return i&&i.border?i.border:s}).join(" ")},Xo=t=>jt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(Q(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=ht(e);return Wt(r)?r:e}).join(" "),Yo=(t,e)=>Jo(t,e),Dr=(t,e)=>jt.test(t)?t:de(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(Q(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let s=ht(n);if(Wt(s)){let i=ft(n,e);return L(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 o=J(n,"shadow");return o&&o.shadow?o.shadow:n}).join(" "):"")).join(", "),jr=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),s=t.slice(r+1,t.lastIndexOf(")")),o=")",c=de(s).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Lc.has(f)||f==="transparent"||jt.test(f))return f;let u=ht(f);return Wt(u)?u:f}).join(" ")));return n+c.join(", ")+o},Zo=(t,e)=>{let r=E();return de(t).map(n=>{let s=n.trim();return Q(s)?`var(${s})`:/^var\(/.test(s)||s.includes("url")?s:s.includes("gradient")?jr(s,e):r.gradient[t]?{backgroundImage:ft(t,e||r.globalTheme)}:s.includes("/")||s.startsWith("http")||s.includes(".")&&!ue(s)?`url(${s})`:s}).join(", ")},ts=t=>S(t)&&t.split(" ").map(e=>J(e,"gap").gap).join(" "),Vc=t=>{let e=t.split(" ");return e.length?e.map(r=>Q(r)?`var(${r})`:r.length<3||r.includes("ms")?xt(r).timing||r:vt(r)?vt(r):r).join(" "):t},Fr=(t,e,r)=>{if(S(t))return t.split(",").map(n=>xt(n).timing||n).join(",")},es=t=>{let e=t.split(",");if(e.length)return e.map(Vc).join(",")};function U(t,e,r={},n={}){let s=Bt.call(this,e||r[t]);if(s==null)return;let o;if(S(s)){if(/^(?:env|var)\(/.test(s.trim()))return{[t]:s};if(s.includes("(")){let a=zt(s);o=a[0],s=a[1]}let i=r.scaleBoxSize,c=qo(t);!i&&c&&!n.ratio&&(s=Qo(s))}return n.ratio?Ht(r,t,s,o):J(s,t,void 0,o)}var k=(t,e=null,r)=>U(t,e,r,{ratio:!0}),Mr=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,s)=>Ht(e,r,n)[r]).join(" ")}};var Lr=new WeakMap,Bc={passive:!0},Uc={passive:!0,capture:!0},Nr=(t,e)=>an.has(t)?e?Uc:Bc:e||!1;function ns(t){let e=Lr.get(t);return e||(e={handlers:new Map,installed:new Set},Lr.set(t,e)),e}function Gc(t,e){let r=ns(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",s=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,o=>{let i=o.target;for(;i&&i!==e;){let c=r.handlers.get(t);if(c){let a=c.get(i);if(a){if(s&&o.relatedTarget&&i.contains(o.relatedTarget)){i=i.parentNode;continue}if(a(o),o.cancelBubble)return}}i=i.parentNode}},Nr(t,n))}function os(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let s=ns(n);Gc(t,n),s.handlers.has(t)||s.handlers.set(t,new WeakMap),s.handlers.get(t).set(e,r)}function ss(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Lr.get(r);if(!n)return;let s=n.handlers.get(t);s&&s.delete(e)}function rs(t){return dr.has(t)&&!Yt.has(t)}function ye(t,e,r){let{node:n,context:s}=e;if(!n)return;let o=s?.designSystem,i=a=>{o&&z(o);try{let l=r.call(e,a,e,e.state,s);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{o&&G()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),s?.strictMode)throw l}o&&G()},c=ur.has(t);if(!c&&rs(t)){let a=s?.rootNode||n.ownerDocument?.documentElement;os(t,n,i,a)}else n.addEventListener(t,i,Nr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!c&&rs(t)){let a=s?.rootNode||n.ownerDocument?.documentElement;ss(t,n,a)}else n.removeEventListener(t,i,Nr(t,!1))})}function is(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 me(t,e,r){let n=is(e);if(!n.length)return;let o=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=cs(n[i],o);c&&c!==e&&as(t,c,r,new Set([e]))}}function cs(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(s=>s.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let s=1;s<r.length&&n;s++)n=n[r[s]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function as(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let s=is(e);if(s.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<s.length;c++){let a=cs(s[c],i);a&&as(t,a,r,n)}}for(let o in e){if(o==="extends"||o==="extend")continue;let i=e[o];t[o]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[o]={...i}:t[o]=i:typeof t[o]=="object"&&typeof i=="object"&&!Array.isArray(t[o])&&!Array.isArray(i)&&t[o]!==null&&i!==null?t[o]=fs(t[o],i):t[o]=i}}function fs(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=fs(s,o):r[n]=o}return r}$e();function Vr(t={},e={}){let r=this,n=r.__ref;if(!n)return;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;let s=!t||Object.keys(t).length===0;if(wt(()=>{if(t.state&&W(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 i=t.style[o];if(i==null)continue;let c=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,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 i=t.attr[o];i==null||i===!1?r.node.removeAttribute(o):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(o,i===!0?"":i)}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(rt.has(o)||o==="state")continue;let i=t[o],c=r[o];if(c&&c.__ref&&typeof c.update=="function")c.update(i,e);else if(typeof i=="object"&&i!==null){let a=o.charCodeAt(0);a>=65&&a<=90&<(i,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=i)}}),r.node&&s&&n.__effects&&n.__effects.length)for(let o=0;o<n.__effects.length;o++){let i=n.__effects[o];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return mt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Br(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],s=t[n];s&&s.__ref&&Br(s)}e.__children.length=0}if(t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.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 Ur(){Br(this)}V();var be=new Map,Wc=null,ls=null;function hs(){try{let t=E();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var zc={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 Ge(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function We(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 Hc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():We(e)}function us(t,e,r){let n=(r?r+"":"")+t+":"+e,s=be.get(n),o=s?null:Ge(t);if(!s){let c=zc[t]||We(t),a=Hc(e);s=r?`_${r}_${c}-${a}`:`_${c}-${a}`,be.set(n,s)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return s;let i=`.${s}{${o||Ge(t)}:${e}}`;return Tt(i),s}var ds=new WeakMap;function Tt(t,e){let r=Kc(e);if(!r)return;let n=ds.get(r);if(n||(n=new Set,ds.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var ps=new WeakMap;function Kc(t){let e=t||hs();if(!e||!e.head)return null;let r=ps.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 s=n.sheet;return ps.set(e,s),Wc=s,s}var qc=8;function xe(t,e,r){if(!t||typeof t!="object")return"";let n=null,s=0,o=[],i=[];for(let a in t){let l=t[a];l==null||l===!1||l===""||(typeof l=="object"?i.push([a,l]):ls?(n||(n=[]),n.push(a,String(l)),s++):o.push(us(a,String(l),r)))}if(n&&s>=qc){let a=n.join("\0"),l=ls(a),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
|
|
11
|
-
`);for(let p=0;p<h.length;p++)h[p]&&Tt(h[p])}o.push(u)}else if(n)for(let a=0;a<n.length;a+=2)o.push(us(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(Qc(i[a][0],i[a][1],r));return o.concat(c).join(" ").trim()}var Gr=new Map;function Qc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),s=be.get(n);if(s){let d=Gr.get(s);if(d)for(let h=0;h<d.length;h++)Tt(d[h]);return s}s=r?`_${r}_c${We(n)}`:`_c${We(n)}`;let o="",i=[],c=d=>typeof d=="string"&&(d.indexOf("{")!==-1||d.indexOf("}")!==-1),a=(d,h)=>{let p="";for(let g in h){let b=h[g];if(b!=null)if(typeof b=="object")a([...d,g],b);else{if(c(b))continue;p+=`${Ge(g)}:${b};`}}p&&(d.length===0?o+=p:i.push({chain:d,body:p}))};a([],e);let l=d=>{if(!d.length)return`.${s}`;let h=d[0].split(",").map(p=>p.trim()).map(p=>p.includes("&")?p.replace(/&/g,`.${s}`):p.startsWith(":")?`.${s}${p}`:`.${s} ${p}`);for(let p=1;p<d.length;p++){let g=d[p].split(",").map(m=>m.trim()),b=[];for(let m of h)for(let y of g)y.includes("&")?b.push(y.replace(/&/g,m)):y.startsWith(":")?b.push(m+y):b.push(m+" "+y);h=b}return h.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(o){let d=`${t}{.${s}{${o}}}`;f.push(d),Tt(d)}for(let d of i){let h=l(d.chain),p=`${t}{${h}{${d.body}}}`;f.push(p),Tt(p)}return Gr.set(s,f),be.set(n,s),s}let u=l([t]);if(o){let d=`${u}{${o}}`;f.push(d),Tt(d)}for(let d of i){let p=`${l([t,...d.chain])}{${d.body}}`;f.push(p),Tt(p)}return Gr.set(s,f),be.set(n,s),s}function ze(t,e){let r="";for(let n in e){let s="";for(let o in e[n])s+=`${Ge(o)}:${e[n][o]};`;r+=`${n}{${s}}`}return Tt(`@keyframes ${t}{${r}}`),t}var Jc=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Xc=["none","forwards","backwards","both"],Yc=["normal","reverse","alternate","alternate-reverse"],Zc=["running","paused"],ta=t=>/^[\d.]+m?s$/.test(t),ea=0,gs=new Map,Wr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(L(t)){let s=JSON.stringify(t),o=gs.get(s);if(o)return o;let i=`smbls-anim-${ea++}`,c=ze(i,t);return gs.set(s,c),c}let n=r&&r[t];return L(n)?ze(t,n):t},ra=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),s=null,o=[],i=null,c=null,a=null,l=null,f=null;for(let u of n)r&&r[u]?s=u:ta(u)?o.push(u):Jc.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):Yc.includes(u)?a=u:Xc.includes(u)?l=u:Zc.includes(u)?f=u:s||(s=u);return{name:s,durations:o,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},ys={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=ra(t,e);return{animationName:Wr(r.name||t,e),animationDuration:r.durations[0]||xt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||xt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||vt(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:Wr(t,e),animationDuration:xt(e.animationDuration||"A").timing,animationDelay:xt(e.animationDelay||"0s").timing,animationTimingFunction:vt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Wr(t,e)}),animationDuration:t=>({animationDuration:xt(t).timing}),animationDelay:t=>({animationDelay:xt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:vt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};V();var ms={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=>ln(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("height",e),...U("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(!S(t))return;let[e,r]=t.split(" ");return{...U("minWidth",e),...U("maxWidth",r||e)}},minHeight:(t,e)=>k("minHeight",t,e),maxHeight:(t,e)=>k("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("minHeight",e),...U("maxHeight",r||e)}},size:t=>{if(!S(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(!S(t))return;let[e,r]=t.split(" ");return{...U("minInlineSize",e),...U("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("maxInlineSize",e),...U("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(!S(t))return;let[e,r]=t.split(" ");return{...U("paddingInlineStart",e),...U("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("paddingBlockStart",e),...U("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(!S(t))return;let[e,r]=t.split(" ");return{...U("marginInlineStart",e),...U("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...U("marginBlockStart",r),...U("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:ts(t)}),columnGap:(t,e)=>Ht(e,"columnGap",t),rowGap:(t,e)=>Ht(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,s]=(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":"")+" "+(s||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Mr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Mr(t??e.round,e,"borderRadius")};var bs={fontSize:t=>Ko(t)||t,fontFamily:t=>({fontFamily:zo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var xs={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=`url(${s.content.src})`;else{let o=n.files&&n.files[t];o&&o.content&&(t=`url(${o.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 _s={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>J(r,"k").k).join(" ")}},left:t=>J(t,"left"),top:t=>J(t,"top"),right:t=>J(t,"right"),bottom:t=>J(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>J(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=>J(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};V();var gt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Ss={theme:(t,e)=>{if(t)return e.themeModifier?ge(t,`@${e.themeModifier}`):ge(t)},color:(t,e)=>{let r=gt(e);if(t)return{color:ft(t,r)}},background:(t,e)=>{let r=gt(e);if(t)return S(t)&&t.includes("gradient")?{background:jr(t,r)}:{background:ft(t,r)}},backgroundColor:(t,e)=>{let r=gt(e);if(t)return{backgroundColor:ft(t,r)}},backgroundImage:(t,e,r,n)=>{let s=gt(e);if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=o.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Zo(t,s)}},textStroke:t=>({WebkitTextStroke:Xo(t)}),outline:t=>({outline:Ot(t)}),outlineOffset:(t,e)=>k("outlineOffset",t,e),border:t=>({border:Ot(t)}),borderColor:(t,e)=>{let r=gt(e);if(t)return{borderColor:ft(t,r)}},borderTopColor:(t,e)=>{let r=gt(e);if(t)return{borderTopColor:ft(t,r)}},borderBottomColor:(t,e)=>{let r=gt(e);if(t)return{borderBottomColor:ft(t,r)}},borderLeftColor:(t,e)=>{let r=gt(e);if(t)return{borderLeftColor:ft(t,r)}},borderRightColor:(t,e)=>{let r=gt(e);if(t)return{borderRightColor:ft(t,r)}},borderLeft:t=>({borderLeft:Ot(t)}),borderTop:t=>({borderTop:Ot(t)}),borderRight:t=>({borderRight:Ot(t)}),borderBottom:t=>({borderBottom:Ot(t)}),shadow:(t,e)=>{let r=gt(e);if(t)return{boxShadow:Yo(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),s=gt(e),o=n?" !important":"";return{boxShadow:Dr(r.trim(),s)+o}},textShadow:(t,{context:e})=>({textShadow:Dr(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:Ot(t)})};var ws={transition:t=>({transition:es(t)}),transitionDuration:t=>({transitionDuration:Fr(t)}),transitionDelay:t=>({transitionDelay:Fr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:vt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};V();var Cs={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,s]=(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":"")+" "+(s||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var vs={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 ut={...ys,...ms,...bs,...xs,..._s,...Ss,...ws,...Cs,...vs};var st=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"]);V();function Es(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let s=r.map(o=>o?.message||(typeof o=="string"?o: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:s||null,args:r})}function na(...t){return Es(this,"warn",t),io.apply(this,t)}function oa(...t){return Es(this,"error",t),co.apply(this,t)}var ks={update:Vr,remove:Ur,getDB:uo,getQuery:po,getRootData:no,getChildren:Zn,getPath:to,nextElement:ao,previousElement:fo,verbose:Tr,warn:na,error:oa,variables:lo,spotByPath:Yn,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,s=this.parse();return this.remove(),e(s,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 s=n.lookdown?.(t);if(s)return s}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let s=this[n];s&&(typeof t=="function"?t(s)&&e.push(s):typeof t=="string"&&s.key===t&&e.push(s),s.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:ro,getRootState:eo,getRootContext:oo,getContext:so,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let s in this)if(!(s==="parent"||s==="node"||s==="__ref")&&!r?.has(s)){if(n&&n[s]!==void 0){e[s]=n[s];continue}typeof this[s]!="function"&&(e[s]=this[s])}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,o=>"-"+o.toLowerCase()),s=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,s,"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 sa(t){if(!t)return ks;let e=As.get(t);if(e)return e;e=Object.create(ks);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return As.set(t,e),e}function zr(t){let e=sa(t.context);Object.setPrototypeOf(t,e)}V();$e();var ia=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},$t=(t,e)=>{if(W(e)){let s=e.__raw||e;e.toggle||Object.defineProperty(s,"toggle",{value:function(o,i={}){e[o]=!e[o]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(s,"set",{value:function(o,i={}){return e.clean({preventStateUpdate:!0}),typeof o=="object"&&o!==null&&e.update(o,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(s,"setByPath",{value:function(o,i,c={}){let a=o.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(s,"getByPath",{value:function(o){let i=o.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(s,"removeByPath",{value:function(o,i={}){let c=o.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(s,"reset",{value:function(o={}){let i=e.parse();return e.set(i,o)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"apply",{value:function(o,i={}){if(typeof o=="function"){let c=o(e);return e.update(c,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"applyFunction",{value:function(o,i={}){if(typeof o=="function")return o(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"rootUpdate",{value:function(o,i={}){let c=e;for(;c?.parent&&W(c.parent);)c=c.parent;return c.update(o,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"parentUpdate",{value:function(o,i={}){if(e.parent)return e.parent.update(o,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"quietReplace",{value:function(o,i={}){return e.replace(o,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(s,"root")||Object.defineProperty(s,"root",{get:function(){let o=e,i=W(o)?o:null;for(let c=0;c<64&&o?.parent&&o.parent!==o;c++)o=o.parent,W(o)&&(i=o);return i||o},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s]},n={update(s){if(!s||typeof s!="object")return e;for(let o in s)e[o]=s[o];return e},apply(s){if(typeof s!="function")return e;let o=s(e);return o?e.update(o):e},parse(){return{...e}},toggle(s){return e[s]=!e[s],e},set(s){if(!s||typeof s!="object")return e;r();for(let o in s)e[o]=s[o];return e},replace(s){return e.set(s)},clean(){return r(),e}};for(let s in n)typeof e[s]!="function"&&ia(e,s,n[s])};var zh=new Proxy(Object.create(null),{get(){},has(){return!1}});V();var Hr={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 ca=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,_e=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||ca(e)||Hr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Hr,t)?Hr[t].includes(e):!1;var He=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Os=(t,e)=>{let r=(t.preSrc||"")+(He(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 s=r.slice(8),o=n.assets&&(n.assets[r]||n.assets[s]);return o&&o.content?o.content.src:r}if(r.startsWith("/files/")){let s=r.slice(7),o=n.files&&(n.files[r]||n.files[s]);return o&&o.content?o.content.src:r}if(n.assets){let s=n.assets[r];if(s&&s.content)return s.content.src}if(n.files){let s=n.files[r];if(s&&s.content)return s.content.src}return r},Ts={src:t=>Os(t,t.src),href:t=>He(t,t.href),action:t=>He(t,t.action),poster:t=>Os(t,t.poster),data:t=>He(t,t.data)},$s=t=>{let e=t.tag||"div",r={};for(let n in Ts)if(t[n]!==void 0&&_e(e,n)){let s=Ts[n](t);s!==void 0&&(r[n]=s)}return r};var aa=1,Ke=[],Jr=!1;function fa(){Jr||(Jr=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(Xr):setTimeout(Xr,0))}function Xr(){if(Jr=!1,!Ke.length)return;let t=Ke.splice(0,Ke.length);for(let e=0;e<t.length;e++){let r=t[e];!r.node||!r.node.isConnected||kt("Mounted",r,r.__ref?.__mountOptions||{})}}function js(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Ke.push(t),fa())}function Ps(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&mt("contentUpdate",t,e);let r=t.context?.designSystem;r&&z(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&mt("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&G()}}function qt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function la(t){return t.charAt(2).toLowerCase()+t.slice(3)}function ua(t){return t.toLowerCase()}function Rs(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Se(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=Se(s,o):r[n]=o}return r}function lt(t,e,r,n={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let o=Object.create(null);o.key=r||t.key||`_${aa++}`,o.parent=e||null,o.context=t.context||e?.context||n.context||{},o.context.__create||(o.context.__create=lt);let i=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||o,path:e?.__ref?.path?[...e.__ref.path,o.key]:[o.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),m=o.context?.components;m&&(m[b]||m["smbls."+b])&&(t={...t,extends:b})}}me(o,t,n);let c=new Set(["childProps","attr","style","scope","data"]),a=o.props&&typeof o.props=="object"?o.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],m=o[g],y=m&&b&&typeof m=="object"&&typeof b=="object"&&!Array.isArray(m)&&!Array.isArray(b)&&typeof m!="function"&&typeof b!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?o[g]=Se(m,b):y&&c.has(g)?o[g]={...m,...b}:y&&Rs(g)?o[g]=Se(m,b):o[g]=b}function l(g){for(let b in g){let m=g[b],y=o[b],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?o[b]=Se(y,m):x&&c.has(b)?o[b]={...y,...m}:x&&Rs(b)?o[b]=Se(y,m):o[b]=m}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);let f=o.scope&&typeof o.scope=="object"?o.scope:null,u=e?.scope,d=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),o.scope=sr(g,h)}else h&&(o.scope=h);if(t.if!==void 0&&(o.if=t.if),zr(o),da(o,e,t),o.if!=null){let g;if(typeof o.if=="function")try{g=o.if(o,o.state,o.context)}catch(b){if(g=!1,i.__ifError=b,typeof console<"u"&&console.warn){let m=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,b?.message||b)}}else g=o.if;i.__if=!!g}if(i.__if)typeof o.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[o.key]=o),typeof o.if=="function"&&Ls(o,i,o.if),o;o.tag||(o.tag=Jt(o)),kt("Init",o,n);let p=o.node=Xt(o);if(!p)return o;if(o.tag==="fragment"){let b=(o.context?.document||globalThis.document).createComment("");p.appendChild(b),i.__fragmentAnchor=b}kt("AttachNode",o,n),p.setAttribute&&o.key&&p.setAttribute("data-key",o.key),p.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&p.setAttribute("data-smbls-app",o.context.key),o.id&&p.setAttribute&&(p.id=o.id),Bs(o,n),Ms(o),Yr(o),Ns(o),_a(o);try{Us(o,n)}catch(g){if(typeof console<"u"&&console.error){let b=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${b}:`,g?.message||g,g?.stack?`
|
|
10
|
+
FROM ${c}${l}`},Vi=t=>{let e=[],r=(n,s)=>{for(let o in n){let i=s?`${s}/${o}`:o;n[o]===!0?e.push(i):r(n[o],i)}};return r(t,""),e},Bi=t=>{let e=n=>{let s=[];for(let o in n)n[o]===!0?s.push(o):s.push(`${o}(${e(n[o])})`);return s.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)}},Ui={graphql:Fi,"json-api":Mi,odata:Li,sql:Ni,supabase:Bi,paths:Vi}});var yo=C(()=>{"use strict"});var mo=C(()=>{});var bo=C(()=>{"use strict"});var xo=C(()=>{"use strict"});var _o=C(()=>{"use strict"});var So=C(()=>{"use strict"});var wo=C(()=>{"use strict"});var Co=C(()=>{"use strict"});var vo=C(()=>{"use strict"});var ko=C(()=>{"use strict"});var Ao=C(()=>{"use strict"});var Eo=C(()=>{"use strict"});var Oo,To,$o,Po=C(()=>{"use strict";Zt();Oo=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,"")),To=t=>t.replace(/[^a-zA-Z0-9]/g," ").trim().toLowerCase().replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),$o=t=>{if(I(t))return t;if(S(t))return t.split(" ");if(L(t))return Object.values(t);if(Ee(t))return[t]}});var Ro=C(()=>{"use strict"});var Io=C(()=>{"use strict"});var V=C(()=>{"use strict";yn();bn();Zt();Oe();$e();mr();yr();xn();_n();dn();gr();Sn();wn();vn();kn();Cn();An();En();xr();On();go();Sr();yo();Tn();mo();bo();xo();_o();So();wo();Co();vo();ko();Ao();Eo();Po();Ro();Io()});var va={};Lt(va,{FACTORY:()=>Be,REGISTRY:()=>rt,applyExtends:()=>me,batch:()=>wt,create:()=>lt,createEffect:()=>M,createElement:()=>wa,createSignal:()=>it,createStore:()=>ct,getActiveConfig:()=>E,mount:()=>Ca,popConfig:()=>W,pushConfig:()=>z,registerEvent:()=>ye});var Rt=null,we=0,Ce=[],ke=()=>Rt;var ve=0,Ye=[];function it(t){let e=new Set;function r(){return Rt&&(e.add(Rt),Rt._sources.add(o)),t}function n(i){i!==t&&(t=i,ei(e))}function s(){return t}let o={get:r,set:n,peek:s,_subscribers:e,_type:"signal"};return o}var St=new Set,Ze=!1;function M(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;sn(n);let s=Rt;Rt=n;try{t()}catch(o){console.error("[smbls] effect error:",o)}finally{Rt=s}},_notify(){n._disposed||(we>0?Ce.push(n):ve>0?Ye.push(n):er(n))},dispose(){n._disposed=!0,sn(n)}};return n._execute(),n}function wt(t){we++;try{t()}finally{we--,we===0&&Zs()}}var tr=!1,on=1e3;function er(t){St.add(t),!tr&&(Ze||(Ze=!0,queueMicrotask(Ys)))}var Nt=[];function Xs(){if(St.size===1){let[t]=St;St.clear(),t._disposed||t._execute();return}Nt.length=0;for(let t of St)Nt.push(t);St.clear(),Nt.sort((t,e)=>t._depth-e._depth);for(let t=0;t<Nt.length;t++){let e=Nt[t];e._disposed||e._execute()}Nt.length=0}function Ys(){if(Ze=!1,St.size!==0){tr=!0;try{let t=0;for(;St.size>0;){if(++t>on){console.error("[smbls] reactive effect cascade exceeded",on,"passes in a single flush \u2014 breaking to avoid hanging the thread.","This usually means an effect (or an onUpdate/subscribeTo handler","it calls into) unconditionally writes back a signal it depends on."),St.clear();break}Xs()}}finally{tr=!1}}}function Zs(){for(let t=0;t<Ce.length;t++)er(Ce[t]);Ce.length=0}function ti(t){ve++;try{for(let e of t)e._notify()}finally{if(ve--,ve===0&&Ye.length>0){let e=Ye.splice(0);for(let r=0;r<e.length;r++)er(e[r])}}}function ei(t){ti(t)}function sn(t){for(let e of t._sources)e._subscribers.delete(t);t._sources.clear()}var It=Symbol("store"),or=Symbol("signals"),rr=t=>!t||typeof t!="object"||Array.isArray(t)||t[It]||Object.isFrozen(t)||typeof Node<"u"&&t instanceof Node||t.__ref||t.nodeType||t.nodeName;function ct(t,e,r){r===void 0&&(r=0);let n={},s={},o=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<o&&y&&typeof y=="object"&&!rr(y)?(s[m]=y,n[m]=it(ct(y,e,r+1))):(s[m]=y,n[m]=it(y))}let i=new Proxy(s,{get(m,y){if(y===It)return!0;if(y===or)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 d;if(y==="replace")return h;if(y==="add")return p;if(y==="remove")return g;if(y==="destroy")return b;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)){let _=n[y].get();if(_!==void 0||!(y!=="root"&&m.root&&m.root!==i))return _}if(m[y]!==void 0)return m[y];let x=typeof y=="string"&&!y.startsWith("__")&&y!=="then"&&y!=="constructor"&&ke()!=null;if(y!=="root"&&m.root&&m.root!==i){let _=m.root[y];return _===void 0&&x&&!Object.prototype.hasOwnProperty.call(n,y)?(n[y]=it(void 0),n[y].get()):_}if(x)return n[y]=it(void 0),n[y].get()},set(m,y,x){return y==="__proto__"?!1:y==="__element"||y==="parent"||y==="root"?(m[y]=x,!0):(Object.prototype.hasOwnProperty.call(n,y)?(m[y]=x,x&&typeof x=="object"&&!rr(x)?n[y].set(ct(x,e,r+1)):n[y].set(x)):(m[y]=x,x&&typeof x=="object"&&!rr(x)?n[y]=it(ct(x,e,r+1)):n[y]=it(x)),!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){wt(()=>{for(let _ in m)_!=="__proto__"&&(i[_]=m[_])});let x=s.__element;return x&&x.onUpdate&&!y?.quiet&&x.onUpdate(x,i,x.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 x in n){if(x==="parent"||x==="root"||x.startsWith("__"))continue;let _=n[x].peek();_&&_[It]?y[x]=_.parse(m):y[x]=_}return y}function f(){return wt(()=>{for(let m in n)delete i[m]}),i}function u(){return Object.keys(n)}function d(){return Object.keys(n).map(m=>n[m].peek())}function h(m){return wt(()=>{for(let y in n)y in m||delete i[y];for(let y in m)y!=="__proto__"&&(i[y]=m[y])}),i}function p(m,y){return i[m]=y,i}function g(m){return delete i[m],i}function b(){f(),s.__element=null,s.parent=null}return i}function G(t){return t&&t[It]===!0}function sr(t,e){let r={},n={};if(t&&typeof t=="object")for(let i in t)n[i]=t[i],r[i]=it(t[i]);let s=i=>{if(Object.prototype.hasOwnProperty.call(r,i))return r;let c=e;for(;c;){let a=c[or];if(a&&Object.prototype.hasOwnProperty.call(a,i))return a;c=c[It]?c[nr]:null}return null};return new Proxy(n,{get(i,c){return c===It?!0:c===or?r:c===nr?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=s(c);return l?(l===r&&(i[c]=a),l[c].set(a),!0):(i[c]=a,r[c]=it(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[It]?a[nr]: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 nr=Symbol("scope.parent");var ir="http://www.w3.org/2000/svg",fr=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"]),ri=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 cr(t){return ri.has(t)||fr.has(t)}function lr(t){return fr.has(t)}function Jt(t){let{tag:e,key:r}=t;if(typeof e=="function"&&(e=e(t)),e===!0&&(e=r),typeof e=="string"&&cr(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","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]),s=r.toLowerCase();return s.includes(".")&&(s=s.split(".")[0]),s.includes("_")&&(s=s.split("_")[0]),cr(s)&&!n.has(s)?s:"div"}var cn={};function ar(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(lr(t)){let n=e?.parent;if(t==="svg"||n?.node?.namespaceURI===ir)return r.createElementNS(ir,t);if(t!=="svg")return r.createElement("div")}return r.createElement(t)}function Xt(t){let e=t.tag=Jt(t),n=lr(e)&&(e==="svg"||t.parent?.node?.namespaceURI===ir)?"svg:"+e:e,s=t?.context?.document||globalThis.document,o=cn[n];if(o||(o=cn[n]=ar(e,t)),!o)return null;let i=s&&o.ownerDocument!==s?ar(e,t):o.cloneNode(!0);return e==="string"&&(i.nodeValue=t.text||""),i}var rt=new Set(["extends","children","content","childrenAs","childExtends","childExtendsRecursive","childProps","inheritParentProps","state","if","define","deps","tag","attr","style","text","html","value","data","classlist","class","scope","root","context","$router","routes","fetch","variables","query","key","component","preventContentUpdate","preventContentRecreate","subscribeTo","autoGrow","__name","__ref","__hash","__text","parent","node"]);var Yt=new Set(["start","init","complete","attachNode","stateInit","stateCreated","beforeUpdate","update","afterUpdate","beforeClassAssign","lazyLoad","render","renderRouter","done","create","frame","mounted","contentUpdate","startUpdate","stateUpdate","beforeStateUpdate","initInspect","initSync","beforeRemove","remove"]),ur=new Set(["load","error","abort","scroll","canplay","canplaythrough","ended","pause","play","playing","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","durationchange","loadeddata","loadedmetadata","progress","emptied","resize"]),an=new Set(["wheel","mousewheel","touchstart","touchmove","touchend","touchcancel"]),dr=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","pointerdown","pointerup","pointermove","pointerenter","pointerleave","pointerover","pointerout","touchstart","touchend","touchmove","keydown","keyup","keypress","input","change","submit","reset","focus","blur","focusin","focusout","wheel","contextmenu","drag","dragstart","dragend","dragenter","dragleave","dragover","drop"]);var pr=t=>t==="em"||t==="rem"||t==="vw"||t==="vh"||t==="vmax"||t==="vmin",hr=["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"],ni=t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),oi=new RegExp(`^-?(?:\\d+\\.?\\d*|\\.\\d+)(?:${hr.filter(t=>t!=="auto").map(ni).join("|")})$`),fn=t=>oi.test(String(t).trim());V();var Do=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&&yt&&dt){let e=yt.body.appendChild(yt.createElement("fictum")),r="rgb(1, 2, 3)";if(e.style.color=r,e.style.color!==r){yt.body.removeChild(e);return}if(e.style.color=t,e.style.color===r||e.style.color==="")return yt.body.removeChild(e),[0,0,0,0];t=dt.getComputedStyle(e).color,yt.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 Wi=(t,e=1)=>{let[r,n,s]=t.match(/\w\w/g).map(o=>parseInt(o,16));return[r,n,s]};var Gi=([t,e,r])=>((1<<24)+(t<<16)+(e<<8)+r).toString(16).slice(1);var zi=(t,e,r)=>{let n=Math.max(t,e,r),s=n-Math.min(t,e,r),o=1-Math.abs(n+n-s-1),i=s&&(n==t?(e-r)/s:n==e?2+(r-t)/s:4+(t-e)/s);return[60*(i<0?i+6:i),o?s/o:0,(n+n-s)/2]},Hi=(t,e,r,n=e*Math.min(r,1-r),s=(o,i=(o+t/30)%12)=>r-n*Math.max(Math.min(i-3,9-i,1),-1))=>[s(0),s(8),s(4)],Ki=(t,e)=>{let r=parseInt(t,16),n=(r>>16)+e;n>255?n=255:n<0&&(n=0);let s=(r>>8&255)+e;s>255?s=255:s<0&&(s=0);let o=(r&255)+e;return o>255?o=255:o<0&&(o=0),((o|s<<8|n<<16)+16777216).toString(16).slice(1)};var Q=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,jt=/(?:rgba?\(|hsla?\(|#[0-9a-fA-F]{3,8}\b)/,qi=/^([a-zA-Z]\w*(?:-[a-zA-Z]\w*)*)(?:\.(\d+))?(?:([+-]\d+|=\d+))?$/,ue=t=>{if(!S(t))return null;if(jt.test(t))return{passthrough:t};if(Q(t))return{cssVar:t};let e=t.match(qi);if(!e)return null;let[,r,n,s]=e,o=n!==void 0?`0.${n}`:void 0,i=s&&s[0]==="="?s.slice(1):s;return{name:r,alpha:o,tone:i}},Gt=t=>S(t)&&(t.includes("rgb")||t.includes("var(")||t.includes("#")),de=t=>{let e=[],r="",n=0;for(let s of t){if(s==="("?n+=1:s===")"&&n>0&&(n-=1),s===","&&n===0){e.push(r),r="";continue}r+=s}return(r.length||!e.length)&&e.push(r),e},jo=(t,e)=>{S(t)&&t.includes("rgb")&&(t=Do(t).join(", ")),S(t)&&(t=t.split(",").map(s=>parseFloat(s.trim()))),Ee(e)&&(e+="");let r=Gi(t),n=e.slice(0,1);if(n==="-"||n==="+"){let s=Ki(r,parseFloat(e));return Wi(s).join(", ")}else{let[s,o,i]=t,c=zi(s,o,i),[a,l,f]=c;return Hi(a,l,parseFloat(e)/100*255)}};var $r=(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};V();V();V();var Le={};Lt(Le,{animation:()=>gc,breakpoints:()=>pc,class:()=>Sc,color:()=>oc,devices:()=>hc,document:()=>dc,font:()=>Xi,fontFace:()=>tc,fontFamily:()=>Yi,fontFamilyTypes:()=>Zi,gradient:()=>sc,grid:()=>_c,icons:()=>ac,media:()=>ec,reset:()=>wc,semanticIcons:()=>fc,sequence:()=>Ft,shadow:()=>cc,sizes:()=>vc,spacing:()=>nc,svg:()=>yc,svgData:()=>mc,templates:()=>bc,theme:()=>ic,timing:()=>uc,typography:()=>Pr,unit:()=>Qi,vars:()=>Cc});var Ft={"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 Qi={default:"em"};var Ji={browserDefault:16,base:16,type:"font-size",ratio:Ft["minor-third"],range:[-3,12],h1Matches:6,lineHeight:1.5,subSequence:!0,mediaRegenerate:!1,unit:"em",templates:{},sequence:{},scales:{},vars:{}},Pr=Ji;var Xi={};var Yi={},Zi={"sans-serif":"Helvetica, Arial, sans-serif, --system-default",serif:"Times New Roman, Georgia, serif, --system-default",monospace:"Courier New, monospace, --system-default"},tc={};var ec={tv:"(min-width: 2780px)",light:"(prefers-color-scheme: light)",dark:"(prefers-color-scheme: dark)",print:"print"};var rc={base:Pr.base,type:"spacing",ratio:Ft.phi,range:[-5,15],subSequence:!0,mediaRegenerate:!1,unit:"em",sequence:{},scales:{},vars:{}},nc=rc;var oc={},sc={};var ic={};var cc={};var ac={},fc={};var lc={default:150,base:150,type:"timing",ratio:Ft["perfect-fourth"],range:[-3,12],mediaRegenerate:!1,unit:"ms",sequence:{},scales:{},vars:{}},uc=lc;var dc={};var pc={screenL:1920,screenM:1680,screenS:1440,tabletL:1366,tabletM:1280,tabletS:1024,mobileL:768,mobileM:560,mobileS:480,mobileXS:375},hc={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 gc={};var yc={},mc={};var bc={};var xc={},_c=xc;var Sc={};var wc={},Cc={},vc={};var Fo={},Mo={},Ne=Le,Ve={},Lo=t=>t.replace(/_([a-z])/g,(e,r)=>r.toUpperCase());for(let t in Ne){let e=t.toLowerCase();Ve[e]=Ne[t];let r=Lo(e);r!==e&&(Ve[r]=Ne[t]),e!==t&&(Ve[t]=Ne[t])}var Rr={verbose:!1,useVariable:!0,useReset:!0,globalTheme:"auto",cssVars:Fo,cssMediaVars:Mo,CSS_VARS:Fo,CSS_MEDIA_VARS:Mo,_scratchConfig:!0,...Ve},bu=Vt(Rr),Be={active:"0",0:Rr};var pe=[],z=t=>{t&&t._scratchConfig&&pe.push(t)},W=()=>{pe.pop()},E=t=>pe.length?pe[pe.length-1]:Be[t||Be.active]||Rr;var Ue={"-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"},No=(t,e)=>{let{key:r,variable:n,value:s,scaling:o,index:i,scalingVariable:c}=t;e.sequence[r]={key:r,decimal:~~(s*100)/100,val:~~s,scaling:o,index:i,scalingVariable:c,variable:n},e.scales[r]=o;let a=Vo.has(e.unit)?"rem":e.unit;e.vars[n]=o+a},zt=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"]),kc=(t,e)=>{let{base:r,type:n,unit:s}=e,o=Vo.has(s)?"rem":s,i=(pr(o)?1:r)+o;if(t===0)return i;let a="--"+(e.varPrefix?e.varPrefix+"-":"")+(n&&n.replace(".","-")),l=`${a}-ratio`;if(t>0){let f=Ue[t-1];return`calc(var(${a}-${f}) * var(${l}))`}if(t<0){let f=Ue[t+1],u=Math.abs(t),d=Math.pow(Bo,2*u),h=Ue[u];return h?`max(calc(var(${a}-${f}) / var(${l})), calc(var(${a}-${h}) / ${d.toFixed(4)}))`:`calc(var(${a}-${f}) / var(${l}))`}},Ac=(t,e,r,n)=>{let{type:s}=n,i=t===2&&e.length===2?t+1:t,l=`${"--"+(n.varPrefix?n.varPrefix+"-":"")+(s&&s.replace(".","-"))}-sub-ratio-`;return`calc(var(${r}) * var(${l+i}))`},Ec=(t,e)=>{let n=(t*e-t)/1.618,s=t*e-n,o=t+n,i=(s+o)/2;return[s,i,o]};var Oc=(t,e)=>{let{key:r,base:n,value:s,ratio:o,variable:i,index:c}=t,l=~~(s*o)-~~s,f,[u,d,h]=Ec(s,o);l>16?f=[u,d,h]:f=[u,h],f.forEach((p,g)=>{let b=~~(p/n*1e3)/1e3,m=i+(g+1),y=c+(g+1)/10,x=Ac(g+1,f,i,e),_={key:r+(g+1),variable:m,value:p,scaling:b,scalingVariable:x,index:y};No(_,e)})},Bo=1.618,Tc=(t,e,r)=>{if(t>=0)return e*Math.pow(r,t);let n=Math.abs(t),s=e*Math.pow(r,t),o=e*Math.pow(r,n)/Math.pow(Bo,2*n);return Math.max(s,o)},he=t=>{let{type:e,base:r,ratio:n,range:s,subSequence:o}=t,i=Math.abs(s[0])+Math.abs(s[1]),a="--"+(t.varPrefix?t.varPrefix+"-":"")+(e&&e.replace(".","-"))+"-";for(let l=0;l<=i;l++){let f=s[1]-l,u=Ue[f],d=Tc(f,r,n),h=~~(d/r*100)/100,p=a+u,g=kc(f,t),b={key:u,variable:p,value:d,base:r,scaling:h,scalingVariable:g,ratio:n,index:f};No(b,t),o&&Oc(b,t)}return t};var Uo=(t="A",e)=>{let r=E(),{unit:n}=r;if(S(t)&&Q(t))return`var(${t})`;if(S(t)&&/^(?:env|var|calc|min|max|clamp)\(/.test(t.trim()))return t;if(S(t)){let x=r.sizes;if(x){let _=x[t]||x[t.toLowerCase()];if(_!==void 0)return t.slice(0,1)==="-"?`calc(${_} * -1)`:_}}let{sequence:s,unit:o=n.default,useVariable:i}=e,c=/^-?[a-zA-Z]/i,a=c.test(t);if(fn(t)||!a||["none","auto","max-content","min-content","fit-content","inherit","initial","unset","revert","revert-layer"].includes(t))return t;let d=`--${e.varPrefix?e.varPrefix+"-":""}${To(e.type.replace(".","-"))}-`,h=t.toUpperCase(),p=h.slice(0,1)==="-"?"-":"",g=p?h.slice(1):h,b="";g.includes("_")&&(b="_"+g.split("_")[1].toLowerCase(),g=g.split("_")[0]);let m=x=>c.test(x)?`var(${d}${x}${b})`:x;if(g.includes("+")){let[x,_]=g.split("+"),w=`${m(x)} + ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("*")){let[x,_]=g.split("*"),w=`${m(x)} * ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}else if(g.includes("-")){let[x,_]=g.split("-"),w=`${m(x)} - ${m(_)}`;return p?`calc((${w}) * -1)`:`calc(${w})`}if(!s[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(${d}${g}${b})`;return p?`calc(${x} * -1)`:x}let y=s?s[g]:null;return y?o==="ms"||o==="s"?p+y.val+o:p+y.scaling+o:console.warn("can't find",s,g)},$c=(t,e)=>{if(!["+","-","*","/",","].filter(o=>t.includes(o+" ")).length)return t;let n=/(\s+-\s+|\s*[+*/,]\s*)/;return t.split(n).map(o=>{let i=o.trim();return!i||["+","-","*","/",","].includes(i)?o:Uo(i,e)}).join("")},Mt=(t,e,r,n)=>{if(typeof t!="string")return E().verbose&&console.warn(e,t,"is not a string"),{[e]:t};if(t==="-"||t==="")return{};if(!n&&t.includes("(")){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};let o=zt(t);n=o[0],t=o[1]}return["+","-","*","/",","].filter(o=>t.includes(o+" ")).length?t=$c(t,r):t=Uo(t,r),{[e]:n?`${n}(${t})`:t}};V();var Du=_r();var Pc="line|circle|ellipse|rect|polyline|polygon|path|stop|use|image",ju=new RegExp(`<(${Pc})\\b([^>]*?)\\s*/>`,"g");V();var ht=(t,e,r)=>{let n=r||E();if(!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;e&&t[e]&&(t=t[e]);let s,o,i;if(I(t))[s,o,i]=t;else{let u=ue(t);if(!u){let{color:d,gradient:h}=n,p=h[t]||d[t];return p?(e&&p[e]&&(p=p[e]),n.useVariable?`var(${p.var})`:p.value):t}if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;s=u.name,o=u.alpha,i=u.tone}let{color:c,gradient:a}=n,l=c[s]||a[s];if(!l)return n.verbose&&console.warn("Can't find color ",s),t;e&&(l[e]?l=l[e]:n.verbose&&console.warn(t," - does not have ",e));let f=l.rgb;if(!f){let u=n.useVariable?`var(${l.var})`:l.value;if(o&&u){let d=Math.round(parseFloat(o)*100);return`color-mix(in srgb, ${u} ${d}%, transparent)`}return u}return i&&!l[i]&&(f=jo(f,i),l[i]={rgb:f,var:`${l.var}-${i}`}),l[i]&&(f=l[i].rgb),o?`rgba(${f}, ${o})`:i?`rgba(${f}, 1)`:n.useVariable?`var(${l.var})`:`rgb(${f})`},ft=(t,e,r)=>{let n=r||E();if(e||(e=n.globalTheme==="auto"?null:n.globalTheme),!S(t)){n.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;let s,o,i;if(I(t))s=t[0];else{let u=ue(t);if(u){if(u.passthrough)return u.passthrough;if(u.cssVar)return`var(${u.cssVar})`;s=u.name,o=u.alpha,i=u.tone}else s=t}let{color:c,gradient:a}=n,l=c[s]||a[s],f=L(l);if(f&&l.value)return ht(t,`@${e}`,r);if(f){if(n.useVariable&&l.var)return o||i?ht(t,null,r):`var(${l.var})`;if(e)return ht(t,`@${e}`,r);{let u={};for(let d in l){if(d.charCodeAt(0)!==64)continue;let h=n.media[d.slice(1)];if(!h)continue;let p="@media "+(h==="print"?`${h}`:`screen and ${h}`);u[p]=ht(t,d,r)}return u}}else return n.verbose&&console.warn("Can't find color",t),t};V();var Ir=t=>{let e=E(),r={};for(let n in t){let s=n.slice(0,1);if(At(t[n])){if(s==="@")continue;s===":"?r[`&${n}`]=Ir(t[n]):s==="."&&(r[`&${n}`]=Ir(t[n]))}else r[n]=t[n]}return r},Go=(t,e)=>{let r=e.shift();return t[r]?Go(t[r],e):t},Wo=(t,e)=>I(e)?Go(t,e):S(e)&&t[e]?t[e]:t;var ge=(t,e)=>{let r=E();if(S(t)&&Q(t)&&(t=ge(t.slice(2))),!t||!S(t)){r.verbose&&console.warn(`${t} - Theme is not a string`);return}let[n,...s]=I(t)?t:t.split(" "),o=r.theme[n];return o&&s.length?o=Wo(o,s):o&&e&&(o=Wo(o,e)),Ir(o)};var zo=(t,e)=>{let r=E(),{fontFamily:n}=r;return $r(e||n,t)};var Ko=t=>{let e=E(),{typography:r}=e;return Mt(t,"fontSize",r)};V();V();var Dc=t=>{let r=E().spacing||{},n=parseFloat(t.spacingRatio),s={...r,ratio:Number.isFinite(n)?n:r.ratio,sequence:{},scales:{}};return he(s),s};var qo=t=>{let e=t.toLowerCase(),r=e.includes("width")||e.includes("height"),n=e.includes("border")||e.includes("outline");return r&&!n};var jc=t=>{let e=E(),{spacing:r}=e;return!t||!t.sequence?r:Object.keys(t.sequence).length>0?t:he(t)},J=(t,e="padding",r,n)=>{let s=jc(r);if(S(t)){if(/^(?:env|var)\(/.test(t.trim()))return{[e]:t};if(!n&&t.includes("(")){let i=zt(t);n=i[0],t=i[1]}}let o=n?[t]:$o(t);if(I(o)){if(o.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)=>Mt(o[f],e+l+i,s,n);return c[o.length].map((l,f)=>a(l,f))}return Mt(t,e,s,n)}},Ht=(t,e,r,n)=>{let s=E(),{spacing:o}=s,i=r||t[e];if(S(i)&&/^(?:env|var)\(/.test(i.trim()))return{[e]:i};if(!n&&S(i)&&i.includes("(")){let c=zt(i);n=c[0],i=c[1]}if(t.spacingRatio){let c=Dc(t);return J(i,e,c,n)}return J(i,e,o,n)},Qo=t=>{let e=r=>{let n=["+","-","*","/"].includes(r),s=hr.some(i=>t.includes(i));return n||s?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(" ")};V();var Jo=(t,e)=>{let r=E();if(e||(e=r.globalTheme),!S(t)){r.verbose&&console.warn(t,"- type for color is not valid");return}if(Q(t))return`var(${t})`;let[n]=I(t)?t:t.split(" "),o=r.shadow[n],i=L(o);if(!o)return r.verbose&&console.warn("Can't find color ",n),t;if(e){if(o[e])return o[e].value;r.verbose&&console.warn(t," - does not have ",e)}if(i&&o.value)return o.value;if(i){let c={};for(let a in o){let l=r.media[a.slice(1)],f="@media "+(l==="print"?`${l}`:`screen and ${l}`);c[f]=o.value}return c}return r.verbose&&console.warn("Can't find color",t),t};V();var vt=t=>{let e=E(),{timing:r}=e;return r[t]||r[Oo(t)]||t},xt=(t,e="timing")=>{let r=E(),{timing:n}=r;return Mt(t,e,n)};V();var Mc=new Set(["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","initial"]),Lc=new Set(["to","top","bottom","left","right","center","at","circle","ellipse","closest-side","farthest-side","closest-corner","farthest-corner"]),Nc=t=>Mc.has(t),Ot=t=>{let e=t+"";if(jt.test(e))return e;let r=e.trim();return r==="none"||r==="0"||r==="initial"||r==="inherit"||r==="unset"?e:e.split(/\s+/).map(s=>{if(s=s.trim(),!s)return"";if(Q(s))return`var(${s})`;if(Nc(s)||/^\d/.test(s)||s==="0")return s;let o=ht(s);if(Gt(o))return o;let i=J(s,"border");return i&&i.border?i.border:s}).join(" ")},Xo=t=>jt.test(t)?t:t.split(/\s+/).map(e=>{if(e=e.trim(),!e)return"";if(Q(e))return`var(${e})`;if(/^\d/.test(e)||e.includes("px")||e==="0")return e;let r=ht(e);return Gt(r)?r:e}).join(" "),Yo=(t,e)=>Jo(t,e),Dr=(t,e)=>jt.test(t)?t:de(t).map(r=>(r=r.trim(),r?r.split(/\s+/).map(n=>{if(n=n.trim(),!n)return"";if(Q(n))return`var(${n})`;if(n==="inset"||n==="none")return n;let s=ht(n);if(Gt(s)){let i=ft(n,e);return L(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 o=J(n,"shadow");return o&&o.shadow?o.shadow:n}).join(" "):"")).join(", "),jr=(t,e)=>{let r=t.indexOf("(");if(r===-1)return t;let n=t.slice(0,r+1),s=t.slice(r+1,t.lastIndexOf(")")),o=")",c=de(s).map(a=>(a=a.trim(),a.split(/\s+/).map(f=>{if(!f||/^\d/.test(f)||f==="0"||Lc.has(f)||f==="transparent"||jt.test(f))return f;let u=ht(f);return Gt(u)?u:f}).join(" ")));return n+c.join(", ")+o},Zo=(t,e)=>{let r=E();return de(t).map(n=>{let s=n.trim();return Q(s)?`var(${s})`:/^var\(/.test(s)||s.includes("url")?s:s.includes("gradient")?jr(s,e):r.gradient[t]?{backgroundImage:ft(t,e||r.globalTheme)}:s.includes("/")||s.startsWith("http")||s.includes(".")&&!ue(s)?`url(${s})`:s}).join(", ")},ts=t=>S(t)&&t.split(" ").map(e=>J(e,"gap").gap).join(" "),Vc=t=>{let e=t.split(" ");return e.length?e.map(r=>Q(r)?`var(${r})`:r.length<3||r.includes("ms")?xt(r).timing||r:vt(r)?vt(r):r).join(" "):t},Fr=(t,e,r)=>{if(S(t))return t.split(",").map(n=>xt(n).timing||n).join(",")},es=t=>{let e=t.split(",");if(e.length)return e.map(Vc).join(",")};function U(t,e,r={},n={}){let s=Bt.call(this,e||r[t]);if(s==null)return;let o;if(S(s)){if(/^(?:env|var)\(/.test(s.trim()))return{[t]:s};if(s.includes("(")){let a=zt(s);o=a[0],s=a[1]}let i=r.scaleBoxSize,c=qo(t);!i&&c&&!n.ratio&&(s=Qo(s))}return n.ratio?Ht(r,t,s,o):J(s,t,void 0,o)}var v=(t,e=null,r)=>U(t,e,r,{ratio:!0}),Mr=(t,e,r)=>{if(S(t))return{borderRadius:t.split(" ").map((n,s)=>Ht(e,r,n)[r]).join(" ")}};var Lr=new WeakMap,Bc={passive:!0},Uc={passive:!0,capture:!0},Nr=(t,e)=>an.has(t)?e?Uc:Bc:e||!1;function ns(t){let e=Lr.get(t);return e||(e={handlers:new Map,installed:new Set},Lr.set(t,e)),e}function Wc(t,e){let r=ns(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",s=t==="mouseenter"||t==="mouseleave";e.addEventListener(t,o=>{let i=o.target;for(;i&&i!==e;){let c=r.handlers.get(t);if(c){let a=c.get(i);if(a){if(s&&o.relatedTarget&&i.contains(o.relatedTarget)){i=i.parentNode;continue}if(a(o),o.cancelBubble)return}}i=i.parentNode}},Nr(t,n))}function os(t,e,r,n){n||(n=e.ownerDocument?.documentElement||e.getRootNode());let s=ns(n);Wc(t,n),s.handlers.has(t)||s.handlers.set(t,new WeakMap),s.handlers.get(t).set(e,r)}function ss(t,e,r){r||(r=e.ownerDocument?.documentElement||e.getRootNode());let n=Lr.get(r);if(!n)return;let s=n.handlers.get(t);s&&s.delete(e)}function rs(t){return dr.has(t)&&!Yt.has(t)}function ye(t,e,r){let{node:n,context:s}=e;if(!n)return;let o=s?.designSystem,i=a=>{o&&z(o);try{let l=r.call(e,a,e,e.state,s);if(l&&typeof l.then=="function"){l.catch(f=>{e.error=f,console.error("[DOMQL] Async event error:",f)}).finally(()=>{o&&W()});return}}catch(l){if(e.error=l,console.error("[DOMQL] Event error:",l),s?.strictMode)throw l}o&&W()},c=ur.has(t);if(!c&&rs(t)){let a=s?.rootNode||n.ownerDocument?.documentElement;os(t,n,i,a)}else n.addEventListener(t,i,Nr(t,!1));e.__ref.__eventCleanup||(e.__ref.__eventCleanup=[]),e.__ref.__eventCleanup.push(()=>{if(!c&&rs(t)){let a=s?.rootNode||n.ownerDocument?.documentElement;ss(t,n,a)}else n.removeEventListener(t,i,Nr(t,!1))})}function is(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 me(t,e,r){let n=is(e);if(!n.length)return;let o=(t.context||r?.context||{}).components||{};for(let i=0;i<n.length;i++){let c=cs(n[i],o);c&&c!==e&&as(t,c,r,new Set([e]))}}function cs(t,e){if(typeof t=="string"){if(t.includes(">")){let r=t.split(">").map(s=>s.trim()),n=e[r[0]]||e[`smbls.${r[0]}`];for(let s=1;s<r.length&&n;s++)n=n[r[s]];return n||null}return e[t]||e[`smbls.${t}`]||null}return typeof t=="object"&&t!==null?t:null}function as(t,e,r,n=new Set){if(n.has(e))return;n.add(e);let s=is(e);if(s.length){let i=(t.context||r?.context||{}).components||{};for(let c=0;c<s.length;c++){let a=cs(s[c],i);a&&as(t,a,r,n)}}for(let o in e){if(o==="extends"||o==="extend")continue;let i=e[o];t[o]===void 0?i&&typeof i=="object"&&!Array.isArray(i)&&typeof i!="function"?t[o]={...i}:t[o]=i:typeof t[o]=="object"&&typeof i=="object"&&!Array.isArray(t[o])&&!Array.isArray(i)&&t[o]!==null&&i!==null?t[o]=fs(t[o],i):t[o]=i}}function fs(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=fs(s,o):r[n]=o}return r}$e();function Vr(t={},e={}){let r=this,n=r.__ref;if(!n)return;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;let s=!t||Object.keys(t).length===0;if(wt(()=>{if(t.state&&G(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 i=t.style[o];if(i==null)continue;let c=o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=String(i).replace(/\s*!important\s*$/,"");r.node.style.setProperty(c,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 i=t.attr[o];i==null||i===!1?r.node.removeAttribute(o):typeof i!="function"&&typeof i!="object"&&r.node.setAttribute(o,i===!0?"":i)}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(rt.has(o)||o==="state")continue;let i=t[o],c=r[o];if(c&&c.__ref&&typeof c.update=="function")c.update(i,e);else if(typeof i=="object"&&i!==null){let a=o.charCodeAt(0);a>=65&&a<=90&<(i,r,o,e)}else o!=="text"&&o!=="html"&&o!=="style"&&o!=="attr"&&o!=="data"&&(r[o]=i)}}),r.node&&s&&n.__effects&&n.__effects.length)for(let o=0;o<n.__effects.length;o++){let i=n.__effects[o];i&&!i._disposed&&!i._isSubscribeToEffect&&typeof i._execute=="function"&&i._execute()}else if(r.node&&n.__conditionalRunners)for(let o of n.__conditionalRunners)o();return mt("update",r),!e.preventListeners&&typeof r.onUpdate=="function"&&r.onUpdate(r,r.state,r.context,e),r}function Br(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],s=t[n];s&&s.__ref&&Br(s)}e.__children.length=0}if(t.node?.parentNode?t.node.remove():t.tag==="fragment"&&e.__fragmentAnchor?.parentNode&&e.__fragmentAnchor.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 Ur(){Br(this)}V();var be=new Map,Gc=null,ls=null;function hs(){try{let t=E();if(t?.document)return t.document}catch{}return typeof document<"u"?document:null}var zc={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 We(t){return t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}function Ge(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 Hc(t){let e=String(t);return e.length<=20?e.replace(/\s+/g,"_").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase():Ge(e)}function us(t,e,r){let n=(r?r+"":"")+t+":"+e,s=be.get(n),o=s?null:We(t);if(!s){let c=zc[t]||Ge(t),a=Hc(e);s=r?`_${r}_${c}-${a}`:`_${c}-${a}`,be.set(n,s)}if(typeof e=="string"&&(e.indexOf("}")!==-1||e.indexOf("{")!==-1))return s;let i=`.${s}{${o||We(t)}:${e}}`;return Tt(i),s}var ds=new WeakMap;function Tt(t,e){let r=Kc(e);if(!r)return;let n=ds.get(r);if(n||(n=new Set,ds.set(r,n)),!n.has(t)){n.add(t);try{r.insertRule(t,r.cssRules.length)}catch{}}}var ps=new WeakMap;function Kc(t){let e=t||hs();if(!e||!e.head)return null;let r=ps.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 s=n.sheet;return ps.set(e,s),Gc=s,s}var qc=8;function xe(t,e,r){if(!t||typeof t!="object")return"";let n=null,s=0,o=[],i=[];for(let a in t){let l=t[a];l==null||l===!1||l===""||(typeof l=="object"?i.push([a,l]):ls?(n||(n=[]),n.push(a,String(l)),s++):o.push(us(a,String(l),r)))}if(n&&s>=qc){let a=n.join("\0"),l=ls(a),f=l.indexOf("\0"),u=l.substring(0,f),d=l.substring(f+1);if(d){let h=d.split(`
|
|
11
|
+
`);for(let p=0;p<h.length;p++)h[p]&&Tt(h[p])}o.push(u)}else if(n)for(let a=0;a<n.length;a+=2)o.push(us(n[a],n[a+1],r));let c=[];for(let a=0;a<i.length;a++)c.push(Qc(i[a][0],i[a][1],r));return o.concat(c).join(" ").trim()}var Wr=new Map;function Qc(t,e,r){let n=(r?r+"":"")+t+JSON.stringify(e),s=be.get(n);if(s){let d=Wr.get(s);if(d)for(let h=0;h<d.length;h++)Tt(d[h]);return s}s=r?`_${r}_c${Ge(n)}`:`_c${Ge(n)}`;let o="",i=[],c=d=>typeof d=="string"&&(d.indexOf("{")!==-1||d.indexOf("}")!==-1),a=(d,h)=>{let p="";for(let g in h){let b=h[g];if(b!=null)if(typeof b=="object")a([...d,g],b);else{if(c(b))continue;p+=`${We(g)}:${b};`}}p&&(d.length===0?o+=p:i.push({chain:d,body:p}))};a([],e);let l=d=>{if(!d.length)return`.${s}`;let h=d[0].split(",").map(p=>p.trim()).map(p=>p.includes("&")?p.replace(/&/g,`.${s}`):p.startsWith(":")?`.${s}${p}`:`.${s} ${p}`);for(let p=1;p<d.length;p++){let g=d[p].split(",").map(m=>m.trim()),b=[];for(let m of h)for(let y of g)y.includes("&")?b.push(y.replace(/&/g,m)):y.startsWith(":")?b.push(m+y):b.push(m+" "+y);h=b}return h.join(", ")},f=[];if(t.startsWith("@media")||t.startsWith("@supports")){if(o){let d=`${t}{.${s}{${o}}}`;f.push(d),Tt(d)}for(let d of i){let h=l(d.chain),p=`${t}{${h}{${d.body}}}`;f.push(p),Tt(p)}return Wr.set(s,f),be.set(n,s),s}let u=l([t]);if(o){let d=`${u}{${o}}`;f.push(d),Tt(d)}for(let d of i){let p=`${l([t,...d.chain])}{${d.body}}`;f.push(p),Tt(p)}return Wr.set(s,f),be.set(n,s),s}function ze(t,e){let r="";for(let n in e){let s="";for(let o in e[n])s+=`${We(o)}:${e[n][o]};`;r+=`${n}{${s}}`}return Tt(`@keyframes ${t}{${r}}`),t}var Jc=["ease","linear","ease-in","ease-out","ease-in-out","step-start","step-end"],Xc=["none","forwards","backwards","both"],Yc=["normal","reverse","alternate","alternate-reverse"],Zc=["running","paused"],ta=t=>/^[\d.]+m?s$/.test(t),ea=0,gs=new Map,Gr=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{};if(L(t)){let s=JSON.stringify(t),o=gs.get(s);if(o)return o;let i=`smbls-anim-${ea++}`,c=ze(i,t);return gs.set(s,c),c}let n=r&&r[t];return L(n)?ze(t,n):t},ra=(t,e)=>{let{animation:r}=e.context&&e.context.designSystem||{},n=t.split(/\s+/),s=null,o=[],i=null,c=null,a=null,l=null,f=null;for(let u of n)r&&r[u]?s=u:ta(u)?o.push(u):Jc.includes(u)||u.startsWith("cubic-bezier")||u.startsWith("steps(")?i=u:u==="infinite"||/^\d+$/.test(u)?c=u==="infinite"?u:Number(u):Yc.includes(u)?a=u:Xc.includes(u)?l=u:Zc.includes(u)?f=u:s||(s=u);return{name:s,durations:o,timingFunction:i,iterationCount:c,direction:a,fillMode:l,playState:f}},ys={animation:(t,e)=>{if(S(t)&&t.includes(" ")){let r=ra(t,e);return{animationName:Gr(r.name||t,e),animationDuration:r.durations[0]||xt(e.animationDuration||"A").timing,animationDelay:r.durations[1]||xt(e.animationDelay||"0s").timing,animationTimingFunction:r.timingFunction||vt(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:Gr(t,e),animationDuration:xt(e.animationDuration||"A").timing,animationDelay:xt(e.animationDelay||"0s").timing,animationTimingFunction:vt(e.animationTimingFunction||"ease"),animationFillMode:e.animationFillMode||"both",animationIterationCount:e.animationIterationCount||1,animationPlayState:e.animationPlayState,animationDirection:e.animationDirection}},animationName:(t,e)=>({animationName:Gr(t,e)}),animationDuration:t=>({animationDuration:xt(t).timing}),animationDelay:t=>({animationDelay:xt(t).timing}),animationTimingFunction:t=>({animationTimingFunction:vt(t)}),animationIterationCount:t=>({animationIterationCount:t}),animationFillMode:t=>({animationFillMode:t}),animationPlayState:t=>({animationPlayState:t}),animationDirection:t=>({animationDirection:t})};V();var ms={show:t=>t?void 0:{display:"none !important"},hide:t=>t?{display:"none !important"}:void 0,height:(t,e)=>v("height",t,e),width:(t,e)=>v("width",t,e),boxSizing:t=>ln(t)?{boxSizing:"border-box"}:{boxSizing:t},boxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("height",e),...U("width",r||e)}},inlineSize:(t,e)=>v("inlineSize",t,e),blockSize:(t,e)=>v("blockSize",t,e),minWidth:(t,e)=>v("minWidth",t,e),maxWidth:(t,e)=>v("maxWidth",t,e),widthRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("minWidth",e),...U("maxWidth",r||e)}},minHeight:(t,e)=>v("minHeight",t,e),maxHeight:(t,e)=>v("maxHeight",t,e),heightRange:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("minHeight",e),...U("maxHeight",r||e)}},size:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...v("inlineSize",e),...v("blockSize",r||e)}},minBlockSize:(t,e)=>v("minBlockSize",t,e),minInlineSize:(t,e)=>v("minInlineSize",t,e),maxBlockSize:(t,e)=>v("maxBlockSize",t,e),maxInlineSize:(t,e)=>v("maxInlineSize",t,e),minSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("minInlineSize",e),...U("minBlockSize",r||e)}},maxSize:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("maxInlineSize",e),...U("maxBlockSize",r||e)}},borderWidth:(t,e)=>v("borderWidth",t,e),borderTopWidth:(t,e)=>v("borderTopWidth",t,e),borderRightWidth:(t,e)=>v("borderRightWidth",t,e),borderBottomWidth:(t,e)=>v("borderBottomWidth",t,e),borderLeftWidth:(t,e)=>v("borderLeftWidth",t,e),padding:(t,e)=>v("padding",t,e),scrollPadding:(t,e)=>v("scrollPadding",t,e),paddingInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("paddingInlineStart",e),...U("paddingInlineEnd",r||e)}},paddingBlock:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("paddingBlockStart",e),...U("paddingBlockEnd",r||e)}},paddingTop:(t,e)=>v("paddingBlockStart",t,e),paddingBottom:(t,e)=>v("paddingBlockEnd",t,e),paddingLeft:(t,e)=>v("paddingInlineStart",t,e),paddingRight:(t,e)=>v("paddingInlineEnd",t,e),paddingBlockStart:(t,e)=>v("paddingBlockStart",t,e),paddingBlockEnd:(t,e)=>v("paddingBlockEnd",t,e),paddingInlineStart:(t,e)=>v("paddingInlineStart",t,e),paddingInlineEnd:(t,e)=>v("paddingInlineEnd",t,e),margin:(t,e)=>v("margin",t,e),marginInline:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{...U("marginInlineStart",e),...U("marginInlineEnd",r||e)}},marginBlock:(t,e)=>{if(!S(e.marginBlock))return;let[r,n]=e.marginBlock.split(" ");return{...U("marginBlockStart",r),...U("marginBlockEnd",n||r)}},marginTop:(t,e)=>v("marginBlockStart",t,e),marginBottom:(t,e)=>v("marginBlockEnd",t,e),marginLeft:(t,e)=>v("marginInlineStart",t,e),marginRight:(t,e)=>v("marginInlineEnd",t,e),marginInlineStart:(t,e)=>v("marginInlineStart",t,e),marginInlineEnd:(t,e)=>v("marginInlineEnd",t,e),marginBlockStart:(t,e)=>v("marginBlockStart",t,e),marginBlockEnd:(t,e)=>v("marginBlockEnd",t,e),gap:t=>({gap:ts(t)}),columnGap:(t,e)=>Ht(e,"columnGap",t),rowGap:(t,e)=>Ht(e,"rowGap",t),flexWrap:t=>({display:"flex",flexWrap:t}),flexFlow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,s]=(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":"")+" "+(s||"")}},flexAlign:t=>{if(!S(t))return;let[e,r]=t.split(" ");return{display:"flex",alignItems:e,justifyContent:r}},round:(t,e)=>Mr(t??e.borderRadius,e,"round"),borderRadius:(t,e)=>Mr(t??e.round,e,"borderRadius")};var bs={fontSize:t=>Ko(t)||t,fontFamily:t=>({fontFamily:zo(t)||t}),fontWeight:t=>({fontWeight:t,fontVariationSettings:'"wght" '+t}),lineClamp:t=>{if(t!=null)return t==="none"?{WebkitLineClamp:"none",lineClamp:"none"}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:String(t),lineClamp:String(t),overflow:"hidden"}}};var xs={overflow:t=>({overflow:t}),cursor:(t,e,r,n)=>{if(!t)return;let s=n.assets&&n.assets[t];if(s&&s.content)t=`url(${s.content.src})`;else{let o=n.files&&n.files[t];o&&o.content&&(t=`url(${o.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 _s={inset:(t,e)=>{if(e.call("isNumber",t))return{inset:t};if(e.call("isString",t))return{inset:t.split(" ").map(r=>J(r,"k").k).join(" ")}},left:t=>J(t,"left"),top:t=>J(t,"top"),right:t=>J(t,"right"),bottom:t=>J(t,"bottom"),verticalInset:t=>{if(typeof t!="string")return;let e=t.split(" ").map(r=>J(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=>J(r,"k").k);return{left:e[0],right:e[1]||e[0]}}};V();var gt=({context:t,state:e})=>{let r=e?.root?.globalTheme||t.designSystem?.globalTheme;return r==="auto"?null:r},Ss={theme:(t,e)=>{if(t)return e.themeModifier?ge(t,`@${e.themeModifier}`):ge(t)},color:(t,e)=>{let r=gt(e);if(t)return{color:ft(t,r)}},background:(t,e)=>{let r=gt(e);if(t)return S(t)&&t.includes("gradient")?{background:jr(t,r)}:{background:ft(t,r)}},backgroundColor:(t,e)=>{let r=gt(e);if(t)return{backgroundColor:ft(t,r)}},backgroundImage:(t,e,r,n)=>{let s=gt(e);if(!t)return;let o=n.assets&&n.assets[t];if(o&&o.content)t=o.content.src;else{let i=n.files&&n.files[t];i&&i.content&&(t=i.content.src)}return{backgroundImage:Zo(t,s)}},textStroke:t=>({WebkitTextStroke:Xo(t)}),outline:t=>({outline:Ot(t)}),outlineOffset:(t,e)=>v("outlineOffset",t,e),border:t=>({border:Ot(t)}),borderColor:(t,e)=>{let r=gt(e);if(t)return{borderColor:ft(t,r)}},borderTopColor:(t,e)=>{let r=gt(e);if(t)return{borderTopColor:ft(t,r)}},borderBottomColor:(t,e)=>{let r=gt(e);if(t)return{borderBottomColor:ft(t,r)}},borderLeftColor:(t,e)=>{let r=gt(e);if(t)return{borderLeftColor:ft(t,r)}},borderRightColor:(t,e)=>{let r=gt(e);if(t)return{borderRightColor:ft(t,r)}},borderLeft:t=>({borderLeft:Ot(t)}),borderTop:t=>({borderTop:Ot(t)}),borderRight:t=>({borderRight:Ot(t)}),borderBottom:t=>({borderBottom:Ot(t)}),shadow:(t,e)=>{let r=gt(e);if(t)return{boxShadow:Yo(t,r)}},boxShadow:(t,e)=>{if(!S(t))return;let[r,n]=t.split("!importan"),s=gt(e),o=n?" !important":"";return{boxShadow:Dr(r.trim(),s)+o}},textShadow:(t,{context:e})=>({textShadow:Dr(t,e.designSystem.globalTheme)}),columnRule:t=>({columnRule:Ot(t)})};var ws={transition:t=>({transition:es(t)}),transitionDuration:t=>({transitionDuration:Fr(t)}),transitionDelay:t=>({transitionDelay:Fr(t)}),transitionTimingFunction:t=>({transitionTimingFunction:vt(t)}),transitionProperty:t=>({transitionProperty:t,willChange:t})};V();var Cs={flow:(t,e)=>{let r=e.reverse;if(!S(t))return;let[n,s]=(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":"")+" "+(s||"")}},wrap:(t,e)=>({display:"flex",flexWrap:t}),align:(t,e)=>{let[r,n]=t.split(" ");return{display:"flex",alignItems:r,justifyContent:n}}};var vs={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 ut={...ys,...ms,...bs,...xs,..._s,...Ss,...ws,...Cs,...vs};var st=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"]);V();function Es(t,e,r){let n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;let s=r.map(o=>o?.message||(typeof o=="string"?o: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:s||null,args:r})}function na(...t){return Es(this,"warn",t),io.apply(this,t)}function oa(...t){return Es(this,"error",t),co.apply(this,t)}var ks={update:Vr,remove:Ur,getDB:uo,getQuery:po,getRootData:no,getChildren:Zn,getPath:to,nextElement:ao,previousElement:fo,verbose:Tr,warn:na,error:oa,variables:lo,spotByPath:Yn,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,s=this.parse();return this.remove(),e(s,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 s=n.lookdown?.(t);if(s)return s}return null},lookdownAll(t,e=[]){let r=this.__ref;if(!r?.__children)return e;for(let n of r.__children){let s=this[n];s&&(typeof t=="function"?t(s)&&e.push(s):typeof t=="string"&&s.key===t&&e.push(s),s.lookdownAll?.(t,e))}return e},getRef(){return this.__ref},getRoot:ro,getRootState:eo,getRootContext:oo,getContext:so,parse(t){let e={},r=t?new Set(t):null,n=this.__ref?.__exec;for(let s in this)if(!(s==="parent"||s==="node"||s==="__ref")&&!r?.has(s)){if(n&&n[s]!==void 0){e[s]=n[s];continue}typeof this[s]!="function"&&(e[s]=this[s])}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,o=>"-"+o.toLowerCase()),s=String(r).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,s,"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 sa(t){if(!t)return ks;let e=As.get(t);if(e)return e;e=Object.create(ks);let r=t.methods;if(r)for(let n in r)e[n]=r[n];return As.set(t,e),e}function zr(t){let e=sa(t.context);Object.setPrototypeOf(t,e)}V();$e();var ia=(t,e,r)=>{Object.defineProperty(t,e,{value:r,enumerable:!1,configurable:!0,writable:!0})},$t=(t,e)=>{if(G(e)){let s=e.__raw||e;e.toggle||Object.defineProperty(s,"toggle",{value:function(o,i={}){e[o]=!e[o]},enumerable:!1,configurable:!0}),e.set||Object.defineProperty(s,"set",{value:function(o,i={}){return e.clean({preventStateUpdate:!0}),typeof o=="object"&&o!==null&&e.update(o,i),e},enumerable:!1,configurable:!0}),Object.defineProperty(s,"setByPath",{value:function(o,i,c={}){let a=o.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(s,"getByPath",{value:function(o){let i=o.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(s,"removeByPath",{value:function(o,i={}){let c=o.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(s,"reset",{value:function(o={}){let i=e.parse();return e.set(i,o)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"apply",{value:function(o,i={}){if(typeof o=="function"){let c=o(e);return e.update(c,i)}},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"applyFunction",{value:function(o,i={}){if(typeof o=="function")return o(e),e.update(e.parse(),i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"rootUpdate",{value:function(o,i={}){let c=e;for(;c?.parent&&G(c.parent);)c=c.parent;return c.update(o,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"parentUpdate",{value:function(o,i={}){if(e.parent)return e.parent.update(o,i)},enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(s,"quietReplace",{value:function(o,i={}){return e.replace(o,{quiet:!0,...i})},enumerable:!1,configurable:!0,writable:!0}),Object.getOwnPropertyDescriptor(s,"root")||Object.defineProperty(s,"root",{get:function(){let o=e,i=G(o)?o:null;for(let c=0;c<64&&o?.parent&&o.parent!==o;c++)o=o.parent,G(o)&&(i=o);return i||o},enumerable:!1,configurable:!0});return}if(!e||typeof e!="object")return;let r=()=>{for(let s in e)Object.prototype.hasOwnProperty.call(e,s)&&delete e[s]},n={update(s){if(!s||typeof s!="object")return e;for(let o in s)e[o]=s[o];return e},apply(s){if(typeof s!="function")return e;let o=s(e);return o?e.update(o):e},parse(){return{...e}},toggle(s){return e[s]=!e[s],e},set(s){if(!s||typeof s!="object")return e;r();for(let o in s)e[o]=s[o];return e},replace(s){return e.set(s)},clean(){return r(),e}};for(let s in n)typeof e[s]!="function"&&ia(e,s,n[s])};var zh=new Proxy(Object.create(null),{get(){},has(){return!1}});V();var Hr={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 ca=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,_e=(t,e)=>e.startsWith("aria-")||e.startsWith("data-")||ca(e)||Hr.default.includes(e)?!0:Object.prototype.hasOwnProperty.call(Hr,t)?Hr[t].includes(e):!1;var He=(t,e)=>{let r=t.call("exec",e,t);if(r)return S(r)&&r.includes("{{")&&(r=t.call("replaceLiteralsWithObjectFields",r)),r},Os=(t,e)=>{let r=(t.preSrc||"")+(He(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 s=r.slice(8),o=n.assets&&(n.assets[r]||n.assets[s]);return o&&o.content?o.content.src:r}if(r.startsWith("/files/")){let s=r.slice(7),o=n.files&&(n.files[r]||n.files[s]);return o&&o.content?o.content.src:r}if(n.assets){let s=n.assets[r];if(s&&s.content)return s.content.src}if(n.files){let s=n.files[r];if(s&&s.content)return s.content.src}return r},Ts={src:t=>Os(t,t.src),href:t=>He(t,t.href),action:t=>He(t,t.action),poster:t=>Os(t,t.poster),data:t=>He(t,t.data)},$s=t=>{let e=t.tag||"div",r={};for(let n in Ts)if(t[n]!==void 0&&_e(e,n)){let s=Ts[n](t);s!==void 0&&(r[n]=s)}return r};var aa=1,Ke=[],Jr=!1;function fa(){Jr||(Jr=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(Xr):setTimeout(Xr,0))}function Xr(){if(Jr=!1,!Ke.length)return;let t=Ke.splice(0,Ke.length);for(let e=0;e<t.length;e++){let r=t[e];!r.node||!r.node.isConnected||kt("Mounted",r,r.__ref?.__mountOptions||{})}}function js(t,e){typeof t.onMounted=="function"&&(t.__ref.__mountOptions=e,Ke.push(t),fa())}function Ps(t,e){if(typeof t.onContentUpdate!="function")return;t.context?.plugins?.length&&mt("contentUpdate",t,e);let r=t.context?.designSystem;r&&z(r);try{t.onContentUpdate(t,t.state,t.context,e)}catch(n){if(t.context?.plugins?.length&&mt("error",t,{hook:"onContentUpdate",error:n})||console.error('[DOMQL] Lifecycle "onContentUpdate" error:',n),t.context?.strictMode)throw n}finally{r&&W()}}function qt(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function la(t){return t.charAt(2).toLowerCase()+t.slice(3)}function ua(t){return t.toLowerCase()}function Rs(t){let e=t.charCodeAt(0);return e===58||e===64||e===38}function Se(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=Se(s,o):r[n]=o}return r}function lt(t,e,r,n={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});let o=Object.create(null);o.key=r||t.key||`_${aa++}`,o.parent=e||null,o.context=t.context||e?.context||n.context||{},o.context.__create||(o.context.__create=lt);let i=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:e?.__ref?.root||o,path:e?.__ref?.path?[...e.__ref.path,o.key]:[o.key]};if(r&&!t.extends&&!t.extend){let g=r.indexOf("_");if(g>0){let b=r.substring(0,g),m=o.context?.components;m&&(m[b]||m["smbls."+b])&&(t={...t,extends:b})}}me(o,t,n);let c=new Set(["childProps","attr","style","scope","data"]),a=o.props&&typeof o.props=="object"?o.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],m=o[g],y=m&&b&&typeof m=="object"&&typeof b=="object"&&!Array.isArray(m)&&!Array.isArray(b)&&typeof m!="function"&&typeof b!="function";y&&g.charCodeAt(0)>=65&&g.charCodeAt(0)<=90?o[g]=Se(m,b):y&&c.has(g)?o[g]={...m,...b}:y&&Rs(g)?o[g]=Se(m,b):o[g]=b}function l(g){for(let b in g){let m=g[b],y=o[b],x=y&&m&&typeof y=="object"&&typeof m=="object"&&!Array.isArray(y)&&!Array.isArray(m)&&typeof y!="function"&&typeof m!="function";x&&b.charCodeAt(0)>=65&&b.charCodeAt(0)<=90?o[b]=Se(y,m):x&&c.has(b)?o[b]={...y,...m}:x&&Rs(b)?o[b]=Se(y,m):o[b]=m}}a&&l(a),t.props&&typeof t.props=="object"&&l(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);let f=o.scope&&typeof o.scope=="object"?o.scope:null,u=e?.scope,d=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,h=u||d||null;if(t.scope!==void 0||f){let g={};f&&Object.assign(g,f),t.scope!==void 0&&Object.assign(g,t.scope),o.scope=sr(g,h)}else h&&(o.scope=h);if(t.if!==void 0&&(o.if=t.if),zr(o),da(o,e,t),o.if!=null){let g;if(typeof o.if=="function")try{g=o.if(o,o.state,o.context)}catch(b){if(g=!1,i.__ifError=b,typeof console<"u"&&console.warn){let m=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${m} \u2014 treating as false:`,b?.message||b)}}else g=o.if;i.__if=!!g}if(i.__if)typeof o.if=="function"&&(i.__ifInitialized=!0);else return e&&(e[o.key]=o),typeof o.if=="function"&&Ls(o,i,o.if),o;o.tag||(o.tag=Jt(o)),kt("Init",o,n);let p=o.node=Xt(o);if(!p)return o;if(o.tag==="fragment"){let b=(o.context?.document||globalThis.document).createComment("");p.appendChild(b),i.__fragmentAnchor=b}kt("AttachNode",o,n),p.setAttribute&&o.key&&p.setAttribute("data-key",o.key),p.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&p.setAttribute("data-smbls-app",o.context.key),o.id&&p.setAttribute&&(p.id=o.id),Bs(o,n),Ms(o),Yr(o),Ns(o),_a(o);try{Us(o,n)}catch(g){if(typeof console<"u"&&console.error){let b=o.__ref?.path?.join(".")||o.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(tn(o,!0),en(o,e,s),e&&(e[o.key]=o,e.__ref?.__children&&(e.__ref.__children.includes(o.key)||e.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){let g=o.context?.designSystem;g&&z(g);try{let b=o.html(o,o.state,o.context);b!=null&&typeof b!="function"&&(o.node.innerHTML=b)}catch{}finally{g&&G()}}if(kt("Create",o,n),kt("Complete",o,n),kt("Render",o,n),kt("RenderRouter",o,n),js(o,n),typeof o.onFrame=="function"){let g=o.onFrame,b=o.context?.designSystem,m=()=>{if(o.node){if(o.node.isConnected){b&&z(b);try{g(o,o.state,o.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&G()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return o}function da(t,e,r){let n=!e,s=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,o=n&&s&&t.context?.state,i=r.state!==void 0&&!o?r.state:t.state&&!W(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,$t(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 h in u)a[h]===void 0&&(a[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&a[h]===void 0&&(a[h]=l.translations[h])}t.state=W(a)?a:ct(a),t.state.__element=t,t.state.root=t.state,$t(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),$t(t,t.state);return}if(typeof i=="string"){if(t.state=Fs(i,e),t.state&&typeof t.state=="object"&&!W(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}$t(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=W(c)?c:ct(c||{})}else W(i)?t.state=i:t.state=ct({...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,$t(t,t.state)}function Kr(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let s of r){if(n==null)return{};n=n[s]}return n??{}}function Fs(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let s=t.slice(3);return s?Kr(e.state,s):e.state??{}}if(t.startsWith("~/")){let s=e.state?.root||e.state,o=t.slice(2);return o?Kr(s,o):s??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Kr(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let s=e.state?.root?.lang||n.defaultLang||"en",o=n.translations[s];if(o?.[t]!==void 0)return o[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,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){let c=o[i];if(typeof t[c]!="function"||rt.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||qt(c)||ut[c]||st&&st.has(c)||_e(r,c)||s.push({prop:c,fn:t[c]})}for(let i=0;i<s.length;i++){let{prop:c,fn:a}=s[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){n&&z(n);try{return a(t,t.state,t.context)}catch{return}finally{n&&G()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Ms(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(pa(t),typeof t.text=="function"){let o=t.text,i=M(()=>{if(!r.contentManaged)try{let c=o(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=Te.call(t,c,t.state)),t.tag==="string"?t.node.nodeValue=c:t.node.textContent=c)}catch{}},{depth:r.path.length});r.__effects.push(i),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,i=M(()=>{if(r.contentManaged)return;let c=Te.call(t,o,t.state);c!=null&&(t.text=c),t.node&&(t.tag==="string"?t.node.nodeValue=c??"":t.node.textContent=c??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!rt.has(o)&&!qt(o)&&!r.__exec[o]){if(ut[o]){let i=t[o],c=o,a,l=M(()=>{let f=t.context?.designSystem;f&&z(f);try{let u=i(t,t.state,t.context),d=ut[c](u,t,t.state,t.context);if(d&&t.node){let h=Is(d);(h===null||h!==a)&&(a=h,Kt(t.node,d))}else t.node&&(c==="show"||c==="hide")&&(a=void 0,t.node.style.display="")}finally{f&&G()}},{depth:r.path.length});r.__effects.push(l),r.__exec[o]=i}else if(st&&st.has(o)){let i=t[o],c=o,a,l=M(()=>{let f=t.context?.designSystem;f&&z(f);try{let u=i(t,t.state,t.context);if(t.node)if(u!=null){let d=c+":"+String(u);d!==a&&(a=d,Kt(t.node,{[c]:u}))}else a=void 0,t.node.style[c]=""}finally{f&&G()}},{depth:r.path.length});r.__effects.push(l),r.__exec[o]=i}}if(typeof t.html=="function"){let o=t.html,i=M(()=>{let c=t.context?.designSystem;c&&z(c);try{let a=o(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{c&&G()}},{depth:r.path.length});r.__effects.push(i),r.__exec.html=o}if(typeof t.value=="function"){let o=t.value,i=M(()=>{try{let c=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=c==null?"":String(c);if(t.node.value===a)return;let l=typeof document<"u"&&document.activeElement===t.node,f=l&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=l&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,l&&f!=null&&u!=null)try{t.node.setSelectionRange(f,u)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(i),r.__exec.value=o}if(typeof t.style=="function"){let o=t.style,i,c=M(()=>{let a=o(t,t.state,t.context),l=Is(a);(l===null||l!==i)&&(i=l,Kt(t.node,a))},{depth:r.path.length});r.__effects.push(c),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let i=t.style[o];if(typeof i!="function")continue;let c,a=M(()=>{try{let l=i(t,t.state,t.context);if(t.node){let f=o+":"+String(l);f!==c&&(c=f,Kt(t.node,{[o]:l}))}}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let i=t.attr[o],c=o,a=M(()=>{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"&&t.node.setAttribute(c,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let i=t.aria[o];if(typeof i!="function")continue;let c="aria-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=M(()=>{try{let l=i(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)}if(t.data&&typeof t.data=="object")for(let o in t.data){let i=t.data[o];if(typeof i!="function")continue;let a="data-"+o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=M(()=>{try{let f=i(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(l)}let s=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(s)for(let o in s){let i=s[o];if(typeof i!="function")continue;let c=M(()=>{try{let a=i(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(c)}!n&&typeof t.if=="function"&&Ls(t,r,t.if);for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||rt.has(o)||typeof t[o]!="function")continue;let i=o.charCodeAt(0);if(i>=65&&i<=90||qt(o))continue;let c=t[o];r.__exec[o]=c;let a=t.tag||"div";if(_e(a,o)&&!ut[o]&&!(st&&st.has(o))){let l=o,f=M(()=>{try{let u=c(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(l):typeof u!="function"&&typeof u!="object"&&(l==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(l,u===!0?"":u)))}catch{}},{depth:r.path.length});r.__effects.push(f)}}if(ya(t),ma(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let o=t.onStateUpdate,i=t.stateDeps,c=!1,a=[],l=M(()=>{let f=[];for(let p=0;p<i.length;p++){let g=i[p];try{f[p]=typeof g=="function"?g(t,t.state,t.context):t.state?.[g]}catch{f[p]=void 0}}if(!c){c=!0,a=f;return}let u=f.length!==a.length;for(let p=0;!u&&p<f.length;p++)f[p]!==a[p]&&(u=!0);let d=a;if(a=f,!u)return;let h=t.context?.designSystem;h&&z(h);try{o(t,t.state,t.context,{prev:d,next:f})}catch(p){if(t.context?.plugins?.length&&mt("error",t,{hook:"onStateUpdate",error:p})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',p),t.context?.strictMode)throw p}finally{h&&G()}},{depth:r.path.length});r.__effects.push(l)}}function Ls(t,e,r){let n=M(()=>{let s;try{s=r(t,t.state,t.context)}catch(i){if(s=!1,e.__ifError=i,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,i?.message||i)}return}let o=e.__if;if(e.__if=!!s,o&&!e.__if&&t.node)t.node.remove();else if(!o&&e.__if)if(e.__ifInitialized){t.node||(t.node=Xt(t)),t.node&&(t.node.ref=t);let i=t.parent,c=i?.node;if(c&&t.node){let a=null,l=Object.keys(i),f=l.indexOf(t.key);for(let u=f+1;u<l.length;u++){let d=i[l[u]];if(d?.node?.parentNode===c){a=d.node;break}}a?c.insertBefore(t.node,a):c.appendChild(t.node)}else en(t,t.parent);Yr(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=Jt(t)),kt("Init",t,{}),t.node||(t.node=Xt(t)),!t.node)return;if(t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}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),Bs(t,{}),Ms(t,{skipIfEffect:!0}),Yr(t),Ns(t),Us(t,{}),en(t,t.parent),js(t,{})}},{depth:e.path.length});e.__effects.push(n)}function Yr(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),xa(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"&&Kt(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 s=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];s&&e.classList.add(typeof s=="string"?s:n)}}}}function Is(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Kt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let s=e[n];if(s!=null){if(n.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[n]=s;continue}try{let o=String(s),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=o.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&ga(t,r)}var ha=0;function ga(t,e){let r=`_ds${ha++}`;t.classList.add(r);let n=t.ownerDocument,s=n.querySelector("style[data-smbls-scoped]");s||(s=n.createElement("style"),s.setAttribute("data-smbls-scoped",""),n.head.appendChild(s));let o="";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 d in l){let h=l[d];if(typeof h=="object"){let p=d.includes("&")?a.split(", ").map(b=>d.replace(/&/g,b)).join(", "):a.split(", ").map(b=>`${b} ${d}`).join(", "),g="";for(let b in h)g+=`${b.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${h[b]};`;u+=`${p} { ${g} }
|
|
14
|
+
`):"")}}if(tn(o,!0),en(o,e,s),e&&(e[o.key]=o,e.__ref?.__children&&(e.__ref.__children.includes(o.key)||e.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){let g=o.context?.designSystem;g&&z(g);try{let b=o.html(o,o.state,o.context);b!=null&&typeof b!="function"&&(o.node.innerHTML=b)}catch{}finally{g&&W()}}if(kt("Create",o,n),kt("Complete",o,n),kt("Render",o,n),kt("RenderRouter",o,n),js(o,n),typeof o.onFrame=="function"){let g=o.onFrame,b=o.context?.designSystem,m=()=>{if(o.node){if(o.node.isConnected){b&&z(b);try{g(o,o.state,o.context)}catch(y){console.error("[DOMQL] onFrame error:",y)}finally{b&&W()}}requestAnimationFrame(m)}};requestAnimationFrame(m)}return o}function da(t,e,r){let n=!e,s=r.state&&typeof r.state=="object"&&!Array.isArray(r.state)&&Object.keys(r.state).length===0,o=n&&s&&t.context?.state,i=r.state!==void 0&&!o?r.state:t.state&&!G(t.state)?t.state:void 0;if(i==null){if(e?.state)t.state=e.state,$t(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 h in u)a[h]===void 0&&(a[h]=u[h]);let d=new Set(l.languages||[]);for(let h in l.translations)!d.has(h)&&a[h]===void 0&&(a[h]=l.translations[h])}t.state=G(a)?a:ct(a),t.state.__element=t,t.state.root=t.state,$t(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),$t(t,t.state);return}if(typeof i=="string"){if(t.state=Fs(i,e),t.state&&typeof t.state=="object"&&!G(t.state)){let c=e?.state?.root||e?.state||t.state;Object.defineProperty(t.state,"root",{value:c,enumerable:!1,configurable:!0,writable:!0})}$t(t,t.state);return}if(typeof i=="function"){let c=i(t,e?.state);t.state=G(c)?c:ct(c||{})}else G(i)?t.state=i:t.state=ct({...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,$t(t,t.state)}function Kr(t,e){if(!e)return t;let r=e.split("/"),n=t;for(let s of r){if(n==null)return{};n=n[s]}return n??{}}function Fs(t,e){if(!e)return{};if(t===".")return e.state||{};if(t.startsWith("../")){let s=t.slice(3);return s?Kr(e.state,s):e.state??{}}if(t.startsWith("~/")){let s=e.state?.root||e.state,o=t.slice(2);return o?Kr(s,o):s??{}}if(e.state?.[t]!==void 0)return e.state[t];let r=Kr(e.state,t);if(r!=null&&Object.keys(r).length>0)return r;let n=e.context?.polyglot;if(n?.translations){let s=e.state?.root?.lang||n.defaultLang||"en",o=n.translations[s];if(o?.[t]!==void 0)return o[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,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){let c=o[i];if(typeof t[c]!="function"||rt.has(c))continue;let a=c.charCodeAt(0);a>=65&&a<=90||qt(c)||ut[c]||st&&st.has(c)||_e(r,c)||s.push({prop:c,fn:t[c]})}for(let i=0;i<s.length;i++){let{prop:c,fn:a}=s[i];e.__exec[c]=a,Object.defineProperty(t,c,{get(){n&&z(n);try{return a(t,t.state,t.context)}catch{return}finally{n&&W()}},set(l){delete e.__exec[c],Object.defineProperty(t,c,{value:l,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function Ms(t,e){let r=t.__ref,n=!!(e&&e.skipIfEffect);if(pa(t),typeof t.text=="function"){let o=t.text,i=M(()=>{if(!r.contentManaged)try{let c=o(t,t.state,t.context);t.node&&c!=null&&typeof c!="function"&&typeof c!="object"&&(typeof c=="string"&&c.includes("{{")&&(c=Te.call(t,c,t.state)),t.tag==="string"?t.node.nodeValue=c:t.node.textContent=c)}catch{}},{depth:r.path.length});r.__effects.push(i),r.__exec.text=o}else if(typeof t.text=="string"&&t.text.includes("{{")){let o=t.text,i=M(()=>{if(r.contentManaged)return;let c=Te.call(t,o,t.state);c!=null&&(t.text=c),t.node&&(t.tag==="string"?t.node.nodeValue=c??"":t.node.textContent=c??"")},{depth:r.path.length});r.__effects.push(i),r.__exec.text=o}for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&typeof t[o]=="function"&&!rt.has(o)&&!qt(o)&&!r.__exec[o]){if(ut[o]){let i=t[o],c=o,a,l=M(()=>{let f=t.context?.designSystem;f&&z(f);try{let u=i(t,t.state,t.context),d=ut[c](u,t,t.state,t.context);if(d&&t.node){let h=Is(d);(h===null||h!==a)&&(a=h,Kt(t.node,d))}else t.node&&(c==="show"||c==="hide")&&(a=void 0,t.node.style.display="")}finally{f&&W()}},{depth:r.path.length});r.__effects.push(l),r.__exec[o]=i}else if(st&&st.has(o)){let i=t[o],c=o,a,l=M(()=>{let f=t.context?.designSystem;f&&z(f);try{let u=i(t,t.state,t.context);if(t.node)if(u!=null){let d=c+":"+String(u);d!==a&&(a=d,Kt(t.node,{[c]:u}))}else a=void 0,t.node.style[c]=""}finally{f&&W()}},{depth:r.path.length});r.__effects.push(l),r.__exec[o]=i}}if(typeof t.html=="function"){let o=t.html,i=M(()=>{let c=t.context?.designSystem;c&&z(c);try{let a=o(t,t.state,t.context);t.node&&a!=null&&typeof a!="function"&&(t.node.innerHTML=a)}finally{c&&W()}},{depth:r.path.length});r.__effects.push(i),r.__exec.html=o}if(typeof t.value=="function"){let o=t.value,i=M(()=>{try{let c=o(t,t.state,t.context);if(!t.node||!("value"in t.node))return;let a=c==null?"":String(c);if(t.node.value===a)return;let l=typeof document<"u"&&document.activeElement===t.node,f=l&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=l&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=a,l&&f!=null&&u!=null)try{t.node.setSelectionRange(f,u)}catch{}}catch{}},{depth:r.path.length});r.__effects.push(i),r.__exec.value=o}if(typeof t.style=="function"){let o=t.style,i,c=M(()=>{let a=o(t,t.state,t.context),l=Is(a);(l===null||l!==i)&&(i=l,Kt(t.node,a))},{depth:r.path.length});r.__effects.push(c),r.__exec.style=o}else if(t.style&&typeof t.style=="object")for(let o in t.style){let i=t.style[o];if(typeof i!="function")continue;let c,a=M(()=>{try{let l=i(t,t.state,t.context);if(t.node){let f=o+":"+String(l);f!==c&&(c=f,Kt(t.node,{[o]:l}))}}catch{}},{depth:r.path.length});r.__effects.push(a)}if(t.attr&&typeof t.attr=="object"){for(let o in t.attr)if(typeof t.attr[o]=="function"){let i=t.attr[o],c=o,a=M(()=>{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"&&t.node.setAttribute(c,l===!0?"":l))}catch{}},{depth:r.path.length});r.__effects.push(a)}}if(t.aria&&typeof t.aria=="object")for(let o in t.aria){let i=t.aria[o];if(typeof i!="function")continue;let c="aria-"+o.replace(/[A-Z]/g,l=>"-"+l.toLowerCase()),a=M(()=>{try{let l=i(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)}if(t.data&&typeof t.data=="object")for(let o in t.data){let i=t.data[o];if(typeof i!="function")continue;let a="data-"+o.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),l=M(()=>{try{let f=i(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(l)}let s=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(s)for(let o in s){let i=s[o];if(typeof i!="function")continue;let c=M(()=>{try{let a=i(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(c)}!n&&typeof t.if=="function"&&Ls(t,r,t.if);for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||rt.has(o)||typeof t[o]!="function")continue;let i=o.charCodeAt(0);if(i>=65&&i<=90||qt(o))continue;let c=t[o];r.__exec[o]=c;let a=t.tag||"div";if(_e(a,o)&&!ut[o]&&!(st&&st.has(o))){let l=o,f=M(()=>{try{let u=c(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(l):typeof u!="function"&&typeof u!="object"&&(l==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(l,u===!0?"":u)))}catch{}},{depth:r.path.length});r.__effects.push(f)}}if(ya(t),ma(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){let o=t.onStateUpdate,i=t.stateDeps,c=!1,a=[],l=M(()=>{let f=[];for(let p=0;p<i.length;p++){let g=i[p];try{f[p]=typeof g=="function"?g(t,t.state,t.context):t.state?.[g]}catch{f[p]=void 0}}if(!c){c=!0,a=f;return}let u=f.length!==a.length;for(let p=0;!u&&p<f.length;p++)f[p]!==a[p]&&(u=!0);let d=a;if(a=f,!u)return;let h=t.context?.designSystem;h&&z(h);try{o(t,t.state,t.context,{prev:d,next:f})}catch(p){if(t.context?.plugins?.length&&mt("error",t,{hook:"onStateUpdate",error:p})||console.error('[DOMQL] Lifecycle "onStateUpdate" error:',p),t.context?.strictMode)throw p}finally{h&&W()}},{depth:r.path.length});r.__effects.push(l)}}function Ls(t,e,r){let n=M(()=>{let s;try{s=r(t,t.state,t.context)}catch(i){if(s=!1,e.__ifError=i,typeof console<"u"&&console.warn){let c=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${c} \u2014 treating as false:`,i?.message||i)}return}let o=e.__if;if(e.__if=!!s,o&&!e.__if&&t.node)t.node.remove();else if(!o&&e.__if)if(e.__ifInitialized){t.node||(t.node=Xt(t)),t.node&&(t.node.ref=t);let i=t.parent,c=i?.node;if(c&&t.node){let a=null,l=Object.keys(i),f=l.indexOf(t.key);for(let u=f+1;u<l.length;u++){let d=i[l[u]];if(d?.node?.parentNode===c){a=d.node;break}}a?c.insertBefore(t.node,a):c.appendChild(t.node)}else en(t,t.parent);Yr(t)}else{if(e.__ifInitialized=!0,t.tag||(t.tag=Jt(t)),kt("Init",t,{}),t.node||(t.node=Xt(t)),!t.node)return;if(t.tag==="fragment"&&!e.__fragmentAnchor){let c=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(c),e.__fragmentAnchor=c}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),Bs(t,{}),Ms(t,{skipIfEffect:!0}),Yr(t),Ns(t),Us(t,{}),en(t,t.parent),js(t,{})}},{depth:e.path.length});e.__effects.push(n)}function Yr(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),xa(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"&&Kt(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 s=typeof r[n]=="function"?r[n](t,t.state,t.context):r[n];s&&e.classList.add(typeof s=="string"?s:n)}}}}function Is(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Kt(t,e){if(!t||!e||!t.style)return;let r=null;for(let n in e){let s=e[n];if(s!=null){if(n.charAt(0)==="&"&&typeof s=="object"){r||(r={}),r[n]=s;continue}try{let o=String(s),i=n.replace(/[A-Z]/g,f=>"-"+f.toLowerCase()),c=o.trim(),a=/\s*!important\s*$/.test(c),l=c.replace(/\s*!important\s*$/,"");t.style.setProperty(i,l,a?"important":"")}catch{}}}r&&ga(t,r)}var ha=0;function ga(t,e){let r=`_ds${ha++}`;t.classList.add(r);let n=t.ownerDocument,s=n.querySelector("style[data-smbls-scoped]");s||(s=n.createElement("style"),s.setAttribute("data-smbls-scoped",""),n.head.appendChild(s));let o="";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 d in l){let h=l[d];if(typeof h=="object"){let p=d.includes("&")?a.split(", ").map(b=>d.replace(/&/g,b)).join(", "):a.split(", ").map(b=>`${b} ${d}`).join(", "),g="";for(let b in h)g+=`${b.replace(/[A-Z]/g,m=>"-"+m.toLowerCase())}: ${h[b]};`;u+=`${p} { ${g} }
|
|
15
15
|
`}else f+=`${d.replace(/[A-Z]/g,p=>"-"+p.toLowerCase())}: ${h};`}f&&(o+=`${a} { ${f} }
|
|
16
|
-
`),u&&(o+=u)}}o&&(s.textContent+=o)}function ya(t){let e=t.subscribeTo;if(!Array.isArray(e)||e.length===0)return;let r=t.__ref;for(let n=0;n<e.length;n++){let s=e[n];if(typeof s!="string"||s.length===0)continue;let o=s.split("."),i=o[0],c=o.slice(1),a={value:!1},l=M(()=>{let f=t.state&&(W(t.state)?t.state.root:null);if(!f||!W(f))return;let u=f;u=u[i];for(let h=0;h<c.length&&!(u==null||typeof u!="object");h++)if(W(u))u=u[c[h]];else break;if(!a.value)return;let d=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&z(h);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(d=!0)}catch(p){t.context?.plugins?.length&&mt("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}finally{h&&G()}}if(!d&&t.node&&r.__effects)for(let h=0;h<r.__effects.length;h++){let p=r.__effects[h];p&&p!==l&&!p._disposed&&!p._isSubscribeToEffect&&typeof p._execute=="function"&&p._execute()}if(!d&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&z(h);try{t.onUpdate(t,t.state,t.context)}catch(p){t.context?.plugins?.length&&mt("error",t,{hook:"onUpdate",error:p})||console.error("[DOMQL] subscribeTo onUpdate error:",p)}finally{h&&G()}}},{depth:r.path.length});a.value=!0,l._isSubscribeToEffect=!0,r.__effects.push(l)}}function rn(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Qt(t,e,r){let n={},s=(o,i)=>{if(ut[o]){let c=ut[o](i,e,e.state,e.context);if(c){let a=Array.isArray(c)?c:[c];for(let l of a)l&&Object.assign(n,l)}}else n[o]=i};for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let i=t[o];if(typeof i=="function"&&(i=i(e,e.state,e.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(o==="style"){for(let l in i){let f=i[l];typeof f=="function"&&(f=f(e,e.state,e.context)),!(f==null||typeof f=="function")&&s(l,f)}continue}if(rn(o,e)){let l=Qt(i,e,!0);Object.keys(l).length&&(n[`[data-theme="${o.slice(1)}"] &`]=l);continue}let c=o;if(o.charCodeAt(0)===64&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){let l=e.context?.designSystem?.media?.[o.slice(1)];l&&(c=`@media ${l}`)}let a=Qt(i,e,!1);Object.keys(a).length&&(n[c]=a);continue}s(o,i)}}if(r)for(let o in n){let i=n[o];typeof i=="string"&&!i.includes("!important")&&(n[o]=i+" !important")}return n}function ma(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=n.charAt(0);if(s!=="."&&s!=="!")continue;let o=n.slice(1);if(!o)continue;let i=t[n];if(!i||typeof i!="object")continue;let c=s==="!",a={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{if(!t.node)return;let u,d=t[o];if(d===void 0)if(t.state&&o in t.state)u=t.state[o];else{let g=t.context?.cases?.[o];if(g===void 0)return;try{u=typeof g=="function"?g.call(t,t):g}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(g){u=!1,e.__conditionalError=g,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,g?.message||g)}else u=d;let h=c?!u:!!u;if(h===a.lastMatch)return;a.lastMatch=h;let p=t.context?.designSystem;p&&z(p);try{if(h){let g={},b={},m=!1;for(let x in i){if(!Object.prototype.hasOwnProperty.call(i,x))continue;let _=i[x],w=x.charAt(0);if((w===":"||w==="@"||w==="&")&&_&&typeof _=="object"&&!Array.isArray(_)){if(rn(x,t)){let T=Qt(_,t,!0);Object.keys(T).length&&(b[`[data-theme="${x.slice(1)}"] &`]=T,m=!0)}else{let T=x;if(w==="@"&&!x.startsWith("@media")&&!x.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[x.slice(1)];D&&(T=`@media ${D}`)}let X=Qt(_,t,!1);Object.keys(X).length&&(b[T]=X,m=!0)}continue}let R=typeof _=="function"?_(t,t.state,t.context):_;if(R!=null)if(ut[x]){let T=ut[x](R,t,t.state,t.context);if(T){let X=Array.isArray(T)?T:[T];for(let D of X)D&&Object.assign(g,D)}}else st&&st.has(x)&&(g[x]=R)}let y=Object.keys(g);if(y.length){Kt(t.node,g);for(let x of y)r.set(x,n);a.appliedKeys=y}else a.appliedKeys=null;if(m){let x=xe(b,null,t.context?.cssPrefix),_=x?x.split(" ").filter(Boolean):[];if(_.length&&t.node.classList){for(let w of _)t.node.classList.add(w);a.appliedClasses=_}else a.appliedClasses=null}else if(a.appliedClasses){for(let x of a.appliedClasses)t.node.classList.remove(x);a.appliedClasses=null}}else{if(a.appliedKeys){for(let g of a.appliedKeys)r.get(g)===n&&(t.node.style[g]="",r.delete(g));a.appliedKeys=null}if(a.appliedClasses){for(let g of a.appliedClasses)t.node.classList.remove(g);a.appliedClasses=null}}}finally{p&&G()}};e.__conditionalRunners.push(l);let f=M(l,{depth:e.path.length});e.__effects.push(f)}}var qr=new WeakSet;function ba(t){let e=t.ownerDocument;!e||qr.has(e)||(qr.add(e),queueMicrotask(()=>{qr.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Qr=new WeakSet,Ds=!1;function xa(t){let{node:e}=t;if(!e)return;if(Ds||(Ds=!0,xe({display:"none"})),Qr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Qr.add(t);let r=t.context?.designSystem;r&&z(r);try{let n={},s=!1;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||rt.has(o))continue;let i=o.charCodeAt(0);if(!(i>=65&&i<=90)&&!qt(o)){if(ut[o]){let c=t[o],a=ut[o](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);s=!0}}else if(st&&st.has(o)){let c=t[o];c!=null&&typeof c!="object"&&(n[o]=c,s=!0)}else if(o.charCodeAt(0)===45){let c=t[o];c!=null&&typeof c!="object"&&(n[o]=c,s=!0)}else if(o.charAt(0)==="&"){let c=t[o];c&&typeof c=="object"&&(n[o]=c,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){let c=t[o];if(c&&typeof c=="object"){if(rn(o,t)){let a=Qt(c,t,!0);Object.keys(a).length&&(n[`[data-theme="${o.slice(1)}"] &`]=a,s=!0)}else{let a=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){let f=t.context?.designSystem?.media?.[o.slice(1)];f&&(a=`@media ${f}`)}let l=Qt(c,t,!1);Object.keys(l).length&&(n[a]=l,s=!0)}s=!0}}}}if(s){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let o=xe(n,null,t.context?.cssPrefix);if(o&&e.classList){let c=o.split(" ").filter(Boolean),a=!1;for(let l of c)e.classList.add(l),a||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(a=!0);a&&ba(e)}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&&G(),Qr.delete(t)}}function Ns(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let s in t.aria){let o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;let i="aria-"+s.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.setAttribute(i,o===!0?"":o)}let r=$s(t);for(let s in r){let o=r[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&e.setAttribute(s,o===!0?"":o)}let n=t.tag||"div";for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||rt.has(s)||s==="on"||r[s]!==void 0)continue;let o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!qt(s)&&!(ut[s]||st&&st.has(s))&&_e(n,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=Te(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(s,i===!0?"":i)}}}function _a(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.autoGrow,n=r&&typeof r=="object"&&r.max?String(r.max):null;n&&(e.style.maxHeight=n);let s=()=>{e.style.height="auto",e.style.height=e.scrollHeight+"px"};s(),e.addEventListener("input",s),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("input",s)}catch{}})}var Vs=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Bs(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!qt(r)||Vs.has(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let o=n;n=function(c){return t.call(o,c)}}if(typeof n!="function")continue;let s=la(r);Yt.has(s)||ye(ua(s),t,n)}Sa(t)}function Sa(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of Vs){let h=t[d];typeof h=="function"&&(r[d]=h,n=!0)}if(!n)return;let s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,c=0,a=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,c=h.clientY,a=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let p=h.clientX-i,g=h.clientY-c,b=Date.now()-a;if(b>o)return;let m=Math.abs(p),y=Math.abs(g);if(Math.max(m,y)<s)return;let x;if(m>y*1.2)x=p<0?"left":"right";else if(y>m*1.2)x=g<0?"up":"down";else return;let _="onSwipe"+x.charAt(0).toUpperCase()+x.slice(1),w=r[_],R=r.onSwipe;w&&w.call(t,d,t,t.state,t.context),R&&R.call(t,{direction:x,dx:p,dy:g,dt:b,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function qe(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=qe(s,o):r[n]=o}return r}function Zr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",o=t.context?.document||globalThis.document,i=s?null:o?.createDocumentFragment();if(!s&&!i)return;let c=t.childProps,a=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=c;if(typeof c=="function")try{d=c(t,f)}catch{d=null}if(a==="state"){let g=u;(typeof u=="string"||typeof u=="number")&&(g={value:u,text:u}),f=d?{...d,state:g}:{state:g}}else d&&(f=qe(d,f));if(n&&!f.ignoreChildExtends)if(f.extends){let g=Array.isArray(f.extends)?f.extends:[f.extends],b=Array.isArray(n)?n:[n];f={...f,extends:[...b,...g]}}else f={...f,extends:n};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,p=lt(f,t,h,r);!s&&p?.node&&i.appendChild(p.node)}s||t.node.appendChild(i);return}if(typeof e=="string"){let s=Fs(e,t);if(Array.isArray(s)){Zr(t,s,r);return}}if(typeof e=="object")for(let s in e){if(rt.has(s))continue;let o=e[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=qe(t.childProps,o)),n&&!o.ignoreChildExtends)if(o.extends){let i=Array.isArray(o.extends)?o.extends:[o.extends],c=Array.isArray(n)?n:[n];o={...o,extends:[...c,...i]}}else o={...o,extends:n};lt(o,t,s,r)}}}function tn(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let s=t.__ref,o=s&&s.__exec&&s.__exec.value,i=typeof o=="function",c=t.value!=null&&typeof t.value!="function";if(i||c){let f;if(i)try{f=o(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let a=e||!(s&&s.__selectSynced);if(s&&(s.__selectSynced=!0),!a)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Us(t,e){let{children:r,content:n}=t,s=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=M(()=>{let f=i(t,t.state,t.context);if(!a){a=!0;return}if(f===t.children)return;t.children=f;let u=typeof t.onContentUpdate=="function",d=u?[]:null,h=u?[]:null,p=u?[]:null;if(Array.isArray(f)&&t.childrenAs==="state"){let y=t.childProps,x=[],_=new Map;for(let j=0;j<f.length;j++){let H=f[j],$=y;if(typeof y=="function")try{$=y(t,H)}catch{$=null}let q=$&&$.key||H&&H.key||`${j}`;x.push(q),_.set(q,{rawChild:H,childProps:$})}let w=new Set(x),R=c.__children.slice();for(let j of R)if(!w.has(j)){let H=t[j];H?.remove&&H.remove(),delete t[j],h&&h.push(j)}let T=t.childExtends,X=t.tag==="fragment",D=t.context?.document||globalThis.document,K=X?null:D?.createDocumentFragment();for(let j of x){let H=_.get(j),$=H.rawChild,q=t[j];if(q&&q.state){if($&&typeof $=="object"){let ot=q.state;if(typeof ot.replace=="function")ot.replace($);else if(typeof ot.update=="function"){for(let et in ot)if(!(et==="__element"||et==="root"||et==="parent"||et==="update")&&!Object.prototype.hasOwnProperty.call($,et))try{ot[et]=void 0}catch{}ot.update($)}else for(let et in $)ot[et]=$[et]}p&&p.push(j);continue}let Y=$;(typeof $=="string"||typeof $=="number")&&(Y={value:$,text:$});let nt=H.childProps,F=nt?{...nt,state:Y}:{state:Y};if(T&&!F.ignoreChildExtends)if(F.extends){let ot=Array.isArray(F.extends)?F.extends:[F.extends],et=Array.isArray(T)?T:[T];F={...F,extends:[...et,...ot]}}else F={...F,extends:T};let Pt=lt(F,t,j,e);!X&&Pt?.node&&K&&K.appendChild(Pt.node),d&&d.push(j)}!X&&K&&K.childNodes.length&&t.node&&t.node.appendChild(K),c.__children=x,u&&(d.length||h.length)&&Ps(t,{added:d,removed:h,kept:p}),tn(t,!1);return}let m=u?[...c.__children]:null;for(let y of[...c.__children]){let x=t[y];x?.remove&&x.remove(),delete t[y]}c.__children=[],Zr(t,f,e),tn(t,!1),u&&Ps(t,{added:[...c.__children],removed:m,kept:[]})},{depth:c.path.length});c.__effects.push(l)}if(Zr(t,r||n,e),r||n)return;let o=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 d=i[u],h=d.charCodeAt(0);if(h>=65&&h<=90||rt.has(d)||typeof t[d]=="function"&&(d.startsWith("on")||d.startsWith(".")))break;let p=t[d];p!==void 0&&(f[d]=p,delete t[d])}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)||rt.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=o[i]||o[`smbls.${i}`];l&&(a={...a,extends:l})}if(t.childProps&&(a=qe(t.childProps,a)),s&&!a.ignoreChildExtends)if(a.extends){let l=Array.isArray(a.extends)?a.extends:[a.extends],f=Array.isArray(s)?s:[s];a={...a,extends:[...f,...l]}}else a={...a,extends:s};lt(a,t,i,e)}}}function en(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let s=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(s){let i=s.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let c=r.node.nextSibling;i.insertBefore(n,c||s)}else i.insertBefore(n,s);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 i=r.node.nextSibling;i?o.insertBefore(n,i):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&&mt(n,e,r);let s="on"+t,o=e[s];if(typeof o=="function"){let i=t==="Render"||t==="RenderRouter";if(i){if(e.__ref.__inRender)return!0;e.__ref.__inRender=!0}let c=e.context?.designSystem;c&&z(c);try{if(o(e,e.state,e.context,r)===!1)return!1}catch(a){if(e.context?.plugins?.length&&mt("error",e,{hook:s,error:a})||console.error(`[DOMQL] Lifecycle "${s}" error:`,a),e.context?.strictMode)throw a}finally{c&&G(),i&&(e.__ref.__inRender=!1)}}return!0}var wa=lt;var Ca=(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?ct(r.state):void 0;return lt(t,e,"Root",{state:n,context:r.context||{}})};return Js(va);})();
|
|
16
|
+
`),u&&(o+=u)}}o&&(s.textContent+=o)}function ya(t){let e=t.subscribeTo;if(!Array.isArray(e)||e.length===0)return;let r=t.__ref;for(let n=0;n<e.length;n++){let s=e[n];if(typeof s!="string"||s.length===0)continue;let o=s.split("."),i=o[0],c=o.slice(1),a={value:!1},l=M(()=>{let f=t.state&&(G(t.state)?t.state.root:null);if(!f||!G(f))return;let u=f;u=u[i];for(let h=0;h<c.length&&!(u==null||typeof u!="object");h++)if(G(u))u=u[c[h]];else break;if(!a.value)return;let d=!1;if(typeof t.onBeforeUpdate=="function"){let h=t.context?.designSystem;h&&z(h);try{t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0})===!1&&(d=!0)}catch(p){t.context?.plugins?.length&&mt("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}finally{h&&W()}}if(!d&&t.node&&r.__effects)for(let h=0;h<r.__effects.length;h++){let p=r.__effects[h];p&&p!==l&&!p._disposed&&!p._isSubscribeToEffect&&typeof p._execute=="function"&&p._execute()}if(!d&&typeof t.onUpdate=="function"){let h=t.context?.designSystem;h&&z(h);try{t.onUpdate(t,t.state,t.context)}catch(p){t.context?.plugins?.length&&mt("error",t,{hook:"onUpdate",error:p})||console.error("[DOMQL] subscribeTo onUpdate error:",p)}finally{h&&W()}}},{depth:r.path.length});a.value=!0,l._isSubscribeToEffect=!0,r.__effects.push(l)}}function rn(t,e){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&(t==="@dark"||t==="@light"||!e.context?.designSystem?.media?.[t.slice(1)])}function Qt(t,e,r){let n={},s=(o,i)=>{if(ut[o]){let c=ut[o](i,e,e.state,e.context);if(c){let a=Array.isArray(c)?c:[c];for(let l of a)l&&Object.assign(n,l)}}else n[o]=i};for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let i=t[o];if(typeof i=="function"&&(i=i(e,e.state,e.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(o==="style"){for(let l in i){let f=i[l];typeof f=="function"&&(f=f(e,e.state,e.context)),!(f==null||typeof f=="function")&&s(l,f)}continue}if(rn(o,e)){let l=Qt(i,e,!0);Object.keys(l).length&&(n[`[data-theme="${o.slice(1)}"] &`]=l);continue}let c=o;if(o.charCodeAt(0)===64&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){let l=e.context?.designSystem?.media?.[o.slice(1)];l&&(c=`@media ${l}`)}let a=Qt(i,e,!1);Object.keys(a).length&&(n[c]=a);continue}s(o,i)}}if(r)for(let o in n){let i=n[o];typeof i=="string"&&!i.includes("!important")&&(n[o]=i+" !important")}return n}function ma(t){let e=t.__ref;e.__conditionalRunners=[];let r=new Map;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=n.charAt(0);if(s!=="."&&s!=="!")continue;let o=n.slice(1);if(!o)continue;let i=t[n];if(!i||typeof i!="object")continue;let c=s==="!",a={lastMatch:!1,appliedKeys:null,appliedClasses:null},l=()=>{if(!t.node)return;let u,d=t[o];if(d===void 0)if(t.state&&o in t.state)u=t.state[o];else{let g=t.context?.cases?.[o];if(g===void 0)return;try{u=typeof g=="function"?g.call(t,t):g}catch(b){u=!1,e.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}}else if(typeof d=="function")try{u=d(t,t.state,t.context)}catch(g){u=!1,e.__conditionalError=g,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${n}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,g?.message||g)}else u=d;let h=c?!u:!!u;if(h===a.lastMatch)return;a.lastMatch=h;let p=t.context?.designSystem;p&&z(p);try{if(h){let g={},b={},m=!1;for(let x in i){if(!Object.prototype.hasOwnProperty.call(i,x))continue;let _=i[x],w=x.charAt(0);if((w===":"||w==="@"||w==="&")&&_&&typeof _=="object"&&!Array.isArray(_)){if(rn(x,t)){let T=Qt(_,t,!0);Object.keys(T).length&&(b[`[data-theme="${x.slice(1)}"] &`]=T,m=!0)}else{let T=x;if(w==="@"&&!x.startsWith("@media")&&!x.startsWith("@keyframes")){let D=t.context?.designSystem?.media?.[x.slice(1)];D&&(T=`@media ${D}`)}let X=Qt(_,t,!1);Object.keys(X).length&&(b[T]=X,m=!0)}continue}let R=typeof _=="function"?_(t,t.state,t.context):_;if(R!=null)if(ut[x]){let T=ut[x](R,t,t.state,t.context);if(T){let X=Array.isArray(T)?T:[T];for(let D of X)D&&Object.assign(g,D)}}else st&&st.has(x)&&(g[x]=R)}let y=Object.keys(g);if(y.length){Kt(t.node,g);for(let x of y)r.set(x,n);a.appliedKeys=y}else a.appliedKeys=null;if(m){let x=xe(b,null,t.context?.cssPrefix),_=x?x.split(" ").filter(Boolean):[];if(_.length&&t.node.classList){for(let w of _)t.node.classList.add(w);a.appliedClasses=_}else a.appliedClasses=null}else if(a.appliedClasses){for(let x of a.appliedClasses)t.node.classList.remove(x);a.appliedClasses=null}}else{if(a.appliedKeys){for(let g of a.appliedKeys)r.get(g)===n&&(t.node.style[g]="",r.delete(g));a.appliedKeys=null}if(a.appliedClasses){for(let g of a.appliedClasses)t.node.classList.remove(g);a.appliedClasses=null}}}finally{p&&W()}};e.__conditionalRunners.push(l);let f=M(l,{depth:e.path.length});e.__effects.push(f)}}var qr=new WeakSet;function ba(t){let e=t.ownerDocument;!e||qr.has(e)||(qr.add(e),queueMicrotask(()=>{qr.delete(e);let r=e.body||e.documentElement;r&&r.offsetWidth}))}var Qr=new WeakSet,Ds=!1;function xa(t){let{node:e}=t;if(!e)return;if(Ds||(Ds=!0,xe({display:"none"})),Qr.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Qr.add(t);let r=t.context?.designSystem;r&&z(r);try{let n={},s=!1;for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||rt.has(o))continue;let i=o.charCodeAt(0);if(!(i>=65&&i<=90)&&!qt(o)){if(ut[o]){let c=t[o],a=ut[o](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);s=!0}}else if(st&&st.has(o)){let c=t[o];c!=null&&typeof c!="object"&&(n[o]=c,s=!0)}else if(o.charCodeAt(0)===45){let c=t[o];c!=null&&typeof c!="object"&&(n[o]=c,s=!0)}else if(o.charAt(0)==="&"){let c=t[o];c&&typeof c=="object"&&(n[o]=c,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){let c=t[o];if(c&&typeof c=="object"){if(rn(o,t)){let a=Qt(c,t,!0);Object.keys(a).length&&(n[`[data-theme="${o.slice(1)}"] &`]=a,s=!0)}else{let a=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){let f=t.context?.designSystem?.media?.[o.slice(1)];f&&(a=`@media ${f}`)}let l=Qt(c,t,!1);Object.keys(l).length&&(n[a]=l,s=!0)}s=!0}}}}if(s){n.display&&String(n.display).includes("!important")&&(e.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);let o=xe(n,null,t.context?.cssPrefix);if(o&&e.classList){let c=o.split(" ").filter(Boolean),a=!1;for(let l of c)e.classList.add(l),a||(l.charCodeAt(0)===95&&l.charCodeAt(1)===99||l.charCodeAt(0)===95&&l.indexOf("_c",1)!==-1)&&(a=!0);a&&ba(e)}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&&W(),Qr.delete(t)}}function Ns(t){let{node:e}=t;if(!e||!e.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(let s in t.aria){let o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;let i="aria-"+s.replace(/[A-Z]/g,c=>"-"+c.toLowerCase());e.setAttribute(i,o===!0?"":o)}let r=$s(t);for(let s in r){let o=r[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&e.setAttribute(s,o===!0?"":o)}let n=t.tag||"div";for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||rt.has(s)||s==="on"||r[s]!==void 0)continue;let o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!qt(s)&&!(ut[s]||st&&st.has(s))&&_e(n,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=Te(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;e.setAttribute(s,i===!0?"":i)}}}function _a(t){if(!t.autoGrow)return;let e=t.node;if(!e||e.tagName!=="TEXTAREA")return;let r=t.autoGrow,n=r&&typeof r=="object"&&r.max?String(r.max):null;n&&(e.style.maxHeight=n);let s=()=>{e.style.height="auto",e.style.height=e.scrollHeight+"px"};s(),e.addEventListener("input",s),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("input",s)}catch{}})}var Vs=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Bs(t,e){for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||!qt(r)||Vs.has(r))continue;let n=t[r];if(typeof n=="string"&&/^[A-Za-z_$][\w$]*$/.test(n)){let o=n;n=function(c){return t.call(o,c)}}if(typeof n!="function")continue;let s=la(r);Yt.has(s)||ye(ua(s),t,n)}Sa(t)}function Sa(t){let e=t.node;if(!e||!e.addEventListener)return;let r={},n=!1;for(let d of Vs){let h=t[d];typeof h=="function"&&(r[d]=h,n=!0)}if(!n)return;let s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600,i=0,c=0,a=0,l=!1,f=d=>{let h=d.touches&&d.touches[0]||d.changedTouches&&d.changedTouches[0];h&&(i=h.clientX,c=h.clientY,a=Date.now(),l=!0)},u=d=>{if(!l)return;l=!1;let h=d.changedTouches&&d.changedTouches[0]||d.touches&&d.touches[0];if(!h)return;let p=h.clientX-i,g=h.clientY-c,b=Date.now()-a;if(b>o)return;let m=Math.abs(p),y=Math.abs(g);if(Math.max(m,y)<s)return;let x;if(m>y*1.2)x=p<0?"left":"right";else if(y>m*1.2)x=g<0?"up":"down";else return;let _="onSwipe"+x.charAt(0).toUpperCase()+x.slice(1),w=r[_],R=r.onSwipe;w&&w.call(t,d,t,t.state,t.context),R&&R.call(t,{direction:x,dx:p,dy:g,dt:b,event:d},t,t.state,t.context)};e.addEventListener("touchstart",f,{passive:!0}),e.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{e.removeEventListener("touchstart",f)}catch{}try{e.removeEventListener("touchend",u)}catch{}})}function qe(t,e){let r={...t};for(let n in e){let s=r[n],o=e[n];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?r[n]=qe(s,o):r[n]=o}return r}function Zr(t,e,r){if(!e||!t.node)return;let n=t.childExtends;if(Array.isArray(e)){let s=t.tag==="fragment",o=t.context?.document||globalThis.document,i=s?null:o?.createDocumentFragment();if(!s&&!i)return;let c=t.childProps,a=t.childrenAs;for(let l=0;l<e.length;l++){let f=e[l],u=f;(typeof f=="string"||typeof f=="number")&&(f={text:f});let d=c;if(typeof c=="function")try{d=c(t,f)}catch{d=null}if(a==="state"){let g=u;(typeof u=="string"||typeof u=="number")&&(g={value:u,text:u}),f=d?{...d,state:g}:{state:g}}else d&&(f=qe(d,f));if(n&&!f.ignoreChildExtends)if(f.extends){let g=Array.isArray(f.extends)?f.extends:[f.extends],b=Array.isArray(n)?n:[n];f={...f,extends:[...b,...g]}}else f={...f,extends:n};let h=f?.key||u&&typeof u=="object"&&u.key||`${l}`,p=lt(f,t,h,r);!s&&p?.node&&i.appendChild(p.node)}s||t.node.appendChild(i);return}if(typeof e=="string"){let s=Fs(e,t);if(Array.isArray(s)){Zr(t,s,r);return}}if(typeof e=="object")for(let s in e){if(rt.has(s))continue;let o=e[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=qe(t.childProps,o)),n&&!o.ignoreChildExtends)if(o.extends){let i=Array.isArray(o.extends)?o.extends:[o.extends],c=Array.isArray(n)?n:[n];o={...o,extends:[...c,...i]}}else o={...o,extends:n};lt(o,t,s,r)}}}function tn(t,e){let r=t.node;if(!r||r.tagName!=="SELECT")return;let n=r.options;if(!n||!n.length)return;let s=t.__ref,o=s&&s.__exec&&s.__exec.value,i=typeof o=="function",c=t.value!=null&&typeof t.value!="function";if(i||c){let f;if(i)try{f=o(t,t.state,t.context)}catch{return}else f=t.value;let u=f==null?"":String(f);r.value!==u&&(r.value=u);return}let a=e||!(s&&s.__selectSynced);if(s&&(s.__selectSynced=!0),!a)return;let l=-1;for(let f=0;f<n.length;f++)n[f].defaultSelected&&(l=f);l>=0&&r.selectedIndex!==l&&(r.selectedIndex=l)}function Us(t,e){let{children:r,content:n}=t,s=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=M(()=>{let f=i(t,t.state,t.context);if(!a){a=!0;return}if(f===t.children)return;t.children=f;let u=typeof t.onContentUpdate=="function",d=u?[]:null,h=u?[]:null,p=u?[]:null;if(Array.isArray(f)&&t.childrenAs==="state"){let y=t.childProps,x=[],_=new Map;for(let j=0;j<f.length;j++){let H=f[j],$=y;if(typeof y=="function")try{$=y(t,H)}catch{$=null}let q=$&&$.key||H&&H.key||`${j}`;x.push(q),_.set(q,{rawChild:H,childProps:$})}let w=new Set(x),R=c.__children.slice();for(let j of R)if(!w.has(j)){let H=t[j];H?.remove&&H.remove(),delete t[j],h&&h.push(j)}let T=t.childExtends,X=t.tag==="fragment",D=t.context?.document||globalThis.document,K=X?null:D?.createDocumentFragment();for(let j of x){let H=_.get(j),$=H.rawChild,q=t[j];if(q&&q.state){if($&&typeof $=="object"){let ot=q.state;if(typeof ot.replace=="function")ot.replace($);else if(typeof ot.update=="function"){for(let et in ot)if(!(et==="__element"||et==="root"||et==="parent"||et==="update")&&!Object.prototype.hasOwnProperty.call($,et))try{ot[et]=void 0}catch{}ot.update($)}else for(let et in $)ot[et]=$[et]}p&&p.push(j);continue}let Y=$;(typeof $=="string"||typeof $=="number")&&(Y={value:$,text:$});let nt=H.childProps,F=nt?{...nt,state:Y}:{state:Y};if(T&&!F.ignoreChildExtends)if(F.extends){let ot=Array.isArray(F.extends)?F.extends:[F.extends],et=Array.isArray(T)?T:[T];F={...F,extends:[...et,...ot]}}else F={...F,extends:T};let Pt=lt(F,t,j,e);!X&&Pt?.node&&K&&K.appendChild(Pt.node),d&&d.push(j)}!X&&K&&K.childNodes.length&&t.node&&t.node.appendChild(K),c.__children=x,u&&(d.length||h.length)&&Ps(t,{added:d,removed:h,kept:p}),tn(t,!1);return}let m=u?[...c.__children]:null;for(let y of[...c.__children]){let x=t[y];x?.remove&&x.remove(),delete t[y]}c.__children=[],Zr(t,f,e),tn(t,!1),u&&Ps(t,{added:[...c.__children],removed:m,kept:[]})},{depth:c.path.length});c.__effects.push(l)}if(Zr(t,r||n,e),r||n)return;let o=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 d=i[u],h=d.charCodeAt(0);if(h>=65&&h<=90||rt.has(d)||typeof t[d]=="function"&&(d.startsWith("on")||d.startsWith(".")))break;let p=t[d];p!==void 0&&(f[d]=p,delete t[d])}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)||rt.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=o[i]||o[`smbls.${i}`];l&&(a={...a,extends:l})}if(t.childProps&&(a=qe(t.childProps,a)),s&&!a.ignoreChildExtends)if(a.extends){let l=Array.isArray(a.extends)?a.extends:[a.extends],f=Array.isArray(s)?s:[s];a={...a,extends:[...f,...l]}}else a={...a,extends:s};lt(a,t,i,e)}}}function en(t,e,r){let{node:n}=t;if(!n)return;n.ref=t;let s=e?.tag==="fragment"?e.__ref?.__fragmentAnchor:null;if(s){let i=s.parentNode;if(i){if(r?.position==="before"&&r.node)i.insertBefore(n,r.node);else if(r?.position==="after"&&r.node){let c=r.node.nextSibling;i.insertBefore(n,c||s)}else i.insertBefore(n,s);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 i=r.node.nextSibling;i?o.insertBefore(n,i):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&&mt(n,e,r);let s="on"+t,o=e[s];if(typeof o=="function"){let i=t==="Render"||t==="RenderRouter";if(i){if(e.__ref.__inRender)return!0;e.__ref.__inRender=!0}let c=e.context?.designSystem;c&&z(c);try{if(o(e,e.state,e.context,r)===!1)return!1}catch(a){if(e.context?.plugins?.length&&mt("error",e,{hook:s,error:a})||console.error(`[DOMQL] Lifecycle "${s}" error:`,a),e.context?.strictMode)throw a}finally{c&&W(),i&&(e.__ref.__inRender=!1)}}return!0}var wa=lt;var Ca=(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?ct(r.state):void 0;return lt(t,e,"Root",{state:n,context:r.context||{}})};return Js(va);})();
|