taggedjs 3.1.9 → 3.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.js +1 -1
- package/bundle.js.map +1 -1
- package/js/TagJsTags/TagJsTag.type.d.ts +29 -0
- package/js/TagJsTags/TagJsTag.type.js +2 -0
- package/js/TagJsTags/TagJsTag.type.js.map +1 -0
- package/js/TagJsTags/getArrayTagJsTag.function.d.ts +3 -0
- package/js/TagJsTags/getArrayTagJsTag.function.js +35 -0
- package/js/TagJsTags/getArrayTagJsTag.function.js.map +1 -0
- package/js/TagJsTags/getInnerHTML.function.d.ts +6 -0
- package/js/TagJsTags/getInnerHTML.function.js +39 -0
- package/js/TagJsTags/getInnerHTML.function.js.map +1 -0
- package/js/TagJsTags/getSimpleTagVar.function.d.ts +8 -0
- package/js/TagJsTags/getSimpleTagVar.function.js +73 -0
- package/js/TagJsTags/getSimpleTagVar.function.js.map +1 -0
- package/js/TagJsTags/host.function.d.ts +31 -0
- package/js/TagJsTags/host.function.js +126 -0
- package/js/TagJsTags/host.function.js.map +1 -0
- package/js/TagJsTags/index.d.ts +9 -0
- package/js/TagJsTags/index.js +10 -0
- package/js/TagJsTags/index.js.map +1 -0
- package/js/TagJsTags/pipe.function.d.ts +4 -0
- package/js/TagJsTags/pipe.function.js +35 -0
- package/js/TagJsTags/pipe.function.js.map +1 -0
- package/js/TagJsTags/processAttributeUpdate.function.d.ts +5 -0
- package/js/TagJsTags/processAttributeUpdate.function.js +17 -0
- package/js/TagJsTags/processAttributeUpdate.function.js.map +1 -0
- package/js/TagJsTags/processSimpleAttribute.function.d.ts +7 -0
- package/js/TagJsTags/processSimpleAttribute.function.js +18 -0
- package/js/TagJsTags/processSimpleAttribute.function.js.map +1 -0
- package/js/TagJsTags/processSubscribeAttribute.function.d.ts +10 -0
- package/js/TagJsTags/processSubscribeAttribute.function.js +25 -0
- package/js/TagJsTags/processSubscribeAttribute.function.js.map +1 -0
- package/js/TagJsTags/processSubscribeWithAttribute.function.d.ts +18 -0
- package/js/TagJsTags/processSubscribeWithAttribute.function.js +23 -0
- package/js/TagJsTags/processSubscribeWithAttribute.function.js.map +1 -0
- package/js/TagJsTags/subscribe.function.d.ts +23 -0
- package/js/TagJsTags/subscribe.function.js +29 -0
- package/js/TagJsTags/subscribe.function.js.map +1 -0
- package/js/TagJsTags/subscribeWith.function.d.ts +7 -0
- package/js/TagJsTags/subscribeWith.function.js +51 -0
- package/js/TagJsTags/subscribeWith.function.js.map +1 -0
- package/js/TagJsTags/tag.function.d.ts +97 -0
- package/js/TagJsTags/tag.function.js +172 -0
- package/js/TagJsTags/tag.function.js.map +1 -0
- package/js/TagJsTags/tagInject.function.d.ts +5 -0
- package/js/TagJsTags/tagInject.function.js +43 -0
- package/js/TagJsTags/tagInject.function.js.map +1 -0
- package/js/TagJsTags/valueToTagJsTag.function.d.ts +4 -0
- package/js/TagJsTags/valueToTagJsTag.function.js +17 -0
- package/js/TagJsTags/valueToTagJsTag.function.js.map +1 -0
- package/js/TagJsTags/valueToTagJsVar.function.d.ts +4 -0
- package/js/TagJsTags/valueToTagJsVar.function.js +17 -0
- package/js/TagJsTags/valueToTagJsVar.function.js.map +1 -0
- package/js/elements/ElementFunction.type.d.ts +15 -6
- package/js/elements/ElementVarBase.type.d.ts +23 -0
- package/js/elements/ElementVarBase.type.js +2 -0
- package/js/elements/ElementVarBase.type.js.map +1 -0
- package/js/elements/destroyDesignElement.function.d.ts +3 -2
- package/js/elements/destroyDesignElement.function.js +23 -10
- package/js/elements/destroyDesignElement.function.js.map +1 -1
- package/js/elements/elementFunctions.d.ts +20 -18
- package/js/elements/elementFunctions.js +22 -7
- package/js/elements/elementFunctions.js.map +1 -1
- package/js/elements/elementVarToHtmlString.function.d.ts +2 -0
- package/js/elements/elementVarToHtmlString.function.js +67 -0
- package/js/elements/elementVarToHtmlString.function.js.map +1 -0
- package/js/elements/htmlTag.function.d.ts +7 -25
- package/js/elements/htmlTag.function.js +9 -0
- package/js/elements/htmlTag.function.js.map +1 -1
- package/js/elements/index.d.ts +9 -2
- package/js/elements/index.js +7 -1
- package/js/elements/index.js.map +1 -1
- package/js/elements/noElement.function.d.ts +3 -3
- package/js/elements/noElement.function.js +2 -0
- package/js/elements/noElement.function.js.map +1 -1
- package/js/elements/processChildren.function.js +4 -0
- package/js/elements/processChildren.function.js.map +1 -1
- package/js/elements/processDesignElementInit.function.d.ts +3 -3
- package/js/elements/processDesignElementInit.function.js +9 -2
- package/js/elements/processDesignElementInit.function.js.map +1 -1
- package/js/elements/processDesignElementUpdate.function.js +5 -6
- package/js/elements/processDesignElementUpdate.function.js.map +1 -1
- package/js/elements/processElementVar.function.d.ts +3 -2
- package/js/elements/processElementVar.function.js +5 -5
- package/js/elements/processElementVar.function.js.map +1 -1
- package/js/elements/processElementVarFunction.function.js +2 -0
- package/js/elements/processElementVarFunction.function.js.map +1 -1
- package/js/index.d.ts +1 -1
- package/js/index.js +1 -1
- package/js/interpolations/attributes/checkToResolvePromise.function.js +4 -7
- package/js/interpolations/attributes/checkToResolvePromise.function.js.map +1 -1
- package/js/interpolations/attributes/howToSetInputValue.function.js +6 -0
- package/js/interpolations/attributes/howToSetInputValue.function.js.map +1 -1
- package/js/interpolations/attributes/isSpecialAttribute.function.d.ts +4 -2
- package/js/interpolations/attributes/isSpecialAttribute.function.js +10 -4
- package/js/interpolations/attributes/isSpecialAttribute.function.js.map +1 -1
- package/js/interpolations/attributes/processFunctionAttr.function.js +10 -7
- package/js/interpolations/attributes/processFunctionAttr.function.js.map +1 -1
- package/js/interpolations/attributes/processNameValueAttribute.function.js.map +1 -1
- package/js/interpolations/attributes/specialAttribute.d.ts +1 -1
- package/js/interpolations/attributes/specialAttribute.js +7 -0
- package/js/interpolations/attributes/specialAttribute.js.map +1 -1
- package/js/interpolations/optimizers/domProcessContextItem.function.js +4 -0
- package/js/interpolations/optimizers/domProcessContextItem.function.js.map +1 -1
- package/js/interpolations/optimizers/parseHTML.function.js +3 -1
- package/js/interpolations/optimizers/parseHTML.function.js.map +1 -1
- package/js/render/addOneContext.function.js +2 -1
- package/js/render/addOneContext.function.js.map +1 -1
- package/js/render/attributes/Special.types.d.ts +1 -1
- package/js/render/attributes/createDynamicAttribute.function.js +3 -1
- package/js/render/attributes/createDynamicAttribute.function.js.map +1 -1
- package/js/render/attributes/getTagJsTag.function.d.ts +4 -0
- package/js/render/attributes/getTagJsTag.function.js +9 -0
- package/js/render/attributes/getTagJsTag.function.js.map +1 -0
- package/js/render/attributes/processAttribute.function.d.ts +1 -1
- package/js/render/attributes/processAttribute.function.js +11 -11
- package/js/render/attributes/processStandAloneAttribute.function.d.ts +1 -1
- package/js/render/attributes/processStandAloneAttribute.function.js +1 -1
- package/js/render/attributes/processStandAloneAttribute.function.js.map +1 -1
- package/js/render/attributes/processTagJsAttribute.function.d.ts +3 -3
- package/js/render/attributes/processTagJsAttribute.function.js +2 -2
- package/js/render/buildBeforeElement.function.js.map +1 -1
- package/js/render/dom/attachDomElements.function.js +1 -0
- package/js/render/dom/attachDomElements.function.js.map +1 -1
- package/js/render/dom/processAttributeArray.function.js +0 -1
- package/js/render/dom/processAttributeArray.function.js.map +1 -1
- package/js/render/executeWrap.function.js +6 -2
- package/js/render/executeWrap.function.js.map +1 -1
- package/js/render/paint.function.js +6 -6
- package/js/render/paint.function.js.map +1 -1
- package/js/render/renderTagElement.function.js +3 -1
- package/js/render/renderTagElement.function.js.map +1 -1
- package/js/render/renderWithSupport.function.js.map +1 -1
- package/js/render/update/processTag.function.js +1 -0
- package/js/render/update/processTag.function.js.map +1 -1
- package/js/render/update/updateExistingTagComponent.function.js +3 -18
- package/js/render/update/updateExistingTagComponent.function.js.map +1 -1
- package/js/render/update/updateSupportBy.function.js.map +1 -1
- package/js/state/callbackStateUpdate.function.js.map +1 -1
- package/js/state/onDestroy.function.d.ts +1 -1
- package/js/state/onDestroy.function.js +1 -1
- package/js/state/onInit.function.d.ts +2 -2
- package/js/state/onInit.function.js +13 -11
- package/js/state/onInit.function.js.map +1 -1
- package/js/state/onRender.function.js +4 -2
- package/js/state/onRender.function.js.map +1 -1
- package/js/state/signal.function.d.ts +3 -3
- package/js/state/signal.function.js +2 -1
- package/js/state/signal.function.js.map +1 -1
- package/js/state/states.function.d.ts +1 -1
- package/js/state/states.function.js +1 -1
- package/js/state/states.function.js.map +1 -1
- package/js/state/subject.function.d.ts +1 -1
- package/js/state/subject.function.js +24 -10
- package/js/state/subject.function.js.map +1 -1
- package/js/state/syncStates.function.d.ts +0 -12
- package/js/state/syncStates.function.js +0 -38
- package/js/state/syncStates.function.js.map +1 -1
- package/js/state/watch.function.d.ts +1 -1
- package/js/state/watch.function.js +14 -6
- package/js/state/watch.function.js.map +1 -1
- package/js/subject/Subject.class.d.ts +3 -3
- package/js/subject/ValueSubject.d.ts +1 -1
- package/js/tag/AnyTag.type.d.ts +2 -2
- package/js/tag/ContextItem.type.d.ts +14 -3
- package/js/tag/DomTag.type.d.ts +3 -2
- package/js/tag/ProcessInit.type.d.ts +2 -2
- package/js/tag/StringTag.type.d.ts +2 -3
- package/js/tag/SupportContextItem.type.d.ts +0 -2
- package/js/tag/Tag.type.d.ts +2 -21
- package/js/tag/TagMaker.type.d.ts +2 -1
- package/js/tag/TemplateValue.type.d.ts +3 -3
- package/js/tag/createHtmlSupport.function.d.ts +1 -0
- package/js/tag/createHtmlSupport.function.js.map +1 -1
- package/js/tag/destroySupportByContextItem.function.js +2 -0
- package/js/tag/destroySupportByContextItem.function.js.map +1 -1
- package/js/tag/getDomTag.function.d.ts +1 -4
- package/js/tag/getDomTag.function.js +1 -53
- package/js/tag/getDomTag.function.js.map +1 -1
- package/js/tag/getTagWrap.function.js +1 -1
- package/js/tag/getTemplaterResult.function.d.ts +3 -4
- package/js/tag/getTemplaterResult.function.js +1 -0
- package/js/tag/getTemplaterResult.function.js.map +1 -1
- package/js/tag/hasPropChanges.function.d.ts +1 -1
- package/js/tag/hasPropChanges.function.js +1 -1
- package/js/tag/index.d.ts +2 -3
- package/js/tag/index.js +2 -2
- package/js/tag/isLikeTags.function.js +1 -0
- package/js/tag/isLikeTags.function.js.map +1 -1
- package/js/tag/loadNewBaseSupport.function.js +1 -0
- package/js/tag/loadNewBaseSupport.function.js.map +1 -1
- package/js/tag/output.function.js +19 -10
- package/js/tag/output.function.js.map +1 -1
- package/js/tag/processOuterDomTagInit.function.js.map +1 -1
- package/js/tag/processUpdateContext.function.js +3 -3
- package/js/tag/props/alterProp.function.d.ts +1 -1
- package/js/tag/props/alterProp.function.js.map +1 -1
- package/js/tag/props/clonePropsBy.function.js +1 -1
- package/js/tag/smartRemoveKids.function.d.ts +0 -2
- package/js/tag/smartRemoveKids.function.js +3 -6
- package/js/tag/smartRemoveKids.function.js.map +1 -1
- package/js/tag/tag.types.d.ts +4 -4
- package/js/tag/tag.types.js.map +1 -1
- package/js/tag/tagElement.js +3 -0
- package/js/tag/tagElement.js.map +1 -1
- package/js/tag/update/SubContext.type.d.ts +7 -7
- package/js/tag/update/arrays/compareArrayItems.function.d.ts +2 -2
- package/js/tag/update/arrays/compareArrayItems.function.js +7 -2
- package/js/tag/update/arrays/compareArrayItems.function.js.map +1 -1
- package/js/tag/update/arrays/createAndProcessContextItem.function.d.ts +6 -0
- package/js/tag/update/arrays/createAndProcessContextItem.function.js +22 -0
- package/js/tag/update/arrays/createAndProcessContextItem.function.js.map +1 -0
- package/js/tag/update/arrays/processTagArray.d.ts +2 -3
- package/js/tag/update/arrays/processTagArray.js +11 -2
- package/js/tag/update/arrays/processTagArray.js.map +1 -1
- package/js/tag/update/convertTagToElementManaged.function.js +2 -1
- package/js/tag/update/convertTagToElementManaged.function.js.map +1 -1
- package/js/tag/update/deleteContextSubContext.function.js +2 -2
- package/js/tag/update/forceUpdateExistingValue.function.js +2 -2
- package/js/tag/update/getOverrideTagVar.d.ts +1 -1
- package/js/tag/update/getOverrideTagVar.js +13 -0
- package/js/tag/update/getOverrideTagVar.js.map +1 -1
- package/js/tag/update/handleStillTag.function.d.ts +2 -3
- package/js/tag/update/handleStillTag.function.js +1 -1
- package/js/tag/update/handleStillTag.function.js.map +1 -1
- package/js/tag/update/handleTagTypeChangeFrom.function.js +2 -2
- package/js/tag/update/onFirstSubContext.function.js +1 -1
- package/js/tag/update/onFirstSubContext.function.js.map +1 -1
- package/js/tag/update/oneRenderToSupport.function.js +1 -1
- package/js/tag/update/processFirstSubjectComponent.function.d.ts +2 -2
- package/js/tag/update/processFirstSubjectComponent.function.js +20 -7
- package/js/tag/update/processFirstSubjectComponent.function.js.map +1 -1
- package/js/tag/update/processRegularValue.function.js +1 -1
- package/js/tag/update/processSubscribeWith.function.d.ts +1 -1
- package/js/tag/update/processTagComponentInit.function.d.ts +2 -2
- package/js/tag/update/processTagInit.function.d.ts +2 -2
- package/js/tag/update/processTagInit.function.js +4 -0
- package/js/tag/update/processTagInit.function.js.map +1 -1
- package/js/tag/update/setupSubscribe.function.d.ts +2 -2
- package/js/tag/update/setupSubscribe.function.js +1 -1
- package/js/tag/update/tryUpdateToTag.function.js +8 -0
- package/js/tag/update/tryUpdateToTag.function.js.map +1 -1
- package/js/tag/update/updateToDiffValue.function.js +1 -1
- package/js/tag/update/updateToDiffValue.function.js.map +1 -1
- package/js/tagJsVars/getArrayTagJsVar.function.js.map +1 -1
- package/js/tagJsVars/getInnerHTML.function.d.ts +2 -2
- package/js/tagJsVars/getInnerHTML.function.js.map +1 -1
- package/js/tagJsVars/processAttributeUpdate.function.d.ts +2 -2
- package/js/tagJsVars/processAttributeUpdate.function.js.map +1 -1
- package/js/tagJsVars/tag.function.d.ts +27 -13
- package/js/tagJsVars/tag.function.js +9 -1
- package/js/tagJsVars/tag.function.js.map +1 -1
- package/js/tagJsVars/tagJsVar.type.d.ts +3 -1
- package/js/tagJsVars/valueToTagJsVar.function.d.ts +2 -2
- package/js/tagJsVars/valueToTagJsVar.function.js.map +1 -1
- package/js/version.d.ts +1 -1
- package/js/version.js +1 -1
- package/js/version.js.map +1 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=t.renderCount||0,t.varCounter=0,t.state={newer:{state:[],states:[]}},t.global={blocked:[]}}t.d(e,{W9:()=>Hr,cg:()=>I,m0:()=>k,rS:()=>Zo,Y2:()=>o,ei:()=>Ur,B7:()=>Z,TU:()=>q,XF:()=>Nr,PC:()=>Dr,Ot:()=>Cr,Mj:()=>Tr,tD:()=>E,a:()=>Pa,Gf:()=>c,xe:()=>ns,YO:()=>zr,b:()=>Ra,rf:()=>sa,br:()=>Da,um:()=>Zn,x6:()=>Xs,E2:()=>$r,OH:()=>Rr,Ji:()=>Xa,TB:()=>Bt,Ii:()=>Rt,mX:()=>ho,yV:()=>fe,EI:()=>de,aY:()=>Ga,zV:()=>G,pf:()=>cr,ze:()=>Wr,Go:()=>ot,bD:()=>st,WJ:()=>Y,wL:()=>bo,Ng:()=>Wt,O:()=>ue,r3:()=>Ja,y4:()=>ba,Ie:()=>J,lI:()=>Ta,$F:()=>za,vP:()=>Fa,hp:()=>Ae,qr:()=>wa,ts:()=>pr,Zd:()=>Ca,B4:()=>sr,HD:()=>Xr,Az:()=>Kn,Xi:()=>es,sV:()=>Co,Ah:()=>n,f5:()=>Me,Gk:()=>no,j_:()=>fr,h1:()=>ua,h2:()=>ia,h3:()=>la,h4:()=>pa,h5:()=>fa,h6:()=>da,zC:()=>Yo,d5:()=>ta,wx:()=>xa,cF:()=>tc,Hc:()=>Io,PB:()=>Jt,uq:()=>It,hr:()=>ca,gM:()=>Qs,gx:()=>_s,_8:()=>ja,hF:()=>qs,cy:()=>D,Tn:()=>P,Gv:()=>j,yL:()=>L,D8:()=>S,Ze:()=>A,_4:()=>O,mn:()=>M,Pf:()=>Ha,o1:()=>Va,z:()=>Lr,li:()=>ma,nf:()=>oa,iW:()=>va,mI:()=>na,C$:()=>Ba,et:()=>Fs,Vg:()=>aa,ol:()=>ga,sA:()=>_o,TG:()=>yo,MG:()=>$o,PL:()=>so,uK:()=>Zs,CG:()=>Jo,p:()=>Ua,nI:()=>h,Ae:()=>Za,Fs:()=>To,n1:()=>qa,AS:()=>ka,iv:()=>Fr,r5:()=>jr,M$:()=>Se,Pc:()=>Ya,uc:()=>je,QB:()=>Oe,uW:()=>ya,Lt:()=>Ks,Jv:()=>St,TA:()=>Et,Jn:()=>At,Ll:()=>tt,L6:()=>xr,EX:()=>Na,Ln:()=>$a,wk:()=>No,xP:()=>Or,ko:()=>Wa,iF:()=>ra,bc:()=>Mr,B1:()=>mo,RX:()=>po,lR:()=>_a,JW:()=>Ka,ag:()=>_r,tp:()=>Ia,Tc:()=>qo,Hf:()=>rs,zc:()=>ht,_A:()=>oo,T_:()=>Oa,td:()=>Sa,g0:()=>Ys,pd:()=>La,th:()=>Aa,VQ:()=>Ma,DD:()=>ea,tr:()=>Ea,ul:()=>ha,Ag:()=>ar,gA:()=>Xt,NU:()=>dn,rE:()=>Qa,wB:()=>Ir,id:()=>Vr,MC:()=>Jr,SZ:()=>kr});class o{get(t){return"todo"}}function r(){return tt.stateConfig.support}function s(t){return Zr(t.context),tt.stateConfig.support=t}const a=function(){};function c(t){}let u=[];const i=[];let l=[],p=[],f=[];const d={locks:0,removeLocks:0};function g(t,e){e.textContent=t}function h(){d.locks>0||(++d.locks,function(){const t=i.length;(function(){for(const t of i)t[0](...t[1])})(),i.splice(0,t);for(const t of l)t[0](...t[1]);for(const t of p)t[0](...t[1]);for(const t of u)t[0](...t[1])}(),--d.locks,function(){u=[],l=[],p=[];const t=f;f=[];for(const e of t)e[0](...e[1])}())}function m(t,e){i.push([b,[t,e]])}function b(t,e){t.parentNode.removeChild(t)}function v(t,e,n){t.parentNode.insertBefore(e,t)}function y(t,e){t.appendChild(e)}const x="object"==typeof document&&document.createElement("div");function w(t){return x.innerHTML=t,document.createTextNode(x.innerHTML)}function C(t,e,n=a,o){const r=w(e);v(t,r),n(r)}function T(t,e,n=a){x.innerHTML=e;const o=document.createTextNode(x.textContent);v(t,o),n(o)}function V(t,e,n){x.innerHTML=e;const o=document.createTextNode(x.textContent);y(t,o),n(o)}const J="";var k,I;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(k||(k={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(I||(I={}));const E={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function S(t){switch(t){case k.string:case k.number:case k.boolean:return!0}return!1}function A(t){if(!t)return!1;switch(t.tagJsType){case E.dom:case E.tag:case E.templater:return!0}return!1}function M(t){const e=t?.tagJsType;return e===E.tagComponent||e===E.stateRender}function O(t){return j(t)&&typeof t.subscribe===I.function}function L(t){return t&&P(t.then)}function P(t){return typeof t===I.function}function j(t){return typeof t===I.object&&null!==t}function D(t){return Array.isArray(t)}function H(t){const e=t.state;return e&&e.newest&&e.newest?e.newest:t.parentContext?H(t.parentContext):void 0}function U(t){let e=t;for(;e.ownerSupport&&!M(e.templater);)e=e.ownerSupport;const n=e.context.state;return n&&n.newest||e}function N(...t){return t}function $(t){const e=tt.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t(N)}function W(t){const e=tt.stateConfig,n=e.statesIndex,o=U(e.prevSupport).context.state.older.states[n];let r=[];o((function(...t){return r=t,o.lastValues=r,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function R(t){Zr(t);const e=tt.stateConfig;e.handlers.handler=z,e.handlers.statesHandler=$,e.rearray=[];const n=e.state=[],o=e.states=[];e.statesIndex=0;(t.state=t.state||{}).newer={state:n,states:o}}class _{}function B(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(_),[n]=t(e);return[e,n]}(e);return n}function F(){const t=tt.stateConfig,e=t.rearray[t.state.length];return t.state.push(e),e.defaultValue}function z(t){const e=tt.stateConfig,n=Xr();if(!n||!n.state){const t="State requested but TaggedJs is not currently rendering a tag or host";throw console.error(t,{config:e,context:n,function:e.support?.templater.wrapper?.original}),new Error(t)}const o=n.state.newer;e.state=o.state;let r=t;if(typeof t===I.function&&(r=t()),typeof r===I.function){const t=r;r=function(...e){return t(...e)},r.original=t}const s={get:function(){return B(s)},defaultValue:r};return e.state.push(s),r}function G(t){const e=new Z;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,a)}},s=[...t],a=s.shift().subscribe((t=>r(t,0))),c=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return a.subscriptions=c,a},e}function X(t,e,n){const o=Z.globalSubCount$;Z.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=Z.globalSubCount$;Z.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 K(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return K(t,o,n);n(t)};let a=s;const c=r(t,{setHandler:t=>a=t,next:s});a(c)}class Z{onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;value;constructor(t,e){this.onSubscription=e,arguments.length>0&&(this.value=t)}subscribe(t){const e=X(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{K(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 e}pipe(...t){const e=[];"value"in this&&e.push(this.value);const n=new Z(...e);return n.setMethods(t),n.subscribeWith=t=>this.subscribe(t),n.next=t=>this.next(t),n}setMethods(t){this.methods=t}static all(t){return G(t.map((t=>{if(O(t))return t;return new Z(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new Z(0)}class q extends Z{_value;constructor(...t){super(...t),this._value=t[0],Y(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 Y(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const Q=new Z(void 0,(function(t){r()||t.next()})),tt={stateConfig:{state:[],version:Date.now(),handlers:{handler:z,statesHandler:$}},tagClosed$:Q};function et(t,e,n){if(e.deleted)return;const o=t[e.valueIndex],r=e.tagJsVar;Zr(e),r.processUpdate(o,e,n,t),qr(),e.value=o}function nt(t,e){const n=t.context.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),++d.locks,function(t,e){const n=t.templater.tag.values;for(const o of e)et(n,o,t)}(t,n),--d.locks,h()}function ot(t,e){return rt(t,e)}function rt(t,e){if(null===t||typeof t!==I.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=D(t)?[]:Object.create(Object.getPrototypeOf(t));if(D(t))for(let o=0;o<t.length;o++)n[o]=rt(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=rt(t[o],e-1));return n}function st(t,e,n){return at(t,e,n)}function at(t,e,n){return!(t!==e&&(o=t,r=e,!P(o)||!P(r)||o.toString()!==r.toString()))||(n<0||typeof t===I.object&&typeof e===I.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():D(t)&&D(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!at(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!D(t)&&!D(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)||!at(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function ct(t){return t.map(ut)}function ut(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case E.signal:case E.subscribe:case E.stateRender:return;case E.dom:case E.tag:case E.templater:return ct(n.values)}return D(t)?ct(n):ot(t,e)}function it(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(D(n)&&D(r)){if(n===r)continue;return 3}if(typeof n!==I.function||typeof r!==I.function)if(typeof n!==I.object){if(n!==r)return 3.3}else{if(!n&&!r)continue;if(typeof e===I.object){const t=Object.entries(n);for(const e of t){if(!lt(e,r))return 3.1}}}}return!1}function lt([t,e],n){const o=n[t];return typeof e===I.function&&typeof o===I.function||o===e}function pt(t,e){const n=t.context.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)}t.context.destroy$.next(),t.context.renderCount=0}function ft(t,e){for(const n of t){const t=n.lastArray;if(t){ft(t,e);continue}const o=n.value;if(o?.tagJsType===E.subscribe){o.destroy(n,e),n.deleted=!0;continue}const r=n.global;if(!r)continue;const s=n.state.newest,a=r.subscriptions;a&&a.forEach(gt),M(s.templater)&&pt(s,r);ft(n.contexts,s),r.deleted=!0}}function dt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=o.state.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=o.contexts;s&&dt(s,e,n)}return{tags:e,subs:n}}function gt(t){t.unsubscribe()}function ht(t,e,n){const o=e.tagJsVar.tagJsType;return o&&["tag-conversion","element"].includes(o)?(e.tagJsVar.processUpdate(t,e,n,[]),e.value=t,0):t===e.value?0:(++e.updateCount,pr(e,t,n))}function mt(t,e,n,o,r){const s=e.context;s.locked=3,n.target=n.target||o,Zr(n),n.tagJsVar.processInit(t,n,e,r,o),qr(),n.value=t,delete s.locked}function bt(t){switch(t){case void 0:case!1:case null:return J}return t}function vt(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":case"autoSelect":return"autoselect";case"autofocus":case"autoFocus":return"autofocus"}return!1}(t);return!1!==e?e:!!t.startsWith("style.")&&"style"}function yt(t,e,n,o){switch(o){case"autofocus":return void f.push([Vt,[n]]);case"autoselect":return void f.push([Tt,[n]]);case"style":{const o=t.split(".");return void l.push([xt,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)l.push([wt,[n,t]]);return}for(const t of o)l.push([Ct,[n,t]])}(t,e,n)}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function xt(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function wt(t,e){t.classList.add(e)}function Ct(t,e){t.classList.remove(e)}function Tt(t){t.select()}function Vt(t){t.focus()}function Jt(t,e,n){if(j(n))return kt(t,e,n);l.push([Et,[t,e,n]])}function kt(t,e,n){"object"!=typeof t[e]&&(t[e]={});for(const o in n){const r=n[o];l.push([Ot,[t,e,o,r]])}if(t[e].setProperty)for(const o in n){const r=n[o];l.push([Mt,[t,e,o,r]])}}function It(t,e,n){t.setAttribute(e,"")}function Et(t,e,n){if(j(n))return kt(t,e,n);At(t,e,n)}function St(t,e,n){t[e]=!!n}function At(t,e,n){t[e]=n,void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function Mt(t,e,n,o){t[e].setProperty(n,o)}function Ot(t,e,n,o){t[e][n]=o}function Lt(t,e,n,o,r,s,a){return n.target=o,n.howToSet=r,n.attrName=t,n.isSpecial=a,e?.tagJsType?function(t,e,n,o,r){e.processInitAttribute(t,e,r,e,n,o,Et),n.tagJsVar=e}(t,e,n,s,o):Pt(t,e,o,r,a,n)}function Pt(t,e,n,o,r,s){return"function"==typeof e?function(t,e,n,o,r){const s=t(),c={tagJsType:"dynamic-attr",matchesInjection:t=>{const e=u.tagJsVar;if(e.matchesInjection)return e.matchesInjection(t,u)},hasValueChanged:(e,n,o)=>{const r=t();return u.tagJsVar.hasValueChanged(r,u,o)},processInit:a,processInitAttribute:a,destroy:(t,e)=>{u.tagJsVar.destroy(u,e)},processUpdate:(t,e,n,o)=>{++e.updateCount;const r=t();u.tagJsVar.processUpdate(r,u,n,o),u.value=r}},u={updateCount:0,isAttr:!0,target:o,parentContext:e,value:s,tagJsVar:Xt(s),valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z},i={updateCount:0,isAttr:!0,contexts:[u],target:o,parentContext:e,value:t,tagJsVar:c,valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z};return u.tagJsVar.processInitAttribute(n,s,o,u.tagJsVar,u,{},r),i}(e,s,t,n,o):r?yt(t,e,n,r):void o(n,t,e)}function jt(t,e,n,o,r,s){const a=e.tagJsVar,c=t;if(a.hasValueChanged(c,e,n)>0){a.destroy(e,n),o.removeAttribute(r);const c=Xt(t);return c.isAttr=!0,c.processInitAttribute(r,t,o,c,e,n,s),void(e.tagJsVar=c)}}function Dt(t,e,n,o,r,s,a){o.destroy=Ht,o.hasValueChanged=Rt,o.processUpdate=(e,o,r)=>jt(e,o,r,n,t,a);const c=vt(t);Pt(t,e,n,a,c,r),r.tagJsVar=o}function Ht(t){const e=t.target,n=t.attrName;e.removeAttribute(n)}function Ut(t){return{tagJsType:"simple",value:t,processInitAttribute:Dt,processInit:$t,destroy:Wt,hasValueChanged:_t,processUpdate:Nt}}function Nt(t,e,n){return t===e.value?0:pr(e,t,n)}function $t(t,e,n,o,r){const s=bt(t);o=e.placeholder;const a=e.paint=[C,[o,s,function(t){e.simpleValueElm=t,delete e.paint},"processSimpleValueInit"]];u.push(a)}function Wt(t){if(!t.simpleValueElm&&t.paint)return void(t.paint[0]=a);const e=t.simpleValueElm;delete t.simpleValueElm,m(e,"deleteSimpleValue")}function Rt(t,e){return null==t||t===e.value?0:6}function _t(t,e){return null!=t&&typeof t===I.object?(Wt(e),6):(function(t,e){const n=bt(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;l.push([g,[n,o]])}(t,e),0)}function Bt(t,e){return D(t)?0:(ne(e),9)}function Ft(t){return{tagJsType:"array",value:t,processInitAttribute:a,processInit:Gt,processUpdate:zt,hasValueChanged:Bt,destroy:ne}}function zt(t,e,n){if(++e.updateCount,Array.isArray(t))return void qt(e,t,n);0===ht(t,e,n)&&qt(e,t,n)}function Gt(t,e,n,o,r){qt(e,t,n,r)}function Xt(t){const e=t?.tagJsType;return e?t:function(t){if(D(t))return Ft(t);return Ut(t)}(t)}function Kt(t,e,n,o){return{updateCount:0,value:t,destroy$:new Z,render$:new Z,tagJsVar:Xt(t),withinOwnerElement:n,parentContext:o,valueIndex:o.varCounter}}function Zt(t,e,n,o,r){const s=document.createTextNode(J),a=Kt(t,0,!0,e.context);return a.withinOwnerElement=!1,a.placeholder=s,r||(a.placeholder=o),mt(t,e,a,r,o),r&&p.push([y,[r,s]]),a}function qt(t,e,n,o){const r=void 0===t.lastArray;r&&(t.lastArray=[]);const s=t.lastArray;let a=t.placeholder,c=0;const u=[];if(!r){for(let t=0;t<s.length;++t){const n=s[t],o=te(e,t,s,c);0!==o?2!==o?c+=o:t-=1:u.push(n)}t.lastArray=u}const i=e.length;for(let r=0;r<i;++r){a=Yt(e,r,t.lastArray,n,a,o).placeholder}}function Yt(t,e,n,o,r,s){const a=Qt(t[e]),c=n[e];if(c)return function(t,e,n,o,r,s,a){const c=n.length>r;if(c)return Array.isArray(t)?(e.tagJsVar.processUpdate(t,e,o,[]),e.value=t,e):(ht(t,e,o),e);const u=Zt(t,o,0,s,a);return n.push(u),u}(a,c,n,o,e,r,s);const u=Zt(a,o,0,r,s);return n.push(u),u}function Qt(t){if("function"==typeof t&&void 0===t.tagJsType){t=t()}return t}function te(t,e,n,o){const r=t.length-1,s=e-o,a=s<0||r<s,c=n[e];if(a)return ee(c),1;const u=function(t,e,n,o,r){const s=e&&t!==e.arrayValue;if(s)return ee(n),o.splice(r,1),2;return 0}(c.value.arrayValue,Qt(t[e]),c,n,e);return u}function ee(t){!function(t,e){if(t&&e.state?.oldest){return void ue(e.state.oldest,t)}e.tagJsVar.destroy(e,{})}(t.global,t)}function ne(t){++t.updateCount;oe(t,t.lastArray)}function oe(t,e){for(let t=0;t<e.length;++t)ee(e[t]);delete t.lastArray}function re(t){for(let e=t.length-1;e>=0;--e){se(t[e]),t.splice(e,1)}}function se(t){const e=t.marker;e&&m(e,"destroyMarker");m(t.domElement,"destroyClone")}function ae(t,e){!function(t,e){for(const n of t){if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const o=n.supportOwner,r=t.destroy(n,o);L(r)&&e.push(r)}continue}const t=n.lastArray;if(t){oe(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,m(o,"smartRemoveByContext");continue}const r=n.global;if(void 0===r)continue;r.deleted=!0;const s=n.state?.oldest;s&&ae(n,e)}}(t.contexts,e),ce(t)}function ce(t){re(t.htmlDomMeta)}function ue(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return ft(n.contexts,t),t.templater.wrapper&&pt(t,e),ae(n,o),delete n.state,delete n.contexts,delete n.returnValue,delete n.providers,o}function ie(t,e){const n=le(t,e);return!(n||!e.templater.tag?._innerHTML||!le(t.outerHTML,e))||n}function le(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===E.stateRender)return n.dom===o.dom;switch(r.tagJsType){case E.dom:return s?.tagJsType===E.dom&&function(t,e){const n=t.dom,o=e.dom;return n===o}(r,s);case E.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 a=n.templater.values||t.values,c=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===I.function&&typeof o===I.function){return!!(e.toString()===o.toString())}return!0}));if(o)return!0;return!1}(a,c)}(r,s,t,e);return n}}throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function pe(t){++t.updateCount;const e=t.global;ue(t.state.newest,e),function(t){t.htmlDomMeta=[],delete t.contexts,delete t.state,delete t.global,t.renderCount=0}(t)}function fe(t,e){const n=e.state?.newest;if(A(t)){return ie(t,n)?0:7}const o=t?.tagJsType;return o?t.wrapper?.original===e.value.wrapper?.original?0:88:8}function de(t,e){const o=e.global,r=e.state?.newest;if(A(t)){return ie(t,r)?(ir(e,t,r),0):(ue(r,o),n(e),7)}const s=t?.tagJsType;if(s){return!0===ir(e,t,e.state.newest.ownerSupport)?0:88}return pe(e),8}function ge(t,e,n,o,r,s,a){const c=document.createTextNode(J),i=function(t,e,n,o){const r=Kt(t,0,n,o);return e.push(r),++o.varCounter,r}(t,e,r>0,o);return i.placeholder=c,i.target=s,s?p.push([y,[s,c]]):u.push([v,[a,c,"attachDynamicDom.attachDynamicDom"]]),mt(t,n,i,s,a),i}function he(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 me(t){return t.support}function be(t){const e=t.context;return Pe(t.templater)?De(t):Le(t,t,e)}function ve(t,e,n){return t}function ye(t){return typeof t!==I.object||!t||t.tagJsType}function xe(t,e,n,o,r,s){return null==t||s>r?e:typeof t===I.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):ye(e)?e:D(e)?function(t,e,n,o,r,s){for(let a=t.length-1;a>=0;--a){const c=t[a],u=e[a];t[a]=xe(u,c,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const a=Object.keys(t);for(const c of a){const a=t[c],u=xe(e[c],a,n,o,s,r+1);if(a===u)continue;const i=Object.getOwnPropertyDescriptor(t,c)?.set;i||(t[c]=u)}return t}(e,t,n,o,s,r)}function we(t,e,o){const r=o.global,s=o.state.newest,a=s.templater.wrapper;let c=e.templater.wrapper,u=!1;const i=e.templater.tagJsType,l=E.stateRender===i||E.renderOnce===i;if(l)u=e.templater.tagJsType===E.renderOnce||ie(s,e);else if(a&&c){const t=s.templater.tag?._innerHTML;t&&(c=e.outerHTML);u=a.original===c.original}const p=e.templater;if(!u)return void function(t,e,o){const r=t.global;ue(t.state.oldest,r),n(t),e.processInit(e,t,o,t.placeholder)}(o,p,t);const f=l||function(t,e){const n=e.props,o=t.propsConfig,r=o.latest,s=Yo(n,r,t.templater.propWatch);return s}(s,p);if(f)o.locked?r.blocked.push(e):(je(e),++o.renderCount);else{!function(t,e,n,o,r){const s=t.props,a=Ce(e,n,o,s,r),c=e.propsConfig;c.castProps=a;const u=n.propsConfig;u.latest=c.latest}(p,e,s,t,p.propWatch===Zo.DEEP?nr:er)}}function Ce(t,e,n,o,r,s=-1){const a=e.context;if(!a.global||!a.state.newest){const e=ve(o);o.push(...e);return t.propsConfig.castProps=e,o}const c=(e=a.state.newest||e).propsConfig.castProps,u=[];for(let e=0;e<o.length;++e){const a=o[e],i=xe(c[e],a,t,n,r,s+1);u.push(i)}return t.propsConfig.castProps=u,u}function Te(t){const e=t.context,o=e.global,{subs:r,tags:s}=dt(e.contexts);Ve(e);for(const t of s){if(!0===t.context.global.deleted)return;Ve(t.context)}o.subscriptions&&r.forEach(gt),n(e)}function Ve(t){t.global.deleted=!0,ae(t,[]),delete t.contexts}function Je(t,e,n,o){const r=e.original,a=t.tagJsType===E.stateRender,c=tt.stateConfig;let u;return s(n),a?u=t():(u=r(...o),typeof u===I.function&&void 0===u.tagJsType&&(u=u())),n.context.returnValue=u,n.returnValue=u,u.templater=t,t.tag=u,n.context.state.newer={...c},qr(),n}function ke(t){!function(t){const e=tt.stateConfig,n=t||e.context;n.state=n.state||{},n.state.newer={...e};const o=e.support;n.state.newest=o}(t),function(){const t=tt.stateConfig;delete t.prevSupport,delete t.support,delete t.state,delete t.states,qr()}()}function Ie(t,e,n,o){let r;const s=t.templater;if(s.tagJsType===E.stateRender){const e=s;r=ur(s,n,o,t.appSupport),Je(s,e,r)}else{r=(0,s.wrapper)(t,n,e)}return function(t,e){++t.context.renderCount,ke(t.context),tt.tagClosed$.next(e)}(r,o),r.ownerSupport=t.ownerSupport,r}function Ee(t){const e=tt.stateConfig;return e.rearray=t,e.state=[],e.states=[],e.statesIndex=0,e.handlers.handler=F,e.handlers.statesHandler=W,e}function Se(t,e,n,o){return function(t,e,n){Ee(n),tt.stateConfig.prevSupport=e,s(t)}(t,e,n.state.older.state),Ie(t,e,n,o)}function Ae(t,e,n,o){R(t.context),s(t);const r=Ie(t,e,n,o);return qr(),r}function Me(t){const e=t?.context,n=e?.state;return n?.older?.state}function Oe(t,e,n){let o;o=Me(e)?Se(t,e,n):Ae(t,e,n);const r=!e||ie(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===E.dom){const o=n?.dom;return void(o!==t.dom&&Te(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&Te(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context,o=n.global;let r=-1;const s=n.providers=n.providers||[],a=s.length-1;for(;r++<a;){const t=s[r];let n=-1;const a=t.children.length-1;for(;n++<a;)if(o===t.children[n].context.global)return t.children.splice(n,1),void t.children.push(e)}}(e,o),Te(e);const t=o.context;t.state.oldest=o,t.state.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function Le(t,e,n){const o=Oe(e,t,n);if(o.wasLikeTags){return nt(n.state.oldest,o.support),o.support}return qn(e,n)}function Pe(t){return E.templater===t.tagJsType}function je(t){const e=t.context,n=e.global,o=Pe(t.templater);if(e.locked)return n.blocked.push(t),t;if(o){return De(t)}e.locked=4,n.blocked.length&&(t=n.blocked.pop(),n.blocked=[]);const r=Le(e.state.newest,t,e);return delete e.locked,r}function De(t){return je(U(t).context.state.newest)}function He(t,e){const n=e.context.global;if(n&&n.deleted)return!1;const o=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(Ue(n,r))return!0;switch(t.propWatch){case Zo.IMMUTABLE:return tr(n,r);case Zo.SHALLOW:return it(n,r)}return!st(n,r,nr)}(t,e);return!!o}function Ue(t,e){return t.length!==e.length}function Ne(t,e=[]){const n=t.context,o=Pe(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return Ne(r,e);const s=t.context.global;if(s&&!0===s.deleted)return e;const a=t,c=M(a.templater),u=t.templater.tagJsType,i=r&&u!==E.stateRender&&(!c||He(a.templater,a));if(a.context.providers){const t=function(t){const e=t.context.providers;if(!e)return[];const n=[];for(const t of e){const e=he(t.owner,t);n.push(...e.map(me))}return n}(a);e.push(...t)}return i?(Ne(r,e),c&&e.push(a),e):(e.push(a),e)}function $e(t){++d.locks,t.forEach(We),--d.locks,h()}function We(t){const e=t.context;if(!e.global)return void e.tagJsVar.processUpdate(e.value,e,t.ownerSupport,[]);je(e.state.newest)}function Re(t,e){for(let n=0;n<t.length;++n){ze(t[n],e[n])}}let _e;function Be(...t){return _e=t,t}function Fe(){return _e}function ze(t,e){t(Be,1),e(Fe,2)}function Ge(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){Ke.length=0,Xe=0;(0,o[t])(Ze),n[t](qe)}}let Xe=0;const Ke=[];function Ze(...t){return Ke.push(t),t}function qe(...t){return Ke[Xe++]}function Ye(t,e,{resolvePromise:n,resolveValue:o}){if(L(t)){return e.context.locked=2,t.then(function(t,e){return n=>{const o=t.context,r=o.global;if(delete o.locked,!0===o.deleted||!0===r?.deleted)return e(n);!function(t,e){const n=t.context.state,o=e.context.state;Re(n.newer.states,o.newer.states)}(t,o.state.newest);return $e(Ne(t)),e(n)}}(e,n))}return o(t)}function Qe(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=U(e),s=r.context;s.locked=1;const a=t.apply(n,o);delete s.locked;return tn(a,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}function tn(t,e){const n=e.context.global;if(n?.deleted)return;return $e(Ne(e)),Ye(t,e,{resolvePromise:on,resolveValue:rn})}const en="no-data-ever",nn="promise-no-data-ever";function on(){return nn}function rn(){return en}function sn(t,e,n){const o=n[e];if(o){let e=!1;if(t.originalStopPropagation=t.stopPropagation,t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t),t.stopPropagation=t.originalStopPropagation,delete t.originalStopPropagation},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&sn(t,e,r)}function an(t,e,n,o){const r=t.appElement,s=function(t){"blur"===t&&(t="focusout");return"_"+t}(e);"blur"===e&&(e="focusout");const a=t.context.events;if(!a[e]){const t=function(t){sn(t,s,t.target)};a[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function cn(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,an(n.appSupport,o,t,r)}function un(t){return null==t||!1===t}function ln(t,e,n,o,r,s,a){if(un(e))return;const c=[];if(typeof e===I.object){for(const r in e){const u=vt(r),i=yn(r,e[r],t,n,o,Et,s,a,u);void 0!==i&&(Array.isArray(i)?c.push(...i):c.push(i))}return c}0!==e.length&&r(n,e,J)}function pn(t,e){t.removeAttribute(e)}function fn(t,e,n,o){const r=e,s=t;if(s?.tagJsType){const o=e.value;return o?.tagJsType?void o.hasValueChanged(s,e,n):(s.isAttr=!0,Zr(e),s.processInitAttribute(r.attrName,t,r.target,s,r,n,Et),qr(),void(r.tagJsVar=s))}if(r.isNameOnly)return function(t,e,n,o,r,s,a,c){if(n){if(un(e)||""===e)return void o.removeAttribute(n);if(typeof n===I.object)if(typeof e===I.object)for(const t in n)t in e||l.push([pn,[o,t]]);else for(const t in n)l.push([pn,[o,t]])}const u=ln(t,e,o,r,s,a,c);u&&a.push(...u)}(o,t,r.value,r.target,n,r.howToSet,[],r.parentContext),void(r.value=t);const a=r.target;!function(t,e,n,o,r,s,a){if(P(t))return function(t,e,n,o,r,s,a){const c=t.templater.wrapper;if((c?.tagJsType||c?.original?.tagJsType)!==E.renderOnce)return wn(e,t,o,n);return xn(e,n,o,r,s,t)}(r,t,o,e,a,s);xn(t,o,e,a,s,r)}(t,r.attrName,0,a,n,r.howToSet,r.isSpecial),e.value=t}const dn=":tagvar",gn=":",hn=new RegExp(dn+"(\\d+)"+gn,"g");function mn(t){return t.search&&t.startsWith(dn)?t.search(hn):-1}function bn(t,e,n,o,r,s,a){const c=o.length,u=[];function i(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(mn(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,c).join("");r(n,t,s)}return e.forEach((e=>{if(mn(e)>=0){const r=o.length,c=Xt(e),l={updateCount:0,isAttr:!0,target:n,attrName:t,withinOwnerElement:!0,tagJsVar:c,valueIndex:a.varCounter,parentContext:a,destroy$:new Z,render$:new Z};c.processUpdate=function(t,e,n,o){++e.updateCount,i(o)};const p=s[r];l.value=p,u.push(l),++a.varCounter}})),i(s),u}function vn(t){return j(t)&&"tagJsVar"in t?t.tagJsVar:-1}function yn(t,e,n,o,r,s,a,c,u){const i=vn(t);let l=i>=0||void 0===e&&"string"!=typeof t,p=n[i];e?.tagJsType?p=e:t?.tagJsType&&(l=!0,p=t,e=t);const f=p;if(f?.tagJsType)return function(t,e,n,o,r,s,a,c,u){const i=Kt(t,0,!0,n);return i.target=c,i.valueIndex=r,i.isAttr=!0,i.isNameOnly=u,i.stateOwner=U(s),i.supportOwner=s,Zr(i),o.processInitAttribute(a,t,c,o,i,s,Et),qr(),i.oldTagJsVar=i.tagJsVar,i.tagJsVar=o,i}(e,0,c,f,i,r,t,o,l);if(l){-1===i&&l&&(p=t);const e=Kt(p,0,!0,c);e.valueIndex=i,e.isAttr=!0,e.target=o,e.isNameOnly=!0,e.howToSet=s;e.tagJsVar.processUpdate=fn;const u=ln(n,p,o,r,s,a,c);return u&&a.push(...u),e}if(Array.isArray(e))return bn(t,e,o,[],s,n,r.context);const d=vn(e);if(d>=0){return function(t,e,n,o,r,s,a,c,u){if(typeof e===I.function)return++r.varCounter,wn(e,a,t,n);const i=Xt(e),l={updateCount:0,isAttr:!0,target:n,attrName:t,howToSet:s,value:e,withinOwnerElement:!0,tagJsVar:i,destroy$:new Z,render$:new Z,valueIndex:u,parentContext:r};return o.push(l),i.processUpdate=fn,Lt(t,e,l,n,s,a,c),l.value=e,l}(t,n[d],o,[],c,s,r,u,d)}return Pt(t,e,o,s,u,c)}function xn(t,e,n,o,r,s){if(!1===o){switch(t){case void 0:case!1:case null:return void l.push([Cn,[e,n]])}if(P(t))return cn(e,t,s,n);r(e,n,t)}else yt(n,t,e,o)}function wn(t,e,n,o){return cn(o,t=Qe(t,e),e,n)}function Cn(t,e){t.removeAttribute(e)}function Tn(t,e,n,o,r){for(const s of t){const t=s[0],a=s[1],c=s[2]||!1;let u=s.length>1?Et:It;s[3]&&(u=s[3]);const i=r.contexts,l=yn(t,a,e,n,o,u,i,r,c)||void 0;"object"==typeof l&&(i.push(l),++r.varCounter)}}function Vn(t,e,n,o,r,s,a){e.at&&Tn(e.at,n,t,o,r),s?p.push([y,[s,t,"appendToAttachDomElement"]]):u.push([v,[a,t,"insertBeforeAttachDomElement"]])}function Jn(t,e,n,o,r,s,a){const c=n.context,u=c.contexts;o=c;const i=[];s&&void 0===a&&(a=document.createTextNode(J),p.push([y,[s,a]]),s=void 0);for(let c=0;c<t.length;++c){const l=t[c],p=l.v;if(!isNaN(p)){const t=Number(p),c=e[t];if(P(c)&&void 0===c.tagJsType){++o.varCounter;continue}ge(c,u,n,o,r,s,a).valueIndex=t;continue}const f={};if(i.push(f),"text"===l.nn){kn(f,l,s,a);continue}const d=f.domElement=document.createElement(l.nn),g={updateCount:0,isAttrs:!0,target:d,parentContext:o,contexts:[],destroy$:new Z,render$:new Z,tagJsVar:{tagJsType:"new-parent-context"},valueIndex:-1,withinOwnerElement:!0,varCounter:0};Vn(d,l,e,n,g,s,a),g.target=d,l.ch&&(f.ch=Jn(l.ch,e,n,g,r+1,d,a).dom)}return{dom:i,contexts:u}}function kn(t,e,n,o){const r=t,s=r.tc=e.tc;n?p.push([V,[n,s,function(t){r.domElement=t}]]):u.push([T,[o,s,function(t){r.domElement=t}]])}const In=/(:tagvar\d+:)/,En="ondoubleclick",Sn=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,An=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function Mn(t){const e=[],n=[],o=[];let r=null,s=-1,a=0;const c=new RegExp(An,"g");for(t=function(t){return t.replace(On,(function(t){return t.replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const u=c.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(a<u.index){const e=t.slice(a,u.index);if(e.trim()){const t=Pn(e);for(let e of t)e.startsWith(dn)&&e.search(In)>=0&&-1===e.search($n)&&(e=dn+ ++s+gn),Ln(r,n,e)}}if(a=u.index+i.length,f){r=o.pop()||null;continue}const g=[];let h;for(;null!==(h=Sn.exec(p));)s=Dn(h,s,e,g);const m={nn:l};g.length&&(m.at=g),r?(r.ch||(r.ch=[]),r.ch.push(m)):n.push(m),d||(o.push(r),r=m)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=Pn(e);for(const e of t)e.startsWith(dn)&&++s,Ln(r,n,e)}}return n}const On=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function Ln(t,e,n){var o;!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:(o=n,o.replace(/(\[l t\]!--[\s\S]*?--\[g t\])/g,(function(t){return t.replace(/\[l t\]/g,"<").replace(/\[g t\]/g,">").replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]")})))})}function Pn(t){return t.split(In).filter(jn)}function jn(t){return""!==t}function Dn(t,e,n,o){const r=t[1]||t[3]||t[5];let s=t[2]||t[4]||t[6];if(void 0===r)return e;const a=""!==t[2],c=void 0===s&&a,u=r.toLowerCase(),i=u.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===En.length&&t===En?"dblclick":t.slice(2,t.length);return t}(u):u;if(c){if(r.slice(0,dn.length)===dn){const t=dn+ ++e+gn;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(r)&&t[0].slice(r.length,t[0].length).search(/\s+$/)>=0)return o.push([i]),e;const a=t[3];if(a.search($n)>=0){s=a;const t=[i,s];return o.push(t),e}s=dn+ ++e+gn}a||(s=t[2]);const l=s.split(Un).filter((t=>t.length>0));l.length>1&&(s=l,l.forEach((t=>{t.search(hn)>=0&&++e})));const p=[i,s],f=vt(u);return f&&p.push(f),"style"===i?(o.unshift(p),e):(o.push(p),e)}const Hn=new RegExp(dn+"(\\d+)"+gn,"gi"),Un=new RegExp("("+dn+"\\d+"+gn+")","gi"),Nn=dn.slice(0,dn.length-1),$n=new RegExp(Nn+"r(\\d+)"+gn,"gi"),Wn=Nn+"r$1"+gn;function Rn(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 r=t[o].replace(Hn,Wn);o<e.length?n.push(r+dn+o+gn):n.push(r)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(dn+(e.length+n-1)+gn)}(n,t,e),n}(n,e)}(t,e).join("");return Mn(n)}const _n="ch";function Bn(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],a=r[t];if(a.at){const t=a.at;a.at=zn(t,e)}if(a.ch){const t=a.ch,o=[...s,_n];a.ch=Bn(t,e,n,o)}t=Fn(a,e,r,t)}return r}function Fn(t,e,n,o){if("text"!==t.nn)return o;const r=t;let s,a=r.tc;if(typeof a!==k.string)return o;for(;null!==(s=hn.exec(a));){const t=s[1],r=parseInt(t,10);if(!isNaN(r)&&r<e){const t=dn+r+gn,e=a.slice(s.index+t.length);n.splice(o,1,{nn:"text",v:r}),a=e,hn.lastIndex=0}}return r.tc=a,o}function zn(t,e){const n=[];for(const o of t){const[t,r,s]=o;if(t.startsWith(dn)){const o=parseInt(t.replace(dn,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof r===k.string&&r.startsWith(dn)){const o=parseInt(r.replace(dn,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},s]);continue}}n.push(o)}return n}function Gn(t){return t.length}const Xn={};function Kn(t,e){const n=function(t){const e=t.map(Gn);return e.push(t.length),Number(e.join(""))}(t),o=Xn[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=Bn(Rn(t,e),e.length),a={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Xn[n]=a,s}function Zn(t,e,n){const o=t.context;o.state=o.state||{};const r=o.state;r.oldest=t,r.newest=t,o.state.older=o.state.newer,++d.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===E.dom)return n.dom;const o=n.strings;return Kn(o,n.values)}(t),s=t.templater.tag,a=s.values,c=[],u=t.context;e=u,u.contexts=c;const i=Jn(r,a,t,e,0,n,o);return i}(t,t.context,e,n);return o.htmlDomMeta=s.dom,--d.locks,s}function qn(t,e){const n=e.state.newest,o=e.placeholder;return n.ownerSupport=t,Zn(n,void 0,o),n}function Yn(t){const e={tagJsType:E.templater,processInitAttribute:a,processInit:eo,processUpdate:a,hasValueChanged:de,destroy:a,propWatch:"shallow",key:a};return e.tag=t,t.templater=e,e}function Qn(t,e,n){const o=cr(t,e,e.appSupport,n);return n.contexts=n.contexts||[],o}function to(t,e,n,o,r){const s=Qn(t,n,e);s.ownerSupport=n;const a=Zn(s,o,o?void 0:r);for(const t of a.dom)t.marker&&(o?p.push([y,[o,t.marker]]):u.push([v,[r,t.marker,"subMarker"]])),t.domElement&&(o?p.push([y,[o,t.domElement,"subAppendTo"]]):u.push([v,[r,t.domElement,"subInsertBefore"]]));return s}function eo(t,e,n,o,r){return e.state={},r?to(t,e,n,r,o):qn(n,e)}function no(t,e){const n={tagJsType:E.templater,processInit:eo,processInitAttribute:a,processUpdate:ht,hasValueChanged:de,destroy:pe,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n},matchesInjection:(t,e)=>n.wrapper===t||n.wrapper?.original===t?.original?e:void 0};return n}const oo=[];function ro(t,e,n){const o=t.propWatch===Zo.DEEP?nr:er,r=t.props,s=e.propsConfig;let a=s.castProps;const c=n?.propsConfig,u=c?.castProps;u&&(s.castProps=u,a=Ce(e,n,n.ownerSupport,r,o));return a||ve(r)}function so(t,e,n){const o=no(Zo.DEEP);o.tagJsType=t.tagJsType;const r=Qn(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 ao(t,e,o,r,s){n(e);const a=so(t,e,o);return Ae(a,void 0,e),to(a.templater,e,o,s,r)}function co(t,e,n,o,r){const s=gr(t,e,n,o,r);return s.hasEmitted||uo(t,s),s}function uo(t,e){const n=t.Observables[0];if(!e.hasEmitted)return"withDefault"in t?void e.subValueHandler(t.withDefault,0):"value"in n?void e.subValueHandler(n.value,0):void 0;const o=e.lastValues[0].value;e.subValueHandler(o,0)}function io(t,e,n,o,r,s){e.destroy=mr;const a=vt(t),c=function(e,o){Pt(t,e,n,Et,a,r),vr(o)},u=hr(e.Observables,s,c,e,r);return r.subContext=u,r.value=e,r.tagJsVar=e,e.processUpdate=function(e,o,s){return jt(e,r,s,n,t,Et)},{subContext:u,onOutput:c}}function lo(t,e,n,o,r,s){const{subContext:a}=io(t,e,n,0,r,s);a.hasEmitted||function(t,e){const n=e.tagJsVar,o=n.onOutput,r=t.Observables;let s=r[0]?.value||t.withDefault;t.callback&&(s=t.callback(s));o(s,!0,e)}(e,a)}function po(t,e,n){return{onOutput:a,tagJsType:E.subscribe,processInitAttribute:lo,processInit:co,hasValueChanged:fo,processUpdate:a,destroy:br,callback:n,withDefault:e,Observables:[t]}}function fo(t,e){if(!t?.tagJsType)return 1;const n=t.Observables;if(!n)return 2;const o=e.value.Observables;if(!o||o.length!==n.length)return 3;return n.every(((t,e)=>t===o[e]))?0:4}function go(t,e,n,o){if(!e||!e.tagJsType||e.tagJsType!==t){return o.tagJsVar.destroy(o,n),lr(e,o,n,99),99}}function ho(t,e,n){const o=e.subContext,r=go(E.subscribe,t,n,e);return r||(o&&o.hasEmitted?(o.tagJsVar=t,o.valuesHandler(o.lastValues,0),0):0)}function mo(t,e){return{onOutput:a,tagJsType:E.subscribe,processInitAttribute:io,processInit:gr,hasValueChanged:fo,processUpdate:ho,destroy:br,callback:e,Observables:[t]}}function bo(t,e){++t.updateCount;const n=vo(t.subContext,e);return delete t.subContext,n}function vo(t,e){t.deleted=!0;const n=t.appendMarker;if(n&&(m(n,"deleteSubContext"),delete t.appendMarker),!t.hasEmitted)return;const o=t.contextItem;return o.tagJsVar.destroy(o,e),76}function yo(t,e,n,o){return e.hasEmitted=!0,e.contextItem=Zt(t,n,0,o)}function xo(t,e,n){++e.updateCount;const o=t.owner._innerHTML;o.processInit=o.oldProcessInit;const r=e.subContext?.contextItem;pr(r,o,n)}function wo(t,e,n,o,r){e.subContext={},t.processUpdate=xo,function(t,e,n,o,r){const{appendMarker:s,insertBefore:a}=fr(r,o),c=n.subContext;c.appendMarker=s;const u=t.owner,i=u._innerHTML;i.processInit=i.oldProcessInit,yo(i,c,e,a)}(t,n,e,o,r)}function Co(){return{tagJsType:"innerHTML",hasValueChanged:()=>0,processInitAttribute:a,processInit:wo,processUpdate:xo,destroy:bo}}function To(t,e){return{onOutput:a,tagJsType:E.subscribe,processInitAttribute:a,hasValueChanged:fo,processInit:Vo,processUpdate:a,destroy:br,callback:e,Observables:t}}function Vo(t,e,n,o,r){return gr({tagJsType:E.subscribe,states:[],Observables:t},e,n,void 0,r)}function Jo(t){if(!t)return a;const e=Xr();if(!e)throw new Error("output must be used in render sync with a parent context");const n=H(e);if(!n)throw new Error("output must be used in render sync fashion");if(!0===t.wrapped)return t;const o=(...e)=>{const o=n.ownerSupport;return ko(e,t,o.context)};return o.wrapped=!0,o}function ko(t,e,n){const o=n.state,r=o.newer.states,s=o.older?o.older.states:r,a=o.newest;Re(r,s);const c=e(...t);return Re(s,r),f.push([()=>{const t=a.context.global;if(void 0===t||!0===t.deleted)return++d.locks,a.context.tagJsVar.processUpdate(a.context.value,a.context,a,[]),--d.locks,void h();++d.locks,be(a),--d.locks,h()},[]]),c}function Io(t,e={}){const n={tagJsType:E.host,processInitAttribute:So,hasValueChanged:()=>0,processInit:Ao,processUpdate:Eo,destroy:Mo,options:{callback:t,...e},matchesInjection(e,n){const o=e?.options;if(!o)return!1;const r=o?.callback;return r===t&&n}},o=(...n)=>({...o,options:{arguments:n,...e,callback:t}});return Object.assign(o,n),o}function Eo(t,e,n){if(P(t)&&!t?.tagJsType)throw new Error("issue on its way");const o=go(E.host,t,n,e);if(o)return o;const r=e.tagJsVar.options,s=t;var a;Zr(a=e),Ee(a.state.newer.state);const c=s.options.arguments||r.arguments||[];e.returnValue=s.options.callback(...c),ke(e)}function So(t,e,n,o,r){return Ao(o,r)}function Ao(t,e){const n=e.target,o=e.state={};R(e),function(t,e,n,o){const r=e.options.arguments||[],s=e.options.callback(...r);n.returnValue=s;const a=e.options;a.onInit&&a.onInit(t,e,n,o)}(n,t,e,o),ke(e)}function Mo(t){++t.updateCount;const e=t,n=e.tagJsVar,o=n.options;if(e.destroy$.subscribers.length&&(Zr(t),ko([],e.destroy$.next.bind(e.destroy$),t),qr()),o.onDestroy){const r=e.target;return ko([],(function(){Zr(t);const s=o.onDestroy(r,n,e,e.state);return qr(),s}),t.stateOwner.context)}}function Oo(t,e,n,o){const r={tagJsType:"tag-conversion",processInitAttribute:a,processInit:(r,s,a)=>{const c=t.returnValue;return e.tagJsVar.processInit(c,e,n,o.placeholder)},processUpdate:(t,o,s)=>{if(o.locked||o.deleted)return;++o.updateCount;const a=o.value.tagJsType,c=t?.tagJsType,u=c!==a;if(fe(t,o)||u||r.hasValueChanged(t,o,n))return r.destroy(o,n),void lr(t,o,s,789);o.locked=467,o.render$.next();const i=o.returnValue;!function(t,e,n,o,r){const s=ve(e.props);t.value.props=s;const a=r.propsConfig;a&&(a.castProps=s);if(t.updatesHandler=n.updatesHandler,n.updatesHandler){Zr(n);(0,n.updatesHandler)(s),qr()}t.tagJsVar.processUpdate(o,t,r,[]),t.value=o}(e,t,o,i,n),delete o.locked},hasValueChanged:(n,o,r)=>{const s=t.returnValue;return e.tagJsVar.hasValueChanged(s,e,r)},destroy:(o,r)=>{++t.updateCount,t.deleted=!0,delete t.returnValue;const s=e.tagJsVar.destroy(e,n);return L(s)?s.then((()=>{const e=Do(t,r);return h(),e})):(t.destroy$.next(),Do(t,r))}};return r}function Lo(t,e,n){const o=t.context,r=t.returnValue,s=Xt(r);delete o.global,o.contexts=[];const a={updateCount:0,value:r,tagJsVar:s,destroy$:new Z,render$:new Z,placeholder:o.placeholder,valueIndex:-1,withinOwnerElement:!0,parentContext:o,contexts:o.contexts},c=Oo(o,a,t,n);return o.tagJsVar=c,s.processInit(r,a,t,n.placeholder),t}function Po(t,e,n){const o=ur(t,e,n,n?.appSupport),r=o.propsConfig;if(r){const e=t.tagJsType!==E.tagComponent?[]:ro(t,o);r.castProps=e}return Ae(o,e.state.newest,e)}function jo(t,e,n){const o=Po(t,e,n),r=o.templater.tag;return["dom","html"].includes(r.tagJsType)?(Zn(o,void 0,e.placeholder),o):Lo(o,o.ownerSupport,e)}function Do(t,e){delete t.returnValue,delete t.global,t.contexts=[],t.htmlDomMeta=[],delete t.updatesHandler}function Ho(t,e,n,o){const r=Po(t,e,n),s=r.templater.tag;return["dom","html"].includes(s.tagJsType)?function(t,e){const n=Zn(t,e,void 0);for(const t of n.dom)t.domElement&&p.push([y,[e,t.domElement]]),t.marker&&p.push([y,[e,t.marker]]);return t}(r,o):Lo(r,0,e)}function Uo(t,e,o,r,s){return n(e),s?Ho(t,e,o,s):jo(t,e,o)}function No(t){return tt.stateConfig.handlers.handler(t)}function $o(t){return No((()=>{const e=t();if(Xr().global){return Ye(e,r(),{resolvePromise:Wo,resolveValue:Ro})}})),qo}function Wo(t){return t}function Ro(t){return t}function _o(t){return No((function(){Xr().destroy$.toCallback(t)})),qo}mo.all=function(t,e){return mo(Z.all(t),e)},Io.onInit=t=>Io((()=>{}),{onInit:t}),Io.onDestroy=t=>Io((()=>{}),{onDestroy:t});let Bo=0;const Fo=Go("click"),zo=Go("mousedown");function Go(t){return function(e){const n=$r(e);return No((()=>{Kr().addEventListener(t,n)})),n}}const Xo={get:Kr,onclick:Fo,click:Fo,onClick:Fo,mousedown:zo,onmousedown:zo,onMouseDown:zo};function Ko(t,e){Object.defineProperty(qo,t,{get:()=>e,set:t=>e(t)})}var Zo;function qo(t,e=Zo.SHALLOW){const n=function(...o){const r=no(e,o);r.tagJsType=E.tagComponent,r.processInit=Uo,r.hasValueChanged=de;const s=function(t,e){return function(n,o,r){const s=ro(t,n,r),a=n.ownerSupport,c=ur(t,o,a,n.appSupport,s);return Je(t,e,c,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;n.original=t,o.tags=oo,o.setUse=tt,o.ValueTypes=E,o.tagIndex=Bo++,oo.push(n);const r=n;return r.updates=t=>(Xr().updatesHandler=t,!0),r.getInnerHTML=Co,r}function Yo(t,e,n){if(Ue(t,e))return 11;switch(n){case Zo.NONE:return 1;case Zo.SHALLOW:return it(t,e);case Zo.IMMUTABLE:return tr(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];const r=n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===I.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>Qo(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Qo(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o)));if(!r)return 7;return!1}(t,e)}function Qo(t,e,n){if(typeof t!==I.function)return!!st(t,e,nr)&&4;if(typeof e!==I.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 tr(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}Ko("onclick",Fo),Ko("click",Fo),Ko("onMouseDown",zo),Ko("onmousedown",zo),Ko("mousedown",zo),function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(Zo||(Zo={})),qo.element=Xo,qo.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},qo.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},qo.deepPropWatch=qo,qo.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`` `")},qo.inject=function(t){const e=Xr();if(!e)throw new Error("tag.inject can only be called within a tag or host context");let n=e.parentContext;for(;n;){const e=n.contexts;if(e)for(const n of e)if(n.isAttr&&n.tagJsVar?.matchesInjection){const e=n.tagJsVar.matchesInjection(t,n);if(void 0!==e)return e.returnValue}if(n.tagJsVar?.matchesInjection&&n.tagJsVar.matchesInjection(t,n))return n.returnValue;n=n.parentContext}const o=`Could not find parent context for tag.inject ${t}`;throw console.error(o,{targetItem:t,context:e}),new Error(o)},qo.onInit=$o,qo.onDestroy=_o,qo.onRender=function(t){const e=Xr(),n=n=>{const o=Xr();Zr(e);const r=t();return qr(),Zr(o),r},o=e.render$.subscribe((()=>n())),r=n();return qo.onDestroy((()=>o.unsubscribe())),r},qo.getInnerHTML=Co,qo.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`` `")},qo.immutableProps=function(t){return qo(t,Zo.IMMUTABLE)},qo.watchProps=function(t){return qo(t,Zo.SHALLOW)},Object.defineProperty(qo,"renderOnce",{set(t){t.tagJsType=E.renderOnce,t.processInit=ao,t.processUpdate=ht,t.destroy=pe,t.hasValueChanged=function(){return 0}}}),Object.defineProperty(qo,"use",{set(t){t.original={setUse:tt,tags:oo},t.tagJsType=E.stateRender,t.processInit=Uo,t.processUpdate=ht,t.hasValueChanged=de,t.destroy=pe}}),Object.defineProperty(qo,"promise",{set(t){Fr(t)}});const er=3,nr=10;function or(t){return ut(t,er)}function rr(t){return ut(t,nr)}function sr(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0};return e.global.blocked=[],e.state||(e.state={newer:{state:[],states:[]}}),o}function ar(t,e,n,o){e.appSupport=n||e;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==E.stateRender){switch(o.propWatch){case Zo.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case Zo.SHALLOW:return t.propsConfig={latest:e.map(or),castProps:n}}return t.propsConfig={latest:e.map(rr),castProps:n}}}(e,r,o)),e}function cr(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 ur(t,e,n,o,r){const s=sr(t,e,r);return s.ownerSupport=n||s,s.ownerSupport.appSupport=o||s.ownerSupport,ar(t,s,o,r)}function ir(t,e,o){if(M(e))return void 0===t.global&&n(t),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,function(t,e,n){if(!e.state.newest)return void t.processInit(t,e,n,e.placeholder);const o=ur(t,e,n,n.appSupport);we(n,o,e)}(e,t,o),!0;if(t.global){t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e;const n=t.state.newest;if(n)return typeof e===I.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 a=ur(r,e,o,o.appSupport);nt(t.context.state.oldest,a)}(n,t,e,o),!0}return e.processInit(e,t,o,t.placeholder),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,!0}function lr(t,e,n,o){const r=t&&t.tagJsType;if(delete e.deleted,r){if(r===E.renderOnce)return;ir(e,t,n)}else{if(D(t))return qt(e,t,n),e.oldTagJsVar=e.tagJsVar,void(e.tagJsVar=Ft(t));typeof t!==I.function?o&&function(t,e){e.value=t,e.oldTagJsVar=e.tagJsVar,e.tagJsVar=Ut(t);const n=e.placeholder,o=bt(t),r=e.paint=[C,[n,o,function(t){e.simpleValueElm=t,delete e.paint},"processNowRegularValue"]];u.push(r)}(t,e):e.value=t}}function pr(t,e,n){const o=t.tagJsVar.hasValueChanged(e,t,n);return 0===o||lr(e,t,n,o),o}function fr(t,e){let n;return t&&(n=e=document.createTextNode(J),p.push([y,[t,e]])),{appendMarker:n,insertBefore:e}}function dr(t,e,n){const o=ho(t,e,n);if(!0!==e.hasEmitted){const t=e.value.Observables;if(!t)return;if(!("value"in t[0]))return}if(0===o&&t.callback){uo(t,e.subContext)}}function gr(t,e,n,o,r){const s=t.Observables,{appendMarker:a,insertBefore:c}=fr(r,o);let u=function(t,e,o){yo(t,o,n,c),vr(e),u=o.tagJsVar.onOutput=function(t,e,o){const r=o.contextItem;pr(r,t,n),r.tagJsVar.processUpdate(t,r,n,[t]),r.value=t,vr(e)}};const i=hr(s,n,((t,e,n)=>u(t,e,n)),t,e);return i.appendMarker=a,e.subContext=i,t.processUpdate=dr,t.onOutput=u,i}function hr(t,e,n,o,r){function s(t,e){u.lastValues[e]={value:t,tagJsVar:Xt(t),oldTagJsVar:u.lastValues[e]?.tagJsVar},a(u.lastValues,e)}function a(t,e){const o=u.tagJsVar,s=o?.callback;if(s){Zr(r);const e=o.callback(...t.map((t=>t.value)));return n(e,c,u),void qr()}const a=t[e].value;n(a,c,u)}let c=!0;const u={lastValues:[],subValueHandler:s,valuesHandler:a,tagJsVar:o,subscriptions:[]};return t.forEach(((t,e)=>{c=!0,u.subscriptions.push(t.subscribe((t=>s(t,e)))),c=!1})),o.onOutput=n,u}function mr(t){const e=t.subContext;if(!e)return;e.subscriptions.forEach((t=>t.unsubscribe())),delete t.subContext}function br(t,e){++t.updateCount;const n=t.subContext;return mr(t),vo(n,e)}function vr(t){t||tt.stateConfig.support||h()}function yr(t,e,n,o,r){gr({tagJsType:E.subscribe,states:[],Observables:[t]},e,n,o,r)}function xr(t){return r()?No((()=>wr(t))):wr(t)}function wr(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{tagJsType:E.signal,hasValueChanged:fo,processInitAttribute:a,processInit:yr,processUpdate:dr,get value(){return e},set value(t){e!==t&&(e=t,o(t))},destroy:br,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class Cr extends Z{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class Tr extends Z{value;constructor(t){super(t),this.value=t,this._value=t,Y(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function Vr(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function Jr(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const kr=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))},Ir=(t,e)=>Sr(t,e).pastResult,Er=t=>t;const Sr=(t,e,{init:n,before:o,final:r=Er}={})=>{const s=No({pastResult:void 0,values:void 0}),a="function"==typeof t?t():t,c=void 0===s.values;let u=0;function i(t){if(void 0===s.values){if(o&&!o(t))return s.values=t,s;const a=(n||e)(t,s.values);return s.pastResult=r(a),s.values=t,s}if(t.every(((t,e)=>t===s.values[e])))return s;if(o&&!o(t))return s.values=t,s;const a=e(t,s.values);return s.pastResult=r(a),s.values.length=0,s.values.push(...t),s}return c&&"function"==typeof t&&qo.onRender((()=>{if(++u,1===u)return;i(t())})),i(a)};function Ar(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=No((()=>r())),o=No((()=>new Cr(void 0))),s=No((()=>({state:tt.stateConfig.state,states:tt.stateConfig.states}))),a=(t,a)=>(Sr(t,((t,e)=>{const c=r(),u=a(t,e);if(c!==n){const t=s.state,e=n.context.state.older;if(e){Ge(t,e.state,s.states,e.states)}}o.next(u)}),e.setup),o);return a.setup=e.setup,Ar((()=>a),a),a}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function Mr(t){return r()?No((()=>new Z(t))):new Z(t)}function Or(t){return tt.stateConfig.handlers.statesHandler(t)}function Lr(t){const e=xr([]),n=xr(0),o=xr(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),Ir(r,(()=>{++s,e.value=r,t((()=>r))})),Or(((r,a)=>{if(s)return t(((...t)=>(a&&1!==a||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Pr(){return{stateDiff:0,provider:void 0}}Ar((()=>function(t){const e=(e,n)=>Sr(e,n,t).pastResult;return e.setup=t,Ar((()=>e),e),e}({})),Ir),Mr._value=t=>{const e=No((function(){return{state:tt.stateConfig.state,states:tt.stateConfig.states}})),n=r();return No((function(){return new Cr(t).pipe((t=>{const o=n.context.state.newer;return Ge(o.state,e.state,o.states,e.states),t}))}))},Mr.all=function(t){const e=No((()=>({state:tt.stateConfig.state,states:tt.stateConfig.states}))),n=r();return Z.all(t).pipe((t=>{const o=n.context.state.newer;return o&&Ge(o.state,e.state,o.states,e.states),t}))};const jr={create:t=>{const e=No(Pr);if(e.stateDiff){let t=e.stateDiff;for(;t--;)No(void 0);return No(void 0)}const n=No((()=>{const n=tt.stateConfig,o=n.state.length,r=t.prototype?new t:t(),s=n.support,a=n.state.length-o,c={constructMethod:t,instance:r,stateDiff:a,owner:s,children:[]};e.provider=c;const u=s.context;return(u.providers=u.providers||[]).push(c),e.stateDiff=a,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return No((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=r(),s=[];let a={ownerSupport:o.ownerSupport};for(;a.ownerSupport;){const t=a.ownerSupport.context.providers;if(!t){a=a.ownerSupport;continue}const e=t.find((t=>{s.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}a=a.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,s),new Error(c)}))}};class Dr extends Error{details;constructor(t,e,n={}){super(t),this.name=Dr.name,this.details={...n,errorCode:e}}}class Hr extends Dr{constructor(t,e){super(t,"array-no-key-error",e),this.name=Hr.name}}class Ur extends Dr{constructor(t,e){super(t,"state-mismatch-error",e),this.name=Ur.name}}class Nr extends Dr{constructor(t,e){super(t,"sync-callback-error",e),this.name=Nr.name}}function $r(t){const e=Xr(),n=No({callback:t}),o=No((()=>Wr(e,tt.stateConfig,n)));return n.callback=t,o}function Wr(t,e,n){const o=e.states;return function(...e){const r=function(t,e,n,...o){const r=n(...o),s=H(t);if(!s)return r;if(s.context.global)je(s);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}return L(r)&&r.finally((()=>{if(t.global)je(s);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}})),r}(t,o,n.callback,...e);return h(),r}}const Rr=()=>{const t=Xr();if(!t)throw _r;const e=tt.stateConfig;return function(n){return Wr(t,e,{callback:n})}},_r=new Nr("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering"),Br=()=>{};function Fr(t){const e=Xr(),n=No({callback:Br}),o=No({current:void 0}),r=No((()=>Wr(e,tt.stateConfig,n)));if(o.current!==t){o.current=t;const e=t;t.then((()=>{o.current===e&&r()}))}}function zr(t=[]){return r()?No((()=>Gr(wr(t)))):Gr(wr(t))}function Gr(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[a=s]=(...e)=>{const n=t.value[a](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var a},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 Xr(){return tt.stateConfig.context}function Kr(){return Xr().target}function Zr(t){return tt.stateConfig.context=t}function qr(){delete tt.stateConfig.context}function Yr(t,e,o,r,s){const a=t;let c=a.templater;if(c||(c=Yn(a)),n(e),s)return to(c,e,o,s,r);return(e.state=e.state||{}).newest=Qn(c,o,e),qn(o,e)}function Qr(t,e,n,o,r){Yr(t.outerHTML,e,n,o,r);e.tagJsVar.processUpdate=function(t,e,n){pr(e,t?.outerHTML||t,n)},t.hasValueChanged=ts}function ts(t,e){return de(t,e)}function es(t,e){const n={values:e,ownerSupport:r(),dom:t,tagJsType:E.dom,processInitAttribute:a,processInit:Yr,processUpdate:ht,hasValueChanged:de,destroy:pe,key:function(t){return n.arrayValue=t,n},setHTML:function(t){return t.outerHTML=n,n._innerHTML=t,t.oldProcessInit=t.processInit,t.processInit=Qr,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}"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const ns=[],os="__taggedjs_tag_element__";function rs(t,e,o){const r=e[os],c=ns.findIndex((t=>t.element===e));if((r||c>=0)&&console.warn("tagElement called multiple times for the same element",{element:e}),c>=0){const t=ns[c].support;ue(t,t.context.global),ns.splice(c,1)}e[os]=!0;let u=()=>f(o);u.propWatch=Zo.NONE,u.tagJsType=E.stateRender,u.processUpdate=ht,u.props=[o],u.isApp=!0;const i=function(t,e){const o={tagJsType:"templater",hasValueChanged:de,destroy:pe,processInitAttribute:a,processInit:function(){console.debug("do nothing app function")},processUpdate:ht},r={updateCount:0,value:t,valueIndex:0,varCounter:0,destroy$:new Z,render$:new Z,withinOwnerElement:!1,renderCount:0,global:void 0,state:{},tagJsVar:o};return n(r),r.events={},function(t,e,n){const o=sr(t,e);ar(t,o,o),o.appElement=n,e.state.oldest||(e.state.oldest=o,e.state.older=e.state.newer),e.state.newest=o}(t,r,e),r}(u,e),l=i.global,p=i.state.newest;R(p.context),s(p);let f=t(o);const g=typeof f==I.function;g||(M(f)?(i.state.newest.propsConfig={latest:[o],castProps:[o]},u.propWatch=f.propWatch,u.tagJsType=f.tagJsType,u.wrapper=f.wrapper,u=f):(u.tag=f,f=t));const m=function(t,e,n,o,r,s,a){const c=document.createTextNode(J);if(oo.push(n.wrapper||{original:n}),s.placeholder=c,e.isApp=!0,!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=s.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}s.events={},++d.locks;const n=ue(i,e);return--d.locks,h(),n},++d.locks;const u=document.createDocumentFragment();u.appendChild(c);const i=jo(n,s,{appSupport:{appElement:r,context:s},appElement:r});return i.appElement=r,a&&(o.tag=i.templater.tag),--d.locks,h(),r.appendChild(u),{support:i,tags:oo,ValueTypes:E}}(0,l,u,f,e,i,g);return qr(),m}function ss(t,e){return function(n,o,r){if(function(t){return Array.isArray(t)&&Object.prototype.hasOwnProperty.call(t,"raw")}(o)){const s=o.reduce(((t,e,n)=>t+e+(r[n]??"")),"");return e(n,[t,s])}return e(n,[t,o])}}function as(t,e,n){function o(t){return o.toCallback(t)}return o.toCallback=n,t.listeners.push([e,o]),t.allListeners.push([e,o]),t}function cs(t,e){const n=Bs(t,t.elementFunctions);return n.attributes.push(e),Ss(e[0])?Es(e[0],n):Ss(e[1])&&Es(e[1],n),n}const us=ss("style",cs),is=ss("id",cs),ls=ss("class",cs),ps=ss("href",cs),fs=ss("value",cs),ds=ss("placeholder",cs),gs=ss("src",cs),hs=ss("title",cs),ms=ss("type",cs),bs=ss("checked",cs),vs=ss("disabled",cs),ys=ss("selected",cs),xs=ss("minLength",cs),ws=ss("maxLength",cs),Cs=ss("cellpadding",cs),Ts=ss("cellspacing",cs),Vs=ss("border",cs);function Js(t,e){return t.attributes.push(e),Ss(e[0])?Es(e[0],t):Ss(e[1])&&Es(e[1],t),t}function ks(t){function e(e){return function(n){return function(t,e,n){return as(Bs(t,t.elementFunctions),e,n)}(t,e,n)}}return{onClose:e("onclose"),onDoubleClick:e("ondblclick"),onClick:e("click"),onBlur:e("onblur"),onChange:e("onchange"),onInput:e("oninput"),contextMenu:e("contextmenu"),onMousedown:e("onmousedown"),onMouseup:e("onmouseup"),onMouseover:e("onmouseover"),onMouseout:e("onmouseout"),onKeydown:e("onkeydown"),onKeyup:e("onkeyup"),attr:(...e)=>cs(t,e),attrs:e=>function(t,e){const n=Bs(t,t.elementFunctions);return Object.entries(e).map((t=>{n.attributes.push(t),Ss(t[0])?Es(t[0],n):Ss(t[1])&&Es(t[1],n)})),n}(t,e),key:function(t){return this.arrayValue=t,this},style:Is(us,t),id:Is(is,t),class:Is(ls,t),href:Is(ps,t),value:Is(fs,t),placeholder:Is(ds,t),src:Is(gs,t),type:Is(ms,t),title:Is(hs,t),checked:Is(bs,t),disabled:Is(vs,t),selected:Is(ys,t),cellSpacing:Is(Ts,t),cellPadding:Is(Cs,t),border:Is(Vs,t),minLength:Is(xs,t),maxLength:Is(ws,t)}}function Is(t,e){return(n,...o)=>t(e,n,o)}function Es(t,e){e.contexts||(e.contexts=[]),e.contexts.push(t)}function Ss(t){return Array.isArray(t)||P(t)||t?.tagJsType}function As(t,e){return(n,o)=>Js(n,[t,o,!1,e])}function Ms(t){return(e,n)=>as(e,t,n)}const Os={onClose:Ms("onclose"),onClick:Ms("click"),onDoubleClick:Ms("ondblclick"),onDblClick:Ms("ondblclick"),onBlur:Ms("onblur"),onChange:Ms("onchange"),onInput:Ms("oninput"),onMousedown:Ms("onmousedown"),onMouseDown:Ms("onmousedown"),onMouseup:Ms("onmouseup"),onMouseUp:Ms("onmouseup"),onMouseover:Ms("onmouseover"),onMouseOver:Ms("onmouseup"),onMouseout:Ms("onmouseout"),onMouseOut:Ms("onmouseout"),onKeyup:Ms("onkeyup"),onKeyUp:Ms("onkeyup"),onKeydown:Ms("onkeydown"),onKeyDown:Ms("onkeydown")},Ls={checked:As("checked",St),disabled:As("disabled",St),selected:As("selected",St),class:As("class",(function(t,e,n){j(n)?Object.entries(n).forEach((([e,n])=>{n?t.classList.add(e):t.classList.remove(e)})):At(t,e,n)})),...Os};function Ps(t,e){++t.updateCount;const n=t.contexts,o=[];if(n.length&&(js(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return t.deleted=!0,Promise.all(o).then((()=>{++d.locks,re(e),t.htmlDomMeta=[],--d.locks,h()}))}ce(t),t.htmlDomMeta=[],delete t.contexts,t.deleted=!0}function js(t,e,n){const o=t[0],r=o.tagJsVar.destroy(o,e);return o.deleted=!0,L(r)?n.push(r.then((()=>{if(t.length>1)return js(t.slice(1,t.length),e,n)}))):(o.htmlDomMeta&&(ce(o),delete o.htmlDomMeta),t.length>1?js(t.slice(1,t.length),e,n):void 0)}function Ds(t,e,n){if(e.locked||!0===e.deleted)return;++e.updateCount;if(Hs(t,e))return Ps(e,n),e.htmlDomMeta=[],delete e.deleted,void lr(t,e,n,789);const o=e.contexts,r=t.contexts||[],s=e.tagJsVar.allListeners;if(t.allListeners.forEach(((t,e)=>{s[e][1].toCallback=t[1].toCallback})),o.length!==r.length)throw console.info("context mismatch",{value:t,context:e,conValues:o.map((t=>t.value)),vContexts:r,deleted:e.deleted}),new Error("super issue discovered");e.locked=79,o.forEach(((t,e)=>{t.tagJsVar.processUpdate(r[e],t,n)})),delete e.locked}function Hs(t,e){if(e.value===t)return 0;if(!t||"element"!==t.tagJsType)return 1;if(t.innerHTML.length!==e.value.innerHTML.length)return 1;return t.attributes.length!==e.value.attributes.length?1:0}function Us(t,e,n,o,r){t.forEach((t=>{switch(typeof t){case"string":case"boolean":case"number":return $s(t,o,r);case"function":{if("element"===t.tagJsType)break;const s=function(t,e,n,o,r){const s=[],c={updateCount:0,parentContext:n,contexts:s,target:e,value:t,htmlDomMeta:[],tagJsVar:{tagJsType:"dynamic-text",hasValueChanged:()=>0,processInit:a,processInitAttribute:a,destroy:(t,e)=>{++c.updateCount,s.forEach((t=>t.tagJsVar.destroy(t,e)))},processUpdate:(t,e,n,o)=>{++c.updateCount,Zr(i);let r=t(i);const s=c.underFunction;delete c.underFunction,r instanceof Function&&!r.tagJsType&&(s&&r.toString()===s.toString()?r=i.value:(c.underFunction=r,r=r()));const a=i.tagJsVar.processUpdate(r,i,n,o);return i.value=r,e.value=t,qr(),a}},valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z};Zr(c);let u=t();P(u)&&!u.tagJsType&&(c.underFunction=u,u=u());const i=Ns(u,c,e,o,r);return n.contexts.push(c),qr(),i}(t,o,e,n,r);return s}}if(null==t)return $s(t,o,r);if("element"!==t.tagJsType)return Ns(t,e,o,n,r);{const s=Ws(t,e,n,e.contexts);u.push([r,[o,s]]);e.htmlDomMeta.push({nn:s.tagName,domElement:s,at:[]})}}))}function Ns(t,e,n,o,r){const s=Kt(t,0,!0,e);return e.contexts.push(s),s.target=n,s.placeholder=document.createTextNode(""),u.push([r,[n,s.placeholder]]),Zr(s),s.tagJsVar.processInit(t,s,o,s.placeholder),qr(),s}function $s(t,e,n){const o=bt(t),r=document.createTextNode(o);return u.push([n,[e,r]]),r}function Ws(t,e,n,o){const r=document.createElement(t.tagName);return e.target=r,t.attributes.forEach((t=>{const e=t[0];"string"==typeof e&&(t[2]=vt(e))})),Tn(t.attributes,[],r,n,e),Us(t.innerHTML,e,n,r,y),t.listeners.forEach(((e,o)=>function(t,e,n,o,r){const s=(...o)=>{const r=t.listeners[e][1],s=U(n),a=s.context.updateCount;s.context.locked=1,++d.locks;const c=r(...o);--d.locks,delete s.context.locked;return a===s.context.updateCount?tn(c,s):(h(),L(c)?c.then((()=>($e([s.context.state.newest]),"promise-no-data-ever"))):"no-data-ever")};an(n.appSupport,o[0],r,s)}(t,o,n,e,r))),r}function Rs(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],e.locked=34;const r=Ws(t,e,n,e.contexts);delete e.locked,u.push([v,[o,r,"htmlTag.processInit"]]);const s={nn:t.tagName,domElement:r,at:t.attributes};return e.htmlDomMeta=[s],r}function _s(t){const e=Bs({tagJsType:"element",processInitAttribute:a,processInit:Rs,destroy:Ps,processUpdate:Ds,hasValueChanged:Hs,tagName:t,innerHTML:[],attributes:[],listeners:[],allListeners:[],elementFunctions:ks},ks);return e.tagName=t,e}function Bs(t,e){const n=(...t)=>{const e={...n};return e.attributes=[...n.attributes],e.listeners=[...n.listeners],e.allListeners=[...n.allListeners],t.length>0&&"object"==typeof t[0]&&!Array.isArray(t[0])&&!t[0].tagJsType&&(!function(t,e){const n=Object.entries(e).reduce(((e,[n,o])=>n in Ls?Ls[n](t,o):Js(t,[n,o,!1,Et])),t)}(e,t[0]),t.splice(0,1)),e.innerHTML=t,t.forEach((t=>{if(Ss(t))return"element"===t.tagJsType?(e.allListeners.push(...t.allListeners),void(t.contexts&&(e.contexts?e.contexts.push(...t.contexts):e.contexts=t.contexts))):void function(t,e){e.contexts||(e.contexts=[]);e.contexts.push(t)}(t,e)})),e};return Object.assign(n,t),Object.assign(n,ks(n)),n.attributes=[...t.attributes],n.listeners=[...t.listeners],n.allListeners=[...t.allListeners],n}const Fs=function(){const t=Bs({tagJsType:"element",processInitAttribute:a,processInit:zs,destroy:Gs,processUpdate:Ds,hasValueChanged:Hs,tagName:"no-element",innerHTML:[],attributes:[],listeners:[],allListeners:[],elementFunctions:ks});return t.tagName="no-element",t}();function zs(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],Us(t.innerHTML,e,n,o,v)}function Gs(t,e){++t.updateCount;const n=t.contexts,o=[];if(n.length&&(js(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return Promise.all(o).then((()=>{++d.locks,re(e),--d.locks,h()}))}}const Xs=_s("button"),Ks=_s("select"),Zs=_s("option"),qs=_s("input"),Ys=_s("textarea"),Qs=_s("html"),ta=_s("head"),ea=_s("title"),na=_s("meta"),oa=_s("link"),ra=_s("style"),sa=_s("body"),aa=_s("noscript"),ca=_s("hr"),ua=_s("h1"),ia=_s("h2"),la=_s("h3"),pa=_s("h4"),fa=_s("h5"),da=_s("h6"),ga=_s("ol"),ha=_s("ul"),ma=_s("li"),ba=_s("div"),va=_s("main"),ya=_s("section"),xa=_s("header"),wa=_s("footer"),Ca=_s("form"),Ta=_s("fieldset"),Va=_s("legend"),Ja=_s("dialog"),ka=_s("pre"),Ia=_s("table"),Ea=_s("tr"),Sa=_s("td"),Aa=_s("th"),Ma=_s("thead"),Oa=_s("tbody"),La=_s("tfoot"),Pa=_s("a"),ja=_s("img"),Da=_s("br"),Ha=_s("label"),Ua=_s("p"),Na=_s("small"),$a=_s("span"),Wa=_s("strong"),Ra=_s("b"),_a=_s("sup"),Ba=_s("nav"),Fa=_s("figure"),za=_s("figcaption"),Ga=_s("code"),Xa=_s("canvas"),Ka=_s("svg"),Za=_s("path"),qa=_s("polygon"),Ya=_s("rect"),Qa="3.1.9",tc={tagElement:rs,renderWithSupport:Oe,renderSupport:je,firstTagRender:Ae,reRenderTag:Se,paint:h};var ec=e.W9,nc=e.cg,oc=e.m0,rc=e.rS,sc=e.Y2,ac=e.ei,cc=e.B7,uc=e.TU,ic=e.XF,lc=e.PC,pc=e.Ot,fc=e.Mj,dc=e.tD,gc=e.a,hc=e.Gf,mc=e.xe,bc=e.YO,vc=e.b,yc=e.rf,xc=e.br,wc=e.um,Cc=e.x6,Tc=e.E2,Vc=e.OH,Jc=e.Ji,kc=e.TB,Ic=e.Ii,Ec=e.mX,Sc=e.yV,Ac=e.EI,Mc=e.aY,Oc=e.zV,Lc=e.pf,Pc=e.ze,jc=e.Go,Dc=e.bD,Hc=e.WJ,Uc=e.wL,Nc=e.Ng,$c=e.O,Wc=e.r3,Rc=e.y4,_c=e.Ie,Bc=e.lI,Fc=e.$F,zc=e.vP,Gc=e.hp,Xc=e.qr,Kc=e.ts,Zc=e.Zd,qc=e.B4,Yc=e.HD,Qc=e.Az,tu=e.Xi,eu=e.sV,nu=e.Ah,ou=e.f5,ru=e.Gk,su=e.j_,au=e.h1,cu=e.h2,uu=e.h3,iu=e.h4,lu=e.h5,pu=e.h6,fu=e.zC,du=e.d5,gu=e.wx,hu=e.cF,mu=e.Hc,bu=e.PB,vu=e.uq,yu=e.hr,xu=e.gM,wu=e.gx,Cu=e._8,Tu=e.hF,Vu=e.cy,Ju=e.Tn,ku=e.Gv,Iu=e.yL,Eu=e.D8,Su=e.Ze,Au=e._4,Mu=e.mn,Ou=e.Pf,Lu=e.o1,Pu=e.z,ju=e.li,Du=e.nf,Hu=e.iW,Uu=e.mI,Nu=e.C$,$u=e.et,Wu=e.Vg,Ru=e.ol,_u=e.sA,Bu=e.TG,Fu=e.MG,zu=e.PL,Gu=e.uK,Xu=e.CG,Ku=e.p,Zu=e.nI,qu=e.Ae,Yu=e.Fs,Qu=e.n1,ti=e.AS,ei=e.iv,ni=e.r5,oi=e.M$,ri=e.Pc,si=e.uc,ai=e.QB,ci=e.uW,ui=e.Lt,ii=e.Jv,li=e.TA,pi=e.Jn,fi=e.Ll,di=e.L6,gi=e.EX,hi=e.Ln,mi=e.wk,bi=e.xP,vi=e.ko,yi=e.iF,xi=e.bc,wi=e.B1,Ci=e.RX,Ti=e.lR,Vi=e.JW,Ji=e.ag,ki=e.tp,Ii=e.Tc,Ei=e.Hf,Si=e.zc,Ai=e._A,Mi=e.T_,Oi=e.td,Li=e.g0,Pi=e.pd,ji=e.th,Di=e.VQ,Hi=e.DD,Ui=e.tr,Ni=e.ul,$i=e.Ag,Wi=e.gA,Ri=e.NU,_i=e.rE,Bi=e.wB,Fi=e.id,zi=e.MC,Gi=e.SZ;export{ec as ArrayNoKeyError,nc as BasicTypes,oc as ImmutableTypes,rc as PropWatches,sc as RouteQuery,ac as StateMismatchError,cc as Subject,uc as Subjective,ic as SyncCallbackError,lc as TagError,pc as ValueSubject,fc as ValueSubjective,dc as ValueTypes,gc as a,hc as addPaintRemoveAwait,mc as appElements,bc as array,vc as b,yc as body,xc as br,wc as buildBeforeElement,Cc as button,Tc as callback,Vc as callbackMaker,Jc as canvas,kc as checkArrayValueChange,Ic as checkSimpleValueChange,Ec as checkStillSubscription,Sc as checkTagValueChange,Ac as checkTagValueChangeAndUpdate,Mc as code,Oc as combineLatest,Lc as createHtmlSupport,Pc as createTrigger,jc as deepClone,Dc as deepEqual,Hc as defineValueOn,Uc as deleteContextSubContext,Nc as deleteSimpleValue,$c as destroySupport,Wc as dialog,Rc as div,_c as empty,Bc as fieldset,Fc as figcaption,zc as figure,Gc as firstTagRender,Xc as footer,Kc as forceUpdateExistingValue,Zc as form,qc as getBaseSupport,Yc as getContextInCycle,Qc as getDomMeta,tu as getDomTag,eu as getInnerHTML,nu as getNewGlobal,ou as getSupportOlderState,ru as getTemplaterResult,su as guaranteeInsertBefore,au as h1,cu as h2,uu as h3,iu as h4,lu as h5,pu as h6,fu as hasPropChanges,du as head,gu as header,hu as hmr,mu as host,bu as howToSetInputValue,vu as howToSetStandAloneAttr,yu as hr,xu as htmlDoc,wu as htmlTag,Cu as img,Tu as input,Vu as isArray,Ju as isFunction,ku as isObject,Iu as isPromise,Eu as isSimpleType,Su as isStaticTag,Au as isSubjectInstance,Mu as isTagComponent,Ou as label,Lu as legend,Pu as letProp,ju as li,Du as link,Hu as main,Uu as meta,Nu as nav,$u as noElement,Wu as noscript,Ru as ol,_u as onDestroy,Bu as onFirstSubContext,Fu as onInit,zu as oneRenderToSupport,Gu as option,Xu as output,Ku as p,Zu as paint,qu as path,Yu as pipe,Qu as polygon,ti as pre,ei as promise,ni as providers,oi as reRenderTag,ri as rect,si as renderSupport,ai as renderWithSupport,ci as section,ui as select,ii as setBooleanAttribute,li as setNonFunctionInputValue,pi as setSimpleAttribute,fi as setUseMemory,di as signal,gi as small,hi as span,mi as state,bi as states,vi as strong,yi as style,xi as subject,wi as subscribe,Ci as subscribeWith,Ti as sup,Vi as svg,Ji as syncError,ki as table,Ii as tag,Ei as tagElement,Si as tagValueUpdateHandler,Ai as tags,Mi as tbody,Oi as td,Li as textarea,Pi as tfoot,ji as th,Di as thead,Hi as title,Ui as tr,Ni as ul,$i as upgradeBaseToSupport,Wi as valueToTagJsVar,Ri as variablePrefix,_i as version,Bi as watch,Fi as willCallback,zi as willPromise,Gi 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.varCounter=0,t.state={newer:{state:[],states:[]}},t.global={blocked:[]}}t.d(e,{W9:()=>Jr,cg:()=>I,m0:()=>k,rS:()=>No,Y2:()=>o,ei:()=>kr,B7:()=>Z,TU:()=>X,XF:()=>Ir,PC:()=>Vr,Ot:()=>lr,Mj:()=>pr,tD:()=>E,a:()=>Ea,Gf:()=>c,xe:()=>Ur,YO:()=>Lr,b:()=>Da,rf:()=>Xs,br:()=>Oa,um:()=>$n,x6:()=>Us,E2:()=>Er,OH:()=>Ar,Ji:()=>_a,TB:()=>Bt,Ii:()=>Wt,mX:()=>no,yV:()=>pe,EI:()=>fe,aY:()=>Wa,zV:()=>G,pf:()=>qo,ze:()=>Sr,Go:()=>ot,bD:()=>st,WJ:()=>Y,wL:()=>ro,Ng:()=>Rt,O:()=>ce,zH:()=>Ka,r3:()=>va,y4:()=>la,Df:()=>xs,Ie:()=>J,lI:()=>ma,$F:()=>Ra,vP:()=>Ua,hp:()=>Ee,qr:()=>ga,ts:()=>Qo,Zd:()=>ha,B4:()=>Go,HD:()=>jr,Az:()=>Nn,sV:()=>io,Ah:()=>n,f5:()=>Se,Gk:()=>Bn,j_:()=>tr,h1:()=>ea,h2:()=>na,h3:()=>oa,h4:()=>ra,h5:()=>sa,h6:()=>aa,zC:()=>Uo,d5:()=>zs,wx:()=>da,cF:()=>Xa,Hc:()=>ho,PB:()=>yt,uq:()=>wt,hr:()=>ta,qy:()=>Fs,gx:()=>Ps,pU:()=>Ia,_8:()=>Aa,hF:()=>_s,cy:()=>j,Tn:()=>L,Gv:()=>P,yL:()=>H,D8:()=>S,Ze:()=>A,_4:()=>M,mn:()=>O,Pf:()=>Ma,o1:()=>ba,z:()=>wr,li:()=>ia,nf:()=>qs,iW:()=>pa,mI:()=>Ks,C$:()=>$a,et:()=>Ds,Vg:()=>Qs,ol:()=>ca,sA:()=>Oo,TG:()=>ao,MG:()=>Eo,PL:()=>Gn,uK:()=>Ws,CG:()=>fo,p:()=>Ha,nI:()=>h,Ae:()=>Fa,Fs:()=>lo,n1:()=>za,AS:()=>ya,iv:()=>Hr,r5:()=>Tr,M$:()=>Ie,Pc:()=>Ga,uc:()=>He,QB:()=>Ae,K$:()=>Ys,uW:()=>fa,Lt:()=>Rs,Jv:()=>Tt,TA:()=>Ct,Jn:()=>Vt,Ll:()=>tt,L6:()=>ur,EX:()=>La,Ln:()=>Pa,wk:()=>Io,xP:()=>xr,ko:()=>ja,iF:()=>Zs,bc:()=>yr,B1:()=>oo,RX:()=>Qn,Sx:()=>qa,lR:()=>Na,JW:()=>Ba,ag:()=>Or,tp:()=>xa,Tc:()=>$o,Hf:()=>Wr,zc:()=>ht,_A:()=>Fn,T_:()=>Ja,td:()=>Ca,g0:()=>Bs,pd:()=>ka,th:()=>Ta,VQ:()=>Va,DD:()=>Gs,tr:()=>wa,u:()=>Sa,ul:()=>ua,Ag:()=>Ko,gA:()=>Kt,NU:()=>tn,rE:()=>Za,wB:()=>hr,id:()=>fr,MC:()=>dr,SZ:()=>gr});class o{get(t){return"todo"}}function r(){return tt.stateConfig.support}function s(t){return Nr(t.context),tt.stateConfig.support=t}const a=function(){};function c(t){}let u=[];const i=[];let l=[],p=[],f=[];const d={locks:0,removeLocks:0};function g(t,e){e.textContent=t}function h(){d.locks>0||(++d.locks,function(){const t=i.length;(function(){for(const t of i)t[0](...t[1])})(),i.splice(0,t);for(const t of l)t[0](...t[1]);for(const t of p)t[0](...t[1]);for(const t of u)t[0](...t[1])}(),--d.locks,function(){u=[],l=[],p=[];const t=f;f=[];for(const e of t)e[0](...e[1])}())}function m(t,e){i.push([b,[t,e]])}function b(t,e){const n=t.parentNode;t||console.debug("no element by",{_caller:e,element:t}),n||console.debug("no parentNode by",{_caller:e,element:t}),n.removeChild(t)}function v(t,e,n){t.parentNode.insertBefore(e,t)}function y(t,e){t.appendChild(e)}const x="object"==typeof document&&document.createElement("div");function w(t){return x.innerHTML=t,document.createTextNode(x.innerHTML)}function C(t,e,n=a,o){const r=w(e);v(t,r),n(r)}function T(t,e,n=a){x.innerHTML=e;const o=document.createTextNode(x.textContent);v(t,o),n(o)}function V(t,e,n){x.innerHTML=e;const o=document.createTextNode(x.textContent);y(t,o),n(o)}const J="";var k,I;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(k||(k={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(I||(I={}));const E={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",host:"host",subscribe:"subscribe",signal:"signal",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function S(t){switch(t){case k.string:case k.number:case k.boolean:return!0}return!1}function A(t){if(!t)return!1;switch(t.tagJsType){case E.dom:case E.tag:case E.templater:return!0}return!1}function O(t){const e=t?.tagJsType;return e===E.tagComponent||e===E.stateRender}function M(t){return P(t)&&typeof t.subscribe===I.function}function H(t){return t&&L(t.then)}function L(t){return typeof t===I.function}function P(t){return typeof t===I.object&&null!==t}function j(t){return Array.isArray(t)}function D(t){const e=t.state;return e&&e.newest&&e.newest?e.newest:t.parentContext?D(t.parentContext):void 0}function N(t){let e=t;for(;e.ownerSupport&&!O(e.templater);)e=e.ownerSupport;const n=e.context.state;return n&&n.newest||e}function $(...t){return t}function U(t){const e=tt.stateConfig;return e.states[e.statesIndex]=t,++e.statesIndex,t($)}function R(t){const e=tt.stateConfig,n=e.statesIndex,o=N(e.prevSupport).context.state.older.states[n];let r=[];o((function(...t){return r=t,o.lastValues=r,t}));return e.states[e.statesIndex]=t,++e.statesIndex,t((function(...t){return r}))}function W(t){Nr(t);const e=tt.stateConfig;e.handlers.handler=z,e.handlers.statesHandler=U,e.rearray=[];const n=e.state=[],o=e.states=[];e.statesIndex=0;(t.state=t.state||{}).newer={state:n,states:o}}class _{}function B(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const[e]=t(_),[n]=t(e);return[e,n]}(e);return n}function F(){const t=tt.stateConfig,e=t.rearray[t.state.length];return t.state.push(e),e.defaultValue}function z(t){const e=tt.stateConfig,n=jr();if(!n||!n.state){const t="State requested but TaggedJs is not currently rendering a tag or host";throw console.error(t,{config:e,context:n,function:e.support?.templater.wrapper?.original}),new Error(t)}const o=n.state.newer;e.state=o.state;let r=t;if(typeof t===I.function&&(r=t()),typeof r===I.function){const t=r;r=function(...e){return t(...e)},r.original=t}const s={get:function(){return B(s)},defaultValue:r};return e.state.push(s),r}function G(t){const e=new Z;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,a)}},s=[...t],a=s.shift().subscribe((t=>r(t,0))),c=s.map(((t,e)=>t.subscribe((t=>r(t,e+1)))));return a.subscriptions=c,a},e}function K(t,e,n){const o=Z.globalSubCount$;Z.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=Z.globalSubCount$;Z.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 q(t,e,n){const o=[...e],r=o.shift(),s=t=>{if(o.length)return q(t,o,n);n(t)};let a=s;const c=r(t,{setHandler:t=>a=t,next:s});a(c)}class Z{onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;value;constructor(t,e){this.onSubscription=e,arguments.length>0&&(this.value=t)}subscribe(t){const e=K(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{q(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 e}pipe(...t){const e=[];"value"in this&&e.push(this.value);const n=new Z(...e);return n.setMethods(t),n.subscribeWith=t=>this.subscribe(t),n.next=t=>this.next(t),n}setMethods(t){this.methods=t}static all(t){return G(t.map((t=>{if(M(t))return t;return new Z(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new Z(0)}class X extends Z{_value;constructor(...t){super(...t),this._value=t[0],Y(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 Y(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}const Q=new Z(void 0,(function(t){r()||t.next()})),tt={stateConfig:{state:[],version:Date.now(),handlers:{handler:z,statesHandler:U}},tagClosed$:Q};function et(t,e,n){if(e.deleted)return;const o=t[e.valueIndex],r=e.tagJsVar;Nr(e),r.processUpdate(o,e,n,t),$r(),e.value=o}function nt(t,e){const n=t.context.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),++d.locks,function(t,e){const n=t.templater.tag.values;for(const o of e)et(n,o,t)}(t,n),--d.locks,h()}function ot(t,e){return rt(t,e)}function rt(t,e){if(null===t||typeof t!==I.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=j(t)?[]:Object.create(Object.getPrototypeOf(t));if(j(t))for(let o=0;o<t.length;o++)n[o]=rt(t[o],e-1);else for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=rt(t[o],e-1));return n}function st(t,e,n){return at(t,e,n)}function at(t,e,n){return!(t!==e&&(o=t,r=e,!L(o)||!L(r)||o.toString()!==r.toString()))||(n<0||typeof t===I.object&&typeof e===I.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():j(t)&&j(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!at(t[o],e[o],n-1))return!1;return!0}(t,e,n-1):!j(t)&&!j(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)||!at(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var o,r}function ct(t){return t.map(ut)}function ut(t,e){const n=t,o=t?.tagJsType;if(o)switch(o){case E.signal:case E.subscribe:case E.stateRender:return;case E.dom:case E.tag:case E.templater:return ct(n.values)}return j(t)?ct(n):ot(t,e)}function it(t,e){const n=t.length;for(let o=0;o<n;++o){const n=t[o],r=e[o];if(j(n)&&j(r)){if(n===r)continue;return 3}if(typeof n!==I.function||typeof r!==I.function)if(typeof n!==I.object){if(n!==r)return 3.3}else{if(!n&&!r)continue;if(typeof e===I.object){const t=Object.entries(n);for(const e of t){if(!lt(e,r))return 3.1}}}}return!1}function lt([t,e],n){const o=n[t];return typeof e===I.function&&typeof o===I.function||o===e}function pt(t,e){const n=t.context.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)}t.context.destroy$.next(),t.context.renderCount=0}function ft(t,e){for(const n of t){const t=n.lastArray;if(t){ft(t,e);continue}const o=n.value;if(o?.tagJsType===E.subscribe){o.destroy(n,e),n.deleted=!0;continue}const r=n.global;if(!r)continue;const s=n.state.newest,a=r.subscriptions;a&&a.forEach(gt),O(s.templater)&&pt(s,r);ft(n.contexts,s),r.deleted=!0}}function dt(t,e=[],n=[]){for(const o of t){const t=o.global;if(!t)continue;const r=o.state.newest;if(r){e.push(r);const o=t.subscriptions;o&&n.push(...o)}const s=o.contexts;s&&dt(s,e,n)}return{tags:e,subs:n}}function gt(t){t.unsubscribe()}function ht(t,e,n){const o=e.tagJsVar.tagJsType;return o&&["tag-conversion","element"].includes(o)?(e.tagJsVar.processUpdate(t,e,n,[]),e.value=t,0):t===e.value?0:(++e.updateCount,Qo(e,t,n))}function mt(t,e,n,o,r){const s=e.context;if(s.locked=3,n.target=n.target||o,Nr(n),n.inputsHandler){const t=e.propsConfig;n.inputsHandler(t)}n.tagJsVar.processInit(t,n,e,r,o),$r(),n.value=t,delete s.locked}function bt(t){switch(t){case void 0:case!1:case null:return J}return t}function vt(t,e){if(t.startsWith("class."))return"class";if(t.startsWith("style."))return"style";const n=function(t){switch(t){case"autoselect":case"autoSelect":return"autoselect";case"autofocus":case"autoFocus":return"autofocus"}return!1}(t);return!1!==n?n:"value"===t&&"SELECT"===e&&"value"}function yt(t,e,n){if(P(n))return xt(t,e,n);l.push([Ct,[t,e,n]])}function xt(t,e,n){"object"!=typeof t[e]&&(t[e]={});for(const o in n){const r=n[o];l.push([kt,[t,e,o,r]])}if(t[e].setProperty)for(const o in n){const r=n[o];l.push([Jt,[t,e,o,r]])}}function wt(t,e,n){t.setAttribute(e,"")}function Ct(t,e,n){if(P(n))return xt(t,e,n);Vt(t,e,n)}function Tt(t,e,n){t[e]=!!n}function Vt(t,e,n){t[e]=n,void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}function Jt(t,e,n,o){t[e].setProperty(n,o)}function kt(t,e,n,o){t[e][n]=o}function It(t,e,n,o){switch(o){case"autofocus":return void f.push([Mt,[n]]);case"autoselect":return void f.push([Ot,[n]]);case"style":{const o=t.split(".");return void l.push([Et,[n,o,e]])}case"class":return void function(t,e,n){const o=t.split(".");if(o.shift(),e){for(const t of o)l.push([St,[n,t]]);return}for(const t of o)l.push([At,[n,t]])}(t,e,n);case"value":return Ct(n,t,e),void f.push([t=>{t.value=e},[n]])}throw new Error(`Invalid special attribute of ${o}. ${t}`)}function Et(t,e,n){const o=e[1];t.style[o]=n,t.style.setProperty(o,n)}function St(t,e){t.classList.add(e)}function At(t,e){t.classList.remove(e)}function Ot(t){t.select()}function Mt(t){t.focus()}function Ht(t,e,n,o,r,s,a){return n.target=o,n.howToSet=r,n.attrName=t,n.isSpecial=a,e?.tagJsType?function(t,e,n,o,r){e.processInitAttribute(t,e,r,e,n,o,Ct),n.tagJsVar=e}(t,e,n,s,o):Lt(t,e,o,r,a,n)}function Lt(t,e,n,o,r,s){return"function"==typeof e?function(t,e,n,o,r){const s=t(),c={component:!1,tagJsType:"dynamic-attr",matchesInjection:t=>{const e=u.tagJsVar;if(e.matchesInjection)return e.matchesInjection(t,u)},hasValueChanged:(e,n,o)=>{const r=t();return u.tagJsVar.hasValueChanged(r,u,o)},processInit:a,processInitAttribute:a,destroy:(t,e)=>{u.tagJsVar.destroy(u,e)},processUpdate:(t,e,n,o)=>{++e.updateCount;const r=t();u.tagJsVar.processUpdate(r,u,n,o),u.value=r}},u={updateCount:0,isAttr:!0,target:o,parentContext:e,value:s,tagJsVar:Kt(s),valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z},i={updateCount:0,isAttr:!0,contexts:[u],target:o,parentContext:e,value:t,tagJsVar:c,valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z};return u.tagJsVar.processInitAttribute(n,s,o,u.tagJsVar,u,{},r),i}(e,s,t,n,o):r?It(t,e,n,r):void o(n,t,e)}function Pt(t,e,n,o,r,s){const a=e.tagJsVar,c=t;if(a.hasValueChanged(c,e,n)>0){a.destroy(e,n),o.removeAttribute(r);const c=Kt(t);return c.isAttr=!0,c.processInitAttribute(r,t,o,c,e,n,s),void(e.tagJsVar=c)}}function jt(t,e,n,o,r,s,a){o.destroy=Dt,o.hasValueChanged=Wt,o.processUpdate=(e,o,r)=>Pt(e,o,r,n,t,a);const c=vt(t,n.tagName);Lt(t,e,n,a,c,r),r.tagJsVar=o}function Dt(t){const e=t.target,n=t.attrName;e.removeAttribute(n)}function Nt(t){return{component:!1,tagJsType:"simple",value:t,processInitAttribute:jt,processInit:Ut,destroy:Rt,hasValueChanged:_t,processUpdate:$t}}function $t(t,e,n){return t===e.value?0:Qo(e,t,n)}function Ut(t,e,n,o,r){const s=bt(t);o=e.placeholder;const a=e.paint=[C,[o,s,function(t){e.simpleValueElm=t,delete e.paint},"processSimpleValueInit"]];u.push(a)}function Rt(t){if(!t.simpleValueElm&&t.paint)return void(t.paint[0]=a);const e=t.simpleValueElm;delete t.simpleValueElm,m(e,"deleteSimpleValue")}function Wt(t,e){return null==t||t===e.value?0:6}function _t(t,e){return null!=t&&[I.object,I.function].includes(typeof t)?(Rt(e),6):(function(t,e){const n=bt(t);if(e.paint)return void(e.paint[1][1]=n);const o=e.simpleValueElm;l.push([g,[n,o]])}(t,e),0)}function Bt(t,e){return j(t)?0:(ne(e),9)}function Ft(t){return{component:!1,tagJsType:"array",value:t,processInitAttribute:a,processInit:Gt,processUpdate:zt,hasValueChanged:Bt,destroy:ne}}function zt(t,e,n){if(++e.updateCount,Array.isArray(t))return void Xt(e,t,n);0===ht(t,e,n)&&Xt(e,t,n)}function Gt(t,e,n,o,r){Xt(e,t,n,r)}function Kt(t){const e=t?.tagJsType;return e?t:function(t){if(j(t))return Ft(t);return Nt(t)}(t)}function qt(t,e,n,o){return{updateCount:0,value:t,destroy$:new Z,render$:new Z,tagJsVar:Kt(t),withinOwnerElement:n,parentContext:o,valueIndex:o.varCounter}}function Zt(t,e,n,o,r){const s=document.createTextNode(J),a=qt(t,0,!0,e.context);return a.withinOwnerElement=!1,a.placeholder=s,r||(a.placeholder=o),mt(t,e,a,r,o),r&&p.push([y,[r,s]]),a}function Xt(t,e,n,o){const r=void 0===t.lastArray;r&&(t.lastArray=[]);const s=t.lastArray;let a=t.placeholder,c=0;const u=[];if(!r){for(let t=0;t<s.length;++t){const n=s[t];if(null===n.value){u.push(n);continue}const o=te(e,t,s,c);0!==o?2!==o?c+=o:t-=1:u.push(n)}t.lastArray=u}const i=e.length;for(let r=0;r<i;++r){a=Yt(e,r,t.lastArray,n,a,o).placeholder}}function Yt(t,e,n,o,r,s){const a=Qt(t[e]),c=n[e];if(c)return function(t,e,n,o,r,s,a){const c=n.length>r;if(c)return Array.isArray(t)?(e.tagJsVar.processUpdate(t,e,o,[]),e.value=t,e):(ht(t,e,o),e);const u=Zt(t,o,0,s,a);return n.push(u),u}(a,c,n,o,e,r,s);const u=Zt(a,o,0,r,s);return n.push(u),a&&(u.arrayValue=a?.arrayValue||u.arrayValue||e),u}function Qt(t){if("function"==typeof t&&void 0===t.tagJsType){t=t()}return t}function te(t,e,n,o){const r=t.length-1,s=e-o,a=s<0||r<s,c=n[e];if(a)return ee(c),1;void 0===c.arrayValue&&(c.arrayValue=e);const u=function(t,e,n,o,r){const s=e.arrayValue||r,a=t!==s;if(a)return ee(n),o.splice(r,1),2;return 0}(c.arrayValue,Qt(t[e]),c,n,e);return u}function ee(t){!function(t,e){if(t&&e.state?.oldest){return void ce(e.state.oldest,t)}e.tagJsVar.destroy(e,{})}(t.global,t)}function ne(t){++t.updateCount;oe(t,t.lastArray)}function oe(t,e){for(let t=0;t<e.length;++t)ee(e[t]);delete t.lastArray}function re(t){for(let e=t.length-1;e>=0;--e){se(t[e]),t.splice(e,1)}}function se(t){const e=t.marker;e&&m(e,"destroyMarker");m(t.domElement,"destroyClone")}function ae(t,e){!function(t,e){for(const n of t){if(n.withinOwnerElement){const t=n.tagJsVar;if(t&&"host"===t.tagJsType){const o=n.supportOwner,r=t.destroy(n,o);H(r)&&e.push(r)}continue}const t=n.lastArray;if(t){oe(n,t);continue}const o=n.simpleValueElm;if(o){delete n.simpleValueElm,m(o,"smartRemoveByContext");continue}const r=n.global;if(void 0===r)continue;r.deleted=!0;const s=n.state?.oldest;s&&ae(n,e)}}(t.contexts,e),re(t.htmlDomMeta)}function ce(t,e){const n=t.context;e.deleted=!0,n.renderCount=0;const o=[];return ft(n.contexts,t),t.templater.wrapper&&pt(t,e),ae(n,o),delete n.state,delete n.contexts,delete n.returnValue,delete n.providers,o}function ue(t,e){const n=ie(t,e);return!(n||!e.templater.tag?._innerHTML||!ie(t.outerHTML,e))||n}function ie(t,e){const n=t.templater,o=e.templater,r=n?.tag||t,s=o.tag;if(n?.tagJsType===E.stateRender)return n.dom===o.dom;switch(r.tagJsType){case E.dom:return s?.tagJsType===E.dom&&function(t,e){const n=t.dom,o=e.dom;return n===o}(r,s);case E.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 a=n.templater.values||t.values,c=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===I.function&&typeof o===I.function){return!!(e.toString()===o.toString())}return!0}));if(o)return!0;return!1}(a,c)}(r,s,t,e);return n}}throw new Error(`unknown tagJsType of ${r.tagJsType}`)}function le(t){++t.updateCount;const e=t.global,n=t.state.newest;delete t.inputsHandler,delete t.updatesHandler,ce(n,e),function(t){t.htmlDomMeta=[],delete t.contexts,delete t.state,delete t.global,t.renderCount=0}(t)}function pe(t,e){const n=e.state?.newest;if(A(t)){return ue(t,n)?0:7}const o=t?.tagJsType;return o?t.wrapper?.original===e.value.wrapper?.original?0:88:8}function fe(t,e){const o=e.global,r=e.state?.newest;if(A(t)){return ue(t,r)?(Xo(e,t,r),0):(ce(r,o),n(e),7)}const s=t?.tagJsType;if(s){return!0===Xo(e,t,e.state.newest.ownerSupport)?0:88}return le(e),8}function de(t,e,n,o,r,s,a){const c=document.createTextNode(J),i=function(t,e,n,o){const r=qt(t,0,n,o);return e.push(r),++o.varCounter,r}(t,e,r>0,o);return i.placeholder=c,i.target=s,s?p.push([y,[s,c]]):u.push([v,[a,c,"attachDynamicDom.attachDynamicDom"]]),mt(t,n,i,s,a),i}function ge(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 he(t){return t.support}function me(t){const e=t.context;return Me(t.templater)?Le(t):Oe(t,t,e)}function be(t,e,n){return t}function ve(t){return typeof t!==I.object||!t||t.tagJsType}function ye(t,e,n,o,r,s){return null==t||s>r?e:typeof t===I.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):ve(e)?e:j(e)?function(t,e,n,o,r,s){for(let a=t.length-1;a>=0;--a){const c=t[a],u=e[a];t[a]=ye(u,c,n,o,s,r+1)}return t}(e,t,n,o,s,r):function(t,e,n,o,r,s){const a=Object.keys(t);for(const c of a){const a=t[c],u=ye(e[c],a,n,o,s,r+1);if(a===u)continue;const i=Object.getOwnPropertyDescriptor(t,c)?.set;i||(t[c]=u)}return t}(e,t,n,o,s,r)}function xe(t,e,o){const r=o.global,s=o.state.newest,a=s.templater.wrapper;let c=e.templater.wrapper,u=!1;const i=e.templater.tagJsType,l=E.stateRender===i||E.renderOnce===i;if(l)u=e.templater.tagJsType===E.renderOnce||ue(s,e);else if(a&&c){const t=s.templater.tag?._innerHTML;t&&(c=e.outerHTML);u=a.original===c.original}const p=e.templater;if(!u)return void function(t,e,o){const r=t.global;ce(t.state.oldest,r),n(t);const s=e;s.processInit(e,t,o,t.placeholder)}(o,p,t);const f=l||function(t,e){const n=e.props,o=t.propsConfig,r=o.latest,s=Uo(n,r,t.templater.propWatch);return s}(s,p);f&&(o.locked?r.blocked.push(e):(He(e),++o.renderCount))}function we(t){const e=t.context,o=e.global,{subs:r,tags:s}=dt(e.contexts);Ce(e);for(const t of s){if(!0===t.context.global.deleted)return;Ce(t.context)}o.subscriptions&&r.forEach(gt),n(e)}function Ce(t){t.global.deleted=!0,ae(t,[]),delete t.contexts}function Te(t,e,n,o){const r=e.original,a=t.tagJsType===E.stateRender,c=tt.stateConfig;let u;s(n),a?u=t():(u=r(...o),typeof u===I.function&&void 0===u.tagJsType&&(u=u()));const i=n.context;return i.returnValue=u,n.returnValue=u,u.templater=t,t.tag=u,i.state.newer={...c},i.inputsHandler&&i.inputsHandler(o),$r(),n}function Ve(t){!function(t){const e=tt.stateConfig,n=t||e.context;n.state=n.state||{},n.state.newer={...e};const o=e.support;n.state.newest=o}(t),function(){const t=tt.stateConfig;delete t.prevSupport,delete t.support,delete t.state,delete t.states,$r()}()}function Je(t,e,n,o){let r;const s=t.templater;if(s.tagJsType===E.stateRender){const e=s;r=Zo(s,n,o,t.appSupport),Te(s,e,r)}else{r=(0,s.wrapper)(t,n,e)}return function(t,e){++t.context.renderCount,Ve(t.context),tt.tagClosed$.next(e)}(r,o),r.ownerSupport=t.ownerSupport,r}function ke(t){const e=tt.stateConfig;return e.rearray=t,e.state=[],e.states=[],e.statesIndex=0,e.handlers.handler=F,e.handlers.statesHandler=R,e}function Ie(t,e,n,o){return function(t,e,n){ke(n),tt.stateConfig.prevSupport=e,s(t)}(t,e,n.state.older.state),Je(t,e,n,o)}function Ee(t,e,n,o){W(t.context),s(t);const r=Je(t,e,n,o);return $r(),r}function Se(t){const e=t?.context,n=e?.state;return n?.older?.state}function Ae(t,e,n){let o;o=Se(e)?Ie(t,e,n):Ee(t,e,n);const r=!e||ue(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===E.dom){const o=n?.dom;return void(o!==t.dom&&we(e))}if(n){const o=n.strings;if(o){const n=o?.length;n!==t.strings.length&&we(e)}}}(t,e,o)}}}else{!function(t,e){const n=t.context,o=n.global;let r=-1;const s=n.providers=n.providers||[],a=s.length-1;for(;r++<a;){const t=s[r];let n=-1;const a=t.children.length-1;for(;n++<a;)if(o===t.children[n].context.global)return t.children.splice(n,1),void t.children.push(e)}}(e,o),we(e);const t=o.context;t.state.oldest=o,t.state.newest=o}return o.ownerSupport=t.ownerSupport,{support:o,wasLikeTags:r}}function Oe(t,e,n){const o=Ae(e,t,n);if(o.wasLikeTags){return nt(n.state.oldest,o.support),o.support}return Un(e,n)}function Me(t){return E.templater===t.tagJsType}function He(t){const e=t.context,n=e.global,o=Me(t.templater);if(e.locked)return n.blocked.push(t),t;if(o){return Le(t)}e.locked=4,n.blocked.length&&(t=n.blocked.pop(),n.blocked=[]);const r=Oe(e.state.newest,t,e);return delete e.locked,r}function Le(t){return He(N(t).context.state.newest)}function Pe(t,e){const n=e.context.global;if(n&&n.deleted)return!1;const o=function(t,e){const n=t.props,o=e.propsConfig,r=o.latest;if(je(n,r))return!0;switch(t.propWatch){case No.IMMUTABLE:return Wo(n,r);case No.SHALLOW:return it(n,r)}return!st(n,r,Bo)}(t,e);return!!o}function je(t,e){return t.length!==e.length}function De(t,e=[]){const n=t.context,o=Me(t.templater),r=t.ownerSupport;if(n.locked)return e.push(t),e;if(o)return De(r,e);const s=t.context.global;if(s&&!0===s.deleted)return e;const a=t,c=O(a.templater),u=t.templater.tagJsType,i=r&&u!==E.stateRender&&(!c||Pe(a.templater,a));if(a.context.providers){const t=function(t){const e=t.context.providers;if(!e)return[];const n=[];for(const t of e){const e=ge(t.owner,t);n.push(...e.map(he))}return n}(a);e.push(...t)}return i?(De(r,e),c&&e.push(a),e):(e.push(a),e)}function Ne(t){++d.locks,t.forEach($e),--d.locks,h()}function $e(t){const e=t.context;if(!e.global)return void e.tagJsVar.processUpdate(e.value,e,t.ownerSupport,[]);He(e.state.newest)}function Ue(t,e,{resolvePromise:n,resolveValue:o}){return H(t)?t.then(function(t,e){return n=>{const o=t.context,r=o.global;if(!0===o.deleted||!0===r?.deleted)return e(n);return Ne(De(t)),e(n)}}(e,n)):o(t)}function Re(t,e){const n=e.context.global,o=function(t,e){if(!0!==n.deleted)return function(t,e,n,o){const r=N(e),s=r.context;s.locked=1;const a=t.apply(n,o);delete s.locked;return We(a,r)}(o.tagFunction,o.support,t,e)};return o.tagFunction=t,o.support=e,o}function We(t,e){const n=e.context.global;if(n?.deleted)return;return Ne(De(e)),Ue(t,e,{resolvePromise:Fe,resolveValue:ze})}const _e="no-data-ever",Be="promise-no-data-ever";function Fe(){return Be}function ze(){return _e}function Ge(t,e,n){const o=n[e];if(o){let e=!1;if(t.originalStopPropagation=t.stopPropagation,t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t),t.stopPropagation=t.originalStopPropagation,delete t.originalStopPropagation},o(t),t.defaultPrevented||e)return}const r=n.parentNode;r&&Ge(t,e,r)}function Ke(t,e,n,o){const r=t.appElement,s=function(t){"blur"===t&&(t="focusout");return"_"+t}(e);"blur"===e&&(e="focusout");const a=t.context.events;if(!a[e]){const t=function(t){Ge(t,s,t.target)};a[e]=t,r.addEventListener(e,t)}n[s]=o,n[e]=o}function qe(t,e,n,o){const r=function(...e){return r.tagFunction(t,e)};r.tagFunction=e,r.support=n,Ke(n.appSupport,o,t,r)}function Ze(t){return null==t||!1===t}function Xe(t,e,n,o,r,s,a){if(Ze(e))return;const c=[];if(typeof e===I.object){for(const r in e){const u=vt(r,n.tagName),i=an(r,e[r],t,n,o,Ct,s,a,u);void 0!==i&&(Array.isArray(i)?c.push(...i):c.push(i))}return c}0!==e.length&&r(n,e,J)}function Ye(t,e){t.removeAttribute(e)}function Qe(t,e,n,o){const r=e,s=t;if(s?.tagJsType){const o=e.value;return o?.tagJsType?void o.hasValueChanged(s,e,n):(s.isAttr=!0,Nr(e),s.processInitAttribute(r.attrName,t,r.target,s,r,n,Ct),$r(),void(r.tagJsVar=s))}if(r.isNameOnly)return function(t,e,n,o,r,s,a,c){if(n){if(Ze(e)||""===e)return void o.removeAttribute(n);if(typeof n===I.object)if(typeof e===I.object)for(const t in n)t in e||l.push([Ye,[o,t]]);else for(const t in n)l.push([Ye,[o,t]])}const u=Xe(t,e,o,r,s,a,c);u&&a.push(...u)}(o,t,r.value,r.target,n,r.howToSet,[],r.parentContext),void(r.value=t);const a=r.target;!function(t,e,n,o,r,s,a){if(L(t))return function(t,e,n,o,r,s,a){const c=t.templater.wrapper;if((c?.tagJsType||c?.original?.tagJsType)!==E.renderOnce)return un(e,t,o,n);return cn(e,n,o,r,s,t)}(r,t,o,e,a,s);cn(t,o,e,a,s,r)}(t,r.attrName,0,a,n,r.howToSet,r.isSpecial),e.value=t}const tn=":tagvar",en=":",nn=new RegExp(tn+"(\\d+)"+en,"g");function on(t){return t.search&&t.startsWith(tn)?t.search(nn):-1}function rn(t,e,n,o,r,s,a){const c=o.length,u=[];function i(o){const s=function(t,e,n){return t.reduce(((t,o)=>{if(on(o)>=0){const o=n++,r=e[o];return t.push(r),t}return t.push(o),t}),[])}(e,o,c).join("");r(n,t,s)}return e.forEach((e=>{if(on(e)>=0){const r=o.length,c=Kt(e),l={updateCount:0,isAttr:!0,target:n,attrName:t,withinOwnerElement:!0,tagJsVar:c,valueIndex:a.varCounter,parentContext:a,destroy$:new Z,render$:new Z};c.processUpdate=function(t,e,n,o){++e.updateCount,i(o)};const p=s[r];l.value=p,u.push(l),++a.varCounter}})),i(s),u}function sn(t){return P(t)&&"TagJsTag"in t?t.tagJsVar:-1}function an(t,e,n,o,r,s,a,c,u){const i=sn(t);let l=i>=0||void 0===e&&"string"!=typeof t,p=n[i];e?.tagJsType?p=e:t?.tagJsType&&(l=!0,p=t,e=t);const f=p;if(f?.tagJsType)return function(t,e,n,o,r,s,a,c,u){const i=qt(t,0,!0,n);return i.target=c,i.valueIndex=r,i.isAttr=!0,i.isNameOnly=u,i.stateOwner=N(s),i.supportOwner=s,Nr(i),o.processInitAttribute(a,t,c,o,i,s,Ct),$r(),i.oldTagJsVar=i.tagJsVar,i.tagJsVar=o,i}(e,0,c,f,i,r,t,o,l);if(l){-1===i&&l&&(p=t);const e=qt(p,0,!0,c);e.valueIndex=i,e.isAttr=!0,e.target=o,e.isNameOnly=!0,e.howToSet=s;e.tagJsVar.processUpdate=Qe;const u=Xe(n,p,o,r,s,a,c);return u&&a.push(...u),e}if(Array.isArray(e))return rn(t,e,o,[],s,n,r.context);const d=sn(e);if(d>=0){return function(t,e,n,o,r,s,a,c,u){if(typeof e===I.function)return++r.varCounter,un(e,a,t,n);const i=Kt(e),l={updateCount:0,isAttr:!0,target:n,attrName:t,howToSet:s,value:e,withinOwnerElement:!0,tagJsVar:i,destroy$:new Z,render$:new Z,valueIndex:u,parentContext:r};return o.push(l),i.processUpdate=Qe,Ht(t,e,l,n,s,a,c),l.value=e,l}(t,n[d],o,[],c,s,r,u,d)}return Lt(t,e,o,s,u,c)}function cn(t,e,n,o,r,s){if(!1===o){switch(t){case void 0:case!1:case null:return void l.push([ln,[e,n]])}if(L(t))return qe(e,t,s,n);r(e,n,t)}else It(n,t,e,o)}function un(t,e,n,o){return qe(o,t=Re(t,e),e,n)}function ln(t,e){t.removeAttribute(e)}function pn(t,e,n,o,r){for(const s of t){const t=s[0],a=s[1],c=s[2]||!1;let u=s.length>1?Ct:wt;s[3]&&(u=s[3]);const i=r.contexts,l=an(t,a,e,n,o,u,i,r,c)||void 0;"object"==typeof l&&(i.push(l),++r.varCounter)}}function fn(t,e,n,o,r,s,a){e.at&&pn(e.at,n,t,o,r),s?p.push([y,[s,t,"appendToAttachDomElement"]]):u.push([v,[a,t,"insertBeforeAttachDomElement"]])}function dn(t,e,n,o,r,s,a){const c=n.context,u=c.contexts;o=c;const i=[];s&&void 0===a&&(a=document.createTextNode(J),p.push([y,[s,a]]),s=void 0);for(let c=0;c<t.length;++c){const l=t[c],p=l.v;if(!isNaN(p)){const t=Number(p),c=e[t];if(L(c)&&void 0===c.tagJsType){++o.varCounter;continue}de(c,u,n,o,r,s,a).valueIndex=t;continue}const f={};if(i.push(f),"text"===l.nn){gn(f,l,s,a);continue}const d=f.domElement=document.createElement(l.nn),g={updateCount:0,isAttrs:!0,target:d,parentContext:o,contexts:[],destroy$:new Z,render$:new Z,tagJsVar:{tagJsType:"new-parent-context"},valueIndex:-1,withinOwnerElement:!0,varCounter:0};fn(d,l,e,n,g,s,a),g.target=d,l.ch&&(f.ch=dn(l.ch,e,n,g,r+1,d,a).dom)}return{dom:i,contexts:u}}function gn(t,e,n,o){const r=t,s=r.tc=e.tc;n?p.push([V,[n,s,function(t){r.domElement=t}]]):u.push([T,[o,s,function(t){r.domElement=t}]])}const hn=/(:tagvar\d+:)/,mn="ondoubleclick",bn=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,vn=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:*][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function yn(t){const e=[],n=[],o=[];let r=null,s=-1,a=0;const c=new RegExp(vn,"g");for(t=function(t){return t.replace(xn,(function(t){return t.replace(/\[l t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]").replace(/</g,"[l t]").replace(/>/g,"[g t]")}))}(t);a<t.length;){const u=c.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(a<u.index){const e=t.slice(a,u.index);if(e.trim()){const t=Tn(e);for(let e of t)e.startsWith(tn)&&e.search(hn)>=0&&-1===e.search(Sn)&&(e=tn+ ++s+en),wn(r,n,e)}}if(a=u.index+i.length,f){r=o.pop()||null;continue}const g=[];let h;for(;null!==(h=bn.exec(p));)s=Jn(h,s,e,g);const m={nn:l};g.length&&(m.at=g),r?(r.ch||(r.ch=[]),r.ch.push(m)):n.push(m),d||(o.push(r),r=m)}if(a<t.length){const e=t.slice(a);if(e.trim()){const t=Tn(e);for(const e of t)e.startsWith(tn)&&++s,wn(r,n,e)}}return n}const xn=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function wn(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:Cn(n)})}function Cn(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 t\]/g,"[l t]").replace(/\[g t\]/g,"[g t]")}))}function Tn(t){return t.split(hn).filter(Vn)}function Vn(t){return""!==t}function Jn(t,e,n,o){const r=t[1]||t[3]||t[5];let s=t[2]||t[4]||t[6];if(void 0===r)return e;const a=""!==t[2],c=void 0===s&&a,u=r.toLowerCase(),i=u.startsWith("on")?function(t){if(t.startsWith("on"))return t.length===mn.length&&t===mn?"dblclick":t.slice(2,t.length);return t}(u):u;if(c){if(r.slice(0,tn.length)===tn){const t=tn+ ++e+en;return n.push(["at",t]),o.push([t]),e}if(t[0].startsWith(r)&&t[0].slice(r.length,t[0].length).search(/\s+$/)>=0)return o.push([i]),e;const a=t[3];if(a.search(Sn)>=0){s=a;const t=[i,s];return o.push(t),e}s=tn+ ++e+en}a||(s=t[2]);const l=s.split(In).filter((t=>t.length>0));l.length>1&&(s=l,l.forEach((t=>{t.search(nn)>=0&&++e})));const p=[i,s];console.debug("EVER GET HERE??????");const f=vt(u,"DIV");return f&&p.push(f),"style"===i?(o.unshift(p),e):(o.push(p),e)}const kn=new RegExp(tn+"(\\d+)"+en,"gi"),In=new RegExp("("+tn+"\\d+"+en+")","gi"),En=tn.slice(0,tn.length-1),Sn=new RegExp(En+"r(\\d+)"+en,"gi"),An=En+"r$1"+en;function On(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 r=t[o].replace(kn,An);o<e.length?n.push(r+tn+o+en):n.push(r)}return function(t,e,n){const o=n.length-e.length;if(o>0)for(let n=o;n>0;--n)t.push(tn+(e.length+n-1)+en)}(n,t,e),n}(n,e)}(t,e).join("");return yn(n)}const Mn="ch";function Hn(t,e,n=[],o=[]){const r=t;for(let t=0;t<r.length;t++){const s=[...o,t],a=r[t];if(a.at){const t=a.at;a.at=Pn(t,e)}if(a.ch){const t=a.ch,o=[...s,Mn];a.ch=Hn(t,e,n,o)}t=Ln(a,e,r,t)}return r}function Ln(t,e,n,o){if("text"!==t.nn)return o;const r=t;let s,a=r.tc;if(typeof a!==k.string)return o;for(;null!==(s=nn.exec(a));){const t=s[1],r=parseInt(t,10);if(!isNaN(r)&&r<e){const t=tn+r+en,e=a.slice(s.index+t.length);n.splice(o,1,{nn:"text",v:r}),a=e,nn.lastIndex=0}}return r.tc=a,o}function Pn(t,e){const n=[];for(const o of t){const[t,r,s]=o;if(t.startsWith(tn)){const o=parseInt(t.replace(tn,""),10);if(!isNaN(o)&&o<e){n.push([{tagJsVar:o}]);continue}}if(typeof r===k.string&&r.startsWith(tn)){const o=parseInt(r.replace(tn,""),10);if(!isNaN(o)&&o<e){n.push([t,{tagJsVar:o},s]);continue}}n.push(o)}return n}function jn(t){return t.length}const Dn={};function Nn(t,e){const n=function(t){const e=t.map(jn);return e.push(t.length),Number(e.join(""))}(t),o=Dn[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=Hn(On(t,e),e.length),a={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Dn[n]=a,s}function $n(t,e,n){const o=t.context;o.state=o.state||{};const r=o.state;r.oldest=t,r.newest=t,o.state.older=o.state.newer,++d.locks;const s=function(t,e,n,o){const r=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===E.dom)return n.dom;const o=n.strings;return Nn(o,n.values)}(t),s=t.templater.tag,a=s.values,c=[],u=t.context;e=u,u.contexts=c;const i=dn(r,a,t,e,0,n,o);return i}(t,t.context,e,n);return o.htmlDomMeta=s.dom,--d.locks,s}function Un(t,e){const n=e.state.newest,o=e.placeholder;return n.ownerSupport=t,$n(n,void 0,o),n}function Rn(t,e,n){const o=qo(t,e,e.appSupport,n);return n.contexts=n.contexts||[],o}function Wn(t,e,n,o,r){const s=Rn(t,n,e);s.ownerSupport=n;const a=$n(s,o,o?void 0:r);for(const t of a.dom)t.marker&&(o?p.push([y,[o,t.marker]]):u.push([v,[r,t.marker,"subMarker"]])),t.domElement&&(o?p.push([y,[o,t.domElement,"subAppendTo"]]):u.push([v,[r,t.domElement,"subInsertBefore"]]));return s}function _n(t,e,n,o,r){if(e.state={},e.inputsHandler){const t=n.propsConfig;e.inputsHandler(t)}return r?Wn(t,e,n,r,o):Un(n,e)}function Bn(t,e){const n={component:!1,tagJsType:E.templater,processInit:_n,processInitAttribute:a,processUpdate:ht,hasValueChanged:fe,destroy:le,propWatch:t,props:e,key:function(t){return n.arrayValue=t,n},matchesInjection:(t,e)=>n.wrapper===t||n.wrapper?.original===t?.original?e:void 0};return n}const Fn=[];function zn(t,e,n){const o=t.propWatch===No.DEEP?Bo:_o,r=t.props,s=e.propsConfig;let a=s.castProps;const c=n?.propsConfig,u=c?.castProps;u&&(s.castProps=u,a=function(t,e,n,o,r,s=-1){const a=e.context;if(!a.global||!a.state.newest){const e=be(o);return o.push(...e),t.propsConfig.castProps=e,o}const c=(e=a.state.newest||e).propsConfig.castProps,u=[];for(let e=0;e<o.length;++e){const a=o[e],i=ye(c[e],a,t,n,r,s+1);u.push(i)}return t.propsConfig.castProps=u,u}(e,n,n.ownerSupport,r,o));return a||be(r)}function Gn(t,e,n){const o=Bn(No.DEEP);o.tagJsType=t.tagJsType;const r=Rn(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 Kn(t,e,o,r,s){n(e);const a=Gn(t,e,o);return Ee(a,void 0,e),Wn(a.templater,e,o,s,r)}function qn(t,e,n,o,r){const s=nr(t,e,n,o,r);return s.hasEmitted||Zn(t,s),s}function Zn(t,e){const n=t.Observables[0];if(!e.hasEmitted)return"withDefault"in t?void e.subValueHandler(t.withDefault,0):"value"in n?void e.subValueHandler(n.value,0):void 0;const o=e.lastValues[0].value;e.subValueHandler(o,0)}function Xn(t,e,n,o,r,s){e.destroy=rr;const a=vt(t,n.tagName),c=function(e,o){Lt(t,e,n,Ct,a,r),ar(o)},u=or(e.Observables,s,c,e,r);return r.subContext=u,r.value=e,r.tagJsVar=e,e.processUpdate=function(e,o,s){return Pt(e,r,s,n,t,Ct)},{subContext:u,onOutput:c}}function Yn(t,e,n,o,r,s){const{subContext:a}=Xn(t,e,n,0,r,s);a.hasEmitted||function(t,e){const n=e.tagJsVar,o=n.onOutput,r=t.Observables;let s=r[0]?.value||t.withDefault;t.callback&&(s=t.callback(s));o(s,!0,e)}(e,a)}function Qn(t,e,n){return{component:!1,onOutput:a,tagJsType:E.subscribe,processInitAttribute:Yn,processInit:qn,hasValueChanged:to,processUpdate:a,destroy:sr,callback:n,withDefault:e,Observables:[t]}}function to(t,e){if(!t?.tagJsType)return 1;const n=t.Observables;if(!n)return 2;const o=e.value.Observables;if(!o||o.length!==n.length)return 3;return n.every(((t,e)=>t===o[e]))?0:4}function eo(t,e,n,o){if(!e||!e.tagJsType||e.tagJsType!==t){return o.tagJsVar.destroy(o,n),Yo(e,o,n,99),99}}function no(t,e,n){const o=e.subContext,r=eo(E.subscribe,t,n,e);return r||(o&&o.hasEmitted?(o.tagJsVar=t,o.valuesHandler(o.lastValues,0),0):0)}function oo(t,e){return{component:!1,onOutput:a,tagJsType:E.subscribe,processInitAttribute:Xn,processInit:nr,hasValueChanged:to,processUpdate:no,destroy:sr,callback:e,Observables:[t]}}function ro(t,e){++t.updateCount;const n=so(t.subContext,e);return delete t.subContext,n}function so(t,e){t.deleted=!0;const n=t.appendMarker;if(n&&(m(n,"deleteSubContext"),delete t.appendMarker),!t.hasEmitted)return;const o=t.contextItem;return o.tagJsVar.destroy(o,e),76}function ao(t,e,n,o){return e.hasEmitted=!0,e.contextItem=Zt(t,n,0,o)}function co(t,e,n){++e.updateCount;const o=t.owner._innerHTML;o.processInit=o.oldProcessInit;const r=e.subContext?.contextItem;Qo(r,o,n)}function uo(t,e,n,o,r){e.subContext={},t.processUpdate=co,function(t,e,n,o,r){const{appendMarker:s,insertBefore:a}=tr(r,o),c=n.subContext;c.appendMarker=s;const u=t.owner,i=u._innerHTML;i.processInit=i.oldProcessInit,ao(i,c,e,a)}(t,n,e,o,r)}function io(){return{component:!1,tagJsType:"innerHTML",hasValueChanged:()=>0,processInitAttribute:a,processInit:uo,processUpdate:co,destroy:ro}}function lo(t,e){return{component:!1,onOutput:a,tagJsType:E.subscribe,processInitAttribute:a,hasValueChanged:to,processInit:po,processUpdate:a,destroy:sr,callback:e,Observables:t}}function po(t,e,n,o,r){return nr({tagJsType:E.subscribe,states:[],Observables:t},e,n,void 0,r)}function fo(t){if(!t)return a;const e=jr();if(!e)throw new Error("output must be used in render sync with a parent context");const n=D(e);if(!n)throw new Error("output must be used in render sync fashion");if(!0===t.wrapped)return t;const o=(...e)=>{const o=n.ownerSupport;return go(e,t,o.context)};return o.wrapped=!0,o}function go(t,e,n){const o=void 0;Nr(n);const r=e(...t);return $r(),f.push([()=>{const t=n.global;if(void 0===t||!0===t.deleted){++d.locks;const t=n;return t.tagJsVar.processUpdate(t.value,t,o,[]),--d.locks,void h()}++d.locks,me(o),--d.locks,h()},[]]),r}function ho(t,e={}){const n={tagJsType:E.host,processInitAttribute:bo,hasValueChanged:()=>0,processInit:vo,processUpdate:mo,destroy:yo,options:{callback:t,...e},matchesInjection(e,n){const o=e?.options;if(!o)return!1;const r=o?.callback;return r===t&&n}},o=(...n)=>({...o,options:{arguments:n,...e,callback:t}});return Object.assign(o,n),o}function mo(t,e,n){if(L(t)&&!t?.tagJsType)throw new Error("issue on its way");const o=eo(E.host,t,n,e);if(o)return o;const r=e.tagJsVar.options,s=t;var a;Nr(a=e),ke(a.state.newer.state);const c=s.options.arguments||r.arguments||[];e.returnValue=s.options.callback(...c),Ve(e)}function bo(t,e,n,o,r){return vo(o,r)}function vo(t,e){const n=e.target,o=e.state={};W(e),function(t,e,n,o){const r=e.options.arguments||[],s=e.options.callback(...r);n.returnValue=s;const a=e.options;a.onInit&&a.onInit(t,e,n,o)}(n,t,e,o),Ve(e)}function yo(t){++t.updateCount;const e=t,n=e.tagJsVar,o=n.options;if(e.destroy$.subscribers.length&&(Nr(t),go([],e.destroy$.next.bind(e.destroy$),t),$r()),o.onDestroy){const r=e.target;return go([],(function(){Nr(t);const s=o.onDestroy(r,n,e,e.state);return $r(),s}),t.stateOwner.context)}}function xo(t,e,n,o){const r={component:!1,tagJsType:"tag-conversion",processInitAttribute:a,processInit:(r,s,a)=>{if(t.inputsHandler){const e=n.propsConfig;t.inputsHandler(e)}if(e.inputsHandler){const t=n.propsConfig;e.inputsHandler(t)}if(s.inputsHandler){const t=n.propsConfig;s.inputsHandler(t)}const c=t.returnValue;return e.tagJsVar.processInit(c,e,n,o.placeholder)},processUpdate:(t,o,s)=>{if(o.locked||o.deleted)return;++o.updateCount;const a=o.value.tagJsType,c=t?.tagJsType,u=c!==a;if(pe(t,o)||u||r.hasValueChanged(t,o,n))return r.destroy(o,n),void Yo(t,o,s,789);o.locked=467,o.render$.next();const i=o.returnValue;!function(t,e,n,o,r){const s=be(e.props);t.value.props=s;const a=r.propsConfig;a&&(a.castProps=s);if("tagComponent"===e?.tagJsType){if(t.inputsHandler=n.inputsHandler,t.updatesHandler=n.updatesHandler,n.value=e,n.inputsHandler){Nr(n);(0,n.inputsHandler)(s),$r()}if(n.updatesHandler){Nr(n);(0,n.updatesHandler)(s),$r()}}t.tagJsVar.processUpdate(o,t,r,[]),t.value=o}(e,t,o,i,n),delete o.locked},hasValueChanged:(n,o,r)=>{const s=t.returnValue;return e.tagJsVar.hasValueChanged(s,e,r)},destroy:(o,r)=>{++t.updateCount,t.deleted=!0,delete t.returnValue;const s=e.tagJsVar.destroy(e,n);return H(s)?s.then((()=>{const e=Vo(t,r);return h(),e})):(t.destroy$.next(),Vo(t,r))}};return r}function wo(t,e,n){const o=t.context,r=t.returnValue,s=Kt(r);delete o.global,o.contexts=[];const a={updateCount:0,value:r,tagJsVar:s,destroy$:new Z,render$:new Z,placeholder:o.placeholder,valueIndex:-1,withinOwnerElement:!0,parentContext:o,contexts:o.contexts},c=xo(o,a,t,n);return o.tagJsVar=c,s.processInit(r,a,t,n.placeholder),t}function Co(t,e,n){const o=Zo(t,e,n,n?.appSupport),r=o.propsConfig;if(r){const e=t.tagJsType!==E.tagComponent?[]:zn(t,o);r.castProps=e}return Ee(o,e.state.newest,e)}function To(t,e,n){const o=Co(t,e,n),r=o.templater.tag;return["dom","html"].includes(r.tagJsType)?($n(o,void 0,e.placeholder),o):wo(o,o.ownerSupport,e)}function Vo(t,e){delete t.returnValue,delete t.global,t.contexts=[],t.htmlDomMeta=[],delete t.inputsHandler,delete t.updatesHandler}function Jo(t,e,n,o){const r=Co(t,e,n),s=r.templater.tag;return["dom","html"].includes(s.tagJsType)?function(t,e){const n=$n(t,e,void 0);for(const t of n.dom)t.domElement&&p.push([y,[e,t.domElement]]),t.marker&&p.push([y,[e,t.marker]]);return t}(r,o):wo(r,0,e)}function ko(t,e,o,r,s){return n(e),s?Jo(t,e,o,s):To(t,e,o)}function Io(t){return tt.stateConfig.handlers.handler(t)}function Eo(t){return Io((()=>{const e=t(),n=r();return n?.context?.global?Ue(e,n,{resolvePromise:So,resolveValue:Ao}):e})),$o}function So(t){return t}function Ao(t){return t}function Oo(t){return Io((function(){jr().destroy$.toCallback(t)})),$o}oo.all=function(t,e){return oo(Z.all(t),e)},ho.onInit=t=>ho((()=>{}),{onInit:t}),ho.onDestroy=t=>ho((()=>{}),{onDestroy:t});let Mo=0;const Ho=Po("click"),Lo=Po("mousedown");function Po(t){return function(e){const n=Er(e);return Io((()=>{Dr().addEventListener(t,n)})),n}}const jo={get:Dr,onclick:Ho,click:Ho,onClick:Ho,mousedown:Lo,onmousedown:Lo,onMouseDown:Lo};function Do(t,e){Object.defineProperty($o,t,{get:()=>e,set:t=>e(t)})}var No;function $o(t,e=No.SHALLOW){const n=function(...o){const r=Bn(e,o);r.tagJsType=E.tagComponent,r.processInit=ko,r.hasValueChanged=fe;const s=function(t,e){return function(n,o,r){const s=zn(t,n,r),a=n.ownerSupport,c=Zo(t,o,a,n.appSupport,s);return Te(t,e,c,s)}}(r,n);return s.original=t,r.wrapper=s,r},o=t;n.original=t,o.tags=Fn,o.setUse=tt,o.ValueTypes=E,o.tagIndex=Mo++,Fn.push(n);const r=n;return r.inputs=t=>(jr().inputsHandler=t,!0),r.updates=t=>(jr().updatesHandler=t,!0),r.getInnerHTML=io,r}function Uo(t,e,n){if(je(t,e))return 11;switch(n){case No.NONE:return 1;case No.SHALLOW:return it(t,e);case No.IMMUTABLE:return Wo(t,e)}return function(t,e){let n=t,o=e;n=[...t],o=[...e||[]];const r=n.every(((t,e)=>function(t,e,n,o){const r=o[e];if(typeof t===I.object){const e={...t},n={...r||{}},o=Object.entries(e).every((([t,o])=>Ro(o,n[t],(()=>{delete e[t],delete n[t]}))));return o}return Ro(t,r,(function(){n.splice(e,1),o.splice(e,1)}))}(t,e,n,o)));if(!r)return 7;return!1}(t,e)}function Ro(t,e,n){if(typeof t!==I.function)return!!st(t,e,Bo)&&4;if(typeof e!==I.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 Wo(t,e){const n=t.length;for(let o=0;o<n;++o){if(t[o]!==e[o])return 2}return!1}Do("onclick",Ho),Do("click",Ho),Do("onMouseDown",Lo),Do("onmousedown",Lo),Do("mousedown",Lo),function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(No||(No={})),$o.element=jo,$o.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},$o.use=function(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")},$o.deepPropWatch=$o,$o.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`` `")},$o.inject=function(t){const e=jr();if(!e)throw new Error("tag.inject can only be called within a tag or host context");let n=e.parentContext;for(;n;){const e=n.contexts;if(e)for(const n of e)if(n.isAttr&&n.tagJsVar?.matchesInjection){const e=n.tagJsVar.matchesInjection(t,n);if(void 0!==e)return e.returnValue}if(n.tagJsVar?.matchesInjection&&n.tagJsVar.matchesInjection(t,n))return n.returnValue;n=n.parentContext}const o=`Could not find parent context for tag.inject ${t}`;throw console.error(o,{targetItem:t,context:e}),new Error(o)},$o.output=fo,$o.onInit=Eo,$o.onDestroy=Oo,$o.onRender=function(t){const e=jr(),n=n=>{const o=jr();Nr(e);const r=t();return $r(),Nr(o),r},o=e.render$.subscribe((()=>{n()})),r=n();return $o.onDestroy((()=>o.unsubscribe())),r},$o.getInnerHTML=io,$o.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`` `")},$o.immutableProps=function(t){return $o(t,No.IMMUTABLE)},$o.watchProps=function(t){return $o(t,No.SHALLOW)},Object.defineProperty($o,"renderOnce",{set(t){t.tagJsType=E.renderOnce,t.processInit=Kn,t.processUpdate=ht,t.destroy=le,t.hasValueChanged=function(){return 0}}}),Object.defineProperty($o,"use",{set(t){t.original={setUse:tt,tags:Fn},t.tagJsType=E.stateRender,t.processInit=ko,t.processUpdate=ht,t.hasValueChanged=fe,t.destroy=le}}),Object.defineProperty($o,"promise",{set(t){Hr(t)}});const _o=3,Bo=10;function Fo(t){return ut(t,_o)}function zo(t){return ut(t,Bo)}function Go(t,e,n){const o={templater:t,context:e,castedProps:n,appSupport:void 0};return e.global.blocked=[],e.state||(e.state={newer:{state:[],states:[]}}),o}function Ko(t,e,n,o){e.appSupport=n||e;const r=t.props;return r&&(e.propsConfig=function(t,e,n){const o=t.templater;if(o.tagJsType!==E.stateRender){switch(o.propWatch){case No.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case No.SHALLOW:return t.propsConfig={latest:e.map(Fo),castProps:n}}return t.propsConfig={latest:e.map(zo),castProps:n}}}(e,r,o)),e}function qo(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 Zo(t,e,n,o,r){const s=Go(t,e,r);return s.ownerSupport=n||s,s.ownerSupport.appSupport=o||s.ownerSupport,Ko(t,s,o,r)}function Xo(t,e,o){if(O(e))return void 0===t.global&&n(t),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,function(t,e,n){if(!e.state.newest){if(e.inputsHandler){const t=n.propsConfig;e.inputsHandler(t)}return void t.processInit(t,e,n,e.placeholder)}const o=Zo(t,e,n,n.appSupport);xe(n,o,e)}(e,t,o),!0;if(t.global){t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e;const n=t.state.newest;if(n)return typeof e===I.function||function(t,e,n,o){let r=n.templater||n;const s=t.templater.tag;s&&s._innerHTML&&(r=n._innerHTML);const a=Zo(r,e,o,o.appSupport);nt(t.context.state.oldest,a)}(n,t,e,o),!0}if(t.inputsHandler){const e=o.propsConfig;t.inputsHandler(e)}return e.processInit(e,t,o,t.placeholder),t.oldTagJsVar=t.tagJsVar,t.tagJsVar=e,!0}function Yo(t,e,n,o){const r=t&&t.tagJsType;if(delete e.deleted,r){if(r===E.renderOnce)return;Xo(e,t,n)}else{if(j(t))return Xt(e,t,n),e.oldTagJsVar=e.tagJsVar,void(e.tagJsVar=Ft(t));typeof t!==I.function?o&&function(t,e){e.value=t,e.oldTagJsVar=e.tagJsVar,e.tagJsVar=Nt(t);const n=e.placeholder,o=bt(t),r=e.paint=[C,[n,o,function(t){e.simpleValueElm=t,delete e.paint},"processNowRegularValue"]];u.push(r)}(t,e):e.value=t}}function Qo(t,e,n){const o=t.tagJsVar.hasValueChanged(e,t,n);return 0===o||Yo(e,t,n,o),o}function tr(t,e){let n;return t&&(n=e=document.createTextNode(J),p.push([y,[t,e]])),{appendMarker:n,insertBefore:e}}function er(t,e,n){const o=no(t,e,n);if(!0!==e.hasEmitted){const t=e.value.Observables;if(!t)return;if(!("value"in t[0]))return}if(0===o&&t.callback){Zn(t,e.subContext)}}function nr(t,e,n,o,r){const s=t.Observables,{appendMarker:a,insertBefore:c}=tr(r,o);let u=function(t,e,o){ao(t,o,n,c),ar(e),u=o.tagJsVar.onOutput=function(t,e,o){const r=o.contextItem;Qo(r,t,n),r.tagJsVar.processUpdate(t,r,n,[t]),r.value=t,ar(e)}};const i=or(s,n,((t,e,n)=>u(t,e,n)),t,e);return i.appendMarker=a,e.subContext=i,t.processUpdate=er,t.onOutput=u,i}function or(t,e,n,o,r){function s(t,e){u.lastValues[e]={value:t,tagJsVar:Kt(t),oldTagJsVar:u.lastValues[e]?.tagJsVar},a(u.lastValues,e)}function a(t,e){const o=u.tagJsVar,s=o?.callback;if(s){Nr(r);const e=o.callback(...t.map((t=>t.value)));return n(e,c,u),void $r()}const a=t[e].value;n(a,c,u)}let c=!0;const u={lastValues:[],subValueHandler:s,valuesHandler:a,tagJsVar:o,subscriptions:[]};return t.forEach(((t,e)=>{c=!0,u.subscriptions.push(t.subscribe((t=>s(t,e)))),c=!1})),o.onOutput=n,u}function rr(t){const e=t.subContext;if(!e)return;e.subscriptions.forEach((t=>t.unsubscribe())),delete t.subContext}function sr(t,e){++t.updateCount;const n=t.subContext;return rr(t),so(n,e)}function ar(t){t||tt.stateConfig.support||h()}function cr(t,e,n,o,r){nr({tagJsType:E.subscribe,states:[],Observables:[t]},e,n,o,r)}function ur(t){return r()?Io((()=>ir(t))):ir(t)}function ir(t){let e=t;const n=new Set,o=t=>{n.forEach((e=>e(t)))};return{component:!1,tagJsType:E.signal,hasValueChanged:to,processInitAttribute:a,processInit:cr,processUpdate:er,get value(){return e},set value(t){e!==t&&(e=t,o(t))},destroy:sr,emit:o,subscribe(t){t(e),n.add(t);const o=()=>n.delete(t);return o.unsubscribe=o,o}}}class lr extends Z{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class pr extends Z{value;constructor(t){super(t),this.value=t,this._value=t,Y(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function fr(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function dr(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const gr=t=>(e,n)=>{n.setHandler((()=>{}));const o=t(e).subscribe((t=>{o.unsubscribe(),n.next(t)}))},hr=(t,e)=>br(t,e).pastResult,mr=t=>t;const br=(t,e,{init:n,before:o,final:r=mr}={})=>{const s=Io({pastResult:void 0,values:void 0}),a="function"==typeof t?t():t,c=void 0===s.values;let u=0;function i(t){if(void 0===s.values){if(o&&!o(t))return s.values=t,s;const a=(n||e)(t,s.values);return s.pastResult=r(a),s.values=t,s}if(t.every(((t,e)=>t===s.values[e])))return s;if(o&&!o(t))return s.values=t,s;const a=e(t,s.values);return s.pastResult=r(a),s.values.length=0,s.values.push(...t),s}return c&&"function"==typeof t&&$o.onRender((()=>{if(++u,1===u)return;i(t())})),i(a)};function vr(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=Io((()=>r())),o=Io((()=>new lr(void 0))),s=Io((()=>({state:tt.stateConfig.state,states:tt.stateConfig.states}))),a=(t,a)=>(br(t,((t,e)=>{const c=r(),u=a(t,e);if(c!==n){s.state,n.context.state.older}o.next(u)}),e.setup),o);return a.setup=e.setup,vr((()=>a),a),a}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function yr(t){return r()?Io((()=>new Z(t))):new Z(t)}function xr(t){return tt.stateConfig.handlers.statesHandler(t)}function wr(t){const e=ur([]),n=ur(0),o=ur(0);let r=[],s=0;return o.value=n.value,t(((...t)=>(r=t,e.value))),hr(r,(()=>{++s,e.value=r,t((()=>r))})),xr(((r,a)=>{if(s)return t(((...t)=>(a&&1!==a||(e.value=t),e.value))),o.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}function Cr(){return{stateDiff:0,provider:void 0}}vr((()=>function(t){const e=(e,n)=>br(e,n,t).pastResult;return e.setup=t,vr((()=>e),e),e}({})),hr),yr._value=t=>{Io((function(){return{state:tt.stateConfig.state,states:tt.stateConfig.states}}));return Io((function(){return new lr(t).pipe((t=>t))}))},yr.all=function(t){return Io((()=>({state:tt.stateConfig.state,states:tt.stateConfig.states}))),r(),Z.all(t).pipe((t=>t))};const Tr={create:t=>{const e=Io(Cr);if(e.stateDiff){let t=e.stateDiff;for(;t--;)Io(void 0);return Io(void 0)}const n=Io((()=>{const n=tt.stateConfig,o=n.state.length,r=t.prototype?new t:t(),s=n.support,a=n.state.length-o,c={constructMethod:t,instance:r,stateDiff:a,owner:s,children:[]};e.provider=c;const u=s.context;return(u.providers=u.providers||[]).push(c),e.stateDiff=a,r})),o=t,r=o.compareTo=o.toString();return e.provider.constructMethod.compareTo=r,n},inject:function(t){return Io((function(){const e=t,n=e.compareTo=e.compareTo||t.toString(),o=r(),s=[];let a={ownerSupport:o.ownerSupport};for(;a.ownerSupport;){const t=a.ownerSupport.context.providers;if(!t){a=a.ownerSupport;continue}const e=t.find((t=>{s.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=o.context;return(t.providers=t.providers||[]).push(e),e.children.push(o),e.instance}a=a.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,s),new Error(c)}))}};class Vr extends Error{details;constructor(t,e,n={}){super(t),this.name=Vr.name,this.details={...n,errorCode:e}}}class Jr extends Vr{constructor(t,e){super(t,"array-no-key-error",e),this.name=Jr.name}}class kr extends Vr{constructor(t,e){super(t,"state-mismatch-error",e),this.name=kr.name}}class Ir extends Vr{constructor(t,e){super(t,"sync-callback-error",e),this.name=Ir.name}}function Er(t){const e=jr(),n=Io({callback:t}),o=Io((()=>Sr(e,tt.stateConfig,n)));return n.callback=t,o}function Sr(t,e,n){const o=e.states;return function(...e){const r=function(t,e,n,...o){const r=n(...o),s=D(t);if(!s)return r;if(s.context.global)He(s);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}return H(r)&&r.finally((()=>{if(t.global)He(s);else{const t=s.context;t.tagJsVar.processUpdate(t.value,t,s.ownerSupport,[])}})),r}(t,o,n.callback,...e);return h(),r}}const Ar=()=>{const t=jr();if(!t)throw Or;const e=tt.stateConfig;return function(n){return Sr(t,e,{callback:n})}},Or=new Ir("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering"),Mr=()=>{};function Hr(t){const e=jr(),n=Io({callback:Mr}),o=Io({current:void 0}),r=Io((()=>Sr(e,tt.stateConfig,n)));if(o.current!==t){o.current=t;const e=t;t.then((()=>{o.current===e&&r()}))}}function Lr(t=[]){return r()?Io((()=>Pr(ir(t)))):Pr(ir(t))}function Pr(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[a=s]=(...e)=>{const n=t.value[a](...e);return t.emit(t.value),n}:n.includes(s)?t.value[s].bind(t.value):t[s]:t.value[s];var a},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 jr(){return tt.stateConfig.context}function Dr(){return jr().target}function Nr(t){return tt.stateConfig.context=t}function $r(){delete tt.stateConfig.context}"object"==typeof document&&(document.taggedJs&&console.warn("🏷️🏷️ Multiple versions of taggedjs are loaded. May cause issues."),document.taggedJs=!0);const Ur=[],Rr="__taggedjs_tag_element__";function Wr(t,e,o){const r=e[Rr],c=Ur.findIndex((t=>t.element===e));if((r||c>=0)&&console.warn("tagElement called multiple times for the same element",{element:e}),c>=0){const t=Ur[c].support;ce(t,t.context.global),Ur.splice(c,1)}e[Rr]=!0,e.innerHTML="";let u=()=>f(o);u.propWatch=No.NONE,u.tagJsType=E.stateRender,u.processUpdate=ht,u.props=[o],u.isApp=!0;const i=function(t,e){const o={component:!1,tagJsType:"templater",hasValueChanged:fe,destroy:le,processInitAttribute:a,processInit:function(){console.debug("do nothing app function")},processUpdate:ht},r={updateCount:0,value:t,valueIndex:0,varCounter:0,destroy$:new Z,render$:new Z,withinOwnerElement:!1,renderCount:0,global:void 0,state:{},tagJsVar:o};return n(r),r.events={},function(t,e,n){const o=Go(t,e);Ko(t,o,o),o.appElement=n,o.context=e,e.state.oldest||(e.state.oldest=o,e.state.older=e.state.newer),e.state.newest=o}(t,r,e),r}(u,e),l=i.global,p=i.state.newest;W(p.context),s(p);let f=t(o);const g=typeof f==I.function;g||(O(f)?(i.state.newest.propsConfig={latest:[o],castProps:[o]},u.propWatch=f.propWatch,u.tagJsType=f.tagJsType,u.wrapper=f.wrapper,u=f):(u.tag=f,f=t));const m=function(t,e,n,o,r,s,a){const c=document.createTextNode(J);if(Fn.push(n.wrapper||{original:n}),s.placeholder=c,e.isApp=!0,!r)throw new Error(`Cannot tagElement, element received is type ${typeof r} and not type Element`);r.destroy=function(){const t=s.events;for(const e in t){const n=t[e];r.removeEventListener(e,n)}s.events={},++d.locks;const n=ce(i,e);return--d.locks,h(),n},++d.locks;const u=document.createDocumentFragment();u.appendChild(c);const i=To(n,s,{appSupport:{appElement:r,context:s},appElement:r,context:s,isRoot:!0});return i.appElement=r,a&&(o.tag=i.templater.tag),--d.locks,h(),r.appendChild(u),{support:i,tags:Fn,ValueTypes:E}}(0,l,u,f,e,i,g);return $r(),m}function _r(t,e){return function(n,o,r){if(function(t){return Array.isArray(t)&&Object.prototype.hasOwnProperty.call(t,"raw")}(o)){const s=o.reduce(((t,e,n)=>t+e+(r[n]??"")),"");return e(n,[t,s])}return e(n,[t,o])}}function Br(t,e,n){function o(t){return o.toCallback(t)}return o.toCallback=n,t.listeners.push([e,o]),t.allListeners.push([e,o]),t}function Fr(t,e){const n=js(t,t.elementFunctions);return n.attributes.push(e),fs(n,e[1]),hs(e[0])?gs(e[0],n):hs(e[1])&&gs(e[1],n),n}const zr=_r("style",Fr),Gr=_r("id",Fr),Kr=_r("class",Fr),qr=_r("href",Fr),Zr=_r("value",Fr),Xr=_r("placeholder",Fr),Yr=_r("src",Fr),Qr=_r("title",Fr),ts=_r("type",Fr),es=_r("checked",Fr),ns=_r("disabled",Fr),os=_r("selected",Fr),rs=_r("minLength",Fr),ss=_r("maxLength",Fr),as=_r("open",Fr),cs=_r("cellpadding",Fr),us=_r("cellspacing",Fr),is=_r("border",Fr);function ls(t,e){return t.attributes.push(e),fs(t,e[1]),hs(e[0])?gs(e[0],t):hs(e[1])&&gs(e[1],t),t}function ps(t){function e(e){return function(n){return function(t,e,n){return Br(js(t,t.elementFunctions),e,n)}(t,e,n)}}return{onClose:e("onclose"),onCancel:e("oncancel"),onDoubleClick:e("ondblclick"),onClick:e("click"),onBlur:e("onblur"),onChange:e("onchange"),onInput:e("oninput"),contextMenu:e("contextmenu"),onMousedown:e("onmousedown"),onMouseup:e("onmouseup"),onMouseover:e("onmouseover"),onMouseout:e("onmouseout"),onKeydown:e("onkeydown"),onKeyup:e("onkeyup"),attr:(...e)=>Fr(t,e),attrs:e=>function(t,e){const n=js(t,t.elementFunctions);return Object.entries(e).map((t=>{n.attributes.push(t),fs(n,t[1]),hs(t[0])?gs(t[0],n):hs(t[1])&&gs(t[1],n)})),n}(t,e),key:function(t){return this.arrayValue=t,this},style:ds(zr,t),id:ds(Gr,t),class:ds(Kr,t),href:ds(qr,t),value:ds(Zr,t),placeholder:ds(Xr,t),src:ds(Yr,t),type:ds(ts,t),title:ds(Qr,t),checked:ds(es,t),disabled:ds(ns,t),selected:ds(os,t),cellSpacing:ds(us,t),cellPadding:ds(cs,t),border:ds(is,t),minLength:ds(rs,t),maxLength:ds(ss,t),open:ds(as,t)}}function fs(t,e){let n=1;null!=e&&"function"!=typeof e&&"number"==typeof e.length&&(n+=e.length),t.contentId+=n}function ds(t,e){return(n,...o)=>t(e,n,o)}function gs(t,e){e.contexts||(e.contexts=[]),e.contexts.push(t),++e.contentId}function hs(t){return Array.isArray(t)||L(t)||t?.tagJsType}function ms(t,e){return(n,o)=>ls(n,[t,o,!1,e])}function bs(t){return(e,n)=>Br(e,t,n)}const vs={onClick:bs("click"),onDoubleClick:bs("ondblclick"),onDblClick:bs("ondblclick"),onBlur:bs("onblur"),onChange:bs("onchange"),onCancel:bs("oncancel"),onClose:bs("onclose"),onInput:bs("oninput"),onMousedown:bs("onmousedown"),onMouseDown:bs("onmousedown"),onMouseup:bs("onmouseup"),onMouseUp:bs("onmouseup"),onMouseover:bs("onmouseover"),onMouseOver:bs("onmouseup"),onMouseout:bs("onmouseout"),onMouseOut:bs("onmouseout"),onKeyup:bs("onkeyup"),onKeyUp:bs("onkeyup"),onKeydown:bs("onkeydown"),onKeyDown:bs("onkeydown")},ys={checked:ms("checked",Tt),disabled:ms("disabled",Tt),selected:ms("selected",Tt),class:ms("class",(function(t,e,n){P(n)?Object.entries(n).forEach((([e,n])=>{n?t.classList.add(e):t.classList.remove(e)})):Vt(t,e,n)})),...vs};function xs(t){return ws(t)}function ws(t){const e=function(t){if(!t||0===t.length)return"";const e=[];return t.forEach((t=>{const n=t[0];if("string"!=typeof n||0===n.length)return;const o=Vs(t[1]);!0!==o?!1!==o&&null!=o&&e.push(`${n}="${Ts(String(o))}"`):e.push(n)})),e.length>0?` ${e.join(" ")}`:""}(t.attributes),n=Cs(t.innerHTML);return`<${t.tagName}${e}>${n}</${t.tagName}>`}function Cs(t){return t&&0!==t.length?t.map((t=>{const e=Vs(t);return function(t){return!!t&&"object"==typeof t&&"string"==typeof t.tagName}(e)?ws(e):Array.isArray(e)?Cs(e):null==e||!1===e?"":Ts(String(e))})).join(""):""}function Ts(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function Vs(t){return"function"==typeof t?t():t}function Js(t,e){++t.updateCount;const n=t.contexts,o=[];if(t.paintCommands){for(let e=u.length-1;e>=0;--e){const n=u[e],o=t.paintCommands.indexOf(n);if(o>=0&&(u.splice(e,1),t.paintCommands.splice(o,1),0===t.paintCommands.length))break}return delete t.paintCommands,void ks(t)}if(n.length&&(Is(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return t.deleted=!0,Promise.all(o).then((()=>{++d.locks,re(e),ks(t),--d.locks,h()}))}re(t.htmlDomMeta),ks(t)}function ks(t){t.htmlDomMeta=[],delete t.contexts,t.deleted=!0}function Is(t,e,n){const o=t[0],r=o.tagJsVar.destroy(o,e);return o.deleted=!0,H(r)?n.push(r.then((()=>{if(t.length>1)return Is(t.slice(1,t.length),e,n)}))):(o.htmlDomMeta&&(re(o.htmlDomMeta),delete o.htmlDomMeta),t.length>1?Is(t.slice(1,t.length),e,n):void 0)}function Es(t,e,n){if(e.locked||!0===e.deleted)return;++e.updateCount;if(Ss(t,e))return Js(e,n),e.htmlDomMeta=[],delete e.deleted,void Yo(t,e,n,789);const o=e.contexts,r=t.contexts||[],s=e.tagJsVar.allListeners;if(t.allListeners.forEach(((t,e)=>{s[e][1].toCallback=t[1].toCallback})),o.length!==r.length)throw console.info("context mismatch",{value:t,context:e,conValues:o.map((t=>t.value)),vContexts:r,deleted:e.deleted}),new Error("super issue discovered");e.locked=79,o.forEach(((t,e)=>{t.tagJsVar.processUpdate(r[e],t,n)})),delete e.locked}function Ss(t,e){if(e.value===t)return 0;if(!t||"element"!==t.tagJsType)return 1;if(t.contentId!==e.value.contentId)return 1;return t.innerHTML.length!==e.value.innerHTML.length?1:0}function As(t,e,n,o,r){t.forEach((t=>{switch(typeof t){case"string":case"boolean":case"number":return Ms(t,o,r);case"function":{if("element"===t.tagJsType)break;const s=function(t,e,n,o,r){const s=[],c={updateCount:0,parentContext:n,contexts:s,target:e,value:t,htmlDomMeta:[],tagJsVar:{component:!1,tagJsType:"dynamic-text",hasValueChanged:()=>0,processInit:a,processInitAttribute:a,destroy:(t,e)=>{++c.updateCount,s.forEach((t=>t.tagJsVar.destroy(t,e)))},processUpdate:(t,e,n,o)=>{++c.updateCount,Nr(i);let r=t(i);const s=c.underFunction;delete c.underFunction,r instanceof Function&&!r.tagJsType&&(s&&r.toString()===s.toString()?r=i.value:(c.underFunction=r,r=r()));const a=i.tagJsVar.processUpdate(r,i,n,o);return i.value=r,e.value=t,$r(),a}},valueIndex:-1,withinOwnerElement:!0,destroy$:new Z,render$:new Z};Nr(c);let u=t();L(u)&&!u.tagJsType&&(c.underFunction=u,u=u());const i=Os(u,c,e,o,r);return n.contexts.push(c),$r(),i}(t,o,e,n,r);return s}}if(null==t)return Ms(t,o,r);if("element"!==t.tagJsType)return Os(t,e,o,n,r);{const s=Hs(t,e,n,e.contexts);u.push([r,[o,s]]);e.htmlDomMeta.push({nn:s.tagName,domElement:s,at:[]})}}))}function Os(t,e,n,o,r){const s=qt(t,0,!0,e);if(e.contexts.push(s),s.target=n,s.placeholder=document.createTextNode(""),u.push([r,[n,s.placeholder]]),Nr(s),s.inputsHandler){const t=o.propsConfig;s.inputsHandler(t)}return s.tagJsVar.processInit(t,s,o,s.placeholder),$r(),s}function Ms(t,e,n){const o=bt(t),r=document.createTextNode(o);return u.push([n,[e,r]]),r}function Hs(t,e,n,o){const r=document.createElement(t.tagName);return e.target=r,t.attributes.forEach((t=>{const e=t[0];"string"==typeof e&&(t[2]=vt(e,r.tagName))})),pn(t.attributes,[],r,n,e),As(t.innerHTML,e,n,r,y),t.listeners.forEach(((e,o)=>function(t,e,n,o,r){const s=(...o)=>{const r=t.listeners[e][1],s=N(n),a=s.context.updateCount;s.context.locked=1,++d.locks,Nr(s.context);const c=r(...o);--d.locks,delete s.context.locked,$r();return a===s.context.updateCount?We(c,s):(h(),H(c)?c.then((()=>(Ne([s.context.state.newest]),"promise-no-data-ever"))):"no-data-ever")};Ke(n.appSupport,o[0],r,s)}(t,o,n,e,r))),r}function Ls(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],e.locked=34;const r=Hs(t,e,n,e.contexts);delete e.locked;const s=[v,[o,r,"htmlTag.processInit"]];u.push(s),e.paintCommands=[s],f.push([()=>{delete e.paintCommands},[]]);const a={nn:t.tagName,domElement:r,at:t.attributes};return e.htmlDomMeta=[a],r}function Ps(t){const e=js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:Ls,destroy:Js,processUpdate:Es,hasValueChanged:Ss,tagName:t,innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:ps},ps);return e.tagName=t,e}function js(t,e){const n=(...t)=>{const e={...n};return e.attributes=[...n.attributes],e.listeners=[...n.listeners],e.allListeners=[...n.allListeners],t.length>0&&"object"==typeof t[0]&&null!==t[0]&&!Array.isArray(t[0])&&!t[0].tagJsType&&(!function(t,e){const n=Object.entries(e).reduce(((e,[n,o])=>n in ys?ys[n](t,o):ls(t,[n,o,!1,Ct])),t)}(e,t[0]),t.splice(0,1)),e.innerHTML=t,t.forEach((t=>{if(hs(t))return"element"===t.tagJsType?(e.allListeners.push(...t.allListeners),void(t.contexts&&(e.contexts?(e.contexts.push(...t.contexts),++e.contentId):(e.contexts=t.contexts,++e.contentId)))):void function(t,e){e.contexts||(e.contexts=[]);e.contexts.push(t)}(t,e)})),e};return Object.assign(n,t),Object.assign(n,ps(n)),n.attributes=[...t.attributes],n.listeners=[...t.listeners],n.allListeners=[...t.allListeners],n.toString=function(){return xs(this)},n}const Ds=function(){const t=js({component:!1,tagJsType:"element",processInitAttribute:a,processInit:Ns,destroy:$s,processUpdate:Es,hasValueChanged:Ss,tagName:"no-element",innerHTML:[],attributes:[],contentId:0,listeners:[],allListeners:[],elementFunctions:ps});return t.tagName="no-element",t}();function Ns(t,e,n,o){e.contexts=e.contexts||[],e.htmlDomMeta=[],As(t.innerHTML,e,n,o,v)}function $s(t,e){++t.updateCount;const n=t.contexts,o=[];if(n.length&&(Is(n,e,o),n.length=0,o.length)){const e=t.htmlDomMeta;return Promise.all(o).then((()=>{++d.locks,re(e),--d.locks,h()}))}}const Us=Ps("button"),Rs=Ps("select"),Ws=Ps("option"),_s=Ps("input"),Bs=Ps("textarea"),Fs=Ps("html"),zs=Ps("head"),Gs=Ps("title"),Ks=Ps("meta"),qs=Ps("link"),Zs=Ps("style"),Xs=Ps("body"),Ys=Ps("script"),Qs=Ps("noscript"),ta=Ps("hr"),ea=Ps("h1"),na=Ps("h2"),oa=Ps("h3"),ra=Ps("h4"),sa=Ps("h5"),aa=Ps("h6"),ca=Ps("ol"),ua=Ps("ul"),ia=Ps("li"),la=Ps("div"),pa=Ps("main"),fa=Ps("section"),da=Ps("header"),ga=Ps("footer"),ha=Ps("form"),ma=Ps("fieldset"),ba=Ps("legend"),va=Ps("dialog"),ya=Ps("pre"),xa=Ps("table"),wa=Ps("tr"),Ca=Ps("td"),Ta=Ps("th"),Va=Ps("thead"),Ja=Ps("tbody"),ka=Ps("tfoot"),Ia=Ps("iframe"),Ea=Ps("a"),Sa=Ps("u"),Aa=Ps("img"),Oa=Ps("br"),Ma=Ps("label"),Ha=Ps("p"),La=Ps("small"),Pa=Ps("span"),ja=Ps("strong"),Da=Ps("b"),Na=Ps("sup"),$a=Ps("nav"),Ua=Ps("figure"),Ra=Ps("figcaption"),Wa=Ps("code"),_a=Ps("canvas"),Ba=Ps("svg"),Fa=Ps("path"),za=Ps("polygon"),Ga=Ps("rect"),Ka=Ps("details"),qa=Ps("summary"),Za="3.1.10",Xa={tagElement:Wr,renderWithSupport:Ae,renderSupport:He,firstTagRender:Ee,reRenderTag:Ie,paint:h};var Ya=e.W9,Qa=e.cg,tc=e.m0,ec=e.rS,nc=e.Y2,oc=e.ei,rc=e.B7,sc=e.TU,ac=e.XF,cc=e.PC,uc=e.Ot,ic=e.Mj,lc=e.tD,pc=e.a,fc=e.Gf,dc=e.xe,gc=e.YO,hc=e.b,mc=e.rf,bc=e.br,vc=e.um,yc=e.x6,xc=e.E2,wc=e.OH,Cc=e.Ji,Tc=e.TB,Vc=e.Ii,Jc=e.mX,kc=e.yV,Ic=e.EI,Ec=e.aY,Sc=e.zV,Ac=e.pf,Oc=e.ze,Mc=e.Go,Hc=e.bD,Lc=e.WJ,Pc=e.wL,jc=e.Ng,Dc=e.O,Nc=e.zH,$c=e.r3,Uc=e.y4,Rc=e.Df,Wc=e.Ie,_c=e.lI,Bc=e.$F,Fc=e.vP,zc=e.hp,Gc=e.qr,Kc=e.ts,qc=e.Zd,Zc=e.B4,Xc=e.HD,Yc=e.Az,Qc=e.sV,tu=e.Ah,eu=e.f5,nu=e.Gk,ou=e.j_,ru=e.h1,su=e.h2,au=e.h3,cu=e.h4,uu=e.h5,iu=e.h6,lu=e.zC,pu=e.d5,fu=e.wx,du=e.cF,gu=e.Hc,hu=e.PB,mu=e.uq,bu=e.hr,vu=e.qy,yu=e.gx,xu=e.pU,wu=e._8,Cu=e.hF,Tu=e.cy,Vu=e.Tn,Ju=e.Gv,ku=e.yL,Iu=e.D8,Eu=e.Ze,Su=e._4,Au=e.mn,Ou=e.Pf,Mu=e.o1,Hu=e.z,Lu=e.li,Pu=e.nf,ju=e.iW,Du=e.mI,Nu=e.C$,$u=e.et,Uu=e.Vg,Ru=e.ol,Wu=e.sA,_u=e.TG,Bu=e.MG,Fu=e.PL,zu=e.uK,Gu=e.CG,Ku=e.p,qu=e.nI,Zu=e.Ae,Xu=e.Fs,Yu=e.n1,Qu=e.AS,ti=e.iv,ei=e.r5,ni=e.M$,oi=e.Pc,ri=e.uc,si=e.QB,ai=e.K$,ci=e.uW,ui=e.Lt,ii=e.Jv,li=e.TA,pi=e.Jn,fi=e.Ll,di=e.L6,gi=e.EX,hi=e.Ln,mi=e.wk,bi=e.xP,vi=e.ko,yi=e.iF,xi=e.bc,wi=e.B1,Ci=e.RX,Ti=e.Sx,Vi=e.lR,Ji=e.JW,ki=e.ag,Ii=e.tp,Ei=e.Tc,Si=e.Hf,Ai=e.zc,Oi=e._A,Mi=e.T_,Hi=e.td,Li=e.g0,Pi=e.pd,ji=e.th,Di=e.VQ,Ni=e.DD,$i=e.tr,Ui=e.u,Ri=e.ul,Wi=e.Ag,_i=e.gA,Bi=e.NU,Fi=e.rE,zi=e.wB,Gi=e.id,Ki=e.MC,qi=e.SZ;export{Ya as ArrayNoKeyError,Qa as BasicTypes,tc as ImmutableTypes,ec as PropWatches,nc as RouteQuery,oc as StateMismatchError,rc as Subject,sc as Subjective,ac as SyncCallbackError,cc as TagError,uc as ValueSubject,ic as ValueSubjective,lc as ValueTypes,pc as a,fc as addPaintRemoveAwait,dc as appElements,gc as array,hc as b,mc as body,bc as br,vc as buildBeforeElement,yc as button,xc as callback,wc as callbackMaker,Cc as canvas,Tc as checkArrayValueChange,Vc as checkSimpleValueChange,Jc as checkStillSubscription,kc as checkTagValueChange,Ic as checkTagValueChangeAndUpdate,Ec as code,Sc as combineLatest,Ac as createHtmlSupport,Oc as createTrigger,Mc as deepClone,Hc as deepEqual,Lc as defineValueOn,Pc as deleteContextSubContext,jc as deleteSimpleValue,Dc as destroySupport,Nc as details,$c as dialog,Uc as div,Rc as elementVarToHtmlString,Wc as empty,_c as fieldset,Bc as figcaption,Fc as figure,zc as firstTagRender,Gc as footer,Kc as forceUpdateExistingValue,qc as form,Zc as getBaseSupport,Xc as getContextInCycle,Yc as getDomMeta,Qc as getInnerHTML,tu as getNewGlobal,eu as getSupportOlderState,nu as getTemplaterResult,ou as guaranteeInsertBefore,ru as h1,su as h2,au as h3,cu as h4,uu as h5,iu as h6,lu as hasPropChanges,pu as head,fu as header,du as hmr,gu as host,hu as howToSetInputValue,mu as howToSetStandAloneAttr,bu as hr,vu as html,yu as htmlTag,xu as iframe,wu as img,Cu as input,Tu as isArray,Vu as isFunction,Ju as isObject,ku as isPromise,Iu as isSimpleType,Eu as isStaticTag,Su as isSubjectInstance,Au as isTagComponent,Ou as label,Mu as legend,Hu as letProp,Lu as li,Pu as link,ju as main,Du as meta,Nu as nav,$u as noElement,Uu as noscript,Ru as ol,Wu as onDestroy,_u as onFirstSubContext,Bu as onInit,Fu as oneRenderToSupport,zu as option,Gu as output,Ku as p,qu as paint,Zu as path,Xu as pipe,Yu as polygon,Qu as pre,ti as promise,ei as providers,ni as reRenderTag,oi as rect,ri as renderSupport,si as renderWithSupport,ai as script,ci as section,ui as select,ii as setBooleanAttribute,li as setNonFunctionInputValue,pi as setSimpleAttribute,fi as setUseMemory,di as signal,gi as small,hi as span,mi as state,bi as states,vi as strong,yi as style,xi as subject,wi as subscribe,Ci as subscribeWith,Ti as summary,Vi as sup,Ji as svg,ki as syncError,Ii as table,Ei as tag,Si as tagElement,Ai as tagValueUpdateHandler,Oi as tags,Mi as tbody,Hi as td,Li as textarea,Pi as tfoot,ji as th,Di as thead,Ni as title,$i as tr,Ui as u,Ri as ul,Wi as upgradeBaseToSupport,_i as valueToTagJsVar,Bi as variablePrefix,Fi as version,zi as watch,Gi as willCallback,Ki as willPromise,qi as willSubscribe};
|
|
2
2
|
//# sourceMappingURL=bundle.js.map
|