@reactive-web-components/rwc 2.56.2 → 2.58.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +0,0 @@
1
- (function(o,S){typeof exports=="object"&&typeof module<"u"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(o=typeof globalThis<"u"?globalThis:o||self,S(o.ReactiveComponent={}))})(this,function(o){"use strict";var Ke=Object.defineProperty;var xe=(o,S,k)=>S in o?Ke(o,S,{enumerable:!0,configurable:!0,writable:!0,value:k}):o[S]=k;var u=(o,S,k)=>xe(o,typeof S!="symbol"?S+"":S,k);const S=t=>t&&typeof t=="object"&&("classList"in t||"attributes"in t||"customAttributes"in t||"reactiveClassList"in t||"listeners"in t||"customListeners"in t||"children"in t||"effects"in t||"style"in t||Object.keys(t).some(e=>e.startsWith(".")||e.startsWith("@")||e.startsWith("$")))&&!("hostElement"in t),k=t=>t&&typeof t=="object"&&"hostElement"in t&&"append"in t&&"set"in t&&"addStyle"in t&&"setAttribute"in t&&"addClass"in t&&"addEffect"in t&&"addReactiveContent"in t&&"setReactiveContent"in t&&"clear"in t,M=(t,e,...n)=>{e&&e.apply(t,n)};let P=!0;const m=(...t)=>{P&&console.debug(["[rwc]",...t].join(" | "),...Array.from(t.join("").matchAll(/%c/gm)).map((e,n)=>n%2===0?"color:red":"color:inherit"))},T=t=>t.replace(/([A-Z])/gm,e=>`-${e.toLowerCase()}`),Y=t=>t.replace(/-(\w)/gm,(e,n)=>n.toUpperCase()),R=(t,...e)=>{if(!P)return;const n={r:"color: #ff0000",g:"color: #00ff00",b:"color: #0000ff",y:"color: #ffff00",p:"color: #800080",c:"color: #00ffff",o:"color: #ffa500",w:"color: #808080"},s=t.match(/@[rgbpycow]/g)||[],r=s.map(a=>{const h=a.slice(1);return n[h]||"color: inherit"});let i=t;s.forEach(a=>{const h=new RegExp(`\\${a}([^\\s,]+)`,"g");i=i.replace(h,"%c$1")}),console.log(i,...r,...e)},St=()=>{P=!0},K=()=>{P=!1};K();const v=[];let q=!1;const wt=t=>{q=t},D=new Map,H=[],_=new WeakMap,N=new WeakMap,z=new WeakMap,G=new WeakMap;function A(t,e){let n=(e==null?void 0:e.signalCompareFn)||(()=>!0);function s(){var a,h,p;const i=H[H.length-1];if(i&&!("fake"in i&&i.fake)){const c=new WeakRef(_).deref(),d=new WeakRef(N).deref();c!=null&&c.has(s)||c==null||c.set(s,new Set),(a=c==null?void 0:c.get(s))==null||a.add(i),d!=null&&d.has(i)||d==null||d.set(i,new Set),(h=d==null?void 0:d.get(i))==null||h.add(()=>{var E;(E=c==null?void 0:c.get(s))==null||E.delete(i)}),q&&((p=D.get(i.effectId))==null||p.signals.push(s))}return t}let r="";return Object.defineProperty(s,"signalId",{get:()=>r,set:i=>{r=i}}),s.signalId=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`,s.setName=function(i){return s.signalId=`${i}_${Math.random().toString(36).substring(2,15)}`,s},s.setCompareFn=function(i){return n=i,s},s.clearSubscribers=function(){var i,a;(a=(i=new WeakRef(_).deref())==null?void 0:i.get(s))==null||a.clear()},s.getSubscribers=function(){var i;return(i=new WeakRef(_).deref())==null?void 0:i.get(s)},s.peek=function(){return Object.freeze(t)},s.initValue=Object.freeze(t),s.forceSet=function(i){var h,p;t=i;const a=new WeakRef(G).deref();(p=(h=new WeakRef(_).deref())==null?void 0:h.get(s))==null||p.forEach(c=>{Promise.resolve().then(()=>{var E;const d=(E=a==null?void 0:a.get(c))==null?void 0:E.deref();d&&v.push(d),c(),d&&v.pop()})})},s.set=function(i,a=n){t!==i&&a(t,i)&&s.forceSet(i)},s.update=function(i){s.set(i(t))},s.pipe=(i,a)=>{const h=A(null);return b(()=>{const p=s();b(()=>{const c=i(p);c instanceof Promise?c.then(d=>h.set(d)):w(c)?b(()=>h.set(c())):h.set(c)},a)}),h},s}function b(t,e){var i,a;const n="fake"in t&&t.fake,s=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`;m("current effect",`%c${s}%c`),t.effectId=s,q&&D.set(s,{signals:[],parent:null}),H.push(t);const r=v[v.length-1];if(r&&!n){const h=new WeakRef(z).deref();h!=null&&h.has(r)||h==null||h.set(r,new Set),(i=h==null?void 0:h.get(r))==null||i.add(t),(a=new WeakRef(G).deref())==null||a.set(t,new WeakRef(r))}t(),H.pop()}const w=t=>!!t&&["object","function"].includes(typeof t)&&"set"in t&&"update"in t&&"forceSet"in t;function vt(t,...e){const n=A("");return b(()=>{const s=e.map(i=>w(i)?String(i()):String(i)),r=[t[0]];s.forEach((i,a)=>{r.push(i,t[a+1])}),n.set(r.join(""))}),n}function gt(t,e){const n=A(e??null),s=r=>n.set(r);return t instanceof Promise?t.then(s):typeof t=="function"&&b(()=>{const r=t();r instanceof Promise?r.then(s):w(r)?b(()=>s(r())):s(r)}),n}function At(t,e){let n=t(),s=e();b(()=>{const r=t(),i=e();r!==i&&(r!==n?e.set(r):i!==s&&t.set(i)),n=r,s=i})}function Lt(...t){let e=t.map(s=>s());const n=A(e);return t.forEach((s,r)=>{b(()=>{const i=()=>e.filter(a=>a!==void 0).length;i()===t.length&&(e=Array.from(e).fill(void 0)),e[r]=s(),i()===t.length&&n.set([...e])})}),n}const kt=(...t)=>{const e=A([]);return b(()=>{e.set(t.map(n=>n()))}),e},F="eventProps",B="EVENT_CONFIG",I="observedAttributes",Rt=()=>(t,e)=>{Reflect.get(t,I)||Reflect.defineProperty(t,I,{value:[]}),Reflect.get(t,I).push(T(e))},jt=t=>(e,n)=>{Reflect.get(e,F)||Reflect.defineProperty(e,F,{value:[]}),Reflect.get(e,B)||Reflect.defineProperty(e,B,{value:{}}),Reflect.get(e,B)[n]={bubbles:(t==null?void 0:t.bubbles)??!1,composed:(t==null?void 0:t.composed)??!1},Reflect.get(e,F).push(n)},V=(t,e=!1)=>n=>{m(t,"start register static attr",n.prototype[I]);const s=[];if(n.styles){const i=n.styles,a=[];Array.isArray(i)?a.push(...i):a.push(i),a.forEach(h=>{const p=new CSSStyleSheet;p.replaceSync(h),s.push(p);const c=new CSSStyleSheet;c.replaceSync(h.slice(h.indexOf("@property"))),document.adoptedStyleSheets.push(c)})}class r extends n{constructor(...a){m("constructor",`%c${t}%c`),super(e,...a),R("@osheet",s),s.length>0&&this.shadow.adoptedStyleSheets.push(...s)}render(){return m("rwc: render from new class"),n.prototype.render.call(this)}attributeChangedCallback(a,h,p){m("%cAttribute has changed.%c",`%c${a}%c`,`oldValue: ${h}, newValue: ${p}`,`%c${t}%c`);try{p=JSON.parse(p)}catch{}const c=Y(a);if(c in this&&w(this[c])){const d=this[c];p===null?(d.set(d.initValue),this.removeAttribute(a)):d.set(p)}M(this,n.prototype.attributeChangedCallback,a,h,p)}connectedCallback(){v.push(this);const a=()=>{var p;m("rwc: connectedCallback"),m("connectedCallback",`%c${t}%c`,this),this.providers&&Object.keys(this.providers).length>0&&(m("WRAPPER for providers",t),Object.entries(this.providers).forEach(([c,d])=>{m("register provider",c,d()),this.addEventListener(c,E=>{var f;m("send provider",c,d());const C=E;((f=C.detail)==null?void 0:f.context)===c&&(C.stopPropagation(),C.detail.callback(d))})})),this.checkInjects(),(p=n.prototype[F])==null||p.forEach(c=>{this[c]=d=>{const E=n.prototype[B][c],{bubbles:C,composed:f}=E;w(d)?b(()=>{R("@oemit reactive value",d()),this.dispatchEvent(new CustomEvent(c,{detail:d(),bubbles:C,composed:f}))}):(R("@oemit value",d),this.dispatchEvent(new CustomEvent(c,{detail:d,bubbles:C,composed:f})))}}),m("start render",`%c${t}%c`,t);const h=()=>{m("rwc: insertRenderTemplate");const c=this.render();this.shadow.appendChild(c.hostElement),M(this,n.prototype.connectedCallback),this.appendSlotContent()};if(this.rootStyle&&!n.styles){const c=C=>C instanceof Promise||Array.isArray(C)&&C.every(f=>f instanceof Promise),d=this.rootStyle,E=C=>{const f=new CSSStyleSheet;f.replaceSync(C),this.shadow.adoptedStyleSheets.push(f);const y=new CSSStyleSheet;y.replaceSync(C.slice(C.indexOf("@property"))),document.adoptedStyleSheets.push(y)};if(c(d)){const C=[];Array.isArray(d)?C.push(...d):C.push(d),Promise.all(C).then(f=>f.forEach(y=>E(y.default))).then(()=>h())}else{const C=[];Array.isArray(d)?C.push(...d):C.push(d),C.forEach(f=>E(f)),h()}}else h();this.slotContext&&Object.keys(this.slotContext).length>0&&this.shadow.querySelectorAll("slot").forEach(c=>{m(this.slotContext,this.slotContext&&this.slotContext[c.name]),R("@bslot element",c,`name:${c.name};`,c.assignedElements()),c.assignedElements().forEach(d=>{const E=this.slotContext[c.name];this.slotContext&&w(E)&&(R("@oslot element",c,`name:${c.name};`,c.assignedElements()),b(()=>{d.dispatchEvent(new CustomEvent("handleSlotContext",{detail:E()}))}))})})};a.fake=!0,b(a),v.pop()}disconnectedCallback(){var p;this.shadow.replaceChildren(),this.replaceChildren();const a=new WeakRef(z).deref(),h=new WeakRef(N).deref();(p=a==null?void 0:a.get(this))==null||p.forEach(c=>{var d;(d=h==null?void 0:h.get(c))==null||d.forEach(E=>E())}),M(this,n.prototype.disconnectedCallback)}}return u(r,"observedAttributes",n.prototype[I]??[]),u(r,"renderTagName",t),r.toString=()=>t,customElements.get(t)?console.error(`название тега ${t} повторяется, компонент ${n.name} не зарегистрирован`):customElements.define(t,r),n.renderTagName=t,n};class g extends HTMLElement{constructor(n=!1){super();u(this,"isSlotLazyLoading",!1);u(this,"slotTemplate");u(this,"slotContext");u(this,"rootStyle");u(this,"modelValue");u(this,"providers");u(this,"appendAllSlotContent");u(this,"allSlotContent",[]);u(this,"slotContent",{});u(this,"htmlSlotContent",{});u(this,"shadow");u(this,"injects",{});this.shadow=this.attachShadow({mode:n?"closed":"open"})}appendChild(n,s=!0){var r;if(this.isSlotLazyLoading&&s){if(n instanceof HTMLElement){const i=n.slot||"default";this.htmlSlotContent[i]||(this.htmlSlotContent[i]=[]),(r=this.htmlSlotContent[i])==null||r.push(n)}}else return super.appendChild(n)}appendSlotContent(){var n;(n=this.appendAllSlotContent)==null||n.call(this)}inject(n){return m("%cinject%c",n),this.injects[n]||(this.injects[n]=A(null)),this.injects[n]}checkInjects(){Object.entries(this.injects).forEach(([n,s])=>{m("%cinject%c",`%c${n}%c`,"from BaseElement (dispatch event)"),this.shadow.dispatchEvent(new CustomEvent(n,{detail:{context:n,callback:r=>b(()=>{s.set(r())})},bubbles:!0,composed:!0}))})}setReactiveValue(n){this.modelValue=n}}u(g,"observedAttributes",[]),u(g,"renderTagName",""),u(g,"styles");const Ot=t=>"render"in t&&"setReactiveValue"in t,Tt="handleSlotContext",x="onConnected",tt=t=>typeof t=="string"?t:JSON.stringify(t),It=t=>{const e=document.createElement("span");return e.textContent=tt(t),e},et=(t,e)=>(t.appendChild(It(e)),t),Wt=(t,e)=>(t.replaceChildren(),et(t,e)),nt=t=>{const e=document.createElement("span");return b(()=>{const n=t();e.textContent=tt(n)}),e};class st{constructor(e){u(this,"wrapper");u(this,"hostElement");u(this,"append",(...e)=>(e.forEach(n=>{this.wrapper.appendChild(n.hostElement),x in n.hostElement&&setTimeout(()=>{var s,r;(r=(s=n.hostElement).onConnected)==null||r.call(s,n,n.hostElement)})}),this));u(this,"set",(...e)=>{this.clear();const n=document.createDocumentFragment();return e.forEach(s=>{n.appendChild(s.hostElement)}),this.wrapper.appendChild(n),this});u(this,"removeChild",(...e)=>(e.forEach(n=>{Array.from(this.wrapper.childNodes.values()).some(s=>s===n.hostElement)&&this.wrapper.removeChild(n.hostElement)}),this));u(this,"addHtmlContent",e=>(et(this.wrapper,e),this));u(this,"setHtmlContent",e=>(Wt(this.wrapper,e),this));u(this,"setAttribute",(e,n)=>{let s;if(typeof n=="boolean"&&!(this.wrapper instanceof g))if(n)s="";else{this.removeAttribute(e);const r=e.toLowerCase();return r in this.wrapper&&(this.wrapper[r]=null),this}else typeof n!="string"?s=JSON.stringify(n):s=n;if(this.wrapper.setAttribute(T(e),s),!(this.wrapper instanceof g)){const r=e.toLowerCase();r in this.wrapper&&(this.wrapper[r]=n)}return this});u(this,"setCustomAttribute",(e,n)=>{let s;return typeof n!="string"?s=JSON.stringify(n):s=n,this.wrapper.setAttribute(T(e),s),this});u(this,"setReactiveAttribute",(e,n)=>{const s=this.wrapper instanceof g;return s&&v.push(this.wrapper),b(()=>this.setAttribute(e,n())),s&&v.pop(),this});u(this,"setReactiveCustomAttribute",(e,n)=>(b(()=>this.setCustomAttribute(e,n())),this));u(this,"removeAttribute",e=>(this.wrapper.removeAttribute(T(e)),this));u(this,"addStyle",e=>(Object.entries(e).forEach(([n,s])=>{const r=n.startsWith("--");typeof s=="function"?this.addEffect(()=>{if(r){const i=String(s()||"");this.wrapper.style.setProperty(n,i)}else this.wrapper.style[n]=s()}):typeof s=="string"&&(r?this.wrapper.style.setProperty(n,s):this.wrapper.style[n]=s)}),this));u(this,"onConnected",e=>(Reflect.defineProperty(this.wrapper,x,{get(){return e}}),this));u(this,"addClass",(...e)=>(e.forEach(n=>{typeof n=="string"?this.wrapper.classList.add(...n.split(" ").flatMap(s=>s.split(`
2
- `)).map(s=>s.trim()).filter(Boolean)):(()=>{let s=null;this.addEffect(()=>{const r=n();r.length>0&&(s?this.replaceClass(s,r):this.addClass(r),s=r)})})()}),this));u(this,"setClass",(...e)=>(this.wrapper.classList.remove(...this.wrapper.classList),this.wrapper.classList.add(...e),this));u(this,"addReactiveClass",e=>(Object.keys(e).forEach(n=>{b(()=>{e[n]()?this.addClass(n):this.removeClass(n)})}),this));u(this,"removeClass",(...e)=>(this.wrapper.classList.remove(...e),this));u(this,"replaceClass",(e,n)=>(this.wrapper.classList.replace(e,n),this));u(this,"addEffect",e=>{const n=this.wrapper instanceof g;return n&&v.push(this.wrapper),b(()=>e(this,this.hostElement)),n&&v.pop(),this});u(this,"addReactiveContent",e=>(this.wrapper.appendChild(nt(e)),this));u(this,"setReactiveContent",e=>(this.clear(),this.wrapper.appendChild(nt(e)),this));u(this,"clear",()=>(this.wrapper.replaceChildren(),this));this.wrapper=e,this.hostElement=e}addEventlistener(e,n,s=!1){return this.wrapper.addEventListener(e,r=>n(r,this,this.wrapper),s),this}}class $t extends st{constructor(){super(...arguments);u(this,"setReactiveValue",n=>(this.wrapper instanceof g&&this.wrapper.setReactiveValue(n),this));u(this,"setSlotTemplate",n=>{const s=this.wrapper.slotTemplate;return s&&Object.entries(n).forEach(([r,i])=>{s[r]=i}),this})}}const Mt=()=>()=>{},ot=t=>new $t(t),rt=t=>new st(t),it=(t,...e)=>({classList:[...t.map(n=>n.trim()).filter(Boolean),...e]}),Pt=(t,...e)=>it(t,...e),U=(t,e)=>{if(!e)return t;const n=Object.keys(e||{}).filter(s=>s.startsWith(".")||s.startsWith("@")||s.startsWith("$"));return n.filter(s=>s.startsWith(".")).forEach(s=>{e!=null&&e.attributes||(e.attributes={}),e.attributes[s.slice(1)]=e[s]}),n.filter(s=>s.startsWith("@")).forEach(s=>{e!=null&&e.listeners||(e.listeners={});const r=s.slice(1);e.listeners[r]=e[s]}),n.filter(s=>s.startsWith("$")).forEach(s=>{e!=null&&e.effects||(e.effects=[]),e.effects.push(e[s])}),ht(t,e.classList),ut(t,e.style),ft(t,e.attributes),dt(t,e.reactiveClassList),ct(t,e.customAttributes),lt(t,e.children),at(t,e.effects),X(t,e.listeners),X(t,e.customListeners),t},X=(t,e)=>{e&&Object.entries(e).forEach(([n,s])=>{typeof s=="function"&&t.addEventlistener(n,s)})},at=(t,e)=>e==null?void 0:e.forEach(n=>t.addEffect(n)),lt=(t,e)=>W(t,...e||[]),ct=(t,e)=>{const n=e;n&&Object.keys(n).forEach(s=>{w(n[s])?t.setReactiveCustomAttribute(s,n[s]):typeof n[s]=="function"?t.addEffect(()=>{t.setCustomAttribute(s,n[s]())}):t.setCustomAttribute(s,n[s])})},ht=(t,e)=>t.addClass(...e||[]),dt=(t,e)=>t.addReactiveClass(e||{}),ut=(t,e)=>t.addStyle(e||{}),ft=(t,e)=>{const n=e,s=(r,i)=>{i&&(w(i)?t.setReactiveAttribute(r,i):typeof i=="function"?t.addEffect(()=>{t.setAttribute(r,i())}):t.setAttribute(r,i))};n&&Object.keys(n).forEach(r=>{s(r,n[r])})},W=(t,...e)=>(e.forEach(n=>{typeof n=="string"?n.trim().length>0&&t.addHtmlContent(n):w(n)?t.addReactiveContent(n):t.append(n)}),t),O=(t,e)=>{const n=document.createElement(t),s=rt(n);return U(s,e)},J=(t,e)=>{const[n,...s]=t.split(" ").map(i=>i.trim()),r=O(n,e);return s.length>0&&r.addClass(...s),(...i)=>W(r,...i.filter(Boolean).flat().flatMap(a=>typeof a=="function"&&!w(a)?L(()=>a(r)):a))},L=t=>O("div").addStyle({display:"contents"}).addEffect(e=>{e.clear(),W(e,...[t()].flat())}),Ht=(t,e,n)=>{const s=O("div").addStyle({display:"contents"}),r=new Map,i=new Map;let a=[];const h=new Set;let p=t.peek();const c=d=>{h.delete(d),r.delete(d),i.delete(d)};return b(()=>{const d=t();a=d.map(e).map(f=>typeof f=="string"?f:f.toString());const E=Array.from(s.hostElement.children);m("containerChildren",E,a),E.forEach(f=>{const y=f.dataset.key;a.includes(y)||(m("remove element",y,f),f.remove(),c(y))}),a.forEach(f=>{var $,j;const y=d[a.indexOf(f)];r.has(f)?JSON.stringify(y)!==JSON.stringify(p[a.indexOf(f)])&&(($=s.hostElement.querySelector(`[data-key="${f}"]`))==null||$.remove(),(j=r.get(f))==null||j.set(Math.random().toString(36).substring(2,15)),i.set(f,()=>n(y,a.indexOf(f),d).setCustomAttribute("data-key",f))):(m("create new element",f,y),r.set(f,A(Math.random().toString(36).substring(2,15))),i.set(f,()=>n(y,a.indexOf(f),d).setCustomAttribute("data-key",f)))}),p=[...d.map(f=>({...f}))];const C=()=>{r.forEach((f,y)=>{m("key from setTimeout foreach currItemSignalMap",y),h.has(y)||(h.add(y),b(()=>{var yt;f();const $=a.indexOf(y),j=(yt=i.get(y))==null?void 0:yt();j&&(m("call effect from setTimeout",y,j.hostElement),$<=s.hostElement.children.length-1?s.hostElement.insertBefore(j.hostElement,s.hostElement.children[$]):s.hostElement.append(j.hostElement))}))})};Promise.resolve().then(()=>C())}),s},_t=t=>{let e=[O("div")],n=!1;return b(()=>{var i,a;const s=t();n=Array.isArray(s);const r=[];r.push(...[s].flat()),r.length===0&&r.push(O("div").addStyle({display:"none"}).setAttribute("id","empty_template"));try{m("newReactiveComponent.map",r.map(h=>{var p;return m("newReactiveComponent hostElement",h.hostElement),(p=h.hostElement)==null?void 0:p.id})),m("currComponent[0].hostElement?.id",(i=e[0].hostElement)==null?void 0:i.id,e),(a=e[0].hostElement)==null||a.replaceWith(...r.map(h=>h.hostElement)),e.slice(1).forEach(h=>{var p;return(p=h.hostElement)==null?void 0:p.remove()}),e=r}catch(h){console.error(h)}}),n?e:e[0]},Ft=t=>Tt in t,Bt=t=>{const e=J("div")().addStyle({display:"contents"}),n=s=>(e.hostElement.innerHTML=s,e);return typeof t=="string"?n(t):e.addEffect(()=>{n(t())}),e},Z=(t,e,n)=>t?L(e):n?L(n):J("div")().setAttribute("id","empty_div_renderIf").addStyle({display:"none"}),pt=(t,e,n)=>L(()=>Z(!!t(),e,n)),Jt=(t,e,n)=>typeof t=="boolean"?Z(t,e,n):pt(t,e,n),Q=(t,e)=>{const n=L(e);return typeof t=="boolean"?[n].flat().forEach(s=>s.hostElement.style.display=t?"block":"none"):b(()=>{const s=t()?"block":"none";[n].flat().forEach(r=>r.hostElement.style.display=s)}),n},qt=(t,e,n)=>{const s=[Q(t,e)].flat();return n&&s.push(...[Q(()=>typeof t=="boolean"?!t:!t(),n)].flat()),L(()=>s)},mt=(t,e)=>{m("createCustomElement",t);const n=document.createElement(t),s=ot(n);return U(s,e)},Ct=(t,e)=>{const n=t.split(" ").slice(1).map(r=>r.trim()),s=mt(t.split(" ")[0],e);return Array.isArray(n)&&n.length>0&&s.addClass(...n),(...r)=>{R("@rcreateCustomEl content",t,r);const i=r.filter(Boolean).flat().flatMap(a=>typeof a=="function"&&!w(a)?L(()=>a(s)):a);return s.hostElement.allSlotContent=i,s.hostElement.slotContent=i.filter(k).reduce((a,h)=>{const p=h.hostElement.getAttribute("slot")||"default";return a[p]||(a[p]=[]),a[p].push(h),a},{}),s.hostElement.appendAllSlotContent=()=>W(s,...i),s}},bt=(t,e,n)=>Ct(`${t.renderTagName}${e&&typeof e=="string"?" "+e:""}`,S(e)?e:e&&typeof e=="string"?n:void 0),Dt=()=>{const t=()=>{};return t.oldValue=null,t},Nt=()=>({}),Et=(t,e,n)=>{const s=e?V(e,n)(t):t;return(r,...i)=>{const a=[...i];return r&&!S(r)&&a.unshift(r),bt(s,S(r)?r:{})(...a)}},zt=t=>[Et(t),(e,n)=>{V(e,n)(t)}],l={};["div","span","section","input","button","table","tr","td","th","ul","li","ol","form","label","select","option","textarea","img","a","p","h1","h2","h3","h4","h5","h6","br","hr","pre","code","nav","header","footer","main","aside","article","figure","figcaption","blockquote","cite","small","strong","em","b","i","u","s","sub","sup","mark","del","ins","details","summary","progress","meter","audio","video","canvas","slot"].forEach(t=>{l[t]=(e,...n)=>{let s=[...n];return e&&!S(e)&&(s=[e].concat(s)),J(t,S(e)?e:{})(...s)}});const Gt=l.div,Vt=l.span,Ut=l.section,Xt=l.input,Zt=l.button,Qt=l.table,Yt=l.tr,Kt=l.td,xt=l.th,te=l.ul,ee=l.li,ne=l.ol,se=l.form,oe=l.label,re=l.select,ie=l.option,ae=l.textarea,le=l.img,ce=l.a,he=l.p,de=l.h1,ue=l.h2,fe=l.h3,pe=l.h4,me=l.h5,Ce=l.h6,be=l.br,Ee=l.hr,ye=l.pre,Se=l.code,we=l.nav,ve=l.header,ge=l.footer,Ae=l.main,Le=l.aside,ke=l.article,Re=l.figure,je=l.figcaption,Oe=l.blockquote,Te=l.cite,Ie=l.small,We=l.strong,$e=l.em,Me=l.b,Pe=l.i,He=l.u,_e=l.s,Fe=l.sub,Be=l.sup,Je=l.mark,qe=l.del,De=l.ins,Ne=l.details,ze=l.summary,Ge=l.progress,Ve=l.meter,Ue=l.audio,Xe=l.video,Ze=l.canvas,Qe=l.slot,Ye=t=>e=>t(e).addClass(...e.classList??[]).addReactiveClass(e.reactiveClassList??{});o.BaseElement=g,o.a=ce,o.addAttributeList=ft,o.addClassList=ht,o.addCustomAttributes=ct,o.addReactiveClassList=dt,o.addStyleList=ut,o.appendContentItem=W,o.article=ke,o.aside=Le,o.audio=Ue,o.b=Me,o.bindReactiveSignals=At,o.blockquote=Oe,o.br=be,o.button=Zt,o.camelToKebab=T,o.canvas=Ze,o.checkCall=M,o.cite=Te,o.classList=it,o.cls=Pt,o.code=Se,o.colorLog=R,o.combineLatest=kt,o.component=V,o.componentEffectMap=z,o.configCustomComponent=zt,o.createComponent=Ye,o.createCustom=bt,o.createCustomEl=Ct,o.createCustomElement=mt,o.createEl=J,o.createElement=O,o.createSignal=gt,o.customElementHelpers=ot,o.defineSlotTemplate=Nt,o.del=qe,o.details=Ne,o.disableLogs=K,o.div=Gt,o.effect=b,o.effectCleanup=N,o.effectComponentMap=G,o.effectMap=D,o.elementHelpers=rt,o.em=$e,o.enableLogs=St,o.event=jt,o.eventEmitter=Mt,o.figcaption=je,o.figure=Re,o.footer=ge,o.forkJoin=Lt,o.form=se,o.getList=Ht,o.getSignalContent=L,o.h1=de,o.h2=ue,o.h3=fe,o.h4=pe,o.h5=me,o.h6=Ce,o.header=ve,o.hr=Ee,o.i=Pe,o.img=le,o.initComponent=U,o.input=Xt,o.ins=De,o.isBaseElement=Ot,o.isComponentConfig=k,o.isComponentInitConfig=S,o.isReactiveSignal=w,o.isSlotTemplate=Ft,o.kebabToCamel=Y,o.label=oe,o.li=ee,o.main=Ae,o.mark=Je,o.meter=Ve,o.nav=we,o.newEventEmitter=Dt,o.ol=ne,o.option=ie,o.p=he,o.pre=ye,o.progress=Ge,o.projectLog=m,o.property=Rt,o.renderIf=Z,o.rs=vt,o.rxRenderIf=pt,o.s=_e,o.section=Ut,o.select=re,o.setChildren=lt,o.setEffectDebugEnabled=wt,o.setEffects=at,o.setListeners=X,o.show=qt,o.showIf=Q,o.signal=A,o.signalComponent=_t,o.slot=Qe,o.small=Ie,o.span=Vt,o.strong=We,o.sub=Fe,o.summary=ze,o.sup=Be,o.table=Qt,o.td=Kt,o.textarea=ae,o.th=xt,o.tr=Yt,o.u=He,o.ul=te,o.unsafeHtml=Bt,o.useCustomComponent=Et,o.video=Xe,o.when=Jt,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});