@symbo.ls/element 3.14.803 → 3.14.805

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 +28 -0
  2. package/README.md +189 -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 Vs=Object.create;var Ht=Object.defineProperty;var Gs=Object.getOwnPropertyDescriptor;var Ks=Object.getOwnPropertyNames;var Ws=Object.getPrototypeOf,zs=Object.prototype.hasOwnProperty;var Ys=(t,o)=>{for(var s in o)Ht(t,s,{get:o[s],enumerable:!0})},vo=(t,o,s,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of Ks(o))!zs.call(t,e)&&e!==s&&Ht(t,e,{get:()=>o[e],enumerable:!(n=Gs(o,e))||n.enumerable});return t};var qs=(t,o,s)=>(s=t!=null?Vs(Ws(t)):{},vo(o||!t||!t.__esModule?Ht(s,"default",{value:t,enumerable:!0}):s,t)),Zs=t=>vo(Ht({},"__esModule",{value:!0}),t);var ye={};Ys(ye,{BEFORE_UPDATE_MAX_CONSECUTIVE_FAILURES:()=>Qt,acquireBeforeUpdateGuard:()=>Fs,create:()=>m,default:()=>he,flushMounts:()=>Zt,isStaticCssProp:()=>Xn,recompileStaticCss:()=>Jn,reconcileAttrProp:()=>te,releaseBeforeUpdateGuard:()=>It,resolveStyleBlock:()=>$t,writeAttr:()=>Ft,writeElementText:()=>Nt});module.exports=Zs(ye);var I=require("@symbo.ls/signal"),E=require("@symbo.ls/signal"),G=require("./runContext.js"),ot=require("./cache.js"),U=require("./registry.js"),bt=require("./delegate.js"),Ls=require("./bridge.js"),At=require("./extends.js"),Rs=require("./methods.js"),Ae=require("./dispose.js"),et=require("./devRuntime.js"),z=require("./mountScheduler.js"),L=require("@symbo.ls/utils"),Ut=qs(require("@symbo.ls/utils"),1),K=require("./pluginHooks.js"),ut=require("@symbo.ls/state"),v=require("css-in-props"),tt=require("@symbo.ls/css"),M=require("@symbo.ls/scratch"),j=require("attrs-in-props"),Ms=require("./engineRegistry.js"),H=require("./cssLonghands.js"),q=require("./attributeFirst.js"),Ns=require("./version.js");const jo=(0,Ms.resolveElementIdEngine)({uniqId:1,scopedStyleId:0},Ns.VERSION),Ct=[],ct=new Set;let oo=!1,Eo=0,lt=null,kt=null;function pt(){return typeof Date<"u"&&typeof Date.now=="function"?Date.now():0}function Po(){return typeof document<"u"&&document.visibilityState==="hidden"}const Qs=250,Xs=1e3;function Js(){return kt&&(kt!==(typeof requestAnimationFrame=="function"?requestAnimationFrame:null)||Po())?!0:pt()-Eo>=Xs}function ms(){if(oo=!0,Eo=pt(),kt=null,typeof requestAnimationFrame!="function"){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,0);lt=t?()=>t(o):null;return}if(Po()){const t=typeof clearTimeout=="function"?clearTimeout:null,o=setTimeout(Zt,Qs);lt=t?()=>t(o):null}else{const t=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:null;kt=requestAnimationFrame;const o=requestAnimationFrame(Zt);lt=t?()=>t(o):null}}function Vt(){if(oo){if(!Js())return;const t=lt;if(lt=null,t)try{t()}catch{}}ms()}const Oo=300,To=15e4;function Zt(){if(oo=!1,lt=null,kt=null,ct.size&&se(),!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=pt());const e=pt()-n.__mountFirstAttemptAt;n.__mountAttempts<=Oo&&e<To?(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,Ls.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 Do(t,o){typeof t.onContentUpdate=="function"&&((0,K.dispatchPluginHook)("contentUpdate",t,o),(0,G.withDesignSystem)(t,()=>{try{t.onContentUpdate(t,t.state,t.context,o)}catch(s){if((0,K.reportLifecycleError)(t,"onContentUpdate",s),t.context?.strictMode)throw s}}))}function X(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function tn(t){return t.charAt(2).toLowerCase()+t.slice(3)}function on(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 Lo(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(;sn(t,s);)s="$"+s;return s!==o&&nn(t,o,s),s}function sn(t,o){if(U.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 Ro=new Set;function nn(t,o,s){if(!(0,et.isLoudDevRuntime)())return;const n=t.__ref&&t.__ref.path&&t.__ref.path.join(".")||t.key||"<root>",e=n+"::"+o;Ro.has(e)||(Ro.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 m(t,o,s,n={},e){if((0,E.getObserver)())return(0,G.untrack)(()=>m(t,o,s,n,e));if(t==null||t===!1)return null;const c=Cn(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)||`_${jo.uniqId++}`,r.parent=o||null,r.context=t.context||o?.context||n.context||{},r.context.__create||(r.context.__create=m);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=No(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 _=r.key||r.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \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=cn(t,s,r.context?.components);return u.length&&(i.__ifLateMerge={definition:f,key:s,ownKey:a,names:u,options:n}),typeof r.if=="function"&&Jo(r,i,r.if),r}r.tag||(r.tag=(0,ot.detectTag)(r)),N("Init",r,n);const d=r.node=(0,ot.adoptHydrationNode)(r)||(0,ot.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),Os(r,n),Zo(r),Xo(r);try{Ts(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),Ds(r,o,e),typeof r.html=="function"&&r.node&&!r.node.innerHTML&&(0,G.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,_=()=>{if(r.node){if(r.node.isConnected){l&&(0,M.pushConfig)(l);try{u(r,r.state,r.context)}catch(g){console.error("[DOMQL] onFrame error:",g)}finally{l&&(0,M.popConfig)()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return r}const Mo=new Set(["childProps","attr","style","scope","data","vars"]);function No(t,o,s,n,e,c){if(s&&!o.extends&&!o.extend){const y=s.indexOf("_"),p=s.indexOf(".");let A=y>0?y:-1;if(p>0&&(A<0||p<A)&&(A=p),A>0){const w=s.substring(0,A),h=t.context?.components;h&&(h[w]||h["smbls."+w])?o={...o,extends:w}:h&&(0,et.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,At.applyExtends)(t,o,c);const a=(0,At.openMergeLayer)(t),r=t.props&&typeof t.props=="object"?t.props:null;for(const y in o){if(y==="parent"||y==="node"||y==="__ref"||y==="extends"||y==="context"||y==="props")continue;if(y==="key"){n&&(t.key=e?Kt(e,n):n);continue}const p=o[y];a&&a.mark(y);const A=t[y],w=A&&p&&typeof A=="object"&&typeof p=="object"&&!Array.isArray(A)&&!Array.isArray(p)&&typeof A!="function"&&typeof p!="function";w&&y.charCodeAt(0)>=65&&y.charCodeAt(0)<=90?t[y]=vt(A,p):w&&Mo.has(y)?t[y]={...A,...p}:w&&no(y)?t[y]=vt(A,p):t[y]=p}function i(y){for(const p in y){const A=y[p],w=t[p],h=w&&A&&typeof w=="object"&&typeof A=="object"&&!Array.isArray(w)&&!Array.isArray(A)&&typeof w!="function"&&typeof A!="function";h&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?t[p]=vt(w,A):h&&Mo.has(p)?t[p]={...w,...A}:h&&no(p)?t[p]=vt(w,A):t[p]=A}}if(r&&i(r),o.props&&typeof o.props=="object"&&(i(o.props),a))for(const y in o.props)a.mark(y);(0,At.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 y={};f&&Object.assign(y,f),o.scope!==void 0&&Object.assign(y,o.scope),t.scope=(0,I.createScopeStore)(y,l)}else l&&(t.scope=l);o.if!==void 0&&(t.if=o.if);const _=t.__ref,g=kn(t,_&&_.__runtimeSource);return _&&(_.__declaredArrays=g||void 0),(0,Rs.addMethods)(t),fn(t,e,o,c),o}const en=new Set(["key","parent","context","__ref"]);function rn(t,o){for(const n of Object.keys(t))en.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,G.untrack)(()=>No(t,s,o.key,o.ownKey,t.parent,o.options))}function cn(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,K.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 fn(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,I.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",_=new Set,g=(A,w)=>{_.has(A)||(0,L.isPolyglotWritableKey)(u,A,f)&&(f[A]=w,_.add(A),(0,L.markPolyglotSeeded)(u,A,w))},y=d.translations[l];if(y&&typeof y=="object")for(const A in y)g(A,y[A]);const p=new Set(d.languages||[]);for(const A in d.translations)p.has(A)||g(A,d.translations[A])}(0,I.isStore)(f)||eo(t,f,n),t.state=(0,I.isStore)(f)?f:(0,I.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=Io(r,o),t.state&&typeof t.state=="object"&&!(0,I.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),un(t,r,o),N("StateCreated",t,n);return}if(typeof r=="function"){const i=r(t,o?.state);if((0,I.isStore)(i))t.state=i;else{const f=i||{};eo(t,f,n),t.state=(0,I.createStore)(f,o?.state?void 0:ro(t.context))}}else if((0,I.isStore)(r))t.state=r;else{const i={...r};eo(t,i,n),t.state=(0,I.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 Fo(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 $o(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 Io(t,o){if(!o)return{};if(t===".")return o.state||{};if(t.startsWith("../")||t.startsWith("~/")){const[e,c]=$o(t,o);return c?Fo(e,c):e??{}}if(o.state?.[t]!==void 0)return o.state[t];const s=Fo(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 an(t,o){const[s,n]=$o(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 un(t,o,s){const n=t.__ref;if(!n||!s||o==="."||!(0,I.isStore)(s.state))return;n.__stateBinding&&n.__stateBinding.dispose();const e=(0,G.untrack)(()=>(0,E.createEffect)(()=>{const c=an(o,s);!c||typeof c!="object"||c===t.state||(0,G.untrack)(()=>Bo(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 Bo(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),Ho(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&&Bo(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,Ho(e))}function Ho(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 dn=new Set(["s","state","ctx","context"]),io=new WeakMap;function Uo(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 ln(t){const o=Uo(t);return o?o.params.map(s=>s.split("=")[0].trim()).filter(Boolean):[]}const Vo=new WeakMap;function pn(t){let o=Vo.get(t);return o===void 0&&(o=hn(Uo(t)),Vo.set(t,o)),o}function hn(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 yn=3,_n=/^(is|has)[A-Z0-9_$]/,gn=new Set(["routerOptions"]),Go=new WeakSet;function bn(t,o){if(typeof t!="function"||t.length!==2||o&&(_n.test(o)||gn.has(o))||Go.has(t))return!1;const s=ln(t);if(s.length<2)return!1;const n=s[1].replace(/[{}[\]]/g,"").trim();return n.length<yn||dn.has(n)?!1:(Go.add(t),!0)}function An(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"||U.REGISTRY.has(r))continue;const i=r.charCodeAt(0);i>=65&&i<=90||X(r)||v.CSS_PROPS_REGISTRY[r]||v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(r)||i!==45&&((0,j.checkAttributeByTagName)(s,r)||((0,et.isLoudDevRuntime)()&&bn(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 xn(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 xn(t,o),s.apply(this,n)}}function ht(t,o){if(!(!t||Array.isArray(t)||typeof t!="object"))return t[o]}function P(t,o){return()=>t.path.join(".")+"::"+o}const Ko=new Set;function $(t,o,s){if(!(0,et.isLoudDevRuntime)())return;const n=P(t,o)();Ko.has(n)||(Ko.add(n),console.warn(`[smbls] "${o}" effect threw on ${t.path.join(".")} \u2014 keeping previous value:`,s?.message||s))}const Wo=/(['"`])((?:\\.|(?!\1)[^\\])*)\1/g,wn=(t,o)=>{let s;try{s=String(t)}catch{return}if(!s.includes("{{"))return;Wo.lastIndex=0;let n;for(;(n=Wo.exec(s))!==null;)n[2].includes("{{")&&o.add(n[2])},Sn=(t,o)=>!X(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"&&Sn(t,n)&&wn(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,zo=(t,o)=>{const s=t.__ref&&t.__ref.__runtimeSource;return!!s&&jt(s,o)},yt=(t,o)=>zo(t,o)?Et(t.__ref.__runtimeSource[o]):null,Ot=(t,o)=>(o&&t&&typeof t=="object"&&fo.set(t,o),t),Cn=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)}}},kn=(t,o)=>{let s=null;for(const n of Object.keys(t)){if(U.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},Yo=(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}},qo=["attr","aria","data","metadata"],vn=t=>{if(qo.includes(t))return!0;const o=t.charCodeAt(0);return o===46||o===33||o===64},jn=(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(!vn(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)),_=a[u];if(d&&_&&typeof _=="object"&&!Array.isArray(_)&&qo.includes(u)){for(const g in _)co(g,_[g],s,n,l);continue}co(u,_,s,n,l)}continue}co(e,a,s,n,r)}return s};function Zo(t,o){const s=t.__ref,n=!!(o&&o.skipIfEffect),e=jn(t,s.__runtimeSource);if(s.__authoredTemplates)for(const i of e)s.__authoredTemplates.add(i);else s.__authoredTemplates=e;if(An(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){$(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"&&!U.REGISTRY.has(i)&&!X(i)&&!s.__exec[i]&&!(0,q.isAttributeFirst)(c,i)){if(v.CSS_PROPS_REGISTRY[i]){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,_=null,g=null,y;const p=(0,E.createEffect)(()=>{const A=t.context?.designSystem;A&&(0,M.pushConfig)(A);try{const w=d(t,t.state,t.context);(0,v.pushStaticCssPass)();let h;try{h=v.CSS_PROPS_REGISTRY[u](w,t,t.state,t.context)}finally{(0,v.popStaticCssPass)()}if(Array.isArray(h)){const x={};for(const S of h)if(S)for(const k in S)x[k]=S[k];h=x}const b=u==="show"||u==="hide";if(h&&t.node&&On(h)){const x=_t(h);if(x===null||x!==y){y=x;const S=(0,tt.css)(h,null,t.context?.cssPrefix),k=S?S.split(" ").filter(Boolean):null;if(t.node.classList){if(g)for(const C of g)t.node.classList.remove(C);if(k&&k.length)for(const C of k)t.node.classList.add(C);g=k}}l=void 0,_=null}else if(h&&t.node){if(g){for(const S of g)t.node.classList.remove(S);g=null,y=void 0}const x=_t(h);if(x===null||x!==l||!Dt(t.node,_)){l=x;const S=is(t,h);_=Tt(t.node,S)}}else t.node&&b&&(l=void 0,_=null,t.node.style.display="")}finally{A&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(p),s.__exec[i]=f}else if(v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(i)){const f=t[i],d=R(t,t[i+"Deps"],f),u=i;let l,_=null;const g=(0,E.createEffect)(()=>{const y=t.context?.designSystem;y&&(0,M.pushConfig)(y);try{const p=d(t,t.state,t.context);if(t.node)if(p!=null){const A=u+":"+String(p);if(A!==l||!Dt(t.node,_)){l=A;const w={[u]:p},h=is(t,w);_=Tt(t.node,h)}}else l=void 0,_=null,t.node.style[u]=""}finally{y&&(0,M.popConfig)()}},{depth:s.path.length,label:P(s,u)});s.__effects.push(g),s.__exec[i]=f}else if(i.charCodeAt(0)===45){const f=t[i];ns(t,i,f,t[i+"Deps"],i),s.__exec[i]=f}}if(Tn(t),typeof t.html=="function"){const i=t.html,f=R(t,t.htmlDeps,i),d=(0,E.createEffect)(()=>{(0,G.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)),mo(t,u)}catch(u){$(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{mo(t,L.replaceLiteralsWithObjectFields.call(t,i,t.state))}catch(d){$(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,y;const p=(0,E.createEffect)(()=>{const A=f(t,t.state,t.context),w=t.context&&t.context.designSystem;let h;if(A&&typeof A=="object"&&A===l&&w===g){const x=_t(A);h=x!==null&&x===_?y:$t(t,A),_=x}else h=$t(t,A),_=void 0;l=A,g=w,y=h;const b=_t(h);(b===null||b!==d||!Dt(t.node,u))&&(d=b,lo(t.node,u,h),st(t.node,h),u=Tt(t.node,h))},{depth:s.path.length,label:P(s,"style")});s.__effects.push(p),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,ht(t.styleDeps,i),f);let u,l=null;const _=(0,E.createEffect)(()=>{try{const g=d(t,t.state,t.context);if(t.node){const y=i+":"+String(g);if(y!==u||!Dt(t.node,l)){u=y;const p=$t(t,{[i]:g});lo(t.node,l,Object.assign({},p,{[i]:""})),st(t.node,p),l=Tt(t.node,p)}}}catch(g){$(s,"style."+i,g)}},{depth:s.path.length,label:P(s,"style."+i)});s.__effects.push(_)}if(t.attr&&typeof t.attr=="object"){for(const i in t.attr)if(typeof t.attr[i]=="function"){const f=R(t,ht(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){$(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,j.serializeAttrValue)(d,l??""))}catch(l){$(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 _=f,g="aria-"+i.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),y=(0,E.createEffect)(()=>{try{const p=L.replaceLiteralsWithObjectFields.call(t,_,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(g,(0,j.serializeAttrValue)(g,p??""))}catch(p){$(s,"aria."+i,p)}},{depth:s.path.length,label:P(s,"aria."+i)});y._attrName=g,s.__effects.push(y);continue}if(typeof f!="function")continue;const d=R(t,ht(t.ariaDeps,i),t.aria[i]),u="aria-"+i.replace(/[A-Z]/g,_=>"-"+_.toLowerCase()),l=(0,E.createEffect)(()=>{try{const _=d(t,t.state,t.context);if(!t.node?.setAttribute)return;Ft(t.node,u,_)}catch(_){$(s,"aria."+i,_)}},{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 g=f,y="data-"+i.replace(/[A-Z]/g,A=>"-"+A.toLowerCase()),p=(0,E.createEffect)(()=>{try{const A=L.replaceLiteralsWithObjectFields.call(t,g,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(y,A??"")}catch(A){$(s,"data."+i,A)}},{depth:s.path.length,label:P(s,"data."+i)});p._attrName=y,s.__effects.push(p);continue}if(typeof f!="function")continue;const d=R(t,ht(t.dataDeps,i),t.data[i]),l="data-"+i.replace(/[A-Z]/g,g=>"-"+g.toLowerCase()),_=(0,E.createEffect)(()=>{try{const g=d(t,t.state,t.context);if(!t.node?.setAttribute)return;g==null||g===!1?t.node.removeAttribute(l):typeof g!="function"&&typeof g!="object"&&t.node.setAttribute(l,g===!0?"":g)}catch(g){$(s,"data."+i,g)}},{depth:s.path.length,label:P(s,"data."+i)});_._attrName=l,s.__effects.push(_)}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,ht(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){$(s,"class."+i,u)}},{depth:s.path.length,label:P(s,"class."+i)});s.__effects.push(d)}!n&&typeof t.if=="function"&&Jo(t,s,t.if);for(const i of Object.keys(t)){if(U.REGISTRY.has(i)||typeof t[i]!="function")continue;const f=i.charCodeAt(0);if(f>=65&&f<=90||X(i))continue;const d=t[i];s.__exec[i]=d;const u=t.tag||"div";if((0,j.checkAttributeByTagName)(u,i)&&!(0,q.isCssProp)(u,i)){const l=(0,j.camelToAttr)(i)||i,_=R(t,t[i+"Deps"],d),g=(0,E.createEffect)(()=>{try{let y=_(t,t.state,t.context);typeof y=="string"&&y.includes("{{")&&(y=L.replaceLiteralsWithObjectFields.call(t,y,t.state)),t.node?.setAttribute&&Ft(t.node,l,y,!0)}catch(y){$(s,i,y)}},{depth:s.path.length,label:P(s,i)});g._attrName=l.toLowerCase(),s.__effects.push(g)}}const r=t.tag||"div";for(const i of Object.keys(t)){if(U.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||X(i)||(0,q.isCssProp)(r,i)||j.ATTR_TRANSFORMS[i]||!(0,j.checkAttributeByTagName)(r,i))continue;const u=(0,j.camelToAttr)(i)||i,l=(0,E.createEffect)(()=>{try{const _=L.replaceLiteralsWithObjectFields.call(t,f,t.state);if(!t.node||!t.node.setAttribute)return;t.node.setAttribute(u,(0,j.serializeAttrValue)(u,_??""))}catch(_){$(s,i,_)}},{depth:s.path.length,label:P(s,i)});l._attrName=u.toLowerCase(),s.__effects.push(l)}if($n(t),zn(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 _=[];for(let p=0;p<f.length;p++){const A=f[p];try{_[p]=typeof A=="function"?A(t,t.state,t.context):t.state?.[A]}catch{_[p]=void 0}}if(!d){d=!0,u=_;return}let g=_.length!==u.length;for(let p=0;!g&&p<_.length;p++)_[p]!==u[p]&&(g=!0);const y=u;u=_,g&&(0,G.withDesignSystem)(t,()=>{try{i(t,t.state,t.context,{prev:y,next:_})}catch(p){if((0,K.reportLifecycleError)(t,"onStateUpdate",p),t.context?.strictMode)throw p}})},{depth:s.path.length,label:P(s,"onStateUpdate")});s.__effects.push(l)}Un(t)}function Qo(t){const o=t.parent,s=o?.node;if(!s||!t.node){Ds(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 Xo(t){ts(t),mn(t),_s(t),le(t),de(t)}function Jo(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,rn(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,ot.cacheNode)(t)),t.node&&(t.node.ref=t),Qo(t),ts(t),_s(t),N("Render",t,{}),so(t,{});else{if(o.__ifInitialized=!0,o.__ifLateMerge=null,t.tag||(t.tag=(0,ot.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,ot.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),Os(t,{}),Zo(t,{skipIfEffect:!0}),Xo(t),Ts(t,{}),Qo(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 En(t,o){return o!=="checked"||!t||t.tagName!=="INPUT"?null:t.hasAttribute("checked")}function Pn(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,j.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,j.serializeAttrValue)(o,s)))}function Wt(t,o,s){const n=En(t,o);s==null?t.removeAttribute(o):t.setAttribute(o,s),Pn(t,n)}function mo(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 ts(t){const{node:o}=t;if(o){if((typeof t.text=="string"&&!t.text.includes("{{")||typeof t.text=="number")&&Nt(t,t.text),ws(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}st(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,j.isEnumeratedTrueFalseAttr)(s)||o.setAttribute&&o.setAttribute(s,(0,j.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 _t(t){if(t==null||typeof t!="object")return"s:"+String(t);try{return"o:"+JSON.stringify(t)}catch{return null}}function On(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=J(e);n.push(a,uo(s,a),os(s,a))}return n}function uo(t,o){return typeof t.getPropertyValue=="function"?t.getPropertyValue(o):""}function os(t,o){return typeof t.getPropertyPriority=="function"?t.getPropertyPriority(o):""}function J(t){return(0,H.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(J(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]||os(s,o[n])!==o[n+2])return!1;return!0}const Lt=t=>t.charCodeAt(0)===45&&t.charCodeAt(1)===45,ss=t=>typeof t=="number"||t===!0||typeof t=="string"&&t!=="",zt=t=>Lt(t)?t:"--"+t;function Yt(t,o){if(!nt(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)}ss(e)&&(s||(s={}),s[zt(n)]=e)}return s}function ns(t,o,s,n,e){es(t,e,R(t,n,s),c=>ss(c)?{[o]:c}:null)}function es(t,o,s,n,e){const c=t.__ref;let a,r=null;const i=(0,E.createEffect)(()=>{(0,G.withDesignSystem)(t,()=>{try{const f=n(s(t,t.state,t.context)),d=t.node;if(!d||!d.style)return;const u=_t(f);(u===null||u!==a||!Dt(d,r))&&(a=u,lo(d,r,f),f&&st(d,f),r=f?Tt(d,f):null,e&&e(f))}catch(f){$(c,o,f)}})},{depth:c.path.length,label:P(c,o)});c.__effects.push(i)}function Tn(t){const o=t.__ref,s=t.vars;if(typeof s=="function"){Dn(t,s),o.__exec.vars=s;return}if(nt(s))for(const n of Object.keys(s)){const e=s[n];!n||typeof e!="function"||ns(t,zt(n),e,ht(t.varsDeps,n),"vars."+n)}}function Dn(t,o){const s=t.__ref;es(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(!nt(s))return!1;for(const n of Object.keys(s))if(typeof s[n]=="function"&&zt(n)===o)return!0;return!1}function Ln(t){let o=null;for(const s in t)t[s]!=null&&s.charAt(0)!=="&"&&(o||(o=new Set),o.add(J(s)));return o}function Rn(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=J(a);H.CSS_LONGHAND_SHORTHANDS[i]&&(c||(c={}),c[i]=r)}e.__declaredLonghands=c}function rs(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=H.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 is(t,o){const s=t.node;st(s,o);const n=Ln(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=rs(t,n);return c?(st(s,c),Object.assign({},o,c)):o}function Mn(t){const o=t.__ref;if(!o||!o.__inlineCssKeys||!o.__declaredLonghands)return;const s=rs(t,o.__inlineCssKeys);s&&st(t.node,s)}function $t(t,o){return!o||typeof o!="object"?o:(0,G.withDesignSystem)(t,()=>{try{return(0,v.resolveStyleBlockTokens)(o,t)}catch{return o}})}function st(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,H.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&&Nn(t,s)}function Nn(t,o){const s=`_ds${jo.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 _=f[l];if(typeof _=="object"){const g=l.includes("&")?i.split(", ").map(p=>l.replace(/&/g,p)).join(", "):i.split(", ").map(p=>`${p} ${l}`).join(", ");let y="";for(const p in _)y+=`${J(p)}: ${_[p]};`;u+=(0,tt.wrapHoverRule)(`${g} { ${y} }`,g)+`
5
- `}else d+=`${J(l)}: ${_};`}d&&(c+=(0,tt.wrapHoverRule)(`${i} { ${d} }`,i)+`
6
- `),u&&(c+=u)}}c&&(e.textContent+=c)}const cs=new Set;function fs(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 Fn(t,o,s){const n=fs(s);queueMicrotask(()=>{if(!t.__ref)return;let e;try{e=o(t,t.state,t.context)}catch{return}if(fs(e)===n)return;const c=t.__ref.path?t.__ref.path.join("."):t.key||"?";cs.has(c)||(cs.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 $n(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,et.isLoudDevRuntime)()&&Fn(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,I.isStore)(t.state)?t.state.root:null);if(!l||!(0,I.isStore)(l))return;let _=l;_=_[i];for(let y=0;y<f.length&&!(_==null||typeof _!="object");y++)if((0,I.isStore)(_))_=_[f[y]];else break;if(!d.value)return;let g=!1;if(typeof t.onBeforeUpdate=="function"&&(0,G.withDesignSystem)(t,()=>{try{if(Fs(e)){const y=t.onBeforeUpdate(t,t.state,t.context,{updateBySubscription:!0});y&&typeof y.then=="function"?y.then(()=>It(e,!1),p=>{It(e,!0),(0,K.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:p})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",p)}):(It(e,!1),y===!1&&(g=!0))}}catch(y){It(e,!0),(0,K.dispatchPluginHook)("error",t,{hook:"onBeforeUpdate",error:y})||console.error("[DOMQL] subscribeTo onBeforeUpdate error:",y)}}),!g&&t.node&&e.__effects)for(let y=0;y<e.__effects.length;y++){const p=e.__effects[y];p&&p!==u&&!p._disposed&&!p._isSubscribeToEffect&&typeof p._execute=="function"&&p._execute()}!g&&typeof t.onUpdate=="function"&&(0,G.withDesignSystem)(t,()=>{try{t.onUpdate(t,t.state,t.context)}catch(y){(0,K.dispatchPluginHook)("error",t,{hook:"onUpdate",error:y})||console.error("[DOMQL] subscribeTo onUpdate error:",y)}})},{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 as=new Set;function In(t,o){const s=o?.__ref?.path?o.__ref.path.join("."):o?.key||"?",n=s+"::"+t;as.has(n)||(as.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 us=new Map;function Bn(t){let o=us.get(t);if(o)return o;o=[];const s=n=>{if(n)for(const e of n)o.push((0,H.cssCamelName)(e))};return s(H.CSS_LONGHAND_SHORTHANDS[t]),s(H.CSS_SHORTHAND_LONGHANDS[t]),us.set(t,o),o}function ds(t,o,s){if(po(t,o)||s&&s.has(o))return!0;const n=Bn(J(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 gt(t,o,s,n){const e={},c=new Set,a=(r,i,f)=>{const d=f?new Set(Object.keys(e)):null;if(v.CSS_PROPS_REGISTRY[r]){const u=v.CSS_PROPS_REGISTRY[r](i,o,o.state,o.context);if(u){const l=Array.isArray(u)?u:[u];for(const _ of l)_&&Object.assign(e,_)}}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,ds(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=gt(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,et.isLoudDevRuntime)()&&In(r,o);continue}const f=yo(r,o),d=gt(i,o,!1,n);Object.keys(d).length&&(e[f]=d);continue}a(r,i,ds(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 nt=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function ls(t,o){for(const s in o){const n=o[s];t[s]=nt(n)?ls(nt(t[s])?t[s]:{},n):n}return t}function Hn(t,o){if(!nt(o))return;let s;for(const n of t.split(" ")){const e=n?o[n]:null;nt(e)&&(s=ls(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 ps(t,o,s){if(!o||typeof o!="object"||Array.isArray(o))return null;if(ho(t,s)){const c=gt(o,s,!1);return Object.keys(c).length?{cssProp:`[data-theme="${t.slice(1)}"] &`,block:c}:null}const n=yo(t,s),e=gt(o,s,!1);return Object.keys(e).length?{cssProp:n,block:e}:null}function Un(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=ps(s,n,t),u=d?_t(d.block)+"::"+d.cssProp:null;if(u!==null&&u===c)f=!0;else if(c=u,d){const l=(0,tt.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 Vn=()=>!0,Gn=(t,o)=>{const s=t.charAt(0);return(s===":"||s==="@"||s==="&"||s==="[")&&o&&typeof o=="object"&&!Array.isArray(o)?!0:!!v.CSS_PROPS_REGISTRY[t]||!!(v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(t))||Lt(t)||t==="vars"};function Kn(t,o,s){const n={};let e=!1;for(const r in s)Object.prototype.hasOwnProperty.call(s,r)&&(r!=="data"&&r!=="aria"&&(Gn(r,s[r])||U.REGISTRY.has(r))?n[r]=!0:e=!0);if(!e)return null;const c=(0,j.extractConditionalAttrs)({[o]:s},t.tag||"div",n,Vn);let a=null;for(const r in c)/^on/i.test(r)||(a||(a={}),a[r]=c[r]);return a}function hs(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(g){$(t.__ref,"conditional("+s+")."+f,g),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&&ys(a,o,f);continue}const _=l===!1&&!(0,j.isEnumeratedTrueFalseAttr)(f)?null:String((0,j.serializeAttrValue)(f,l));i(f),!(u&&_===o.written.get(f))&&(d===void 0&&o.base.set(f,a.getAttribute(f)),Wt(a,f,_),o.owners.set(f,s),o.written.set(f,_))}e.appliedAttrs=r}function ys(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 Wn(t,o,s,n){const e=n.appliedAttrs;if(n.appliedAttrs=null,!!e)for(const c of e)o.owners.get(c)===s&&ys(t.node,o,c)}function _s(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 zn(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 p=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}${p}: { '${a.slice(p.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=Kn(t,e,r);d&&!s&&(s=o.__conditionalAttrs={owners:new Map,base:new Map,written:new Map});const u=new Set;for(const p in r){if(!Object.prototype.hasOwnProperty.call(r,p))continue;const A=p.charAt(0),w=r[p];if(!((A===":"||A==="@"||A==="&"||A==="[")&&w&&typeof w=="object"&&!Array.isArray(w))){if(p==="vars"&&nt(w)){for(const h of Object.keys(w))h&&u.add(zt(h));continue}u.add(p)}}const l=()=>{let p;const A=t[a];if(A===void 0){const b=!!t.state&&a in t.state,x=t.state?t.state[a]:void 0;if(b||x!==void 0)p=x;else{const S=t.context?.cases?.[a];if(S===void 0)return;try{p=typeof S=="function"?S.call(t,t):S}catch(k){p=!1,o.__conditionalError=k,typeof console<"u"&&console.warn&&console.warn(`[smbls] conditional \`${e}\` case fn threw on ${t.key||"?"} \u2014 treating as false:`,k?.message||k)}}}else if(typeof A=="function")try{p=A(t,t.state,t.context)}catch(b){p=!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 p=A;const w=i?!p:!!p;if(!t.node)return;const h=t.context?.designSystem;if(w===f.lastMatch){if(w&&d&&t.node.setAttribute){h&&(0,M.pushConfig)(h);try{hs(t,s,e,d,f,!1)}finally{h&&(0,M.popConfig)()}}return}f.lastMatch=w,h&&(0,M.pushConfig)(h);try{if(w){const b={},x={};let S=!1;for(const C in r){if(!Object.prototype.hasOwnProperty.call(r,C))continue;const F=r[C],rt=C.charAt(0);if((rt===":"||rt==="@"||rt==="&"||rt==="[")&&F&&typeof F=="object"&&!Array.isArray(F)){if(ho(C,t)){const T=gt(F,t,!1,u);Object.keys(T).length&&(x[`[data-theme="${C.slice(1)}"] &`]=T,S=!0)}else{const T=yo(C,t),B=gt(F,t,!1,u);Object.keys(B).length&&(x[T]=B,S=!0)}continue}const it=typeof F=="function"?F(t,t.state,t.context):F;if(it!=null){if(v.CSS_PROPS_REGISTRY[C]){const T=v.CSS_PROPS_REGISTRY[C](it,t,t.state,t.context);if(T){const B=Array.isArray(T)?T:[T];for(const xt of B)xt&&Object.assign(b,xt)}}else if(v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(C))b[C]=it;else if(Lt(C))b[C]=it;else if(C==="vars"){const T=Yt(it,t);T&&Object.assign(b,T)}}}const k=Object.keys(b);if(k.length){st(t.node,b);for(const C of k)n.set(C,e);f.appliedKeys=k}else f.appliedKeys=null;if(S){const C=(0,tt.css)(x,null,t.context?.cssPrefix,{state:!0}),F=C?C.split(" ").filter(Boolean):[];if(F.length&&t.node.classList){for(const rt of F)t.node.classList.add(rt);f.appliedClasses=F}else f.appliedClasses=null}else if(f.appliedClasses){for(const C of f.appliedClasses)t.node.classList.remove(C);f.appliedClasses=null}d&&t.node.setAttribute&&hs(t,s,e,d,f,!0)}else{if(f.appliedAttrs&&Wn(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{h&&(0,M.popConfig)()}};o.__conditionalRunners.push(l);const _=R(t,t[a+"Deps"],l),g=(0,E.createEffect)(_,{depth:o.path.length,label:P(o,"conditional("+e+")")}),y=o.__exec&&o.__exec[a]||t[a];g._sources.size===0&&typeof y=="function"&&(0,et.isLoudDevRuntime)()&&pn(y)&&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(g)}}const go=new WeakSet,bo=new WeakMap;function Yn(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 qn(t){const o=t.ownerDocument;!o||go.has(o)||Yn(o)||(go.add(o),queueMicrotask(()=>{go.delete(o);const s=o.body||o.documentElement;s&&s.offsetWidth}))}const Ao=new WeakSet;let gs=!1;function bs(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 As(t,o){const s={};for(const n in t){const e=t[n];if(e&&typeof e=="object"){const c=As(e,o);Object.keys(c).length&&(s[n]=c)}else o.has(n)||(s[n]=e)}return s}function Zn(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=Qn(a);if(i)for(let f=0;f<i.length;f+=3){const d=i[f],u=i[f+1],l=i[f+2],_=t[u]!=null?o.get(u):void 0,g=s&&s.get(d),y=_!==void 0&&_>r&&(0,H.cssShorthandStatesLonghand)(d,t[u],l),p=!y&&g!==void 0&&g>r&&(0,H.cssShorthandStatesLonghand)(d,void 0,l);if(y||p){y&&delete t[a],c||(c=new Set),c.add(a);break}}}return c}const xs=new Map;function Qn(t){let o=xs.get(t);if(o!==void 0)return o;const s=J(t),n=H.CSS_LONGHAND_SHORTHANDS[s];if(o=null,Array.isArray(n)){o=[];for(const e of n)o.push(e,(0,H.cssCamelName)(e),s)}return xs.set(t,o),o}function ws(t){const{node:o}=t;if(!o)return;if(gs||(gs=!0,(0,tt.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,v.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 _=(h,b)=>{if(b&&typeof b=="object"&&bs(h)){r||(r={});const x=r[h];x&&(b=xo(x,b)),r[h]=b}else(b===null||typeof b!="object")&&(i||(i=new Set),i.add(h),d!==void 0&&(u||(u=new Map),u.set(h,d)));n[h]=b};if(Object.prototype.hasOwnProperty.call(t,"theme")&&typeof t.theme!="function"&&v.CSS_PROPS_REGISTRY.theme){const h=v.CSS_PROPS_REGISTRY.theme(t.theme,t,t.state,t.context);if(h){const b=x=>{for(const S in x){const k=x[S];k&&typeof k=="object"&&bs(S)&&(a||(a={}),a[S]=k),n[S]=k}};if(Array.isArray(h))for(const x of h)x&&b(x);else b(h);e=!0}}const g=(h,b)=>{if(h==="vars"){const x=Yt(b);if(x){for(const S in x)_(S,x[S]);e=!0}return}if(v.CSS_PROPS_REGISTRY[h]){const x=v.CSS_PROPS_REGISTRY[h](b,t,t.state,t.context);if(x){if(Array.isArray(x)){for(const S of x)if(S)for(const k in S)_(k,S[k])}else for(const S in x)_(S,x[S]);e=!0}}else if(v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(h))b!=null&&typeof b!="object"&&(_(h,b),e=!0);else if(h.charCodeAt(0)===45)b!=null&&typeof b!="object"&&(_(h,b),e=!0);else if((h.charAt(0)==="&"||h.charAt(0)==="@"||h.charAt(0)===":"||h.charAt(0)==="[")&&b&&typeof b=="object"&&!Array.isArray(b)){if(_o(b))return;const x=ps(h,b,t);x&&(_(x.cssProp,x.block),e=!0)}};if(typeof t.class=="string"){const h=Hn(t.class,t.context?.designSystem?.class);if(h)for(const b in h)g(b,h[b])}const y=i?new Set(i):null,p=t.tag||"div";for(const h of Object.keys(t)){if(typeof t[h]=="function"){const x=f&&f.get(h);x!==void 0&&(0,q.isCssProp)(p,h)&&(l||(l=new Map),l.set(J(h),x));continue}if(d=f?f.get(h):void 0,h==="vars"){g(h,t[h]);continue}if(U.REGISTRY.has(h)||h==="theme")continue;const b=h.charCodeAt(0);b>=65&&b<=90||X(h)||(0,q.isAttributeFirst)(p,h)||g(h,t[h])}d=void 0;const A=u?Zn(n,u,l):null;if(a)for(const h in a){let b=i?As(a[h],i):a[h];r&&r[h]&&(b=xo(b,r[h])),Object.keys(b).length?n[h]=b:delete n[h]}if(Rn(t,n,i,A?new Set([...y||[],...A]):y),e){n.display&&String(n.display).includes("!important")&&(o.style.setProperty("display",String(n.display).replace(/\s*!important\s*$/,""),"important"),delete n.display);const h=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;typeof h=="string"&&h!==""&&n.display&&n.display!==h&&(n.display=h);const b=(0,tt.css)(n,null,t.context?.cssPrefix);if(c=b?b.split(" ").filter(Boolean):[],b&&o.classList){const x=c;let S=!1;for(const k of x)o.classList.add(k),S||(k.charCodeAt(0)===95&&k.charCodeAt(1)===99||k.charCodeAt(0)===95&&k.indexOf("_c",1)!==-1)&&(S=!0);S&&qn(o)}}const w=t.__ref;if(w){const h=w.__staticCssClasses;if(h&&o.classList){const b=new Set(c);for(const x of h)b.has(x)||o.classList.remove(x)}w.__staticCssClasses=c}Mn(t)}finally{(0,v.popStaticCssPass)(),s&&(0,M.popConfig)(),Ao.delete(t)}}const Xn=t=>!!v.CSS_PROPS_REGISTRY[t]||!!(v.DEFAULT_CSS_PROPERTIES_LIST&&v.DEFAULT_CSS_PROPERTIES_LIST.has(t))||typeof t=="string"&&t.charCodeAt(0)===45;function Jn(t){t&&t.node&&ws(t)}function mn(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,j.serializeAttrValue)(a,c))}const s=(0,j.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"||U.REGISTRY.has(e)||e==="on"||s[e]!==void 0)continue;const c=e.charCodeAt(0);if(!(c>=65&&c<=90)&&!X(e)&&!(0,q.isCssProp)(n,e)&&(0,j.checkAttributeByTagName)(n,e)){let a=t[e];if(a==null)continue;if(typeof a=="string"&&a.includes("{{")){if(!j.ATTR_TRANSFORMS[e])continue;a=L.replaceLiteralsWithObjectFields.call(t,a,t.state)}if(a==null||typeof a=="function"||typeof a=="object"||a===!1&&!(0,j.isEnumeratedTrueFalseAttr)((0,j.camelToAttr)(e)||e))continue;const r=(0,j.camelToAttr)(e)||e;o.setAttribute(r,(0,j.serializeAttrValue)(r,a))}}}function te(t,o){const{node:s}=t;if(!s||!s.setAttribute)return;const n=o.charCodeAt(0);if(n>=65&&n<=90||X(o))return;const e=t.tag||"div";if((0,q.isCssProp)(e,o)||!(0,j.checkAttributeByTagName)(e,o))return;const c=(0,j.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=j.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 oe(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{}Cs(e),ct.delete(t),s.style.height="",e.appliedMax!=null&&s.style.maxHeight===e.appliedMax&&(s.style.maxHeight=""),js(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,Ss(t,e);return}e.awaitingLayout=!1;const a=ee(s),r=re(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=ie(s,a),u=d!=null&&f<d?d:f,l=ae(a),_=l!=null&&u>l;s.style.height=fe(_?l:u,a)+"px",r&&So(s),js(s,e,_),e.lastMeasure=f,e.lastWidth=s.clientWidth,Ss(t,e)}},n.__eventCleanup||(n.__eventCleanup=[]),n.__eventCleanup.push(()=>{try{s.removeEventListener("input",e.resize)}catch{}Cs(e),ct.delete(t)})),e.active||(s.addEventListener("input",e.resize),e.active=!0,ne(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 se(){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=pt()),e.attachAttempts+=1,e.attachAttempts<=Oo&&pt()-e.firstAttemptAt<To&&(ct.add(s),Vt());continue}e.attachAttempts=0,e.firstAttemptAt=null,e.resize()}}}function Ss(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 Cs(t){const o=t.watch;if(o){t.watch=null;try{o.disconnect()}catch{}}}function ne(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 ee(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),ks=t=>(ft(t.borderTopWidth)||0)+(ft(t.borderBottomWidth)||0);function re(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 ie(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)||ce(t,o);return n>0?s*n+wo(o):null}const Mt=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontFamily","lineHeight","letterSpacing"],vs=new WeakMap;function ce(t,o){const s=t.ownerDocument,n=s&&(s.body||s.documentElement);if(!n||!s.createElement)return null;let e=vs.get(s);e||(e=new Map,vs.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 fe(t,o){return o?o.boxSizing==="border-box"?t+ks(o):o.boxSizing==="content-box"?Math.max(0,t-wo(o)):t:t}function ae(t){if(!t)return null;const o=ft(t.maxHeight);if(o==null||!(o>0))return null;const s=wo(t),n=ks(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 js(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 Es=["srcObject","muted"],ue=(t,o)=>t==="muted"?o===!0||o===""||o==="true"||o==="muted":o??null;function de(t){const o=t.node,s=t.__ref;if(!(!o||!s))for(let n=0;n<Es.length;n++){const e=Es[n],c=t[e];if(c===void 0||!(e in o))continue;const a=r=>{const i=ue(e,r);if(o[e]!==i)try{o[e]=i}catch(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){$(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 le(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}oe(t,r)},{depth:s.path.length,label:P(s,"autoGrow")});s.__effects||(s.__effects=[]),s.__effects.push(c),e&&(s.__exec.autoGrow=n)}const Ps=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function Os(t,o){for(const s of Object.keys(t)){if(!X(s)||Ps.has(s))continue;const n=(0,bt.globalEventKeyInfo)(s);if(n){(0,bt.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=tn(s);U.LIFECYCLE_EVENTS.has(a)||(0,bt.registerEvent)(on(a),t,e,c)}pe(t)}function pe(t){const o=t.node;if(!o||!o.addEventListener)return;const s={};let n=!1;for(const l of Ps){const _=t[l];typeof _=="function"&&(s[l]=_,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 _=l.touches&&l.touches[0]||l.changedTouches&&l.changedTouches[0];_&&(a=_.clientX,r=_.clientY,i=Date.now(),f=!0)},u=l=>{if(!f)return;f=!1;const _=l.changedTouches&&l.changedTouches[0]||l.touches&&l.touches[0];if(!_)return;const g=_.clientX-a,y=_.clientY-r,p=Date.now()-i;if(p>c)return;const A=Math.abs(g),w=Math.abs(y);if(Math.max(A,w)<e)return;let h;if(A>w*1.2)h=g<0?"left":"right";else if(w>A*1.2)h=y<0?"up":"down";else return;const b="onSwipe"+h.charAt(0).toUpperCase()+h.slice(1),x=s[b],S=s.onSwipe;x&&x.call(t,l,t,t.state,t.context),S&&S.call(t,{direction:h,dx:g,dy:y,dt:p,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=yt(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=w=>{let h=o[w];const b=h;(typeof h=="string"||typeof h=="number")&&(h={text:h});let x=d;if(typeof d=="function")try{x=d(t,h)}catch{x=null}let S=typeof d=="function"?Et(x):a;if(e&&u!=="state"&&(S=Pt(S,Et(b))),u==="state"){let C=b;(typeof b=="string"||typeof b=="number")&&(C={value:b,text:b}),h=x?{...x,state:C}:{state:C}}else x&&(h=at(x,h));if(c&&!h.ignoreChildExtends)if(h.extends){const C=Array.isArray(h.extends)?h.extends:[h.extends],F=Array.isArray(c)?c:[c];h={...h,extends:[...F,...C]}}else h={...h,extends:c};const k=Lo(h?.key,b,w,t);try{return m(Ot(h,S),t,k,s)}catch(C){if(typeof console<"u"&&console.error){const F=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${k}" failed to construct at ${F} (initial render, skipping this row):`,C?.message||C)}return null}},_=t.__ref;if(!(n===!0&&!r&&!!_&&(s?.mountYield===!0||t.yieldChildren===!0))){for(let w=0;w<o.length;w++){const h=l(w);!r&&h?.node&&f.appendChild(h.node)}return r||t.node.appendChild(f),!0}const y=_.__childrenChunkGen=(_.__childrenChunkGen||0)+1;(0,z.openMountBudget)();let p=null;const A=w=>{if(_.__disposed||_.__childrenChunkGen!==y){p&&p.parentNode&&p.remove();return}for(let h=w;h<o.length;h++){const b=l(h);if(b?.node&&(p?t.node.insertBefore(b.node,p):f.appendChild(b.node)),h+1<o.length&&(0,z.mountBudgetExhausted)()){p||(p=i.createComment("smbls-mount"),f.appendChild(p),t.node.appendChild(f));const x=h+1;(0,z.enqueueMountWork)(()=>A(x));return}}p?(p.remove(),t.node.tagName==="SELECT"&&qt(t,!0)):t.node.appendChild(f)};return A(0),(0,z.closeMountBudget)(),!0}if(typeof o=="string"){const r=Io(o,t);if(Array.isArray(r))return Co(t,r,s,n,!0)}if(typeof o=="object")for(const r in o){if(U.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};m(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 Ts(t,o){let{children:s,content:n}=t;const e=t.childExtends,c=typeof s=="function"||zo(t,"children");if(typeof s=="function"){const g=s;try{s=g(t,t.state,t.context)}catch(h){if(s=void 0,typeof console<"u"&&console.error){const b=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${b} (initial run, treating as empty):`,h?.message||h)}}Yo(t,s),t.children=s;const y=t.__ref;let p=!1;const A=R(t,t.childrenDeps,g),w=(0,E.createEffect)(()=>{const h=p;p=!0;let b;try{b=A(t,t.state,t.context)}catch(T){if(typeof console<"u"&&console.error){const B=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] \`children:\` factory threw at ${B}${h?"":" (initial tracking run)"}:`,T?.message||T)}return}if(!h||b===t.children)return;Yo(t,b),t.children=b,y.__childrenChunkGen!=null&&y.__childrenChunkGen++;const x=typeof t.onContentUpdate=="function",S=x?[]:null,k=x?[]:null,C=x?[]:null;if(Array.isArray(b)&&t.childrenAs==="state"){const T=t.childProps,B=[],xt=new Map;for(let O=0;O<b.length;O++){const Y=b[O];let D=T;if(typeof T=="function")try{D=T(t,Y)}catch{D=null}const Q=Lo(D&&D.key,Y,O,t);B.push(Q),xt.set(Q,{rawChild:Y,childProps:D})}const $s=new Set(B),Is=y.__children.slice();for(const O of Is)if(!$s.has(O)){const Y=t[O];Y?.remove&&Y.remove(),delete t[O],k&&k.push(O)}const wt=t.childExtends,Bt=t.tag==="fragment",Bs=t.context?.document||globalThis.document,St=Bt?null:Bs?.createDocumentFragment(),Xt=new Set;for(const O of B){const Y=xt.get(O),D=Y.rawChild,Q=t[O];if(Q&&Q.state){if(D&&typeof D=="object"){const V=Q.state,dt=V.$replace||V.replace,ko=V.$update||V.update;try{if(typeof dt=="function")dt.call(V,D);else if(typeof ko=="function"){for(const W in V)if(!(W==="__element"||W==="root"||W==="parent"||W==="update")&&!Object.prototype.hasOwnProperty.call(D,W))try{V[W]=void 0}catch{}ko.call(V,D)}else for(const W in D)V[W]=D[W]}catch(W){if(typeof console<"u"&&console.error){const Us=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${O}" failed to patch at ${Us} (reconcile, keeping its previous data for this pass):`,W?.message||W)}}}C&&C.push(O);continue}let Jt=D;(typeof D=="string"||typeof D=="number")&&(Jt={value:D,text:D});const mt=Y.childProps;let Z=mt?{...mt,state:Jt}:{state:Jt};const Hs=typeof T=="function"?Et(mt):yt(t,"childProps");if(wt&&!Z.ignoreChildExtends)if(Z.extends){const V=Array.isArray(Z.extends)?Z.extends:[Z.extends],dt=Array.isArray(wt)?wt:[wt];Z={...Z,extends:[...dt,...V]}}else Z={...Z,extends:wt};let to;try{to=m(Ot(Z,Hs),t,O,o)}catch(V){if(typeof console<"u"&&console.error){const dt=t.__ref?.path?.join(".")||t.key||"<root>";console.error(`[smbls] child "${O}" failed to construct at ${dt} (reconcile, skipping this row):`,V?.message||V)}Xt.add(O);continue}!Bt&&to?.node&&St&&St.appendChild(to.node),S&&S.push(O)}if(!Bt&&St&&St.childNodes.length&&t.node&&t.node.appendChild(St),!Bt&&t.node){let O=null;for(const Y of B){const D=t[Y]?.node;if(!D)continue;const Q=O?O.nextSibling:t.node.firstChild;D!==Q&&t.node.insertBefore(D,Q),O=D}}y.__children=Xt.size?B.filter(O=>!Xt.has(O)):B,x&&(S.length||k.length)&&Do(t,{added:S,removed:k,kept:C}),qt(t,!1);return}const it=x?[...y.__children]:null;for(const T of[...y.__children]){const B=t[T];B?.remove&&B.remove(),delete t[T]}y.__children=[],Co(t,b,o,!1,!0),qt(t,!1),x&&Do(t,{added:[...y.__children],removed:it,kept:[]})},{depth:y.path.length,label:P(y,"children")});y.__effects.push(w)}const a=Co(t,s,o,!0,c);if(n!=null&&!(n&&n.__ref)){let g=n;if(typeof g=="string"||typeof g=="number"?g={text:g}:typeof g!="object"&&(g={}),t.childProps&&(g=at(t.childProps,g)),e&&!g.ignoreChildExtends)if(g.extends){const p=Array.isArray(g.extends)?g.extends:[g.extends],A=Array.isArray(e)?e:[e];g={...g,extends:[...A,...p]}}else g={...g,extends:e};const y=Pt(yt(t,"childProps"),yt(t,"content"));m(Ot(g,y),t,"content",o)}if(s&&!a)return;const r=t.context?.components||{},i=t.__ref&&t.__ref.__runtimeSource,f=i?{}:null;{const g=Object.keys(t);for(let y=0;y<g.length;y++){const p=g[y];if(!p.endsWith("Extends")||typeof t[p]!="string")continue;const A=p.slice(0,-7);if(!A||A.charCodeAt(0)<65||A.charCodeAt(0)>90)continue;const w={extends:t[p]};delete t[p];for(let h=y+1;h<g.length;h++){const b=g[h],x=b.charCodeAt(0);if(x>=65&&x<=90||U.REGISTRY.has(b)||typeof t[b]=="function"&&(b.startsWith("on")||b.startsWith(".")))break;const S=t[b];S!==void 0&&(w[b]=S,delete t[b],f&&jt(i,b)&&(f[A]||(f[A]={}),f[A][b]=i[b]))}t[A]&&typeof t[A]=="object"?t[A]={...w,...t[A]}:t[A]=w}}const d=o?.mountYield===!0||t.yieldChildren===!0,u=Object.keys(t),l=g=>{if(U.REGISTRY.has(g)||typeof t[g]!="object"||t[g]===null)return;const y=g.charCodeAt(0);if(y<65||y>90)return;let p=t[g];if(p.__ref)return;if(!p.extends&&!p.extend){const w=r[g]||r[`smbls.${g}`];w&&(p={...p,extends:w})}if(t.childProps&&(p=at(t.childProps,p)),e&&!p.ignoreChildExtends)if(p.extends){const w=Array.isArray(p.extends)?p.extends:[p.extends],h=Array.isArray(e)?e:[e];p={...p,extends:[...h,...w]}}else p={...p,extends:e};const A=i?Pt(yt(t,"childProps"),Pt(f[g]||null,yt(t,g))):null;m(Ot(p,A),t,g,o)};if(!d){for(const g of u)l(g);return}(0,z.openMountBudget)();const _=g=>{for(let y=g;y<u.length;y++)if(l(u[y]),y+1<u.length&&(0,z.mountBudgetExhausted)()){const p=y+1;(0,z.enqueueMountWork)(()=>_(p));return}};_(0),(0,z.closeMountBudget)()}function Ds(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 Fs(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,K.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(_=>{(0,K.reportLifecycleError)(o,e,_)}).finally(()=>{i&&l&&(l[i]=!1)}),d=!1,!0}if(u===!1)return!1}catch(u){if((0,K.reportLifecycleError)(o,e,u),o.context?.strictMode)throw u}finally{f&&(0,M.popConfig)(),d&&o.__ref&&(o.__ref[i]=!1)}}return!0}var he=m;
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 g=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var I=(t,e)=>{for(var r in e)g(t,r,{get:e[r],enumerable:!0})},b=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of v(e))!x.call(t,i)&&i!==r&&g(t,i,{get:()=>e[i],enumerable:!(s=y(e,i))||s.enumerable});return t};var E=t=>b(g({},"__esModule",{value:!0}),t);var T={};I(T,{adoptHydrationNode:()=>_,elementPath:()=>h,hydrationFeature:()=>A,placeDuringHydration:()=>m});module.exports=E(T);var a=require("./cache.js");const h=t=>{const e=t.__ref;if(e&&e.__hydrationPath!==void 0)return e.__hydrationPath;const r=t.parent,s=r&&r.__ref?h(r):null,i=s===null?"":s?s+"."+t.key:String(t.key);return e&&(e.__hydrationPath=i),i},N=new Set(["src","srcset"]);function _(t){const e=t?.context?.__hydration;if(!e)return null;const r=t.tag=(0,a.detectTag)(t);if(r==="string"||r==="fragment")return null;const s=h(t),i=e.registry[s===""?"__root":s],n=i!==void 0?e.nodes[i]:null;if(!n||n.nodeType!==1||e.claimed.has(n))return i!==void 0&&e.misses++,null;const d=(0,a.isSvgTag)(r)&&(r==="svg"||t.parent?.node?.namespaceURI===a.SVG_NS),f=(0,a.isSvgTag)(r)&&!d&&r!=="svg"?"div":r,u=d?n.namespaceURI===a.SVG_NS:n.namespaceURI!==a.SVG_NS;if(n.localName!==f||!u)return e.misses++,null;e.claimed.add(n),e.adopted++;const c=e.pending;if(c&&c.delete(n)){const o=n.parentNode,l=o?(e.pendingIn.get(o)||1)-1:0;l>0?e.pendingIn.set(o,l):o&&e.pendingIn.delete(o)}for(const o of Array.from(n.getAttributeNames?n.getAttributeNames():[]))N.has(o)||n.removeAttribute(o);if(c)for(let o=n.firstChild;o;){const l=o.nextSibling;c.has(o)||n.removeChild(o),o=l}else for(;n.firstChild;)n.removeChild(n.firstChild);return n.localName==="img"&&n.complete&&n.naturalWidth>0&&S(n),n}const P=500;function S(t){let e=!1,r=!1;const s=i=>{i.isTrusted&&(r?i.stopImmediatePropagation():e=!0,t.removeEventListener("load",s,!0))};t.addEventListener("load",s,!0),setTimeout(()=>{if(!e){if(!(t.complete&&t.naturalWidth>0)){t.removeEventListener("load",s,!0);return}r=!0,t.dispatchEvent(new Event("load")),setTimeout(()=>t.removeEventListener("load",s,!0),P)}},0)}function m(t,e,r,s,i){const n=t.pendingIn;if(!n||!n.has(s))return!1;if(i.parentNode===s&&t.claimed.has(i))return!0;let d;const f=r&&r.__ref,u=f&&f.__children,c=u?u.lastIndexOf(e.key):-1;for(let o=c-1;o>=0;o--){const l=r[u[o]],p=l&&l.node;if(p&&p!==i&&p.parentNode===s){d=p.nextSibling;break}}return d===void 0&&(d=(0,a.firstSlotAfterText)(s,f&&f.__textNode)),d===i||s.insertBefore(i,d),!0}const A={adopt:_,place:m};
@@ -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 S=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var _=(e,r)=>{for(var E in r)m(e,E,{get:r[E],enumerable:!0})},u=(e,r,E,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of S(r))!I.call(e,l)&&l!==E&&m(e,l,{get:()=>r[l],enumerable:!(s=N(r,l))||s.enumerable});return e};var c=(e,r,E)=>(E=e!=null?M(v(e)):{},u(r||!e||!e.__esModule?m(E,"default",{value:e,enumerable:!0}):E,e)),G=e=>u(m({},"__esModule",{value:!0}),e);var D={};_(D,{DELEGATED_EVENTS:()=>d.DELEGATED_EVENTS,LIFECYCLE_EVENTS:()=>d.LIFECYCLE_EVENTS,MIXINS:()=>d.MIXINS,MOUNT_YIELD_BUDGET_MS:()=>t.MOUNT_YIELD_BUDGET_MS,NON_BUBBLING_EVENTS:()=>d.NON_BUBBLING_EVENTS,REGISTRY:()=>d.REGISTRY,SVG_TAGS:()=>o.SVG_TAGS,addDelegatedEvent:()=>a.addDelegatedEvent,addMethods:()=>i.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,mountPending:()=>t.mountPending,mountYieldBudget:()=>t.mountYieldBudget,refreshContextProto:()=>i.refreshContextProto,registerEvent:()=>a.registerEvent,registerGlobalEvent:()=>a.registerGlobalEvent,releaseMount:()=>t.releaseMount,remove:()=>p.remove,removeDelegatedEvent:()=>a.removeDelegatedEvent,update:()=>x.update,whenConnected:()=>T.whenConnected,whenMountIdle:()=>t.whenMountIdle,whenMounted:()=>t.whenMounted,yieldToMain:()=>t.yieldToMain});module.exports=G(D);var n=c(require("./create.js"),1),t=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"),i=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 l=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var a=(n,t)=>{for(var e in t)o(n,e,{get:t[e],enumerable:!0})},m=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of i(t))!c.call(n,u)&&u!==e&&o(n,u,{get:()=>t[u],enumerable:!(r=l(t,u))||r.enumerable});return n};var _=n=>m(o({},"__esModule",{value:!0}),n);var p={};a(p,{mountPendingOf:()=>s,mountRecord:()=>d});module.exports=_(p);function d(n){return n.__mount||(n.__mount={pending:0,tail:null,holder:null,waiters:null,chunkGen:0,attachLater:!1})}function s(n){const t=n.__mount;return t?t.pending:0}
@@ -1 +1 @@
1
- "use strict";var l=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var g=(n,e)=>{for(var o in e)l(n,o,{get:e[o],enumerable:!0})},M=(n,e,o,f)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h(e))!_.call(n,i)&&i!==o&&l(n,i,{get:()=>e[i],enumerable:!(f=p(e,i))||f.enumerable});return n};var y=n=>M(l({},"__esModule",{value:!0}),n);var U={};g(U,{MOUNT_YIELD_BUDGET_MS:()=>m,__flushMountQueueSync:()=>E,__pendingMountChunks:()=>k,__resetMountQueue:()=>B,closeMountBudget:()=>w,enqueueMountWork:()=>D,mountBudgetExhausted:()=>x,openMountBudget:()=>T});module.exports=y(U);const m=50,r=[];let s=!1,t=0;function c(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function a(n){const e=typeof globalThis<"u"?globalThis.scheduler:null;if(e&&typeof e.yield=="function"){e.yield().then(n,n);return}if(typeof MessageChannel=="function"){const o=new MessageChannel;o.port1.onmessage=()=>{o.port1.close(),n()},o.port2.postMessage(0);return}setTimeout(n,0)}function x(){return t?c()-t>=50:!1}let u=0;function T(){u===0&&!t&&(t=c()),u++}function w(){u>0&&u--,u===0&&!s&&(t=0)}function D(n){r.push(n),s||(s=!0,a(d))}function d(){for(t=c();r.length;){const n=r.shift();try{n()}catch(e){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",e?.message||e)}if(c()-t>=50)break}if(r.length){a(d);return}s=!1,t=0,u=0}function E(){let e=0;for(t=0;r.length&&e++<1e5;){const o=r.shift();try{o()}catch(f){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",f?.message||f)}}s=!1,t=0,u=0}function k(){return r.length}function B(){r.length=0,s=!1,t=0,u=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 oe={};U(oe,{MOUNT_YIELD_BUDGET_MS:()=>_,__flushMountQueueSync:()=>V,__pendingMountChunks:()=>X,__resetMountQueue:()=>Z,abandonMount:()=>ne,closeMountBudget:()=>H,enqueueMountWork:()=>J,holdMount:()=>$,mountBudgetExhausted:()=>O,mountPending:()=>ee,mountTick:()=>j,mountYieldBudget:()=>G,openMountBudget:()=>v,releaseMount:()=>q,settleMount:()=>q,settleMountWaiters:()=>Q,whenMountIdle:()=>K,whenMounted:()=>te,yieldToMain:()=>N});module.exports=A(oe);var E=require("./mountRecord.js");const _=50;function G(e){return e===!0?_:typeof e=="number"&&e>0?e:0}const i=[];let c=!1,u=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!u||(t||d())-u+e<s?!1:(a=!0,!0)}let g=0,k=0,T=0,p=0;function b(){g=0,k=u,T=0,p=0}function j(){if(!u)return!1;if(g++,p>0)return p--,!1;const e=d(),t=e-u,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&&!u?(u=d(),a=!1,s=e,b()):e<s&&(s=e,p=0),f++}let l=null,I=!1;const z=typeof queueMicrotask=="function"?queueMicrotask:e=>Promise.resolve().then(e);function m(){u=0,a=!1,s=_,b()}function F(){I||(I=!0,z(()=>{I=!1,f===0&&m()}))}function H(){f>0&&f--,!(f!==0||l!==null)&&(c?F():m())}function J(e,t=_){const n={fn:e,budget:t};l?l.push(n):i.push(n),c||(c=!0,y(D))}function C(e){const t=l;l=[];try{e.fn()}catch(n){typeof console<"u"&&console.error&&console.error("[smbls] deferred mount chunk failed:",n?.message||n)}finally{const n=l;l=t,n.length&&i.unshift(...n)}}function K(){return!c&&!i.length?Promise.resolve():new Promise(e=>M.push(e))}function P(){if(!M.length)return;const e=M;M=[];for(let t=0;t<e.length;t++)e[t]()}function D(){for(u=d(),a=!1,s=1/0,b();i.length;){const e=i.shift();if(e.budget<s&&(s=e.budget,p=0),C(e),a||d()-u>=s)break}if(f=0,m(),i.length){y(D);return}c=!1,P()}function V(){let t=0;for(u=0;i.length&&t++<1e5;)C(i.shift());c=!1,f=0,m(),P()}function X(){return i.length}function Z(){i.length=0,l=null,c=!1,f=0,m(),P()}function $(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 ee(e){const t=e&&e.__ref&&e.__ref.__mount;return!!(t&&t.tail)}function te(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 ne(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 h=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var R=(n,r)=>{for(var t in r)h(n,t,{get:r[t],enumerable:!0})},k=(n,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of S(r))!m.call(n,u)&&u!==t&&h(n,u,{get:()=>r[u],enumerable:!(o=M(r,u))||o.enumerable});return n};var B=n=>k(h({},"__esModule",{value:!0}),n);var W={};R(W,{mountYieldFeature:()=>G});module.exports=B(W);var e=require("./mountScheduler.js"),s=require("./core.js"),C=require("./mountRecord.js");function b(n,r){const t=r&&r.mountYield;if(!t&&!n.yieldChildren)return 0;const o=t?(0,e.mountYieldBudget)(t):0,u=(0,e.mountYieldBudget)(n.yieldChildren);return o&&u?o<u?o:u:o||u}function g(n,r,t,o,u){(0,e.openMountBudget)(o);try{y(n,n.__ref,0,r,t,o,u,!1)}finally{(0,e.closeMountBudget)()}}function y(n,r,t,o,u,d,i,c){try{for(let f=t;f<o;f++){const a=r.__mount,p=a?a.pending:0;if(u(f)===!1)continue;if(r.__disposed)break;const _=(0,e.mountTick)(),l=r.__mount;if(f+1<o&&(_||(l?l.pending:0)>p)){i&&i.onSuspend&&i.onSuspend(),c||(0,e.holdMount)(n);const w=f+1;(0,e.enqueueMountWork)(()=>N(n,r,w,o,u,d,i),d);return}}}catch(f){if(!c)throw f;(0,s.reportCreateChildrenError)(n,f)}c&&(0,e.settleMount)(n)}function N(n,r,t,o,u,d,i){if(r.__disposed||i&&i.isStale&&i.isStale()){(0,e.settleMount)(n);return}y(n,r,t,o,u,d,i,!0)}function O(n,r,t){(0,e.holdMount)(n),(0,e.enqueueMountWork)(()=>{try{const o=n.__ref;o&&!o.__disposed&&t()}catch(o){(0,s.reportCreateChildrenError)(n,o)}finally{(0,e.settleMount)(n)}},r)}function Y(n,r,t,o){const u=n.__ref,d=(0,C.mountRecord)(u),i=++d.chunkGen,c=n.node,f=[];let a=!1;g(n,r,p=>{const _=t(p,a?(0,s.rowAttach)(n,A(c,f)):void 0),l=x(_);return l&&f.push(l),_},o,{isStale:()=>d.chunkGen!==i,onSuspend:()=>{a=!0}})}function x(n){const r=(0,s.placedRowNode)(n);if(r)return r;const t=n&&n.__ref;return t&&t.__if!==!1&&n.tag==="fragment"&&t.__fragmentAnchor||null}function A(n,r){for(let t=r.length-1;t>=0;t--)if(r[t].parentNode===n)return r[t];return null}function E(n,r){const t=n.__ref;try{(0,s.syncSelectValue)(n,!0),(0,s.completeCreate)(n,r)}finally{(0,e.settleMountWaiters)(n,t);const o=t.__mount,u=o&&o.holder;u&&(o.holder=null,(0,e.settleMount)(u))}}const G={budgetOf:b,run:g,rows:Y,defer:O,hold:e.holdMount,finish:E,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 A=Object.prototype.hasOwnProperty;var P=(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))!A.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={};P(S,{default:()=>B,update:()=>v});module.exports=j(S);var u=require("@symbo.ls/signal"),_=require("./registry.js"),i=require("./create.js"),y=require("./pluginHooks.js");function v(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=n.replace(/[A-Z]/g,p=>"-"+p.toLowerCase()),x=String(c).replace(/\s*!important\s*$/,"");t.node.style.setProperty(d,x,"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=v;
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.803";
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.805";
@@ -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};