taggedjs 2.8.43 → 2.8.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/bundle.js +1 -1
  2. package/bundle.js.map +1 -1
  3. package/js/interpolations/attributes/howToSetInputValue.function.d.ts +1 -0
  4. package/js/interpolations/attributes/howToSetInputValue.function.js +3 -0
  5. package/js/interpolations/attributes/howToSetInputValue.function.js.map +1 -1
  6. package/js/interpolations/optimizers/domProcessContextItem.function.js.map +1 -1
  7. package/js/render/attributes/createDynamicAttribute.function.d.ts +2 -2
  8. package/js/render/attributes/createDynamicAttribute.function.js +6 -2
  9. package/js/render/attributes/createDynamicAttribute.function.js.map +1 -1
  10. package/js/render/attributes/processAttribute.function.d.ts +2 -2
  11. package/js/render/attributes/processAttribute.function.js +13 -10
  12. package/js/render/attributes/processAttribute.function.js.map +1 -1
  13. package/js/render/attributes/processUpdateAttrContext.function.js.map +1 -1
  14. package/js/render/buildBeforeElement.function.d.ts +1 -1
  15. package/js/render/buildBeforeElement.function.js +2 -0
  16. package/js/render/buildBeforeElement.function.js.map +1 -1
  17. package/js/render/dom/attachDomElements.function.d.ts +2 -2
  18. package/js/render/dom/attachDomElements.function.js +10 -10
  19. package/js/render/dom/attachDomElements.function.js.map +1 -1
  20. package/js/render/paint.function.js +2 -1
  21. package/js/render/paint.function.js.map +1 -1
  22. package/js/render/renderTagOnly.function.js.map +1 -1
  23. package/js/render/softDestroySupport.function.js.map +1 -1
  24. package/js/state/signal.function.js.map +1 -1
  25. package/js/state/state.utils.js.map +1 -1
  26. package/js/tag/AdvancedContextItem.type.d.ts +1 -2
  27. package/js/tag/ContextItem.type.d.ts +2 -0
  28. package/js/tag/processUpdateContext.function.js +3 -2
  29. package/js/tag/processUpdateContext.function.js.map +1 -1
  30. package/js/tag/tagElement.js +2 -0
  31. package/js/tag/tagElement.js.map +1 -1
  32. package/js/tag/update/compareArrayItems.function.js.map +1 -1
  33. package/js/tag/update/createAndProcessContextItem.function.d.ts +2 -1
  34. package/js/tag/update/createAndProcessContextItem.function.js +3 -1
  35. package/js/tag/update/createAndProcessContextItem.function.js.map +1 -1
  36. package/js/tag/update/onFirstSubContext.function.d.ts +2 -1
  37. package/js/tag/update/onFirstSubContext.function.js +1 -1
  38. package/js/tag/update/onFirstSubContext.function.js.map +1 -1
  39. package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
  40. package/js/tag/update/processTagArray.js +2 -2
  41. package/js/tag/update/processTagArray.js.map +1 -1
  42. package/js/tagJsVars/pipe.function.js.map +1 -1
  43. package/js/tagJsVars/subscribe.function.js.map +1 -1
  44. package/package.json +1 -1
