@symbo.ls/element 3.14.23 → 3.14.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @symbo.ls/element
2
2
 
3
+ ## 3.14.100
4
+
5
+ ### Patch Changes
6
+
7
+ - @symbo.ls/signal@3.14.100
8
+ - @symbo.ls/state@3.14.100
9
+ - @symbo.ls/utils@3.14.100
10
+ - attrs-in-props@3.14.100
11
+ - css-in-props@3.14.100
12
+
13
+ ## 3.14.24
14
+
15
+ ### Patch Changes
16
+
17
+ - Auto-generated cross-repo patch release.
18
+
3
19
  ## 3.14.23
4
20
 
5
21
  ### Patch Changes
@@ -1,6 +1,6 @@
1
- "use strict";var H=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var pt=(t,c)=>{for(var n in c)H(t,n,{get:c[n],enumerable:!0})},yt=(t,c,n,i)=>{if(c&&typeof c=="object"||typeof c=="function")for(let s of ut(c))!dt.call(t,s)&&s!==n&&H(t,s,{get:()=>c[s],enumerable:!(i=at(c,s))||i.enumerable});return t};var lt=t=>yt(H({},"__esModule",{value:!0}),t);var wt={};pt(wt,{create:()=>T,default:()=>kt});module.exports=lt(wt);var L=require("@symbo.ls/signal"),j=require("@symbo.ls/signal"),R=require("./cache.js"),E=require("./registry.js"),it=require("./delegate.js"),rt=require("./extends.js"),ft=require("./methods.js"),Ot=require("./dispose.js"),V=require("@symbo.ls/utils"),Q=require("@symbo.ls/utils/function.js"),F=require("@symbo.ls/state"),g=require("css-in-props"),et=require("@symbo.ls/css"),A=require("@symbo.ls/scratch"),I=require("attrs-in-props");let ht=1;function M(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function xt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function _t(t){return t.toLowerCase()}function Y(t,c){const n={...t};for(const i in c){const s=n[i],o=c[i];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[i]=Y(s,o):n[i]=o}return n}function T(t,c,n,i={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||i.context||{},o.context.__create||(o.context.__create=T);const r=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const p=n.substring(0,l),_=o.context?.components;_&&(_[p]||_["smbls."+p])&&(t={extends:p,...t})}}(0,rt.applyExtends)(o,t,i);const f=new Set(["childProps","attr","style","scope","data"]),e=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const p=t[l],_=o[l],b=_&&p&&typeof _=="object"&&typeof p=="object"&&!Array.isArray(_)&&!Array.isArray(p)&&typeof _!="function"&&typeof p!="function";b&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=Y(_,p):b&&f.has(l)?o[l]={..._,...p}:o[l]=p}function a(l){for(const p in l){const _=l[p],b=o[p],k=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";k&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?o[p]=Y(b,_):k&&f.has(p)?o[p]={...b,..._}:o[p]=_}}e&&a(e),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const u=o.scope&&typeof o.scope=="object"?o.scope:null,x=c?.scope,y=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,d=x||y||null;if(t.scope!==void 0||u){const l={};u&&Object.assign(l,u),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=(0,L.createScopeStore)(l,d)}else d&&(o.scope=d);if(t.if!==void 0&&(o.if=t.if),(0,ft.addMethods)(o),bt(o,c,t),o.if!=null){const l=typeof o.if=="function"?o.if(o,o.state,o.context):o.if;r.__if=!!l}if(r.__if)typeof t.if=="function"&&(r.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&B(o,{if:t.if}),o;o.tag||(o.tag=(0,R.detectTag)(o)),N("Init",o,i);const h=o.node=(0,R.cacheNode)(o);if(!h)return o;N("AttachNode",o,i),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),B(o,t),z(o),ot(o),ct(o,i);try{nt(o,i)}catch(l){if(typeof console<"u"&&console.error){const p=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,l?.message||l,l?.stack?`
1
+ "use strict";var H=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var ut=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var pt=(t,c)=>{for(var n in c)H(t,n,{get:c[n],enumerable:!0})},yt=(t,c,n,r)=>{if(c&&typeof c=="object"||typeof c=="function")for(let s of ut(c))!dt.call(t,s)&&s!==n&&H(t,s,{get:()=>c[s],enumerable:!(r=at(c,s))||r.enumerable});return t};var lt=t=>yt(H({},"__esModule",{value:!0}),t);var wt={};pt(wt,{create:()=>T,default:()=>kt});module.exports=lt(wt);var L=require("@symbo.ls/signal"),j=require("@symbo.ls/signal"),R=require("./cache.js"),E=require("./registry.js"),it=require("./delegate.js"),rt=require("./extends.js"),ft=require("./methods.js"),Ot=require("./dispose.js"),V=require("@symbo.ls/utils"),Q=require("@symbo.ls/utils/function.js"),F=require("@symbo.ls/state"),g=require("css-in-props"),et=require("@symbo.ls/css"),A=require("@symbo.ls/scratch"),I=require("attrs-in-props");let ht=1;function M(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function xt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function _t(t){return t.toLowerCase()}function Y(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=Y(s,o):n[r]=o}return n}function T(t,c,n,r={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||r.context||{},o.context.__create||(o.context.__create=T);const i=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const p=n.substring(0,l),_=o.context?.components;_&&(_[p]||_["smbls."+p])&&(t={extends:p,...t})}}(0,rt.applyExtends)(o,t,r);const f=new Set(["childProps","attr","style","scope","data"]),e=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const p=t[l],_=o[l],b=_&&p&&typeof _=="object"&&typeof p=="object"&&!Array.isArray(_)&&!Array.isArray(p)&&typeof _!="function"&&typeof p!="function";b&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=Y(_,p):b&&f.has(l)?o[l]={..._,...p}:o[l]=p}function a(l){for(const p in l){const _=l[p],b=o[p],k=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";k&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?o[p]=Y(b,_):k&&f.has(p)?o[p]={...b,..._}:o[p]=_}}e&&a(e),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const u=o.scope&&typeof o.scope=="object"?o.scope:null,x=c?.scope,y=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,d=x||y||null;if(t.scope!==void 0||u){const l={};u&&Object.assign(l,u),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=(0,L.createScopeStore)(l,d)}else d&&(o.scope=d);if(t.if!==void 0&&(o.if=t.if),(0,ft.addMethods)(o),bt(o,c,t),o.if!=null){let l;if(typeof o.if=="function")try{l=o.if(o,o.state,o.context)}catch(p){if(l=!1,i.__ifError=p,typeof console<"u"&&console.warn){const _=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,p?.message||p)}}else l=o.if;i.__if=!!l}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&B(o,{if:t.if}),o;o.tag||(o.tag=(0,R.detectTag)(o)),N("Init",o,r);const h=o.node=(0,R.cacheNode)(o);if(!h)return o;N("AttachNode",o,r),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),B(o,t),z(o),ot(o),ct(o,r);try{nt(o,r)}catch(l){if(typeof console<"u"&&console.error){const p=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,l?.message||l,l?.stack?`
2
2
  `+l.stack.split(`
3
3
  `).slice(0,6).join(`
4
- `):"")}}if(X(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&(0,A.pushConfig)(l);try{const p=o.html(o,o.state,o.context);p!=null&&typeof p!="function"&&(o.node.innerHTML=p)}catch{}finally{l&&(0,A.popConfig)()}}if(N("Create",o,i),N("Complete",o,i),N("Render",o,i),N("RenderRouter",o,i),typeof o.onFrame=="function"){const l=o.onFrame,p=o.context?.designSystem,_=()=>{if(o.node){if(o.node.isConnected){p&&(0,A.pushConfig)(p);try{l(o,o.state,o.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{p&&(0,A.popConfig)()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return o}function bt(t,c,n){const i=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=i&&s&&t.context?.state,r=n.state!==void 0&&!o?n.state:t.state&&!(0,L.isStore)(t.state)?t.state:void 0;if(r==null){if(c?.state)t.state=c.state,(0,F.applyStateMethods)(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const u=f.lang||a.defaultLang||"en",x=a.translations[u];if(x&&typeof x=="object")for(const d in x)e[d]===void 0&&(e[d]=x[d]);const y=new Set(a.languages||[]);for(const d in a.translations)!y.has(d)&&e[d]===void 0&&(e[d]=a.translations[d])}t.state=(0,L.isStore)(e)?e:(0,L.createStore)(e),t.state.__element=t,t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,F.applyStateMethods)(t,t.state);return}if(typeof r=="string"){if(t.state=tt(r,c),t.state&&typeof t.state=="object"&&!(0,L.isStore)(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}(0,F.applyStateMethods)(t,t.state);return}if(typeof r=="function"){const f=r(t,c?.state);t.state=(0,L.createStore)(f||{})}else t.state=(0,L.createStore)({...r});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}function Z(t,c){if(!c)return t;const n=c.split("/");let i=t;for(const s of n){if(i==null)return{};i=i[s]}return i??{}}function tt(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?Z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?Z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=Z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const i=c.context?.polyglot;if(i?.translations){const s=c.state?.root?.lang||i.defaultLang||"en",o=i.translations[s];if(o?.[t]!==void 0)return o[t];if(i.translations[t]!==void 0)return i.translations[t]}return{}}function gt(t){const c=t.__ref,n=t.tag||"div",i=t.context?.designSystem,s=[],o=Object.keys(t);for(let r=0;r<o.length;r++){const f=o[r];if(typeof t[f]!="function"||E.REGISTRY.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||M(f)||g.CSS_PROPS_REGISTRY[f]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(f)||(0,I.checkAttributeByTagName)(n,f)||s.push({prop:f,fn:t[f]})}for(let r=0;r<s.length;r++){const{prop:f,fn:e}=s[r];c.__exec[f]=e,Object.defineProperty(t,f,{get(){i&&(0,A.pushConfig)(i);try{return e(t,t.state,t.context)}catch{return}finally{i&&(0,A.popConfig)()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function B(t,c){const n=t.__ref;if(gt(t),typeof t.text=="function"){const s=t.text,o=(0,j.createEffect)(()=>{if(!n.contentManaged)try{let r=s(t,t.state,t.context);t.node&&r!=null&&typeof r!="function"&&typeof r!="object"&&(typeof r=="string"&&r.includes("{{")&&(r=V.replaceLiteralsWithObjectFields.call(t,r,t.state)),t.tag==="string"?t.node.nodeValue=r:t.node.textContent=r)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=(0,j.createEffect)(()=>{if(n.contentManaged)return;const r=V.replaceLiteralsWithObjectFields.call(t,s,t.state);r!=null&&(t.text=r),t.node&&(t.tag==="string"?t.node.nodeValue=r??"":t.node.textContent=r??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!E.REGISTRY.has(s)&&!M(s)&&!n.__exec[s]){if(g.CSS_PROPS_REGISTRY[s]){const o=t[s],r=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context),u=g.CSS_PROPS_REGISTRY[r](a,t,t.state,t.context);u&&t.node?K(t.node,u):t.node&&(r==="show"||r==="hide")&&(t.node.style.display="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s)){const o=t[s],r=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[r]:a}):t.node.style[r]="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=(0,j.createEffect)(()=>{const r=t.context?.designSystem;r&&(0,A.pushConfig)(r);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{r&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=(0,j.createEffect)(()=>{try{const r=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=r==null?"":String(r);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&u!=null)try{t.node.setSelectionRange(a,u)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=(0,j.createEffect)(()=>{const r=s(t,t.state,t.context);K(t.node,r)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const r=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(r)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],r=s,f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(r):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(r,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const r="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(r):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(r,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=(0,j.createEffect)(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const i=t.classlist&&typeof t.classlist=="object"&&!Array.isArray(t.classlist)?t.classlist:t.class&&typeof t.class=="object"&&!Array.isArray(t.class)?t.class:null;if(i)for(const s in i){const o=i[s];if(typeof o!="function")continue;const r=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(r)}if(typeof c.if=="function"){const s=c.if,o=(0,j.createEffect)(()=>{const r=s(t,t.state,t.context),f=n.__if;if(n.__if=!!r,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=(0,R.cacheNode)(t));const e=t.parent,a=e?.node;if(a&&t.node){let u=null;const x=Object.keys(e),y=x.indexOf(t.key);for(let d=y+1;d<x.length;d++){const h=e[x[d]];if(h?.node?.parentNode===a){u=h.node;break}}u?a.insertBefore(t.node,u):a.appendChild(t.node)}else X(t,t.parent);z(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=(0,R.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,R.cacheNode)(t)),!t.node)return;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);const e=c.if;delete c.if;try{B(t,c)}finally{c.if=e}z(t),ot(t),ct(t,{}),nt(t,{}),X(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||E.REGISTRY.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||M(s))continue;const r=t[s];n.__exec[s]=r;const f=t.tag||"div";if((0,I.checkAttributeByTagName)(f,s)&&!g.CSS_PROPS_REGISTRY[s]&&!(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))){const e=s,a=(0,j.createEffect)(()=>{try{const u=r(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&(e==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(e,u===!0?"":u)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t)}function z(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const i=t.attr[n];typeof i=="function"||typeof i=="object"||i==null||i===!1||c.setAttribute&&c.setAttribute(n,i===!0?"":i)}if(t.data&&typeof t.data=="object")for(const n in t.data){const i=t.data[n];typeof i=="function"||typeof i=="object"||i==null||i===!1||c.dataset&&(c.dataset[n]=i===!0?"":i)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(i=>i&&c.classList.add(i));else if(typeof n=="object")for(const i in n){const s=typeof n[i]=="function"?n[i](t,t.state,t.context):n[i];s&&c.classList.add(typeof s=="string"?s:i)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const i in c){const s=c[i];if(s!=null){if(i.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[i]=s;continue}try{const o=String(s),r=i.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(r,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const i=t.ownerDocument;let s=i.querySelector("style[data-smbls-scoped]");s||(s=i.createElement("style"),s.setAttribute("data-smbls-scoped",""),i.head.appendChild(s));let o="";for(const r in c){const f="."+n,e=r.replace(/&/g,f).split(",").map(u=>{const x=u.trim();return x.includes(f)?x:f+x}).join(", "),a=c[r];if(typeof a=="object"){let u="",x="";for(const y in a){const d=a[y];if(typeof d=="object"){const h=y.includes("&")?e.split(", ").map(p=>y.replace(/&/g,p)).join(", "):e.split(", ").map(p=>`${p} ${y}`).join(", ");let l="";for(const p in d)l+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${d[p]};`;x+=`${h} { ${l} }
4
+ `):"")}}if(X(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&(0,A.pushConfig)(l);try{const p=o.html(o,o.state,o.context);p!=null&&typeof p!="function"&&(o.node.innerHTML=p)}catch{}finally{l&&(0,A.popConfig)()}}if(N("Create",o,r),N("Complete",o,r),N("Render",o,r),N("RenderRouter",o,r),typeof o.onFrame=="function"){const l=o.onFrame,p=o.context?.designSystem,_=()=>{if(o.node){if(o.node.isConnected){p&&(0,A.pushConfig)(p);try{l(o,o.state,o.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{p&&(0,A.popConfig)()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return o}function bt(t,c,n){const r=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=r&&s&&t.context?.state,i=n.state!==void 0&&!o?n.state:t.state&&!(0,L.isStore)(t.state)?t.state:void 0;if(i==null){if(c?.state)t.state=c.state,(0,F.applyStateMethods)(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const u=f.lang||a.defaultLang||"en",x=a.translations[u];if(x&&typeof x=="object")for(const d in x)e[d]===void 0&&(e[d]=x[d]);const y=new Set(a.languages||[]);for(const d in a.translations)!y.has(d)&&e[d]===void 0&&(e[d]=a.translations[d])}t.state=(0,L.isStore)(e)?e:(0,L.createStore)(e),t.state.__element=t,t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),(0,F.applyStateMethods)(t,t.state);return}if(typeof i=="string"){if(t.state=tt(i,c),t.state&&typeof t.state=="object"&&!(0,L.isStore)(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}(0,F.applyStateMethods)(t,t.state);return}if(typeof i=="function"){const f=i(t,c?.state);t.state=(0,L.createStore)(f||{})}else t.state=(0,L.createStore)({...i});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,(0,F.applyStateMethods)(t,t.state)}function Z(t,c){if(!c)return t;const n=c.split("/");let r=t;for(const s of n){if(r==null)return{};r=r[s]}return r??{}}function tt(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?Z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?Z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=Z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const r=c.context?.polyglot;if(r?.translations){const s=c.state?.root?.lang||r.defaultLang||"en",o=r.translations[s];if(o?.[t]!==void 0)return o[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function gt(t){const c=t.__ref,n=t.tag||"div",r=t.context?.designSystem,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const f=o[i];if(typeof t[f]!="function"||E.REGISTRY.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||M(f)||g.CSS_PROPS_REGISTRY[f]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(f)||(0,I.checkAttributeByTagName)(n,f)||s.push({prop:f,fn:t[f]})}for(let i=0;i<s.length;i++){const{prop:f,fn:e}=s[i];c.__exec[f]=e,Object.defineProperty(t,f,{get(){r&&(0,A.pushConfig)(r);try{return e(t,t.state,t.context)}catch{return}finally{r&&(0,A.popConfig)()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function B(t,c){const n=t.__ref;if(gt(t),typeof t.text=="function"){const s=t.text,o=(0,j.createEffect)(()=>{if(!n.contentManaged)try{let i=s(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=V.replaceLiteralsWithObjectFields.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=(0,j.createEffect)(()=>{if(n.contentManaged)return;const i=V.replaceLiteralsWithObjectFields.call(t,s,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!E.REGISTRY.has(s)&&!M(s)&&!n.__exec[s]){if(g.CSS_PROPS_REGISTRY[s]){const o=t[s],i=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context),u=g.CSS_PROPS_REGISTRY[i](a,t,t.state,t.context);u&&t.node?K(t.node,u):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s)){const o=t[s],i=s,f=(0,j.createEffect)(()=>{const e=t.context?.designSystem;e&&(0,A.pushConfig)(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[i]:a}):t.node.style[i]="")}finally{e&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=(0,j.createEffect)(()=>{const i=t.context?.designSystem;i&&(0,A.pushConfig)(i);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{i&&(0,A.popConfig)()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=(0,j.createEffect)(()=>{try{const i=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=i==null?"":String(i);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&u!=null)try{t.node.setSelectionRange(a,u)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=(0,j.createEffect)(()=>{const i=s(t,t.state,t.context);K(t.node,i)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const i=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],i=s,f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const i="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=(0,j.createEffect)(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=(0,j.createEffect)(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const r=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(r)for(const s in r){const o=r[s];if(typeof o!="function")continue;const i=(0,j.createEffect)(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(typeof c.if=="function"){const s=c.if,o=(0,j.createEffect)(()=>{const i=s(t,t.state,t.context),f=n.__if;if(n.__if=!!i,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=(0,R.cacheNode)(t));const e=t.parent,a=e?.node;if(a&&t.node){let u=null;const x=Object.keys(e),y=x.indexOf(t.key);for(let d=y+1;d<x.length;d++){const h=e[x[d]];if(h?.node?.parentNode===a){u=h.node;break}}u?a.insertBefore(t.node,u):a.appendChild(t.node)}else X(t,t.parent);z(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=(0,R.detectTag)(t)),N("Init",t,{}),t.node||(t.node=(0,R.cacheNode)(t)),!t.node)return;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);const e=c.if;delete c.if;try{B(t,c)}finally{c.if=e}z(t),ot(t),ct(t,{}),nt(t,{}),X(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||E.REGISTRY.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||M(s))continue;const i=t[s];n.__exec[s]=i;const f=t.tag||"div";if((0,I.checkAttributeByTagName)(f,s)&&!g.CSS_PROPS_REGISTRY[s]&&!(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))){const e=s,a=(0,j.createEffect)(()=>{try{const u=i(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&(e==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(e,u===!0?"":u)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t)}function z(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const r=t.attr[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.setAttribute&&c.setAttribute(n,r===!0?"":r)}if(t.data&&typeof t.data=="object")for(const n in t.data){const r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.dataset&&(c.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&c.classList.add(r));else if(typeof n=="object")for(const r in n){const s=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];s&&c.classList.add(typeof s=="string"?s:r)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const r in c){const s=c[r];if(s!=null){if(r.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[r]=s;continue}try{const o=String(s),i=r.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(i,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const r=t.ownerDocument;let s=r.querySelector("style[data-smbls-scoped]");s||(s=r.createElement("style"),s.setAttribute("data-smbls-scoped",""),r.head.appendChild(s));let o="";for(const i in c){const f="."+n,e=i.replace(/&/g,f).split(",").map(u=>{const x=u.trim();return x.includes(f)?x:f+x}).join(", "),a=c[i];if(typeof a=="object"){let u="",x="";for(const y in a){const d=a[y];if(typeof d=="object"){const h=y.includes("&")?e.split(", ").map(p=>y.replace(/&/g,p)).join(", "):e.split(", ").map(p=>`${p} ${y}`).join(", ");let l="";for(const p in d)l+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${d[p]};`;x+=`${h} { ${l} }
5
5
  `}else u+=`${y.replace(/[A-Z]/g,h=>"-"+h.toLowerCase())}: ${d};`}u&&(o+=`${e} { ${u} }
6
- `),x&&(o+=x)}}o&&(s.textContent+=o)}function jt(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const i=n.charAt(0);if(i!=="."&&i!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const r=i==="!",f={lastMatch:!1,appliedKeys:null},e=()=>{if(!t.node)return;let u;const x=t[s];if(x===void 0)if(t.state&&s in t.state)u=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;u=typeof h=="function"?h.call(t,t):h}else typeof x=="function"?u=x(t,t.state,t.context):u=x;const y=r?!u:!!u;if(y===f.lastMatch)return;f.lastMatch=y;const d=t.context?.designSystem;d&&(0,A.pushConfig)(d);try{if(y){const h={};for(const p in o){if(!Object.prototype.hasOwnProperty.call(o,p))continue;const _=typeof o[p]=="function"?o[p](t,t.state,t.context):o[p];if(_!=null)if(g.CSS_PROPS_REGISTRY[p]){const b=g.CSS_PROPS_REGISTRY[p](_,t,t.state,t.context);if(b){const k=Array.isArray(b)?b:[b];for(const P of k)P&&Object.assign(h,P)}}else g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(p)&&(h[p]=_)}const l=Object.keys(h);l.length?(K(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{d&&(0,A.popConfig)()}};c.__conditionalRunners.push(e);const a=(0,j.createEffect)(e,{depth:c.path.length});c.__effects.push(a)}}const G=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(G.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}G.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const i={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||E.REGISTRY.has(o))continue;const r=o.charCodeAt(0);if(!(r>=65&&r<=90)&&!M(o)){if(g.CSS_PROPS_REGISTRY[o]){const f=t[o],e=g.CSS_PROPS_REGISTRY[o](f,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(i,a);else Object.assign(i,e);s=!0}}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(i[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(i[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(i[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const e={};for(const a in f){let u=f[a];if(typeof u=="function"&&(u=u(t,t.state,t.context)),!(u==null||typeof u=="function"))if(g.CSS_PROPS_REGISTRY[a]){const x=g.CSS_PROPS_REGISTRY[a](u,t,t.state,t.context);if(x)if(Array.isArray(x))for(const y of x)y&&Object.assign(e,y);else Object.assign(e,x)}else e[a]=u}if(Object.keys(e).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const u={};for(const y in e){const d=e[y];u[y]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}const x=o.slice(1);i[`[data-theme="${x}"] &`]=u}else{let u=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const y=o.slice(1),d=t.context?.designSystem?.media?.[y]||t.context?.designSystem?.media?.[y];d&&(u=`@media ${d}`)}const x={};for(const y in e){const d=e[y];if(d&&typeof d=="object"&&!Array.isArray(d)){const h={};for(const p in d)if(g.CSS_PROPS_REGISTRY[p]){const _=g.CSS_PROPS_REGISTRY[p](d[p],t,t.state,t.context);if(_)if(Array.isArray(_))for(const b of _)b&&Object.assign(h,b);else Object.assign(h,_)}else h[p]=d[p];const l=y.startsWith(":")?"":" ";if(u.includes(",")){const p=u.split(",").map(_=>`${_.trim()}${l}${y}`).join(", ");i[p]=h}else i[`${u}${l}${y}`]=h}else x[y]=d}Object.keys(x).length&&(i[u]=x)}s=!0}s=!0}}}}if(s){i.display&&String(i.display).includes("!important")&&(c.style.setProperty("display",String(i.display).replace(/\s*!important\s*$/,""),"important"),delete i.display);const o=(0,et.css)(i,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let e=!1;for(const a of f)c.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&typeof c.offsetWidth=="number"&&c.offsetWidth}const r=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(r!=null){const f=i.display;if(f&&f!==r)if(r==="none"){const e=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&(0,A.popConfig)(),G.delete(t)}}function ot(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const r="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(r,o===!0?"":o)}const n=(0,I.applyAttrTransforms)(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const i=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||E.REGISTRY.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!M(s)&&!(g.CSS_PROPS_REGISTRY[s]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))&&(0,I.checkAttributeByTagName)(i,s)){let r=t[s];if(r==null||r===!1||(typeof r=="string"&&r.includes("{{")&&(r=(0,V.replaceLiteralsWithObjectFields)(r,t,t.state,t.context),t[s]=r),r==null||r===!1||typeof r=="function"||typeof r=="object"))continue;c.setAttribute(s,r===!0?"":r)}}}const st=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ct(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!M(n)||st.has(n))continue;let i=t[n];if(typeof i=="string"&&/^[A-Za-z_$][\w$]*$/.test(i)){const o=i;i=function(f){return t.call(o,f)}}if(typeof i!="function")continue;const s=xt(n);E.LIFECYCLE_EVENTS.has(s)||(0,it.registerEvent)(_t(s),t,i)}St(t)}function St(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let i=!1;for(const y of st){const d=t[y];typeof d=="function"&&(n[y]=d,i=!0)}if(!i)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let r=0,f=0,e=0,a=!1;const u=y=>{const d=y.touches&&y.touches[0]||y.changedTouches&&y.changedTouches[0];d&&(r=d.clientX,f=d.clientY,e=Date.now(),a=!0)},x=y=>{if(!a)return;a=!1;const d=y.changedTouches&&y.changedTouches[0]||y.touches&&y.touches[0];if(!d)return;const h=d.clientX-r,l=d.clientY-f,p=Date.now()-e;if(p>o)return;const _=Math.abs(h),b=Math.abs(l);if(Math.max(_,b)<s)return;let k;if(_>b*1.2)k=h<0?"left":"right";else if(b>_*1.2)k=l<0?"up":"down";else return;const P="onSwipe"+k.charAt(0).toUpperCase()+k.slice(1),C=n[P],S=n.onSwipe;C&&C.call(t,y,t,t.state,t.context),S&&S.call(t,{direction:k,dx:h,dy:l,dt:p,event:y},t,t.state,t.context)};c.addEventListener("touchstart",u,{passive:!0}),c.addEventListener("touchend",x,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",u)}catch{}try{c.removeEventListener("touchend",x)}catch{}})}function q(t,c){const n={...t};for(const i in c){const s=n[i],o=c[i];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[i]=q(s,o):n[i]=o}return n}function U(t,c,n){if(!c||!t.node)return;const i=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const r=t.childProps,f=t.childrenAs;for(let e=0;e<c.length;e++){let a=c[e];const u=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let x=r;if(typeof r=="function")try{x=r(t,a)}catch{x=null}if(f==="state"){let h=u;(typeof u=="string"||typeof u=="number")&&(h={value:u,text:u}),a=x?{...x,state:h}:{state:h}}else x&&(a=q(x,a));if(i&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(i)?i:[i];a={...a,extends:[...l,...h]}}else a={extends:i,...a};const y=a?.key||`${e}`,d=T(a,t,y,n);d?.node&&o.appendChild(d.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=tt(c,t);if(Array.isArray(s)){U(t,s,n);return}}if(typeof c=="object")for(const s in c){if(E.REGISTRY.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=q(t.childProps,o)),i&&!o.ignoreChildExtends)if(o.extends){const r=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(i)?i:[i];o={...o,extends:[...f,...r]}}else o={extends:i,...o};T(o,t,s,n)}}}function nt(t,c){let{children:n,content:i}=t;const s=t.childExtends;if(typeof n=="function"){const r=n;n=r(t,t.state,t.context),t.children=n;const f=t.__ref;let e=!1;const a=(0,j.createEffect)(()=>{const u=r(t,t.state,t.context);if(!e){e=!0;return}if(u===t.children)return;if(t.children=u,Array.isArray(u)&&t.childrenAs==="state"){const d=t.childProps,h=[],l=new Map;for(let C=0;C<u.length;C++){const S=u[C];let v=d;if(typeof d=="function")try{v=d(t,S)}catch{v=null}const D=v&&v.key||S&&S.key||`${C}`;h.push(D),l.set(D,{rawChild:S,childProps:v})}const p=new Set(h),_=f.__children.slice();for(const C of _)if(!p.has(C)){const S=t[C];S?.remove&&S.remove(),delete t[C]}const b=t.childExtends,P=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const C of h){const S=l.get(C),v=S.rawChild,D=t[C];if(D&&D.state){if(v&&typeof v=="object"){const $=D.state;if(typeof $.replace=="function")$.replace(v);else if(typeof $.update=="function"){for(const w in $)if(!(w==="__element"||w==="root"||w==="parent"||w==="update")&&!Object.prototype.hasOwnProperty.call(v,w))try{$[w]=void 0}catch{}$.update(v)}else for(const w in v)$[w]=v[w]}continue}let W=v;(typeof v=="string"||typeof v=="number")&&(W={value:v,text:v});const J=S.childProps;let O=J?{...J,state:W}:{state:W};if(b&&!O.ignoreChildExtends)if(O.extends){const $=Array.isArray(O.extends)?O.extends:[O.extends],w=Array.isArray(b)?b:[b];O={...O,extends:[...w,...$]}}else O={extends:b,...O};const m=T(O,t,C,c);m?.node&&P&&P.appendChild(m.node)}P&&P.childNodes.length&&t.node&&t.node.appendChild(P),f.__children=h;return}for(const d of[...f.__children]){const h=t[d];h?.remove&&h.remove(),delete t[d]}f.__children=[],U(t,u,c)},{depth:f.path.length});f.__effects.push(a)}if(U(t,n||i,c),n||i)return;const o=t.context?.components||{};{const r=Object.keys(t);for(let f=0;f<r.length;f++){const e=r[f];if(!e.endsWith("Extends")||typeof t[e]!="string")continue;const a=e.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const u={extends:t[e]};delete t[e];for(let x=f+1;x<r.length;x++){const y=r[x],d=y.charCodeAt(0);if(d>=65&&d<=90||E.REGISTRY.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const h=t[y];h!==void 0&&(u[y]=h,delete t[y])}t[a]&&typeof t[a]=="object"?t[a]={...u,...t[a]}:t[a]=u}}for(const r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||E.REGISTRY.has(r)||typeof t[r]!="object"||t[r]===null)continue;const f=r.charCodeAt(0);if(f<65||f>90)continue;let e=t[r];if(!e.__ref){if(!e.extends&&!e.extend){const a=o[r]||o[`smbls.${r}`];a&&(e={extends:a,...e})}if(t.childProps&&(e={...t.childProps,...e}),s&&!e.ignoreChildExtends)if(e.extends){const a=Array.isArray(e.extends)?e.extends:[e.extends],u=Array.isArray(s)?s:[s];e={...e,extends:[...u,...a]}}else e={extends:s,...e};T(e,t,r,c)}}}function X(t,c,n){const{node:i}=t;if(!i)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(i,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(i,o):s.appendChild(i)}else s.appendChild(i)}function N(t,c,n){const i=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&(0,Q.runPluginHook)(i,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const r=c.context?.designSystem;r&&(0,A.pushConfig)(r);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&(0,Q.runPluginHook)("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{r&&(0,A.popConfig)()}}return!0}var kt=T;
6
+ `),x&&(o+=x)}}o&&(s.textContent+=o)}function jt(t){const c=t.__ref;c.__conditionalRunners=[];for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=n.charAt(0);if(r!=="."&&r!=="!")continue;const s=n.slice(1);if(!s)continue;const o=t[n];if(!o||typeof o!="object")continue;const i=r==="!",f={lastMatch:!1,appliedKeys:null},e=()=>{if(!t.node)return;let u;const x=t[s];if(x===void 0)if(t.state&&s in t.state)u=t.state[s];else{const h=t.context?.cases?.[s];if(h===void 0)return;u=typeof h=="function"?h.call(t,t):h}else typeof x=="function"?u=x(t,t.state,t.context):u=x;const y=i?!u:!!u;if(y===f.lastMatch)return;f.lastMatch=y;const d=t.context?.designSystem;d&&(0,A.pushConfig)(d);try{if(y){const h={};for(const p in o){if(!Object.prototype.hasOwnProperty.call(o,p))continue;const _=typeof o[p]=="function"?o[p](t,t.state,t.context):o[p];if(_!=null)if(g.CSS_PROPS_REGISTRY[p]){const b=g.CSS_PROPS_REGISTRY[p](_,t,t.state,t.context);if(b){const k=Array.isArray(b)?b:[b];for(const P of k)P&&Object.assign(h,P)}}else g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(p)&&(h[p]=_)}const l=Object.keys(h);l.length?(K(t.node,h),f.appliedKeys=l):f.appliedKeys=null}else if(f.appliedKeys){for(const h of f.appliedKeys)t.node.style[h]="";f.appliedKeys=null}}finally{d&&(0,A.popConfig)()}};c.__conditionalRunners.push(e);const a=(0,j.createEffect)(e,{depth:c.path.length});c.__effects.push(a)}}const G=new WeakSet;function Ct(t){const{node:c}=t;if(!c)return;if(G.has(t)){console.error("[applyCssInProps] re-entry detected for element",t.key,"prop path:",t.__ref?.path);return}G.add(t);const n=t.context?.designSystem;n&&(0,A.pushConfig)(n);try{const r={};let s=!1;for(const o in t){if(!Object.prototype.hasOwnProperty.call(t,o)||typeof t[o]=="function"||E.REGISTRY.has(o))continue;const i=o.charCodeAt(0);if(!(i>=65&&i<=90)&&!M(o)){if(g.CSS_PROPS_REGISTRY[o]){const f=t[o],e=g.CSS_PROPS_REGISTRY[o](f,t,t.state,t.context);if(e){if(Array.isArray(e))for(const a of e)a&&Object.assign(r,a);else Object.assign(r,e);s=!0}}else if(g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(o)){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charCodeAt(0)===45){const f=t[o];f!=null&&typeof f!="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="&"){const f=t[o];f&&typeof f=="object"&&(r[o]=f,s=!0)}else if(o.charAt(0)==="@"||o.charAt(0)===":"){const f=t[o];if(f&&typeof f=="object"){const e={};for(const a in f){let u=f[a];if(typeof u=="function"&&(u=u(t,t.state,t.context)),!(u==null||typeof u=="function"))if(g.CSS_PROPS_REGISTRY[a]){const x=g.CSS_PROPS_REGISTRY[a](u,t,t.state,t.context);if(x)if(Array.isArray(x))for(const y of x)y&&Object.assign(e,y);else Object.assign(e,x)}else e[a]=u}if(Object.keys(e).length){if(o.length>1&&o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")&&!o.startsWith("@supports")&&(o==="@dark"||o==="@light"||!t.context?.designSystem?.media?.[o.slice(1)])){const u={};for(const y in e){const d=e[y];u[y]=typeof d=="string"&&!d.includes("!important")?d+" !important":d}const x=o.slice(1);r[`[data-theme="${x}"] &`]=u}else{let u=o;if(o.charAt(0)==="@"&&!o.startsWith("@media")&&!o.startsWith("@keyframes")){const y=o.slice(1),d=t.context?.designSystem?.media?.[y]||t.context?.designSystem?.media?.[y];d&&(u=`@media ${d}`)}const x={};for(const y in e){const d=e[y];if(d&&typeof d=="object"&&!Array.isArray(d)){const h={};for(const p in d)if(g.CSS_PROPS_REGISTRY[p]){const _=g.CSS_PROPS_REGISTRY[p](d[p],t,t.state,t.context);if(_)if(Array.isArray(_))for(const b of _)b&&Object.assign(h,b);else Object.assign(h,_)}else h[p]=d[p];const l=y.startsWith(":")?"":" ";if(u.includes(",")){const p=u.split(",").map(_=>`${_.trim()}${l}${y}`).join(", ");r[p]=h}else r[`${u}${l}${y}`]=h}else x[y]=d}Object.keys(x).length&&(r[u]=x)}s=!0}s=!0}}}}if(s){r.display&&String(r.display).includes("!important")&&(c.style.setProperty("display",String(r.display).replace(/\s*!important\s*$/,""),"important"),delete r.display);const o=(0,et.css)(r,null,t.context?.cssPrefix);if(o&&c.classList){const f=o.split(" ").filter(Boolean);let e=!1;for(const a of f)c.classList.add(a),e||(a.charCodeAt(0)===95&&a.charCodeAt(1)===99||a.charCodeAt(0)===95&&a.indexOf("_c",1)!==-1)&&(e=!0);e&&typeof c.offsetWidth=="number"&&c.offsetWidth}const i=t.display!=null&&typeof t.display!="function"?t.display:t.hide===!0||t.show===!1?"none":null;if(i!=null){const f=r.display;if(f&&f!==i)if(i==="none"){const e=[];for(const a of c.classList)a.startsWith("_d-")&&a!=="_d-none"&&e.push(a);for(const a of e)c.classList.remove(a);c.classList.add("_d-none")}else c.style.display=t.display}}}finally{n&&(0,A.popConfig)(),G.delete(t)}}function ot(t){const{node:c}=t;if(!c||!c.setAttribute)return;if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o=="function"||typeof o=="object"||o==null||o===!1)continue;const i="aria-"+s.replace(/[A-Z]/g,f=>"-"+f.toLowerCase());c.setAttribute(i,o===!0?"":o)}const n=(0,I.applyAttrTransforms)(t);for(const s in n){const o=n[s];o!=null&&o!==!1&&typeof o!="function"&&typeof o!="object"&&c.setAttribute(s,o===!0?"":o)}const r=t.tag||"div";for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||typeof t[s]=="function"||E.REGISTRY.has(s)||s==="on"||n[s]!==void 0)continue;const o=s.charCodeAt(0);if(!(o>=65&&o<=90)&&!M(s)&&!(g.CSS_PROPS_REGISTRY[s]||g.DEFAULT_CSS_PROPERTIES_LIST&&g.DEFAULT_CSS_PROPERTIES_LIST.has(s))&&(0,I.checkAttributeByTagName)(r,s)){let i=t[s];if(i==null||i===!1||(typeof i=="string"&&i.includes("{{")&&(i=(0,V.replaceLiteralsWithObjectFields)(i,t,t.state,t.context),t[s]=i),i==null||i===!1||typeof i=="function"||typeof i=="object"))continue;c.setAttribute(s,i===!0?"":i)}}}const st=new Set(["onSwipe","onSwipeLeft","onSwipeRight","onSwipeUp","onSwipeDown"]);function ct(t,c){for(const n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||!M(n)||st.has(n))continue;let r=t[n];if(typeof r=="string"&&/^[A-Za-z_$][\w$]*$/.test(r)){const o=r;r=function(f){return t.call(o,f)}}if(typeof r!="function")continue;const s=xt(n);E.LIFECYCLE_EVENTS.has(s)||(0,it.registerEvent)(_t(s),t,r)}St(t)}function St(t){const c=t.node;if(!c||!c.addEventListener)return;const n={};let r=!1;for(const y of st){const d=t[y];typeof d=="function"&&(n[y]=d,r=!0)}if(!r)return;const s=typeof t.swipeThreshold=="number"?t.swipeThreshold:40,o=typeof t.swipeMaxDuration=="number"?t.swipeMaxDuration:600;let i=0,f=0,e=0,a=!1;const u=y=>{const d=y.touches&&y.touches[0]||y.changedTouches&&y.changedTouches[0];d&&(i=d.clientX,f=d.clientY,e=Date.now(),a=!0)},x=y=>{if(!a)return;a=!1;const d=y.changedTouches&&y.changedTouches[0]||y.touches&&y.touches[0];if(!d)return;const h=d.clientX-i,l=d.clientY-f,p=Date.now()-e;if(p>o)return;const _=Math.abs(h),b=Math.abs(l);if(Math.max(_,b)<s)return;let k;if(_>b*1.2)k=h<0?"left":"right";else if(b>_*1.2)k=l<0?"up":"down";else return;const P="onSwipe"+k.charAt(0).toUpperCase()+k.slice(1),C=n[P],S=n.onSwipe;C&&C.call(t,y,t,t.state,t.context),S&&S.call(t,{direction:k,dx:h,dy:l,dt:p,event:y},t,t.state,t.context)};c.addEventListener("touchstart",u,{passive:!0}),c.addEventListener("touchend",x,{passive:!0}),t.__ref.__eventCleanup||(t.__ref.__eventCleanup=[]),t.__ref.__eventCleanup.push(()=>{try{c.removeEventListener("touchstart",u)}catch{}try{c.removeEventListener("touchend",x)}catch{}})}function q(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=q(s,o):n[r]=o}return n}function U(t,c,n){if(!c||!t.node)return;const r=t.childExtends;if(Array.isArray(c)){const o=(t.context?.document||globalThis.document)?.createDocumentFragment();if(!o)return;const i=t.childProps,f=t.childrenAs;for(let e=0;e<c.length;e++){let a=c[e];const u=a;(typeof a=="string"||typeof a=="number")&&(a={text:a});let x=i;if(typeof i=="function")try{x=i(t,a)}catch{x=null}if(f==="state"){let h=u;(typeof u=="string"||typeof u=="number")&&(h={value:u,text:u}),a=x?{...x,state:h}:{state:h}}else x&&(a=q(x,a));if(r&&!a.ignoreChildExtends)if(a.extends){const h=Array.isArray(a.extends)?a.extends:[a.extends],l=Array.isArray(r)?r:[r];a={...a,extends:[...l,...h]}}else a={extends:r,...a};const y=a?.key||`${e}`,d=T(a,t,y,n);d?.node&&o.appendChild(d.node)}t.node.appendChild(o);return}if(typeof c=="string"){const s=tt(c,t);if(Array.isArray(s)){U(t,s,n);return}}if(typeof c=="object")for(const s in c){if(E.REGISTRY.has(s))continue;let o=c[s];if(!(o==null||o===!1)){if((typeof o=="string"||typeof o=="number")&&(o={text:o}),t.childProps&&(o=q(t.childProps,o)),r&&!o.ignoreChildExtends)if(o.extends){const i=Array.isArray(o.extends)?o.extends:[o.extends],f=Array.isArray(r)?r:[r];o={...o,extends:[...f,...i]}}else o={extends:r,...o};T(o,t,s,n)}}}function nt(t,c){let{children:n,content:r}=t;const s=t.childExtends;if(typeof n=="function"){const i=n;n=i(t,t.state,t.context),t.children=n;const f=t.__ref;let e=!1;const a=(0,j.createEffect)(()=>{const u=i(t,t.state,t.context);if(!e){e=!0;return}if(u===t.children)return;if(t.children=u,Array.isArray(u)&&t.childrenAs==="state"){const d=t.childProps,h=[],l=new Map;for(let C=0;C<u.length;C++){const S=u[C];let v=d;if(typeof d=="function")try{v=d(t,S)}catch{v=null}const D=v&&v.key||S&&S.key||`${C}`;h.push(D),l.set(D,{rawChild:S,childProps:v})}const p=new Set(h),_=f.__children.slice();for(const C of _)if(!p.has(C)){const S=t[C];S?.remove&&S.remove(),delete t[C]}const b=t.childExtends,P=(t.context?.document||globalThis.document)?.createDocumentFragment();for(const C of h){const S=l.get(C),v=S.rawChild,D=t[C];if(D&&D.state){if(v&&typeof v=="object"){const $=D.state;if(typeof $.replace=="function")$.replace(v);else if(typeof $.update=="function"){for(const w in $)if(!(w==="__element"||w==="root"||w==="parent"||w==="update")&&!Object.prototype.hasOwnProperty.call(v,w))try{$[w]=void 0}catch{}$.update(v)}else for(const w in v)$[w]=v[w]}continue}let W=v;(typeof v=="string"||typeof v=="number")&&(W={value:v,text:v});const J=S.childProps;let O=J?{...J,state:W}:{state:W};if(b&&!O.ignoreChildExtends)if(O.extends){const $=Array.isArray(O.extends)?O.extends:[O.extends],w=Array.isArray(b)?b:[b];O={...O,extends:[...w,...$]}}else O={extends:b,...O};const m=T(O,t,C,c);m?.node&&P&&P.appendChild(m.node)}P&&P.childNodes.length&&t.node&&t.node.appendChild(P),f.__children=h;return}for(const d of[...f.__children]){const h=t[d];h?.remove&&h.remove(),delete t[d]}f.__children=[],U(t,u,c)},{depth:f.path.length});f.__effects.push(a)}if(U(t,n||r,c),n||r)return;const o=t.context?.components||{};{const i=Object.keys(t);for(let f=0;f<i.length;f++){const e=i[f];if(!e.endsWith("Extends")||typeof t[e]!="string")continue;const a=e.slice(0,-7);if(!a||a.charCodeAt(0)<65||a.charCodeAt(0)>90)continue;const u={extends:t[e]};delete t[e];for(let x=f+1;x<i.length;x++){const y=i[x],d=y.charCodeAt(0);if(d>=65&&d<=90||E.REGISTRY.has(y)||typeof t[y]=="function"&&(y.startsWith("on")||y.startsWith(".")))break;const h=t[y];h!==void 0&&(u[y]=h,delete t[y])}t[a]&&typeof t[a]=="object"?t[a]={...u,...t[a]}:t[a]=u}}for(const i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||E.REGISTRY.has(i)||typeof t[i]!="object"||t[i]===null)continue;const f=i.charCodeAt(0);if(f<65||f>90)continue;let e=t[i];if(!e.__ref){if(!e.extends&&!e.extend){const a=o[i]||o[`smbls.${i}`];a&&(e={extends:a,...e})}if(t.childProps&&(e={...t.childProps,...e}),s&&!e.ignoreChildExtends)if(e.extends){const a=Array.isArray(e.extends)?e.extends:[e.extends],u=Array.isArray(s)?s:[s];e={...e,extends:[...u,...a]}}else e={extends:s,...e};T(e,t,i,c)}}}function X(t,c,n){const{node:r}=t;if(!r)return;const s=c?.node||(c?.nodeType?c:null);if(s)if(n?.position==="before"&&n.node)s.insertBefore(r,n.node);else if(n?.position==="after"&&n.node){const o=n.node.nextSibling;o?s.insertBefore(r,o):s.appendChild(r)}else s.appendChild(r)}function N(t,c,n){const r=t.charAt(0).toLowerCase()+t.slice(1);c.context?.plugins?.length&&(0,Q.runPluginHook)(r,c,n);const s="on"+t,o=c[s];if(typeof o=="function"){const i=c.context?.designSystem;i&&(0,A.pushConfig)(i);try{if(o(c,c.state,c.context,n)===!1)return!1}catch(f){if(c.context?.plugins?.length&&(0,Q.runPluginHook)("error",c,{hook:s,error:f})||console.error(`[DOMQL] Lifecycle "${s}" error:`,f),c.context?.strictMode)throw f}finally{i&&(0,A.popConfig)()}}return!0}var kt=T;
@@ -1,4 +1,4 @@
1
- import{createStore as V,createScopeStore as et,isStore as W}from"@symbo.ls/signal";import{createEffect as A}from"@symbo.ls/signal";import{cacheNode as H,detectTag as ot}from"./cache.js";import{REGISTRY as N,LIFECYCLE_EVENTS as at}from"./registry.js";import{registerEvent as ut}from"./delegate.js";import{applyExtends as dt}from"./extends.js";import{addMethods as pt}from"./methods.js";import"./dispose.js";import{replaceLiteralsWithObjectFields as Y}from"@symbo.ls/utils";import{runPluginHook as st}from"@symbo.ls/utils/function.js";import{applyStateMethods as F}from"@symbo.ls/state";import{CSS_PROPS_REGISTRY as C,DEFAULT_CSS_PROPERTIES_LIST as S}from"css-in-props";import{css as yt}from"@symbo.ls/css";import{pushConfig as L,popConfig as $}from"@symbo.ls/scratch";import{checkAttributeByTagName as Z,applyAttrTransforms as lt}from"attrs-in-props";let ht=1;function D(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function xt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function _t(t){return t.toLowerCase()}function B(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=B(s,o):n[r]=o}return n}function M(t,c,n,r={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||r.context||{},o.context.__create||(o.context.__create=M);const i=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const p=n.substring(0,l),_=o.context?.components;_&&(_[p]||_["smbls."+p])&&(t={extends:p,...t})}}dt(o,t,r);const f=new Set(["childProps","attr","style","scope","data"]),e=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const p=t[l],_=o[l],b=_&&p&&typeof _=="object"&&typeof p=="object"&&!Array.isArray(_)&&!Array.isArray(p)&&typeof _!="function"&&typeof p!="function";b&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=B(_,p):b&&f.has(l)?o[l]={..._,...p}:o[l]=p}function a(l){for(const p in l){const _=l[p],b=o[p],k=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";k&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?o[p]=B(b,_):k&&f.has(p)?o[p]={...b,..._}:o[p]=_}}e&&a(e),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const u=o.scope&&typeof o.scope=="object"?o.scope:null,x=c?.scope,y=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,d=x||y||null;if(t.scope!==void 0||u){const l={};u&&Object.assign(l,u),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=et(l,d)}else d&&(o.scope=d);if(t.if!==void 0&&(o.if=t.if),pt(o),bt(o,c,t),o.if!=null){const l=typeof o.if=="function"?o.if(o,o.state,o.context):o.if;i.__if=!!l}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&G(o,{if:t.if}),o;o.tag||(o.tag=ot(o)),T("Init",o,r);const h=o.node=H(o);if(!h)return o;T("AttachNode",o,r),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),G(o,t),q(o),nt(o),rt(o,r);try{ft(o,r)}catch(l){if(typeof console<"u"&&console.error){const p=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,l?.message||l,l?.stack?`
1
+ import{createStore as V,createScopeStore as et,isStore as W}from"@symbo.ls/signal";import{createEffect as A}from"@symbo.ls/signal";import{cacheNode as H,detectTag as ot}from"./cache.js";import{REGISTRY as N,LIFECYCLE_EVENTS as at}from"./registry.js";import{registerEvent as ut}from"./delegate.js";import{applyExtends as dt}from"./extends.js";import{addMethods as pt}from"./methods.js";import"./dispose.js";import{replaceLiteralsWithObjectFields as Y}from"@symbo.ls/utils";import{runPluginHook as st}from"@symbo.ls/utils/function.js";import{applyStateMethods as F}from"@symbo.ls/state";import{CSS_PROPS_REGISTRY as C,DEFAULT_CSS_PROPERTIES_LIST as S}from"css-in-props";import{css as yt}from"@symbo.ls/css";import{pushConfig as L,popConfig as $}from"@symbo.ls/scratch";import{checkAttributeByTagName as Z,applyAttrTransforms as lt}from"attrs-in-props";let ht=1;function D(t){return t.length>2&&t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>=65&&t.charCodeAt(2)<=90}function xt(t){return t.charAt(2).toLowerCase()+t.slice(3)}function _t(t){return t.toLowerCase()}function B(t,c){const n={...t};for(const r in c){const s=n[r],o=c[r];s&&o&&typeof s=="object"&&typeof o=="object"&&!Array.isArray(s)&&!Array.isArray(o)&&typeof s!="function"&&typeof o!="function"?n[r]=B(s,o):n[r]=o}return n}function M(t,c,n,r={},s){if(t==null||t===!1)return null;(typeof t=="string"||typeof t=="number")&&(t={text:t});const o=Object.create(null);o.key=n||t.key||`_${ht++}`,o.parent=c||null,o.context=t.context||c?.context||r.context||{},o.context.__create||(o.context.__create=M);const i=o.__ref={__if:!0,__children:[],__exec:{},__effects:[],__eventCleanup:[],root:c?.__ref?.root||o,path:c?.__ref?.path?[...c.__ref.path,o.key]:[o.key]};if(n&&!t.extends&&!t.extend){const l=n.indexOf("_");if(l>0){const p=n.substring(0,l),_=o.context?.components;_&&(_[p]||_["smbls."+p])&&(t={extends:p,...t})}}dt(o,t,r);const f=new Set(["childProps","attr","style","scope","data"]),e=o.props&&typeof o.props=="object"?o.props:null;for(const l in t){if(l==="parent"||l==="node"||l==="__ref"||l==="extends"||l==="context"||l==="props")continue;const p=t[l],_=o[l],b=_&&p&&typeof _=="object"&&typeof p=="object"&&!Array.isArray(_)&&!Array.isArray(p)&&typeof _!="function"&&typeof p!="function";b&&l.charCodeAt(0)>=65&&l.charCodeAt(0)<=90?o[l]=B(_,p):b&&f.has(l)?o[l]={..._,...p}:o[l]=p}function a(l){for(const p in l){const _=l[p],b=o[p],k=b&&_&&typeof b=="object"&&typeof _=="object"&&!Array.isArray(b)&&!Array.isArray(_)&&typeof b!="function"&&typeof _!="function";k&&p.charCodeAt(0)>=65&&p.charCodeAt(0)<=90?o[p]=B(b,_):k&&f.has(p)?o[p]={...b,..._}:o[p]=_}}e&&a(e),t.props&&typeof t.props=="object"&&a(t.props),t.data!==void 0&&(o.data=t.data),t.classlist!==void 0&&(o.classlist=t.classlist),t.text!==void 0&&(o.text=t.text),t.html!==void 0&&(o.html=t.html);const u=o.scope&&typeof o.scope=="object"?o.scope:null,x=c?.scope,y=o.context&&typeof o.context.globalScope=="object"&&o.context.globalScope||null,d=x||y||null;if(t.scope!==void 0||u){const l={};u&&Object.assign(l,u),t.scope!==void 0&&Object.assign(l,t.scope),o.scope=et(l,d)}else d&&(o.scope=d);if(t.if!==void 0&&(o.if=t.if),pt(o),bt(o,c,t),o.if!=null){let l;if(typeof o.if=="function")try{l=o.if(o,o.state,o.context)}catch(p){if(l=!1,i.__ifError=p,typeof console<"u"&&console.warn){const _=o.key||o.tag||"?";console.warn(`[smbls] \`if:\` evaluator threw on ${_} \u2014 treating as false:`,p?.message||p)}}else l=o.if;i.__if=!!l}if(i.__if)typeof t.if=="function"&&(i.__ifInitialized=!0);else return c&&(c[o.key]=o),typeof t.if=="function"&&G(o,{if:t.if}),o;o.tag||(o.tag=ot(o)),T("Init",o,r);const h=o.node=H(o);if(!h)return o;T("AttachNode",o,r),h.setAttribute&&o.key&&h.setAttribute("data-key",o.key),h.setAttribute&&o.context?.scopeSelector&&o.context.scopeSelector!==":root"&&o.context.key&&o.key===o.context.key&&h.setAttribute("data-smbls-app",o.context.key),o.id&&h.setAttribute&&(h.id=o.id),G(o,t),q(o),nt(o),rt(o,r);try{ft(o,r)}catch(l){if(typeof console<"u"&&console.error){const p=o.__ref?.path?.join(".")||o.key||"<root>";console.error(`[smbls] createChildren failed at ${p}:`,l?.message||l,l?.stack?`
2
2
  `+l.stack.split(`
3
3
  `).slice(0,6).join(`
4
4
  `):"")}}if(J(o,c,s),c&&(c[o.key]=o,c.__ref?.__children&&(c.__ref.__children.includes(o.key)||c.__ref.__children.push(o.key))),typeof o.html=="function"&&o.node&&!o.node.innerHTML){const l=o.context?.designSystem;l&&L(l);try{const p=o.html(o,o.state,o.context);p!=null&&typeof p!="function"&&(o.node.innerHTML=p)}catch{}finally{l&&$()}}if(T("Create",o,r),T("Complete",o,r),T("Render",o,r),T("RenderRouter",o,r),typeof o.onFrame=="function"){const l=o.onFrame,p=o.context?.designSystem,_=()=>{if(o.node){if(o.node.isConnected){p&&L(p);try{l(o,o.state,o.context)}catch(b){console.error("[DOMQL] onFrame error:",b)}finally{p&&$()}}requestAnimationFrame(_)}};requestAnimationFrame(_)}return o}function bt(t,c,n){const r=!c,s=n.state&&typeof n.state=="object"&&!Array.isArray(n.state)&&Object.keys(n.state).length===0,o=r&&s&&t.context?.state,i=n.state!==void 0&&!o?n.state:t.state&&!W(t.state)?t.state:void 0;if(i==null){if(c?.state)t.state=c.state,F(t,t.state);else if(t.context?.state){const f=t.context.state,e={...f},a=t.context?.polyglot;if(a?.translations){const u=f.lang||a.defaultLang||"en",x=a.translations[u];if(x&&typeof x=="object")for(const d in x)e[d]===void 0&&(e[d]=x[d]);const y=new Set(a.languages||[]);for(const d in a.translations)!y.has(d)&&e[d]===void 0&&(e[d]=a.translations[d])}t.state=W(e)?e:V(e),t.state.__element=t,t.state.root=t.state,F(t,t.state)}else t.state={},Object.defineProperty(t.state,"root",{value:t.state,enumerable:!1,configurable:!0,writable:!0}),F(t,t.state);return}if(typeof i=="string"){if(t.state=ct(i,c),t.state&&typeof t.state=="object"&&!W(t.state)){const f=c?.state?.root||c?.state||t.state;Object.defineProperty(t.state,"root",{value:f,enumerable:!1,configurable:!0,writable:!0})}F(t,t.state);return}if(typeof i=="function"){const f=i(t,c?.state);t.state=V(f||{})}else t.state=V({...i});t.state.__element=t,c?.state?(t.state.parent=c.state,t.state.root=c.state.root||c.state):t.state.root=t.state,F(t,t.state)}function z(t,c){if(!c)return t;const n=c.split("/");let r=t;for(const s of n){if(r==null)return{};r=r[s]}return r??{}}function ct(t,c){if(!c)return{};if(t===".")return c.state||{};if(t.startsWith("../")){const s=t.slice(3);return s?z(c.state,s):c.state??{}}if(t.startsWith("~/")){const s=c.state?.root||c.state,o=t.slice(2);return o?z(s,o):s??{}}if(c.state?.[t]!==void 0)return c.state[t];const n=z(c.state,t);if(n!=null&&Object.keys(n).length>0)return n;const r=c.context?.polyglot;if(r?.translations){const s=c.state?.root?.lang||r.defaultLang||"en",o=r.translations[s];if(o?.[t]!==void 0)return o[t];if(r.translations[t]!==void 0)return r.translations[t]}return{}}function gt(t){const c=t.__ref,n=t.tag||"div",r=t.context?.designSystem,s=[],o=Object.keys(t);for(let i=0;i<o.length;i++){const f=o[i];if(typeof t[f]!="function"||N.has(f))continue;const e=f.charCodeAt(0);e>=65&&e<=90||D(f)||C[f]||S&&S.has(f)||Z(n,f)||s.push({prop:f,fn:t[f]})}for(let i=0;i<s.length;i++){const{prop:f,fn:e}=s[i];c.__exec[f]=e,Object.defineProperty(t,f,{get(){r&&L(r);try{return e(t,t.state,t.context)}catch{return}finally{r&&$()}},set(a){delete c.__exec[f],Object.defineProperty(t,f,{value:a,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}}function G(t,c){const n=t.__ref;if(gt(t),typeof t.text=="function"){const s=t.text,o=A(()=>{if(!n.contentManaged)try{let i=s(t,t.state,t.context);t.node&&i!=null&&typeof i!="function"&&typeof i!="object"&&(typeof i=="string"&&i.includes("{{")&&(i=Y.call(t,i,t.state)),t.tag==="string"?t.node.nodeValue=i:t.node.textContent=i)}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}else if(typeof t.text=="string"&&t.text.includes("{{")){const s=t.text,o=A(()=>{if(n.contentManaged)return;const i=Y.call(t,s,t.state);i!=null&&(t.text=i),t.node&&(t.tag==="string"?t.node.nodeValue=i??"":t.node.textContent=i??"")},{depth:n.path.length});n.__effects.push(o),n.__exec.text=s}for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&typeof t[s]=="function"&&!N.has(s)&&!D(s)&&!n.__exec[s]){if(C[s]){const o=t[s],i=s,f=A(()=>{const e=t.context?.designSystem;e&&L(e);try{const a=o(t,t.state,t.context),u=C[i](a,t,t.state,t.context);u&&t.node?K(t.node,u):t.node&&(i==="show"||i==="hide")&&(t.node.style.display="")}finally{e&&$()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}else if(S&&S.has(s)){const o=t[s],i=s,f=A(()=>{const e=t.context?.designSystem;e&&L(e);try{const a=o(t,t.state,t.context);t.node&&(a!=null?K(t.node,{[i]:a}):t.node.style[i]="")}finally{e&&$()}},{depth:n.path.length});n.__effects.push(f),n.__exec[s]=o}}if(typeof c.html=="function"){const s=c.html,o=A(()=>{const i=t.context?.designSystem;i&&L(i);try{const f=s(t,t.state,t.context);t.node&&f!=null&&typeof f!="function"&&(t.node.innerHTML=f)}finally{i&&$()}},{depth:n.path.length});n.__effects.push(o),n.__exec.html=s}if(typeof c.value=="function"){const s=c.value,o=A(()=>{try{const i=s(t,t.state,t.context);if(!t.node||!("value"in t.node))return;const f=i==null?"":String(i);if(t.node.value===f)return;const e=typeof document<"u"&&document.activeElement===t.node,a=e&&typeof t.node.selectionStart=="number"?t.node.selectionStart:null,u=e&&typeof t.node.selectionEnd=="number"?t.node.selectionEnd:null;if(t.node.value=f,e&&a!=null&&u!=null)try{t.node.setSelectionRange(a,u)}catch{}}catch{}},{depth:n.path.length});n.__effects.push(o),n.__exec.value=s}if(typeof c.style=="function"){const s=c.style,o=A(()=>{const i=s(t,t.state,t.context);K(t.node,i)},{depth:n.path.length});n.__effects.push(o),n.__exec.style=s}else if(t.style&&typeof t.style=="object")for(const s in t.style){const o=t.style[s];if(typeof o!="function")continue;const i=A(()=>{try{const f=o(t,t.state,t.context);t.node&&K(t.node,{[s]:f})}catch{}},{depth:n.path.length});n.__effects.push(i)}if(t.attr&&typeof t.attr=="object"){for(const s in t.attr)if(typeof t.attr[s]=="function"){const o=t.attr[s],i=s,f=A(()=>{try{const e=o(t,t.state,t.context);t.node?.setAttribute&&(e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e))}catch{}},{depth:n.path.length});n.__effects.push(f)}}if(t.aria&&typeof t.aria=="object")for(const s in t.aria){const o=t.aria[s];if(typeof o!="function")continue;const i="aria-"+s.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()),f=A(()=>{try{const e=o(t,t.state,t.context);if(!t.node?.setAttribute)return;e==null||e===!1?t.node.removeAttribute(i):typeof e!="function"&&typeof e!="object"&&t.node.setAttribute(i,e===!0?"":e)}catch{}},{depth:n.path.length});n.__effects.push(f)}if(t.data&&typeof t.data=="object")for(const s in t.data){const o=t.data[s];if(typeof o!="function")continue;const f="data-"+s.replace(/[A-Z]/g,a=>"-"+a.toLowerCase()),e=A(()=>{try{const a=o(t,t.state,t.context);if(!t.node?.setAttribute)return;a==null||a===!1?t.node.removeAttribute(f):typeof a!="function"&&typeof a!="object"&&t.node.setAttribute(f,a===!0?"":a)}catch{}},{depth:n.path.length});n.__effects.push(e)}const r=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(r)for(const s in r){const o=r[s];if(typeof o!="function")continue;const i=A(()=>{try{const f=o(t,t.state,t.context);if(!t.node?.classList)return;typeof f=="string"?t.node.classList.add(f):f?t.node.classList.add(s):t.node.classList.remove(s)}catch{}},{depth:n.path.length});n.__effects.push(i)}if(typeof c.if=="function"){const s=c.if,o=A(()=>{const i=s(t,t.state,t.context),f=n.__if;if(n.__if=!!i,f&&!n.__if&&t.node)t.node.remove();else if(!f&&n.__if)if(n.__ifInitialized){t.node||(t.node=H(t));const e=t.parent,a=e?.node;if(a&&t.node){let u=null;const x=Object.keys(e),y=x.indexOf(t.key);for(let d=y+1;d<x.length;d++){const h=e[x[d]];if(h?.node?.parentNode===a){u=h.node;break}}u?a.insertBefore(t.node,u):a.appendChild(t.node)}else J(t,t.parent);q(t)}else{if(n.__ifInitialized=!0,t.tag||(t.tag=ot(t)),T("Init",t,{}),t.node||(t.node=H(t)),!t.node)return;T("AttachNode",t,{}),t.node.setAttribute&&t.key&&t.node.setAttribute("data-key",t.key),t.id&&t.node.setAttribute&&(t.node.id=t.id);const e=c.if;delete c.if;try{G(t,c)}finally{c.if=e}q(t),nt(t),rt(t,{}),ft(t,{}),J(t,t.parent)}},{depth:n.path.length});n.__effects.push(o)}for(const s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||N.has(s)||typeof t[s]!="function")continue;const o=s.charCodeAt(0);if(o>=65&&o<=90||D(s))continue;const i=t[s];n.__exec[s]=i;const f=t.tag||"div";if(Z(f,s)&&!C[s]&&!(S&&S.has(s))){const e=s,a=A(()=>{try{const u=i(t,t.state,t.context);t.node?.setAttribute&&(u==null||u===!1?t.node.removeAttribute(e):typeof u!="function"&&typeof u!="object"&&(e==="src"&&"src"in t.node?t.node.src=u:t.node.setAttribute(e,u===!0?"":u)))}catch{}},{depth:n.path.length});n.__effects.push(a)}}jt(t)}function q(t){const{node:c}=t;if(c){if(typeof t.text=="string"&&!t.text.includes("{{")?t.tag==="string"?c.nodeValue=t.text:c.textContent=t.text:typeof t.text=="number"&&(c.textContent=t.text),Ct(t),typeof t.html=="string"&&(c.innerHTML=t.html),t.value!=null&&typeof t.value!="function"&&"value"in c){const n=String(t.value);c.value!==n&&(c.value=n)}if(t.style&&typeof t.style=="object"&&K(c,t.style),t.attr&&typeof t.attr=="object")for(const n in t.attr){const r=t.attr[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.setAttribute&&c.setAttribute(n,r===!0?"":r)}if(t.data&&typeof t.data=="object")for(const n in t.data){const r=t.data[n];typeof r=="function"||typeof r=="object"||r==null||r===!1||c.dataset&&(c.dataset[n]=r===!0?"":r)}if(t.classlist||t.class){const n=t.classlist||t.class;if(typeof n=="string")n.split(" ").forEach(r=>r&&c.classList.add(r));else if(typeof n=="object")for(const r in n){const s=typeof n[r]=="function"?n[r](t,t.state,t.context):n[r];s&&c.classList.add(typeof s=="string"?s:r)}}}}function K(t,c){if(!t||!c||!t.style)return;let n=null;for(const r in c){const s=c[r];if(s!=null){if(r.charAt(0)==="&"&&typeof s=="object"){n||(n={}),n[r]=s;continue}try{const o=String(s),i=r.replace(/[A-Z]/g,u=>"-"+u.toLowerCase()),f=o.trim(),e=/\s*!important\s*$/.test(f),a=f.replace(/\s*!important\s*$/,"");t.style.setProperty(i,a,e?"important":"")}catch{}}}n&&vt(t,n)}let At=0;function vt(t,c){const n=`_ds${At++}`;t.classList.add(n);const r=t.ownerDocument;let s=r.querySelector("style[data-smbls-scoped]");s||(s=r.createElement("style"),s.setAttribute("data-smbls-scoped",""),r.head.appendChild(s));let o="";for(const i in c){const f="."+n,e=i.replace(/&/g,f).split(",").map(u=>{const x=u.trim();return x.includes(f)?x:f+x}).join(", "),a=c[i];if(typeof a=="object"){let u="",x="";for(const y in a){const d=a[y];if(typeof d=="object"){const h=y.includes("&")?e.split(", ").map(p=>y.replace(/&/g,p)).join(", "):e.split(", ").map(p=>`${p} ${y}`).join(", ");let l="";for(const p in d)l+=`${p.replace(/[A-Z]/g,_=>"-"+_.toLowerCase())}: ${d[p]};`;x+=`${h} { ${l} }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/element",
3
- "version": "3.14.23",
3
+ "version": "3.14.100",
4
4
  "description": "Core element creation, update, and disposal engine for smbls v3.14",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -21,11 +21,11 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@symbo.ls/signal": "^3.14.12",
25
- "@symbo.ls/state": "^3.14.14",
26
- "@symbo.ls/utils": "^3.14.19",
27
- "css-in-props": "^3.14.9",
28
- "attrs-in-props": "^3.14.9"
24
+ "@symbo.ls/signal": "^3.14.100",
25
+ "@symbo.ls/state": "^3.14.100",
26
+ "@symbo.ls/utils": "^3.14.100",
27
+ "css-in-props": "^3.14.100",
28
+ "attrs-in-props": "^3.14.100"
29
29
  },
30
30
  "files": [
31
31
  "dist",