@symbo.ls/element 3.14.804 → 3.14.806

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +197 -0
  3. package/dist/cjs/src/cache.js +1 -1
  4. package/dist/cjs/src/connected.js +1 -0
  5. package/dist/cjs/src/core.js +6 -0
  6. package/dist/cjs/src/create.js +1 -6
  7. package/dist/cjs/src/cssLonghands.js +1 -1
  8. package/dist/cjs/src/delegate.js +1 -1
  9. package/dist/cjs/src/dispose.js +1 -1
  10. package/dist/cjs/src/extends.js +1 -1
  11. package/dist/cjs/src/features.js +1 -0
  12. package/dist/cjs/src/handlerChain.js +1 -0
  13. package/dist/cjs/src/hydration.js +1 -0
  14. package/dist/cjs/src/index.js +1 -1
  15. package/dist/cjs/src/install.js +1 -0
  16. package/dist/cjs/src/lean.js +1 -0
  17. package/dist/cjs/src/methods.js +1 -1
  18. package/dist/cjs/src/mountRecord.js +1 -0
  19. package/dist/cjs/src/mountScheduler.js +1 -1
  20. package/dist/cjs/src/mountYield.js +1 -0
  21. package/dist/cjs/src/plainRows.js +1 -0
  22. package/dist/cjs/src/update.js +1 -1
  23. package/dist/cjs/src/version.js +1 -1
  24. package/dist/cjs/src/viewEvents.js +1 -0
  25. package/dist/esm/src/cache.js +1 -1
  26. package/dist/esm/src/connected.js +1 -0
  27. package/dist/esm/src/core.js +6 -0
  28. package/dist/esm/src/create.js +1 -6
  29. package/dist/esm/src/cssLonghands.js +1 -1
  30. package/dist/esm/src/delegate.js +1 -1
  31. package/dist/esm/src/dispose.js +1 -1
  32. package/dist/esm/src/extends.js +1 -1
  33. package/dist/esm/src/features.js +1 -0
  34. package/dist/esm/src/handlerChain.js +1 -0
  35. package/dist/esm/src/hydration.js +1 -0
  36. package/dist/esm/src/index.js +1 -1
  37. package/dist/esm/src/install.js +1 -0
  38. package/dist/esm/src/lean.js +1 -0
  39. package/dist/esm/src/methods.js +1 -1
  40. package/dist/esm/src/mountRecord.js +1 -0
  41. package/dist/esm/src/mountScheduler.js +1 -1
  42. package/dist/esm/src/mountYield.js +1 -0
  43. package/dist/esm/src/plainRows.js +1 -0
  44. package/dist/esm/src/update.js +1 -1
  45. package/dist/esm/src/version.js +1 -1
  46. package/dist/esm/src/viewEvents.js +1 -0
  47. package/package.json +6 -6