package/bundle.js CHANGED
@@ -1,2 +1,2 @@
1
- var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.global={}}t.d(e,{W9:()=>Xe,cg:()=>V,m0:()=>J,rS:()=>Dn,Y2:()=>o,ei:()=>Ye,B7:()=>wt,TU:()=>xt,XF:()=>qe,PC:()=>Ze,Ot:()=>Me,Mj:()=>je,tD:()=>A,j8:()=>bn,Gf:()=>jo,xe:()=>ar,YO:()=>ln,um:()=>mn,E2:()=>Qe,OH:()=>tn,TB:()=>Qt,Ii:()=>fe,m3:()=>xe,yV:()=>gn,zV:()=>bt,pf:()=>$t,ze:()=>Ke,WJ:()=>Tt,Ng:()=>pe,HG:()=>Ko,aZ:()=>te,Ey:()=>Kt,O:()=>oe,F3:()=>hn,Ie:()=>E,ts:()=>we,B4:()=>Bt,Az:()=>H,Xi:()=>or,sV:()=>hr,Ah:()=>n,Gk:()=>Cn,j_:()=>ke,zC:()=>_n,cF:()=>Cr,Hc:()=>yr,jU:()=>U,PB:()=>N,qy:()=>rr,cy:()=>Q,Tn:()=>Y,Gv:()=>q,yL:()=>X,D8:()=>F,Ze:()=>G,_4:()=>Z,mn:()=>z,z:()=>Fe,sA:()=>an,TG:()=>Ce,MG:()=>sn,PL:()=>In,CG:()=>lr,nI:()=>_o,Fs:()=>mr,PZ:()=>ce,r5:()=>ze,uc:()=>oo,pG:()=>Hn,QB:()=>to,Ll:()=>kt,vP:()=>Pe,wk:()=>Ue,xP:()=>$e,bc:()=>_e,B1:()=>fr,RX:()=>Tr,ag:()=>en,Tc:()=>Bn,Hf:()=>ir,zc:()=>zt,_A:()=>kn,Ag:()=>_t,Pc:()=>he,NU:()=>r,wB:()=>Re,id:()=>Le,MC:()=>He,SZ:()=>Ne});class o{get(t){return"todo"}}const r=":tagvar",s=":";function c(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus"}return!1}(t);return!1!==e?e:!!t.startsWith("style.")&&"style"}const u=new RegExp(r+"(\\d+)"+s,"g");function a(t){return t.search&&t.startsWith(r)?t.search(u):-1}const i=/(:tagvar\d+:)/,l="ondoubleclick",p=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,f=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function d(t){const e=[],n=[],o=[];let c=null,u=-1,a=0;const l=new RegExp(f,"g");for(t=function(t){return t.replace(g,(function(t){return t.replace(/\[l t\]/g,"[l&nbsp;t]").replace(/\[g t\]/g,"[g&nbsp;t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const f=l.exec(t);if(!f)break;const[d,g,m]=f,y=d.startsWith("</"),w=d.endsWith("/>");if(a<f.index){const e=t.slice(a,f.index);if(e.trim()){const t=b(e);for(let e of t)e.startsWith(r)&&e.search(i)>=0&&-1===e.search(C)&&(e=r+ ++u+s),h(c,n,e)}}if(a=f.index+d.length,y){c=o.pop()||null;continue}const x=[];let T;for(;null!==(T=p.exec(m));)u=v(T,u,e,x);const k={nn:g};x.length&&(k.at=x),c?(c.ch||(c.ch=[]),c.ch.push(k)):n.push(k),w||(o.push(c),c=k)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=b(e);for(const e of t)e.startsWith(r)&&++u,h(c,n,e)}}return n}const g=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function h(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:m(n)})}function m(t){return t.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g,(function(t){return t.replace(/\[l t\]/g,"<").replace(/\[g t\]/g,">").replace(/\[l&nbsp;t\]/g,"[l t]").replace(/\[g&nbsp;t\]/g,"[g t]")}))}function b(t){return t.split(i).filter(y)}function y(t){return""!==t}function v(t,e,n,o){const a=t[1]||t[3]||t[5];let i=t[2]||t[4]||t[6];if(void 0===a)return e;const p=""!==t[2],f=void 0===i&&p,d=a.toLowerCase(),g=d.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===l.length&&t===l?"dblclick":t.slice(2,t.length);return t}(d):d;if(f){if(a.slice(0,r.length)===r){const t=r+ ++e+s;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(a)&&t[0].slice(a.length,t[0].length).search(/\s+$/)>=0)return o.push([g]),e;const c=t[3];if(c.search(C)>=0){i=c;const t=[g,i];return o.push(t),e}i=r+ ++e+s}p||(i=t[2]);const h=i.split(x).filter((t=>t.length>0));h.length>1&&(i=h,h.forEach((t=>{t.search(u)>=0&&++e})));const m=[g,i],b=c(d);return b&&m.push(b),"style"===g?(o.unshift(m),e):(o.push(m),e)}const w=new RegExp(r+"(\\d+)"+s,"gi"),x=new RegExp("("+r+"\\d+"+s+")","gi"),T=r.slice(0,r.length-1),C=new RegExp(T+"&#x72;(\\d+)"+s,"gi"),k=T+"&#x72;$1"+s;function S(t,e){const n=function(t,e){const n=t;return function(t,e){const n=[];for(let o=0;o<t.length;++o){const c=t[o].replace(w,k);o<e.length?n.push(c+r+o+s):n.push(c)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(r+(e.length+n-1)+s)}(n,t,e),n}(n,e)}(t,e).join("");return d(n)}const E="";var J,V;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(J||(J={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(V||(V={}));const A={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()},O="ch";function P(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],c=r[t];if(c.at){const t=c.at;c.at=M(t,e)}if(c.ch){const t=c.ch,o=[...s,O];c.ch=P(t,e,n,o)}t=I(c,e,r,t)}return r}function I(t,e,n,o){if("text"!==t.nn)return o;const c=t;let a,i=c.tc;if(typeof i!==J.string)return o;for(;null!==(a=u.exec(i));){const t=a[1],c=parseInt(t,10);if(!isNaN(c)&&c<e){const t=r+c+s,e=i.slice(a.index+t.length);n.splice(o,1,{nn:"text",v:c}),i=e,u.lastIndex=0}}return c.tc=i,o}function M(t,e){const n=[];for(const o of t){const[t,s,c]=o;if(t.startsWith(r)){const o=parseInt(t.replace(r,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof s===J.string&&s.startsWith(r)){const o=parseInt(s.replace(r,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},c]);continue}}n.push(o)}return n}function j(t){return t.length}const L={};function H(t,e){const n=function(t){const e=t.map(j);return e.push(t.length),Number(e.join(""))}(t),o=L[n],r=o&&function(t,e,n){if(n&&n.strings.length===t.length&&n.strings.every(((e,n)=>e===t[n]))&&n.values.length===e.length)return!0;return!1}(t,e,o);if(r)return o.domMetaMap;const s=P(S(t,e),e.length),c={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return L[n]=c,s}function N(t,e,n){Uo.push([U,[t,e,n]])}function U(t,e,n){void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function R(t,e,n,o){switch(o){case"autofocus":return void Uo.push([$,[n]]);case"autoselect":return void Uo.push([_,[n]]);case"style":{const o=t.split(".");return void Uo.push([W,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)Uo.push([D,[n,t]]);return}for(const t of o)Uo.push([B,[n,t]])}(t,e,n)}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function W(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function D(t,e){t.classList.add(e)}function B(t,e){t.classList.remove(e)}function _(t){t.select()}function $(t){t.focus()}function F(t){switch(t){case J.string:case J.number:case J.boolean:return!0}return!1}function G(t){if(!t)return!1;switch(t.tagJsType){case A.dom:case A.tag:case A.templater:return!0}return!1}function z(t){const e=t?.tagJsType;return e===A.tagComponent||e===A.stateRender}function Z(t){return q(t)&&typeof t.subscribe===V.function}function X(t){return t&&Y(t.then)}function Y(t){return typeof t===V.function}function q(t){return typeof t===V.object&&null!==t}function Q(t){return Array.isArray(t)}function K(t,e){const n=function(t,e,n=[]){const o=t.context;n.push({support:t,renderCount:o.renderCount,provider:e});const r=e.children;for(let t=r.length-1;t>=0;--t){const o=r[t],s=o.context;n.push({support:o,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function tt(t){return t.support}function et(t,e){return nt(t,e)}function nt(t,e){if(null===t||typeof t!==V.object)return t;if(e<0)return t;if(t instanceof Date)return new Date(t);if(t instanceof RegExp)return new RegExp(t);const n=Q(t)?[]:Object.create(Object.getPrototypeOf(t));if(Q(t))for(let o=0;o<t.length;o++)n[o]=nt(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=nt(t[o],e-1));return n}function ot(t,e,n){return rt(t,e,n)}function rt(t,e,n){return!(t!==e&&(o=t,r=e,!Y(o)||!Y(r)||o.toString()!==r.toString()))||(n<0||typeof t===V.object&&typeof e===V.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():Q(t)&&Q(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!rt(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!Q(t)&&!Q(e)&&function(t,e,n){const o=Object.keys(t),r=Object.keys(e);if(0===o.length&&0===r.length)return!0;if(o.length!==r.length)return!1;for(const s of o){if(!r.includes(s)||!rt(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function st(){return kt.stateConfig.support}function ct(t){return kt.stateConfig.support=t}function ut(t){let e=t;for(;e.ownerSupport&&!z(e.templater);)e=e.ownerSupport;return e.context.global.newest||e}function at(...t){return t}function it(t){const e=kt.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(at)}function lt(t){const e=kt.stateConfig,n=e.statesIndex,o=ut(e.prevSupport).states[n];let r=[];o((function(...t){return r=t,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function pt(t){const e=kt.stateConfig;e.handlers.handler=mt,e.handlers.statesHandler=it,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,ct(t)}function ft(t,e,n){const o=kt.stateConfig;o.rearray=n,o.stateArray=[],o.states=[],o.statesIndex=0,o.handlers.handler=ht,o.handlers.statesHandler=lt,o.prevSupport=e,ct(t)}class dt{}function gt(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(dt),[n]=t(e);return[e,n]}(e);return n}function ht(){const t=kt.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function mt(t){const e=kt.stateConfig;let n=t;if(typeof t===V.function&&(n=t()),typeof n===V.function){const t=n;n=function(...e){return t(...e)},n.original=t}const o={get:function(){return gt(o)},defaultValue:n};return e.stateArray.push(o),n}function bt(t){const e=new wt;return e.subscribeWith=e=>{const n=[],o=[],r=(r,s)=>{n[s]=!0,o[s]=r;if(n.length===t.length){for(const t of n)if(!t)return;e(o,c)}},s=[...t],c=s.shift().subscribe((t=>r(t,0))),u=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return c.subscriptions=u,c},e}function yt(t,e,n){const o=wt.globalSubCount$;wt.globalSubCount$.next(o.value+1);const r=function(){r.unsubscribe()};return r.callback=e,r.subscriptions=[],r.unsubscribe=function(){return function(t,e,n){!function(t,e){const n=t.findIndex((t=>t.callback===e));-1!==n&&t.splice(n,1)}(e,n);const o=wt.globalSubCount$;wt.globalSubCount$.next(o.value-1),t.unsubscribe=()=>t;const r=t.subscriptions;for(const t of r)t.unsubscribe();return t}(r,n,e)},r.add=t=>(r.subscriptions.push(t),r),r.next=t=>{e(t,r)},r}function vt(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return vt(t,o,n);n(t)};let c=s;const u=r(t,{setHandler:t=>c=t,next:s});c(u)}class wt{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=yt(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{vt(t,this.methods,(t=>n(t,e)))}}return n(t)}return this.subscribers.push(e),this.onSubscription&&this.onSubscription(e),e}next(t){this.value=t,this.emit()}set=this.next.bind(this);emit(){const t=this.value,e=this.subscribers;for(const n of e)n.callback(t,n)}toPromise(){return new Promise((t=>{this.subscribe(((e,n)=>{n.unsubscribe(),t(e)}))}))}toCallback(t){const e=this.subscribe(((n,o)=>{const r=o?.unsubscribe;r?r():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new wt(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return bt(t.map((t=>{if(Z(t))return t;return new wt(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new wt(0)}class xt extends wt{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,Tt(this)}next(t){this._value=t,this.emit()}emit(){const t=this._value,e=this.subscribers;for(const n of e)n.callback(t,n)}}function Tt(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const Ct=new wt(void 0,(function(t){st()||t.next()})),kt={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:mt,statesHandler:it}},tagClosed$:Ct};function St(t,e){return Et(t.states,e.states)}function Et(t,e){for(let n=0;n<t.length;++n){Ot(t[n],e[n])}}let Jt;function Vt(...t){return Jt=t,t}function At(){return Jt}function Ot(t,e){t(Vt,1),e(At,2)}function Pt(t,e,n,o){for(let n=t.length-1;n>=0;--n){const o=t[n].get(),r=e[n].callback;r&&r(o)}for(let t=o.length-1;t>=0;--t){Mt.length=0,It=0;(0,o[t])(jt),n[t](Lt)}}let It=0;const Mt=[];function jt(...t){return Mt.push(t),t}function Lt(...t){return Mt[It++]}function Ht(t,e,n,o,r){const s=t[e],c=n[e];if(s===c.value)return;c.tagJsVar.processUpdate(s,o,c,r,t),c.value=s}function Nt(t,e){const n=t.context.global.contexts;!function(t,e){const n=e.templater,o=e.templater.tag,r=n.values||o.values,s=t.templater.tag;s.values=r}(t,e),++Do.locks,function(t,e){const n=t.templater.tag.values;let o=0;const r=n.length,s={added:0,removed:0};for(;o<r;)Ht(n,o,e,t,s),++o}(t,n),--Do.locks,_o()}function Ut(t){return t.map(Rt)}function Rt(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case A.signal:case A.subscribe:case A.stateRender:return;case A.dom:case A.tag:case A.templater:return Ut(n.values)}return Q(t)?Ut(n):et(t,e)}function Wt(t){return Rt(t,zn)}function Dt(t){return Rt(t,Zn)}function Bt(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0},r=e.global;return r.blocked=[],r.destroy$=new wt,o}function _t(t,e,n,o){e.appSupport=n;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==A.stateRender){switch(o.propWatch){case Dn.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case Dn.SHALLOW:return t.propsConfig={latest:e.map(Wt),castProps:n}}return t.propsConfig={latest:e.map(Dt),castProps:n}}}(e,r,o)),e}function $t(t,e,n,o,r){const s={templater:t,context:o,castedProps:r,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function Ft(t,e,n,o,r){const s=Bt(t,o,r);return s.ownerSupport=e,_t(t,s,n,r)}function Gt(t,e,o,r){const s=z(e);if(t.tagJsVar=e,s)return void 0===t.global&&n(t),function(t,e,o,r){const s=e.global;if(!s.newest)return void t.processInit(t,e,o,r,void 0,e.placeholder);const c=Ft(t,o,o.appSupport,e);!function(t,e,o){const r=o.global,s=r.newest,c=s.templater.wrapper;let u=e.templater.wrapper,a=!1;const i=e.templater.tagJsType,l=A.stateRender===i||A.renderOnce===i;if(l)a=e.templater.tagJsType===A.renderOnce||fn(s,e);else if(c&&u){const t=s.templater.tag?._innerHTML;t&&(u=e.outerHTML);a=c.original===u.original}const p=e.templater;if(!a)return void function(t,e,o){const r=t.global,s=r.oldest;oe(s,r),n(t),e.processInit(e,t,o,{added:0,removed:0},void 0,t.placeholder)}(o,p,t);const f=l||function(t,e){const n=e.props,o=t.propsConfig,r=o.latest,s=_n(n,r,t.templater.propWatch);return s}(s,p);if(!f){return void function(t,e,n,o,r){const s=t.props,c=qn(e,n,o,s,r),u=e.propsConfig;u.castProps=c;const a=n.propsConfig;a.latest=u.latest}(p,e,s,t,p.propWatch===Dn.DEEP?Zn:zn)}if(o.locked)return void r.blocked.push(e);oo(e),++o.renderCount}(o,c,e)}(e,t,o,r),!0;const c=t.global;if(c){const n=c.newest;if(n)return typeof e===V.function||function(t,e,n,o){let r=n.templater||n;const s=t.templater.tag;s&&s._innerHTML&&(r=n.outerHTML||n._innerHTML.outerHTML);const c=Ft(r,o,o.appSupport,e);Nt(t.context.global.oldest,c)}(n,t,e,o),!0}return e.processInit(e,t,o,r,void 0,t.placeholder),!0}function zt(t,e,n,o){t!==n.value&&we(n,t,e,o)}function Zt(t,e){const n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].context.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.context.renderCount=0}function Xt(t,e){for(const n of t){const t=n.lastArray;if(t){Xt(t,e);continue}const o=n.value;if(o?.tagJsType===A.subscribe){o.delete(n,e);continue}const r=n.global;if(!r)continue;const s=r.newest,c=r.subscriptions;c&&c.forEach(qt),z(s.templater)&&Zt(s,r);Xt(r.contexts,s)}}function Yt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=t.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=t.contexts;s&&Yt(s,e,n)}return{tags:e,subs:n}}function qt(t){t.unsubscribe()}function Qt(t,e){return!Q(t)&&(Kt(e),9)}function Kt(t){te(t,t.lastArray)}function te(t,e){for(let t=0;t<e.length;++t)se(e[t]);delete t.lastArray}function ee(t,e){!function(t,e){for(const n of t){if(n.locked)continue;if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const e=n.supportOwner;t.delete(n,e)}continue}const t=n.lastArray;if(t){te(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,$o(o);continue}const r=n.global;if(void 0===r)continue;if(!0===r.deleted)continue;r.deleted=!0;r.oldest&&ee(r,e)}}(t.contexts,e),function(t){const e=t.htmlDomMeta;for(let t=e.length-1;t>=0;--t){ne(e[t]),e.splice(t,1)}}(t)}function ne(t){const e=t.marker;e&&$o(e);const n=t.domElement;n&&$o(n)}function oe(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return Xt(e.contexts,t),e.destroy$&&Zt(t,e),ee(e,o),o}function re(t,e,n,o){const r=t.length-1,s=e-o,c=s<0||r<s,u=n[e];if(c)return se(u),1;const a=function(t,e,n,o,r){const s=e&&t!==e.arrayValue;if(s)return se(n),o.splice(r,1),2;return 0}(u.value.arrayValue,t[e],u,n,e);return a}function se(t){!function(t,e){if(t){return void oe(t.oldest,t)}const n=e.simpleValueElm;delete e.simpleValueElm,$o(n)}(t.global,t)}function ce(t,e,n,o,r,s){return e.tagJsVar.processInit(t,e,n,o,r,s)}function ue(t,e,n,o,r,s){const c=e.context;c.locked=!0,ce(t,n,e,o,r,s),delete c.locked,n.value=t}function ae(t){switch(t){case void 0:case!1:case null:return E}return t}function ie(t){return{tagJsType:"simple",value:t,processInit:le,delete:pe,checkValueChange:fe,processUpdate:zt}}function le(t,e,n,o,r,s){const c=ae(t);s=e.placeholder;const u=e.paint=[Yo,[s,c,function(t){e.simpleValueElm=t,delete e.paint}]];Ho.push(u)}function pe(t){const e=t.simpleValueElm;delete t.simpleValueElm,$o(e)}function fe(t,e){return null!=t&&typeof t===V.object?(pe(e),6):(function(t,e){const n=ae(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;Uo.push([Bo,[n,o]])}(t,e),-1)}function de(t){return{tagJsType:"array",value:t,processInit:ge,processUpdate:zt,checkValueChange:Qt,delete:Kt}}function ge(t,e,n,o,r){be(e,t,n,o,r)}function he(t){const e=t?.tagJsType;return e?t:function(t){if(Q(t))return de(t);return ie(t)}(t)}function me(t,e,n,o,r){const s=document.createTextNode(E),c={value:t,tagJsVar:he(t),withinOwnerElement:!1,placeholder:s};return r||Ho.push([Go,[o,s]]),ue(t,e,c,n,r,o),r&&Ro.push([zo,[r,s]]),c}function be(t,e,n,o,r){const s=void 0===t.lastArray;s&&(t.lastArray=[]);const c=t.lastArray;let u=t.placeholder,a=0;const i=[];if(!s){for(let t=0;t<c.length;++t){const n=c[t],o=re(e,t,c,a);0!==o?2!==o?a+=o:t-=1:i.push(n)}t.lastArray=i}const l=e.length;for(let s=0;s<l;++s){u=ye(e,s,t.lastArray,n,u,o,r).placeholder}}function ye(t,e,n,o,r,s,c){const u=t[e],a=n[e];if(a)return function(t,e,n,o,r,s,c,u){const a=n.length>r;if(a)return zt(t,o,e,c),e;const i=me(t,o,c,s,u);return n.push(i),i}(u,a,n,o,e,r,s,c);const i=me(u,o,s,r,c);return n.push(i),i}function ve(t,e,n,o,r){const s=t&&t.tagJsType;if(e.tagJsVar=he(t),s){if(s===A.renderOnce)return;Gt(e,t,n,r)}else{if(Q(t))return be(e,t,n,r),void(e.tagJsVar=de(t));typeof t!==V.function?o&&function(t,e){e.value=t,e.tagJsVar=ie(t);const n=e.placeholder,o=ae(t),r=e.paint=[Yo,[n,o,function(t){e.simpleValueElm=t,delete e.paint}]];Ho.push(r)}(t,e):e.value=t}}function we(t,e,n,o){const r=t.tagJsVar.checkValueChange(e,t,o,n);-1!==r&&ve(e,t,n,r,o)}function xe(t,e,n,o){const r=Te(A.subscribe,t,e,n,o);if(r)return r;const s=n.subContext;return s&&s.hasEmitted?(s.callback=t.callback,s.valuesHandler(s.lastValues),-1):-1}function Te(t,e,n,o,r){if(!e||!e.tagJsType||e.tagJsType!==t){return o.tagJsVar.delete(o,n),ve(e,o,n,99,r),99}}function Ce(t,e,n,o,r){return e.hasEmitted=!0,e.contextItem=me(t,n,o,r)}function ke(t,e){let n;return t&&(n=e=document.createTextNode(E),Ro.push([zo,[t,e]])),{appendMarker:n,insertBefore:e}}function Se(t,e,n,o,r,s,c){const{appendMarker:u,insertBefore:a}=ke(s,c),i=function(t,e,n,o,r){const s=ut(e);let c=function(t){Ce(t,l,e,n,o),Je(i),c=function(t){we(l.contextItem,t,e,{added:0,removed:0}),Je(i)}};function u(t,e){l.lastValues[e]=t,a(l.lastValues)}function a(t){if(St(s.context.global.newest,s),l.callback){const e=l.callback(...t);c(e)}else c(t[0])}let i=!0;const l={lastValues:[],valueHandler:u,valuesHandler:a,callback:r,subscriptions:[]};return t.forEach(((t,e)=>{i=!0,l.subscriptions.push(t.subscribe((t=>u(t,e)))),i=!1})),l}(t,n,o,a,r);return i.appendMarker=u,e.subContext=i,e.tagJsVar.processUpdate=xe,i}function Ee(t,e){return t.subContext.subscriptions.forEach((t=>t.unsubscribe())),Ko(t,e)}function Je(t){t||kt.stateConfig.support||_o()}function Ve(t,e,n,o,r,s){return Se(t.Observables,e,n,o,t.callback,r,s)}function Ae(t,e,n,o,r,s){const c=t.Observables,u=Se(c,e,n,o,t.callback,r,s);if(!u.hasEmitted){const e=c[0]?.value;u.valueHandler(e||t.withDefault,0)}return u}function Oe(t,e,n,o,r){Se([t],e,n,o,void 0,r)}function Pe(t){return st()?Ue((()=>Ie(t))):Ie(t)}function Ie(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{tagJsType:A.signal,processInit:Oe,processUpdate:(t,e,n,o)=>Te(A.signal,t,e,n,o),get value(){return e},set value(t){e!==t&&(e=t,o(t))},delete:Ee,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class Me extends wt{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class je extends wt{value;constructor(t){super(t),this.value=t,this._value=t,Tt(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function Le(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function He(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const Ne=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))};function Ue(t){return kt.stateConfig.handlers.handler(t)}const Re=(t,e)=>De(t,e),We=t=>t;const De=(t,e,{init:n,before:o,final:r=We}={})=>{const s=Ue({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(o&&!o(t))return s.values=t,s.pastResult;const u=(n||e)(t,c);return s.pastResult=r(u),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(o&&!o(t))return s.values=t,s.pastResult;const u=e(t,c);return s.pastResult=r(u),c.length=0,c.push(...t),s.pastResult};function Be(t,e){return Object.defineProperty(e,"noInit",{get(){const e=t();return e.setup.init=()=>{},e}}),Object.defineProperty(e,"asSubject",{get(){const e=t(),n=Ue((()=>st())),o=Ue((()=>new Me(void 0))),r=Ue((()=>({stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}))),s=(t,s)=>(De(t,((t,e)=>{const c=st(),u=s(t,e);if(c!==n){const t=r.stateArray,e=n.context.global.oldest;Pt(t,e.state,r.states,e.states)}o.next(u)}),e.setup),o);return s.setup=e.setup,Be((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function _e(t){return st()?Ue((()=>new wt(t))):new wt(t)}function $e(t){return kt.stateConfig.handlers.statesHandler(t)}function Fe(t){const e=Pe([]),n=Pe(0),o=Pe(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),Re(r,(()=>{++s,e.value=r,t((()=>r))})),$e(((r,c)=>{if(s)return t(((...t)=>(c&&1!==c||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Ge(){return{stateDiff:0,provider:void 0}}Be((()=>function(t){const e=(e,n)=>De(e,n,t);return e.setup=t,Be((()=>e),e),e}({})),Re),_e._value=t=>{const e=Ue((function(){return{stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}})),n=st();return Ue((function(){return new Me(t).pipe((t=>(Pt(n.state,e.stateArray,n.states,e.states),t)))}))},_e.all=function(t){const e=Ue((()=>({stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}))),n=st();return wt.all(t).pipe((t=>(Pt(n.state,e.stateArray,n.states,e.states),t)))};const ze={create:t=>{const e=Ue(Ge);if(e.stateDiff){let t=e.stateDiff;for(;t--;)Ue(void 0);return Ue(void 0)}const n=Ue((()=>{const n=kt.stateConfig,o=n.stateArray.length,r=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-o,u={constructMethod:t,instance:r,stateDiff:c,owner:s,children:[]};e.provider=u;const a=s.context.global;return(a.providers=a.providers||[]).push(u),e.stateDiff=c,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return Ue((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=st(),r=[];let s={ownerSupport:o.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.context.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{r.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context.global;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,r),new Error(c)}))}};class Ze extends Error{details;constructor(t,e,n={}){super(t),this.name=Ze.name,this.details={...n,errorCode:e}}}class Xe extends Ze{constructor(t,e){super(t,"array-no-key-error",e),this.name=Xe.name}}class Ye extends Ze{constructor(t,e){super(t,"state-mismatch-error",e),this.name=Ye.name}}class qe extends Ze{constructor(t,e){super(t,"sync-callback-error",e),this.name=qe.name}}function Qe(t){const e=st();if(!e)throw en;return Ke(e,kt.stateConfig,t)}function Ke(t,e,n){const o=e.states;return function(...e){return t.context.renderCount>0?function(t,e,n,...o){const r=t.context.global.newest,s=n(...o);return oo(r),X(s)&&s.finally((()=>{oo(r)})),s}(t,o,n,...e):n(...e)}}const tn=()=>{const t=st();if(!t)throw en;const e=kt.stateConfig;return function(n){return Ke(t,e,n)}},en=new qe("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function nn(t){++Do.locks,t.forEach(on),--Do.locks,_o()}function on(t){const e=t.context.global;e&&oo(e.newest)}function rn(t,e,n,o,{resolvePromise:r,resolveValue:s}){if(X(t)){return e.context.locked=!0,t.then(function(t,e){return n=>{if(!0===t.context.global.deleted)return e(n);const o=t.context,r=t.context.global;delete o.locked,St(t,r.newest);return nn(uo(t)),e(n)}}(e,r))}return s(t)}function sn(t){Ue((()=>{const e=t(),n=st();return rn(e,n,n.context.global,0,{resolvePromise:cn,resolveValue:un})}))}function cn(t){return t}function un(t){return t}function an(t){Ue((function(){st().context.global.destroy$.toCallback(t)}))}function ln(t=[]){return st()?Ue((()=>pn(Ie(t)))):pn(Ie(t))}function pn(t){const e=["push","pop","splice","shift","unshift"],n=["map","reduce","forEach","every"],o=new Proxy(t,{get(r,s){return isNaN(s)?"length"===s?t.value.length:e.includes(s)?o[c=s]=(...e)=>{const n=t.value[c](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var c},set:(e,n,o)=>isNaN(n)?"length"===n?(t.value.length=o,t.emit(t.value),!0):(t[n]=o,!0):(t.value[n]=o,t.emit(t.value),!0)});return o}function fn(t,e){const n=dn(t,e);return!(n||!e.templater.tag?._innerHTML||!dn(t.outerHTML,e))||n}function dn(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===A.stateRender)return n.dom===o.dom;switch(r.tagJsType){case A.dom:return s?.tagJsType===A.dom&&function(t,e){const n=t.dom,o=e.dom;return n===o}(r,s);case A.tag:{const n=function(t,e,n,o){const r=t.strings,s=e.strings;if(r.length!==s.length)return!1;if(!r.every(((t,e)=>s[e].length===t.length)))return!1;const c=n.templater.values||t.values,u=o.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const o=e.every((function(e,n){const o=t[n];if(typeof e===V.function&&typeof o===V.function){return!!(e.toString()===o.toString())}return!0}));if(o)return!0;return!1}(c,u)}(r,s,t,e);return n}}throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function gn(t,e,o){const r=e.global,s=r?.newest;if(G(t)){return fn(t,s)?(Gt(e,t,s,o),-1):(oe(s,r),n(e),7)}const c=t?.tagJsType;if(c){return!0===Gt(e,t,r.newest.ownerSupport,o)?-1:88}return hn(e),8}function hn(t){const e=t.global,n=e?.newest;oe(n,e),delete t.global,t.renderCount=0}function mn(t,e,n,o){const r=t.context.global;r.oldest=t,r.newest=t,++Do.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===A.dom)return n.dom;const o=n.strings;return H(o,n.values)}(t),s=t.templater.tag,c=s.values,u=[],a=t.context.global;a.contexts=u;const i=Po(r,c,t,e,u,0,n,o);return i}(t,e,n,o);return r.htmlDomMeta=s.dom,--Do.locks,s}function bn(t,e,n){const o={value:t,tagJsVar:he(t),withinOwnerElement:n};return e.push(o),o}function yn(t,e,n){const o=e.global.newest,r=e.placeholder;return o.ownerSupport=t,mn(o,n,void 0,r),o}function vn(t){const e={tagJsType:A.templater,processInit:Tn,checkValueChange:gn};return e.tag=t,t.templater=e,e}function wn(t,e,n){const o=$t(t,e,e.appSupport,n);return n.global.contexts=[],o}function xn(t,e,n,o,r,s){const c=wn(t,n,e);c.ownerSupport=n;const u=mn(c,o,r,r?void 0:s);for(const t of u.dom)t.marker&&(r?Ro.push([zo,[r,t.marker]]):Ho.push([Go,[s,t.marker]])),t.domElement&&(r?Ro.push([zo,[r,t.domElement]]):Ho.push([Go,[s,t.domElement]]));return c}function Tn(t,e,n,o,r,s){return r?xn(t,e,n,o,r,s):yn(n,e,o)}function Cn(t,e){const n={tagJsType:A.templater,processInit:Tn,processUpdate:zt,checkValueChange:gn,delete:hn,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n}};return n}const kn=[];function Sn(t){const e=t.context;return no(t.templater)?ro(t):eo(t,t,e)}function En(t,e,n){return t.map((function(t){return function(t,e,n,o){if(G(t)||!t)return t;if(!e)return t;return Jn(t,e,n,o)}(t,e.ownerSupport,e,n)}))}function Jn(t,e,n,o,r){if(!t)return t;if(t.tagJsType)return t;if(typeof t===V.function)return o<=1?function(t,e,n){const o=t.mem;if(o)return t;const r=function(...t){return function(t,e,n,o){const r=o.context.global,s=r?.newest||o,c=void 0===st(),u=t.apply(e,n),a=function(){const t=s.context;return t.global&&!0!==t.locked?(Sn(s),u):u};if(c)return a();return kt.tagClosed$.toCallback(a),u}(r.mem,e,t,n)};return r.original=t,r.mem=t,Object.assign(r,t),r}(t,r,e):t;if(o===Zn)return t;return An(t)?t:Q(t)?function(t,e,n,o){for(let r=t.length-1;r>=0;--r){const s=t[r];if(t[r]=Jn(s,n,e,o+1,t),typeof s===V.function){if(s.mem)continue;Vn(o+1,r,s,t,e)}}return t}(t,n,e,o):function(t,e,n,o){const r=Object.keys(t);for(const s of r){const r=t[s],c=Jn(r,n,e,o+1,t);if(t[s]===c)continue;const u=Object.getOwnPropertyDescriptor(t,s);if(!(u?.get||u?.set)&&(t[s]=c,typeof c===V.function)){if(r.mem)continue;Vn(o+1,s,r,t,e)}}return t}(t,n,e,o)}function Vn(t,e,n,o,r){if(t>0){const t=r.context.global;o[e].subscription=t.destroy$.toCallback((function(){o[e]=n}))}}function An(t){return typeof t!==V.object||!t||t.tagJsType}function On(t,e,n,o){const r=e.original,s=t.tagJsType===A.stateRender,c=kt.stateConfig;let u;return ct(n),s?u=t():(u=r(...o),typeof u===V.function&&(u=u())),u.templater=t,t.tag=u,n.state=c.stateArray,n.states=c.states,n}function Pn(t,e,n){const o=t.propWatch===Dn.DEEP?Zn:zn,r=t.props,s=e.propsConfig;let c=s.castProps;const u=n?.propsConfig,a=u?.castProps;a&&(s.castProps=a,c=qn(e,n,n.ownerSupport,r,o));return c||En(r,e,0)}function In(t,e,n){const o=Cn(Dn.DEEP);o.tagJsType=t.tagJsType;const r=wn(o,n,e);function s(){return o.tag=t(),r}return o.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,r}function Mn(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const o=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,r=e.templater?.wrapper;let s=r;(r?.original||r?.original)&&(s=r.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},u=new Ye(o,c);throw console.error(jn,c),u}(n,e,t)}const jn="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function Ln(t,e){const n=t.context;++n.renderCount;const o=kt.stateConfig;t.state=o.stateArray,t.states=o.states,n.global.newest=t,Mn(o,t),delete o.prevSupport,delete o.support,delete o.stateArray,delete o.states,kt.tagClosed$.next(e)}function Hn(t,e,n,o){!function(t,e){const n=e?.state;if(n)return void ft(t,e,n);pt(t)}(t,e);const r=t.templater;let s;if(r.tagJsType===A.stateRender){const e=r;s=Ft(r,o,t.appSupport,n),On(r,e,s)}else{s=(0,r.wrapper)(t,n,e)}return Ln(s,o),s.ownerSupport=t.ownerSupport,s}function Nn(t,e,o,r,s,c){n(e);const u=In(t,e,o);return Hn(u,void 0,e),xn(u.templater,e,o,r,s,c)}function Un(t,e,n,o,r){const s=Ft(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==A.tagComponent?[]:Pn(t,s);c.castProps=e}return function(t,e,n){const o=mn(t,e,n,void 0);for(const t of o.dom)t.domElement&&Ro.push([zo,[n,t.domElement]]),t.marker&&Ro.push([zo,[n,t.marker]]);return t}(Hn(s,e.global.newest,e),o,r)}function Rn(t,e,o,r,s){if(n(e),s){return Un(t,e,o,r,s)}const c=function(t,e,n,o){const r=Ft(t,n,n.appSupport,e),s=r.propsConfig;if(s){const e=t.tagJsType!==A.tagComponent?[]:Pn(t,r);s.castProps=e}const c=Hn(r,e.global.newest,e);return mn(c,o,void 0,e.placeholder),c}(t,e,o,r);return c}let Wn=0;var Dn;function Bn(t,e=Dn.SHALLOW){const n=function(...o){const r=Cn(e,o);r.tagJsType=A.tagComponent,r.processInit=Rn;const s=function(t,e){return function(n,o,r){const s=Pn(t,n,r),c=n.ownerSupport,u=Ft(t,c,n.appSupport,o,s);return On(t,e,u,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;return n.original=t,o.tags=kn,o.setUse=kt,o.ValueTypes=A,o.tagIndex=Wn++,kn.push(n),n}function _n(t,e,n){if(co(t,e))return 11;switch(n){case Dn.NONE:return 1;case Dn.SHALLOW:return Gn(t,e);case Dn.IMMUTABLE:return Fn(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===V.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>$n(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return $n(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o))))return 7;return!1}(t,e)}function $n(t,e,n){if(typeof t!==V.function)return!!ot(t,e,Zn)&&4;if(typeof e!==V.function)return!1;const o=e?.original;o&&(e=o);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function Fn(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}function Gn(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(Q(n)&&Q(r)){if(n===r)continue;return 3}if(typeof n!==V.function||typeof r!==V.function)if(typeof n!==V.object){if(n!==r)return 3.3}else if(typeof e===V.object){const t=Object.entries(n);for(const e of t){if(!Xn(e,r))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(Dn||(Dn={})),Bn.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},Bn.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},Bn.deepPropWatch=Bn,Bn.route=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},Bn.app=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},Bn.immutableProps=function(t){return Bn(t,Dn.IMMUTABLE)},Bn.watchProps=function(t){return Bn(t,Dn.SHALLOW)},Object.defineProperty(Bn,"renderOnce",{set(t){t.tagJsType=A.renderOnce,t.processInit=Nn,t.processUpdate=zt,t.delete=hn,t.checkValueChange=function(){return-1}}}),Object.defineProperty(Bn,"use",{set(t){t.original={setUse:kt,tags:kn},t.tagJsType=A.stateRender,t.processInit=Rn,t.processUpdate=zt,t.checkValueChange=gn,t.delete=hn}});const zn=3,Zn=10;function Xn([t,e],n){const o=n[t];return typeof e===V.function&&typeof o===V.function||o===e}function Yn(t,e,n,o,r,s){return null==t||s>r?e:typeof t===V.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):An(e)?e:Q(e)?function(t,e,n,o,r,s){for(let c=t.length-1;c>=0;--c){const u=t[c],a=e[c];t[c]=Yn(a,u,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const c=Object.keys(t);for(const u of c){const c=t[u],a=Yn(e[u],c,n,o,s,r+1);if(c===a)continue;const i=Object.getOwnPropertyDescriptor(t,u)?.set;i||(t[u]=a)}return t}(e,t,n,o,s,r)}function qn(t,e,n,o,r,s=-1){const c=e.context.global;if(!c||!c.newest){const e=En(o,t,s);o.push(...e);return t.propsConfig.castProps=e,o}const u=(e=c.newest||e).propsConfig.castProps,a=[];for(let e=0;e<o.length;++e){const c=o[e],i=Yn(u[e],c,t,n,r,s+1);a.push(i)}return t.propsConfig.castProps=a,a}function Qn(t){const e=t.context,o=e.global,{subs:r,tags:s}=Yt(o.contexts);Kn(o);for(const t of s){const e=t.context.global;if(!0===e.deleted)return;Kn(e)}o.subscriptions&&r.forEach(qt),n(e)}function Kn(t){t.deleted=!0,ee(t,[])}function to(t,e,n){const o=Hn(t,e,n),r=!e||fn(e,o);if(r){if(e){const t=e.templater.tag;if(t&&n.renderCount>0){const n=e?.templater,o=n?.tag;!function(t,e,n){if(t.tagJsType===A.dom){const o=n?.dom;return void(o!==t.dom&&Qn(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&Qn(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context.global;let o=-1;const r=n.providers=n.providers||[],s=r.length-1;for(;o++<s;){const t=r[o];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].context.global)return t.children.splice(s,1),void t.children.push(e)}}(e,o),Qn(e);const t=o.context.global;t.oldest=o,t.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function eo(t,e,n){const o=to(e,t,n),r=n.global;return o.wasLikeTags?(Nt(r.oldest,o.support),o.support):yn(e,n,{added:0,removed:0})}function no(t){return A.templater===t.tagJsType}function oo(t){const e=t.context,n=e.global,o=no(t.templater);if(e.locked)return n.blocked.push(t),t;if(o){return ro(t)}e.locked=!0,n.blocked.length&&(t=n.blocked.pop(),n.blocked=[]);const r=eo(n.newest,t,e);return delete e.locked,r}function ro(t){return oo(ut(t).context.global.newest)}function so(t,e){const n=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(co(n,r))return!0;switch(t.propWatch){case Dn.IMMUTABLE:return Fn(n,r);case Dn.SHALLOW:return Gn(n,r)}return!ot(n,r,Zn)}(t,e);return!!n}function co(t,e){return t.length!==e.length}function uo(t,e=[]){const n=t.context,o=no(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return uo(r,e);const s=t,c=z(s.templater),u=t.templater.tagJsType,a=r&&u!==A.stateRender&&(!c||so(s.templater,s)),i=function(t){const e=t.context.global.providers;if(!e)return[];const n=[];for(const t of e){const e=K(t.owner,t);n.push(...e.map(tt))}return n}(s);return e.push(...i),a?(uo(r,e),c&&e.push(s),e):(e.push(s),e)}function ao(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=ut(e),s=r.context;s.locked=!0;const c=t.apply(n,o);delete s.locked;return function(t,e){e.context.global;return function(t,e,n){return nn(uo(t)),rn(e,t,0,0,{resolvePromise:po,resolveValue:fo})}(e,t)}(c,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}const io="no-data-ever",lo="promise-no-data-ever";function po(){return lo}function fo(){return io}function go(t,e,n,o,r,s,c){if(c)return R(t,e,n,c);o(n,t,e)}function ho(t,e,n,o){const r=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.context.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,mo(t,s,t.target)};c[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function mo(t,e,n){const o=n[e];if(o){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&mo(t,e,r)}function bo(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,ho(n.appSupport,o,t,r)}function yo(t){return null==t||!1===t}function vo(t,e){t.removeAttribute(e)}function wo(t,e,n,o,r){if(n.isNameOnly)return function(t,e,n,o,r,s,c,u){if(n){if(yo(e))return void o.removeAttribute(n);if(typeof n===V.object)if(typeof e===V.object)for(const t in n)t in e||Uo.push([vo,[o,t]]);else for(const t in n)Uo.push([vo,[o,t]])}So(t,e,o,r,s,c,u)}(r,t,n.value,n.element,e,n.howToSet,[],{added:0,removed:0}),void(n.value=t);const s=n.element;!function(t,e,n,o,r,s,c,u){if(Y(t))return function(t,e,n,o,r,s,c,u){const a=t.templater.wrapper;if((a?.tagJsType||a?.original?.tagJsType)!==A.renderOnce)return Jo(c,e,t,o,n);return Eo(e,n,o,r,s,t,u)}(r,t,o,e,c,s,n,u);Eo(t,o,e,c,s,r,u)}(t,n.attrName,n,s,e,n.howToSet,n.isSpecial,{added:0,removed:0}),n.value=t}function xo(t,e,n,o,r,s,c,u){const i=o.length;function l(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(a(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,i).join("");r(n,t,s)}e.forEach((e=>{if(a(e)>=0){const r=o.length,s=he(e),c={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:s};s.processUpdate=function(t,e,n,o,r){l(r)};const a=u[r];c.value=a,o.push(c)}})),l(u)}function To(t,e,n,o,r,s,c,u){const a=he(e),i={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:a};o.push(i),a.processUpdate=wo,function(t,e,n,o,r,s,c,u){n.element=o,n.howToSet=r,typeof e===V.function?Jo(n,e,s,t,o):(n.attrName=t,n.isSpecial=u,go(t,e,o,r,0,0,u))}(t,e,i,n,r,s,0,u),i.value=e}function Co(t){return q(t)&&"tagJsVar"in t?t.tagJsVar:-1}function ko(t,e,n,o,r,s,c,u,a){const i=Co(e);if(i>=0){const e=t[i],c=bn(e,s,!0);if(c.isAttr=!0,c.element=n,c.isNameOnly=!0,e.tagJsType)return c.tagJsVar=e,c.stateOwner=ut(o),c.supportOwner=o,function(t,e,n){return void e.processInit(t,e,n)}(n,e,c);c.howToSet=r;return c.tagJsVar.processUpdate=wo,void So(t,e,n,o,r,s,u)}if(Array.isArray(a))return xo(e,a,n,s,r,0,0,t);const l=Co(a);if(l>=0){return To(e,t[l],n,s,r,o,0,c)}return go(e,a,n,r,0,0,c)}function So(t,e,n,o,r,s,u){if(!yo(e))if(typeof e!==V.object)0!==e.length&&r(n,e,E);else for(const a in e){const i=e[a];ko(t,a,n,o,r,s,c(a),u,i)}}function Eo(t,e,n,o,r,s,c){if(!1===o){switch(t){case void 0:case!1:case null:return void Uo.push([Vo,[e,n]])}if(Y(t))return bo(e,t,s,n);r(e,n,t)}else R(n,t,e,o)}function Jo(t,e,n,o,r){e=ao(e,n);return t.tagJsVar.processUpdate=wo,bo(r,e,n,o)}function Vo(t,e){t.removeAttribute(e)}function Ao(t,e,n,o,r,s,c){const u=document.createTextNode(E),a=bn(t,e,r>0);a.placeholder=u,s?Ro.push([zo,[s,u]]):Ho.push([Go,[c,u]]),ue(t,n,a,o,s,c)}const Oo=function(){};function Po(t,e,n,o,r,s,c,u){const a=[];c&&void 0===u&&(u=document.createTextNode(E),Ro.push([zo,[c,u]]),c=void 0);for(let i=0;i<t.length;++i){const l=t[i],p=l.v;if(!isNaN(p)){Ao(e[r.length],r,n,o,s,c,u);continue}const f={};if(a.push(f),"text"===l.nn){Mo(f,l,c,u);continue}const d=Io(f,l,e,n,r,o,c,u);l.ch&&(f.ch=Po(l.ch,e,n,o,r,s+1,d,u).dom)}return{dom:a,context:r}}function Io(t,e,n,o,r,s,c,u){const a=t.domElement=document.createElement(e.nn);if(e.at)for(const t of e.at){const e=t[0],c=t[1];ko(n,e,a,o,U,r,t[2]||!1,s,c)}return c?Ro.push([zo,[c,a]]):Ho.push([Go,[u,a]]),a}function Mo(t,e,n,o){const r=t,s=r.tc=e.tc;n?Ro.push([Qo,[n,s,function(t){r.domElement=t}]]):Ho.push([qo,[o,s,function(t){r.domElement=t}]])}function jo(t){Lo.length&&(Lo[Lo.length-1].paintRemoves.push(...No),No=[]),Lo.push({promise:t,paintRemoves:No}),No=[]}let Lo=[],Ho=[],No=[],Uo=[],Ro=[],Wo=[];const Do={locks:0,removeLocks:0};function Bo(t,e){e.textContent=t}function _o(){if(!(Do.locks>0))return function(){(function(){if(Lo.length){const t=Lo.map((t=>t.promise.then((()=>{const e=t.paintRemoves;for(const t of e)t[0](...t[1])}))));Lo=[];const e=No;return Promise.all(t).then((()=>{for(const t of e)t[0](...t[1])}))}for(const t of No)t[0](...t[1])})(),No=[];for(const t of Uo)t[0](...t[1]);for(const t of Ro)t[0](...t[1]);for(const t of Ho)t[0](...t[1])}(),void function(){Ho=[],Uo=[],Ro=[];const t=Wo;Wo=[];for(const e of t)e[0](...e[1])}()}function $o(t){No.push([Fo,[t]])}function Fo(t){t.parentNode.removeChild(t)}function Go(t,e){t.parentNode.insertBefore(e,t)}function zo(t,e){t.appendChild(e)}const Zo="object"==typeof document&&document.createElement("div");function Xo(t){return Zo.innerHTML=t,document.createTextNode(Zo.innerHTML)}function Yo(t,e,n=Oo){const o=Xo(e);Go(t,o),n(o)}function qo(t,e,n=Oo){Zo.innerHTML=e;const o=document.createTextNode(Zo.textContent);Go(t,o),n(o)}function Qo(t,e,n){Zo.innerHTML=e;const o=document.createTextNode(Zo.textContent);zo(t,o),n(o)}function Ko(t,e){const n=t.subContext;n.deleted=!0,delete t.subContext;const o=n.appendMarker;if(o&&($o(o),delete n.appendMarker),delete t.delete,!n.hasEmitted)return;const r=n.contextItem;return r.tagJsVar.delete(r,e),76}function tr(t,e,o,r,s,c){const u=t;let a=u.templater;a||(a=vn(u));const i=n(e);return s?xn(a,e,o,r,s,c):(i.newest=wn(a,o,e),yn(o,e,r))}function er(t,e,n,o,r,s){tr(t.outerHTML,e,n,o,r,s);e.tagJsVar.processUpdate=function(t,e,n,o){we(n,t?.outerHTML||t,e,o)},t.checkValueChange=nr}function nr(t,e,n){return gn(t,e,n)}function or(t,e){const n={values:e,ownerSupport:st(),dom:t,tagJsType:A.dom,processInit:tr,processUpdate:zt,checkValueChange:gn,delete:hn,key:function(t){return n.arrayValue=t,n},setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=er,n},acceptInnerHTML:function(t){return t.owner=n,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return Object.defineProperty(n,"innerHTML",{set:t=>n.setHTML(t)}),n}function rr(t,...e){const n=function(t,e){const n={values:e,ownerSupport:st(),tagJsType:A.tag,processInit:tr,processUpdate:zt,checkValueChange:gn,delete:hn,strings:t,key:t=>(n.arrayValue=t,n),setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=er,n},acceptInnerHTML:function(t){return t.owner=n,n},html:function(t,e){return n.children={strings:t,values:e},n}};return Object.defineProperty(n,"innerHTML",{set:t=>n.setHTML(t)}),n}(t,e),o=Cn(Dn.NONE);return o.tag=n,n.templater=o,n}function sr(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}function cr(t,e,n){const o=e.global,r=Bt(t,e);return _t(t,r,r),r.appElement=n,o.oldest=o.oldest||r,o.newest=r,r}function ur(t,e,n,o,r,s,c){const u=document.createTextNode(E);kn.push(n.wrapper||{original:n});const a=function(t,e,n,o,r){o.placeholder=e;const s=o.global,c=s.oldest,u=s.newest===c,a=Ft(t,s.newest,s.newest.appSupport,o);u||ft(a,s.newest,c.state);if(t.tagJsType===A.stateRender)return function(t,e,n,o,r){const s=t.wrapper||{original:t};if(!e){const e=cr(t,o,r);return Ln(e),e}return On(t,s,n),Ln(n),n}(t,r,a,o,n);const i=t.wrapper,l=i(a,o);return Ln(a),l}(n,u,r,s,c);if(e.isApp=!0,c&&(o.tag=a.templater.tag),!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=e.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}e.events={},++Do.locks;const n=oe(a,e);return--Do.locks,_o(),n},++Do.locks;const i=function(t,e,n,o,r,s){console.debug("🏷️ Building element into tag...",{element:e,app:r,support:t});const c=mn(t,{added:0,removed:0},e,void 0);n.oldest=t,n.newest=t;let u=o.setUse;if(o.tagJsType!==A.stateRender){const t=r.original;u=t.setUse,t.isApp=!0}e.setUse=u,e.ValueTypes=A,ar.push({element:e,support:t});const a=document.createDocumentFragment();a.appendChild(s);for(const t of c.dom)sr(t,a);return console.debug("🏷️ Element Tag DOM built ✅"),a}(a,r,e,n,t,u);return--Do.locks,_o(),r.appendChild(i),{support:a,tags:kn,ValueTypes:A}}rr.dom=function(t,...e){return or(t,e)},"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const ar=[];function ir(t,e,o){const r=ar.findIndex((t=>t.element===e));if(r>=0){const t=ar[r].support;oe(t,t.context.global),ar.splice(r,1),console.warn("Found and destroyed app element already rendered to element",{element:e})}let s=()=>a(o);s.propWatch=Dn.NONE,s.tagJsType=A.stateRender,s.processUpdate=zt,s.props=[o],s.isApp=!0;const c=function(t,e){const o={value:t,withinOwnerElement:!1,renderCount:0,global:void 0,tagJsVar:{tagJsType:"templater",checkValueChange:gn,delete:hn,processInit:function(){console.debug("do nothing app function")},processUpdate:zt}},r=n(o);return r.events={},cr(t,o,e),o}(s,e),u=c.global;pt(u.newest);let a=t(o);const i=typeof a==V.function;return i||(z(a)?(u.newest.propsConfig={latest:[o],castProps:[o]},s.propWatch=a.propWatch,s.tagJsType=a.tagJsType,s.wrapper=a.wrapper,s=a):(s.tag=a,a=t)),ur(t,u,s,a,e,c,i)}function lr(t){if(!t)return Oo;const e=st();if(!e)throw new Error("output must be used in render sync fashion");return(...n)=>{const o=e.ownerSupport;return pr(n,t,o)}}function pr(t,e,n){const o=n.context.global.newest;Et(o.states,n.states);const r=e(...t);return Et(n.states,o.states),Wo.push([()=>{o.context.global&&(++Do.locks,Sn(o),--Do.locks,_o())},[]]),r}function fr(t,e){const n=st(),o=n?ut(n).states:[];return{tagJsType:A.subscribe,processInit:Ve,processUpdate:xe,delete:Ee,callback:e,states:o,Observables:[t]}}function dr(t,e,n,o){const r=t.owner._innerHTML;r.processInit=r.oldProcessInit;const s=n.subContext?.contextItem;we(s,r,e,o)}function gr(t,e,n,o,r,s){e.subContext={},t.processUpdate=dr,function(t,e,n,o,r,s){const{appendMarker:c,insertBefore:u}=ke(s,r),a=n.subContext;a.appendMarker=c;const i=t.owner,l=i._innerHTML;l.processInit=l.oldProcessInit,Ce(l,a,e,o,u)}(t,n,e,o,s,r)}function hr(){return{tagJsType:"innerHTML",processInit:gr,processUpdate:dr,delete:Ko}}function mr(t,e){return{tagJsType:A.subscribe,processInit:br,processUpdate:Oo,delete:Ee,callback:e,states:ut(st()).states,Observables:t}}function br(t,e,n,o,r){return Se(t,e,n,o,void 0,r)}function yr(t,e={}){return{tagJsType:A.host,processInit:wr,processUpdate:vr,delete:xr,options:{callback:t,...e}}}function vr(t,e,n,o){const r=Te(A.host,t,e,n,o);if(r)return r;const s=n.tagJsVar.options,c=n.element;s.callback(c,t,n)}function wr(t,e,n){e.options.callback(t,e,n);const o=e.options;if(o.onInit){const t=n.element;o.onInit(t,e,n)}}function xr(t){const e=t.tagJsVar,n=e.options;if(n.onDestroy){const o=t.element;pr([],(function(){return n.onDestroy(o,e,t)}),t.stateOwner)}}function Tr(t,e,n){return{tagJsType:A.subscribe,processInit:Ae,processUpdate:Oo,delete:Ee,callback:n,withDefault:e,states:ut(st()).states,Observables:[t]}}yr.onInit=t=>yr((()=>{}),{onInit:t}),yr.onDestroy=t=>yr((()=>{}),{onDestroy:t});const Cr={tagElement:ir,renderWithSupport:to,renderSupport:oo,renderTagOnly:Hn,paint:_o};var kr=e.W9,Sr=e.cg,Er=e.m0,Jr=e.rS,Vr=e.Y2,Ar=e.ei,Or=e.B7,Pr=e.TU,Ir=e.XF,Mr=e.PC,jr=e.Ot,Lr=e.Mj,Hr=e.tD,Nr=e.j8,Ur=e.Gf,Rr=e.xe,Wr=e.YO,Dr=e.um,Br=e.E2,_r=e.OH,$r=e.TB,Fr=e.Ii,Gr=e.m3,zr=e.yV,Zr=e.zV,Xr=e.pf,Yr=e.ze,qr=e.WJ,Qr=e.Ng,Kr=e.HG,ts=e.aZ,es=e.Ey,ns=e.O,os=e.F3,rs=e.Ie,ss=e.ts,cs=e.B4,us=e.Az,as=e.Xi,is=e.sV,ls=e.Ah,ps=e.Gk,fs=e.j_,ds=e.zC,gs=e.cF,hs=e.Hc,ms=e.jU,bs=e.PB,ys=e.qy,vs=e.cy,ws=e.Tn,xs=e.Gv,Ts=e.yL,Cs=e.D8,ks=e.Ze,Ss=e._4,Es=e.mn,Js=e.z,Vs=e.sA,As=e.TG,Os=e.MG,Ps=e.PL,Is=e.CG,Ms=e.nI,js=e.Fs,Ls=e.PZ,Hs=e.r5,Ns=e.uc,Us=e.pG,Rs=e.QB,Ws=e.Ll,Ds=e.vP,Bs=e.wk,_s=e.xP,$s=e.bc,Fs=e.B1,Gs=e.RX,zs=e.ag,Zs=e.Tc,Xs=e.Hf,Ys=e.zc,qs=e._A,Qs=e.Ag,Ks=e.Pc,tc=e.NU,ec=e.wB,nc=e.id,oc=e.MC,rc=e.SZ;export{kr as ArrayNoKeyError,Sr as BasicTypes,Er as ImmutableTypes,Jr as PropWatches,Vr as RouteQuery,Ar as StateMismatchError,Or as Subject,Pr as Subjective,Ir as SyncCallbackError,Mr as TagError,jr as ValueSubject,Lr as ValueSubjective,Hr as ValueTypes,Nr as addOneContext,Ur as addPaintRemoveAwait,Rr as appElements,Wr as array,Dr as buildBeforeElement,Br as callback,_r as callbackMaker,$r as checkArrayValueChange,Fr as checkSimpleValueChange,Gr as checkSubContext,zr as checkTagValueChange,Zr as combineLatest,Xr as createHtmlSupport,Yr as createTrigger,qr as defineValueOn,Qr as deleteSimpleValue,Kr as deleteSubContext,ts as destroyArray,es as destroyArrayContextItem,ns as destroySupport,os as destroySupportByContextItem,rs as empty,ss as forceUpdateExistingValue,cs as getBaseSupport,us as getDomMeta,as as getDomTag,is as getInnerHTML,ls as getNewGlobal,ps as getTemplaterResult,fs as guaranteeInsertBefore,ds as hasPropChanges,gs as hmr,hs as host,ms as howToSetFirstInputValue,bs as howToSetInputValue,ys as html,vs as isArray,ws as isFunction,xs as isObject,Ts as isPromise,Cs as isSimpleType,ks as isStaticTag,Ss as isSubjectInstance,Es as isTagComponent,Js as letProp,Vs as onDestroy,As as onFirstSubContext,Os as onInit,Ps as oneRenderToSupport,Is as output,Ms as paint,js as pipe,Ls as processFirstSubjectValue,Hs as providers,Ns as renderSupport,Us as renderTagOnly,Rs as renderWithSupport,Ws as setUseMemory,Ds as signal,Bs as state,_s as states,$s as subject,Fs as subscribe,Gs as subscribeWith,zs as syncError,Zs as tag,Xs as tagElement,Ys as tagValueUpdateHandler,qs as tags,Qs as upgradeBaseToSupport,Ks as valueToTagJsVar,tc as variablePrefix,ec as watch,nc as willCallback,oc as willPromise,rc as willSubscribe};
1
+ var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.global={}}t.d(e,{W9:()=>qe,cg:()=>A,m0:()=>I,rS:()=>Bn,Y2:()=>o,ei:()=>Ye,B7:()=>xt,TU:()=>Tt,XF:()=>Qe,PC:()=>Xe,Ot:()=>je,Mj:()=>Le,tD:()=>J,j8:()=>yn,Gf:()=>Lo,xe:()=>ir,YO:()=>pn,um:()=>bn,E2:()=>Ke,OH:()=>en,TB:()=>Kt,Ii:()=>de,m3:()=>Te,yV:()=>hn,zV:()=>yt,pf:()=>Ft,ze:()=>tn,WJ:()=>Ct,Ng:()=>fe,HG:()=>tr,aZ:()=>ee,Ey:()=>te,O:()=>re,F3:()=>mn,Ie:()=>E,ts:()=>xe,B4:()=>_t,Az:()=>H,Xi:()=>rr,sV:()=>mr,Ah:()=>n,Gk:()=>Sn,j_:()=>ke,zC:()=>$n,cF:()=>Sr,Hc:()=>vr,jU:()=>R,PB:()=>N,uq:()=>U,qy:()=>sr,cy:()=>K,Tn:()=>Y,Gv:()=>Q,yL:()=>q,D8:()=>G,Ze:()=>z,_4:()=>X,mn:()=>Z,z:()=>Ge,sA:()=>ln,TG:()=>Se,MG:()=>cn,PL:()=>Mn,CG:()=>pr,nI:()=>$o,Fs:()=>br,PZ:()=>ue,r5:()=>Ze,uc:()=>ro,pG:()=>Nn,QB:()=>eo,Ll:()=>kt,vP:()=>Pe,wk:()=>Re,xP:()=>Fe,bc:()=>$e,B1:()=>dr,RX:()=>Cr,ag:()=>nn,Tc:()=>_n,Hf:()=>lr,zc:()=>Zt,_A:()=>kn,Ag:()=>$t,Pc:()=>me,NU:()=>r,wB:()=>De,id:()=>He,MC:()=>Ne,SZ:()=>Ue});class o{get(t){return"todo"}}const r=":tagvar",s=":";function c(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus"}return!1}(t);return!1!==e?e:!!t.startsWith("style.")&&"style"}const u=new RegExp(r+"(\\d+)"+s,"g");function a(t){return t.search&&t.startsWith(r)?t.search(u):-1}const i=/(:tagvar\d+:)/,l="ondoubleclick",p=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,f=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function d(t){const e=[],n=[],o=[];let c=null,u=-1,a=0;const l=new RegExp(f,"g");for(t=function(t){return t.replace(g,(function(t){return t.replace(/\[l t\]/g,"[l&nbsp;t]").replace(/\[g t\]/g,"[g&nbsp;t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const f=l.exec(t);if(!f)break;const[d,g,m]=f,y=d.startsWith("</"),w=d.endsWith("/>");if(a<f.index){const e=t.slice(a,f.index);if(e.trim()){const t=b(e);for(let e of t)e.startsWith(r)&&e.search(i)>=0&&-1===e.search(C)&&(e=r+ ++u+s),h(c,n,e)}}if(a=f.index+d.length,y){c=o.pop()||null;continue}const x=[];let T;for(;null!==(T=p.exec(m));)u=v(T,u,e,x);const S={nn:g};x.length&&(S.at=x),c?(c.ch||(c.ch=[]),c.ch.push(S)):n.push(S),w||(o.push(c),c=S)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=b(e);for(const e of t)e.startsWith(r)&&++u,h(c,n,e)}}return n}const g=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function h(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:m(n)})}function m(t){return t.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g,(function(t){return t.replace(/\[l t\]/g,"<").replace(/\[g t\]/g,">").replace(/\[l&nbsp;t\]/g,"[l t]").replace(/\[g&nbsp;t\]/g,"[g t]")}))}function b(t){return t.split(i).filter(y)}function y(t){return""!==t}function v(t,e,n,o){const a=t[1]||t[3]||t[5];let i=t[2]||t[4]||t[6];if(void 0===a)return e;const p=""!==t[2],f=void 0===i&&p,d=a.toLowerCase(),g=d.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===l.length&&t===l?"dblclick":t.slice(2,t.length);return t}(d):d;if(f){if(a.slice(0,r.length)===r){const t=r+ ++e+s;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(a)&&t[0].slice(a.length,t[0].length).search(/\s+$/)>=0)return o.push([g]),e;const c=t[3];if(c.search(C)>=0){i=c;const t=[g,i];return o.push(t),e}i=r+ ++e+s}p||(i=t[2]);const h=i.split(x).filter((t=>t.length>0));h.length>1&&(i=h,h.forEach((t=>{t.search(u)>=0&&++e})));const m=[g,i],b=c(d);return b&&m.push(b),"style"===g?(o.unshift(m),e):(o.push(m),e)}const w=new RegExp(r+"(\\d+)"+s,"gi"),x=new RegExp("("+r+"\\d+"+s+")","gi"),T=r.slice(0,r.length-1),C=new RegExp(T+"&#x72;(\\d+)"+s,"gi"),S=T+"&#x72;$1"+s;function k(t,e){const n=function(t,e){const n=t;return function(t,e){const n=[];for(let o=0;o<t.length;++o){const c=t[o].replace(w,S);o<e.length?n.push(c+r+o+s):n.push(c)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(r+(e.length+n-1)+s)}(n,t,e),n}(n,e)}(t,e).join("");return d(n)}const E="";var I,A;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(I||(I={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(A||(A={}));const J={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()},V="ch";function O(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],c=r[t];if(c.at){const t=c.at;c.at=M(t,e)}if(c.ch){const t=c.ch,o=[...s,V];c.ch=O(t,e,n,o)}t=P(c,e,r,t)}return r}function P(t,e,n,o){if("text"!==t.nn)return o;const c=t;let a,i=c.tc;if(typeof i!==I.string)return o;for(;null!==(a=u.exec(i));){const t=a[1],c=parseInt(t,10);if(!isNaN(c)&&c<e){const t=r+c+s,e=i.slice(a.index+t.length);n.splice(o,1,{nn:"text",v:c}),i=e,u.lastIndex=0}}return c.tc=i,o}function M(t,e){const n=[];for(const o of t){const[t,s,c]=o;if(t.startsWith(r)){const o=parseInt(t.replace(r,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof s===I.string&&s.startsWith(r)){const o=parseInt(s.replace(r,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},c]);continue}}n.push(o)}return n}function j(t){return t.length}const L={};function H(t,e){const n=function(t){const e=t.map(j);return e.push(t.length),Number(e.join(""))}(t),o=L[n],r=o&&function(t,e,n){if(n&&n.strings.length===t.length&&n.strings.every(((e,n)=>e===t[n]))&&n.values.length===e.length)return!0;return!1}(t,e,o);if(r)return o.domMetaMap;const s=O(k(t,e),e.length),c={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return L[n]=c,s}function N(t,e,n){Ro.push([R,[t,e,n]])}function U(t,e,n){t.setAttribute(e,"")}function R(t,e,n){void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function D(t,e,n,o){switch(o){case"autofocus":return void Ro.push([F,[n]]);case"autoselect":return void Ro.push([$,[n]]);case"style":{const o=t.split(".");return void Ro.push([W,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)Ro.push([B,[n,t]]);return}for(const t of o)Ro.push([_,[n,t]])}(t,e,n)}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function W(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function B(t,e){t.classList.add(e)}function _(t,e){t.classList.remove(e)}function $(t){t.select()}function F(t){t.focus()}function G(t){switch(t){case I.string:case I.number:case I.boolean:return!0}return!1}function z(t){if(!t)return!1;switch(t.tagJsType){case J.dom:case J.tag:case J.templater:return!0}return!1}function Z(t){const e=t?.tagJsType;return e===J.tagComponent||e===J.stateRender}function X(t){return Q(t)&&typeof t.subscribe===A.function}function q(t){return t&&Y(t.then)}function Y(t){return typeof t===A.function}function Q(t){return typeof t===A.object&&null!==t}function K(t){return Array.isArray(t)}function tt(t,e){const n=function(t,e,n=[]){const o=t.context;n.push({support:t,renderCount:o.renderCount,provider:e});const r=e.children;for(let t=r.length-1;t>=0;--t){const o=r[t],s=o.context;n.push({support:o,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function et(t){return t.support}function nt(t,e){return ot(t,e)}function ot(t,e){if(null===t||typeof t!==A.object)return t;if(e<0)return t;if(t instanceof Date)return new Date(t);if(t instanceof RegExp)return new RegExp(t);const n=K(t)?[]:Object.create(Object.getPrototypeOf(t));if(K(t))for(let o=0;o<t.length;o++)n[o]=ot(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=ot(t[o],e-1));return n}function rt(t,e,n){return st(t,e,n)}function st(t,e,n){return!(t!==e&&(o=t,r=e,!Y(o)||!Y(r)||o.toString()!==r.toString()))||(n<0||typeof t===A.object&&typeof e===A.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():K(t)&&K(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!st(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!K(t)&&!K(e)&&function(t,e,n){const o=Object.keys(t),r=Object.keys(e);if(0===o.length&&0===r.length)return!0;if(o.length!==r.length)return!1;for(const s of o){if(!r.includes(s)||!st(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function ct(){return kt.stateConfig.support}function ut(t){return kt.stateConfig.support=t}function at(t){let e=t;for(;e.ownerSupport&&!Z(e.templater);)e=e.ownerSupport;return e.context.global.newest||e}function it(...t){return t}function lt(t){const e=kt.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(it)}function pt(t){const e=kt.stateConfig,n=e.statesIndex,o=at(e.prevSupport).states[n];let r=[];o((function(...t){return r=t,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function ft(t){const e=kt.stateConfig;e.handlers.handler=bt,e.handlers.statesHandler=lt,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,ut(t)}function dt(t,e,n){const o=kt.stateConfig;o.rearray=n,o.stateArray=[],o.states=[],o.statesIndex=0,o.handlers.handler=mt,o.handlers.statesHandler=pt,o.prevSupport=e,ut(t)}class gt{}function ht(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(gt),[n]=t(e);return[e,n]}(e);return n}function mt(){const t=kt.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function bt(t){const e=kt.stateConfig;let n=t;if(typeof t===A.function&&(n=t()),typeof n===A.function){const t=n;n=function(...e){return t(...e)},n.original=t}const o={get:function(){return ht(o)},defaultValue:n};return e.stateArray.push(o),n}function yt(t){const e=new xt;return e.subscribeWith=e=>{const n=[],o=[],r=(r,s)=>{n[s]=!0,o[s]=r;if(n.length===t.length){for(const t of n)if(!t)return;e(o,c)}},s=[...t],c=s.shift().subscribe((t=>r(t,0))),u=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return c.subscriptions=u,c},e}function vt(t,e,n){const o=xt.globalSubCount$;xt.globalSubCount$.next(o.value+1);const r=function(){r.unsubscribe()};return r.callback=e,r.subscriptions=[],r.unsubscribe=function(){return function(t,e,n){!function(t,e){const n=t.findIndex((t=>t.callback===e));-1!==n&&t.splice(n,1)}(e,n);const o=xt.globalSubCount$;xt.globalSubCount$.next(o.value-1),t.unsubscribe=()=>t;const r=t.subscriptions;for(const t of r)t.unsubscribe();return t}(r,n,e)},r.add=t=>(r.subscriptions.push(t),r),r.next=t=>{e(t,r)},r}function wt(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return wt(t,o,n);n(t)};let c=s;const u=r(t,{setHandler:t=>c=t,next:s});c(u)}class xt{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=vt(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{wt(t,this.methods,(t=>n(t,e)))}}return n(t)}return this.subscribers.push(e),this.onSubscription&&this.onSubscription(e),e}next(t){this.value=t,this.emit()}set=this.next.bind(this);emit(){const t=this.value,e=this.subscribers;for(const n of e)n.callback(t,n)}toPromise(){return new Promise((t=>{this.subscribe(((e,n)=>{n.unsubscribe(),t(e)}))}))}toCallback(t){const e=this.subscribe(((n,o)=>{const r=o?.unsubscribe;r?r():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new xt(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return yt(t.map((t=>{if(X(t))return t;return new xt(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new xt(0)}class Tt extends xt{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,Ct(this)}next(t){this._value=t,this.emit()}emit(){const t=this._value,e=this.subscribers;for(const n of e)n.callback(t,n)}}function Ct(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const St=new xt(void 0,(function(t){ct()||t.next()})),kt={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:bt,statesHandler:lt}},tagClosed$:St};function Et(t,e){return It(t.states,e.states)}function It(t,e){for(let n=0;n<t.length;++n){Ot(t[n],e[n])}}let At;function Jt(...t){return At=t,t}function Vt(){return At}function Ot(t,e){t(Jt,1),e(Vt,2)}function Pt(t,e,n,o){for(let n=t.length-1;n>=0;--n){const o=t[n].get(),r=e[n].callback;r&&r(o)}for(let t=o.length-1;t>=0;--t){jt.length=0,Mt=0;(0,o[t])(Lt),n[t](Ht)}}let Mt=0;const jt=[];function Lt(...t){return jt.push(t),t}function Ht(...t){return jt[Mt++]}function Nt(t,e,n,o,r){const s=n[e],c=t[s.valueIndex];if(c===s.value)return;s.tagJsVar.processUpdate(c,o,s,r,t),s.value=c}function Ut(t,e){const n=t.context.global.contexts;!function(t,e){const n=e.templater,o=e.templater.tag,r=n.values||o.values,s=t.templater.tag;s.values=r}(t,e),++Bo.locks,function(t,e){const n=t.templater.tag.values;let o=0;const r=n.length,s={added:0,removed:0};for(;o<r;)Nt(n,o,e,t,s),++o}(t,n),--Bo.locks,$o()}function Rt(t){return t.map(Dt)}function Dt(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case J.signal:case J.subscribe:case J.stateRender:return;case J.dom:case J.tag:case J.templater:return Rt(n.values)}return K(t)?Rt(n):nt(t,e)}function Wt(t){return Dt(t,Zn)}function Bt(t){return Dt(t,Xn)}function _t(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0},r=e.global;return r.blocked=[],r.destroy$=new xt,o}function $t(t,e,n,o){e.appSupport=n;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==J.stateRender){switch(o.propWatch){case Bn.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case Bn.SHALLOW:return t.propsConfig={latest:e.map(Wt),castProps:n}}return t.propsConfig={latest:e.map(Bt),castProps:n}}}(e,r,o)),e}function Ft(t,e,n,o,r){const s={templater:t,context:o,castedProps:r,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function Gt(t,e,n,o,r){const s=_t(t,o,r);return s.ownerSupport=e,$t(t,s,n,r)}function zt(t,e,o,r){const s=Z(e);if(t.tagJsVar=e,s)return void 0===t.global&&n(t),function(t,e,o,r){const s=e.global;if(!s.newest)return void t.processInit(t,e,o,r,void 0,e.placeholder);const c=Gt(t,o,o.appSupport,e);!function(t,e,o){const r=o.global,s=r.newest,c=s.templater.wrapper;let u=e.templater.wrapper,a=!1;const i=e.templater.tagJsType,l=J.stateRender===i||J.renderOnce===i;if(l)a=e.templater.tagJsType===J.renderOnce||dn(s,e);else if(c&&u){const t=s.templater.tag?._innerHTML;t&&(u=e.outerHTML);a=c.original===u.original}const p=e.templater;if(!a)return void function(t,e,o){const r=t.global,s=r.oldest;re(s,r),n(t),e.processInit(e,t,o,{added:0,removed:0},void 0,t.placeholder)}(o,p,t);const f=l||function(t,e){const n=e.props,o=t.propsConfig,r=o.latest,s=$n(n,r,t.templater.propWatch);return s}(s,p);if(!f){return void function(t,e,n,o,r){const s=t.props,c=Qn(e,n,o,s,r),u=e.propsConfig;u.castProps=c;const a=n.propsConfig;a.latest=u.latest}(p,e,s,t,p.propWatch===Bn.DEEP?Xn:Zn)}if(o.locked)return void r.blocked.push(e);ro(e),++o.renderCount}(o,c,e)}(e,t,o,r),!0;const c=t.global;if(c){const n=c.newest;if(n)return typeof e===A.function||function(t,e,n,o){let r=n.templater||n;const s=t.templater.tag;s&&s._innerHTML&&(r=n.outerHTML||n._innerHTML.outerHTML);const c=Gt(r,o,o.appSupport,e);Ut(t.context.global.oldest,c)}(n,t,e,o),!0}return e.processInit(e,t,o,r,void 0,t.placeholder),!0}function Zt(t,e,n,o){t!==n.value&&xe(n,t,e,o)}function Xt(t,e){const n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].context.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.context.renderCount=0}function qt(t,e){for(const n of t){const t=n.lastArray;if(t){qt(t,e);continue}const o=n.value;if(o?.tagJsType===J.subscribe){o.delete(n,e);continue}const r=n.global;if(!r)continue;const s=r.newest,c=r.subscriptions;c&&c.forEach(Qt),Z(s.templater)&&Xt(s,r);qt(r.contexts,s)}}function Yt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=t.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=t.contexts;s&&Yt(s,e,n)}return{tags:e,subs:n}}function Qt(t){t.unsubscribe()}function Kt(t,e){return!K(t)&&(te(e),9)}function te(t){ee(t,t.lastArray)}function ee(t,e){for(let t=0;t<e.length;++t)ce(e[t]);delete t.lastArray}function ne(t,e){!function(t,e){for(const n of t){if(n.locked)continue;if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const e=n.supportOwner;t.delete(n,e)}continue}const t=n.lastArray;if(t){ee(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,Fo(o);continue}const r=n.global;if(void 0===r)continue;if(!0===r.deleted)continue;r.deleted=!0;r.oldest&&ne(r,e)}}(t.contexts,e),function(t){const e=t.htmlDomMeta;for(let t=e.length-1;t>=0;--t){oe(e[t]),e.splice(t,1)}}(t)}function oe(t){const e=t.marker;e&&Fo(e);const n=t.domElement;n&&Fo(n)}function re(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return qt(e.contexts,t),e.destroy$&&Xt(t,e),ne(e,o),o}function se(t,e,n,o){const r=t.length-1,s=e-o,c=s<0||r<s,u=n[e];if(c)return ce(u),1;const a=function(t,e,n,o,r){const s=e&&t!==e.arrayValue;if(s)return ce(n),o.splice(r,1),2;return 0}(u.value.arrayValue,t[e],u,n,e);return a}function ce(t){!function(t,e){if(t){return void re(t.oldest,t)}const n=e.simpleValueElm;delete e.simpleValueElm,Fo(n)}(t.global,t)}function ue(t,e,n,o,r,s){return e.tagJsVar.processInit(t,e,n,o,r,s)}function ae(t,e,n,o,r,s){const c=e.context;c.locked=!0,ue(t,n,e,o,r,s),delete c.locked,n.value=t}function ie(t){switch(t){case void 0:case!1:case null:return E}return t}function le(t){return{tagJsType:"simple",value:t,processInit:pe,delete:fe,checkValueChange:de,processUpdate:Zt}}function pe(t,e,n,o,r,s){const c=ie(t);s=e.placeholder;const u=e.paint=[Yo,[s,c,function(t){e.simpleValueElm=t,delete e.paint}]];No.push(u)}function fe(t){const e=t.simpleValueElm;delete t.simpleValueElm,Fo(e)}function de(t,e){return null!=t&&typeof t===A.object?(fe(e),6):(function(t,e){const n=ie(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;Ro.push([_o,[n,o]])}(t,e),-1)}function ge(t){return{tagJsType:"array",value:t,processInit:he,processUpdate:Zt,checkValueChange:Kt,delete:te}}function he(t,e,n,o,r){ye(e,t,n,o,r)}function me(t){const e=t?.tagJsType;return e?t:function(t){if(K(t))return ge(t);return le(t)}(t)}function be(t,e,n,o,r,s){const c=document.createTextNode(E),u={value:t,tagJsVar:me(t),withinOwnerElement:!1,placeholder:c,valueIndex:o.length,valueIndexSetBy:"createAndProcessContextItem"};return s||No.push([zo,[r,c]]),ae(t,e,u,n,s,r),s&&Do.push([Zo,[s,c]]),u}function ye(t,e,n,o,r){const s=void 0===t.lastArray;s&&(t.lastArray=[]);const c=t.lastArray;let u=t.placeholder,a=0;const i=[];if(!s){for(let t=0;t<c.length;++t){const n=c[t],o=se(e,t,c,a);0!==o?2!==o?a+=o:t-=1:i.push(n)}t.lastArray=i}const l=e.length;for(let s=0;s<l;++s){u=ve(e,s,t.lastArray,n,u,o,r).placeholder}}function ve(t,e,n,o,r,s,c){const u=t[e],a=n[e];if(a)return function(t,e,n,o,r,s,c,u){const a=n.length>r;if(a)return Zt(t,o,e,c),e;const i=be(t,o,c,n,s,u);return n.push(i),i}(u,a,n,o,e,r,s,c);const i=be(u,o,s,n,r,c);return n.push(i),i}function we(t,e,n,o,r){const s=t&&t.tagJsType;if(e.tagJsVar=me(t),s){if(s===J.renderOnce)return;zt(e,t,n,r)}else{if(K(t))return ye(e,t,n,r),void(e.tagJsVar=ge(t));typeof t!==A.function?o&&function(t,e){e.value=t,e.tagJsVar=le(t);const n=e.placeholder,o=ie(t),r=e.paint=[Yo,[n,o,function(t){e.simpleValueElm=t,delete e.paint}]];No.push(r)}(t,e):e.value=t}}function xe(t,e,n,o){const r=t.tagJsVar.checkValueChange(e,t,o,n);-1!==r&&we(e,t,n,r,o)}function Te(t,e,n,o){const r=Ce(J.subscribe,t,e,n,o);if(r)return r;const s=n.subContext;return s&&s.hasEmitted?(s.callback=t.callback,s.valuesHandler(s.lastValues),-1):-1}function Ce(t,e,n,o,r){if(!e||!e.tagJsType||e.tagJsType!==t){return o.tagJsVar.delete(o,n),we(e,o,n,99,r),99}}function Se(t,e,n,o,r){return e.hasEmitted=!0,e.contextItem=be(t,n,o,[],r)}function ke(t,e){let n;return t&&(n=e=document.createTextNode(E),Do.push([Zo,[t,e]])),{appendMarker:n,insertBefore:e}}function Ee(t,e,n,o,r,s,c){const{appendMarker:u,insertBefore:a}=ke(s,c),i=function(t,e,n,o,r){const s=at(e);let c=function(t){Se(t,l,e,n,o),Ae(i),c=function(t){xe(l.contextItem,t,e,{added:0,removed:0}),Ae(i)}};function u(t,e){l.lastValues[e]=t,a(l.lastValues)}function a(t){if(Et(s.context.global.newest,s),l.callback){const e=l.callback(...t);c(e)}else c(t[0])}let i=!0;const l={lastValues:[],valueHandler:u,valuesHandler:a,callback:r,subscriptions:[]};return t.forEach(((t,e)=>{i=!0,l.subscriptions.push(t.subscribe((t=>u(t,e)))),i=!1})),l}(t,n,o,a,r);return i.appendMarker=u,e.subContext=i,e.tagJsVar.processUpdate=Te,i}function Ie(t,e){return t.subContext.subscriptions.forEach((t=>t.unsubscribe())),tr(t,e)}function Ae(t){t||kt.stateConfig.support||$o()}function Je(t,e,n,o,r,s){return Ee(t.Observables,e,n,o,t.callback,r,s)}function Ve(t,e,n,o,r,s){const c=t.Observables,u=Ee(c,e,n,o,t.callback,r,s);if(!u.hasEmitted){const e=c[0]?.value;u.valueHandler(e||t.withDefault,0)}return u}function Oe(t,e,n,o,r){Ee([t],e,n,o,void 0,r)}function Pe(t){return ct()?Re((()=>Me(t))):Me(t)}function Me(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{tagJsType:J.signal,processInit:Oe,processUpdate:(t,e,n,o)=>Ce(J.signal,t,e,n,o),get value(){return e},set value(t){e!==t&&(e=t,o(t))},delete:Ie,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class je extends xt{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class Le extends xt{value;constructor(t){super(t),this.value=t,this._value=t,Ct(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function He(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function Ne(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const Ue=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))};function Re(t){return kt.stateConfig.handlers.handler(t)}const De=(t,e)=>Be(t,e),We=t=>t;const Be=(t,e,{init:n,before:o,final:r=We}={})=>{const s=Re({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(o&&!o(t))return s.values=t,s.pastResult;const u=(n||e)(t,c);return s.pastResult=r(u),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(o&&!o(t))return s.values=t,s.pastResult;const u=e(t,c);return s.pastResult=r(u),c.length=0,c.push(...t),s.pastResult};function _e(t,e){return Object.defineProperty(e,"noInit",{get(){const e=t();return e.setup.init=()=>{},e}}),Object.defineProperty(e,"asSubject",{get(){const e=t(),n=Re((()=>ct())),o=Re((()=>new je(void 0))),r=Re((()=>({stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}))),s=(t,s)=>(Be(t,((t,e)=>{const c=ct(),u=s(t,e);if(c!==n){const t=r.stateArray,e=n.context.global.oldest;Pt(t,e.state,r.states,e.states)}o.next(u)}),e.setup),o);return s.setup=e.setup,_e((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function $e(t){return ct()?Re((()=>new xt(t))):new xt(t)}function Fe(t){return kt.stateConfig.handlers.statesHandler(t)}function Ge(t){const e=Pe([]),n=Pe(0),o=Pe(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),De(r,(()=>{++s,e.value=r,t((()=>r))})),Fe(((r,c)=>{if(s)return t(((...t)=>(c&&1!==c||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function ze(){return{stateDiff:0,provider:void 0}}_e((()=>function(t){const e=(e,n)=>Be(e,n,t);return e.setup=t,_e((()=>e),e),e}({})),De),$e._value=t=>{const e=Re((function(){return{stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}})),n=ct();return Re((function(){return new je(t).pipe((t=>(Pt(n.state,e.stateArray,n.states,e.states),t)))}))},$e.all=function(t){const e=Re((()=>({stateArray:kt.stateConfig.stateArray,states:kt.stateConfig.states}))),n=ct();return xt.all(t).pipe((t=>(Pt(n.state,e.stateArray,n.states,e.states),t)))};const Ze={create:t=>{const e=Re(ze);if(e.stateDiff){let t=e.stateDiff;for(;t--;)Re(void 0);return Re(void 0)}const n=Re((()=>{const n=kt.stateConfig,o=n.stateArray.length,r=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-o,u={constructMethod:t,instance:r,stateDiff:c,owner:s,children:[]};e.provider=u;const a=s.context.global;return(a.providers=a.providers||[]).push(u),e.stateDiff=c,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return Re((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=ct(),r=[];let s={ownerSupport:o.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.context.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{r.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context.global;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,r),new Error(c)}))}};class Xe extends Error{details;constructor(t,e,n={}){super(t),this.name=Xe.name,this.details={...n,errorCode:e}}}class qe extends Xe{constructor(t,e){super(t,"array-no-key-error",e),this.name=qe.name}}class Ye extends Xe{constructor(t,e){super(t,"state-mismatch-error",e),this.name=Ye.name}}class Qe extends Xe{constructor(t,e){super(t,"sync-callback-error",e),this.name=Qe.name}}function Ke(t){const e=ct();if(!e)throw nn;return tn(e,kt.stateConfig,t)}function tn(t,e,n){const o=e.states;return function(...e){return t.context.renderCount>0?function(t,e,n,...o){const r=t.context.global.newest,s=n(...o);return ro(r),q(s)&&s.finally((()=>{ro(r)})),s}(t,o,n,...e):n(...e)}}const en=()=>{const t=ct();if(!t)throw nn;const e=kt.stateConfig;return function(n){return tn(t,e,n)}},nn=new Qe("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function on(t){++Bo.locks,t.forEach(rn),--Bo.locks,$o()}function rn(t){const e=t.context.global;e&&ro(e.newest)}function sn(t,e,n,o,{resolvePromise:r,resolveValue:s}){if(q(t)){return e.context.locked=!0,t.then(function(t,e){return n=>{if(!0===t.context.global.deleted)return e(n);const o=t.context,r=t.context.global;delete o.locked,Et(t,r.newest);return on(ao(t)),e(n)}}(e,r))}return s(t)}function cn(t){Re((()=>{const e=t(),n=ct();return sn(e,n,n.context.global,0,{resolvePromise:un,resolveValue:an})}))}function un(t){return t}function an(t){return t}function ln(t){Re((function(){ct().context.global.destroy$.toCallback(t)}))}function pn(t=[]){return ct()?Re((()=>fn(Me(t)))):fn(Me(t))}function fn(t){const e=["push","pop","splice","shift","unshift"],n=["map","reduce","forEach","every"],o=new Proxy(t,{get(r,s){return isNaN(s)?"length"===s?t.value.length:e.includes(s)?o[c=s]=(...e)=>{const n=t.value[c](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var c},set:(e,n,o)=>isNaN(n)?"length"===n?(t.value.length=o,t.emit(t.value),!0):(t[n]=o,!0):(t.value[n]=o,t.emit(t.value),!0)});return o}function dn(t,e){const n=gn(t,e);return!(n||!e.templater.tag?._innerHTML||!gn(t.outerHTML,e))||n}function gn(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===J.stateRender)return n.dom===o.dom;switch(r.tagJsType){case J.dom:return s?.tagJsType===J.dom&&function(t,e){const n=t.dom,o=e.dom;return n===o}(r,s);case J.tag:{const n=function(t,e,n,o){const r=t.strings,s=e.strings;if(r.length!==s.length)return!1;if(!r.every(((t,e)=>s[e].length===t.length)))return!1;const c=n.templater.values||t.values,u=o.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const o=e.every((function(e,n){const o=t[n];if(typeof e===A.function&&typeof o===A.function){return!!(e.toString()===o.toString())}return!0}));if(o)return!0;return!1}(c,u)}(r,s,t,e);return n}}throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function hn(t,e,o){const r=e.global,s=r?.newest;if(z(t)){return dn(t,s)?(zt(e,t,s,o),-1):(re(s,r),n(e),7)}const c=t?.tagJsType;if(c){return!0===zt(e,t,r.newest.ownerSupport,o)?-1:88}return mn(e),8}function mn(t){const e=t.global,n=e?.newest;re(n,e),delete t.global,t.renderCount=0}function bn(t,e,n,o){const r=t.context.global;r.oldest=t,r.newest=t,++Bo.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===J.dom)return n.dom;const o=n.strings;return H(o,n.values)}(t),s=t.templater.tag,c=s.values,u=[],a=t.context.global;a.contexts=u;const i=Po(r,c,t,e,u,0,n,o);return i}(t,e,n,o);return r.htmlDomMeta=s.dom,--Bo.locks,s}function yn(t,e,n){const o={value:t,valueIndex:e.length,valueIndexSetBy:"addOneContext",tagJsVar:me(t),withinOwnerElement:n};return e.push(o),o}function vn(t,e,n){const o=e.global.newest,r=e.placeholder;return o.ownerSupport=t,bn(o,n,void 0,r),o}function wn(t){const e={tagJsType:J.templater,processInit:Cn,checkValueChange:hn};return e.tag=t,t.templater=e,e}function xn(t,e,n){const o=Ft(t,e,e.appSupport,n);return n.global.contexts=[],o}function Tn(t,e,n,o,r,s){const c=xn(t,n,e);c.ownerSupport=n;const u=bn(c,o,r,r?void 0:s);for(const t of u.dom)t.marker&&(r?Do.push([Zo,[r,t.marker]]):No.push([zo,[s,t.marker]])),t.domElement&&(r?Do.push([Zo,[r,t.domElement]]):No.push([zo,[s,t.domElement]]));return c}function Cn(t,e,n,o,r,s){return r?Tn(t,e,n,o,r,s):vn(n,e,o)}function Sn(t,e){const n={tagJsType:J.templater,processInit:Cn,processUpdate:Zt,checkValueChange:hn,delete:mn,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n}};return n}const kn=[];function En(t){const e=t.context;return oo(t.templater)?so(t):no(t,t,e)}function In(t,e,n){return t.map((function(t){return function(t,e,n,o){if(z(t)||!t)return t;if(!e)return t;return An(t,e,n,o)}(t,e.ownerSupport,e,n)}))}function An(t,e,n,o,r){if(!t)return t;if(t.tagJsType)return t;if(typeof t===A.function)return o<=1?function(t,e,n){const o=t.mem;if(o)return t;const r=function(...t){return function(t,e,n,o){const r=o.context.global,s=r?.newest||o,c=void 0===ct(),u=t.apply(e,n),a=function(){const t=s.context;return t.global&&!0!==t.locked?(En(s),u):u};if(c)return a();return kt.tagClosed$.toCallback(a),u}(r.mem,e,t,n)};return r.original=t,r.mem=t,Object.assign(r,t),r}(t,r,e):t;if(o===Xn)return t;return Vn(t)?t:K(t)?function(t,e,n,o){for(let r=t.length-1;r>=0;--r){const s=t[r];if(t[r]=An(s,n,e,o+1,t),typeof s===A.function){if(s.mem)continue;Jn(o+1,r,s,t,e)}}return t}(t,n,e,o):function(t,e,n,o){const r=Object.keys(t);for(const s of r){const r=t[s],c=An(r,n,e,o+1,t);if(t[s]===c)continue;const u=Object.getOwnPropertyDescriptor(t,s);if(!(u?.get||u?.set)&&(t[s]=c,typeof c===A.function)){if(r.mem)continue;Jn(o+1,s,r,t,e)}}return t}(t,n,e,o)}function Jn(t,e,n,o,r){if(t>0){const t=r.context.global;o[e].subscription=t.destroy$.toCallback((function(){o[e]=n}))}}function Vn(t){return typeof t!==A.object||!t||t.tagJsType}function On(t,e,n,o){const r=e.original,s=t.tagJsType===J.stateRender,c=kt.stateConfig;let u;return ut(n),s?u=t():(u=r(...o),typeof u===A.function&&(u=u())),u.templater=t,t.tag=u,n.state=c.stateArray,n.states=c.states,n}function Pn(t,e,n){const o=t.propWatch===Bn.DEEP?Xn:Zn,r=t.props,s=e.propsConfig;let c=s.castProps;const u=n?.propsConfig,a=u?.castProps;a&&(s.castProps=a,c=Qn(e,n,n.ownerSupport,r,o));return c||In(r,e,0)}function Mn(t,e,n){const o=Sn(Bn.DEEP);o.tagJsType=t.tagJsType;const r=xn(o,n,e);function s(){return o.tag=t(),r}return o.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,r}function jn(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const o=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,r=e.templater?.wrapper;let s=r;(r?.original||r?.original)&&(s=r.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},u=new Ye(o,c);throw console.error(Ln,c),u}(n,e,t)}const Ln="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function Hn(t,e){const n=t.context;++n.renderCount;const o=kt.stateConfig;t.state=o.stateArray,t.states=o.states,n.global.newest=t,jn(o,t),delete o.prevSupport,delete o.support,delete o.stateArray,delete o.states,kt.tagClosed$.next(e)}function Nn(t,e,n,o){!function(t,e){const n=e?.state;if(n)return void dt(t,e,n);ft(t)}(t,e);const r=t.templater;let s;if(r.tagJsType===J.stateRender){const e=r;s=Gt(r,o,t.appSupport,n),On(r,e,s)}else{s=(0,r.wrapper)(t,n,e)}return Hn(s,o),s.ownerSupport=t.ownerSupport,s}function Un(t,e,o,r,s,c){n(e);const u=Mn(t,e,o);return Nn(u,void 0,e),Tn(u.templater,e,o,r,s,c)}function Rn(t,e,n,o,r){const s=Gt(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==J.tagComponent?[]:Pn(t,s);c.castProps=e}return function(t,e,n){const o=bn(t,e,n,void 0);for(const t of o.dom)t.domElement&&Do.push([Zo,[n,t.domElement]]),t.marker&&Do.push([Zo,[n,t.marker]]);return t}(Nn(s,e.global.newest,e),o,r)}function Dn(t,e,o,r,s){if(n(e),s){return Rn(t,e,o,r,s)}const c=function(t,e,n,o){const r=Gt(t,n,n.appSupport,e),s=r.propsConfig;if(s){const e=t.tagJsType!==J.tagComponent?[]:Pn(t,r);s.castProps=e}const c=Nn(r,e.global.newest,e);return bn(c,o,void 0,e.placeholder),c}(t,e,o,r);return c}let Wn=0;var Bn;function _n(t,e=Bn.SHALLOW){const n=function(...o){const r=Sn(e,o);r.tagJsType=J.tagComponent,r.processInit=Dn;const s=function(t,e){return function(n,o,r){const s=Pn(t,n,r),c=n.ownerSupport,u=Gt(t,c,n.appSupport,o,s);return On(t,e,u,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;return n.original=t,o.tags=kn,o.setUse=kt,o.ValueTypes=J,o.tagIndex=Wn++,kn.push(n),n}function $n(t,e,n){if(uo(t,e))return 11;switch(n){case Bn.NONE:return 1;case Bn.SHALLOW:return zn(t,e);case Bn.IMMUTABLE:return Gn(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===A.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>Fn(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Fn(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o))))return 7;return!1}(t,e)}function Fn(t,e,n){if(typeof t!==A.function)return!!rt(t,e,Xn)&&4;if(typeof e!==A.function)return!1;const o=e?.original;o&&(e=o);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function Gn(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}function zn(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(K(n)&&K(r)){if(n===r)continue;return 3}if(typeof n!==A.function||typeof r!==A.function)if(typeof n!==A.object){if(n!==r)return 3.3}else if(typeof e===A.object){const t=Object.entries(n);for(const e of t){if(!qn(e,r))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(Bn||(Bn={})),_n.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},_n.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},_n.deepPropWatch=_n,_n.route=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},_n.app=function(t){throw new Error("Do not call tag.route as a function but instead set it as: `tag.route = (routeProps: RouteProps) => (state) => html`` `")},_n.immutableProps=function(t){return _n(t,Bn.IMMUTABLE)},_n.watchProps=function(t){return _n(t,Bn.SHALLOW)},Object.defineProperty(_n,"renderOnce",{set(t){t.tagJsType=J.renderOnce,t.processInit=Un,t.processUpdate=Zt,t.delete=mn,t.checkValueChange=function(){return-1}}}),Object.defineProperty(_n,"use",{set(t){t.original={setUse:kt,tags:kn},t.tagJsType=J.stateRender,t.processInit=Dn,t.processUpdate=Zt,t.checkValueChange=hn,t.delete=mn}});const Zn=3,Xn=10;function qn([t,e],n){const o=n[t];return typeof e===A.function&&typeof o===A.function||o===e}function Yn(t,e,n,o,r,s){return null==t||s>r?e:typeof t===A.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):Vn(e)?e:K(e)?function(t,e,n,o,r,s){for(let c=t.length-1;c>=0;--c){const u=t[c],a=e[c];t[c]=Yn(a,u,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const c=Object.keys(t);for(const u of c){const c=t[u],a=Yn(e[u],c,n,o,s,r+1);if(c===a)continue;const i=Object.getOwnPropertyDescriptor(t,u)?.set;i||(t[u]=a)}return t}(e,t,n,o,s,r)}function Qn(t,e,n,o,r,s=-1){const c=e.context.global;if(!c||!c.newest){const e=In(o,t,s);o.push(...e);return t.propsConfig.castProps=e,o}const u=(e=c.newest||e).propsConfig.castProps,a=[];for(let e=0;e<o.length;++e){const c=o[e],i=Yn(u[e],c,t,n,r,s+1);a.push(i)}return t.propsConfig.castProps=a,a}function Kn(t){const e=t.context,o=e.global,{subs:r,tags:s}=Yt(o.contexts);to(o);for(const t of s){const e=t.context.global;if(!0===e.deleted)return;to(e)}o.subscriptions&&r.forEach(Qt),n(e)}function to(t){t.deleted=!0,ne(t,[])}function eo(t,e,n){const o=Nn(t,e,n),r=!e||dn(e,o);if(r){if(e){const t=e.templater.tag;if(t&&n.renderCount>0){const n=e?.templater,o=n?.tag;!function(t,e,n){if(t.tagJsType===J.dom){const o=n?.dom;return void(o!==t.dom&&Kn(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&Kn(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context.global;let o=-1;const r=n.providers=n.providers||[],s=r.length-1;for(;o++<s;){const t=r[o];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].context.global)return t.children.splice(s,1),void t.children.push(e)}}(e,o),Kn(e);const t=o.context.global;t.oldest=o,t.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function no(t,e,n){const o=eo(e,t,n),r=n.global;return o.wasLikeTags?(Ut(r.oldest,o.support),o.support):vn(e,n,{added:0,removed:0})}function oo(t){return J.templater===t.tagJsType}function ro(t){const e=t.context,n=e.global,o=oo(t.templater);if(e.locked)return n.blocked.push(t),t;if(o){return so(t)}e.locked=!0,n.blocked.length&&(t=n.blocked.pop(),n.blocked=[]);const r=no(n.newest,t,e);return delete e.locked,r}function so(t){return ro(at(t).context.global.newest)}function co(t,e){const n=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(uo(n,r))return!0;switch(t.propWatch){case Bn.IMMUTABLE:return Gn(n,r);case Bn.SHALLOW:return zn(n,r)}return!rt(n,r,Xn)}(t,e);return!!n}function uo(t,e){return t.length!==e.length}function ao(t,e=[]){const n=t.context,o=oo(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return ao(r,e);const s=t,c=Z(s.templater),u=t.templater.tagJsType,a=r&&u!==J.stateRender&&(!c||co(s.templater,s)),i=function(t){const e=t.context.global.providers;if(!e)return[];const n=[];for(const t of e){const e=tt(t.owner,t);n.push(...e.map(et))}return n}(s);return e.push(...i),a?(ao(r,e),c&&e.push(s),e):(e.push(s),e)}function io(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=at(e),s=r.context;s.locked=!0;const c=t.apply(n,o);delete s.locked;return function(t,e){e.context.global;return function(t,e,n){return on(ao(t)),sn(e,t,0,0,{resolvePromise:fo,resolveValue:go})}(e,t)}(c,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}const lo="no-data-ever",po="promise-no-data-ever";function fo(){return po}function go(){return lo}function ho(t,e,n,o,r,s,c){if(c)return D(t,e,n,c);o(n,t,e)}function mo(t,e,n,o){const r=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.context.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,bo(t,s,t.target)};c[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function bo(t,e,n){const o=n[e];if(o){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&bo(t,e,r)}function yo(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,mo(n.appSupport,o,t,r)}function vo(t){return null==t||!1===t}function wo(t,e){t.removeAttribute(e)}function xo(t,e,n,o,r){if(n.isNameOnly)return function(t,e,n,o,r,s,c,u){if(n){if(vo(e))return void o.removeAttribute(n);if(typeof n===A.object)if(typeof e===A.object)for(const t in n)t in e||Ro.push([wo,[o,t]]);else for(const t in n)Ro.push([wo,[o,t]])}Eo(t,e,o,r,s,c,u)}(r,t,n.value,n.element,e,n.howToSet,[],{added:0,removed:0}),void(n.value=t);const s=n.element;!function(t,e,n,o,r,s,c,u){if(Y(t))return function(t,e,n,o,r,s,c,u){const a=t.templater.wrapper;if((a?.tagJsType||a?.original?.tagJsType)!==J.renderOnce)return Ao(c,e,t,o,n);return Io(e,n,o,r,s,t,u)}(r,t,o,e,c,s,n,u);Io(t,o,e,c,s,r,u)}(t,n.attrName,n,s,e,n.howToSet,n.isSpecial,{added:0,removed:0}),n.value=t}function To(t,e,n,o,r,s,c,u,i){const l=o.length;function p(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(a(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,l).join("");r(n,t,s)}e.forEach((e=>{if(a(e)>=0){const r=o.length,s=me(e),c={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:s,valueIndex:o.length,valueIndexSetBy:"createDynamicArrayAttribute"};s.processUpdate=function(t,e,n,o,r){p(r)};const a=u[r];c.value=a,o.push(c)}})),p(u)}function Co(t,e,n,o,r,s,c,u,a){const i=me(e),l={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:i,valueIndex:a,valueIndexSetBy:"createDynamicAttribute"};o.push(l),i.processUpdate=xo,function(t,e,n,o,r,s,c,u){n.element=o,n.howToSet=r,typeof e===A.function?Ao(n,e,s,t,o):(n.attrName=t,n.isSpecial=u,ho(t,e,o,r,0,0,u))}(t,e,l,n,r,s,0,u),l.value=e}function So(t){return Q(t)&&"tagJsVar"in t?t.tagJsVar:-1}function ko(t,e,n,o,r,s,c,u,a){const i=So(e);if(i>=0){const e=t[i],c=yn(e,s,!0);if(c.valueIndex=i,c.valueIndexSetBy="processAttribute",c.isAttr=!0,c.element=n,c.isNameOnly=!0,e.tagJsType)return c.tagJsVar=e,c.stateOwner=at(o),c.supportOwner=o,function(t,e,n){return void e.processInit(t,e,n)}(n,e,c);c.howToSet=r;return c.tagJsVar.processUpdate=xo,void Eo(t,e,n,o,r,s,u)}if(Array.isArray(a))return To(e,a,n,s,r,0,0,t);const l=So(a);if(l>=0){return Co(e,t[l],n,s,r,o,0,c,l)}return ho(e,a,n,r,0,0,c)}function Eo(t,e,n,o,r,s,u){if(!vo(e))if(typeof e!==A.object)0!==e.length&&r(n,e,E);else for(const a in e){const i=e[a];ko(t,a,n,o,r,s,c(a),u,i)}}function Io(t,e,n,o,r,s,c){if(!1===o){switch(t){case void 0:case!1:case null:return void Ro.push([Jo,[e,n]])}if(Y(t))return yo(e,t,s,n);r(e,n,t)}else D(n,t,e,o)}function Ao(t,e,n,o,r){e=io(e,n);return t.tagJsVar.processUpdate=xo,yo(r,e,n,o)}function Jo(t,e){t.removeAttribute(e)}function Vo(t,e,n,o,r,s,c){const u=document.createTextNode(E),a=yn(t,e,r>0);a.placeholder=u,s?Do.push([Zo,[s,u]]):No.push([zo,[c,u]]),ae(t,n,a,o,s,c)}const Oo=function(){};function Po(t,e,n,o,r,s,c,u){const a=[];c&&void 0===u&&(u=document.createTextNode(E),Do.push([Zo,[c,u]]),c=void 0);for(let i=0;i<t.length;++i){const l=t[i],p=l.v;if(!isNaN(p)){Vo(e[r.length],r,n,o,s,c,u);continue}const f={};if(a.push(f),"text"===l.nn){jo(f,l,c,u);continue}const d=Mo(f,l,e,n,r,o,c,u);l.ch&&(f.ch=Po(l.ch,e,n,o,r,s+1,d,u).dom)}return{dom:a,contexts:r}}function Mo(t,e,n,o,r,s,c,u){const a=t.domElement=document.createElement(e.nn);if(e.at)for(const t of e.at){const e=t[0],c=t[1],u=t[2]||!1;ko(n,e,a,o,t.length>1?R:U,r,u,s,c)}return c?Do.push([Zo,[c,a]]):No.push([zo,[u,a]]),a}function jo(t,e,n,o){const r=t,s=r.tc=e.tc;n?Do.push([Ko,[n,s,function(t){r.domElement=t}]]):No.push([Qo,[o,s,function(t){r.domElement=t}]])}function Lo(t){Ho.length&&(Ho[Ho.length-1].paintRemoves.push(...Uo),Uo=[]),Ho.push({promise:t,paintRemoves:Uo}),Uo=[]}let Ho=[],No=[],Uo=[],Ro=[],Do=[],Wo=[];const Bo={locks:0,removeLocks:0};function _o(t,e){e.textContent=t}function $o(){if(!(Bo.locks>0))return function(){(function(){if(Ho.length){const t=Ho.map((t=>t.promise.then((()=>{const e=t.paintRemoves;for(const t of e)t[0](...t[1])}))));Ho=[];const e=Uo;return Promise.all(t).then((()=>{for(const t of e)t[0](...t[1])}))}for(const t of Uo)t[0](...t[1])})(),Uo=[];for(const t of Ro)t[0](...t[1]);for(const t of Do)t[0](...t[1]);for(const t of No)t[0](...t[1])}(),void function(){No=[],Ro=[],Do=[];const t=Wo;Wo=[];for(const e of t)e[0](...e[1])}()}function Fo(t){Uo.push([Go,[t]])}function Go(t,e){t.parentNode.removeChild(t)}function zo(t,e){t.parentNode.insertBefore(e,t)}function Zo(t,e){t.appendChild(e)}const Xo="object"==typeof document&&document.createElement("div");function qo(t){return Xo.innerHTML=t,document.createTextNode(Xo.innerHTML)}function Yo(t,e,n=Oo){const o=qo(e);zo(t,o),n(o)}function Qo(t,e,n=Oo){Xo.innerHTML=e;const o=document.createTextNode(Xo.textContent);zo(t,o),n(o)}function Ko(t,e,n){Xo.innerHTML=e;const o=document.createTextNode(Xo.textContent);Zo(t,o),n(o)}function tr(t,e){const n=t.subContext;n.deleted=!0,delete t.subContext;const o=n.appendMarker;if(o&&(Fo(o),delete n.appendMarker),delete t.delete,!n.hasEmitted)return;const r=n.contextItem;return r.tagJsVar.delete(r,e),76}function er(t,e,o,r,s,c){const u=t;let a=u.templater;a||(a=wn(u));const i=n(e);return s?Tn(a,e,o,r,s,c):(i.newest=xn(a,o,e),vn(o,e,r))}function nr(t,e,n,o,r,s){er(t.outerHTML,e,n,o,r,s);e.tagJsVar.processUpdate=function(t,e,n,o){xe(n,t?.outerHTML||t,e,o)},t.checkValueChange=or}function or(t,e,n){return hn(t,e,n)}function rr(t,e){const n={values:e,ownerSupport:ct(),dom:t,tagJsType:J.dom,processInit:er,processUpdate:Zt,checkValueChange:hn,delete:mn,key:function(t){return n.arrayValue=t,n},setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=nr,n},acceptInnerHTML:function(t){return t.owner=n,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return Object.defineProperty(n,"innerHTML",{set:t=>n.setHTML(t)}),n}function sr(t,...e){const n=function(t,e){const n={values:e,ownerSupport:ct(),tagJsType:J.tag,processInit:er,processUpdate:Zt,checkValueChange:hn,delete:mn,strings:t,key:t=>(n.arrayValue=t,n),setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=nr,n},acceptInnerHTML:function(t){return t.owner=n,n},html:function(t,e){return n.children={strings:t,values:e},n}};return Object.defineProperty(n,"innerHTML",{set:t=>n.setHTML(t)}),n}(t,e),o=Sn(Bn.NONE);return o.tag=n,n.templater=o,n}function cr(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}function ur(t,e,n){const o=e.global,r=_t(t,e);return $t(t,r,r),r.appElement=n,o.oldest=o.oldest||r,o.newest=r,r}function ar(t,e,n,o,r,s,c){const u=document.createTextNode(E);kn.push(n.wrapper||{original:n});const a=function(t,e,n,o,r){o.placeholder=e;const s=o.global,c=s.oldest,u=s.newest===c,a=Gt(t,s.newest,s.newest.appSupport,o);u||dt(a,s.newest,c.state);if(t.tagJsType===J.stateRender)return function(t,e,n,o,r){const s=t.wrapper||{original:t};if(!e){const e=ur(t,o,r);return Hn(e),e}return On(t,s,n),Hn(n),n}(t,r,a,o,n);const i=t.wrapper,l=i(a,o);return Hn(a),l}(n,u,r,s,c);if(e.isApp=!0,c&&(o.tag=a.templater.tag),!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=e.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}e.events={},++Bo.locks;const n=re(a,e);return--Bo.locks,$o(),n},++Bo.locks;const i=function(t,e,n,o,r,s){console.debug("🏷️ Building element into tag...",{element:e,app:r,support:t});const c=bn(t,{added:0,removed:0},e,void 0);n.oldest=t,n.newest=t;let u=o.setUse;if(o.tagJsType!==J.stateRender){const t=r.original;u=t.setUse,t.isApp=!0}e.setUse=u,e.ValueTypes=J,ir.push({element:e,support:t});const a=document.createDocumentFragment();a.appendChild(s);for(const t of c.dom)cr(t,a);return console.debug("🏷️ Element Tag DOM built ✅"),a}(a,r,e,n,t,u);return--Bo.locks,$o(),r.appendChild(i),{support:a,tags:kn,ValueTypes:J}}sr.dom=function(t,...e){return rr(t,e)},"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const ir=[];function lr(t,e,o){const r=ir.findIndex((t=>t.element===e));if(r>=0){const t=ir[r].support;re(t,t.context.global),ir.splice(r,1),console.warn("Found and destroyed app element already rendered to element",{element:e})}let s=()=>a(o);s.propWatch=Bn.NONE,s.tagJsType=J.stateRender,s.processUpdate=Zt,s.props=[o],s.isApp=!0;const c=function(t,e){const o={value:t,valueIndex:0,valueIndexSetBy:"getNewSubject",withinOwnerElement:!1,renderCount:0,global:void 0,tagJsVar:{tagJsType:"templater",checkValueChange:hn,delete:mn,processInit:function(){console.debug("do nothing app function")},processUpdate:Zt}},r=n(o);return r.events={},ur(t,o,e),o}(s,e),u=c.global;ft(u.newest);let a=t(o);const i=typeof a==A.function;return i||(Z(a)?(u.newest.propsConfig={latest:[o],castProps:[o]},s.propWatch=a.propWatch,s.tagJsType=a.tagJsType,s.wrapper=a.wrapper,s=a):(s.tag=a,a=t)),ar(t,u,s,a,e,c,i)}function pr(t){if(!t)return Oo;const e=ct();if(!e)throw new Error("output must be used in render sync fashion");return(...n)=>{const o=e.ownerSupport;return fr(n,t,o)}}function fr(t,e,n){const o=n.context.global.newest;It(o.states,n.states);const r=e(...t);return It(n.states,o.states),Wo.push([()=>{o.context.global&&(++Bo.locks,En(o),--Bo.locks,$o())},[]]),r}function dr(t,e){const n=ct(),o=n?at(n).states:[];return{tagJsType:J.subscribe,processInit:Je,processUpdate:Te,delete:Ie,callback:e,states:o,Observables:[t]}}function gr(t,e,n,o){const r=t.owner._innerHTML;r.processInit=r.oldProcessInit;const s=n.subContext?.contextItem;xe(s,r,e,o)}function hr(t,e,n,o,r,s){e.subContext={},t.processUpdate=gr,function(t,e,n,o,r,s){const{appendMarker:c,insertBefore:u}=ke(s,r),a=n.subContext;a.appendMarker=c;const i=t.owner,l=i._innerHTML;l.processInit=l.oldProcessInit,Se(l,a,e,o,u)}(t,n,e,o,s,r)}function mr(){return{tagJsType:"innerHTML",processInit:hr,processUpdate:gr,delete:tr}}function br(t,e){return{tagJsType:J.subscribe,processInit:yr,processUpdate:Oo,delete:Ie,callback:e,states:at(ct()).states,Observables:t}}function yr(t,e,n,o,r){return Ee(t,e,n,o,void 0,r)}function vr(t,e={}){return{tagJsType:J.host,processInit:xr,processUpdate:wr,delete:Tr,options:{callback:t,...e}}}function wr(t,e,n,o){const r=Ce(J.host,t,e,n,o);if(r)return r;const s=n.tagJsVar.options,c=n.element;s.callback(c,t,n)}function xr(t,e,n){e.options.callback(t,e,n);const o=e.options;if(o.onInit){const t=n.element;o.onInit(t,e,n)}}function Tr(t){const e=t.tagJsVar,n=e.options;if(n.onDestroy){const o=t.element;fr([],(function(){return n.onDestroy(o,e,t)}),t.stateOwner)}}function Cr(t,e,n){return{tagJsType:J.subscribe,processInit:Ve,processUpdate:Oo,delete:Ie,callback:n,withDefault:e,states:at(ct()).states,Observables:[t]}}vr.onInit=t=>vr((()=>{}),{onInit:t}),vr.onDestroy=t=>vr((()=>{}),{onDestroy:t});const Sr={tagElement:lr,renderWithSupport:eo,renderSupport:ro,renderTagOnly:Nn,paint:$o};var kr=e.W9,Er=e.cg,Ir=e.m0,Ar=e.rS,Jr=e.Y2,Vr=e.ei,Or=e.B7,Pr=e.TU,Mr=e.XF,jr=e.PC,Lr=e.Ot,Hr=e.Mj,Nr=e.tD,Ur=e.j8,Rr=e.Gf,Dr=e.xe,Wr=e.YO,Br=e.um,_r=e.E2,$r=e.OH,Fr=e.TB,Gr=e.Ii,zr=e.m3,Zr=e.yV,Xr=e.zV,qr=e.pf,Yr=e.ze,Qr=e.WJ,Kr=e.Ng,ts=e.HG,es=e.aZ,ns=e.Ey,os=e.O,rs=e.F3,ss=e.Ie,cs=e.ts,us=e.B4,as=e.Az,is=e.Xi,ls=e.sV,ps=e.Ah,fs=e.Gk,ds=e.j_,gs=e.zC,hs=e.cF,ms=e.Hc,bs=e.jU,ys=e.PB,vs=e.uq,ws=e.qy,xs=e.cy,Ts=e.Tn,Cs=e.Gv,Ss=e.yL,ks=e.D8,Es=e.Ze,Is=e._4,As=e.mn,Js=e.z,Vs=e.sA,Os=e.TG,Ps=e.MG,Ms=e.PL,js=e.CG,Ls=e.nI,Hs=e.Fs,Ns=e.PZ,Us=e.r5,Rs=e.uc,Ds=e.pG,Ws=e.QB,Bs=e.Ll,_s=e.vP,$s=e.wk,Fs=e.xP,Gs=e.bc,zs=e.B1,Zs=e.RX,Xs=e.ag,qs=e.Tc,Ys=e.Hf,Qs=e.zc,Ks=e._A,tc=e.Ag,ec=e.Pc,nc=e.NU,oc=e.wB,rc=e.id,sc=e.MC,cc=e.SZ;export{kr as ArrayNoKeyError,Er as BasicTypes,Ir as ImmutableTypes,Ar as PropWatches,Jr as RouteQuery,Vr as StateMismatchError,Or as Subject,Pr as Subjective,Mr as SyncCallbackError,jr as TagError,Lr as ValueSubject,Hr as ValueSubjective,Nr as ValueTypes,Ur as addOneContext,Rr as addPaintRemoveAwait,Dr as appElements,Wr as array,Br as buildBeforeElement,_r as callback,$r as callbackMaker,Fr as checkArrayValueChange,Gr as checkSimpleValueChange,zr as checkSubContext,Zr as checkTagValueChange,Xr as combineLatest,qr as createHtmlSupport,Yr as createTrigger,Qr as defineValueOn,Kr as deleteSimpleValue,ts as deleteSubContext,es as destroyArray,ns as destroyArrayContextItem,os as destroySupport,rs as destroySupportByContextItem,ss as empty,cs as forceUpdateExistingValue,us as getBaseSupport,as as getDomMeta,is as getDomTag,ls as getInnerHTML,ps as getNewGlobal,fs as getTemplaterResult,ds as guaranteeInsertBefore,gs as hasPropChanges,hs as hmr,ms as host,bs as howToSetFirstInputValue,ys as howToSetInputValue,vs as howToSetStandAloneAttr,ws as html,xs as isArray,Ts as isFunction,Cs as isObject,Ss as isPromise,ks as isSimpleType,Es as isStaticTag,Is as isSubjectInstance,As as isTagComponent,Js as letProp,Vs as onDestroy,Os as onFirstSubContext,Ps as onInit,Ms as oneRenderToSupport,js as output,Ls as paint,Hs as pipe,Ns as processFirstSubjectValue,Us as providers,Rs as renderSupport,Ds as renderTagOnly,Ws as renderWithSupport,Bs as setUseMemory,_s as signal,$s as state,Fs as states,Gs as subject,zs as subscribe,Zs as subscribeWith,Xs as syncError,qs as tag,Ys as tagElement,Qs as tagValueUpdateHandler,Ks as tags,tc as upgradeBaseToSupport,ec as valueToTagJsVar,nc as variablePrefix,oc as watch,rc as willCallback,sc as willPromise,cc as willSubscribe};
2
2
  //# sourceMappingURL=bundle.js.map