taggedjs 2.8.37 → 2.8.43

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 (95) hide show
  1. package/bundle.js +1 -1
  2. package/bundle.js.gz +0 -0
  3. package/bundle.js.map +1 -1
  4. package/bundle.js.map.gz +0 -0
  5. package/js/interpolations/attributes/checkToResolvePromise.function.js +0 -1
  6. package/js/interpolations/attributes/checkToResolvePromise.function.js.map +1 -1
  7. package/js/interpolations/attributes/howToSetInputValue.function.d.ts +3 -3
  8. package/js/interpolations/attributes/howToSetInputValue.function.js.map +1 -1
  9. package/js/interpolations/attributes/isSpecialAttribute.function.d.ts +2 -2
  10. package/js/interpolations/attributes/isSpecialAttribute.function.js +0 -6
  11. package/js/interpolations/attributes/isSpecialAttribute.function.js.map +1 -1
  12. package/js/interpolations/attributes/processNameValueAttribute.function.js +1 -6
  13. package/js/interpolations/attributes/processNameValueAttribute.function.js.map +1 -1
  14. package/js/interpolations/attributes/renderTagArray.function.js.map +1 -1
  15. package/js/interpolations/attributes/specialAttribute.d.ts +2 -4
  16. package/js/interpolations/attributes/specialAttribute.js +5 -31
  17. package/js/interpolations/attributes/specialAttribute.js.map +1 -1
  18. package/js/interpolations/attributes/updateAttribute.function.js.map +1 -1
  19. package/js/interpolations/optimizers/parseHTML.function.js +5 -0
  20. package/js/interpolations/optimizers/parseHTML.function.js.map +1 -1
  21. package/js/render/attributes/createDynamicAttribute.function.d.ts +1 -1
  22. package/js/render/attributes/createDynamicAttribute.function.js +1 -1
  23. package/js/render/attributes/createDynamicAttribute.function.js.map +1 -1
  24. package/js/render/attributes/processAttribute.function.d.ts +4 -4
  25. package/js/render/attributes/processAttribute.function.js +2 -3
  26. package/js/render/attributes/processAttribute.function.js.map +1 -1
  27. package/js/render/attributes/processUpdateAttrContext.function.d.ts +2 -1
  28. package/js/render/attributes/processUpdateAttrContext.function.js +1 -1
  29. package/js/render/attributes/processUpdateAttrContext.function.js.map +1 -1
  30. package/js/render/dom/attachDomElements.function.js +2 -1
  31. package/js/render/dom/attachDomElements.function.js.map +1 -1
  32. package/js/render/index.d.ts +1 -0
  33. package/js/render/index.js +1 -0
  34. package/js/render/index.js.map +1 -1
  35. package/js/render/paint.function.d.ts +6 -2
  36. package/js/render/paint.function.js +57 -9
  37. package/js/render/paint.function.js.map +1 -1
  38. package/js/render/renderExistingTag.function.js +2 -1
  39. package/js/render/renderExistingTag.function.js.map +1 -1
  40. package/js/render/renderSupport.function.js.map +1 -1
  41. package/js/render/renderWithSupport.function.js +4 -1
  42. package/js/render/renderWithSupport.function.js.map +1 -1
  43. package/js/render/update/updateExistingTagComponent.function.js +2 -2
  44. package/js/render/update/updateExistingTagComponent.function.js.map +1 -1
  45. package/js/state/array.function.js.map +1 -1
  46. package/js/state/callbackStateUpdate.function.js +0 -4
  47. package/js/state/callbackStateUpdate.function.js.map +1 -1
  48. package/js/state/signal.function.js +1 -3
  49. package/js/state/signal.function.js.map +1 -1
  50. package/js/tag/ProcessUpdate.type.d.ts +1 -1
  51. package/js/tag/createHtmlSupport.function.js +3 -1
  52. package/js/tag/createHtmlSupport.function.js.map +1 -1
  53. package/js/tag/getTemplaterResult.function.d.ts +0 -1
  54. package/js/tag/getTemplaterResult.function.js.map +1 -1
  55. package/js/tag/output.function.js +15 -3
  56. package/js/tag/output.function.js.map +1 -1
  57. package/js/tag/processOuterDomTagInit.function.js +1 -1
  58. package/js/tag/processOuterDomTagInit.function.js.map +1 -1
  59. package/js/tag/processUpdateContext.function.js +1 -1
  60. package/js/tag/processUpdateContext.function.js.map +1 -1
  61. package/js/tag/smartRemoveKids.function.js +4 -40
  62. package/js/tag/smartRemoveKids.function.js.map +1 -1
  63. package/js/tag/update/checkSubContext.function.d.ts +1 -1
  64. package/js/tag/update/checkSubContext.function.js +2 -2
  65. package/js/tag/update/checkSubContext.function.js.map +1 -1
  66. package/js/tag/update/compareArrayItems.function.js +2 -2
  67. package/js/tag/update/compareArrayItems.function.js.map +1 -1
  68. package/js/tag/update/deleteSubContext.function.js +2 -2
  69. package/js/tag/update/deleteSubContext.function.js.map +1 -1
  70. package/js/tag/update/processTagArray.js +1 -1
  71. package/js/tag/update/processTagArray.js.map +1 -1
  72. package/js/tag/update/tagValueUpdateHandler.function.d.ts +1 -1
  73. package/js/tag/update/tagValueUpdateHandler.function.js +1 -1
  74. package/js/tag/update/tagValueUpdateHandler.function.js.map +1 -1
  75. package/js/tag/update/updateToDiffValue.function.js +2 -0
  76. package/js/tag/update/updateToDiffValue.function.js.map +1 -1
  77. package/js/tagJsVars/getInnerHTML.function.js +1 -1
  78. package/js/tagJsVars/getInnerHTML.function.js.map +1 -1
  79. package/js/tagJsVars/getSimpleTagVar.function.js +4 -3
  80. package/js/tagJsVars/getSimpleTagVar.function.js.map +1 -1
  81. package/js/tagJsVars/host.function.d.ts +10 -4
  82. package/js/tagJsVars/host.function.js +14 -9
  83. package/js/tagJsVars/host.function.js.map +1 -1
  84. package/js/tagJsVars/index.d.ts +1 -1
  85. package/js/tagJsVars/index.js +1 -1
  86. package/js/tagJsVars/index.js.map +1 -1
  87. package/js/tagJsVars/subscribe.function.js +0 -3
  88. package/js/tagJsVars/subscribe.function.js.map +1 -1
  89. package/package.json +1 -1
  90. /package/js/{errors.d.ts → Errors.d.ts} +0 -0
  91. /package/js/{errors.js → Errors.js} +0 -0
  92. /package/js/{errors.js.map → Errors.js.map} +0 -0
  93. /package/js/subject/{subject.utils.d.ts → Subject.utils.d.ts} +0 -0
  94. /package/js/subject/{subject.utils.js → Subject.utils.js} +0 -0
  95. /package/js/subject/{subject.utils.js.map → Subject.utils.js.map} +0 -0
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:()=>tn,cg:()=>V,m0:()=>J,rS:()=>zn,Y2:()=>o,ei:()=>en,B7:()=>xt,TU:()=>Tt,XF:()=>nn,PC:()=>Ke,Ot:()=>Ue,Mj:()=>We,tD:()=>A,j8:()=>Tn,xe:()=>lr,YO:()=>hn,um:()=>xn,E2:()=>on,OH:()=>sn,TB:()=>Kt,Ii:()=>be,m3:()=>Ee,yV:()=>vn,zV:()=>yt,pf:()=>Ft,ze:()=>rn,WJ:()=>Ct,Ng:()=>me,HG:()=>er,aZ:()=>ee,Ey:()=>te,O:()=>ae,F3:()=>wn,Ie:()=>E,ts:()=>Se,B4:()=>_t,Az:()=>H,Xi:()=>sr,sV:()=>br,Ah:()=>n,Gk:()=>Vn,j_:()=>Ae,zC:()=>Zn,cF:()=>Sr,Hc:()=>wr,jU:()=>U,PB:()=>N,qy:()=>cr,cy:()=>K,Tn:()=>q,Gv:()=>Q,yL:()=>Y,D8:()=>z,Ze:()=>G,_4:()=>X,mn:()=>Z,z:()=>Ye,sA:()=>gn,TG:()=>Ve,MG:()=>pn,PL:()=>Nn,CG:()=>fr,nI:()=>zo,Fs:()=>yr,PZ:()=>pe,r5:()=>Qe,uc:()=>ao,pG:()=>Dn,QB:()=>so,Ll:()=>St,vP:()=>He,wk:()=>_e,xP:()=>Xe,bc:()=>Ze,B1:()=>gr,RX:()=>kr,ag:()=>cn,Tc:()=>Gn,Hf:()=>pr,zc:()=>Zt,_A:()=>An,Ag:()=>$t,Pc:()=>we,NU:()=>r,wB:()=>$e,id:()=>Re,MC:()=>De,SZ:()=>Be});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";case"oninit":case"init":return"init";case"ondestroy":case"destroy":return"destroy"}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),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){Do.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 W(t,e,n,o,r,s){switch(o){case"init":{const t=s.added++;return void _o.push([F,[n,t,e]])}case"destroy":{const t=s.removed++,o=r.context.global;return o.destroys=o.destroys||[],void o.destroys.push((()=>e({target:n,stagger:t})))}case"autofocus":return void _o.push([$,[n]]);case"autoselect":return void _o.push([_,[n]]);case"style":{const o=t.split(".");return void Do.push([R,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)Do.push([D,[n,t]]);return}for(const t of o)Do.push([B,[n,t]])}(t,e,n)}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function R(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,e,n){n({target:t,stagger:e})}function z(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 X(t){return Q(t)&&typeof t.subscribe===V.function}function Y(t){return t&&q(t.then)}function q(t){return typeof t===V.function}function Q(t){return typeof t===V.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!==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=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,!q(o)||!q(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():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 St.stateConfig.support}function ut(t){return St.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=St.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(it)}function pt(t){const e=St.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=St.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=St.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=St.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function bt(t){const e=St.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 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 kt=new xt(void 0,(function(t){ct()||t.next()})),St={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:bt,statesHandler:lt}},tagClosed$:kt};function Et(t,e){return Jt(t.states,e.states)}function Jt(t,e){for(let n=0;n<t.length;++n){Pt(t[n],e[n])}}let Vt;function At(...t){return Vt=t,t}function Ot(){return Vt}function Pt(t,e){t(At,1),e(Ot,2)}function It(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=t[e],c=n[e];if(s===c.value)return;c.tagJsVar.processUpdate(s,o,c,t,r),c.value=s}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),++$o.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),--$o.locks,zo()}function Wt(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 Wt(n.values)}return K(t)?Wt(n):nt(t,e)}function Dt(t){return Rt(t,Qn)}function Bt(t){return Rt(t,Kn)}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!==A.stateRender){switch(o.propWatch){case zn.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case zn.SHALLOW:return t.propsConfig={latest:e.map(Dt),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 zt(t,e,n,o,r){const s=_t(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=zt(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||bn(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;ae(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=Zn(n,r,t.templater.propWatch);return s}(s,p);if(!f){return void function(t,e,n,o,r){const s=t.props,c=no(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===zn.DEEP?Kn:Qn)}if(o.locked)return void r.blocked.push(e);ao(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=zt(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,r){t!==n.value&&Se(n,t,e,r)}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 Yt(t,e){for(const n of t){const t=n.lastArray;if(t){Yt(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)&&Xt(s,r);Yt(r.contexts,s)}}function qt(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&&qt(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)le(e[t]);delete t.lastArray}function ne(t,e){const n=t.contexts,o=t.destroys;if(o)return function(t,e,n){if(oe.length=0,t.forEach(re),oe.length){const t=Promise.all(oe).then((()=>{++$o.locks,se(e.contexts,n),ce(e),--$o.locks,zo()}));return void n.push(t)}++$o.locks,se(e.contexts,n),ce(e),--$o.locks,zo()}(o,t,e);se(n,e),ce(t)}const oe=[];function re(t){const e=t();e instanceof Promise&&oe.push(e)}function se(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,Ro.push([Go,[o,"destroy simpleValueElm"]]);continue}const r=n.global;if(void 0===r)continue;if(!0===r.deleted)continue;r.deleted=!0;r.oldest&&ne(r,e)}}function ce(t){const e=t.htmlDomMeta;for(let t=e.length-1;t>=0;--t){ue(e[t]),e.splice(t,1)}}function ue(t){const e=t.marker;e&&Ro.push([Go,[e,"destroy-marker-clone"]]);const n=t.domElement;n&&Ro.push([Go,[n,"destroy-clone"]])}function ae(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return Yt(e.contexts,t),e.destroy$&&Xt(t,e),ne(e,o),o}function ie(t,e,n,o){const r=t.length-1,s=e-o,c=s<0||r<s,u=n[e];if(c)return le(u),1;const a=function(t,e,n,o,r){const s=e&&t!==e.arrayValue;if(s)return le(n),o.splice(r,1),2;return 0}(u.value.arrayValue,t[e],u,n,e);return a}function le(t){!function(t,e){if(t){return void ae(t.oldest,t)}const n=e.simpleValueElm;delete e.simpleValueElm,Ro.push([Go,[n,"array-delete"]])}(t.global,t)}function pe(t,e,n,o,r,s){return e.tagJsVar.processInit(t,e,n,o,r,s)}function fe(t,e,n,o,r,s){const c=e.context;c.locked=!0,pe(t,n,e,o,r,s),delete c.locked,n.value=t}function de(t){switch(t){case void 0:case!1:case null:return E}return t}function ge(t){return{tagJsType:"simple",value:t,processInit:he,delete:me,checkValueChange:be,processUpdate:Zt}}function he(t,e,n,o,r,s){const c=de(t);s=e.placeholder;const u=e.paint=[Qo,[s,c,function(t){e.simpleValueElm=t,delete e.paint}]];Ro.push(u)}function me(t){const e=t.simpleValueElm;delete t.simpleValueElm,Ro.push([Go,[e,"simple-tag-remove"]])}function be(t,e){return null==t||typeof t!==V.object?(function(t,e){const n=de(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;Do.push([Fo,[n,o]])}(t,e),-1):(me(e),6)}function ye(t){return{tagJsType:"array",value:t,processInit:ve,processUpdate:Zt,checkValueChange:Kt,delete:te}}function ve(t,e,n,o,r){Te(e,t,n,o,r)}function we(t){const e=t?.tagJsType;return e?t:function(t){if(K(t))return ye(t);return ge(t)}(t)}function xe(t,e,n,o,r){const s=document.createTextNode(E),c={value:t,tagJsVar:we(t),withinOwnerElement:!1,placeholder:s};return r||Ro.push([Zo,[o,s]]),fe(t,e,c,n,r,o),r&&Bo.push([Xo,[r,s]]),c}function Te(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=ie(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=Ce(e,s,t.lastArray,n,u,o,r).placeholder}}function Ce(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,0,c),e;const i=xe(t,o,c,s,u);return n.push(i),i}(u,a,n,o,e,r,s,c);const i=xe(u,o,s,r,c);return n.push(i),i}function ke(t,e,n,o,r){const s=t&&t.tagJsType;if(s){if(s===A.renderOnce)return;Gt(e,t,n,r)}else{if(K(t))return Te(e,t,n,r),void(e.tagJsVar=ye(t));typeof t!==V.function?o&&function(t,e){e.value=t,e.tagJsVar=ge(t);const n=e.placeholder,o=de(t),r=e.paint=[Qo,[n,o,function(t){e.simpleValueElm=t,delete e.paint}]];Ro.push(r)}(t,e):e.value=t}}function Se(t,e,n,o){const r=t.tagJsVar.checkValueChange(e,t,o,n);-1!==r&&ke(e,t,n,r,o)}function Ee(t,e,n,o,r){const s=Je(A.subscribe,t,e,n,r);if(s)return s;const c=n.subContext;return c.hasEmitted?(c.callback=t.callback,c.valuesHandler(c.lastValues),-1):-1}function Je(t,e,n,o,r){if(!e||!e.tagJsType||e.tagJsType!==t){return o.tagJsVar.delete(o,n),ke(e,o,n,99,r),99}}function Ve(t,e,n,o,r){return e.hasEmitted=!0,e.contextItem=xe(t,n,o,r)}function Ae(t,e){let n;return t&&(n=e=document.createTextNode(E),Bo.push([Xo,[t,e]])),{appendMarker:n,insertBefore:e}}function Oe(t,e,n,o,r,s,c){const{appendMarker:u,insertBefore:a}=Ae(s,c),i=function(t,e,n,o,r){const s=at(e);let c=function(t){Ve(t,l,e,n,o),Ie(i),c=function(t){Se(l.contextItem,t,e,{added:0,removed:0}),Ie(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=Ee,i}function Pe(t,e){return t.subContext.subscriptions.forEach((t=>t.unsubscribe())),er(t,e)}function Ie(t){t||St.stateConfig.support||zo()}function Me(t,e,n,o,r,s){return Oe(t.Observables,e,n,o,t.callback,r,s)}function je(t,e,n,o,r,s){const c=t.Observables,u=Oe(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 Le(t,e,n,o,r){Oe([t],e,n,o,void 0,r)}function He(t){return ct()?_e((()=>Ne(t))):Ne(t)}function Ne(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{tagJsType:A.signal,processInit:Le,processUpdate:(t,e,n,o,r)=>Je(A.signal,t,e,n,r),get value(){return e},set value(t){e!==t&&(e=t,o(t))},delete:Pe,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class Ue extends xt{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class We 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 Re(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function De(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const Be=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))};function _e(t){return St.stateConfig.handlers.handler(t)}const $e=(t,e)=>ze(t,e),Fe=t=>t;const ze=(t,e,{init:n,before:o,final:r=Fe}={})=>{const s=_e({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 Ge(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=_e((()=>ct())),o=_e((()=>new Ue(void 0))),r=_e((()=>({stateArray:St.stateConfig.stateArray,states:St.stateConfig.states}))),s=(t,s)=>(ze(t,((t,e)=>{const c=ct(),u=s(t,e);if(c!==n){const t=r.stateArray,e=n.context.global.oldest;It(t,e.state,r.states,e.states)}o.next(u)}),e.setup),o);return s.setup=e.setup,Ge((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function Ze(t){return ct()?_e((()=>new xt(t))):new xt(t)}function Xe(t){return St.stateConfig.handlers.statesHandler(t)}function Ye(t){const e=He([]),n=He(0),o=He(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),$e(r,(()=>{++s,e.value=r,t((()=>r))})),Xe(((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 qe(){return{stateDiff:0,provider:void 0}}Ge((()=>function(t){const e=(e,n)=>ze(e,n,t);return e.setup=t,Ge((()=>e),e),e}({})),$e),Ze._value=t=>{const e=_e((function(){return{stateArray:St.stateConfig.stateArray,states:St.stateConfig.states}})),n=ct();return _e((function(){return new Ue(t).pipe((t=>(It(n.state,e.stateArray,n.states,e.states),t)))}))},Ze.all=function(t){const e=_e((()=>({stateArray:St.stateConfig.stateArray,states:St.stateConfig.states}))),n=ct();return xt.all(t).pipe((t=>(It(n.state,e.stateArray,n.states,e.states),t)))};const Qe={create:t=>{const e=_e(qe);if(e.stateDiff){let t=e.stateDiff;for(;t--;)_e(void 0);return _e(void 0)}const n=_e((()=>{const n=St.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 _e((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 Ke extends Error{details;constructor(t,e,n={}){super(t),this.name=Ke.name,this.details={...n,errorCode:e}}}class tn extends Ke{constructor(t,e){super(t,"array-no-key-error",e),this.name=tn.name}}class en extends Ke{constructor(t,e){super(t,"state-mismatch-error",e),this.name=en.name}}class nn extends Ke{constructor(t,e){super(t,"sync-callback-error",e),this.name=nn.name}}function on(t){const e=ct();if(!e)throw cn;return rn(e,St.stateConfig,t)}function rn(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 ao(r),Y(s)&&s.finally((()=>{ao(r)})),s}(t,o,n,...e):n(...e)}}const sn=()=>{const t=ct();if(!t)throw cn;const e=St.stateConfig;return function(n){return rn(t,e,n)}},cn=new nn("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function un(t){++$o.locks,t.forEach(an),--$o.locks,zo()}function an(t){const e=t.context.global;e&&ao(e.newest)}function ln(t,e,n,o,{resolvePromise:r,resolveValue:s}){if(Y(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 un(fo(t)),e(n)}}(e,r))}return s(t)}function pn(t){_e((()=>{const e=t(),n=ct();return ln(e,n,n.context.global,0,{resolvePromise:fn,resolveValue:dn})}))}function fn(t){return t}function dn(t){return t}function gn(t){_e((function(){ct().context.global.destroy$.toCallback(t)}))}function hn(t=[]){return ct()?_e((()=>mn(Ne(t)))):mn(Ne(t))}function mn(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 bn(t,e){const n=yn(t,e);return!(n||!e.templater.tag?._innerHTML||!yn(t.outerHTML,e))||n}function yn(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 vn(t,e,o){const r=e.global,s=r?.newest;if(G(t)){return bn(t,s)?(Gt(e,t,s,o),-1):(ae(s,r),n(e),7)}const c=t?.tagJsType;if(c){return!0===Gt(e,t,r.newest.ownerSupport,o)?-1:88}return wn(e),8}function wn(t){const e=t.global,n=e?.newest;ae(n,e),delete t.global,t.renderCount=0}function xn(t,e,n,o){const r=t.context.global;r.oldest=t,r.newest=t,++$o.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=No(r,c,t,e,u,0,n,o);return i}(t,e,n,o);return r.htmlDomMeta=s.dom,--$o.locks,s}function Tn(t,e,n){const o={value:t,tagJsVar:we(t),withinOwnerElement:n};return e.push(o),o}function Cn(t,e,n){const o=e.global.newest,r=e.placeholder;return o.ownerSupport=t,xn(o,n,void 0,r),o}function kn(t){const e={tagJsType:A.templater,processInit:Jn,checkValueChange:vn};return e.tag=t,t.templater=e,e}function Sn(t,e,n){const o=Ft(t,e,e.appSupport,n);return n.global.contexts=[],o}function En(t,e,n,o,r,s){const c=Sn(t,n,e);c.ownerSupport=n;const u=xn(c,o,r,r?void 0:s);for(const t of u.dom)t.marker&&(r?Bo.push([Xo,[r,t.marker]]):Ro.push([Zo,[s,t.marker]])),t.domElement&&(r?Bo.push([Xo,[r,t.domElement]]):Ro.push([Zo,[s,t.domElement]]));return c}function Jn(t,e,n,o,r,s){return r?En(t,e,n,o,r,s):Cn(n,e,o)}function Vn(t,e){const n={tagJsType:A.templater,processInit:Jn,processUpdate:Zt,checkValueChange:vn,delete:wn,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n}};return n}const An=[];function On(t){const e=t.context;return uo(t.templater)?io(t):co(t,t,e)}function Pn(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 In(t,e,n,o)}(t,e.ownerSupport,e,n)}))}function In(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===ct(),u=t.apply(e,n),a=function(){const t=s.context;return t.global&&!0!==t.locked?(On(s),u):u};if(c)return a();return St.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===Kn)return t;return jn(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]=In(s,n,e,o+1,t),typeof s===V.function){if(s.mem)continue;Mn(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=In(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;Mn(o+1,s,r,t,e)}}return t}(t,n,e,o)}function Mn(t,e,n,o,r){if(t>0){const t=r.context.global;o[e].subscription=t.destroy$.toCallback((function(){o[e]=n}))}}function jn(t){return typeof t!==V.object||!t||t.tagJsType}function Ln(t,e,n,o){const r=e.original,s=t.tagJsType===A.stateRender,c=St.stateConfig;let u;return ut(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 Hn(t,e,n){const o=t.propWatch===zn.DEEP?Kn:Qn,r=t.props,s=e.propsConfig;let c=s.castProps;const u=n?.propsConfig,a=u?.castProps;a&&(s.castProps=a,c=no(e,n,n.ownerSupport,r,o));return c||Pn(r,e,0)}function Nn(t,e,n){const o=Vn(zn.DEEP);o.tagJsType=t.tagJsType;const r=Sn(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 Un(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 en(o,c);throw console.error(Wn,c),u}(n,e,t)}const Wn="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 Rn(t,e){const n=t.context;++n.renderCount;const o=St.stateConfig;t.state=o.stateArray,t.states=o.states,n.global.newest=t,Un(o,t),delete o.prevSupport,delete o.support,delete o.stateArray,delete o.states,St.tagClosed$.next(e)}function Dn(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===A.stateRender){const e=r;s=zt(r,o,t.appSupport,n),Ln(r,e,s)}else{s=(0,r.wrapper)(t,n,e)}return Rn(s,o),s.ownerSupport=t.ownerSupport,s}function Bn(t,e,o,r,s,c){n(e);const u=Nn(t,e,o);return Dn(u,void 0,e),En(u.templater,e,o,r,s,c)}function _n(t,e,n,o,r){const s=zt(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==A.tagComponent?[]:Hn(t,s);c.castProps=e}return function(t,e,n){const o=xn(t,e,n,void 0);for(const t of o.dom)t.domElement&&Bo.push([Xo,[n,t.domElement]]),t.marker&&Bo.push([Xo,[n,t.marker]]);return t}(Dn(s,e.global.newest,e),o,r)}function $n(t,e,o,r,s){if(n(e),s){return _n(t,e,o,r,s)}const c=function(t,e,n,o){const r=zt(t,n,n.appSupport,e),s=r.propsConfig;if(s){const e=t.tagJsType!==A.tagComponent?[]:Hn(t,r);s.castProps=e}const c=Dn(r,e.global.newest,e);return xn(c,o,void 0,e.placeholder),c}(t,e,o,r);return c}let Fn=0;var zn;function Gn(t,e=zn.SHALLOW){const n=function(...o){const r=Vn(e,o);r.tagJsType=A.tagComponent,r.processInit=$n;const s=function(t,e){return function(n,o,r){const s=Hn(t,n,r),c=n.ownerSupport,u=zt(t,c,n.appSupport,o,s);return Ln(t,e,u,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;return n.original=t,o.tags=An,o.setUse=St,o.ValueTypes=A,o.tagIndex=Fn++,An.push(n),n}function Zn(t,e,n){if(po(t,e))return 11;switch(n){case zn.NONE:return 1;case zn.SHALLOW:return qn(t,e);case zn.IMMUTABLE:return Yn(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])=>Xn(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Xn(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o))))return 7;return!1}(t,e)}function Xn(t,e,n){if(typeof t!==V.function)return!!rt(t,e,Kn)&&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 Yn(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}function qn(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!==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(!to(e,r))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(zn||(zn={})),Gn.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},Gn.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},Gn.deepPropWatch=Gn,Gn.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`` `")},Gn.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`` `")},Gn.immutableProps=function(t){return Gn(t,zn.IMMUTABLE)},Gn.watchProps=function(t){return Gn(t,zn.SHALLOW)},Object.defineProperty(Gn,"renderOnce",{set(t){t.tagJsType=A.renderOnce,t.processInit=Bn,t.processUpdate=Zt,t.delete=wn,t.checkValueChange=function(){return-1}}}),Object.defineProperty(Gn,"use",{set(t){t.original={setUse:St,tags:An},t.tagJsType=A.stateRender,t.processInit=$n,t.processUpdate=Zt,t.checkValueChange=vn,t.delete=wn}});const Qn=3,Kn=10;function to([t,e],n){const o=n[t];return typeof e===V.function&&typeof o===V.function||o===e}function eo(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):jn(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]=eo(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=eo(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 no(t,e,n,o,r,s=-1){const c=e.context.global.newest;if(!c){const e=Pn(o,t,s);o.push(...e);return t.propsConfig.castProps=e,o}const u=(e=c||e).propsConfig.castProps,a=[];for(let e=0;e<o.length;++e){const c=o[e],i=eo(u[e],c,t,n,r,s+1);a.push(i)}return t.propsConfig.castProps=a,a}function oo(t){const e=t.context,o=e.global,{subs:r,tags:s}=qt(o.contexts);ro(o);for(const t of s){const e=t.context.global;if(!0===e.deleted)return;ro(e)}o.subscriptions&&r.forEach(Qt),n(e)}function ro(t){t.deleted=!0,ne(t,[])}function so(t,e,n){const o=Dn(t,e,n),r=!e||bn(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&&oo(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&oo(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),oo(e);const t=o.context.global;t.oldest=o,t.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function co(t,e,n){const o=n.global,r=so(e,t,n);return r.wasLikeTags?(Ut(o.oldest,r.support),r.support):Cn(e,n,{added:0,removed:0})}function uo(t){return A.templater===t.tagJsType}function ao(t){const e=t.context,n=e.global,o=uo(t.templater);if(e.locked)return n.blocked.push(t),t;if(o){return io(t)}e.locked=!0,n.blocked.length&&(t=n.blocked.pop(),n.blocked=[]);const r=co(n.newest,t,e);return delete e.locked,r}function io(t){return ao(at(t).context.global.newest)}function lo(t,e){const n=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(po(n,r))return!0;switch(t.propWatch){case zn.IMMUTABLE:return Yn(n,r);case zn.SHALLOW:return qn(n,r)}return!rt(n,r,Kn)}(t,e);return!!n}function po(t,e){return t.length!==e.length}function fo(t,e=[]){const n=t.context,o=uo(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return fo(r,e);const s=t,c=Z(s.templater),u=t.templater.tagJsType,a=r&&u!==A.stateRender&&(!c||lo(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?(fo(r,e),c&&e.push(s),e):(e.push(s),e)}function go(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 un(fo(t)),ln(e,t,0,0,{resolvePromise:bo,resolveValue:yo})}(e,t)}(c,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}const ho="no-data-ever",mo="promise-no-data-ever";function bo(){return mo}function yo(){return ho}const vo=["init","destroy"];function wo(t,e,n,o,r,s,c){if(c)return W(t,e,n,c,s,r);o(n,t,e)}function xo(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,To(t,s,t.target)};c[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function To(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&&To(t,e,r)}function Co(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,xo(n.appSupport,o,t,r)}function ko(t){return null==t||!1===t}function So(t,e){t.removeAttribute(e)}function Eo(t,e,n,o){if(n.isNameOnly)return function(t,e,n,o,r,s,c,u){if(n){if(ko(e))return void o.removeAttribute(n);if(typeof n===V.object)if(typeof e===V.object)for(const t in n)t in e||Do.push([So,[o,t]]);else for(const t in n)Do.push([So,[o,t]])}Po(t,e,o,r,s,c,u)}(o,t,n.value,n.element,e,n.howToSet,[],{added:0,removed:0}),void(n.value=t);const r=n.element;!function(t,e,n,o,r,s,c,u){if(q(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 Mo(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,r,e,n.howToSet,n.isSpecial,{added:0,removed:0}),n.value=t}function Jo(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=we(e),c={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:s};s.processUpdate=function(t,e,n,o){l(o)};const a=u[r];c.value=a,o.push(c)}})),l(u)}function Vo(t,e,n,o,r,s,c,u){const a=we(e),i={isAttr:!0,element:n,attrName:t,withinOwnerElement:!0,tagJsVar:a};o.push(i),a.processUpdate=Eo,function(t,e,n,o,r,s,c,u){n.element=o,n.howToSet=r,typeof e===V.function?u&&vo.includes(t)?W(t,e,o,t,s,c):Mo(n,e,s,t,o):(n.attrName=t,n.isSpecial=u,wo(t,e,o,r,c,s,u))}(t,e,i,n,r,s,c,u),i.value=e}function Ao(t){return Q(t)&&"tagJsVar"in t?t.tagJsVar:-1}function Oo(t,e,n,o,r,s,c,u,a){const i=Ao(e);if(i>=0){const e=t[i],c=Tn(e,s,!0);if(c.isAttr=!0,c.element=n,c.howToSet=r,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);return c.tagJsVar.processUpdate=Eo,void Po(t,e,n,o,r,s,u)}if(Array.isArray(a))return Jo(e,a,n,s,r,0,0,t);const l=Ao(a);if(l>=0){return Vo(e,t[l],n,s,r,o,u,c)}return wo(e,a,n,r,u,o,c)}function Po(t,e,n,o,r,s,u){if(!ko(e))if(typeof e!==V.object)0!==e.length&&r(n,e,E);else for(const a in e){const i=e[a];Oo(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 Do.push([jo,[e,n]])}if(q(t))return Co(e,t,s,n);r(e,n,t)}else W(n,t,e,o,s,c)}function Mo(t,e,n,o,r){e=go(e,n);return t.tagJsVar.processUpdate=Eo,Co(r,e,n,o)}function jo(t,e){t.removeAttribute(e)}function Lo(t,e,n,o,r,s,c){const u=document.createTextNode(E),a=Tn(t,e,r>0);a.placeholder=u,s?Bo.push([Xo,[s,u]]):Ro.push([Zo,[c,u]]),fe(t,n,a,o,s,c)}const Ho=function(){};function No(t,e,n,o,r,s,c,u){const a=[];c&&void 0===u&&(u=document.createTextNode(E),Bo.push([Xo,[c,u]]),c=void 0);for(let i=0;i<t.length;++i){const l=t[i],p=l.v;if(!isNaN(p)){Lo(e[r.length],r,n,o,s,c,u);continue}const f={};if(a.push(f),"text"===l.nn){Wo(f,l,c,u);continue}const d=Uo(f,l,e,n,r,o,c,u);l.ch&&(f.ch=No(l.ch,e,n,o,r,s+1,d,u).dom)}return{dom:a,context:r}}function Uo(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];Oo(n,e,a,o,U,r,t[2]||!1,s,c)}return c?Bo.push([Xo,[c,a]]):Ro.push([Zo,[u,a]]),a}function Wo(t,e,n,o){const r=t,s=r.tc=e.tc;n?Bo.push([tr,[n,s,function(t){r.domElement=t}]]):Ro.push([Ko,[o,s,function(t){r.domElement=t}]])}let Ro=[],Do=[],Bo=[],_o=[];const $o={locks:0};function Fo(t,e){e.textContent=t}function zo(){if($o.locks>0)return;for(const t of Do)t[0](...t[1]);for(const t of Bo)t[0](...t[1]);for(const t of Ro)t[0](...t[1]);Ro=[],Do=[],Bo=[];const t=_o;_o=[];for(const e of t)e[0](...e[1])}function Go(t){t.parentNode.removeChild(t)}function Zo(t,e){t.parentNode.insertBefore(e,t)}function Xo(t,e){t.appendChild(e)}const Yo="object"==typeof document&&document.createElement("div");function qo(t){return Yo.innerHTML=t,document.createTextNode(Yo.innerHTML)}function Qo(t,e,n=Ho){const o=qo(e);Zo(t,o),n(o)}function Ko(t,e,n=Ho){Yo.innerHTML=e;const o=document.createTextNode(Yo.textContent);Zo(t,o),n(o)}function tr(t,e,n){Yo.innerHTML=e;const o=document.createTextNode(Yo.textContent);Xo(t,o),n(o)}function er(t,e){const n=t.subContext;n.deleted=!0,delete t.subContext;const o=n.appendMarker;if(o&&(Ro.push([Go,[o,"subcontext-delete"]]),delete n.appendMarker),delete t.delete,!n.hasEmitted)return;const r=n.contextItem;return r.tagJsVar.delete(r,e),76}function nr(t,e,o,r,s,c){const u=t;let a=u.templater;a||(a=kn(u));const i=n(e);return s?En(a,e,o,r,s,c):(i.newest=Sn(a,o,e),Cn(o,e,r))}function or(t,e,n,o,r,s){nr(t.outerHTML,e,n,o,r,s);e.tagJsVar.processUpdate=function(t,e,n,o,r){Se(n,t?.outerHTML||t,e,r)},t.checkValueChange=rr}function rr(t,e,n){return vn(t,e,n)}function sr(t,e){const n={values:e,ownerSupport:ct(),dom:t,tagJsType:A.dom,processInit:nr,processUpdate:Zt,checkValueChange:vn,delete:wn,key:function(t){return n.arrayValue=t,n},setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=or,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 cr(t,...e){const n=function(t,e){const n={values:e,ownerSupport:ct(),tagJsType:A.tag,processInit:nr,processUpdate:Zt,checkValueChange:vn,delete:wn,strings:t,key:t=>(n.arrayValue=t,n),setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=or,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=Vn(zn.NONE);return o.tag=n,n.templater=o,n}function ur(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}function ar(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 ir(t,e,n,o,r,s,c){const u=document.createTextNode(E);An.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=zt(t,s.newest,s.newest.appSupport,o);u||dt(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=ar(t,o,r);return Rn(e),e}return Ln(t,s,n),Rn(n),n}(t,r,a,o,n);const i=t.wrapper,l=i(a,o);return Rn(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={},++$o.locks;const n=ae(a,e);return--$o.locks,zo(),n},++$o.locks;const i=function(t,e,n,o,r,s){console.debug("🏷️ Building element into tag...",{element:e,app:r,support:t});const c=xn(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,lr.push({element:e,support:t});const a=document.createDocumentFragment();a.appendChild(s);for(const t of c.dom)ur(t,a);return console.debug("🏷️ Element Tag DOM built ✅"),a}(a,r,e,n,t,u);return--$o.locks,zo(),r.appendChild(i),{support:a,tags:An,ValueTypes:A}}cr.dom=function(t,...e){return sr(t,e)},"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const lr=[];function pr(t,e,o){const r=lr.findIndex((t=>t.element===e));if(r>=0){const t=lr[r].support;ae(t,t.context.global),lr.splice(r,1),console.warn("Found and destroyed app element already rendered to element",{element:e})}let s=()=>a(o);s.propWatch=zn.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:vn,delete:wn,processInit:function(){console.debug("do nothing app function")},processUpdate:Zt}},r=n(o);return r.events={},ar(t,o,e),o}(s,e),u=c.global;ft(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)),ir(t,u,s,a,e,c,i)}function fr(t){if(!t)return Ho;const e=ct();if(!e)throw new Error("output must be used in render sync fashion");return(...n)=>{const o=e.ownerSupport;return dr(n,t,o)}}function dr(t,e,n){const o=n.context.global.newest;Jt(o.states,n.states);const r=e(...t);return Jt(n.states,o.states),On(o),zo(),r}function gr(t,e){const n=ct(),o=n?at(n).states:[];return{tagJsType:A.subscribe,processInit:Me,processUpdate:Ee,delete:Pe,callback:e,states:o,Observables:[t]}}function hr(t,e,n,o,r){const s=t.owner._innerHTML;s.processInit=s.oldProcessInit;const c=n.subContext?.contextItem;Se(c,s,e,r)}function mr(t,e,n,o,r,s){e.subContext={},t.processUpdate=hr,function(t,e,n,o,r,s){const{appendMarker:c,insertBefore:u}=Ae(s,r),a=n.subContext;a.appendMarker=c;const i=t.owner,l=i._innerHTML;l.processInit=l.oldProcessInit,Ve(l,a,e,o,u)}(t,n,e,o,s,r)}function br(){return{tagJsType:"innerHTML",processInit:mr,processUpdate:hr,delete:er}}function yr(t,e){return{tagJsType:A.subscribe,processInit:vr,processUpdate:Ho,delete:Pe,callback:e,states:at(ct()).states,Observables:t}}function vr(t,e,n,o,r){return Oe(t,e,n,o,void 0,r)}function wr(t,e={}){return{tagJsType:A.host,processInit:Tr,processUpdate:xr,delete:Cr,options:{callback:t,...e}}}function xr(t,e,n,o,r){const s=Je(A.host,t,e,n,r);if(s)return s;const c=n.tagJsVar.options,u=n.element;c.callback(u,t)}function Tr(t,e,n){e.options.callback(t,e);const o=e.options;if(o.onInit){const t=n.element;o.onInit(t,e,n)}}function Cr(t){const e=t.tagJsVar.options;if(e.onDestroy){const n=t.element,o=function(){e.onDestroy(n)};_o.push([function(){const e=t.stateOwner;dr([],o,e)},[]])}}function kr(t,e,n){return{tagJsType:A.subscribe,processInit:je,processUpdate:Ho,delete:Pe,callback:n,withDefault:e,states:at(ct()).states,Observables:[t]}}const Sr={tagElement:pr,renderWithSupport:so,renderSupport:ao,renderTagOnly:Dn,paint:zo};var Er=e.W9,Jr=e.cg,Vr=e.m0,Ar=e.rS,Or=e.Y2,Pr=e.ei,Ir=e.B7,Mr=e.TU,jr=e.XF,Lr=e.PC,Hr=e.Ot,Nr=e.Mj,Ur=e.tD,Wr=e.j8,Rr=e.xe,Dr=e.YO,Br=e.um,_r=e.E2,$r=e.OH,Fr=e.TB,zr=e.Ii,Gr=e.m3,Zr=e.yV,Xr=e.zV,Yr=e.pf,qr=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.qy,ws=e.cy,xs=e.Tn,Ts=e.Gv,Cs=e.yL,ks=e.D8,Ss=e.Ze,Es=e._4,Js=e.mn,Vs=e.z,As=e.sA,Os=e.TG,Ps=e.MG,Is=e.PL,Ms=e.CG,js=e.nI,Ls=e.Fs,Hs=e.PZ,Ns=e.r5,Us=e.uc,Ws=e.pG,Rs=e.QB,Ds=e.Ll,Bs=e.vP,_s=e.wk,$s=e.xP,Fs=e.bc,zs=e.B1,Gs=e.RX,Zs=e.ag,Xs=e.Tc,Ys=e.Hf,qs=e.zc,Qs=e._A,Ks=e.Ag,tc=e.Pc,ec=e.NU,nc=e.wB,oc=e.id,rc=e.MC,sc=e.SZ;export{Er as ArrayNoKeyError,Jr as BasicTypes,Vr as ImmutableTypes,Ar as PropWatches,Or as RouteQuery,Pr as StateMismatchError,Ir as Subject,Mr as Subjective,jr as SyncCallbackError,Lr as TagError,Hr as ValueSubject,Nr as ValueSubjective,Ur as ValueTypes,Wr as addOneContext,Rr as appElements,Dr as array,Br as buildBeforeElement,_r as callback,$r as callbackMaker,Fr as checkArrayValueChange,zr as checkSimpleValueChange,Gr as checkSubContext,Zr as checkTagValueChange,Xr as combineLatest,Yr as createHtmlSupport,qr 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 html,ws as isArray,xs as isFunction,Ts as isObject,Cs as isPromise,ks as isSimpleType,Ss as isStaticTag,Es as isSubjectInstance,Js as isTagComponent,Vs as letProp,As as onDestroy,Os as onFirstSubContext,Ps as onInit,Is as oneRenderToSupport,Ms as output,js as paint,Ls as pipe,Hs as processFirstSubjectValue,Ns as providers,Us as renderSupport,Ws as renderTagOnly,Rs as renderWithSupport,Ds as setUseMemory,Bs as signal,_s as state,$s as states,Fs as subject,zs as subscribe,Gs as subscribeWith,Zs as syncError,Xs as tag,Ys as tagElement,qs as tagValueUpdateHandler,Qs as tags,Ks as upgradeBaseToSupport,tc as valueToTagJsVar,ec as variablePrefix,nc as watch,oc as willCallback,rc as willPromise,sc 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:()=>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};
2
2
  //# sourceMappingURL=bundle.js.map
package/bundle.js.gz CHANGED
Binary file