@@ -1,6 +1 @@
1
- "use strict";var Gs=Object.create;var Ht=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Ws=Object.getOwnPropertyNames;var zs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var qs=(t,o)=>{for(var s in o)Ht(t,s,{get:o[s],enumerable:!0})},jo=(t,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of Ws(o))!Ys.call(t,e)&&e!==s&&Ht(t,e,{get:()=>o[e],enumerable:!(n=Ks(o,e))||n.enumerable});return t};var Zs=(t,o,s)=>(s=t!=null?Gs(zs(t)):{},jo(o||!t||!t.__esModule?Ht(s,"default",{value:t,enumerable:!0}):s,t)),Qs=t=>jo(Ht({},"__esModule",{value:!0}),t);var _e={};qs(_e,{BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES:()=>Qt,acquireBeforeUpdateGuard:()=>$s,create:()=>ot,default:()=>ye,flushMounts:()=>Zt,isStaticCssProp:()=>Jn,recompileStaticCss:()=>mn,reconcileAttrProp:()=>oe,releaseBeforeUpdateGuard:()=>It,resolveStyleBlock:()=>$t,writeAttr:()=>Ft,writeElementText:()=>Nt});module.exports=Qs(_e);var $=require("@symbo.ls/signal"),E=require("@symbo.ls/signal"),W=require("./runContext.js"),nt=require("./cache.js"),H=require("./registry.js"),At=require("./delegate.js"),Rs=require("./bridge.js"),xt=require("./extends.js"),Ms=require("./methods.js"),xe=require("./dispose.js"),it=require("./devRuntime.js"),U=require("./mountScheduler.js"),L=require("@symbo.ls/utils"),Ut=Zs(require("@symbo.ls/utils"),1),z=require("./pluginHooks.js"),ut=require("@symbo.ls/state"),k=require("css-in-props"),st=require("@symbo.ls/css"),M=require("@symbo.ls/scratch"),v=require("attrs-in-props"),Ns=require("./engineRegistry.js"),I=require("./cssLonghands.js"),Q=require("./attributeFirst.js"),Fs=require("./version.js");const Eo=(0,Ns.resolveElementIdEngine)({uniqId:1,scopedStyleId:0},Fs.VERSION),Ct=[],ct=new Set;let oo=!1,Po=0,pt=null,kt=null;function ht(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Oo(){return typeof document<"u"&&document.visibilityState==="hidden"}const Xs=250,Js=1e3;function ms(){return kt&&(kt!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Oo())?!0:ht()-Po>=Js}function tn(){if(oo=!0,Po=ht(),kt=null,typeof requestAnimationFrame!="function"){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,0);pt=t?()=>t(o):null;return}if(Oo()){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,Xs);pt=t?()=>t(o):null}else{const t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;kt=requestAnimationFrame;const o=requestAnimationFrame(Zt);pt=t?()=>t(o):null}}function Vt(){if(oo){if(!ms())return;const t=pt;if(pt=null,t)try{t()}catch{}}tn()}const To=300,Do=15e4;function Zt(){if(oo=!1,pt=null,kt=null,ct.size&&ne(),!Ct.length)return;const t=Ct.splice(0,Ct.length);for(let o=0;o<t.length;o++){const s=t[o];if(s.node){if(!s.node.isConnected){const n=s.__ref||(s.__ref={});n.__mountAttempts=(n.__mountAttempts||0)+1,n.__mountFirstAttemptAt==null&&(n.__mountFirstAttemptAt=ht());const e=ht()-n.__mountFirstAttemptAt;n.__mountAttempts<=To&&e<Do?(Ct.push(s),Vt()):console.warn("[DOMQL] onMounted dropped after",n.__mountAttempts,"attempts /",e,"ms \u2014 node never connected:",s.key||s.tag||s);continue}typeof s.onBridgeMount=="function"&&(0,Rs.mountBridge)(s),typeof s.onMounted=="function"&&N("Mounted",s,s.__ref?.__mountOptions||{})}}}function so(t,o){const s=t.__ref?.__autoGrow;s&&s.active&&Rt(t,!0),!(typeof t.onMounted!="function"&&typeof t.onBridgeMount!="function")&&(t.__ref.__mountOptions=o,Ct.push(t),Vt())}function Lo(t,o){typeof t.onContentUpdate=="function"&&((0,z.dispatchPluginHook)("contentUpdate",t,o),(0,W.withDesignSystem)(t,()=>{try{t.onContentUpdate(t,t.state,t.context,o)}catch(s){if((0,z.reportLifecycleError)(t,"onContentUpdate",s),t.context?.strictMode)throw s}}))}function m(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function on(t){return t.charAt(2).toLowerCase()+t.slice(3)}function sn(t){return t.toLowerCase()}function no(t){const o=t.charCodeAt(0);return o===58||o===64||o===38||o===91}function vt(t,o){const s={...t};for(const n in o){const e=s[n],c=o[n];e&&c&&typeof e=="object"&&typeof c=="object"&&!Array.isArray(e)&&!Array.isArray(c)&&typeof e!="function"&&typeof c!="function"?s[n]=vt(e,c):s[n]=c}return s}function Gt(t){if(typeof t=="string")return t||void 0;if(typeof t=="number"||typeof t=="bigint")return String(t)}function Ro(t,o,s,n){return Kt(n,Gt(t)||(o&&typeof o=="object"?Gt(o.key):void 0)||String(s))}function Kt(t,o){if(!t||typeof o!="string")return o;let s=o;for(;nn(t,s);)s="$"+s;return s!==o&&en(t,o,s),s}function nn(t,o){if(H.REGISTRY.has(o)&&o!=="content")return!0;if(!(o in t))return!1;const s=t[o];return!(s&&typeof s=="object"&&s.__ref&&s.parent===t)}const Mo=new Set;function en(t,o,s){if(!(0,it.isLoudDevRuntime)())return;const n=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",e=n+"::"+o;Mo.has(e)||(Mo.add(e),console.warn(`[smbls] a child keyed "${o}" at ${n} names a property of its parent; it lives at el["${s}"] (data-key="${s}") so the parent keeps its own "${o}". Prefix the data keys to keep plain el.<key> access.`))}function ot(t,o,s,n={},e){if((0,E.getObserver)())return(0,W.untrack)(()=>ot(t,o,s,n,e));if(t==null||t===!1)return null;const c=kn(t);(typeof t=="string"||typeof t=="number")&&(t={text:t}),s=Gt(s);const a=Gt(t.key),r=Object.create(null);r.key=s||(a&&o?Kt(o,a):a)||`_${Eo.uniqId++}`,r.parent=o||null,r.context=t.context||o?.context||n.context||{},r.context.__create||(r.context.__create=ot);const i=r.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:o?.__ref?.root||r,path:o?.__ref?.path?[...o.__ref.path,r.key]:[r.key],origin:t};c&&(i.__runtimeSource=c);const f=t;if(t=Fo(r,t,s,a,o,n),r.if!=null){let u;if(typeof r.if=="function")try{u=r.if(r,r.state,r.context)}catch(l){if(u=!1,i.__ifError=l,typeof console<"u"&&console.warn){const g=r.key||r.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${g} \u2014 treating as false:`,l?.message||l)}}else u=r.if;i.__if=!!u}if(i.__if)typeof r.if=="function"&&(i.__ifInitialized=!0);else{o&&(o[r.key]=r);const u=fn(t,s,r.context?.components);return u.length&&(i.__ifLateMerge={definition:f,key:s,ownKey:a,names:u,options:n}),typeof r.if=="function"&&mo(r,i,r.if),r}r.tag||(r.tag=(0,nt.detectTag)(r)),N("Init",r,n);const d=r.node=(0,nt.adoptHydrationNode)(r)||(0,nt.cacheNode)(r);if(!d)return r;if(r.tag==="fragment"){const l=(r.context?.document||globalThis.document).createComment("");d.appendChild(l),i.__fragmentAnchor=l}N("AttachNode",r,n),d.setAttribute&&r.key&&d.setAttribute("data-key",r.key),o&&(o[r.key]=r,o.__ref?.__children&&(o.__ref.__children.includes(r.key)||o.__ref.__children.push(r.key))),d.setAttribute&&r.context?.scopeSelector&&r.context.scopeSelector!==":root"&&r.context.key&&r.key===r.context.key&&d.setAttribute("data-smbls-app",r.context.key),r.id&&d.setAttribute&&(d.id=r.id),Ts(r,n),Qo(r),Jo(r);try{Ds(r,n)}catch(u){if(typeof console<"u"&&console.error){const l=r.__ref?.path?.join(".")||r.key||"<root>";console.error(`[smbls] createChildren failed at ${l}:`,u?.message||u,u?.stack?`
2
- `+u.stack.split(`
3
- `).slice(0,6).join(`
4
- `):"")}}if(qt(r,!0),Ls(r,o,e),typeof r.html=="function"&&r.node&&!r.node.innerHTML&&(0,W.withDesignSystem)(r,()=>{try{const u=r.html(r,r.state,r.context);u!=null&&typeof u!="function"&&(r.node.innerHTML=u)}catch{}}),N("Create",r,n),N("Complete",r,n),N("Render",r,n),N("RenderRouter",r,n),so(r,n),typeof r.onFrame=="function"){const u=r.onFrame,l=r.context?.designSystem,g=()=>{if(r.node){if(r.node.isConnected){l&&(0,M.pushConfig)(l);try{u(r,r.state,r.context)}catch(x){console.error("[DOMQL] onFrame error:",x)}finally{l&&(0,M.popConfig)()}}requestAnimationFrame(g)}};requestAnimationFrame(g)}return r}const No=new Set(["childProps","attr","style","scope","data","vars"]);function Fo(t,o,s,n,e,c){if(s&&!o.extends&&!o.extend){const p=s.indexOf("_"),h=s.indexOf(".");let _=p>0?p:-1;if(h>0&&(_<0||h<_)&&(_=h),_>0){const w=s.substring(0,_),y=t.context?.components;y&&(y[w]||y["smbls."+w])?o={...o,extends:w}:y&&(0,it.isLoudDevRuntime)()&&(/^[A-Z]\w*_\d+$/.test(s)||/^[A-Z]\w*\.\w+$/.test(s))&&console.warn(`[smbls] auto-extend: key "${s}" looks like an instance of "${w}" but neither "${w}" nor "smbls.${w}" is registered in context.components \u2014 element will render as a plain <div>. Register the base component or rename the key.`)}}t.__ref&&(t.__ref.__mergeLayer=null),(0,xt.applyExtends)(t,o,c);const a=(0,xt.openMergeLayer)(t),r=t.props&&typeof t.props=="object"?t.props:null;for(const p in o){if(p==="parent"||p==="node"||p==="__ref"||p==="extends"||p==="context"||p==="props")continue;if(p==="key"){n&&(t.key=e?Kt(e,n):n);continue}const h=o[p];a&&a.mark(p);const _=t[p],w=_&&h&&typeof _=="object"&&typeof h=="object"&&!Array.isArray(_)&&!Array.isArray(h)&&typeof _!="function"&&typeof h!="function";w&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?t[p]=vt(_,h):w&&No.has(p)?t[p]={..._,...h}:w&&no(p)?t[p]=vt(_,h):t[p]=h}function i(p){for(const h in p){const _=p[h],w=t[h],y=w&&_&&typeof w=="object"&&typeof _=="object"&&!Array.isArray(w)&&!Array.isArray(_)&&typeof w!="function"&&typeof _!="function";y&&h.charCodeAt(0)>=65&&h.charCodeAt(0)<=90?t[h]=vt(w,_):y&&No.has(h)?t[h]={...w,..._}:y&&no(h)?t[h]=vt(w,_):t[h]=_}}if(r&&i(r),o.props&&typeof o.props=="object"&&(i(o.props),a))for(const p in o.props)a.mark(p);(0,xt.closeMergeLayer)(t),o.classlist!==void 0&&(t.classlist=o.classlist),o.text!==void 0&&(t.text=o.text),o.html!==void 0&&(t.html=o.html);const f=t.scope&&typeof t.scope=="object"?t.scope:null,d=e?.scope,u=t.context&&typeof t.context.globalScope=="object"&&t.context.globalScope||null,l=d||u||null;if(o.scope!==void 0||f){const p={};f&&Object.assign(p,f),o.scope!==void 0&&Object.assign(p,o.scope),t.scope=(0,$.createScopeStore)(p,l)}else l&&(t.scope=l);o.if!==void 0&&(t.if=o.if);const g=t.__ref,x=vn(t,g&&g.__runtimeSource);return g&&(g.__declaredArrays=x||void 0),(0,Ms.addMethods)(t),an(t,e,o,c),o}const rn=new Set(["key","parent","context","__ref"]);function cn(t,o){for(const n of Object.keys(t))rn.has(n)||delete t[n];let s=o.definition;if(!s.extends&&!s.extend&&typeof o.key=="string"){const n=t.context?.components||{},e=n[o.key]||n["smbls."+o.key];e&&(s={...s,extends:e})}(0,W.untrack)(()=>Fo(t,s,o.key,o.ownKey,t.parent,o.options))}function fn(t,o,s){const n=s||{},e=r=>!!(n[r]||n["smbls."+r]),c=[],a=[];if(t.extends&&a.push(...Array.isArray(t.extends)?t.extends:[t.extends]),t.extend&&a.push(...Array.isArray(t.extend)?t.extend:[t.extend]),a.length){for(const r of a){if(typeof r!="string")continue;const i=r.includes(">")?r.split(">")[0].trim():r;e(i)||c.push(i)}return c}if(typeof o=="string"&&/^[A-Z]/.test(o)){let r=-1;const i=o.indexOf("_"),f=o.indexOf(".");i>0&&(r=i),f>0&&(r<0||f<r)&&(r=f);const d=r>0?o.substring(0,r):o;e(d)||c.push(d)}return c}function eo(t,o,s){if(typeof t.onStateInit!="function"&&!(0,z.hasPluginHook)(t,"stateInit"))return;const n=t.state;t.state=o;try{N("StateInit",t,s)}finally{t.state=n}}const ro=t=>({isDataOnlyKey:o=>(0,L.polyglotSeededKeys)(t).has(o)});function an(t,o,s,n){const e=!o,c=s.state&&typeof s.state=="object"&&!Array.isArray(s.state)&&Object.keys(s.state).length===0,a=e&&c&&t.context?.state,r=s.state!==void 0&&!a?s.state:t.state&&!(0,$.isStore)(t.state)?t.state:void 0;if(r==null){if(o?.state)t.state=o.state,(0,ut.applyStateMethods)(t,t.state);else if(t.context?.state){const i=t.context.state,f={...i},d=t.context?.polyglot;if(d?.translations){const u=t.context,l=i.lang||d.defaultLang||"en",g=new Set,x=(_,w)=>{g.has(_)||(0,L.isPolyglotWritableKey)(u,_,f)&&(f[_]=w,g.add(_),(0,L.markPolyglotSeeded)(u,_,w))},p=d.translations[l];if(p&&typeof p=="object")for(const _ in p)x(_,p[_]);const h=new Set(d.languages||[]);for(const _ in d.translations)h.has(_)||x(_,d.translations[_])}(0,$.isStore)(f)||eo(t,f,n),t.state=(0,$.isStore)(f)?f:(0,$.createStore)(f,ro(t.context)),t.state.__element=t,t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),Ut.promoteActiveRootState?.(i,t.state),N("StateCreated",t,n)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,ut.applyStateMethods)(t,t.state);return}if(typeof r=="string"){if(t.state=Bo(r,o),t.state&&typeof t.state=="object"&&!(0,$.isStore)(t.state)){const i=o?.state?.root||o?.state||t.state;Object.defineProperty(t.state,"root",{value:i,enumerable:!1,configurable:!0,writable:!0})}(0,ut.applyStateMethods)(t,t.state),dn(t,r,o),N("StateCreated",t,n);return}if(typeof r=="function"){const i=r(t,o?.state);if((0,$.isStore)(i))t.state=i;else{const f=i||{};eo(t,f,n),t.state=(0,$.createStore)(f,o?.state?void 0:ro(t.context))}}else if((0,$.isStore)(r))t.state=r;else{const i={...r};eo(t,i,n),t.state=(0,$.createStore)(i,o?.state?void 0:ro(t.context))}t.state.__element=t,o?.state?(t.state.parent=o.state,t.state.root=o.state.root||o.state):t.state.root=t.state,(0,ut.applyStateMethods)(t,t.state),Ut.promoteActiveRootState?.(r,t.state),N("StateCreated",t,n)}function $o(t,o){if(!o)return t;const s=o.split("/");let n=t;for(const e of s){if(n==null)return{};n=n[e]}return n??{}}function Io(t,o){const s=o.state;return t.startsWith("~/")?[s&&(s.root||s),t.slice(2)]:t.startsWith("../")?[s,t.slice(3)]:[s,t]}function Bo(t,o){if(!o)return{};if(t===".")return o.state||{};if(t.startsWith("../")||t.startsWith("~/")){const[e,c]=Io(t,o);return c?$o(e,c):e??{}}if(o.state?.[t]!==void 0)return o.state[t];const s=$o(o.state,t);if(s!=null&&Object.keys(s).length>0)return s;const n=o.context?.polyglot;if(n?.translations){const e=o.state?.root?.lang||n.defaultLang||"en",c=n.translations[e];if(c?.[t]!==void 0)return c[t];if(n.translations[t]!==void 0)return n.translations[t]}return{}}function un(t,o){const[s,n]=Io(t,o);if(!n||!s||typeof s!="object")return;const e=s[n];if(e!==void 0||n.indexOf("/")===-1)return e;let c=s;for(const a of n.split("/")){if(c==null||typeof c!="object")return;c=c[a]}return c}function dn(t,o,s){const n=t.__ref;if(!n||!s||o==="."||!(0,$.isStore)(s.state))return;n.__stateBinding&&n.__stateBinding.dispose();const e=(0,W.untrack)(()=>(0,E.createEffect)(()=>{const c=un(o,s);!c||typeof c!="object"||c===t.state||(0,W.untrack)(()=>Ho(t,t.state,c,!0))},{depth:n.path?n.path.length:0,label:P(n,"state")}));e._isStateBinding=!0,n.__stateBinding=e,n.__effects&&n.__effects.push(e)}function Ho(t,o,s,n){const e=t.__ref;if(!e)return;if(n||t.state===o){t.state=s,n&&(0,ut.applyStateMethods)(t,s),Uo(e);const a=e.__children;if(a)for(let r=0;r<a.length;r++){const i=t[a[r]];i&&i.__ref&&i.parent===t&&Ho(i,o,s,!1)}return}if(e.__stateBinding){e.__stateBinding._notify();return}const c=t.state;c&&typeof c=="object"&&c.parent===o&&(c.parent=s,Uo(e))}function Uo(t){const o=t.__effects;if(o)for(let s=0;s<o.length;s++){const n=o[s];n&&!n._disposed&&!n._isStateBinding&&!n._isSubscribeToEffect&&typeof n._notify=="function"&&n._notify()}}const ln=new Set(["s","state","ctx","context"]),io=new WeakMap;function Vo(t){if(io.has(t))return io.get(t);let o=null;try{const s=typeof Ut.getFunctionSource=="function"?Ut.getFunctionSource(t):Function.prototype.toString.call(t);if(typeof s=="string"){const n=s.match(/^\s*(?:async\s+)?([A-Za-z_$][\w$]*)\s*=>/)||s.match(/^[^(]*\(([^)]*)\)/);n&&(o={params:n[1].split(",").map(e=>e.trim()),body:s.slice(n.index+n[0].length)})}}catch{}return io.set(t,o),o}function pn(t){const o=Vo(t);return o?o.params.map(s=>s.split("=")[0].trim()).filter(Boolean):[]}const Go=new WeakMap;function hn(t){let o=Go.get(t);return o===void 0&&(o=yn(Vo(t)),Go.set(t,o)),o}function yn(t){if(!t)return!0;const o=t.body;if(/\bstate\b|\barguments\b|\bcall\s*\(/.test(o))return!0;const s=t.params[1];if(!s)return!1;if(!/^[A-Za-z_$][\w$]*$/.test(s.split("=")[0].trim()))return!0;const n=s.split("=")[0].trim();return new RegExp("(^|[^\\w$.])"+n.replace(/\$/g,"\\$")+"(?![\\w$])").test(o)}const _n=3,gn=/^(is|has)[A-Z0-9_$]/,bn=new Set(["routerOptions"]),Ko=new WeakSet;function An(t,o){if(typeof t!="function"||t.length!==2||o&&(gn.test(o)||bn.has(o))||Ko.has(t))return!1;const s=pn(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length<_n||ln.has(n)?!1:(Ko.add(t),!0)}function xn(t){const o=t.__ref,s=t.tag||"div",n=t.context?.designSystem,e=[],c=Object.keys(t);for(let a=0;a<c.length;a++){const r=c[a];if(typeof t[r]!="function"||H.REGISTRY.has(r))continue;const i=r.charCodeAt(0);i>=65&&i<=90||m(r)||k.CSS_PROPS_REGISTRY[r]||k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(r)||i!==45&&((0,v.checkAttributeByTagName)(s,r)||((0,it.isLoudDevRuntime)()&&An(t[r],r)&&console.warn(`[smbls] custom prop "${r}"${t.key?` on key "${t.key}"`:""} is a function \u2014 it will be auto-invoked on read and its RETURN VALUE stored, not preserved as a callable reference. If you meant to stash a callback, use el.call('${r}', \u2026) instead of reading el.${r}(\u2026) directly (see RULES.md Rule 8).`),e.push({prop:r,fn:t[r]})))}for(let a=0;a<e.length;a++){const{prop:r,fn:i}=e[a];o.__exec[r]=i,Object.defineProperty(t,r,{get(){n&&(0,M.pushConfig)(n);try{return i(t,t.state,t.context)}catch{return}finally{n&&(0,M.popConfig)()}},set(f){delete o.__exec[r],Object.defineProperty(t,r,{value:f,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function wn(t,o){if(!(!Array.isArray(o)||o.length===0))for(let s=0;s<o.length;s++){const n=o[s];try{typeof n=="function"?n(t,t.state,t.context):typeof n=="string"&&t.state?.[n]}catch{}}}function R(t,o,s){return!Array.isArray(o)||o.length===0?s:function(...n){return wn(t,o),s.apply(this,n)}}function yt(t,o){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[o]}function P(t,o){return()=>t.path.join(".")+"::"+o}const Wo=new Set;function F(t,o,s){if(!(0,it.isLoudDevRuntime)())return;const n=P(t,o)();Wo.has(n)||(Wo.add(n),console.warn(`[smbls] "${o}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,s?.message||s))}const zo=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,Sn=(t,o)=>{let s;try{s=String(t)}catch{return}if(!s.includes("{{"))return;zo.lastIndex=0;let n;for(;(n=zo.exec(s))!==null;)n[2].includes("{{")&&o.add(n[2])},Cn=(t,o)=>!m(t)&&!(0,Q.isCssProp)(o,t),co=(t,o,s,n,e)=>{if(typeof o=="string"){!e&&o.includes("{{")&&s.add(o);return}typeof o=="function"&&Cn(t,n)&&Sn(o,s)},fo=new WeakMap,jt=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),Et=t=>{if(typeof t=="string"||typeof t=="number")return{text:t};if(!t||typeof t!="object"||Array.isArray(t))return null;const o=t.props;return o&&typeof o=="object"&&!Array.isArray(o)?at(t,o):t},Pt=(t,o)=>t&&o?at(t,o):t||o||null,Yo=(t,o)=>{const s=t.__ref&&t.__ref.__runtimeSource;return!!s&&jt(s,o)},_t=(t,o)=>Yo(t,o)?Et(t.__ref.__runtimeSource[o]):null,Ot=(t,o)=>(o&&t&&typeof t=="object"&&fo.set(t,o),t),kn=t=>{if(!t||typeof t!="object")return;const o=fo.get(t);return o&&fo.delete(t),o},ao=(t,o,s)=>{if(typeof t=="string"){t.includes("{{")&&o.add(t);return}if(!(!t||typeof t!="object"||s.has(t))){if(s.add(t),Array.isArray(t)){for(let n=0;n<t.length;n++)ao(t[n],o,s);return}if(!t.__ref)for(const n of Object.keys(t)){if(n==="state")continue;const e=Object.getOwnPropertyDescriptor(t,n);e&&"value"in e&&ao(e.value,o,s)}}},vn=(t,o)=>{let s=null;for(const n of Object.keys(t)){if(H.REGISTRY.has(n)||o&&jt(o,n))continue;const e=Object.getOwnPropertyDescriptor(t,n),c=e&&e.value;if(!Array.isArray(c))continue;const a=new Set;ao(c,a,new Set),a.size&&(s||(s=new Map),s.set(c,a))}return s},qo=(t,o)=>{if(Array.isArray(o))for(let s=t;s;s=s.parent){const n=s.__ref&&s.__ref.__declaredArrays,e=n&&n.get(o);if(!e)continue;const c=t.__ref;c.__authoredTemplates||(c.__authoredTemplates=new Set);for(const a of e)c.__authoredTemplates.add(a);return}},Zo=["attr","aria","data","metadata"],jn=t=>{if(Zo.includes(t))return!0;const o=t.charCodeAt(0);return o===46||o===33||o===64},En=(t,o)=>{const s=new Set,n=t.tag||"div";for(const e of Object.keys(t)){const c=Object.getOwnPropertyDescriptor(t,e),a=c&&c.value,r=!!o&&jt(o,e);if(a&&typeof a=="object"&&!Array.isArray(a)){if(!jn(e))continue;const i=r?o[e]:null,f=i&&typeof i=="object"?i:null,d=e.charCodeAt(0)===46||e.charCodeAt(0)===33;for(const u in a){const l=r&&(!f||jt(f,u)),g=a[u];if(d&&g&&typeof g=="object"&&!Array.isArray(g)&&Zo.includes(u)){for(const x in g)co(x,g[x],s,n,l);continue}co(u,g,s,n,l)}continue}co(e,a,s,n,r)}return s};function Qo(t,o){const s=t.__ref,n=!!(o&&o.skipIfEffect),e=En(t,s.__runtimeSource);if(s.__authoredTemplates)for(const i of e)s.__authoredTemplates.add(i);else s.__authoredTemplates=e;if(xn(t),typeof t.text=="function"){const i=t.text,f=R(t,t.textDeps,i),d=(0,E.createEffect)(()=>{if(!s.contentManaged)try{let u=f(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&typeof u!="object"&&(typeof u=="string"&&u.includes("{{")&&(u=L.replaceLiteralsWithObjectFields.call(t,u,t.state)),Nt(t,u))}catch(u){F(s,"text",u)}},{depth:s.path.length,label:P(s,"text")});s.__effects.push(d),s.__exec.text=i}else if(typeof t.text=="string"&&t.text.includes("{{")){const i=t.text,f=(0,E.createEffect)(()=>{if(s.contentManaged)return;const d=L.replaceLiteralsWithObjectFields.call(t,i,t.state);d!=null&&(t.text=d),t.node&&Nt(t,d??"")},{depth:s.path.length,label:P(s,"text")});s.__effects.push(f),s.__exec.text=i}const c=t.tag||"div";for(const i of Object.keys(t))if(typeof t[i]=="function"&&!H.REGISTRY.has(i)&&!m(i)&&!s.__exec[i]&&!(0,Q.isAttributeFirst)(c,i)){if(k.CSS_PROPS_REGISTRY[i]){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,g=null,x=null,p;const h=(0,E.createEffect)(()=>{const _=t.context?.designSystem;_&&(0,M.pushConfig)(_);try{const w=d(t,t.state,t.context);(0,k.pushStaticCssPass)();let y;try{y=k.CSS_PROPS_REGISTRY[u](w,t,t.state,t.context)}finally{(0,k.popStaticCssPass)()}if(Array.isArray(y)){const A={};for(const S of y)if(S)for(const C in S)A[C]=S[C];y=A}const b=u==="show"||u==="hide";if(y&&t.node&&Tn(y)){const A=gt(y);if(A===null||A!==p){p=A;const S=(0,st.css)(y,null,t.context?.cssPrefix),C=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(x)for(const j of x)t.node.classList.remove(j);if(C&&C.length)for(const j of C)t.node.classList.add(j);x=C}}l=void 0,g=null}else if(y&&t.node){if(x){for(const S of x)t.node.classList.remove(S);x=null,p=void 0}const A=gt(y);if(A===null||A!==l||!Dt(t.node,g)){l=A;const S=cs(t,y);g=Tt(t.node,S)}}else t.node&&b&&(l=void 0,g=null,t.node.style.display="")}finally{_&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(h),s.__exec[i]=f}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(i)){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,g=null;const x=(0,E.createEffect)(()=>{const p=t.context?.designSystem;p&&(0,M.pushConfig)(p);try{const h=d(t,t.state,t.context);if(t.node)if(h!=null){const _=u+":"+String(h);if(_!==l||!Dt(t.node,g)){l=_;const w={[u]:h},y=cs(t,w);g=Tt(t.node,y)}}else l=void 0,g=null,t.node.style[u]=""}finally{p&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(x),s.__exec[i]=f}else if(i.charCodeAt(0)===45){const f=t[i];es(t,i,f,t[i+"Deps"],i),s.__exec[i]=f}}if(Dn(t),typeof t.html=="function"){const i=t.html,f=R(t,t.htmlDeps,i),d=(0,E.createEffect)(()=>{(0,W.withDesignSystem)(t,()=>{const u=f(t,t.state,t.context);t.node&&u!=null&&typeof u!="function"&&(t.node.innerHTML=u)})},{depth:s.path.length,label:P(s,"html")});s.__effects.push(d),s.__exec.html=i}if(typeof t.value=="function"){const i=t.value,f=R(t,t.valueDeps,i),d=(0,E.createEffect)(()=>{try{let u=f(t,t.state,t.context);typeof u=="string"&&u.includes("{{")&&(u=L.replaceLiteralsWithObjectFields.call(t,u,t.state)),ts(t,u)}catch(u){F(s,"value",u)}},{depth:s.path.length,label:P(s,"value")});s.__effects.push(d),s.__exec.value=i}else if(typeof t.value=="string"&&t.value.includes("{{")){const i=t.value,f=(0,E.createEffect)(()=>{try{ts(t,L.replaceLiteralsWithObjectFields.call(t,i,t.state))}catch(d){F(s,"value",d)}},{depth:s.path.length,label:P(s,"value")});s.__effects.push(f),s.__exec.value=i}if(typeof t.style=="function"){const i=t.style,f=R(t,t.styleDeps,i);let d,u=null,l,g,x,p;const h=(0,E.createEffect)(()=>{const _=f(t,t.state,t.context),w=t.context&&t.context.designSystem;let y;if(_&&typeof _=="object"&&_===l&&w===x){const A=gt(_);y=A!==null&&A===g?p:$t(t,_),g=A}else y=$t(t,_),g=void 0;l=_,x=w,p=y;const b=gt(y);(b===null||b!==d||!Dt(t.node,u))&&(d=b,lo(t.node,u,y),et(t.node,y),u=Tt(t.node,y))},{depth:s.path.length,label:P(s,"style")});s.__effects.push(h),s.__exec.style=i}else if(t.style&&typeof t.style=="object")for(const i in t.style){const f=t.style[i];if(typeof f!="function")continue;const d=R(t,yt(t.styleDeps,i),f);let u,l=null;const g=(0,E.createEffect)(()=>{try{const x=d(t,t.state,t.context);if(t.node){const p=i+":"+String(x);if(p!==u||!Dt(t.node,l)){u=p;const h=$t(t,{[i]:x});lo(t.node,l,Object.assign({},h,{[i]:""})),et(t.node,h),l=Tt(t.node,h)}}}catch(x){F(s,"style."+i,x)}},{depth:s.path.length,label:P(s,"style."+i)});s.__effects.push(g)}if(t.attr&&typeof t.attr=="object"){for(const i in t.attr)if(typeof t.attr[i]=="function"){const f=R(t,yt(t.attrDeps,i),t.attr[i]),d=i,u=(0,E.createEffect)(()=>{try{let l=f(t,t.state,t.context);typeof l=="string"&&l.includes("{{")&&(l=L.replaceLiteralsWithObjectFields.call(t,l,t.state)),t.node?.setAttribute&&Ft(t.node,d,l)}catch(l){F(s,"attr."+d,l)}},{depth:s.path.length,label:P(s,"attr."+d)});u._attrName=d.toLowerCase(),s.__effects.push(u)}else if(typeof t.attr[i]=="string"&&t.attr[i].includes("{{")){const f=t.attr[i],d=i,u=(0,E.createEffect)(()=>{try{const l=L.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(d,(0,v.serializeAttrValue)(d,l??""))}catch(l){F(s,"attr."+d,l)}},{depth:s.path.length,label:P(s,"attr."+d)});u._attrName=d.toLowerCase(),s.__effects.push(u)}}if(t.aria&&typeof t.aria=="object")for(const i in t.aria){const f=t.aria[i];if(typeof f=="string"&&f.includes("{{")){const g=f,x="aria-"+i.replace(/[A-Z]/g,h=>"-"+h.toLowerCase()),p=(0,E.createEffect)(()=>{try{const h=L.replaceLiteralsWithObjectFields.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(x,(0,v.serializeAttrValue)(x,h??""))}catch(h){F(s,"aria."+i,h)}},{depth:s.path.length,label:P(s,"aria."+i)});p._attrName=x,s.__effects.push(p);continue}if(typeof f!="function")continue;const d=R(t,yt(t.ariaDeps,i),t.aria[i]),u="aria-"+i.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),l=(0,E.createEffect)(()=>{try{const g=d(t,t.state,t.context);if(!t.node?.setAttribute)return;Ft(t.node,u,g)}catch(g){F(s,"aria."+i,g)}},{depth:s.path.length,label:P(s,"aria."+i)});l._attrName=u,s.__effects.push(l)}if(t.data&&typeof t.data=="object")for(const i in t.data){const f=t.data[i];if(typeof f=="string"&&f.includes("{{")){const x=f,p="data-"+i.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),h=(0,E.createEffect)(()=>{try{const _=L.replaceLiteralsWithObjectFields.call(t,x,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(p,_??"")}catch(_){F(s,"data."+i,_)}},{depth:s.path.length,label:P(s,"data."+i)});h._attrName=p,s.__effects.push(h);continue}if(typeof f!="function")continue;const d=R(t,yt(t.dataDeps,i),t.data[i]),l="data-"+i.replace(/[A-Z]/g,x=>"-"+x.toLowerCase()),g=(0,E.createEffect)(()=>{try{const x=d(t,t.state,t.context);if(!t.node?.setAttribute)return;x==null||x===!1?t.node.removeAttribute(l):typeof x!="function"&&typeof x!="object"&&t.node.setAttribute(l,x===!0?"":x)}catch(x){F(s,"data."+i,x)}},{depth:s.path.length,label:P(s,"data."+i)});g._attrName=l,s.__effects.push(g)}const a=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(a)for(const i in a){if(typeof a[i]!="function")continue;const f=R(t,yt(t.classDeps,i),a[i]),d=(0,E.createEffect)(()=>{try{const u=f(t,t.state,t.context);if(!t.node?.classList)return;typeof u=="string"?t.node.classList.add(u):u?t.node.classList.add(i):t.node.classList.remove(i)}catch(u){F(s,"class."+i,u)}},{depth:s.path.length,label:P(s,"class."+i)});s.__effects.push(d)}!n&&typeof t.if=="function"&&mo(t,s,t.if);for(const i of Object.keys(t)){if(H.REGISTRY.has(i)||typeof t[i]!="function")continue;const f=i.charCodeAt(0);if(f>=65&&f<=90||m(i))continue;const d=t[i];s.__exec[i]=d;const u=t.tag||"div";if((0,v.checkAttributeByTagName)(u,i)&&!(0,Q.isCssProp)(u,i)){const l=(0,v.camelToAttr)(i)||i,g=R(t,t[i+"Deps"],d),x=(0,E.createEffect)(()=>{try{let p=g(t,t.state,t.context);typeof p=="string"&&p.includes("{{")&&(p=L.replaceLiteralsWithObjectFields.call(t,p,t.state)),t.node?.setAttribute&&Ft(t.node,l,p,!0)}catch(p){F(s,i,p)}},{depth:s.path.length,label:P(s,i)});x._attrName=l.toLowerCase(),s.__effects.push(x)}}const r=t.tag||"div";for(const i of Object.keys(t)){if(H.REGISTRY.has(i))continue;const f=t[i];if(typeof f!="string"||!f.includes("{{"))continue;const d=i.charCodeAt(0);if(d>=65&&d<=90||m(i)||(0,Q.isCssProp)(r,i)||v.ATTR_TRANSFORMS[i]||!(0,v.checkAttributeByTagName)(r,i))continue;const u=(0,v.camelToAttr)(i)||i,l=(0,E.createEffect)(()=>{try{const g=L.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,(0,v.serializeAttrValue)(u,g??""))}catch(g){F(s,i,g)}},{depth:s.path.length,label:P(s,i)});l._attrName=u.toLowerCase(),s.__effects.push(l)}if(In(t),Yn(t),typeof t.onStateUpdate=="function"&&Array.isArray(t.stateDeps)){const i=t.onStateUpdate,f=t.stateDeps;let d=!1,u=[];const l=(0,E.createEffect)(()=>{const g=[];for(let h=0;h<f.length;h++){const _=f[h];try{g[h]=typeof _=="function"?_(t,t.state,t.context):t.state?.[_]}catch{g[h]=void 0}}if(!d){d=!0,u=g;return}let x=g.length!==u.length;for(let h=0;!x&&h<g.length;h++)g[h]!==u[h]&&(x=!0);const p=u;u=g,x&&(0,W.withDesignSystem)(t,()=>{try{i(t,t.state,t.context,{prev:p,next:g})}catch(h){if((0,z.reportLifecycleError)(t,"onStateUpdate",h),t.context?.strictMode)throw h}})},{depth:s.path.length,label:P(s,"onStateUpdate")});s.__effects.push(l)}Vn(t)}function Xo(t){const o=t.parent,s=o?.node;if(!s||!t.node){Ls(t,t.parent);return}let n=null;const e=Object.keys(o),c=e.indexOf(t.key);for(let a=c+1;a<e.length;a++){const r=o[e[a]];if(r?.node?.parentNode===s){n=r.node;break}}n?s.insertBefore(t.node,n):s.appendChild(t.node)}function Jo(t){os(t),te(t),gs(t),pe(t),le(t)}function mo(t,o,s){let n=R(t,t.ifDeps,s);const e=(0,E.createEffect)(()=>{const c=!o.__ifInitialized&&o.__ifLateMerge;if(c){const i=t.context?.components||{};c.names.some(f=>i[f]||i["smbls."+f])&&(o.__ifLateMerge=null,cn(t,c),n=R(t,t.ifDeps,typeof t.if=="function"?t.if:s))}let a;try{a=n(t,t.state,t.context)}catch(i){if(a=!1,o.__ifError=i,typeof console<"u"&&console.warn){const f=t.key||t.tag||"?";console.warn(`[smbls] \`if:\` reactive effect threw on ${f} \u2014 treating as false:`,i?.message||i)}return}const r=o.__if;if(o.__if=!!a,r&&!o.__if&&t.node){t.node.remove();try{typeof t.onRemove=="function"&&t.onRemove(t)}catch(i){console.error("[smbls] onRemove error:",i)}}else if(!r&&o.__if)if(o.__ifInitialized)t.node||(t.node=(0,nt.cacheNode)(t)),t.node&&(t.node.ref=t),Xo(t),os(t),gs(t),N("Render",t,{}),so(t,{});else{if(o.__ifInitialized=!0,o.__ifLateMerge=null,t.tag||(t.tag=(0,nt.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,nt.cacheNode)(t)),!t.node)return;if(t.parent?.__ref?.__children&&!t.parent.__ref.__children.includes(t.key)&&t.parent.__ref.__children.push(t.key),t.tag==="fragment"&&!o.__fragmentAnchor){const f=(t.context?.document||globalThis.document).createComment("");t.node.appendChild(f),o.__fragmentAnchor=f}N("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id),Ts(t,{}),Qo(t,{skipIfEffect:!0}),Jo(t),Ds(t,{}),Xo(t),N("Create",t,{}),N("Complete",t,{}),N("Render",t,{}),N("RenderRouter",t,{}),so(t,{})}},{depth:o.path.length,label:P(o,"if")});o.__effects.push(e)}function Nt(t,o){const s=t.node;if(!s)return;const n=o==null||typeof o=="object"?"":String(o);if(t.tag==="string"){s.nodeValue!==n&&(s.nodeValue=n);return}const e=t.__ref;let c=e?e.__textNode:null;if(c&&c.parentNode!==s&&(c=null),!c){const a=s.firstChild;a&&a.nodeType===3&&(c=a)}c?c.nodeValue!==n&&(c.nodeValue=n):s.firstChild?(c=(s.ownerDocument||t.context?.document||globalThis.document).createTextNode(n),s.insertBefore(c,s.firstChild)):(s.textContent=n,c=s.firstChild&&s.firstChild.nodeType===3?s.firstChild:null),e&&(e.__textNode=c||null)}function Pn(t,o){return o!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function On(t,o){if(o===null)return;const s=t.hasAttribute("checked");s!==o&&t.checked!==s&&(t.checked=s)}function Ft(t,o,s,n){s==null||s===!1&&!(0,v.isEnumeratedTrueFalseAttr)(o)?Wt(t,o,null):typeof s=="function"||typeof s=="object"||(n&&o==="src"&&"src"in t?t.src=s:Wt(t,o,(0,v.serializeAttrValue)(o,s)))}function Wt(t,o,s){const n=Pn(t,o);s==null?t.removeAttribute(o):t.setAttribute(o,s),On(t,n)}function ts(t,o){const s=t.node;if(!s||!("value"in s))return;const n=o==null?"":String(o);if(s.value===n)return;const e=typeof document<"u"&&document.activeElement===s,c=e&&typeof s.selectionStart=="number"?s.selectionStart:null,a=e&&typeof s.selectionEnd=="number"?s.selectionEnd:null;if(s.value=n,e&&c!=null&&a!=null)try{s.setSelectionRange(c,a)}catch{}const r=t.__ref&&t.__ref.__autoGrow;r&&r.active&&r.resize()}function os(t){const{node:o}=t;if(o){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Nt(t,t.text),Ss(t),typeof t.html=="string"&&(o.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&!(typeof t.value=="string"&&t.value.includes("{{"))&&"value"in o){const s=String(t.value);o.value!==s&&(o.value=s)}if(t.style&&typeof t.style=="object"){let s=t.style;for(const n in t.style)if(typeof t.style[n]=="function"){s={};for(const e in t.style)typeof t.style[e]!="function"&&(s[e]=t.style[e]);break}et(o,$t(t,s))}if(t.attr&&typeof t.attr=="object")for(const s in t.attr){const n=t.attr[s];typeof n=="function"||typeof n=="object"||n!=null&&(typeof n=="string"&&n.includes("{{")||n===!1&&!(0,v.isEnumeratedTrueFalseAttr)(s)||o.setAttribute&&o.setAttribute(s,(0,v.serializeAttrValue)(s,n)))}if(typeof t.themeModifier=="string"&&t.themeModifier&&o.setAttribute&&o.setAttribute("data-theme",t.themeModifier),t.data&&typeof t.data=="object")for(const s in t.data){const n=t.data[s];typeof n=="function"||typeof n=="object"||n==null||n===!1||typeof n=="string"&&n.includes("{{")||o.dataset&&(o.dataset[s]=n===!0?"":n)}if(t.classlist||t.class){const s=t.classlist||t.class;if(typeof s=="string")s.split(" ").forEach(n=>n&&o.classList.add(n));else if(typeof s=="object")for(const n in s){const e=typeof s[n]=="function"?s[n](t,t.state,t.context):s[n];e&&o.classList.add(typeof e=="string"?e:n)}}}}function gt(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function Tn(t){if(!t||typeof t!="object")return!1;for(const o in t){const s=t[o];if(s&&typeof s=="object"&&!Array.isArray(s))return!0}return!1}function Tt(t,o){if(!t||!t.style||!o)return null;const s=t.style,n=[];for(const e in o){if(o[e]==null||e.charAt(0)==="&")continue;const a=tt(e);n.push(a,uo(s,a),ss(s,a))}return n}function uo(t,o){return typeof t.getPropertyValue=="function"?t.getPropertyValue(o):""}function ss(t,o){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(o):""}function tt(t){return(0,I.cssPropName)(t)}function lo(t,o,s){if(!t||!t.style||!o||!o.length)return;const n=t.style,e=new Set;if(s&&typeof s=="object")for(const c in s)s[c]==null||c.charAt(0)==="&"||e.add(tt(c));for(let c=0;c<o.length;c+=3){const a=o[c];e.has(a)||uo(n,a)===o[c+1]&&typeof n.removeProperty=="function"&&n.removeProperty(a)}}function Dt(t,o){if(!o||!t||!t.style)return!1;const s=t.style;for(let n=0;n<o.length;n+=3)if(uo(s,o[n])!==o[n+1]||ss(s,o[n])!==o[n+2])return!1;return!0}const Lt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,ns=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",zt=t=>Lt(t)?t:"--"+t;function Yt(t,o){if(!rt(t))return null;let s=null;for(const n of Object.keys(t)){if(!n)continue;let e=t[n];if(typeof e=="function"){if(!o)continue;e=e(o,o.state,o.context)}ns(e)&&(s||(s={}),s[zt(n)]=e)}return s}function es(t,o,s,n,e){rs(t,e,R(t,n,s),c=>ns(c)?{[o]:c}:null)}function rs(t,o,s,n,e){const c=t.__ref;let a,r=null;const i=(0,E.createEffect)(()=>{(0,W.withDesignSystem)(t,()=>{try{const f=n(s(t,t.state,t.context)),d=t.node;if(!d||!d.style)return;const u=gt(f);(u===null||u!==a||!Dt(d,r))&&(a=u,lo(d,r,f),f&&et(d,f),r=f?Tt(d,f):null,e&&e(f))}catch(f){F(c,o,f)}})},{depth:c.path.length,label:P(c,o)});c.__effects.push(i)}function Dn(t){const o=t.__ref,s=t.vars;if(typeof s=="function"){Ln(t,s),o.__exec.vars=s;return}if(rt(s))for(const n of Object.keys(s)){const e=s[n];!n||typeof e!="function"||es(t,zt(n),e,yt(t.varsDeps,n),"vars."+n)}}function Ln(t,o){const s=t.__ref;rs(t,"vars",R(t,t.varsDeps,o),n=>Yt(n),n=>{s.__varsInline=n?new Set(Object.keys(n)):null})}function po(t,o){if(typeof t[o]=="function"&&((0,Q.isCssProp)(t.tag||"div",o)||o.charCodeAt(0)===45))return!0;if(!Lt(o))return!1;const s=t.vars;if(typeof s=="function"){const n=t.__ref&&t.__ref.__varsInline;return!!(n&&n.has(o))}if(!rt(s))return!1;for(const n of Object.keys(s))if(typeof s[n]=="function"&&zt(n)===o)return!0;return!1}function Rn(t){let o=null;for(const s in t)t[s]!=null&&s.charAt(0)!=="&"&&(o||(o=new Set),o.add(tt(s)));return o}function Mn(t,o,s,n){const e=t.__ref;if(!e)return;let c=null;if(s)for(const a of s){if(n&&n.has(a))continue;const r=o[a];if(r==null||typeof r=="object")continue;const i=tt(a);I.CSS_LONGHAND_SHORTHANDS[i]&&(c||(c={}),c[i]=r)}e.__declaredLonghands=c}function is(t,o){const s=t.__ref,n=s&&s.__declaredLonghands;if(!n||!o)return null;let e=null;for(const c in n){if(o.has(c))continue;const a=I.CSS_LONGHAND_SHORTHANDS[c];let r=!1;for(let i=0;i<a.length;i++)if(o.has(a[i])){r=!0;break}r&&(e||(e={}),e[c]=n[c])}return e}function cs(t,o){const s=t.node;et(s,o);const n=Rn(o);if(!n)return o;const e=t.__ref;if(e)if(e.__inlineCssKeys)for(const a of n)e.__inlineCssKeys.add(a);else e.__inlineCssKeys=new Set(n);const c=is(t,n);return c?(et(s,c),Object.assign({},o,c)):o}function Nn(t){const o=t.__ref;if(!o||!o.__inlineCssKeys||!o.__declaredLonghands)return;const s=is(t,o.__inlineCssKeys);s&&et(t.node,s)}function $t(t,o){return!o||typeof o!="object"?o:(0,W.withDesignSystem)(t,()=>{try{return(0,k.resolveStyleBlockTokens)(o,t)}catch{return o}})}function et(t,o){if(!t||!o||!t.style)return;let s=null;for(const n in o){const e=o[n];if(e!=null){if(n.charAt(0)==="&"&&typeof e=="object"){s||(s={}),s[n]=e;continue}try{const c=String(e),a=(0,I.cssPropName)(n),r=c.trim(),i=/\s*!important\s*$/.test(r),f=r.replace(/\s*!important\s*$/,"");t.style.setProperty(a,f,i?"important":"")}catch{}}}s&&Fn(t,s)}function Fn(t,o){const s=`_ds${Eo.scopedStyleId++}`;t.classList.add(s);const n=t.ownerDocument;let e=n.querySelector("style[data-smbls-scoped]");e||(e=n.createElement("style"),e.setAttribute("data-smbls-scoped",""),n.head.appendChild(e));let c="";for(const a in o){const r="."+s,i=a.replace(/&/g,r).split(",").map(d=>{const u=d.trim();return u.includes(r)?u:r+u}).join(", "),f=o[a];if(typeof f=="object"){let d="",u="";for(const l in f){const g=f[l];if(typeof g=="object"){const x=l.includes("&")?i.split(", ").map(h=>l.replace(/&/g,h)).join(", "):i.split(", ").map(h=>`${h} ${l}`).join(", ");let p="";for(const h in g)p+=`${tt(h)}: ${g[h]};`;u+=(0,st.wrapHoverRule)(`${x} { ${p} }`,x)+`
5
- `}else d+=`${tt(l)}: ${g};`}d&&(c+=(0,st.wrapHoverRule)(`${i} { ${d} }`,i)+`
6
- `),u&&(c+=u)}}c&&(e.textContent+=c)}const fs=new Set;function as(t){if(!Array.isArray(t))return"";const o=[];for(let s=0;s<t.length;s++)typeof t[s]=="string"&&t[s].length&&o.push(t[s]);return o.sort(),o.join("|")}function $n(t,o,s){const n=as(s);queueMicrotask(()=>{if(!t.__ref)return;let e;try{e=o(t,t.state,t.context)}catch{return}if(as(e)===n)return;const c=t.__ref.path?t.__ref.path.join("."):t.key||"?";fs.has(c)||(fs.add(c),console.warn(`[smbls] subscribeTo function at "${c}" resolved to a DIFFERENT key list one microtask after create \u2014 wired [${s.join(", ")||"(none)"}], probed [${Array.isArray(e)?e.join(", "):String(e)}]. subscribeTo's function form is resolved ONCE at element-create time (registerSubscribeToEffects, @symbo.ls/element create.js) \u2014 this element stays wired to the ORIGINAL list for its whole lifetime, so this drift is invisible to the reactive effect and any key only present in the new list will never trigger onUpdate. If the watched key genuinely is not known until later (e.g. a module config that loads after shell boot), route the write through an imperative call instead of subscribeTo \u2014 see functions/moduleOpenBridge.js's moduleOpenPage (workspace repo) for the house pattern.`))})}function In(t){const o=t.subscribeTo,s=typeof o=="function";let n=o;if(s)try{n=o(t,t.state,t.context)}catch{n=null}if(s&&(0,it.isLoudDevRuntime)()&&$n(t,o,Array.isArray(n)?n:[]),!Array.isArray(n)||n.length===0)return;const e=t.__ref;for(let c=0;c<n.length;c++){const a=n[c];if(typeof a!="string"||a.length===0)continue;const r=a.split("."),i=r[0],f=r.slice(1),d={value:!1},u=(0,E.createEffect)(()=>{const l=t.state&&((0,$.isStore)(t.state)?t.state.root:null);if(!l||!(0,$.isStore)(l))return;let g=l;g=g[i];for(let p=0;p<f.length&&!(g==null||typeof g!="object");p++)if((0,$.isStore)(g))g=g[f[p]];else break;if(!d.value)return;let x=!1;if(typeof t.onBeforeUpdate=="function"&&(0,W.withDesignSystem)(t,()=>{try{if($s(e)){const p=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});p&&typeof p.then=="function"?p.then(()=>It(e,!1),h=>{It(e,!0),(0,z.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:h})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",h)}):(It(e,!1),p===!1&&(x=!0))}}catch(p){It(e,!0),(0,z.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}}),!x&&t.node&&e.__effects)for(let p=0;p<e.__effects.length;p++){const h=e.__effects[p];h&&h!==u&&!h._disposed&&!h._isSubscribeToEffect&&typeof h._execute=="function"&&h._execute()}!x&&typeof t.onUpdate=="function"&&(0,W.withDesignSystem)(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(p){(0,z.dispatchPluginHook)("error",t,{hook:"onUpdate",error:p})||console.error("[DOMQL] subscribeTo onUpdate error:",p)}})},{depth:e.path.length,label:P(e,"subscribeTo("+a+")")});d.value=!0,u._isSubscribeToEffect=!0,e.__effects.push(u)}}function ho(t,o){return t.charCodeAt(0)===64&&t.length>1&&!t.startsWith("@media")&&!t.startsWith("@keyframes")&&!t.startsWith("@supports")&&!t.startsWith("@container")&&(t==="@dark"||t==="@light"||!o.context?.designSystem?.media?.[t.slice(1)])}function yo(t,o){if(t.charCodeAt(0)!==64||/^@(media|supports|container|keyframes)\b/.test(t))return t;const s=o.context?.designSystem?.media?.[t.slice(1)];return s?/^@(media|supports|container)\b/.test(s)?s:`@media ${s}`:t}const us=new Set;function Bn(t,o){const s=o?.__ref?.path?o.__ref.path.join("."):o?.key||"?",n=s+"::"+t;us.has(n)||(us.add(n),console.warn(`[smbls/css] "${t}" at ${s} is a CHILD-COMPONENT key nested inside a pseudo/selector block (":hover", "@dark", etc.) \u2014 that is never a valid CSS selector fragment. The rule is DROPPED (not shipped as a dead/never-matching selector). To reveal a child on a parent state, target the child's OWN class from the parent selector instead, e.g. move the declaration onto the child element itself, or use a sibling-selector combinator in a top-level style block.`))}const ds=new Map;function Hn(t){let o=ds.get(t);if(o)return o;o=[];const s=n=>{if(n)for(const e of n)o.push((0,I.cssCamelName)(e))};return s(I.CSS_LONGHAND_SHORTHANDS[t]),s(I.CSS_SHORTHAND_LONGHANDS[t]),ds.set(t,o),o}function ls(t,o,s){if(po(t,o)||s&&s.has(o))return!0;const n=Hn(tt(o));for(let e=0;e<n.length;e++){const c=n[e];if(po(t,c)||s&&s.has(c))return!0}return!1}function bt(t,o,s,n){const e={},c=new Set,a=(r,i,f)=>{const d=f?new Set(Object.keys(e)):null;if(k.CSS_PROPS_REGISTRY[r]){const u=k.CSS_PROPS_REGISTRY[r](i,o,o.state,o.context);if(u){const l=Array.isArray(u)?u:[u];for(const g of l)g&&Object.assign(e,g)}}else e[r]=i;if(f)for(const u in e)d.has(u)||c.add(u)};for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let i=t[r];if(typeof i=="function"&&(i=i(o,o.state,o.context)),!(i==null||typeof i=="function")){if(typeof i=="object"&&!Array.isArray(i)){if(r==="style"){for(const u in i){let l=i[u];typeof l=="function"&&(l=l(o,o.state,o.context)),!(l==null||typeof l=="function")&&a(u,l,ls(o,u,n))}continue}if(r==="vars"){const u=Yt(i,o);if(u)for(const l in u)a(l,u[l],po(o,l)||!!(n&&n.has(l)));continue}if(ho(r,o)){const u=bt(i,o,!1,n);Object.keys(u).length&&(e[`[data-theme="${r.slice(1)}"] &`]=u);continue}if(/^[A-Z][A-Za-z0-9]*$/.test(r)){(0,it.isLoudDevRuntime)()&&Bn(r,o);continue}const f=yo(r,o),d=bt(i,o,!1,n);Object.keys(d).length&&(e[f]=d);continue}a(r,i,ls(o,r,n))}}if(s)for(const r in e)c.add(r);for(const r of c){const i=e[r];typeof i=="string"&&!i.includes("!important")&&(e[r]=i+" !important")}return e}const rt=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ps(t,o){for(const s in o){const n=o[s];t[s]=rt(n)?ps(rt(t[s])?t[s]:{},n):n}return t}function Un(t,o){if(!rt(o))return;let s;for(const n of t.split(" ")){const e=n?o[n]:null;rt(e)&&(s=ps(s||{},e))}return s}function _o(t,o){if(o===void 0&&(o=0),o>8)return!1;if(typeof t=="function")return!0;if(t&&typeof t=="object"&&!Array.isArray(t)){for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&_o(t[s],o+1))return!0}return!1}function hs(t,o,s){if(!o||typeof o!="object"||Array.isArray(o))return null;if(ho(t,s)){const c=bt(o,s,!1);return Object.keys(c).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:c}:null}const n=yo(t,s),e=bt(o,s,!1);return Object.keys(e).length?{cssProp:n,block:e}:null}function Vn(t){const o=t.__ref;for(const s of Object.keys(t)){if(!no(s))continue;const n=t[s];if(!n||typeof n!="object"||Array.isArray(n)||!_o(n))continue;let e=null,c;const a=(0,E.createEffect)(()=>{if(!t.node)return;const r=t.context?.designSystem;r&&(0,M.pushConfig)(r);let i,f=!1;try{const d=hs(s,n,t),u=d?gt(d.block)+"::"+d.cssProp:null;if(u!==null&&u===c)f=!0;else if(c=u,d){const l=(0,st.css)({[d.cssProp]:d.block},null,t.context?.cssPrefix);i=l?l.split(" ").filter(Boolean):null}else i=null}finally{r&&(0,M.popConfig)()}if(!(f||!t.node.classList)){if(e)for(const d of e)t.node.classList.remove(d);if(i&&i.length)for(const d of i)t.node.classList.add(d);e=i}},{depth:o.path.length,label:P(o,"cssBlock("+s+")")});o.__effects.push(a)}}const Gn=()=>!0,Kn=(t,o)=>{const s=t.charAt(0);return(s===":"||s==="@"||s==="&"||s==="[")&&o&&typeof o=="object"&&!Array.isArray(o)?!0:!!k.CSS_PROPS_REGISTRY[t]||!!(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(t))||Lt(t)||t==="vars"};function Wn(t,o,s){const n={};let e=!1;for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&(r!=="data"&&r!=="aria"&&(Kn(r,s[r])||H.REGISTRY.has(r))?n[r]=!0:e=!0);if(!e)return null;const c=(0,v.extractConditionalAttrs)({[o]:s},t.tag||"div",n,Gn);let a=null;for(const r in c)/^on/i.test(r)||(a||(a={}),a[r]=c[r]);return a}function ys(t,o,s,n,e,c){const a=t.node;let r=null;const i=f=>{(r||(r=[])).push(f)};for(const f in n){const d=o.owners.get(f),u=d===s;if(!c&&d!==void 0&&!u)continue;let l;try{l=n[f](t)}catch(x){F(t.__ref,"conditional("+s+")."+f,x),u&&i(f);continue}if(typeof l=="string"&&l.includes("{{")&&(l=L.replaceLiteralsWithObjectFields.call(t,l,t.state)),u&&a.getAttribute(f)!==o.written.get(f)){i(f);continue}if(l==null||typeof l=="object"||typeof l=="function"){u&&_s(a,o,f);continue}const g=l===!1&&!(0,v.isEnumeratedTrueFalseAttr)(f)?null:String((0,v.serializeAttrValue)(f,l));i(f),!(u&&g===o.written.get(f))&&(d===void 0&&o.base.set(f,a.getAttribute(f)),Wt(a,f,g),o.owners.set(f,s),o.written.set(f,g))}e.appliedAttrs=r}function _s(t,o,s){t.getAttribute(s)===o.written.get(s)&&Wt(t,s,o.base.get(s)),o.owners.delete(s),o.base.delete(s),o.written.delete(s)}function zn(t,o,s,n){const e=n.appliedAttrs;if(n.appliedAttrs=null,!!e)for(const c of e)o.owners.get(c)===s&&_s(t.node,o,c)}function gs(t){const o=t.__ref&&t.__ref.__conditionalAttrs,s=t.node;if(!(!o||!o.owners.size||!s||!s.getAttribute))for(const n of o.owners.keys()){const e=o.written.get(n),c=s.getAttribute(n);c!==e&&(o.base.set(n,c),e==null?s.removeAttribute(n):s.setAttribute(n,e))}}function Yn(t){const o=t.__ref;o.__conditionalRunners=[];let s=null;const n=new Map;for(const e of Object.keys(t)){const c=e.charAt(0);if(c!=="."&&c!=="!")continue;const a=e.slice(1);if(!a)continue;if(/[:@\s>~+[\]]/.test(a)){if(typeof console<"u"&&console.warn){const h=a.split(/[:@\s>~+[\]]/)[0];console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} will never match \u2014 the whole string after \`${c}\` is read as one prop name. Nest the selector inside instead: \`${c}${h}: { '${a.slice(h.length)}': {...} }\`.`)}continue}const r=t[e];if(!r||typeof r!="object")continue;const i=c==="!",f={lastMatch:!1,appliedKeys:null,appliedClasses:null,appliedAttrs:null},d=Wn(t,e,r);d&&!s&&(s=o.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});const u=new Set;for(const h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;const _=h.charAt(0),w=r[h];if(!((_===":"||_==="@"||_==="&"||_==="[")&&w&&typeof w=="object"&&!Array.isArray(w))){if(h==="vars"&&rt(w)){for(const y of Object.keys(w))y&&u.add(zt(y));continue}u.add(h)}}const l=()=>{let h;const _=t[a];if(_===void 0){const b=!!t.state&&a in t.state,A=t.state?t.state[a]:void 0;if(b||A!==void 0)h=A;else{const S=t.context?.cases?.[a];if(S===void 0)return;try{h=typeof S=="function"?S.call(t,t):S}catch(C){h=!1,o.__conditionalError=C,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,C?.message||C)}}}else if(typeof _=="function")try{h=_(t,t.state,t.context)}catch(b){h=!1,o.__conditionalError=b,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` predicate threw on ${t.key||"?"} \u2014 treating as false:`,b?.message||b)}else h=_;const w=i?!h:!!h;if(!t.node)return;const y=t.context?.designSystem;if(w===f.lastMatch){if(w&&d&&t.node.setAttribute){y&&(0,M.pushConfig)(y);try{ys(t,s,e,d,f,!1)}finally{y&&(0,M.popConfig)()}}return}f.lastMatch=w,y&&(0,M.pushConfig)(y);try{if(w){const b={},A={};let S=!1;for(const j in r){if(!Object.prototype.hasOwnProperty.call(r,j))continue;const O=r[j],q=j.charAt(0);if((q===":"||q==="@"||q==="&"||q==="[")&&O&&typeof O=="object"&&!Array.isArray(O)){if(ho(j,t)){const V=bt(O,t,!1,u);Object.keys(V).length&&(A[`[data-theme="${j.slice(1)}"] &`]=V,S=!0)}else{const V=yo(j,t),B=bt(O,t,!1,u);Object.keys(B).length&&(A[V]=B,S=!0)}continue}const dt=typeof O=="function"?O(t,t.state,t.context):O;if(dt!=null){if(k.CSS_PROPS_REGISTRY[j]){const V=k.CSS_PROPS_REGISTRY[j](dt,t,t.state,t.context);if(V){const B=Array.isArray(V)?V:[V];for(const G of B)G&&Object.assign(b,G)}}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(j))b[j]=dt;else if(Lt(j))b[j]=dt;else if(j==="vars"){const V=Yt(dt,t);V&&Object.assign(b,V)}}}const C=Object.keys(b);if(C.length){et(t.node,b);for(const j of C)n.set(j,e);f.appliedKeys=C}else f.appliedKeys=null;if(S){const j=(0,st.css)(A,null,t.context?.cssPrefix,{state:!0}),O=j?j.split(" ").filter(Boolean):[];if(O.length&&t.node.classList){for(const q of O)t.node.classList.add(q);f.appliedClasses=O}else f.appliedClasses=null}else if(f.appliedClasses){for(const j of f.appliedClasses)t.node.classList.remove(j);f.appliedClasses=null}d&&t.node.setAttribute&&ys(t,s,e,d,f,!0)}else{if(f.appliedAttrs&&zn(t,s,e,f),f.appliedKeys){for(const b of f.appliedKeys)n.get(b)===e&&(Lt(b)?t.node.style.removeProperty(b):t.node.style[b]="",n.delete(b));f.appliedKeys=null}if(f.appliedClasses){for(const b of f.appliedClasses)t.node.classList.remove(b);f.appliedClasses=null}}}finally{y&&(0,M.popConfig)()}};o.__conditionalRunners.push(l);const g=R(t,t[a+"Deps"],l),x=(0,E.createEffect)(g,{depth:o.path.length,label:P(o,"conditional("+e+")")}),p=o.__exec&&o.__exec[a]||t[a];x._sources.size===0&&typeof p=="function"&&(0,it.isLoudDevRuntime)()&&hn(p)&&console.warn(`[smbls] conditional \`${e}\` on ${t.key||"?"} subscribed to nothing \u2014 its predicate tracked no reactive read on its first run, so no state write will ever re-evaluate it (only a direct element.update() on this element re-runs it). If the predicate guards its state reads (\`in\`, short-circuits, \`?.\`), declare \`${a}Deps: [...]\` (state-key strings or \`(el, s) => \u2026\` selectors) so the subscription is armed unconditionally.`),o.__effects.push(x)}}const go=new WeakSet,bo=new WeakMap;function qn(t){const o=bo.get(t);if(o==="painted")return!1;if(o===void 0){bo.set(t,"open");const s=t.defaultView,n=()=>{bo.set(t,"painted")};s&&typeof s.requestAnimationFrame=="function"?s.requestAnimationFrame(n):setTimeout(n,0)}return!0}function Zn(t){const o=t.ownerDocument;!o||go.has(o)||qn(o)||(go.add(o),queueMicrotask(()=>{go.delete(o);const s=o.body||o.documentElement;s&&s.offsetWidth}))}const Ao=new WeakSet;let bs=!1;function As(t){return t.startsWith("[data-theme=")||t.startsWith("@media")&&t.includes("prefers-color-scheme")}function xo(t,o){const s={...t};for(const n in o){const e=o[n],c=s[n];s[n]=e&&typeof e=="object"&&c&&typeof c=="object"?xo(c,e):e}return s}function xs(t,o){const s={};for(const n in t){const e=t[n];if(e&&typeof e=="object"){const c=xs(e,o);Object.keys(c).length&&(s[n]=c)}else o.has(n)||(s[n]=e)}return s}function Qn(t,o,s){let n=1/0,e=-1/0;for(const a of o.values())a<n&&(n=a),a>e&&(e=a);if(s)for(const a of s.values())a>e&&(e=a);if(e<=n)return null;let c=null;for(const[a,r]of o){if(r===e)continue;const i=Xn(a);if(i)for(let f=0;f<i.length;f+=3){const d=i[f],u=i[f+1],l=i[f+2],g=t[u]!=null?o.get(u):void 0,x=s&&s.get(d),p=g!==void 0&&g>r&&(0,I.cssShorthandStatesLonghand)(d,t[u],l),h=!p&&x!==void 0&&x>r&&(0,I.cssShorthandStatesLonghand)(d,void 0,l);if(p||h){p&&delete t[a],c||(c=new Set),c.add(a);break}}}return c}const ws=new Map;function Xn(t){let o=ws.get(t);if(o!==void 0)return o;const s=tt(t),n=I.CSS_LONGHAND_SHORTHANDS[s];if(o=null,Array.isArray(n)){o=[];for(const e of n)o.push(e,(0,I.cssCamelName)(e),s)}return ws.set(t,o),o}function Ss(t){const{node:o}=t;if(!o)return;if(bs||(bs=!0,(0,st.css)({display:"none"})),Ao.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}Ao.add(t);const s=t.context?.designSystem;s&&(0,M.pushConfig)(s),(0,k.pushStaticCssPass)();try{const n={};let e=!1,c=[],a=null,r=null,i=null;const f=t.__ref&&t.__ref.__mergeLayer;let d,u=null,l=null;const g=(y,b)=>{if(b&&typeof b=="object"&&As(y)){r||(r={});const A=r[y];A&&(b=xo(A,b)),r[y]=b}else(b===null||typeof b!="object")&&(i||(i=new Set),i.add(y),d!==void 0&&(u||(u=new Map),u.set(y,d)));n[y]=b};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&k.CSS_PROPS_REGISTRY.theme){const y=k.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(y){const b=A=>{for(const S in A){const C=A[S];C&&typeof C=="object"&&As(S)&&(a||(a={}),a[S]=C),n[S]=C}};if(Array.isArray(y))for(const A of y)A&&b(A);else b(y);e=!0}}const x=(y,b)=>{if(y==="vars"){const A=Yt(b);if(A){for(const S in A)g(S,A[S]);e=!0}return}if(k.CSS_PROPS_REGISTRY[y]){const A=k.CSS_PROPS_REGISTRY[y](b,t,t.state,t.context);if(A){if(Array.isArray(A)){for(const S of A)if(S)for(const C in S)g(C,S[C])}else for(const S in A)g(S,A[S]);e=!0}}else if(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(y))b!=null&&typeof b!="object"&&(g(y,b),e=!0);else if(y.charCodeAt(0)===45)b!=null&&typeof b!="object"&&(g(y,b),e=!0);else if((y.charAt(0)==="&"||y.charAt(0)==="@"||y.charAt(0)===":"||y.charAt(0)==="[")&&b&&typeof b=="object"&&!Array.isArray(b)){if(_o(b))return;const A=hs(y,b,t);A&&(g(A.cssProp,A.block),e=!0)}};if(typeof t.class=="string"){const y=Un(t.class,t.context?.designSystem?.class);if(y)for(const b in y)x(b,y[b])}const p=i?new Set(i):null,h=t.tag||"div";for(const y of Object.keys(t)){if(typeof t[y]=="function"){const A=f&&f.get(y);A!==void 0&&(0,Q.isCssProp)(h,y)&&(l||(l=new Map),l.set(tt(y),A));continue}if(d=f?f.get(y):void 0,y==="vars"){x(y,t[y]);continue}if(H.REGISTRY.has(y)||y==="theme")continue;const b=y.charCodeAt(0);b>=65&&b<=90||m(y)||(0,Q.isAttributeFirst)(h,y)||x(y,t[y])}d=void 0;const _=u?Qn(n,u,l):null;if(a)for(const y in a){let b=i?xs(a[y],i):a[y];r&&r[y]&&(b=xo(b,r[y])),Object.keys(b).length?n[y]=b:delete n[y]}if(Mn(t,n,i,_?new Set([...p||[],..._]):p),e){n.display&&String(n.display).includes("!important")&&(o.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);const y=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof y=="string"&&y!==""&&n.display&&n.display!==y&&(n.display=y);const b=(0,st.css)(n,null,t.context?.cssPrefix);if(c=b?b.split(" ").filter(Boolean):[],b&&o.classList){const A=c;let S=!1;for(const C of A)o.classList.add(C),S||(C.charCodeAt(0)===95&&C.charCodeAt(1)===99||C.charCodeAt(0)===95&&C.indexOf("_c",1)!==-1)&&(S=!0);S&&Zn(o)}}const w=t.__ref;if(w){const y=w.__staticCssClasses;if(y&&o.classList){const b=new Set(c);for(const A of y)b.has(A)||o.classList.remove(A)}w.__staticCssClasses=c}Nn(t)}finally{(0,k.popStaticCssPass)(),s&&(0,M.popConfig)(),Ao.delete(t)}}const Jn=t=>!!k.CSS_PROPS_REGISTRY[t]||!!(k.DEFAULT_CSS_PROPERTIES_LIST&&k.DEFAULT_CSS_PROPERTIES_LIST.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function mn(t){t&&t.node&&Ss(t)}function te(t){const{node:o}=t;if(!o||!o.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const e in t.aria){const c=t.aria[e];if(typeof c=="function"||typeof c=="object"||c==null||typeof c=="string"&&c.includes("{{"))continue;const a="aria-"+e.replace(/[A-Z]/g,r=>"-"+r.toLowerCase());o.setAttribute(a,(0,v.serializeAttrValue)(a,c))}const s=(0,v.applyAttrTransforms)(t);for(const e in s){const c=s[e];c!=null&&c!==!1&&typeof c!="function"&&typeof c!="object"&&o.setAttribute(e,c===!0?"":c)}const n=t.tag||"div";for(const e of Object.keys(t)){if(typeof t[e]=="function"||H.REGISTRY.has(e)||e==="on"||s[e]!==void 0)continue;const c=e.charCodeAt(0);if(!(c>=65&&c<=90)&&!m(e)&&!(0,Q.isCssProp)(n,e)&&(0,v.checkAttributeByTagName)(n,e)){let a=t[e];if(a==null)continue;if(typeof a=="string"&&a.includes("{{")){if(!v.ATTR_TRANSFORMS[e])continue;a=L.replaceLiteralsWithObjectFields.call(t,a,t.state)}if(a==null||typeof a=="function"||typeof a=="object"||a===!1&&!(0,v.isEnumeratedTrueFalseAttr)((0,v.camelToAttr)(e)||e))continue;const r=(0,v.camelToAttr)(e)||e;o.setAttribute(r,(0,v.serializeAttrValue)(r,a))}}}function oe(t,o){const{node:s}=t;if(!s||!s.setAttribute)return;const n=o.charCodeAt(0);if(n>=65&&n<=90||m(o))return;const e=t.tag||"div";if((0,Q.isCssProp)(e,o)||!(0,v.checkAttributeByTagName)(e,o))return;const c=(0,v.camelToAttr)(o)||o,a=c.toLowerCase(),r=t.__ref&&t.__ref.__effects;let i=!1;if(r)for(let u=0;u<r.length;u++){const l=r[u];l&&l._attrName===a&&!l._disposed&&typeof l._execute=="function"&&(i=!0,l._execute())}if(i)return;let f=t[o];const d=v.ATTR_TRANSFORMS[o];if(d&&f!=null){const u=d(t);u!==void 0&&(f=u)}typeof f=="string"&&f.includes("{{")&&(f=L.replaceLiteralsWithObjectFields.call(t,f,t.state)),Ft(s,c,f)}function se(t,o){const s=t.node,n=t.__ref;let e=n.__autoGrow;if(!o){if(e&&e.active){try{s.removeEventListener("input",e.resize)}catch{}ks(e),ct.delete(t),s.style.height="",e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""),Es(s,e,!1),e.active=!1,e.appliedMax=null,e.lastMeasure=0}return}e||(e=n.__autoGrow={active:!1,appliedMax:null,lastMeasure:0,lastWidth:null,watch:null,awaitingLayout:!1,appliedScroll:!1,fontsHooked:!1,attachAttempts:0,firstAttemptAt:null,resize:()=>{if(!s.isConnected){Rt(t,!0);return}if(!(s.scrollHeight>0)){e.awaitingLayout=!0,Cs(t,e);return}e.awaitingLayout=!1;const a=re(s),r=ie(a),i=s.style.height;s.style.height="0px",r&&So(s);const f=s.scrollHeight;if(!(f>0)){s.style.height=i,r&&So(s);return}const d=ce(s,a),u=d!=null&&f<d?d:f,l=ue(a),g=l!=null&&u>l;s.style.height=ae(g?l:u,a)+"px",r&&So(s),Es(s,e,g),e.lastMeasure=f,e.lastWidth=s.clientWidth,Cs(t,e)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{s.removeEventListener("input",e.resize)}catch{}ks(e),ct.delete(t)})),e.active||(s.addEventListener("input",e.resize),e.active=!0,ee(t,e));const c=typeof o=="object"&&o.max!=null?String(o.max):null;c!==e.appliedMax&&(c==null?e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""):s.style.maxHeight=c,e.appliedMax=c),e.resize()}function Rt(t,o){const s=t.__ref?.__autoGrow;s&&(o&&(s.attachAttempts=0,s.firstAttemptAt=null),ct.add(t),Vt())}function ne(){const t=Array.from(ct);ct.clear();for(let o=0;o<t.length;o++){const s=t[o],n=s.node,e=s.__ref?.__autoGrow;if(!(!n||!e||!e.active)){if(!n.isConnected){e.firstAttemptAt==null&&(e.firstAttemptAt=ht()),e.attachAttempts+=1,e.attachAttempts<=To&&ht()-e.firstAttemptAt<Do&&(ct.add(s),Vt());continue}e.attachAttempts=0,e.firstAttemptAt=null,e.resize()}}}function Cs(t,o){if(o.watch)return;const s=t.node;if(!s)return;const n=s.ownerDocument&&s.ownerDocument.defaultView,e=n&&n.ResizeObserver||(typeof ResizeObserver=="function"?ResizeObserver:null);if(typeof e!="function")return;const c=()=>{if(!o.active||!s.isConnected||!(s.scrollHeight>0))return;if(o.awaitingLayout){o.awaitingLayout=!1,Rt(t,!0);return}const r=s.clientWidth;o.lastWidth!=null&&Math.abs(r-o.lastWidth)<.5||(o.lastWidth=r,Rt(t,!0))};let a;try{a=new e(c),a.observe(s)}catch{return}o.watch=a}function ks(t){const o=t.watch;if(o){t.watch=null;try{o.disconnect()}catch{}}}function ee(t,o){if(o.fontsHooked)return;o.fontsHooked=!0;const s=t.node&&t.node.ownerDocument,n=s&&s.fonts&&s.fonts.ready;!n||typeof n.then!="function"||n.then(()=>{o.active&&t.node&&Rt(t,!0)},()=>{})}function re(t){const o=t.ownerDocument&&t.ownerDocument.defaultView;try{return o&&o.getComputedStyle?o.getComputedStyle(t):null}catch{return null}}const ft=t=>typeof t=="string"&&/^\s*-?\d*\.?\d+px\s*$/.test(t)?parseFloat(t):null,wo=t=>(ft(t.paddingTop)||0)+(ft(t.paddingBottom)||0),vs=t=>(ft(t.borderTopWidth)||0)+(ft(t.borderBottomWidth)||0);function ie(t){if(!t)return!1;const o=String(t.transitionProperty||"").split(","),s=String(t.transitionDuration||"0s").split(",");for(let n=0;n<o.length;n++){const e=o[n].trim();if(!(e!=="all"&&e!=="height")&&parseFloat(s[n%s.length])>0)return!0}return!1}function So(t){if(typeof t.getAnimations!="function")return;let o;try{o=t.getAnimations()}catch{return}for(let s=0;s<o.length;s++){const n=o[s];if(n&&n.transitionProperty==="height")try{n.cancel()}catch{}}}function ce(t,o){if(!o||!t.hasAttribute||!t.hasAttribute("rows"))return null;const s=parseInt(t.getAttribute("rows"),10);if(!(s>0))return null;const n=ft(o.lineHeight)||fe(t,o);return n>0?s*n+wo(o):null}const Mt=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],js=new WeakMap;function fe(t,o){const s=t.ownerDocument,n=s&&(s.body||s.documentElement);if(!n||!s.createElement)return null;let e=js.get(s);e||(e=new Map,js.set(s,e));const c=Mt.map(f=>o[f]||"").join("|");if(e.has(c))return e.get(c);const a=s.createElement("textarea");a.rows=1,a.setAttribute("aria-hidden","true"),a.tabIndex=-1;const r=a.style;r.position="absolute",r.visibility="hidden",r.top="0",r.left="-9999px",r.height="auto",r.minHeight="0",r.maxHeight="none",r.padding="0",r.border="0",r.boxSizing="content-box",r.overflow="hidden";for(let f=0;f<Mt.length;f++)o[Mt[f]]&&(r[Mt[f]]=o[Mt[f]]);let i=0;try{n.appendChild(a),i=a.clientHeight}catch{i=0}finally{a.parentNode&&a.parentNode.removeChild(a)}return i>0?(e.set(c,i),i):null}function ae(t,o){return o?o.boxSizing==="border-box"?t+vs(o):o.boxSizing==="content-box"?Math.max(0,t-wo(o)):t:t}function ue(t){if(!t)return null;const o=ft(t.maxHeight);if(o==null||!(o>0))return null;const s=wo(t),n=vs(t),e=t.boxSizing==="border-box"?o-n:o+s,c=ft(t.lineHeight);if(!(c>0))return e;const a=Math.floor((e-s)/c+1e-6);return a>=1?a*c+s:e}function Es(t,o,s){s?o.appliedScroll||(t.style.overflowY="auto",o.appliedScroll=!0):o.appliedScroll&&(t.style.overflowY==="auto"&&(t.style.overflowY=""),o.appliedScroll=!1)}const Ps=["srcObject","muted"],de=(t,o)=>t==="muted"?o===!0||o===""||o==="true"||o==="muted":o??null;function le(t){const o=t.node,s=t.__ref;if(!(!o||!s))for(let n=0;n<Ps.length;n++){const e=Ps[n],c=t[e];if(c===void 0||!(e in o))continue;const a=r=>{const i=de(e,r);if(o[e]!==i)try{o[e]=i}catch(f){F(s,e,f)}};if(typeof c=="function"){const r=R(t,t[e+"Deps"],c),i=(0,E.createEffect)(()=>{try{a(r(t,t.state,t.context))}catch(f){F(s,e,f)}},{depth:s.path.length,label:P(s,e)});s.__effects.push(i),s.__exec[e]=c}else a(c);e==="srcObject"&&(s.__releaseMedia=()=>{try{o.srcObject!=null&&(o.srcObject=null)}catch{}})}}function pe(t){if(!t.autoGrow)return;const o=t.node;if(!o||o.tagName!=="TEXTAREA")return;const s=t.__ref,n=t.autoGrow,e=typeof n=="function"?R(t,t.autoGrowDeps,n):null,c=(0,E.createEffect)(()=>{const a=t.autoGrow;let r=a;if(typeof a=="function")try{r=(a===n&&e?e:a)(t,t.state,t.context)}catch{r=null}se(t,r)},{depth:s.path.length,label:P(s,"autoGrow")});s.__effects||(s.__effects=[]),s.__effects.push(c),e&&(s.__exec.autoGrow=n)}const Os=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Ts(t,o){for(const s of Object.keys(t)){if(!m(s)||Os.has(s))continue;const n=(0,At.globalEventKeyInfo)(s);if(n){(0,At.registerGlobalEvent)(n,t,t[s]);continue}let e=t[s],c=null;if(e&&typeof e=="object"&&!Array.isArray(e)&&(c=e,e=c.handler),typeof e=="string"&&/^[A-Za-z_$][\w$]*$/.test(e)){const r=e;e=function(f){return t.call(r,f)}}if(typeof e!="function")continue;const a=on(s);H.LIFECYCLE_EVENTS.has(a)||(0,At.registerEvent)(sn(a),t,e,c)}he(t)}function he(t){const o=t.node;if(!o||!o.addEventListener)return;const s={};let n=!1;for(const l of Os){const g=t[l];typeof g=="function"&&(s[l]=g,n=!0)}if(!n)return;const e=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,c=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let a=0,r=0,i=0,f=!1;const d=l=>{const g=l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0];g&&(a=g.clientX,r=g.clientY,i=Date.now(),f=!0)},u=l=>{if(!f)return;f=!1;const g=l.changedTouches&&l.changedTouches[0]||l.touches&&l.touches[0];if(!g)return;const x=g.clientX-a,p=g.clientY-r,h=Date.now()-i;if(h>c)return;const _=Math.abs(x),w=Math.abs(p);if(Math.max(_,w)<e)return;let y;if(_>w*1.2)y=x<0?"left":"right";else if(w>_*1.2)y=p<0?"up":"down";else return;const b="onSwipe"+y.charAt(0).toUpperCase()+y.slice(1),A=s[b],S=s.onSwipe;A&&A.call(t,l,t,t.state,t.context),S&&S.call(t,{direction:y,dx:x,dy:p,dt:h,event:l},t,t.state,t.context)};o.addEventListener("touchstart",d,{passive:!0}),o.addEventListener("touchend",u,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{o.removeEventListener("touchstart",d)}catch{}try{o.removeEventListener("touchend",u)}catch{}})}function at(t,o){const s={...t};for(const n in o){const e=s[n],c=o[n];e&&c&&typeof e=="object"&&typeof c=="object"&&!Array.isArray(e)&&!Array.isArray(c)&&typeof e!="function"&&typeof c!="function"?s[n]=at(e,c):s[n]=c}return s}function Co(t,o,s,n,e){if(!o||!t.node)return;const c=t.childExtends,a=_t(t,"childProps");if(Array.isArray(o)){const r=t.tag==="fragment",i=t.context?.document||globalThis.document,f=r?null:i?.createDocumentFragment();if(!r&&!f)return;const d=t.childProps,u=t.childrenAs,l=y=>{let b=o[y];const A=b;(typeof b=="string"||typeof b=="number")&&(b={text:b});let S=d;if(typeof d=="function")try{S=d(t,b)}catch{S=null}let C=typeof d=="function"?Et(S):a;if(e&&u!=="state"&&(C=Pt(C,Et(A))),u==="state"){let O=A;(typeof A=="string"||typeof A=="number")&&(O={value:A,text:A}),b=S?{...S,state:O}:{state:O}}else S&&(b=at(S,b));if(c&&!b.ignoreChildExtends)if(b.extends){const O=Array.isArray(b.extends)?b.extends:[b.extends],q=Array.isArray(c)?c:[c];b={...b,extends:[...q,...O]}}else b={...b,extends:c};const j=Ro(b?.key,A,y,t);try{return ot(Ot(b,C),t,j,s)}catch(O){if(typeof console<"u"&&console.error){const q=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${j}" failed to construct at ${q} (initial render, skipping this row):`,O?.message||O)}return null}},g=t.__ref;if(!(n===!0&&!r&&!!g&&(s?.mountYield===!0||t.yieldChildren===!0))){for(let y=0;y<o.length;y++){const b=l(y);!r&&b?.node&&f.appendChild(b.node)}return r||t.node.appendChild(f),!0}const p=g.__childrenChunkGen=(g.__childrenChunkGen||0)+1;(0,U.openMountBudget)();const h=(0,U.childCostMeter)();let _=null;const w=y=>{if(g.__disposed||g.__childrenChunkGen!==p){_&&_.parentNode&&_.remove();return}for(let b=y;b<o.length;b++){h.begin();const A=l(b);A?.node&&(_?t.node.insertBefore(A.node,_):f.appendChild(A.node));const S=h.end();if(b+1<o.length&&(0,U.mountBudgetExhausted)(S)){_||(_=i.createComment("smbls-mount"),f.appendChild(_),t.node.appendChild(f));const C=b+1;(0,U.enqueueMountWork)(()=>w(C));return}}_?(_.remove(),t.node.tagName==="SELECT"&&qt(t,!0)):t.node.appendChild(f)};return w(0),(0,U.closeMountBudget)(),!0}if(typeof o=="string"){const r=Bo(o,t);if(Array.isArray(r))return Co(t,r,s,n,!0)}if(typeof o=="object")for(const r in o){if(H.REGISTRY.has(r))continue;let i=o[r];if(i==null||i===!1)continue;const f=e?Pt(a,Et(i)):a;if((typeof i=="string"||typeof i=="number")&&(i={text:i}),t.childProps&&(i=at(t.childProps,i)),c&&!i.ignoreChildExtends)if(i.extends){const d=Array.isArray(i.extends)?i.extends:[i.extends],u=Array.isArray(c)?c:[c];i={...i,extends:[...u,...d]}}else i={...i,extends:c};ot(Ot(i,f),t,Kt(t,r),s)}}function qt(t,o){const s=t.node;if(!s||s.tagName!=="SELECT")return;const n=s.options;if(!n||!n.length)return;const e=t.__ref,c=e&&e.__exec&&e.__exec.value,a=typeof c=="function",r=t.value!=null&&typeof t.value!="function";if(a||r){let d;if(a)try{d=c(t,t.state,t.context)}catch{return}else d=t.value,typeof d=="string"&&d.includes("{{")&&(d=L.replaceLiteralsWithObjectFields.call(t,d,t.state));const u=d==null?"":String(d);s.value!==u&&(s.value=u);return}const i=o||!(e&&e.__selectSynced);if(e&&(e.__selectSynced=!0),!i)return;let f=-1;for(let d=0;d<n.length;d++)n[d].defaultSelected&&(f=d);f>=0&&s.selectedIndex!==f&&(s.selectedIndex=f)}function Ds(t,o){let{children:s,content:n}=t;const e=t.childExtends,c=typeof s=="function"||Yo(t,"children");if(typeof s=="function"){const p=s;try{s=p(t,t.state,t.context)}catch(b){if(s=void 0,typeof console<"u"&&console.error){const A=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${A} (initial run, treating as empty):`,b?.message||b)}}qo(t,s),t.children=s;const h=t.__ref;let _=!1;const w=R(t,t.childrenDeps,p),y=(0,E.createEffect)(()=>{const b=_;_=!0;let A;try{A=w(t,t.state,t.context)}catch(B){if(typeof console<"u"&&console.error){const G=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${G}${b?"":" (initial tracking run)"}:`,B?.message||B)}return}if(!b||A===t.children)return;qo(t,A),t.children=A,h.__childrenChunkGen!=null&&h.__childrenChunkGen++;const S=typeof t.onContentUpdate=="function",C=S?[]:null,j=S?[]:null,O=S?[]:null;if(Array.isArray(A)&&t.childrenAs==="state"){const B=t.childProps,G=[],ko=new Map;for(let T=0;T<A.length;T++){const Z=A[T];let D=B;if(typeof B=="function")try{D=B(t,Z)}catch{D=null}const J=Ro(D&&D.key,Z,T,t);G.push(J),ko.set(J,{rawChild:Z,childProps:D})}const Is=new Set(G),Bs=h.__children.slice();for(const T of Bs)if(!Is.has(T)){const Z=t[T];Z?.remove&&Z.remove(),delete t[T],j&&j.push(T)}const wt=t.childExtends,Bt=t.tag==="fragment",Hs=t.context?.document||globalThis.document,St=Bt?null:Hs?.createDocumentFragment(),Xt=new Set;for(const T of G){const Z=ko.get(T),D=Z.rawChild,J=t[T];if(J&&J.state){if(D&&typeof D=="object"){const K=J.state,lt=K.$replace||K.replace,vo=K.$update||K.update;try{if(typeof lt=="function")lt.call(K,D);else if(typeof vo=="function"){for(const Y in K)if(!(Y==="__element"||Y==="root"||Y==="parent"||Y==="update")&&!Object.prototype.hasOwnProperty.call(D,Y))try{K[Y]=void 0}catch{}vo.call(K,D)}else for(const Y in D)K[Y]=D[Y]}catch(Y){if(typeof console<"u"&&console.error){const Vs=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to patch at ${Vs} (reconcile, keeping its previous data for this pass):`,Y?.message||Y)}}}O&&O.push(T);continue}let Jt=D;(typeof D=="string"||typeof D=="number")&&(Jt={value:D,text:D});const mt=Z.childProps;let X=mt?{...mt,state:Jt}:{state:Jt};const Us=typeof B=="function"?Et(mt):_t(t,"childProps");if(wt&&!X.ignoreChildExtends)if(X.extends){const K=Array.isArray(X.extends)?X.extends:[X.extends],lt=Array.isArray(wt)?wt:[wt];X={...X,extends:[...lt,...K]}}else X={...X,extends:wt};let to;try{to=ot(Ot(X,Us),t,T,o)}catch(K){if(typeof console<"u"&&console.error){const lt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${T}" failed to construct at ${lt} (reconcile, skipping this row):`,K?.message||K)}Xt.add(T);continue}!Bt&&to?.node&&St&&St.appendChild(to.node),C&&C.push(T)}if(!Bt&&St&&St.childNodes.length&&t.node&&t.node.appendChild(St),!Bt&&t.node){let T=null;for(const Z of G){const D=t[Z]?.node;if(!D)continue;const J=T?T.nextSibling:t.node.firstChild;D!==J&&t.node.insertBefore(D,J),T=D}}h.__children=Xt.size?G.filter(T=>!Xt.has(T)):G,S&&(C.length||j.length)&&Lo(t,{added:C,removed:j,kept:O}),qt(t,!1);return}const V=S?[...h.__children]:null;for(const B of[...h.__children]){const G=t[B];G?.remove&&G.remove(),delete t[B]}h.__children=[],Co(t,A,o,!1,!0),qt(t,!1),S&&Lo(t,{added:[...h.__children],removed:V,kept:[]})},{depth:h.path.length,label:P(h,"children")});h.__effects.push(y)}const a=Co(t,s,o,!0,c);if(n!=null&&!(n&&n.__ref)){let p=n;if(typeof p=="string"||typeof p=="number"?p={text:p}:typeof p!="object"&&(p={}),t.childProps&&(p=at(t.childProps,p)),e&&!p.ignoreChildExtends)if(p.extends){const _=Array.isArray(p.extends)?p.extends:[p.extends],w=Array.isArray(e)?e:[e];p={...p,extends:[...w,..._]}}else p={...p,extends:e};const h=Pt(_t(t,"childProps"),_t(t,"content"));ot(Ot(p,h),t,"content",o)}if(s&&!a)return;const r=t.context?.components||{},i=t.__ref&&t.__ref.__runtimeSource,f=i?{}:null;{const p=Object.keys(t);for(let h=0;h<p.length;h++){const _=p[h];if(!_.endsWith("Extends")||typeof t[_]!="string")continue;const w=_.slice(0,-7);if(!w||w.charCodeAt(0)<65||w.charCodeAt(0)>90)continue;const y={extends:t[_]};delete t[_];for(let b=h+1;b<p.length;b++){const A=p[b],S=A.charCodeAt(0);if(S>=65&&S<=90||H.REGISTRY.has(A)||typeof t[A]=="function"&&(A.startsWith("on")||A.startsWith(".")))break;const C=t[A];C!==void 0&&(y[A]=C,delete t[A],f&&jt(i,A)&&(f[w]||(f[w]={}),f[w][A]=i[A]))}t[w]&&typeof t[w]=="object"?t[w]={...y,...t[w]}:t[w]=y}}const d=o?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),l=p=>{if(H.REGISTRY.has(p)||typeof t[p]!="object"||t[p]===null)return;const h=p.charCodeAt(0);if(h<65||h>90)return;let _=t[p];if(_.__ref)return;if(!_.extends&&!_.extend){const y=r[p]||r[`smbls.${p}`];y&&(_={..._,extends:y})}if(t.childProps&&(_=at(t.childProps,_)),e&&!_.ignoreChildExtends)if(_.extends){const y=Array.isArray(_.extends)?_.extends:[_.extends],b=Array.isArray(e)?e:[e];_={..._,extends:[...b,...y]}}else _={..._,extends:e};const w=i?Pt(_t(t,"childProps"),Pt(f[p]||null,_t(t,p))):null;ot(Ot(_,w),t,p,o)};if(!d){for(const p of u)l(p);return}(0,U.openMountBudget)();const g=(0,U.childCostMeter)(),x=p=>{for(let h=p;h<u.length;h++){g.begin(),l(u[h]);const _=g.end();if(h+1<u.length&&(0,U.mountBudgetExhausted)(_)){const w=h+1;(0,U.enqueueMountWork)(()=>x(w));return}}};x(0),(0,U.closeMountBudget)()}function Ls(t,o,s){const{node:n}=t;if(!n)return;n.ref=t;const e=o?.tag==="fragment"?o.__ref?.__fragmentAnchor:null;if(e){const a=e.parentNode;if(a){if(s?.position==="before"&&s.node)a.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const r=s.node.nextSibling;a.insertBefore(n,r||e)}else a.insertBefore(n,e);return}}const c=o?.node||(o?.nodeType?o:null);if(c)if(s?.position==="before"&&s.node)c.insertBefore(n,s.node);else if(s?.position==="after"&&s.node){const a=s.node.nextSibling;a?c.insertBefore(n,a):c.appendChild(n)}else c.appendChild(n)}const Qt=3;function $s(t){return!t||t.__inBeforeUpdate||(t.__beforeUpdateFailCount||0)>=Qt?!1:(t.__inBeforeUpdate=!0,!0)}function It(t,o){t&&(t.__inBeforeUpdate=!1,o?(t.__beforeUpdateFailCount=(t.__beforeUpdateFailCount||0)+1,t.__beforeUpdateFailCount===Qt&&typeof console<"u"&&console.error&&console.error(`[DOMQL] onBeforeUpdate failed ${Qt}x in a row on this element \u2014 pausing automatic retries until a future prop/state change re-arms it.`)):t.__beforeUpdateFailCount=0)}function N(t,o,s){const n=t.charAt(0).toLowerCase()+t.slice(1);(0,z.dispatchPluginHook)(n,o,s);const e="on"+t,c=o[e];if(typeof c=="function"){const i=t==="Render"?"__inRender":t==="RenderRouter"?"__inRenderRouter":null;if(i){if(o.__ref[i])return!0;o.__ref[i]=!0}const f=o.context?.designSystem;f&&(0,M.pushConfig)(f);let d=!!i;try{const u=c(o,o.state,o.context,s);if(u&&typeof u.then=="function"){const l=o.__ref;return u.catch(g=>{(0,z.reportLifecycleError)(o,e,g)}).finally(()=>{i&&l&&(l[i]=!1)}),d=!1,!0}if(u===!1)return!1}catch(u){if((0,z.reportLifecycleError)(o,e,u),o.context?.strictMode)throw u}finally{f&&(0,M.popConfig)(),d&&o.__ref&&(o.__ref[i]=!1)}}return!0}var ye=ot;
1
+ "use strict";var u=Object.create;var a=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty;var d=(t,r)=>{for(var l in r)a(t,l,{get:r[l],enumerable:!0})},i=(t,r,l,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of m(r))!p.call(t,o)&&o!==l&&a(t,o,{get:()=>r[o],enumerable:!(s=E(r,o))||s.enumerable});return t};var f=(t,r,l)=>(l=t!=null?u(n(t)):{},i(r||!t||!t.__esModule?a(l,"default",{value:t,enumerable:!0}):l,t)),A=t=>i(a({},"__esModule",{value:!0}),t);var S={};d(S,{BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES:()=>e.BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES,acquireBeforeUpdateGuard:()=>e.acquireBeforeUpdateGuard,attachElement:()=>e.attachElement,create:()=>e.create,default:()=>e.default,flushMounts:()=>e.flushMounts,holdMountFlush:()=>e.holdMountFlush,isStaticCssProp:()=>e.isStaticCssProp,recompileStaticCss:()=>e.recompileStaticCss,reconcileAttrProp:()=>e.reconcileAttrProp,releaseBeforeUpdateGuard:()=>e.releaseBeforeUpdateGuard,resolveStyleBlock:()=>e.resolveStyleBlock,writeAttr:()=>e.writeAttr,writeElementText:()=>e.writeElementText});module.exports=A(S);var c=require("./install.js"),e=f(require("./core.js"),1);(0,c.installElementFeatures)();
@@ -1 +1 @@
1
- "use strict";var H=Object.create;var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var t in e)a(s,t,{get:e[t],enumerable:!0})},r=(s,e,t,N)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of A(e))!m.call(s,o)&&o!==t&&a(s,o,{get:()=>e[o],enumerable:!(N=n(e,o))||N.enumerable});return s};var _=(s,e,t)=>(t=s!=null?H(h(s)):{},r(e||!s||!s.__esModule?a(t,"default",{value:s,enumerable:!0}):t,s)),C=s=>r(a({},"__esModule",{value:!0}),s);var i={};l(i,{CSS_LONGHAND_SHORTHANDS:()=>O,CSS_SHORTHAND_LONGHANDS:()=>D,cssCamelName:()=>L,cssPropName:()=>d,cssShorthandStatesLonghand:()=>p});module.exports=C(i);var S=_(require("@symbo.ls/css"),1);if(!S.CSS_SHORTHAND_LONGHANDS||!S.CSS_LONGHAND_SHORTHANDS)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");const D=S.CSS_SHORTHAND_LONGHANDS,O=S.CSS_LONGHAND_SHORTHANDS,p=S.cssShorthandStatesLonghand||(()=>!1),c=s=>s.charCodeAt(0)===45&&s.charCodeAt(1)===45,d=S.cssPropName||(s=>c(s)?s:s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),L=S.cssCamelName||(s=>c(s)?s:s.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()));
1
+ "use strict";var h=Object.create;var a=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty;var l=(s,e)=>{for(var t in e)a(s,t,{get:e[t],enumerable:!0})},N=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let S of m(e))!d.call(s,S)&&S!==t&&a(s,S,{get:()=>e[S],enumerable:!(r=H(e,S))||r.enumerable});return s};var _=(s,e,t)=>(t=s!=null?h(A(s)):{},N(e||!s||!s.__esModule?a(t,"default",{value:s,enumerable:!0}):t,s)),C=s=>N(a({},"__esModule",{value:!0}),s);var i={};l(i,{CSS_LONGHAND_SHORTHANDS:()=>O,CSS_SHORTHAND_LONGHANDS:()=>D,cssCamelName:()=>T,cssPropName:()=>L,cssShorthandStatesLonghand:()=>n,cssShorthandStatesThemeLonghand:()=>p});module.exports=C(i);var o=_(require("@symbo.ls/css"),1);if(!o.CSS_SHORTHAND_LONGHANDS||!o.CSS_LONGHAND_SHORTHANDS)throw new Error("@symbo.ls/element: the installed @symbo.ls/css does not export CSS_SHORTHAND_LONGHANDS / CSS_LONGHAND_SHORTHANDS (the CSS shorthand family table, packages/css/src/cssLonghands.js). This element needs the @symbo.ls/css published in the same release \u2014 update @symbo.ls/css.");const D=o.CSS_SHORTHAND_LONGHANDS,O=o.CSS_LONGHAND_SHORTHANDS,n=o.cssShorthandStatesLonghand||(()=>!1),p=o.cssShorthandStatesThemeLonghand||n,c=s=>s.charCodeAt(0)===45&&s.charCodeAt(1)===45,L=o.cssPropName||(s=>c(s)?s:s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),T=o.cssCamelName||(s=>c(s)?s:s.replace(/-([a-z])/g,(e,t)=>t.toUpperCase()));
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var B=(e,t)=>{for(var r in t)g(e,r,{get:t[r],enumerable:!0})},O=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of R(t))!x.call(e,n)&&n!==r&&g(e,n,{get:()=>t[n],enumerable:!(o=Q(t,n))||o.enumerable});return e};var q=e=>O(g({},"__esModule",{value:!0}),e);var ee={};B(ee,{addDelegatedEvent:()=>A,globalEventKeyInfo:()=>H,isDelegatable:()=>V,registerEvent:()=>F,registerGlobalEvent:()=>J,removeDelegatedEvent:()=>T});module.exports=q(ee);var a=require("./registry.js"),C=require("./devRuntime.js"),p=require("@symbo.ls/scratch");const E=new WeakMap,G={passive:!0},P={passive:!0,capture:!0},w=(e,t)=>a.PASSIVE_EVENTS.has(e)?t?P:G:t||!1;function v(e){let t=E.get(e);return t||(t={handlers:new Map,installed:new Set},E.set(e,t)),t}function W(e,t){const r=v(t);if(r.installed.has(e))return;r.installed.add(e);const o=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave"||e==="pointerenter"||e==="pointerleave",n=e==="mouseenter"||e==="mouseleave"||e==="pointerenter"||e==="pointerleave";t.addEventListener(e,i=>{if(n){const u=i.target,c=r.handlers.get(e),l=c&&u?c.get(u):null;if(!l||i.relatedTarget&&typeof u.contains=="function"&&u.contains(i.relatedTarget))return;l(i);return}let s=i.target;for(;s&&s!==t;){const u=r.handlers.get(e);if(u){const c=u.get(s);if(c&&(c(i),i.cancelBubble))return}s=s.parentNode}},w(e,o))}function A(e,t,r,o){o||(o=t.ownerDocument?.documentElement||t.getRootNode());const n=v(o);W(e,o),n.handlers.has(e)||n.handlers.set(e,new WeakMap),n.handlers.get(e).set(t,r)}function T(e,t,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());const o=E.get(r);if(!o)return;const n=o.handlers.get(e);n&&n.delete(t)}function V(e){return a.DELEGATED_EVENTS.has(e)&&!a.LIFECYCLE_EVENTS.has(e)}function L(e,t){const{context:r}=e,o=r?.designSystem;return n=>{o&&(0,p.pushConfig)(o);try{const i=t.call(e,n,e,e.state,r);if(i&&typeof i.then=="function"){i.catch(s=>{e.error=s,console.error("[DOMQL] Async event error:",s)}).finally(()=>{o&&(0,p.popConfig)()});return}}catch(i){if(e.error=i,console.error("[DOMQL] Event error:",i),r?.strictMode)throw i}o&&(0,p.popConfig)()}}const b=e=>!!e&&(e.capture===!0||typeof e.passive=="boolean"||e.once===!0);function $(e,t){return b(t)?{capture:t.capture===!0,passive:typeof t.passive=="boolean"?t.passive:a.PASSIVE_EVENTS.has(e),once:t.once===!0}:w(e,!1)}function U(e,t,r){return o=>{let n=o.target;if(n&&n.nodeType!==1&&(n=n.parentElement),!n||typeof n.closest!="function")return;let i;try{i=n.closest(t)}catch{return}i&&e.contains(i)&&r(o)}}function F(e,t,r,o){const{node:n,context:i}=t;if(!n)return;let s=L(t,r);const u=o&&typeof o.selector=="string"&&o.selector;u&&(s=U(n,u,s));const l=!a.NON_BUBBLING_EVENTS.has(e)&&V(e)&&!b(o),f=l?null:$(e,o);if(l){const d=i?.rootNode||n.ownerDocument?.documentElement;A(e,n,s,d)}else n.addEventListener(e,s,f);t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(l){const d=i?.rootNode||n.ownerDocument?.documentElement;T(e,n,d)}else n.removeEventListener(e,s,f)})}const _=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function H(e){if(typeof e!="string")return null;for(let t=0;t<_.length;t++){const r=_[t][0];if(e.length<=r.length||!e.startsWith(r))continue;const o=e.charCodeAt(r.length);if(!(o<65||o>90))return{target:_[t][1],eventName:e.slice(r.length).toLowerCase()}}return null}const K=/^[A-Za-z_$][\w$]*$/;function j(e,t,r){let o=t,n=!1,i,s=!1,u=null;if(t&&typeof t=="object"&&typeof t!="function"&&(o=t.handler,n=!!t.capture,s=!!t.once,typeof t.passive=="boolean"&&(i=t.passive),typeof t.query=="string"&&(u=t.query)),typeof o=="string"&&K.test(o)){const c=o;o=function(f){return e.call(c,f)}}return typeof o!="function"?null:(i===void 0&&(i=a.PASSIVE_EVENTS.has(r)),{handler:o,capture:n,passive:i,once:s,query:u})}function Y(e,t,r){const o=e.node?.ownerDocument||e.context?.document||(typeof document<"u"?document:null);if(!o||typeof o.addEventListener!="function")return null;if(t==="document")return o;const n=o.defaultView||(typeof window<"u"?window:null);if(!n)return null;if(t==="window")return typeof n.addEventListener=="function"?n:null;if(t==="visualViewport"){const i=n.visualViewport;return i&&typeof i.addEventListener=="function"?i:null}if(t==="mediaQuery"){const i=r&&r.query;if(typeof i!="string"||!i.trim()||typeof n.matchMedia!="function")return null;try{return n.matchMedia(i)||null}catch{return null}}return null}const h=/^@media\s+/i,k=/^[@[.#&:>*~+]/,m=new Set;function D(e,t){!(0,C.isLoudDevRuntime)()||m.has(e)||(m.add(e),console.warn(`[smbls] onMediaQueryChange: "${e}" ${t} \u2014 no listener is registered.`))}function z(e,t){if(typeof t!="string")return null;const r=t.trim();if(!r)return null;const o=e.context?.designSystem?.media,n=s=>{const u=o&&typeof o=="object"?o[s]:void 0;return typeof u=="string"&&u.trim()?u.trim():null};let i=r;if(r.charCodeAt(0)===64&&!h.test(r)){if(i=n(r.slice(1)),!i)return D(r,"is not a key of designSystem.media"),null}else i=n(r)||r;return h.test(i)?i.replace(h,"").trim()||null:k.test(i)?(D(r,`names "${i}", which is not a media query`),null):i}function X(e,t,r,o){try{return e.addEventListener(t,r,o),!0}catch{return typeof e.addListener=="function"?(e.addListener(r),!0):!1}}function M(e,t,r,o){try{e.removeEventListener(t,r,o)}catch{typeof e.removeListener=="function"&&e.removeListener(r)}}function Z(e){const t=e.node;if(!t)return!1;const r=t.nodeType===11?e.__ref?.__fragmentAnchor:t;return r?r.isConnected!==!1:!1}function J(e,t,r){if(t.__ref){if(Array.isArray(r)){if(e.target!=="mediaQuery")return;for(let n=0;n<r.length;n++)S(e,t,r[n]);return}S(e,t,r)}}function S(e,t,r){const o=t.__ref,n=j(t,r,e.eventName);if(!n||e.target==="mediaQuery"&&e.eventName!=="change"||e.target==="mediaQuery"&&(n.query=z(t,n.query),!n.query))return;const i=Y(t,e.target,n);if(!i)return;const s=e.target+":"+(n.query?n.query+":":"")+e.eventName+":"+(n.capture?1:0);if(o.__globalEvents&&o.__globalEvents.has(s))return;const u=L(t,n.handler),c=e.target==="window"&&e.eventName==="load";let l=!1;const f=I=>{if(Z(t)){if(c){if(l)return;l=!0}u(I)}},d={capture:n.capture,passive:n.passive,once:n.once};if(!X(i,e.eventName,f,d))return;o.__globalEvents||(o.__globalEvents=new Map);const y={target:i,eventName:e.eventName,listener:f,options:d};o.__globalEvents.set(s,y),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{M(i,e.eventName,f,d),o.__globalEvents&&o.__globalEvents.delete(s)}),c&&N(t,s,y,()=>l)}function N(e,t,r,o){const n=r.target.document;!n||n.readyState!=="complete"||queueMicrotask(()=>{const i=e.__ref;if(o()||!i||!i.__globalEvents||i.__globalEvents.get(t)!==r)return;const s=r.target,u=typeof s.Event=="function"?s.Event:typeof Event=="function"?Event:null;u&&(r.listener(new u("load")),r.options.once&&o()&&M(s,"load",r.listener,r.options))})}
1
+ "use strict";var g=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var q=(e,t)=>{for(var r in t)g(e,r,{get:t[r],enumerable:!0})},G=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of B(t))!O.call(e,n)&&n!==r&&g(e,n,{get:()=>t[n],enumerable:!(o=I(t,n))||o.enumerable});return e};var P=e=>G(g({},"__esModule",{value:!0}),e);var re={};q(re,{addDelegatedEvent:()=>x,eventNameFrom:()=>F,globalEventKeyInfo:()=>X,isDelegatable:()=>Q,isHandlerKey:()=>U,registerEvent:()=>z,registerGlobalEvent:()=>te,removeDelegatedEvent:()=>T,stringHandler:()=>V,wrapEventHandler:()=>w});module.exports=P(re);var a=require("./registry.js"),A=require("./devRuntime.js"),E=require("./connected.js"),p=require("@symbo.ls/scratch");const _=new WeakMap,W={passive:!0},$={passive:!0,capture:!0},L=(e,t)=>a.PASSIVE_EVENTS.has(e)?t?$:W:t||!1;function m(e){let t=_.get(e);return t||(t={handlers:new Map,installed:new Set},_.set(e,t)),t}function H(e,t){const r=m(t);if(r.installed.has(e))return;r.installed.add(e);const o=e==="focus"||e==="blur"||e==="focusin"||e==="focusout"||e==="mouseenter"||e==="mouseleave"||e==="pointerenter"||e==="pointerleave",n=e==="mouseenter"||e==="mouseleave"||e==="pointerenter"||e==="pointerleave";t.addEventListener(e,i=>{if(n){const u=i.target,l=r.handlers.get(e),c=l&&u?l.get(u):null;if(!c||i.relatedTarget&&typeof u.contains=="function"&&u.contains(i.relatedTarget))return;c(i);return}let s=i.target;for(;s&&s!==t;){const u=r.handlers.get(e);if(u){const l=u.get(s);if(l&&(l(i),i.cancelBubble))return}s=s.parentNode}},L(e,o))}function x(e,t,r,o){o||(o=t.ownerDocument?.documentElement||t.getRootNode());const n=m(o);H(e,o),n.handlers.has(e)||n.handlers.set(e,new WeakMap),n.handlers.get(e).set(t,r)}function T(e,t,r){r||(r=t.ownerDocument?.documentElement||t.getRootNode());const o=_.get(r);if(!o)return;const n=o.handlers.get(e);n&&n.delete(t)}function U(e){if(e.charCodeAt(0)!==111||e.charCodeAt(1)!==110)return!1;const t=e.charCodeAt(2);return t>=65&&t<=90}function F(e){return e.charAt(2).toLowerCase()+e.slice(3)}const K=/^[A-Za-z_$][\w$]*$/;function V(e,t){return typeof t!="string"||!K.test(t)?t:function(o){return e.call(t,o)}}function Q(e){return a.DELEGATED_EVENTS.has(e)&&!a.LIFECYCLE_EVENTS.has(e)}function w(e,t){const{context:r}=e,o=r?.designSystem;return n=>{o&&(0,p.pushConfig)(o);try{const i=t.call(e,n,e,e.state,r);if(i&&typeof i.then=="function"){i.catch(s=>{e.error=s,console.error("[DOMQL] Async event error:",s)}).finally(()=>{o&&(0,p.popConfig)()});return}}catch(i){if(e.error=i,console.error("[DOMQL] Event error:",i),r?.strictMode)throw i}o&&(0,p.popConfig)()}}const b=e=>!!e&&(e.capture===!0||typeof e.passive=="boolean"||e.once===!0);function j(e,t){return b(t)?{capture:t.capture===!0,passive:typeof t.passive=="boolean"?t.passive:a.PASSIVE_EVENTS.has(e),once:t.once===!0}:L(e,!1)}function Y(e,t,r){return o=>{let n=o.target;if(n&&n.nodeType!==1&&(n=n.parentElement),!n||typeof n.closest!="function")return;let i;try{i=n.closest(t)}catch{return}i&&e.contains(i)&&r(o)}}function z(e,t,r,o){const{node:n,context:i}=t;if(!n)return;let s=w(t,r);const u=o&&typeof o.selector=="string"&&o.selector;u&&(s=Y(n,u,s));const c=!a.NON_BUBBLING_EVENTS.has(e)&&Q(e)&&!b(o),d=c?null:j(e,o);if(c){const f=i?.rootNode||n.ownerDocument?.documentElement;x(e,n,s,f)}else n.addEventListener(e,s,d);t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{if(c){const f=i?.rootNode||n.ownerDocument?.documentElement;T(e,n,f)}else n.removeEventListener(e,s,d)})}const h=[["onDocument","document"],["onWindow","window"],["onVisualViewport","visualViewport"],["onMediaQuery","mediaQuery"]];function X(e){if(typeof e!="string")return null;for(let t=0;t<h.length;t++){const r=h[t][0];if(e.length<=r.length||!e.startsWith(r))continue;const o=e.charCodeAt(r.length);if(!(o<65||o>90))return{target:h[t][1],eventName:e.slice(r.length).toLowerCase()}}return null}function Z(e,t,r){let o=t,n=!1,i,s=!1,u=null;return t&&typeof t=="object"&&typeof t!="function"&&(o=t.handler,n=!!t.capture,s=!!t.once,typeof t.passive=="boolean"&&(i=t.passive),typeof t.query=="string"&&(u=t.query)),o=V(e,o),typeof o!="function"?null:(i===void 0&&(i=a.PASSIVE_EVENTS.has(r)),{handler:o,capture:n,passive:i,once:s,query:u})}function J(e,t,r){const o=e.node?.ownerDocument||e.context?.document||(typeof document<"u"?document:null);if(!o||typeof o.addEventListener!="function")return null;if(t==="document")return o;const n=o.defaultView||(typeof window<"u"?window:null);if(!n)return null;if(t==="window")return typeof n.addEventListener=="function"?n:null;if(t==="visualViewport"){const i=n.visualViewport;return i&&typeof i.addEventListener=="function"?i:null}if(t==="mediaQuery"){const i=r&&r.query;if(typeof i!="string"||!i.trim()||typeof n.matchMedia!="function")return null;try{return n.matchMedia(i)||null}catch{return null}}return null}const y=/^@media\s+/i,k=/^[@[.#&:>*~+]/,C=new Set;function D(e,t){!(0,A.isLoudDevRuntime)()||C.has(e)||(C.add(e),console.warn(`[smbls] onMediaQueryChange: "${e}" ${t} \u2014 no listener is registered.`))}function N(e,t){if(typeof t!="string")return null;const r=t.trim();if(!r)return null;const o=e.context?.designSystem?.media,n=s=>{const u=o&&typeof o=="object"?o[s]:void 0;return typeof u=="string"&&u.trim()?u.trim():null};let i=r;if(r.charCodeAt(0)===64&&!y.test(r)){if(i=n(r.slice(1)),!i)return D(r,"is not a key of designSystem.media"),null}else i=n(r)||r;return y.test(i)?i.replace(y,"").trim()||null:k.test(i)?(D(r,`names "${i}", which is not a media query`),null):i}function ee(e,t,r,o){try{return e.addEventListener(t,r,o),!0}catch{return typeof e.addListener=="function"?(e.addListener(r),!0):!1}}function M(e,t,r,o){try{e.removeEventListener(t,r,o)}catch{typeof e.removeListener=="function"&&e.removeListener(r)}}function te(e,t,r){if(t.__ref){if(Array.isArray(r)){if(e.target!=="mediaQuery")return;for(let n=0;n<r.length;n++)S(e,t,r[n]);return}S(e,t,r)}}function S(e,t,r){const o=t.__ref,n=Z(t,r,e.eventName);if(!n||e.target==="mediaQuery"&&e.eventName!=="change"||e.target==="mediaQuery"&&(n.query=N(t,n.query),!n.query))return;const i=J(t,e.target,n);if(!i)return;const s=e.target+":"+(n.query?n.query+":":"")+e.eventName+":"+(n.capture?1:0);if(o.__globalEvents&&o.__globalEvents.has(s))return;const u=w(t,n.handler),l=e.target==="window"&&e.eventName==="load";let c=!1;const d=R=>{if((0,E.isElementConnected)(t)){if(l){if(c)return;c=!0}u(R)}},f={capture:n.capture,passive:n.passive,once:n.once};if(!ee(i,e.eventName,d,f))return;o.__globalEvents||(o.__globalEvents=new Map);const v={target:i,eventName:e.eventName,listener:d,options:f};o.__globalEvents.set(s,v),o.__eventCleanup||(o.__eventCleanup=[]),o.__eventCleanup.push(()=>{M(i,e.eventName,d,f),o.__globalEvents&&o.__globalEvents.delete(s)}),l&&ne(t,s,v,()=>c)}function ne(e,t,r,o){const n=r.target.document;!n||n.readyState!=="complete"||(0,E.whenConnected)(e,()=>queueMicrotask(()=>{const i=e.__ref;if(o()||!i||!i.__globalEvents||i.__globalEvents.get(t)!==r)return;const s=r.target,u=typeof s.Event=="function"?s.Event:typeof Event=="function"?Event:null;u&&(r.listener(new u("load")),r.options.once&&o()&&M(s,"load",r.listener,r.options))}))}
@@ -1 +1 @@
1
- "use strict";var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var h=(r,o)=>{for(var f in o)n(r,f,{get:o[f],enumerable:!0})},l=(r,o,f,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let _ of p(o))!u.call(r,_)&&_!==f&&n(r,_,{get:()=>o[_],enumerable:!(e=d(o,_))||e.enumerable});return r};var v=r=>l(n({},"__esModule",{value:!0}),r);var y={};h(y,{dispose:()=>t,remove:()=>g});module.exports=v(y);var s=require("@symbo.ls/signal"),c=require("./runContext.js"),a=require("./bridge.js");function t(r){if(!r)return;const o=r.__ref;if(!o)return;if((0,s.getObserver)())return(0,c.untrack)(()=>t(r));o.__disposed=!0;try{typeof r.onBeforeRemove=="function"&&r.onBeforeRemove(r,r.state,r.context)}catch(e){console.error("[smbls] onBeforeRemove error:",e)}if(o.__bridge&&(0,a.destroyBridge)(r),o.__effects){for(let e=0;e<o.__effects.length;e++)o.__effects[e].dispose();o.__effects.length=0}if(typeof o.__releaseMedia=="function"&&(o.__releaseMedia(),o.__releaseMedia=null),o.__eventCleanup){for(let e=0;e<o.__eventCleanup.length;e++)o.__eventCleanup[e]();o.__eventCleanup.length=0}if(o.__children){const e=o.__children.slice();o.__children.length=0;for(let _=0;_<e.length;_++){const i=r[e[_]];i&&i.__ref&&t(i)}}r.node?.parentNode?r.node.remove():r.tag==="fragment"&&o.__fragmentAnchor?.parentNode&&o.__fragmentAnchor.remove();const f=r.state?.$destroy||r.state?.destroy;if(typeof f=="function"&&r.state.__element===r&&f.call(r.state),r.parent?.__ref?.__children){const e=r.parent.__ref.__children.indexOf(r.key);e!==-1&&r.parent.__ref.__children.splice(e,1),delete r.parent[r.key]}try{typeof r.onRemove=="function"&&r.onRemove(r)}catch(e){console.error("[smbls] onRemove error:",e)}r.node=null,r.parent=null,r.__ref=null}function g(){t(this)}
1
+ "use strict";var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var v=(r,o)=>{for(var i in o)a(r,i,{get:o[i],enumerable:!0})},y=(r,o,i,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let _ of g(o))!l.call(r,_)&&_!==i&&a(r,_,{get:()=>o[_],enumerable:!(t=h(o,_))||t.enumerable});return r};var k=r=>y(a({},"__esModule",{value:!0}),r);var C={};v(C,{dispose:()=>n,remove:()=>R});module.exports=k(C);var s=require("@symbo.ls/signal"),c=require("./runContext.js"),d=require("./bridge.js"),p=require("./features.js"),u=require("./connected.js");function n(r){if(!r)return;const o=r.__ref;if(!o)return;if(o.__onConnected&&(0,u.forgetConnected)(r),(0,s.getObserver)())return(0,c.untrack)(()=>n(r));o.__disposed=!0;const i=o.__if===!1&&!o.__ifInitialized;if(!i)try{typeof r.onBeforeRemove=="function"&&r.onBeforeRemove(r,r.state,r.context)}catch(_){console.error("[smbls] onBeforeRemove error:",_)}if(o.__bridge&&(0,d.destroyBridge)(r),o.__effects){for(let _=0;_<o.__effects.length;_++)o.__effects[_].dispose();o.__effects.length=0}if(typeof o.__releaseMedia=="function"&&(o.__releaseMedia(),o.__releaseMedia=null),o.__eventCleanup){for(let _=0;_<o.__eventCleanup.length;_++)o.__eventCleanup[_]();o.__eventCleanup.length=0}if(o.__children){const _=o.__children.slice();o.__children.length=0;for(let e=0;e<_.length;e++){const f=r[_[e]];f&&f.__ref&&n(f)}}if(o.__ifParked&&o.__ifParked.size){const _=[...o.__ifParked];o.__ifParked.clear();for(let e=0;e<_.length;e++){const f=r[_[e]];f&&f.__ref&&f.parent===r&&n(f)}}r.node?.parentNode?r.node.remove():r.tag==="fragment"&&o.__fragmentAnchor?.parentNode&&o.__fragmentAnchor.remove();const t=r.state?.$destroy||r.state?.destroy;if(typeof t=="function"&&r.state.__element===r&&t.call(r.state),r.parent?.__ref?.__children){const _=r.parent.__ref.__children.indexOf(r.key);_!==-1&&r.parent.__ref.__children.splice(_,1),r.parent.__ref.__ifParked&&r.parent.__ref.__ifParked.delete(r.key),delete r.parent[r.key]}if(!i)try{typeof r.onRemove=="function"&&r.onRemove(r)}catch(_){console.error("[smbls] onRemove error:",_)}o.__mount&&o.__mount.tail&&p.FEATURES.mount.abandon(r,o),r.node=null,r.parent=null,r.__ref=null}function R(){n(this)}
@@ -1 +1 @@
1
- "use strict";var l=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var L=(r,t)=>{for(var e in t)l(r,e,{get:t[e],enumerable:!0})},M=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of k(t))!b.call(r,s)&&s!==e&&l(r,s,{get:()=>t[s],enumerable:!(n=S(t,s))||n.enumerable});return r};var C=r=>M(l({},"__esModule",{value:!0}),r);var H={};L(H,{applyExtends:()=>N,closeMergeLayer:()=>E,openMergeLayer:()=>g});module.exports=C(H);var _=require("css-in-props"),f=require("./cssLonghands.js");const R=new WeakMap;function y(r){const t=[];return r.extends&&(Array.isArray(r.extends)?t.push(...r.extends):t.push(r.extends)),r.extend&&(Array.isArray(r.extend)?t.push(...r.extend):t.push(r.extend)),t}function N(r,t,e){const n=y(t);if(!n.length)return;const c=(r.context||e?.context||{}).components||{};for(let o=0;o<n.length;o++){const a=d(n[o],c);a&&a!==t&&h(r,a,e,new Set([t]))}}function d(r,t){if(typeof r=="string"){if(r.includes(">")){const e=r.split(">").map(s=>s.trim());let n=t[e[0]]||t[`smbls.${e[0]}`];for(let s=1;s<e.length&&n;s++)n=n[e[s]];return n||null}return t[r]||t[`smbls.${r}`]||null}return typeof r=="object"&&r!==null?r:null}function h(r,t,e,n=new Set){if(n.has(t))return;n.add(t);const s=y(t);if(s.length){const a=(r.context||e?.context||{}).components||{};for(let i=0;i<s.length;i++){const p=d(s[i],a);p&&h(r,p,e,n)}}const c=g(r);for(const o in t){if(o==="extends"||o==="extend")continue;const a=t[o];c&&c.mark(o),r[o]===void 0?a&&typeof a=="object"&&!Array.isArray(a)&&typeof a!="function"?r[o]={...a}:r[o]=a:typeof r[o]=="object"&&typeof a=="object"&&!Array.isArray(r[o])&&!Array.isArray(a)&&r[o]!==null&&a!==null?r[o]=x(r[o],a):r[o]=a}}class w{constructor(){this.rank=0,this.ranks=null}mark(t){j(t)&&(this.ranks||(this.ranks=new Map),this.ranks.set(t,this.rank))}get(t){return this.ranks?this.ranks.get(t):void 0}get size(){return this.ranks?this.ranks.size:0}}const u=new Set;for(const r of[f.CSS_LONGHAND_SHORTHANDS,f.CSS_SHORTHAND_LONGHANDS])for(const t in r)u.add(t),u.add((0,f.cssCamelName)(t));const A=new Map;function j(r){const t=r.charCodeAt(0);if(t>=65&&t<=90||t>=48&&t<=57)return!1;let e=A.get(r);return e===void 0&&(e=!!_.CSS_PROPS_REGISTRY[r]||u.has(r)||r.indexOf("-")>=0&&!(r.charCodeAt(0)===45&&r.charCodeAt(1)===45)&&u.has((0,f.cssPropName)(r)),A.set(r,e)),e}function g(r){const t=r&&r.__ref;if(!t)return null;let e=t.__mergeLayer;return e||(e=t.__mergeLayer=new w),e.rank++,e}function E(r){const t=r&&r.__ref&&r.__ref.__mergeLayer;if(!t||!t.ranks)return;let e;for(const n of t.ranks.values())if(e===void 0)e=n;else if(n!==e)return;t.ranks=null}function x(r,t){const e={...r};for(const n in t){const s=e[n],c=t[n];s&&c&&typeof s=="object"&&typeof c=="object"&&!Array.isArray(s)&&!Array.isArray(c)&&typeof s!="function"&&typeof c!="function"?e[n]=x(s,c):e[n]=c}return e}
1
+ "use strict";var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var M=(r,t)=>{for(var n in t)l(r,n,{get:t[n],enumerable:!0})},C=(r,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of b(t))!L.call(r,e)&&e!==n&&l(r,e,{get:()=>t[e],enumerable:!(o=k(t,e))||o.enumerable});return r};var N=r=>C(l({},"__esModule",{value:!0}),r);var H={};M(H,{applyExtends:()=>E,closeMergeLayer:()=>j,deepMergeChild:()=>p,openMergeLayer:()=>S});module.exports=N(H);var g=require("css-in-props"),f=require("./cssLonghands.js"),h=require("./features.js");const D=new WeakMap;function d(r){const t=[];return r.extends&&(Array.isArray(r.extends)?t.push(...r.extends):t.push(r.extends)),r.extend&&(Array.isArray(r.extend)?t.push(...r.extend):t.push(r.extend)),t}function E(r,t,n){const o=d(t);if(!o.length)return;const a=(r.context||n?.context||{}).components||{};for(let s=0;s<o.length;s++){const c=A(o[s],a);c&&c!==t&&x(r,c,n,new Set([t]))}}function A(r,t){if(typeof r=="string"){if(r.includes(">")){const n=r.split(">").map(e=>e.trim());let o=t[n[0]]||t[`smbls.${n[0]}`];for(let e=1;e<n.length&&o;e++)o=o[n[e]];return o||null}return t[r]||t[`smbls.${r}`]||null}return typeof r=="object"&&r!==null?r:null}function x(r,t,n,o=new Set){if(o.has(t))return;o.add(t);const e=d(t);if(e.length){const c=(r.context||n?.context||{}).components||{};for(let i=0;i<e.length;i++){const y=A(e[i],c);y&&x(r,y,n,o)}}const a=S(r);for(const s in t){if(s==="extends"||s==="extend")continue;const c=t[s];a&&a.mark(s);const i=h.FEATURES.chains;i!==null&&i(r,s,r[s],c)||(r[s]===void 0?c&&typeof c=="object"&&!Array.isArray(c)&&typeof c!="function"?r[s]={...c}:r[s]=c:typeof r[s]=="object"&&typeof c=="object"&&!Array.isArray(r[s])&&!Array.isArray(c)&&r[s]!==null&&c!==null?r[s]=p(r[s],c):r[s]=c)}}class w{constructor(){this.rank=0,this.ranks=null}mark(t){R(t)&&(this.ranks||(this.ranks=new Map),this.ranks.set(t,this.rank))}get(t){return this.ranks?this.ranks.get(t):void 0}get size(){return this.ranks?this.ranks.size:0}}const u=new Set;for(const r of[f.CSS_LONGHAND_SHORTHANDS,f.CSS_SHORTHAND_LONGHANDS])for(const t in r)u.add(t),u.add((0,f.cssCamelName)(t));const _=new Map;function R(r){const t=r.charCodeAt(0);if(t>=65&&t<=90||t>=48&&t<=57)return!1;let n=_.get(r);return n===void 0&&(n=!!g.CSS_PROPS_REGISTRY[r]||u.has(r)||r.indexOf("-")>=0&&!(r.charCodeAt(0)===45&&r.charCodeAt(1)===45)&&u.has((0,f.cssPropName)(r)),_.set(r,n)),n}function S(r){const t=r&&r.__ref;if(!t)return null;let n=t.__mergeLayer;return n||(n=t.__mergeLayer=new w),n.rank++,n}function j(r){const t=r&&r.__ref&&r.__ref.__mergeLayer;if(!t||!t.ranks)return;let n;for(const o of t.ranks.values())if(n===void 0)n=o;else if(o!==n)return;t.ranks=null}function p(r,t){const n={...r},o=h.FEATURES.chains;for(const e in t){const a=n[e],s=t[e];o!==null&&o(n,e,a,s)||(a&&s&&typeof a=="object"&&typeof s=="object"&&!Array.isArray(a)&&!Array.isArray(s)&&typeof a!="function"&&typeof s!="function"?n[e]=p(a,s):n[e]=s)}return n}
@@ -0,0 +1 @@
1
+ "use strict";var s=Object.defineProperty;var e=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var c=(n,l)=>{for(var u in l)s(n,u,{get:l[u],enumerable:!0})},E=(n,l,u,o)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of i(l))!r.call(n,t)&&t!==u&&s(n,t,{get:()=>l[t],enumerable:!(o=e(l,t))||o.enumerable});return n};var a=n=>E(s({},"__esModule",{value:!0}),n);var v={};c(v,{FEATURES:()=>h});module.exports=a(v);const h={viewEvents:null,chains:null,rows:null,hydration:null,mount:null};
@@ -0,0 +1 @@
1
+ "use strict";var m=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var V=Object.prototype.hasOwnProperty;var _=(e,n)=>{for(var t in n)m(e,t,{get:n[t],enumerable:!0})},F=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of L(n))!V.call(e,o)&&o!==t&&m(e,o,{get:()=>n[o],enumerable:!(r=x(n,o))||r.enumerable});return e};var H=e=>F(m({},"__esModule",{value:!0}),e);var Y={};_(Y,{chainHandler:()=>K,handlerEntries:()=>$,isAlwaysForm:()=>h});module.exports=H(Y);var I=require("./registry.js"),M=require("./devRuntime.js"),p=require("./delegate.js");const y=Symbol("handlerChain.none"),A=new Set(["inView","leaveView"]),R=new Set(["bridgeMount","bridgeUpdate","bridgeDestroy"]),c=new WeakMap,N=new WeakMap;let w=!1;const h=e=>e!==null&&typeof e=="object"&&e.always===!0;function j(e){const n=(0,p.eventNameFrom)(e);return A.has(n)?!0:I.LIFECYCLE_EVENTS.has(n)&&!R.has(n)}const S=new Set;function O(e){S.has(e)||!(0,M.isLoudDevRuntime)()||(S.add(e),console.warn(`[smbls] \`${e}: { always: true, \u2026 }\` \u2014 \`always\` composes the lifecycle hooks (onInit, onRender, onCreate, onMounted, onUpdate, onRemove, \u2026; not the bridge hooks) and onInView / onLeaveView only. \`${e}\` keeps the default merge: an extender's own \`${e}\` replaces this one. Run the shared step from a lifecycle hook, or call it from the extender's handler.`))}function b(e){return e&&typeof e=="object"?{handler:e.handler,options:e}:{handler:e,options:null}}function a(e,n){const t={always:e,own:n,list:n?e.concat(n):e,next:null,prims:null,cleared:null},r=function(...i){return T(t,this,i)};return c.set(r,t),w=!0,r}function g(e){let n=N.get(e);return n||(n=a([b(e)],null),N.set(e,n)),n}function W(e,n){const t=c.get(e);if(n==null||n===!1)return t.own?t.cleared||(t.cleared=a(t.always,null)):e;if(typeof n!="object"&&typeof n!="function"){const s=t.prims||(t.prims=new Map);let l=s.get(n);return l||s.set(n,l=a(t.always,b(n))),l}const r=t.next||(t.next=new WeakMap);let o=r.get(n);if(o)return o;const i=h(n)?c.get(g(n)):typeof n=="function"?c.get(n):void 0;return o=i?a(t.always.concat(i.always),i.own):a(t.always,b(n)),r.set(n,o),o}function D(e,n,t){const r=h(n),o=!r&&w&&typeof n=="function"&&c.has(n);if(!r&&!o&&!h(t))return y;if(!j(e))return O(e),y;const i=r?g(n):o?n:null;return i?W(i,t):g(t)}function K(e,n,t,r){if(!(0,p.isHandlerKey)(n))return!1;const o=D(n,t,r);return o===y?!1:(e[n]=o,!0)}function $(e){if(typeof e=="function"){const n=w?c.get(e):void 0;return n?n.list:[{handler:e,options:null}]}return typeof e=="string"?[{handler:e,options:null}]:e&&typeof e=="object"?[{handler:e.handler,options:e}]:[]}function T(e,n,t){const r=e.list;let o,i=!1,s=null,l=!1,C;for(let u=0;u<r.length;u++){const d=r[u].handler;if(typeof d!="function")continue;let f;try{f=d.apply(n,t)}catch(E){l?console.error("[smbls] lifecycle handler error:",E):(l=!0,C=E);continue}f===!1?i=!0:f&&typeof f.then=="function"&&(s||(s=[])).push(f),o=f}if(l){if(s)for(const u of s)u.then(null,d=>console.error("[smbls] lifecycle handler error:",d));throw C}return i?!1:s?s.length===1?s[0]:U(s):o}function U(e){return Promise.allSettled(e).then(n=>{let t=null;for(const r of n)r.status==="rejected"&&(t?console.error("[smbls] lifecycle handler error:",r.reason):t=r);if(t)throw t.reason})}
@@ -0,0 +1 @@
1
+ "use strict";var h=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var n in e)h(t,n,{get:e[n],enumerable:!0})},N=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of I(e))!b.call(t,s)&&s!==n&&h(t,s,{get:()=>e[s],enumerable:!(i=x(e,s))||i.enumerable});return t};var S=t=>N(h({},"__esModule",{value:!0}),t);var L={};E(L,{adoptHydrationNode:()=>_,adoptsWhole:()=>y,elementPath:()=>g,hydrationFeature:()=>A,placeDuringHydration:()=>m});module.exports=S(L);var d=require("./cache.js");const g=t=>{const e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;const n=t.parent,i=n&&n.__ref?g(n):null,s=i===null?"":i?i+"."+t.key:String(t.key);return e&&(e.__hydrationPath=s),s},T=new Set(["src","srcset"]);function _(t){const e=t?.context?.__hydration;if(!e)return null;const n=t.tag=(0,d.detectTag)(t);if(n==="string"||n==="fragment")return null;const i=g(t),s=e.registry[i===""?"__root":i],r=s!==void 0?e.nodes[s]:null;if(!r||r.nodeType!==1||e.claimed.has(r))return s!==void 0&&e.misses++,null;const l=(0,d.isSvgTag)(n)&&(n==="svg"||t.parent?.node?.namespaceURI===d.SVG_NS),u=(0,d.isSvgTag)(n)&&!l&&n!=="svg"?"div":n,p=l?r.namespaceURI===d.SVG_NS:r.namespaceURI!==d.SVG_NS;if(r.localName!==u||!p)return e.misses++,null;e.claimed.add(r),e.adopted++;const c=e.pending;if(c&&c.delete(r)){const o=r.parentNode,f=o?(e.pendingIn.get(o)||1)-1:0;f>0?e.pendingIn.set(o,f):o&&e.pendingIn.delete(o)}for(const o of Array.from(r.getAttributeNames?r.getAttributeNames():[]))T.has(o)||r.removeAttribute(o);if(c){let o=0,f=0;for(let a=r.firstChild;a;){const v=a.nextSibling;c.has(a)||(a.nodeType===3?o++:a.nodeType!==8&&f++,r.removeChild(a)),a=v}(f||o>(t.text!=null?1:0))&&(e.whole||(e.whole=new Set)).add(t)}else for(;r.firstChild;)r.removeChild(r.firstChild);return r.localName==="img"&&r.complete&&r.naturalWidth>0&&P(r),r}const w=500;function P(t){let e=!1,n=!1;const i=s=>{s.isTrusted&&(n?s.stopImmediatePropagation():e=!0,t.removeEventListener("load",i,!0))};t.addEventListener("load",i,!0),setTimeout(()=>{if(!e){if(!(t.complete&&t.naturalWidth>0)){t.removeEventListener("load",i,!0);return}n=!0,t.dispatchEvent(new Event("load")),setTimeout(()=>t.removeEventListener("load",i,!0),w)}},0)}function m(t,e,n,i,s){const r=t.pendingIn;if(!r||!r.has(i))return!1;if(s.parentNode===i&&t.claimed.has(s))return!0;let l;const u=n&&n.__ref,p=u&&u.__children,c=p?p.lastIndexOf(e.key):-1;for(let o=c-1;o>=0;o--){const f=n[p[o]],a=f&&f.node;if(a&&a!==s&&a.parentNode===i){l=a.nextSibling;break}}return l===void 0&&(l=(0,d.firstSlotAfterText)(i,u&&u.__textNode)),l===s||i.insertBefore(s,l),!0}function y(t,e){const n=t.whole;if(!n)return!1;if(n.has(e))return!0;const i=e.parent;return!i||!n.has(i)?!1:(n.add(e),!0)}const A={adopt:_,place:m,whole:y};
@@ -1 +1 @@
1
- var N=Object.create;var f=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var G=(t,o)=>{for(var d in o)f(t,d,{get:o[d],enumerable:!0})},s=(t,o,d,m)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of v(o))!u.call(t,p)&&p!==d&&f(t,p,{get:()=>o[p],enumerable:!(m=T(o,p))||m.enumerable});return t};var I=(t,o,d)=>(d=t!=null?N(S(t)):{},s(o||!t||!t.__esModule?f(d,"default",{value:t,enumerable:!0}):d,t)),c=t=>s(f({},"__esModule",{value:!0}),t);var h={};G(h,{DELEGATED_EVENTS:()=>r.DELEGATED_EVENTS,LIFECYCLE_EVENTS:()=>r.LIFECYCLE_EVENTS,MIXINS:()=>r.MIXINS,NON_BUBBLING_EVENTS:()=>r.NON_BUBBLING_EVENTS,REGISTRY:()=>r.REGISTRY,SVG_TAGS:()=>e.SVG_TAGS,addDelegatedEvent:()=>a.addDelegatedEvent,addMethods:()=>l.addMethods,adoptHydrationNode:()=>e.adoptHydrationNode,applyExtends:()=>g.applyExtends,cacheNode:()=>e.cacheNode,create:()=>E.create,createHTMLNode:()=>e.createHTMLNode,default:()=>E.default,detectTag:()=>e.detectTag,dispose:()=>n.dispose,elementPath:()=>e.elementPath,flushMounts:()=>E.flushMounts,globalEventKeyInfo:()=>a.globalEventKeyInfo,inertOutsidePlugin:()=>i.inertOutsidePlugin,isSvgTag:()=>e.isSvgTag,isValidTag:()=>e.isValidTag,refreshContextProto:()=>l.refreshContextProto,registerEvent:()=>a.registerEvent,registerGlobalEvent:()=>a.registerGlobalEvent,remove:()=>n.remove,removeDelegatedEvent:()=>a.removeDelegatedEvent,update:()=>x.update});module.exports=c(h);var E=I(require("./create.js"),1),x=require("./update.js"),n=require("./dispose.js"),r=require("./registry.js"),a=require("./delegate.js"),e=require("./cache.js"),g=require("./extends.js"),l=require("./methods.js"),i=require("./inertOutside.js");
1
+ var M=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var _=(t,r)=>{for(var E in r)m(t,E,{get:r[E],enumerable:!0})},s=(t,r,E,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of I(r))!v.call(t,l)&&l!==E&&m(t,l,{get:()=>r[l],enumerable:!(i=N(r,l))||i.enumerable});return t};var c=(t,r,E)=>(E=t!=null?M(S(t)):{},s(r||!t||!t.__esModule?m(E,"default",{value:t,enumerable:!0}):E,t)),G=t=>s(m({},"__esModule",{value:!0}),t);var D={};_(D,{DELEGATED_EVENTS:()=>d.DELEGATED_EVENTS,LIFECYCLE_EVENTS:()=>d.LIFECYCLE_EVENTS,MIXINS:()=>d.MIXINS,MOUNT_YIELD_BUDGET_MS:()=>e.MOUNT_YIELD_BUDGET_MS,NON_BUBBLING_EVENTS:()=>d.NON_BUBBLING_EVENTS,REGISTRY:()=>d.REGISTRY,SVG_TAGS:()=>o.SVG_TAGS,addDelegatedEvent:()=>a.addDelegatedEvent,addMethods:()=>u.addMethods,adoptHydrationNode:()=>f.adoptHydrationNode,applyExtends:()=>g.applyExtends,attachElement:()=>n.attachElement,cacheNode:()=>o.cacheNode,create:()=>n.create,createHTMLNode:()=>o.createHTMLNode,default:()=>n.default,detectTag:()=>o.detectTag,dispose:()=>p.dispose,elementPath:()=>f.elementPath,flushMounts:()=>n.flushMounts,globalEventKeyInfo:()=>a.globalEventKeyInfo,holdMountFlush:()=>n.holdMountFlush,inertOutsidePlugin:()=>h.inertOutsidePlugin,isSvgTag:()=>o.isSvgTag,isValidTag:()=>o.isValidTag,mountIdle:()=>e.mountIdle,mountPending:()=>e.mountPending,mountYieldBudget:()=>e.mountYieldBudget,refreshContextProto:()=>u.refreshContextProto,registerEvent:()=>a.registerEvent,registerGlobalEvent:()=>a.registerGlobalEvent,releaseMount:()=>e.releaseMount,remove:()=>p.remove,removeDelegatedEvent:()=>a.removeDelegatedEvent,update:()=>x.update,whenConnected:()=>T.whenConnected,whenMountIdle:()=>e.whenMountIdle,whenMounted:()=>e.whenMounted,yieldToMain:()=>e.yieldToMain});module.exports=G(D);var n=c(require("./create.js"),1),e=require("./mountScheduler.js"),x=require("./update.js"),p=require("./dispose.js"),T=require("./connected.js"),d=require("./registry.js"),a=require("./delegate.js"),o=require("./cache.js"),f=require("./hydration.js"),g=require("./extends.js"),u=require("./methods.js"),h=require("./inertOutside.js");
@@ -0,0 +1 @@
1
+ "use strict";var m=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(t,r)=>{for(var i in r)m(t,i,{get:r[i],enumerable:!0})},h=(t,r,i,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of E(r))!c.call(t,e)&&e!==i&&m(t,e,{get:()=>r[e],enumerable:!(n=l(r,e))||n.enumerable});return t};var w=t=>h(m({},"__esModule",{value:!0}),t);var v={};d(v,{installElementFeatures:()=>F});module.exports=w(v);var o=require("./features.js"),a=require("./viewEvents.js"),s=require("./handlerChain.js"),p=require("./plainRows.js"),f=require("./hydration.js"),u=require("./mountYield.js");function F(){o.FEATURES.viewEvents=a.registerViewEvents,o.FEATURES.chains=s.chainHandler,o.FEATURES.rows=p.plainRows,o.FEATURES.hydration=f.hydrationFeature,o.FEATURES.mount=u.mountYieldFeature}
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.create;var p=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,n=Object.prototype.hasOwnProperty;var u=(e,r)=>{for(var t in r)p(e,t,{get:r[t],enumerable:!0})},m=(e,r,t,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of i(r))!n.call(e,o)&&o!==t&&p(e,o,{get:()=>r[o],enumerable:!(x=d(r,o))||x.enumerable});return e};var R=(e,r,t)=>(t=e!=null?c(l(e)):{},m(r||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e)),g=e=>m(p({},"__esModule",{value:!0}),e);var v={};u(v,{REGISTRY:()=>E.REGISTRY,applyExtends:()=>s.applyExtends,create:()=>f.create,default:()=>f.default,registerEvent:()=>a.registerEvent});module.exports=g(v);var f=R(require("./core.js"),1),s=require("./extends.js"),a=require("./delegate.js"),E=require("./registry.js");
@@ -1 +1 @@
1
- "use strict";var R=Object.create;var c=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var D=(t,e)=>{for(var n in e)c(t,n,{get:e[n],enumerable:!0})},p=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of v(e))!O.call(t,r)&&r!==n&&c(t,r,{get:()=>e[r],enumerable:!(o=b(e,r))||o.enumerable});return t};var E=(t,e,n)=>(n=t!=null?R(P(t)):{},p(e||!t||!t.__esModule?c(n,"default",{value:t,enumerable:!0}):n,t)),$=t=>p(c({},"__esModule",{value:!0}),t);var F={};D(F,{__resetFoldShadowWarnings:()=>j,addMethods:()=>T,elementProto:()=>f,refreshContextProto:()=>B});module.exports=$(F);var S=require("./update.js"),x=require("./dispose.js"),l=require("./devRuntime.js"),Q=require("css-in-props"),s=require("@symbo.ls/utils"),u=E(require("@symbo.ls/utils"),1);function a(t,e,n){const o=t?.context?.analyze;if(!o||!o.emit||e==="warn"&&!o.shouldCapture("warnings")||e==="error"&&!o.shouldCapture("errors"))return;const r=n.map(i=>i?.message||(typeof i=="string"?i:null)).filter(Boolean).join(" ");o.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:r||null,args:n})}const g=new Set;function y(t,e,n){const o=String(e);if(g.has(o))return;g.add(o);const r=t?.__ref?.path,i=Array.isArray(r)&&r.length?r.join("."):t?.key!=null?String(t.key):"(unknown element)",C=n!=null?`resolves to a non-function (${typeof n}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",d=`[smbls] el.call('${o}') at <${i}>: "${o}" ${C}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;a(t,"error",[d]),console.error(d)}const w=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),A=new Set,k=t=>w(f,t)&&!(u.ELEMENT_METHOD_OVERRIDE_POINTS||A).has(t),h=new Set,j=()=>{h.clear()};function m(t,e){h.has(t)||(h.add(t),(0,l.isLoudDevRuntime)()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function W(...t){return a(this,"warn",t),s.warn.apply(this,t)}function L(...t){return a(this,"error",t),s.error.apply(this,t)}const f={update:S.update,remove:x.remove,getDB:s.getDB,getQuery:s.getQuery,getRootData:s.getRootData,getPath:s.getPath,nextElement:s.nextElement,previousElement:s.previousElement,verbose:s.verbose,warn:W,error:L,variables:s.variables,spotByPath:s.spotByPath,set(t,e){const n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}try{if(this.removeContent(),t!=null){const o=this.context?.__create;o&&o(t,this,"content",e)}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;const o=n.__setQueued;o&&(n.__setQueued=null,this.set(o.content,o.options))}}},reset(t){const e=this.context?.__create;if(!e)return this;const n=this.parent,o=this.key,r=this.parse();return this.remove(),e(r,n,o,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){const e=this.__ref;if(!e?.__children)return null;for(const n of e.__children){const o=this[n];if(!o)continue;if(typeof t=="function"){if(t(o))return o}else if(typeof t=="string"&&o.key===t)return o;const r=o.lookdown?.(t);if(r)return r}return null},lookdownAll(t,e=[]){const n=this.__ref;if(!n?.__children)return e;for(const o of n.__children){const r=this[o];r&&(typeof t=="function"?t(r)&&e.push(r):typeof t=="string"&&r.key===t&&e.push(r),r.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){const t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:s.getRoot,getRootState:s.getRootState,getRootContext:s.getRootContext,getContext:s.getContext,parse(t){const e={},n=t?new Set(t):null,o=this.__ref?.__exec;for(const r in this)if(!(r==="parent"||r==="node"||r==="__ref")&&!n?.has(r)){if(o&&o[r]!==void 0){e[r]=o[r];continue}typeof this[r]!="function"&&(e[r]=this[r])}return e},parseDeep(t){const e=this.parse(t),n=this.__ref;if(n?.__children)for(const o of n.__children)this[o]?.parseDeep&&(e[o]=this[o].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){const e={};for(const n of t)e[n]=this[n];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(const e in t){const n=t[e];if(n==null)continue;const o=e.replace(/[A-Z]/g,i=>"-"+i.toLowerCase()),r=String(n).replace(/\s*!important\s*$/,"");this.node.style.setProperty(o,r,"important")}},call(t,...e){const n=this.context,o=k(t);o&&n?.methods?.[t]&&n.methods[t]!==this[t]&&m(t,"el.call");const r=o?this[t]:n?.methods?.[t]||n?.functions?.[t]||n?.utils?.[t]||this[t];if(typeof r=="function"){const i=u.isFailedRevival;if(!i||!i(r))return r.call(this,...e);(0,l.isLoudDevRuntime)()&&y(this,t,u.getFunctionSource(r));return}(0,l.isLoudDevRuntime)()&&y(this,t,r)},removeContent(){const t=this.__ref;if(!t?.__children)return;const e=this.content;if(e?.remove){e.remove(),delete this.content;const n=t.__children.indexOf("content");n!==-1&&t.__children.splice(n,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},_=new WeakMap;function M(t){if(!t)return f;let e=_.get(t);if(e)return e;e=Object.create(f);const n=t.methods;if(n)for(const o in n)e[o]=n[o];return _.set(t,e),e}function T(t){const e=M(t.context);Object.setPrototypeOf(t,e)}function B(t){if(!t)return!1;const e=_.get(t);if(!e)return!1;const n=t.methods;if(!n)return!1;for(const o in n){if(k(o)&&!w(e,o)){m(o,"refreshContextProto");continue}e[o]=n[o]}return!0}
1
+ "use strict";var b=Object.create;var c=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of P(e))!D.call(t,r)&&r!==o&&c(t,r,{get:()=>e[r],enumerable:!(n=v(e,r))||n.enumerable});return t};var $=(t,e,o)=>(o=t!=null?b(O(t)):{},p(e||!t||!t.__esModule?c(o,"default",{value:t,enumerable:!0}):o,t)),A=t=>p(c({},"__esModule",{value:!0}),t);var I={};E(I,{__resetFoldShadowWarnings:()=>W,addMethods:()=>B,elementProto:()=>f,refreshContextProto:()=>F});module.exports=A(I);var S=require("./update.js"),x=require("./dispose.js"),C=require("./connected.js"),l=require("./devRuntime.js"),z=require("css-in-props"),i=require("@symbo.ls/utils"),u=$(require("@symbo.ls/utils"),1);function a(t,e,o){const n=t?.context?.analyze;if(!n||!n.emit||e==="warn"&&!n.shouldCapture("warnings")||e==="error"&&!n.shouldCapture("errors"))return;const r=o.map(s=>s?.message||(typeof s=="string"?s:null)).filter(Boolean).join(" ");n.emit({id:`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,ts:Date.now(),type:e==="error"?"error":"warning",level:e,hook:e==="error"?"el.error":"el.warn",element:{key:t.key!=null?String(t.key):null,name:t.__name||null,tag:t.tag||null},message:r||null,args:o})}const g=new Set;function y(t,e,o){const n=String(e);if(g.has(n))return;g.add(n);const r=t?.__ref?.path,s=Array.isArray(r)&&r.length?r.join("."):t?.key!=null?String(t.key):"(unknown element)",R=o!=null?`resolves to a non-function (${typeof o}) \u2014 it cannot be called`:"is not registered in context.methods, context.functions, or context.utils, and is not an element method",d=`[smbls] el.call('${n}') at <${s}>: "${n}" ${R}. Returning undefined (unchanged behavior) \u2014 check the name for typos or register the function on the project. Warned once per name; repeat misses are silent.`;a(t,"error",[d]),console.error(d)}const w=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),j=new Set,k=t=>w(f,t)&&!(u.ELEMENT_METHOD_OVERRIDE_POINTS||j).has(t),h=new Set,W=()=>{h.clear()};function m(t,e){h.has(t)||(h.add(t),(0,l.isLoudDevRuntime)()&&console.warn(`[smbls] ${e}: context.methods.${t} is named like a built-in element method and is not the app's own override (it was not on the element prototype when it was built) \u2014 ignored; the built-in keeps winning. Declare an intentional override in the app's OWN methods.`))}function L(...t){return a(this,"warn",t),i.warn.apply(this,t)}function M(...t){return a(this,"error",t),i.error.apply(this,t)}const f={update:S.update,remove:x.remove,getDB:i.getDB,getQuery:i.getQuery,getRootData:i.getRootData,getPath:i.getPath,nextElement:i.nextElement,previousElement:i.previousElement,verbose:i.verbose,warn:L,error:M,variables:i.variables,spotByPath:i.spotByPath,set(t,e,o){const n=this.__ref;if(n){if(n.__setLocked){n.__setQueued={content:t,options:e};return}n.__setLocked=!0}let r;try{if(this.removeContent(),t!=null){const s=this.context?.__create;s&&(r=s(t,this,"content",e,o))}this.__ref&&(this.__ref.contentManaged=!0)}finally{if(n){n.__setLocked=!1;const s=n.__setQueued;s&&(n.__setQueued=null,this.set(s.content,s.options))}}return r},reset(t){const e=this.context?.__create;if(!e)return this;const o=this.parent,n=this.key,r=this.parse();return this.remove(),e(r,o,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},whenConnected(t){return(0,C.whenConnected)(this,t)},lookdown(t){const e=this.__ref;if(!e?.__children)return null;for(const o of e.__children){const n=this[o];if(!n)continue;if(typeof t=="function"){if(t(n))return n}else if(typeof t=="string"&&n.key===t)return n;const r=n.lookdown?.(t);if(r)return r}return null},lookdownAll(t,e=[]){const o=this.__ref;if(!o?.__children)return e;for(const n of o.__children){const r=this[n];r&&(typeof t=="function"?t(r)&&e.push(r):typeof t=="string"&&r.key===t&&e.push(r),r.lookdownAll?.(t,e))}return e},getRef(t){return t?this.__ref&&this.__ref[t]:this.__ref},getChildren(){const t=this.__ref&&this.__ref.__children;return Array.isArray(t)?t.map(e=>this[e]):[]},getRoot:i.getRoot,getRootState:i.getRootState,getRootContext:i.getRootContext,getContext:i.getContext,parse(t){const e={},o=t?new Set(t):null,n=this.__ref?.__exec;for(const r in this)if(!(r==="parent"||r==="node"||r==="__ref")&&!o?.has(r)){if(n&&n[r]!==void 0){e[r]=n[r];continue}typeof this[r]!="function"&&(e[r]=this[r])}return e},parseDeep(t){const e=this.parse(t),o=this.__ref;if(o?.__children)for(const n of o.__children)this[n]?.parseDeep&&(e[n]=this[n].parseDeep(t));return e},keys(){return Object.keys(this)},log(...t){if(t.length){const e={};for(const o of t)e[o]=this[o];console.log(e)}else console.log(this)},setProps(t,e){return this.update(t,e)},setNodeStyles(t){if(this.node?.style)for(const e in t){const o=t[e];if(o==null)continue;const n=e.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()),r=String(o).replace(/\s*!important\s*$/,"");this.node.style.setProperty(n,r,"important")}},call(t,...e){const o=this.context,n=k(t);n&&o?.methods?.[t]&&o.methods[t]!==this[t]&&m(t,"el.call");const r=n?this[t]:o?.methods?.[t]||o?.functions?.[t]||o?.utils?.[t]||this[t];if(typeof r=="function"){const s=u.isFailedRevival;if(!s||!s(r))return r.call(this,...e);(0,l.isLoudDevRuntime)()&&y(this,t,u.getFunctionSource(r));return}(0,l.isLoudDevRuntime)()&&y(this,t,r)},removeContent(){const t=this.__ref;if(!t?.__children)return;const e=this.content;if(e?.remove){e.remove(),delete this.content;const o=t.__children.indexOf("content");o!==-1&&t.__children.splice(o,1)}e?.node?.parentNode&&e.node.parentNode.removeChild(e.node)}},_=new WeakMap;function T(t){if(!t)return f;let e=_.get(t);if(e)return e;e=Object.create(f);const o=t.methods;if(o)for(const n in o)e[n]=o[n];return _.set(t,e),e}function B(t){const e=T(t.context);Object.setPrototypeOf(t,e)}function F(t){if(!t)return!1;const e=_.get(t);if(!e)return!1;const o=t.methods;if(!o)return!1;for(const n in o){if(k(n)&&!w(e,n)){m(n,"refreshContextProto");continue}e[n]=o[n]}return!0}
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var c=(n,t)=>{for(var u in t)o(n,u,{get:t[u],enumerable:!0})},d=(n,t,u,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of i(t))!a.call(n,e)&&e!==u&&o(n,e,{get:()=>t[e],enumerable:!(l=r(t,e))||l.enumerable});return n};var m=n=>d(o({},"__esModule",{value:!0}),n);var f={};c(f,{mountPendingOf:()=>_,mountRecord:()=>s});module.exports=m(f);function s(n){return n.__mount||(n.__mount={pending:0,tail:null,holder:null,waiters:null,chunkGen:0,attachLater:!1,held:!1})}function _(n){const t=n.__mount;return t?t.pending:0}
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var M=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _(t))!g.call(e,s)&&s!==n&&a(e,s,{get:()=>t[s],enumerable:!(r=h(t,s))||r.enumerable});return e};var y=e=>m(a({},"__esModule",{value:!0}),e);var S={};M(S,{MOUNT_YIELD_BUDGET_MS:()=>x,__flushMountQueueSync:()=>k,__pendingMountChunks:()=>B,__resetMountQueue:()=>U,childCostMeter:()=>w,closeMountBudget:()=>E,enqueueMountWork:()=>b,mountBudgetExhausted:()=>T,openMountBudget:()=>D});module.exports=y(S);const x=50,u=[];let i=!1,o=0,f=!1;function c(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function d(e){const t=typeof globalThis<"u"?globalThis.scheduler:null;if(t&&typeof t.yield=="function"){t.yield().then(e,e);return}if(typeof MessageChannel=="function"){const n=new MessageChannel;n.port1.onmessage=()=>{n.port1.close(),e()},n.port2.postMessage(0);return}setTimeout(e,0)}function T(e=0){return!o||c()-o+e<50?!1:(f=!0,!0)}function w(){let e=0,t=0,n=0;return{begin(){n=c()},end(){const r=c()-n;e+=r,t++;const s=e/t;return r>s?r:s}}}let l=0;function D(){l===0&&!o&&(o=c(),f=!1),l++}function E(){l>0&&l--,l===0&&!i&&(o=0,f=!1)}function b(e){u.push(e),i||(i=!0,d(p))}function p(){for(o=c(),f=!1;u.length;){const e=u.shift();try{e()}catch(t){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",t?.message||t)}if(f||c()-o>=50)break}if(u.length){d(p);return}i=!1,o=0,f=!1,l=0}function k(){let t=0;for(o=0;u.length&&t++<1e5;){const n=u.shift();try{n()}catch(r){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",r?.message||r)}}i=!1,o=0,f=!1,l=0}function B(){return u.length}function U(){u.length=0,i=!1,o=0,f=!1,l=0}
1
+ "use strict";var w=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var U=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},Y=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of S(t))!W.call(e,r)&&r!==n&&w(e,r,{get:()=>t[r],enumerable:!(o=R(t,r))||o.enumerable});return e};var A=e=>Y(w({},"__esModule",{value:!0}),e);var re={};U(re,{MOUNT_YIELD_BUDGET_MS:()=>_,__flushMountQueueSync:()=>X,__pendingMountChunks:()=>Z,__resetMountQueue:()=>$,abandonMount:()=>oe,closeMountBudget:()=>H,enqueueMountWork:()=>J,holdMount:()=>ee,mountBudgetExhausted:()=>O,mountIdle:()=>V,mountPending:()=>te,mountTick:()=>j,mountYieldBudget:()=>G,openMountBudget:()=>v,releaseMount:()=>q,settleMount:()=>q,settleMountWaiters:()=>Q,whenMountIdle:()=>K,whenMounted:()=>ne,yieldToMain:()=>N});module.exports=A(re);var E=require("./mountRecord.js");const _=50;function G(e){return e===!0?_:typeof e=="number"&&e>0?e:0}const u=[];let l=!1,i=0,s=_,a=!1,M=[];const d=typeof performance<"u"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now(),x=[];let h=null;function L(e){if(!h){const t=new MessageChannel;t.port1.onmessage=()=>{const n=x.shift();!x.length&&typeof t.port1.unref=="function"&&t.port1.unref(),n&&n()},h=t}x.push(e),x.length===1&&typeof h.port1.ref=="function"&&h.port1.ref(),h.port2.postMessage(0)}function y(e){const t=typeof globalThis<"u"?globalThis.scheduler:null;if(t&&typeof t.yield=="function"){t.yield().then(e,e);return}if(typeof setImmediate=="function"){setImmediate(e);return}if(typeof MessageChannel=="function"){L(e);return}setTimeout(e,0)}function N(){return new Promise(e=>y(e))}function O(e=0,t){return!i||(t||d())-i+e<s?!1:(a=!0,!0)}let g=0,k=0,T=0,p=0;function I(){g=0,k=i,T=0,p=0}function j(){if(!i)return!1;if(g++,p>0)return p--,!1;const e=d(),t=e-i,n=t/g,o=(e-k)/(g-T),r=o>n?o:n;k=e,T=g;const B=s-t-r;return B<=0?(a=!0,!0):(p=r>0?Math.floor(B/r/2):0,!1)}let f=0;function v(e=_){f===0&&!i?(i=d(),a=!1,s=e,I()):e<s&&(s=e,p=0),f++}let c=null,b=!1;const z=typeof queueMicrotask=="function"?queueMicrotask:e=>Promise.resolve().then(e);function m(){i=0,a=!1,s=_,I()}function F(){b||(b=!0,z(()=>{b=!1,f===0&&m()}))}function H(){f>0&&f--,!(f!==0||c!==null)&&(l?F():m())}function J(e,t=_){const n={fn:e,budget:t};c?c.push(n):u.push(n),l||(l=!0,y(D))}function C(e){const t=c;c=[];try{e.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{const n=c;c=t,n.length&&u.unshift(...n)}}function K(){return!l&&!u.length?Promise.resolve():new Promise(e=>M.push(e))}function V(){return!l&&!u.length}function P(){if(!M.length)return;const e=M;M=[];for(let t=0;t<e.length;t++)e[t]()}function D(){for(i=d(),a=!1,s=1/0,I();u.length;){const e=u.shift();if(e.budget<s&&(s=e.budget,p=0),C(e),a||d()-i>=s)break}if(f=0,m(),u.length){y(D);return}l=!1,P()}function X(){let t=0;for(i=0;u.length&&t++<1e5;)C(u.shift());l=!1,f=0,m(),P()}function Z(){return u.length}function $(){u.length=0,c=null,l=!1,f=0,m(),P()}function ee(e){(0,E.mountRecord)(e.__ref).pending++}function q(e){const t=e&&e.__ref,n=t&&t.__mount;if(!n||!(n.pending>0)||--n.pending>0||t.__disposed)return;const o=n.tail;o&&(n.tail=null,o())}function te(e){const t=e&&e.__ref&&e.__ref.__mount;return!!(t&&t.tail)}function ne(e){const t=e&&e.__ref&&e.__ref.__mount;return!t||!t.tail?Promise.resolve(e):new Promise(n=>{(t.waiters||(t.waiters=[])).push(n)})}function Q(e,t=e&&e.__ref){const n=t&&t.__mount,o=n&&n.waiters;if(o){n.waiters=null;for(let r=0;r<o.length;r++)o[r](e)}}function oe(e,t=e&&e.__ref){const n=t&&t.__mount;if(!n||!n.tail)return;n.tail=null,n.pending=0;const o=n.holder;n.holder=null,Q(e,t),o&&q(o)}
@@ -0,0 +1 @@
1
+ "use strict";var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var x=(n,t)=>{for(var r in t)p(n,r,{get:t[r],enumerable:!0})},B=(n,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of R(t))!k.call(n,u)&&u!==r&&p(n,u,{get:()=>t[u],enumerable:!(o=m(t,u))||o.enumerable});return n};var E=n=>B(p({},"__esModule",{value:!0}),n);var G={};x(G,{mountYieldFeature:()=>F});module.exports=E(G);var e=require("./mountScheduler.js"),i=require("./core.js"),S=require("./mountRecord.js"),y=require("./features.js");function b(n,t){const r=t&&t.mountYield;if(!r&&!n.yieldChildren)return 0;const o=y.FEATURES.hydration!==null&&n.context?n.context.__hydration:null;if(o&&y.FEATURES.hydration.whole(o,n))return 0;const u=r?(0,e.mountYieldBudget)(r):0,f=(0,e.mountYieldBudget)(n.yieldChildren);return u&&f?u<f?u:f:u||f}function g(n,t,r,o,u){(0,e.openMountBudget)(o);try{C(n,n.__ref,0,t,r,o,u,!1)}finally{(0,e.closeMountBudget)()}}function C(n,t,r,o,u,f,c,a){try{for(let d=r;d<o;d++){const _=t.__mount,h=_?_.pending:0;if(u(d)===!1)continue;if(t.__disposed)break;const s=(0,e.mountTick)(),l=t.__mount;if(d+1<o&&(s||(l?l.pending:0)>h)){c&&c.onSuspend&&c.onSuspend(),a||(0,e.holdMount)(n);const M=d+1;(0,e.enqueueMountWork)(()=>A(n,t,M,o,u,f,c),f);return}}}catch(d){if(!a)throw d;(0,i.reportCreateChildrenError)(n,d)}a&&(0,e.settleMount)(n)}function A(n,t,r,o,u,f,c){if(t.__disposed||c&&c.isStale&&c.isStale()){(0,e.settleMount)(n);return}C(n,t,r,o,u,f,c,!0)}function N(n,t,r){(0,e.holdMount)(n),(0,e.enqueueMountWork)(()=>{try{const o=n.__ref;o&&!o.__disposed&&r()}catch(o){(0,i.reportCreateChildrenError)(n,o)}finally{(0,e.settleMount)(n)}},t)}function O(n,t,r,o){const u=n.__ref,f=(0,S.mountRecord)(u),c=++f.chunkGen,a=n.node,d=[];let _=!1;g(n,t,h=>{const s=r(h,_?(0,i.rowAttach)(n,W(a,d)):void 0),l=w(s);return l?d.push(l):s&&s.__ref.__mount&&s.__ref.__mount.held&&d.push(s),s},o,{isStale:()=>f.chunkGen!==c,onSuspend:()=>{_=!0}})}function w(n){const t=(0,i.placedRowNode)(n);if(t)return t;const r=n&&n.__ref;return r&&r.__if!==!1&&n.tag==="fragment"&&r.__fragmentAnchor||null}function W(n,t){for(let r=t.length-1;r>=0;r--){const o=t[r].__ref?w(t[r]):t[r];if(o&&o.parentNode===n)return o}return null}function Y(n,t){const r=n.__ref;try{(0,i.syncSelectValue)(n,!0),(0,i.attachWhole)(n),(0,i.completeCreate)(n,t)}finally{(0,e.settleMountWaiters)(n,r);const o=r.__mount,u=o&&o.holder;u&&(o.holder=null,(0,e.settleMount)(u))}}const F={budgetOf:b,run:g,rows:O,defer:N,hold:e.holdMount,finish:Y,abandon:e.abandonMount};
@@ -0,0 +1 @@
1
+ "use strict";var j=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var n in t)j(e,n,{get:t[n],enumerable:!0})},ee=(e,t,n,f)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Y(t))!Z.call(e,r)&&r!==n&&j(e,r,{get:()=>t[r],enumerable:!(f=X(t,r))||f.enumerable});return e};var te=e=>ee(j({},"__esModule",{value:!0}),e);var se={};v(se,{plainRows:()=>ne});module.exports=te(se);var w=require("@symbo.ls/signal"),N=require("./runContext.js"),H=require("./extends.js"),c=require("./core.js");const y=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),K=1e3,L=24,x=Object.freeze({}),M=Object.freeze({});let d=0;const O=e=>{if((0,w.isStore)(e)||y(e,"__ref"))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null};function D(e,t,n){if(e===null||typeof e!="object")return e;if(--d<0||t>L){d=-1;return}if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=n?e[s]:D(e[s],t+1,!1);return r}if(n||!O(e))return e;const f={};for(const r in e)y(e,r)&&(f[r]=D(e[r],t+1,r==="extends"||r==="childExtends"));return f}function U(e){d=K;let t;try{t=D(e,0,!1)}catch{return x}return d<0?x:t}function T(e,t,n,f){if(e===t)return!0;if(e===null||typeof e!="object"||t===null||typeof t!="object"||--d<0||n>L)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||t.length!==e.length)return!1;for(let s=0;s<e.length;s++)if(f?e[s]!==t[s]:!T(e[s],t[s],n+1,!1))return!1;return!0}if(f||Array.isArray(t)||!O(e)||!O(t))return!1;let r=0;for(const s in e)if(y(e,s)&&(r++,!y(t,s)||!T(e[s],t[s],n+1,s==="extends"||s==="childExtends")))return!1;for(const s in t)y(t,s)&&r--;return r===0}function $(e,t){if(t===x||t===M)return!1;d=K;try{return T(e,t,0,!1)}catch{return!1}}const S=e=>(0,w.getObserver)()?(0,N.untrack)(()=>U(e)):U(e),B=(e,t)=>(0,w.getObserver)()?(0,N.untrack)(()=>$(e,t)):$(e,t);function C(e,t,n,f){let r=e;return r&&typeof r=="object"&&!Array.isArray(r)&&!O(r)&&(f||n&&!r.ignoreChildExtends)&&(r=f?(0,H.deepMergeChild)({},r):{...r}),typeof t=="function"?{item:r,props:f}:r}const F=e=>({childProps:typeof e.childProps=="function"?void 0:e.childProps,childExtends:e.childExtends});class G{constructor(t,n){this.shared=t,this.rows=n}add(t,n,f,r,s){this.rows.set(t,S(C(n,r,s,f.props)))}failed(t){this.rows.set(t,M)}none(t){this.rows.delete(t)}}const re=Object.freeze([]);function oe(e,t,n,f,r){const s=t.__plainRows.rows,W=t.__plainRows.shared,m=F(e),V=B(m,W),z=e.childProps,q=(0,c.runtimeViewOf)(e,"childProps"),I=e.childExtends,h=new Array(n.length),P=new Map;for(let i=0;i<n.length;i++){const o=(0,c.arrayRowDefinition)(e,n[i],i,z,q,I,!1,!0);if(P.has(o.key))return!1;P.set(o.key,o),h[i]=o}for(let i=0;i<h.length;i++){const o=h[i];o.input=C(n[i],z,I,o.props);const l=V?s.get(o.key):void 0;if(l===void 0)continue;const a=e[o.key];a&&a.__ref&&a.parent===e&&B(o.input,l)&&(o.kept=!0,o.snap=l)}const k=r?[]:null;for(const i of s.keys()){const o=P.get(i);if(o&&o.kept)continue;const l=e[i];l?.remove&&l.remove(),delete e[i],k&&k.push(i)}const _=r?[]:null,b=r?[]:null,u=new Map;let R=null,g=null;for(let i=0;i<h.length;i++){const o=h[i];if(o.kept){u.set(o.key,o.snap),b&&b.push(o.key);const p=(0,c.placedRowNode)(e[o.key]);p&&(g=(0,c.placeAfter)(e,p,g));continue}u.set(o.key,S(o.input));let l;try{l=(0,c.create)((0,c.markRuntimeSupplied)(o.def,o.supplied),e,o.key,f,(0,c.rowAttach)(e,g))}catch(p){if(u.set(o.key,M),R||(R=new Set),R.add(o.key),typeof console<"u"&&console.error){const Q=t.path?.join(".")||e.key||"<root>";console.error(`[smbls] child "${o.key}" failed to construct at ${Q} (re-run, skipping this row):`,p?.message||p)}continue}if(t.__disposed)return!0;if(!l){u.delete(o.key);continue}const a=(0,c.placedRowNode)(l);a&&(g=a),_&&_.push(o.key)}t.__plainRows=new G(V?W:S(m),u);const A=Array.from(u.keys());(0,c.placeRows)(e,A,R);const J=new Set(t.__children),E=[];for(let i=0;i<A.length;i++)J.has(A[i])&&E.push(A[i]);for(const i of t.__children)u.has(i)||E.push(i);return t.__children=E,r&&(_.length||k.length)&&(0,c.triggerContentUpdate)(e,{added:_,removed:k,kept:b}),!0}const ne={track:e=>new G(S(F(e)),new Map),reconcile(e,t,n,f,r){const s=Array.isArray(n)?n:n==null||n===!1?re:null;return!!s&&oe(e,t,s,f,r)}};
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var A=(o,f)=>{for(var t in f)a(o,t,{get:f[t],enumerable:!0})},U=(o,f,t,r)=>{if(f&&typeof f=="object"||typeof f=="function")for(let s of g(f))!P.call(o,s)&&s!==t&&a(o,s,{get:()=>f[s],enumerable:!(r=b(f,s))||r.enumerable});return o};var j=o=>U(a({},"__esModule",{value:!0}),o);var S={};A(S,{default:()=>B,update:()=>x});module.exports=j(S);var u=require("@symbo.ls/signal"),_=require("./registry.js"),i=require("./create.js"),y=require("./pluginHooks.js"),v=require("./cssLonghands.js");function x(o={},f={}){const t=this,r=t.__ref;if(!r)return;if((typeof o=="string"||typeof o=="number")&&(o={text:o}),!f.preventListeners&&typeof t.onBeforeUpdate=="function"&&(0,i.acquireBeforeUpdateGuard)(r))try{const e=t.onBeforeUpdate(t,t.state,t.context,f);if(e&&typeof e.then=="function")e.then(()=>(0,i.releaseBeforeUpdateGuard)(r,!1),n=>{(0,i.releaseBeforeUpdateGuard)(r,!0),(0,y.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:n})||console.error("[DOMQL] onBeforeUpdate error:",n)});else if((0,i.releaseBeforeUpdateGuard)(r,!1),e===!1)return t}catch(e){throw(0,i.releaseBeforeUpdateGuard)(r,!0),e}const s=!o||Object.keys(o).length===0,l=[];let h=!1;(0,u.batch)(()=>{if(o.state&&(0,u.isStore)(t.state)&&t.state.$update(o.state),o.text!==void 0&&(t.text=o.text,!r.__exec.text&&t.node&&(0,i.writeElementText)(t,o.text??"")),o.html!==void 0&&(t.html=o.html,!r.__exec.html&&t.node&&(t.node.innerHTML=o.html)),o.style&&t.node?.style){if(!r.__exec.style){const e=(0,i.resolveStyleBlock)(t,o.style);for(const n in e){const c=e[n];if(c==null)continue;const d=(0,v.cssPropName)(n),p=String(c).replace(/\s*!important\s*$/,"");t.node.style.setProperty(d,p,"important")}}t.style||(t.style={}),Object.assign(t.style,o.style)}if(o.attr&&t.node?.setAttribute){for(const e in o.attr){const n=o.attr[e];(0,i.writeAttr)(t.node,e,n)}t.attr||(t.attr={}),Object.assign(t.attr,o.attr)}if(o.data&&t.node?.dataset){for(const e in o.data)t.node.dataset[e]=o.data[e];t.data||(t.data={}),Object.assign(t.data,o.data)}if(o.vars&&typeof o.vars=="object"&&!Array.isArray(o.vars)){const e=t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)?t.vars:null;t.vars={...e,...o.vars},h=!0}for(const e in o){if(_.REGISTRY.has(e)||e==="state")continue;const n=o[e],c=t[e];if(c&&c.__ref&&typeof c.update=="function")c.update(n,f);else if(typeof n=="object"&&n!==null){const d=e.charCodeAt(0);d>=65&&d<=90&&(0,i.create)(n,t,e,f)}else e!=="text"&&e!=="html"&&e!=="style"&&e!=="attr"&&e!=="data"&&(t[e]=n,typeof n!="function"&&l.push(e))}});for(let e=0;e<l.length;e++)(0,i.reconcileAttrProp)(t,l[e]);if(t.node){let e=h;for(let n=0;!e&&n<l.length;n++)(0,i.isStaticCssProp)(l[n])&&(e=!0);e&&(0,i.recompileStaticCss)(t)}if(t.node&&s&&r.__effects&&r.__effects.length)for(let e=0;e<r.__effects.length;e++){const n=r.__effects[e];n&&!n._disposed&&!n._isSubscribeToEffect&&typeof n._execute=="function"&&n._execute()}else if(t.node&&r.__conditionalRunners)for(const e of r.__conditionalRunners)e();return(0,y.dispatchPluginHook)("update",t),!f.preventListeners&&typeof t.onUpdate=="function"&&t.onUpdate(t,t.state,t.context,f),t}var B=x;
1
+ "use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var A=(o,f)=>{for(var t in f)a(o,t,{get:f[t],enumerable:!0})},U=(o,f,t,r)=>{if(f&&typeof f=="object"||typeof f=="function")for(let s of g(f))!P.call(o,s)&&s!==t&&a(o,s,{get:()=>f[s],enumerable:!(r=b(f,s))||r.enumerable});return o};var j=o=>U(a({},"__esModule",{value:!0}),o);var S={};A(S,{default:()=>B,update:()=>x});module.exports=j(S);var u=require("@symbo.ls/signal"),_=require("./registry.js"),i=require("./core.js"),y=require("./pluginHooks.js"),v=require("./cssLonghands.js");function x(o={},f={}){const t=this,r=t.__ref;if(!r)return;if((typeof o=="string"||typeof o=="number")&&(o={text:o}),!f.preventListeners&&typeof t.onBeforeUpdate=="function"&&(0,i.acquireBeforeUpdateGuard)(r))try{const e=t.onBeforeUpdate(t,t.state,t.context,f);if(e&&typeof e.then=="function")e.then(()=>(0,i.releaseBeforeUpdateGuard)(r,!1),n=>{(0,i.releaseBeforeUpdateGuard)(r,!0),(0,y.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:n})||console.error("[DOMQL] onBeforeUpdate error:",n)});else if((0,i.releaseBeforeUpdateGuard)(r,!1),e===!1)return t}catch(e){throw(0,i.releaseBeforeUpdateGuard)(r,!0),e}const s=!o||Object.keys(o).length===0,l=[];let h=!1;(0,u.batch)(()=>{if(o.state&&(0,u.isStore)(t.state)&&t.state.$update(o.state),o.text!==void 0&&(t.text=o.text,!r.__exec.text&&t.node&&(0,i.writeElementText)(t,o.text??"")),o.html!==void 0&&(t.html=o.html,!r.__exec.html&&t.node&&(t.node.innerHTML=o.html)),o.style&&t.node?.style){if(!r.__exec.style){const e=(0,i.resolveStyleBlock)(t,o.style);for(const n in e){const c=e[n];if(c==null)continue;const d=(0,v.cssPropName)(n),p=String(c).replace(/\s*!important\s*$/,"");t.node.style.setProperty(d,p,"important")}}t.style||(t.style={}),Object.assign(t.style,o.style)}if(o.attr&&t.node?.setAttribute){for(const e in o.attr){const n=o.attr[e];(0,i.writeAttr)(t.node,e,n)}t.attr||(t.attr={}),Object.assign(t.attr,o.attr)}if(o.data&&t.node?.dataset){for(const e in o.data)t.node.dataset[e]=o.data[e];t.data||(t.data={}),Object.assign(t.data,o.data)}if(o.vars&&typeof o.vars=="object"&&!Array.isArray(o.vars)){const e=t.vars&&typeof t.vars=="object"&&!Array.isArray(t.vars)?t.vars:null;t.vars={...e,...o.vars},h=!0}for(const e in o){if(_.REGISTRY.has(e)||e==="state")continue;const n=o[e],c=t[e];if(c&&c.__ref&&typeof c.update=="function")c.update(n,f);else if(typeof n=="object"&&n!==null){const d=e.charCodeAt(0);d>=65&&d<=90&&(0,i.create)(n,t,e,f)}else e!=="text"&&e!=="html"&&e!=="style"&&e!=="attr"&&e!=="data"&&(t[e]=n,typeof n!="function"&&l.push(e))}});for(let e=0;e<l.length;e++)(0,i.reconcileAttrProp)(t,l[e]);if(t.node){let e=h;for(let n=0;!e&&n<l.length;n++)(0,i.isStaticCssProp)(l[n])&&(e=!0);e&&(0,i.recompileStaticCss)(t)}if(t.node&&s&&r.__effects&&r.__effects.length)for(let e=0;e<r.__effects.length;e++){const n=r.__effects[e];n&&!n._disposed&&!n._isSubscribeToEffect&&typeof n._execute=="function"&&n._execute()}else if(t.node&&r.__conditionalRunners)for(const e of r.__conditionalRunners)e();return(0,y.dispatchPluginHook)("update",t),!f.preventListeners&&typeof t.onUpdate=="function"&&t.onUpdate(t,t.state,t.context,f),t}var B=x;
@@ -1 +1 @@
1
- var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var E=(t,o)=>{for(var e in o)n(t,e,{get:o[e],enumerable:!0})},I=(t,o,e,p)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of s(o))!x.call(t,c)&&c!==e&&n(t,c,{get:()=>o[c],enumerable:!(p=r(o,c))||p.enumerable});return t};var N=t=>I(n({},"__esModule",{value:!0}),t);var R={};E(R,{VERSION:()=>O});module.exports=N(R);const O="3.14.804";
1
+ var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var E=(t,o)=>{for(var e in o)n(t,e,{get:o[e],enumerable:!0})},I=(t,o,e,p)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of s(o))!x.call(t,c)&&c!==e&&n(t,c,{get:()=>o[c],enumerable:!(p=r(o,c))||p.enumerable});return t};var N=t=>I(n({},"__esModule",{value:!0}),t);var R={};E(R,{VERSION:()=>O});module.exports=N(R);const O="3.14.806";
@@ -0,0 +1 @@
1
+ "use strict";var b=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var I=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var n in t)b(e,n,{get:t[n],enumerable:!0})},O=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of _(t))!I.call(e,o)&&o!==n&&b(e,o,{get:()=>t[o],enumerable:!(s=V(t,o))||s.enumerable});return e};var M=e=>O(b({},"__esModule",{value:!0}),e);var H={};E(H,{registerViewEvents:()=>x});module.exports=M(H);var p=require("./delegate.js"),g=require("./handlerChain.js");const k=1e-6,h=new WeakMap;function T(e,t,n){const s=e.defaultView,o=s&&s.IntersectionObserver;if(typeof o!="function")return null;let i=h.get(e);i||h.set(e,i=new Map);const r=t+"|"+n;let c=i.get(r);if(c)return c;c={id:r,byKey:i,threshold:t,targets:new Map,observer:null};try{const f=n?{threshold:t,rootMargin:n}:{threshold:t};c.observer=new o(u=>C(c,u),f)}catch{return null}return i.set(r,c),c}function C(e,t){for(let n=0;n<t.length;n++){const s=t[n],o=e.targets.get(s.target);if(!o)continue;const i=!!s.isIntersecting&&s.intersectionRatio>=e.threshold-k;if(i===o.inView)continue;o.inView=i;const r=i?"in":"leave",c=o.subs.slice();for(let f=0;f<c.length;f++){const u=c[f];if(!(u.kind!==r||u.dead)){u.once&&w(e,o,u);try{u.run(s)}catch(a){L(a)}}}}}function L(e){typeof globalThis.reportError=="function"?globalThis.reportError(e):queueMicrotask(()=>{throw e})}function w(e,t,n){if(n.dead)return;n.dead=!0;const s=t.subs.indexOf(n);s!==-1&&t.subs.splice(s,1),!t.subs.length&&(e.targets.delete(t.node),e.observer.unobserve(t.node),!e.targets.size&&(e.observer.disconnect(),e.byKey.delete(e.id)))}function y(e,t,n,s,o){const i=(0,p.stringHandler)(e,o.handler),r=o.options;if(typeof i!="function")return;const c=r&&r.threshold,f=typeof c=="number"&&c>=0&&c<=1?c:0,u=r&&typeof r.rootMargin=="string"?r.rootMargin.trim():"",a=T(n,f,u);if(!a)return;let l=a.targets.get(t);l||(l={node:t,inView:!1,subs:[]},a.targets.set(t,l),a.observer.observe(t));const v={kind:s,once:!!(r&&r.once===!0),run:(0,p.wrapEventHandler)(e,i),dead:!1};l.subs.push(v);const d=e.__ref;d.__eventCleanup||(d.__eventCleanup=[]),d.__eventCleanup.push(()=>w(a,l,v))}function x(e){const t=e.node;if(!t||t.nodeType!==1)return;const n=t.ownerDocument,s=n&&n.defaultView;if(!s||typeof s.IntersectionObserver!="function")return;const o=(0,g.handlerEntries)(e.onInView);for(let r=0;r<o.length;r++)y(e,t,n,"in",o[r]);const i=(0,g.handlerEntries)(e.onLeaveView);for(let r=0;r<i.length;r++)y(e,t,n,"leave",i[r])}
@@ -1 +1 @@
1
- const i="http://www.w3.org/2000/svg",d=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"]),y=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 l(t){return y.has(t)||d.has(t)}function c(t){return d.has(t)}function u(t){let{tag:e,key:n}=t;if(typeof e=="function")try{e=e(t,t.state,t.context)}catch(o){e=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${n||"<anon>"}" \u2014 falling back to key-based tag detection:`,o?.message||o)}if(e===!0&&(e=n),typeof e=="string"&&l(e))return e;if(!n||typeof n!="string")return"div";const a=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]);let r=n.toLowerCase();return r.includes(".")&&(r=r.split(".")[0]),r.includes("_")&&(r=r.split("_")[0]),l(r)&&!a.has(r)?r:"div"}const p={};function g(t,e){const n=e?.context?.document||globalThis.document;if(!n)return null;if(t==="string")return n.createTextNode(e?.text||"");if(t==="fragment")return n.createDocumentFragment();if(c(t)){const a=e?.parent;if(t==="svg"||a?.node?.namespaceURI===i)return n.createElementNS(i,t);if(t!=="svg")return n.createElement("div")}return n.createElement(t)}function x(t){const e=t.tag=u(t),a=c(e)&&(e==="svg"||t.parent?.node?.namespaceURI===i)?"svg:"+e:e,r=t?.context?.document||globalThis.document;let o=p[a];if(o||(o=p[a]=g(e,t)),!o)return null;const s=r&&o.ownerDocument!==r?g(e,t):o.cloneNode(!0);return e==="string"&&(s.nodeValue=t.text||""),s}const h=t=>{const e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;const n=t.parent,a=n&&n.__ref?h(n):null,r=a===null?"":a?a+"."+t.key:String(t.key);return e&&(e.__hydrationPath=r),r},v=new Set(["src","srcset"]);function _(t){const e=t?.context?.__hydration;if(!e)return null;const n=t.tag=u(t);if(n==="string"||n==="fragment")return null;const a=h(t),r=e.registry[a===""?"__root":a],o=r!==void 0?e.nodes[r]:null;if(!o||o.nodeType!==1||e.claimed.has(o))return r!==void 0&&e.misses++,null;const s=c(n)&&(n==="svg"||t.parent?.node?.namespaceURI===i),m=c(n)&&!s&&n!=="svg"?"div":n,b=s?o.namespaceURI===i:o.namespaceURI!==i;if(o.localName!==m||!b)return e.misses++,null;e.claimed.add(o),e.adopted++;for(const f of Array.from(o.getAttributeNames?o.getAttributeNames():[]))v.has(f)||o.removeAttribute(f);for(;o.firstChild;)o.removeChild(o.firstChild);return o}export{i as SVG_NS,d as SVG_TAGS,_ as adoptHydrationNode,x as cacheNode,g as createHTMLNode,u as detectTag,h as elementPath,c as isSvgTag,l as isValidTag};
1
+ const i="http://www.w3.org/2000/svg",s=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"]),p=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 l(e){return p.has(e)||s.has(e)}function d(e){return s.has(e)}function g(e){let{tag:t,key:o}=e;if(typeof t=="function")try{t=t(e,e.state,e.context)}catch(n){t=void 0,typeof console<"u"&&console.error&&console.error(`[smbls] \`tag:\` factory threw on "${o||"<anon>"}" \u2014 falling back to key-based tag detection:`,n?.message||n)}if(t===!0&&(t=o),typeof t=="string"&&l(t))return t;if(!o||typeof o!="string")return"div";const a=new Set(["html","head","body","meta","link","script","style","title","base","noscript","template","th","tr","td","thead","tbody","tfoot","caption","col","colgroup"]);let r=o.toLowerCase();return r.includes(".")&&(r=r.split(".")[0]),r.includes("_")&&(r=r.split("_")[0]),l(r)&&!a.has(r)?r:"div"}const f={};function u(e,t){const o=t?.context?.document||globalThis.document;if(!o)return null;if(e==="string")return o.createTextNode(t?.text||"");if(e==="fragment")return o.createDocumentFragment();if(d(e)){const a=t?.parent;if(e==="svg"||a?.node?.namespaceURI===i)return o.createElementNS(i,e);if(e!=="svg")return o.createElement("div")}return o.createElement(e)}function m(e){const t=e.tag=g(e),a=d(t)&&(t==="svg"||e.parent?.node?.namespaceURI===i)?"svg:"+t:t,r=e?.context?.document||globalThis.document;let n=f[a];if(n||(n=f[a]=u(t,e)),!n)return null;const c=r&&n.ownerDocument!==r?u(t,e):n.cloneNode(!0);return t==="string"&&(c.nodeValue=e.text||""),c}function h(e,t){return t&&t.parentNode===e?t.nextSibling:e.firstChild}export{i as SVG_NS,s as SVG_TAGS,m as cacheNode,u as createHTMLNode,g as detectTag,h as firstSlotAfterText,d as isSvgTag,l as isValidTag};
@@ -0,0 +1 @@
1
+ const t=new Set;function i(n){const e=n&&n.node;if(!e)return!1;const r=e.nodeType===11?n.__ref?.__fragmentAnchor:e;return r?r.isConnected!==!1:!1}function s(n,e){const r=n&&n.node,o=n&&n.__ref;if(!(!r||!o||typeof e!="function")){if(i(n)){e(n);return}(o.__onConnected||(o.__onConnected=[])).push(e),t.add(n)}}function d(){if(t.size)for(const n of t){const e=n.__ref,r=n.node;if(!e||!r){t.delete(n);continue}if(!i(n))continue;t.delete(n);const o=e.__onConnected;if(e.__onConnected=null,!!o)for(let c=0;c<o.length;c++)try{o[c](n)}catch(f){typeof console<"u"&&console.error&&console.error("[smbls] whenConnected callback failed:",f?.message||f)}}}function _(n){t.size&&t.delete(n)&&n.__ref&&(n.__ref.__onConnected=null)}export{d as flushConnected,_ as forgetConnected,i as isElementConnected,s as whenConnected};