taggedjs 2.8.3 → 2.8.5
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/interpolations/attributes/processAttribute.function.d.ts +4 -4
- package/js/interpolations/attributes/processAttribute.function.js.map +1 -1
- package/js/interpolations/optimizers/attachDomElements.function.d.ts +4 -4
- package/js/interpolations/optimizers/attachDomElements.function.js +75 -55
- package/js/interpolations/optimizers/attachDomElements.function.js.map +1 -1
- package/js/interpolations/subscribeToTemplate.function.d.ts +1 -0
- package/js/interpolations/subscribeToTemplate.function.js +2 -1
- package/js/interpolations/subscribeToTemplate.function.js.map +1 -1
- package/js/state/watch.function.d.ts +1 -1
- package/js/state/watch.function.js.map +1 -1
- package/js/tag/Context.types.d.ts +1 -2
- package/js/tag/buildBeforeElement.function.d.ts +4 -4
- package/js/tag/buildBeforeElement.function.js +2 -2
- package/js/tag/buildBeforeElement.function.js.map +1 -1
- package/js/tag/checkDestroyPrevious.function.d.ts +0 -2
- package/js/tag/checkDestroyPrevious.function.js +1 -29
- package/js/tag/checkDestroyPrevious.function.js.map +1 -1
- package/js/tag/checkTagValueChange.function.d.ts +2 -0
- package/js/tag/checkTagValueChange.function.js +34 -0
- package/js/tag/checkTagValueChange.function.js.map +1 -0
- package/js/tag/destroySupport.function.js.map +1 -1
- package/js/tag/getChildTagsToDestroy.function.d.ts +3 -3
- package/js/tag/getChildTagsToDestroy.function.js.map +1 -1
- package/js/tag/getDomTag.function.d.ts +1 -0
- package/js/tag/getDomTag.function.js.map +1 -1
- package/js/tag/index.d.ts +1 -0
- package/js/tag/index.js +1 -0
- package/js/tag/index.js.map +1 -1
- package/js/tag/paint.function.d.ts +2 -0
- package/js/tag/paint.function.js +3 -1
- package/js/tag/paint.function.js.map +1 -1
- package/js/tag/processUpdateContext.function.d.ts +3 -3
- package/js/tag/processUpdateContext.function.js.map +1 -1
- package/js/tag/render/softDestroySupport.function.js.map +1 -1
- package/js/tag/tagElement.js +5 -1
- package/js/tag/tagElement.js.map +1 -1
- package/js/tag/update/processFirstSubjectValue.function.d.ts +1 -1
- package/js/tag/update/processFirstSubjectValue.function.js +57 -53
- package/js/tag/update/processFirstSubjectValue.function.js.map +1 -1
- package/js/tag/update/processNewSubjectTag.function.d.ts +1 -1
- package/js/tag/update/processNewSubjectTag.function.js +38 -10
- package/js/tag/update/processNewSubjectTag.function.js.map +1 -1
- package/js/tag/update/processNewValue.function.js +1 -1
- package/js/tag/update/processNewValue.function.js.map +1 -1
- package/js/tag/update/processTag.function.js +1 -1
- package/js/tag/update/processTag.function.js.map +1 -1
- package/js/tag/update/processTagArray.js +1 -1
- package/js/tag/update/processTagArray.js.map +1 -1
- package/js/tag/update/processTagResult.function.js.map +1 -1
- package/js/tag/update/updateExistingValue.function.d.ts +8 -1
- package/js/tag/update/updateExistingValue.function.js +66 -53
- package/js/tag/update/updateExistingValue.function.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 r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=0,t.global={}}t.d(e,{W9:()=>X,cg:()=>c,m0:()=>s,rS:()=>vt,Y2:()=>r,ei:()=>q,B7:()=>C,TU:()=>j,XF:()=>Q,PC:()=>Z,Ot:()=>k,Mj:()=>T,tD:()=>a,j8:()=>de,um:()=>fe,E2:()=>cn,OH:()=>un,TB:()=>Re,Ii:()=>_e,yV:()=>Me,zV:()=>v,ze:()=>an,WJ:()=>S,aZ:()=>Ie,O:()=>xe,Ie:()=>o,B4:()=>pt,Az:()=>Ln,Xi:()=>mn,pc:()=>dt,Ah:()=>n,ck:()=>bn,k6:()=>gt,Gk:()=>nt,cF:()=>Gn,PB:()=>Mt,qy:()=>$n,cy:()=>m,Tn:()=>h,Gv:()=>b,yL:()=>g,D8:()=>l,Ze:()=>p,_4:()=>d,mn:()=>f,Eb:()=>bt,z:()=>z,sA:()=>fn,MG:()=>pn,PL:()=>De,nI:()=>Rt,PZ:()=>Fe,N_:()=>ze,r5:()=>G,uc:()=>rn,pG:()=>He,QB:()=>Ke,R6:()=>Fn,Ll:()=>M,vP:()=>u,wk:()=>O,xP:()=>F,bc:()=>U,ag:()=>ln,Tc:()=>yt,Hf:()=>Hn,_A:()=>rt,Ag:()=>ft,NU:()=>gn,hW:()=>hn,wB:()=>L,id:()=>E,MC:()=>A,zC:()=>x});class r{get(t){return"todo"}}const o="";var s,c;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(s||(s={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(c||(c={}));const a={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",subject:"subject",tagJsSubject:"tagJsSubject",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function u(t){return dn()?O((()=>i(t))):i(t)}function i(t){let e=t;const n=new Set;return{get value(){return e},set value(t){e!==t&&(e=t,n.forEach((e=>e(t))))},subscribe(t){t(e),n.add(t);const r=()=>n.delete(t);return r.unsubscribe=r,r}}}function l(t){switch(t){case s.string:case s.number:case s.boolean:return!0}return!1}function p(t){if(!t)return!1;switch(t.tagJsType){case a.dom:case a.tag:case a.templater:return!0}return!1}function f(t){const e=t?.tagJsType;return e===a.tagComponent||e===a.stateRender}function d(t){return b(t)&&typeof t.subscribe===c.function}function g(t){return t&&h(t.then)}function h(t){return typeof t===c.function}function b(t){return typeof t===c.object&&null!==t}function m(t){return Array.isArray(t)}function v(t){const e=new C;return e.subscribeWith=e=>{const n=[],r=[],o=(o,s)=>{n[s]=!0,r[s]=o;if(n.length===t.length){for(const t of n)if(!t)return;e(r,c)}},s=[...t],c=s.shift().subscribe((t=>o(t,0))),a=s.map(((t,e)=>t.subscribe((t=>o(t,e+1)))));return c.subscriptions=a,c},e}function y(t,e,n){const r=C.globalSubCount$;C.globalSubCount$.next(r.value+1);const o=function(){o.unsubscribe()};return o.callback=e,o.subscriptions=[],o.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 r=C.globalSubCount$;C.globalSubCount$.next(r.value-1),t.unsubscribe=()=>t;const o=t.subscriptions;for(const t of o)t.unsubscribe();return t}(o,n,e)},o.add=t=>(o.subscriptions.push(t),o),o.next=t=>{e(t,o)},o}function w(t,e,n){const r=[...e],o=r.shift(),s=t=>{if(r.length)return w(t,r,n);n(t)};let c=s;const a=o(t,{setHandler:t=>c=t,next:s});c(a)}class C{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=y(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{w(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,r)=>{const o=r?.unsubscribe;o?o():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new C(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return v(t.map((t=>{if(d(t))return t;return new C(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new C(0)}class j extends C{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,S(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 S(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}class k extends C{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class T extends C{value;constructor(t){super(t),this.value=t,this._value=t,S(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function E(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function A(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const x=t=>(e,n)=>{n.setHandler((()=>{}));const r=t(e).subscribe((t=>{r.unsubscribe(),n.next(t)}))};function O(t){return M.stateConfig.handlers.handler(t)}function P(t){const e=M.stateConfig;e.states[e.statesIndex]=t;return e.support.states[e.statesIndex]=t,++e.statesIndex,t(((...t)=>(O(t),t)))}function V(t){const e=M.stateConfig,n=e.support,r=e.statesIndex,o=e.prevSupport,s=o?.states[r],c=[];s(((...t)=>(c.push(t),t)));let a=0;return n.states[e.statesIndex]=t,++e.statesIndex,t(((...t)=>{e.stateArray.push({get:()=>t,defaultValue:t});const n=c[a];return++a,n}))}function J(t,e){e.handlers.handler=_,e.handlers.statesHandler=P,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,e.support=t}function W(t,e,n,r){e.rearray=n,e.stateArray=[],e.states=r,e.statesIndex=0,e.handlers.handler=I,e.handlers.statesHandler=V,e.support=t}class N{}function R(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const e=t(N),[n]=e,[r]=t(n);return[n,r]}(e);return n}function I(){const t=M.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function _(t){const e=M.stateConfig;let n=t;if(typeof t===c.function&&(n=t()),typeof n===c.function){const t=n;n=function(...e){return t(...e)},n.original=t}const r={get:function(){return R(r)},defaultValue:n};return e.stateArray.push(r),n}const M={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:_,statesHandler:P}}};function D(t,e,n,r){for(let n=t.length-1;n>=0;--n){const r=t[n].get(),o=e[n].callback;o&&o(r)}for(let t=r.length-1;t>=0;--t){const e=[],o=(...t)=>(e.push(t),t);r[t](o);let s=0;const c=t=>e[s++];n[t](c)}}const L=(t,e)=>B(t,e),$=t=>t;const B=(t,e,{init:n,before:r,final:o=$}={})=>{const s=O({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(r&&!r(t))return s.values=t,s.pastResult;const a=(n||e)(t,c);return s.pastResult=o(a),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(r&&!r(t))return s.values=t,s.pastResult;const a=e(t,c);return s.pastResult=o(a),c.length=0,c.push(...t),s.pastResult};function H(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=O((()=>dn())),r=O((()=>new k(void 0))),o=O((()=>({stateArray:M.stateConfig.stateArray,states:M.stateConfig.states}))),s=(t,s)=>(B(t,((t,e)=>{const c=dn(),a=s(t,e);if(c!==n){const t=o.stateArray,e=n.subject.global.oldest;D(t,e.state,o.states,e.states)}r.next(a)}),e.setup),r);return s.setup=e.setup,H((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function U(t,e){return dn()?O((()=>new C(t))):new C(t)}function F(t){return M.stateConfig.handlers.statesHandler(t)}function z(t){const e=u([]),n=u(0),r=u(0);let o=[],s=0;return r.value=n.value,t(((...t)=>(o=t,t))),L(o,(()=>{++s,e.value=o,t((()=>o))})),F((()=>{if(s)return t(((...t)=>(e.value=t,n!=r?e.value:t))),r.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}H((()=>function(t){const e=(e,n)=>B(e,n,t);return e.setup=t,H((()=>e),e),e}({})),L),U._value=t=>{const e=O((function(){return{stateArray:M.stateConfig.stateArray,states:M.stateConfig.states}})),n=dn();return O((function(){return new k(t).pipe((t=>(D(n.state,e.stateArray,n.states,e.states),t)))}))},U.all=function(t){const e=O((()=>({stateArray:M.stateConfig.stateArray,states:M.stateConfig.states}))),n=dn();return C.all(t).pipe((t=>(D(n.state,e.stateArray,n.states,e.states),t)))};const G={create:t=>{const e=O((()=>({stateDiff:0,provider:void 0})));if(e.stateDiff){let t=e.stateDiff;for(;t--;)O(void 0);return O(void 0)}const n=O((()=>{const n=M.stateConfig,r=n.stateArray.length,o=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-r,a={constructMethod:t,instance:o,stateDiff:c,owner:s,children:[]};e.provider=a;const u=s.subject.global;return(u.providers=u.providers||[]).push(a),e.stateDiff=c,o})),r=t,o=r.compareTo=r.toString();return e.provider.constructMethod.compareTo=o,n},inject:t=>O((()=>{const e=t,n=e.compareTo=e.compareTo||t.toString(),r=dn(),o=[];let s={ownerSupport:r.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.subject.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{o.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=r.subject.global;return(t.providers=t.providers||[]).push(e),e.children.push(r),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,o),new Error(c)}))};class Z extends Error{details;constructor(t,e,n={}){super(t),this.name=Z.name,this.details={...n,errorCode:e}}}class X extends Z{constructor(t,e){super(t,"array-no-key-error",e),this.name=X.name}}class q extends Z{constructor(t,e){super(t,"state-mismatch-error",e),this.name=q.name}}class Q extends Z{constructor(t,e){super(t,"sync-callback-error",e),this.name=Q.name}}function Y(t,e){return K(t,e)}function K(t,e){if(null===t||typeof t!==c.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=m(t)?[]:Object.create(Object.getPrototypeOf(t));if(m(t))for(let r=0;r<t.length;r++)n[r]=K(t[r],e-1);else for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=K(t[r],e-1));return n}function tt(t,e,n){return et(t,e,n)}function et(t,e,n){return!(t!==e&&(r=t,o=e,!h(r)||!h(o)||r.toString()!==o.toString()))||(n<0||typeof t===c.object&&typeof e===c.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():m(t)&&m(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!et(t[r],e[r],n-1))return!1;return!0}(t,e,n-1):!m(t)&&!m(e)&&function(t,e,n){const r=Object.keys(t),o=Object.keys(e);if(0===r.length&&0===o.length)return!0;if(r.length!==o.length)return!1;for(const s of r){if(!o.includes(s)||!et(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var r,o}function nt(t,e){const n={propWatch:t,props:e,tagJsType:a.templater,key:function(t){return n.arrayValue=t,n}};return n}const rt=[];function ot(t,e,n){return t.map((t=>function(t,e,n,r){if(p(t)||!t)return t;if(!e)return t;return st(t,e,n,r)}(t,e.ownerSupport,e,n)))}function st(t,e,n,r){if(!t)return t;if(t.tagJsType)return t;if(typeof t===c.function)return function(t,e){const n=t.mem;if(n)return t;const r=function(...t){return r.toCall(...t)};return r.original=t,r.mem=t,r.toCall=function(...t){return function(t,e,n){const r=n.subject.global,o=r?.newest||n,s=void 0===dn(),c=t(...e),a=function(){const t=o.subject.global;if(!1===s){if(!0===t.locked)return c}return function(t,e){const n=t.subject,r=nn(t.templater);if(r){return on(e,t)}const o=n.global;o.locked=!0,en(o.newest,t,e,n),delete o.locked}(o,n),c};if(s)return a();return M.tagClosed$.toCallback(a),c}(r.mem,t,e)},Object.assign(r,t),r}(t,e);if(r===Tt)return t;return at(t)?t:m(t)?function(t,e,n,r){for(let o=t.length-1;o>=0;--o){const s=t[o];if(t[o]=st(s,n,e,r+1),typeof s===c.function){if(s.mem)continue;ct(r+1,o,s,t,e)}}return t}(t,n,e,r):function(t,e,n,r){const o=Object.keys(t);for(const s of o){const o=t[s],a=st(o,n,e,r+1);if(t[s]===a)continue;const u=Object.getOwnPropertyDescriptor(t,s);if(!(u?.get||u?.set)&&(t[s]=a,typeof a===c.function)){if(o.mem)continue;ct(r+1,s,o,t,e)}}return t}(t,n,e,r)}function ct(t,e,n,r,o){if(t>0){const t=o.subject.global;r[e].subscription=t.destroy$.toCallback((function(){r[e]=n}))}}function at(t){return typeof t!==c.object||!t||t.tagJsType}function ut(t,e,n,r){const o=e.original;let s;t.tagJsType===a.stateRender?s=t():(s=o(...r),typeof s===c.function&&(s=s())),s.templater=t,t.tag=s;const u=M.stateConfig;return n.state=u.stateArray,n.states=u.states,n}function it(t){return t.map(lt)}function lt(t,e){const n=t,r=t?.tagJsType;if(r)switch(r){case a.stateRender:return;case a.dom:case a.tag:case a.templater:return it(n.values)}return m(t)?it(n):Y(t,e)}function pt(t,e,n){const r={templater:t,subject:e,castedProps:n,appSupport:void 0},o=e.global;return o.blocked=[],o.destroy$=new C,r}function ft(t,e,n,r){e.state=[],e.states=[],e.appSupport=n;const o=t.props;return o&&(e.propsConfig=function(t,e,n){const r=t.templater;if(r.tagJsType!==a.stateRender){switch(r.propWatch){case vt.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case vt.SHALLOW:return t.propsConfig={latest:e.map((t=>lt(t,kt))),castProps:n}}return t.propsConfig={latest:e.map((t=>lt(t,Tt))),castProps:n}}}(e,o,r)),e}function dt(t,e,n,r,o){const s={templater:t,subject:r,castedProps:o,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function gt(t,e,n,r,o){const s=pt(t,r,o);return s.ownerSupport=e,ft(t,s,n,o)}function ht(t,e,n){const r=t.propWatch===vt.DEEP?Tt:kt,o=t.props,s=e.propsConfig;let c=s.castProps;const a=n?.propsConfig,u=a?.castProps;u&&(s.castProps=u,c=Xe(e,n,n.ownerSupport,o,r));return c||ot(o,e,0)}function bt(t){return{set html(e){e.arrayValue=t}}}let mt=0;var vt;function yt(t,e=vt.SHALLOW){const n=function(...r){const o=nt(e,r);o.tagJsType=a.tagComponent;const s=function(t,e){return function(n,r,o){const s=ht(t,n,o),c=n.ownerSupport,a=gt(t,c,n.appSupport,r,s);return ut(t,e,a,s)}}(o,n);return s.original=t,o.wrapper=s,o},r=t;return n.original=t,r.tags=rt,r.setUse=M,r.ValueTypes=a,r.tagIndex=mt++,rt.push(n),n}function wt(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")}function Ct(t,e){const n=function(t,e,n){const r=sn(t,e);if(r)return 11;switch(n){case vt.NONE:return 1;case vt.SHALLOW:return St(t,e);case vt.IMMUTABLE:return jt(t,e)}return function(t,e){let n=t,r=e;n=[...t],r=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,r){const o=r[e];if(typeof t===c.object){const e={...t},n={...o||{}},r=Object.entries(e).every((([t,r])=>Et(r,n[t],(()=>{delete e[t],delete n[t]}))));return r}return Et(t,o,(()=>{n.splice(e,1),r.splice(e,1)}))}(t,e,n,r))))return 7;return!1}(t,e)}(e.props,t.propsConfig.latest,t.templater.propWatch);return n}function jt(t,e){const n=t.length;for(let r=0;r<n;++r){if(t[r]!==e[r])return 2}return!1}function St(t,e){const n=t.length;for(let r=0;r<n;++r){const n=t[r],o=e[r];if(m(n)&&m(o)){if(n===o)continue;return 3}if(typeof n!==c.function||typeof o!==c.function)if(typeof n!==c.object){if(n!==o)return 3.3}else if(typeof e===c.object){const t=Object.entries(n);for(const e of t){if(!At(e,o))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(vt||(vt={})),yt.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},yt.state=wt,yt.use=wt,yt.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`` `")},yt.key=bt,yt.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`` `")},yt.deepPropWatch=yt,yt.immutableProps=function(t){return yt(t,vt.IMMUTABLE)},yt.watchProps=function(t){return yt(t,vt.SHALLOW)},Object.defineProperty(yt,"renderOnce",{set(t){t.tagJsType=a.renderOnce}}),Object.defineProperty(yt,"state",{set(t){t.original={setUse:M,tags:rt},t.tagJsType=a.stateRender}}),Object.defineProperty(yt,"use",{set(t){t.original={setUse:M,tags:rt},t.tagJsType=a.stateRender}});const kt=3,Tt=10;function Et(t,e,n){if(typeof t!==c.function)return!!tt(t,e,Tt)&&4;if(typeof e!==c.function)return!1;const r=e?.original;r&&(e=r);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function At([t,e],n){const r=n[t];return typeof e===c.function&&typeof r===c.function||r===e}let xt=[],Ot=[],Pt=[],Vt=[],Jt=[],Wt=[];const Nt={locks:0};function Rt(){if(!(Nt.locks>0)){++Nt.locks;for(const t of xt){t.parentNode.removeChild(t)}for(const t of Ot)t();for(const[t,e]of Pt)e.textContent=t;for(const t of Vt)t.relative.appendChild(t.element);for(const{element:t,relative:e}of Jt)e.parentNode.insertBefore(t,e);for(const t of Wt)t();xt=[],Ot=[],Vt=[],Jt=[],Wt=[],Pt=[],--Nt.locks}}function It(t,e){const n=document.createTextNode(t);return Jt.push({element:n,relative:e}),n}function _t(t){switch(t){case void 0:case!1:case null:return o}return t}function Mt(t,e,n){Ot.push((()=>{void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}))}function Dt(t,e,n,r,o,s){switch(r){case"init":{const t=s.added;return void Wt.push((()=>{e({target:n,stagger:t})}))}case"destroy":{const t=++s.removed,r=o.subject.global;return r.destroys=r.destroys||[],void r.destroys.push((()=>e({target:n,stagger:t})))}case"autofocus":return void Wt.push((()=>n.focus()));case"autoselect":return void Wt.push((()=>n.select()));case"style":{const r=t.split(".");return void Ot.push((()=>n.style[r[1]]=e))}case"class":return void function(t,e,n){const r=t.split(".");if(r.shift(),e){for(const t of r)Ot.push((()=>n.classList.add(t)));return}for(const t of r)Ot.push((()=>n.classList.remove(t)))}(t,e,n)}throw new Error(`Invalid special attribute of ${r}. ${t}`)}function Lt(t,e){const n=function(t,e,n=[]){const r=t.subject;n.push({support:t,renderCount:r.renderCount,provider:e});const o=e.children;for(let t=o.length-1;t>=0;--t){const r=o[t],s=r.subject;n.push({support:r,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function $t(t,e=[]){const n=t.subject.global,r=nn(t.templater),o=t.ownerSupport;if(n.locked)return e.push(t),e;if(r)return $t(o,e);const s=t,c=f(s.templater),u=t.templater.tagJsType,i=o&&u!==a.stateRender&&(!c||function(t,e,n){const r=function(t,e){const n=t.props,r=e.propsConfig,o=r.latest;if(sn(n,o))return!0;switch(t.propWatch){case vt.IMMUTABLE:return jt(n,o);case vt.SHALLOW:return St(n,o)}return!tt(n,o,Tt)}(e,n);if(t&&r)return!0;return!1}(o,s.templater,s)),l=function(t){const e=t.subject.global.providers;if(!e)return[];const n=[];for(const t of e){const e=Lt(t.owner,t);n.push(...e.map((t=>t.support)))}return n}(s);return e.push(...l),i?($t(o,e),c&&e.push(s),e):(e.push(s),e)}function Bt(t){++Nt.locks,t.forEach(Ht),--Nt.locks,Rt()}function Ht(t){const e=t.subject.global;e&&rn(e.newest)}const Ut="no-data-ever",Ft="promise-no-data-ever";function zt(t,e){const n=e.subject.global,r=function(t,e){if(!0!==n.deleted)return function(t,e,n,r){let o=e;for(;o.ownerSupport&&!f(o.templater);)o=o.ownerSupport;const s=o.subject.global;s.locked=!0;const c=t.apply(n,r);return function(t,e){const n=e.subject.global;return delete n.locked,function(t,e,n){return Bt($t(t)),function(t,e,n){if(g(t)){return e.subject.global.locked=!0,t.then((()=>{if(!0===n.deleted)return Ft;delete e.subject.global.locked;return Bt($t(e)),Ft}))}return Ut}(e,t,n)}(e,t,n)}(c,o)}(r.tagFunction,r.support,t,e)};return r.tagFunction=t,r.support=e,r}const Gt=["init","destroy"];function Zt(t,e,n,r,o,s,c){if(c)return Dt(t,e,n,c,s,o);r(n,t,e)}function Xt(t,e,n,r){const o=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.subject.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,qt(t,s,t.target)};c[e]=t,o.addEventListener(e,t)}n[s]=r,n[e]=r}function qt(t,e,n){const r=n[e];if(r){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},r(t),t.defaultPrevented||e)return}const o=n.parentNode;o&&qt(t,e,o)}function Qt(t,e,n,r){const o=function(...e){return o.tagFunction(t,e)};o.tagFunction=e,o.support=n,Xt(n.appSupport,r,t,o)}function Yt(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus";case"oninit":case"init":return"oninit";case"ondestroy":case"destroy":return"destroy"}return!1}(t);return!1!==e||!!t.startsWith("style.")&&"style"}const Kt={added:0,removed:0};function te(t,e,n,r){if(n.isNameOnly)return function(t,e,n,r,o,s,a,u){if(n){if(ae(e))return void r.removeAttribute(n);if(typeof n===c.object){if(typeof e===c.object)for(const t in n)t in e||Ot.push((function(){r.removeAttribute(t)}));else for(const t in n)Ot.push((function(){r.removeAttribute(t)}))}}ne(t,e,r,o,s,a,u)}(t,e,n.value,n.element,r,n.howToSet,[],Kt),void(n.value=e);const o=n.element;re(e,n.attrName,n,o,r,n.howToSet,n.isSpecial,Kt),n.value=e}function ee(t,e,n,r,o,s,a,u,i){const l=ce(e);if(l>=0){const e=t[l],c=de(e,s,!0);return c.isAttr=!0,c.element=n,c.howToSet=o,c.isNameOnly=!0,c.handler=(t,e)=>te(e,t,c,r),void ne(t,e,n,r,o,s,u)}const p=ce(i);if(p>=0){const i=t[p],l={isAttr:!0,element:n,attrName:e,checkValueChange:_e,withinOwnerElement:!0};s.push(l);return d(l.value)?function(t,e,n,r,o,s,c){s&&Ot.push((function(){n.removeAttribute(t)}));const a=e.value;if(d(a)){e.handler=ue;const u=function(a){re(a,t,e,n,r,o,s,c)},i=a.subscribe(u),l=e.global;(l.subscriptions=l.subscriptions||[]).push(i)}return void re(e.value,t,e,n,r,o,s,c)}(e,l,n,r,o,a,u):(l.handler=(t,e)=>te(e,t,l,r),function(t,e,n,r,o,s,a,u){n.attrName=t,n.element=r,n.howToSet=o,typeof e===c.function?u&&Gt.includes(t)?Dt(t,e,r,t,s,a):se(n,e,s,t,r):(n.attrName=t,n.element=r,n.howToSet=o,n.isSpecial=u,Zt(t,e,r,o,a,s,u))}(e,i,l,n,o,r,u,a),void(l.value=i))}return Zt(e,i,n,o,u,r,a)}function ne(t,e,n,r,s,a,u){if(!ae(e))if(typeof e!==c.object)0!==e.length&&s(n,e,o);else for(const o in e){const c=e[o];ee(t,o,n,r,s,a,Yt(o),u,c)}}function re(t,e,n,r,o,s,c,u){return h(t)?function(t,e,n,r,o,s,c,u){const i=t.templater.wrapper;if((i?.tagJsType||i?.original?.tagJsType)!==a.renderOnce)return se(c,e,t,r,n);return oe(e,n,r,o,s,t,u)}(o,t,r,e,c,s,n,u):oe(t,r,e,c,s,o,u)}function oe(t,e,n,r,o,s,c){if(!1===r){switch(t){case void 0:case!1:case null:return void Ot.push((function(){e.removeAttribute(n)}))}if(h(t))return Qt(e,t,s,n);o(e,n,t)}else Dt(n,t,e,r,s,c)}function se(t,e,n,r,o){const s=t.value;return s&&s.tagFunction&&s.support?(s.tagFunction=e,s.support=n,s):Qt(o,e=zt(e,n),n,r)}function ce(t){return b(t)&&"tagJsVar"in t?t.tagJsVar:-1}function ae(t){return null==t||!1===t}const ue=()=>{},ie="object"==typeof document&&document.createElement("div");function le(t,e,n,r,o,s,c,a,u=[]){const i=[];for(const l of t){const t={};i.push(t);const p=l.v;if(!isNaN(p)){pe(e,o,c,n,u,r,s);continue}if("text"===l.nn){const n=t,r=n.tc=l.tc;ie.innerHTML=r;const s=n.domElement=document.createTextNode(ie.innerText);s.id=`tp_${o.length}_${e.length}`,c?Vt.push({element:s,relative:c}):Jt.push({element:s,relative:a});continue}const f=t.domElement=document.createElement(l.nn);l.at&&l.at.map((t=>{const s=t[0],c=t[1],a=t[2]||!1;ee(e,s,f,n,Mt,o,a,r,c)})),c?Vt.push({element:f,relative:c}):Jt.push({element:f,relative:a}),l.ch&&(t.ch=le(l.ch,e,n,r,o,s+1,f,a,u).dom)}return{subs:u,dom:i,context:o}}function pe(t,e,n,r,s,c,a){const u=t[e.length],i=document.createTextNode(o);i.id=`dvp_${e.length}_${t.length}`;const l=de(u,e,a>0);if(l.placeholder=i,n?Vt.push({relative:n,element:i}):Jt.push({element:i,relative:r.subject.placeholder}),d(u))return s.push({insertBefore:i,appendTo:n,subject:u,support:r,counts:c,contextItem:l}),void(l.handler=ue);l.handler=(t,e,n,r)=>we(r,t,n);r.subject.global.locked=!0,Fe(u,l,r,c,`rvp_${e.length}_${t.length}`,n);delete r.subject.global.locked,l.value=u}function fe(t,e,n,r){const o=t.subject.global;o.oldest=t,o.newest=t,++Nt.locks;const s=function(t,e,n,r){const o=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===a.dom)return n.dom;return Ln(n.strings,n.values)}(t),s=t.templater.tag,c=s.values,u=[],i=t.subject.global;i.context=u;const l=le(o,c,t,e,u,0,n,r);return l}(t,e,n,r);return o.htmlDomMeta=s.dom,--Nt.locks,s}function de(t,e,n){const r={value:t,checkValueChange:_e,withinOwnerElement:n};return e.push(r),r}function ge(t,e,n){const r=e.global.newest;r.ownerSupport=t,e.checkValueChange=Me;const o=fe(r,n,void 0,e.placeholder);for(const t of o.subs)Ge(t);return r}function he(){return{tagJsType:a.templater}}function be(t,e,n){const r=dt(t,e,e.appSupport,n);return n.global.context=[],r}function me(t,e,n,r){const o=t[e],s=n[e];if(o===s.value)return;(0,s.handler)(o,t,r,s),s.value=o}function ve(t,e){const n=t.subject.global.context;!function(t,e){const n=e.templater.tag||e.templater,r=e.templater.values||n.values,o=t.templater.tag;o.values=r}(t,e),++Nt.locks,function(t,e){const n=t.templater.tag.values;let r=0;const o=n.length;for(;r<o;)me(n,r,e,t),++r}(t,n),--Nt.locks,Rt()}const ye={added:0,removed:0};function we(t,e,r){if(e===t.value)return;const o=t.checkValueChange(e,t);if(-1===o)return;const s=e&&e.tagJsType;if(s){if(s===a.renderOnce)return;if(f(e))return t.global||n(t),void function(t,e,r){const o=e.global;if(!o.newest)return void Ze(t,e,r,{added:0,removed:0});const s=gt(t,r,r.appSupport,e);!function(t,e,r){const o=r.global,s=o.newest,c=s.templater.wrapper,u=e.templater.wrapper;let i=!1;const l=e.templater.tagJsType,p=a.stateRender===l||a.renderOnce===l;if(p)i=e.templater.tagJsType===a.renderOnce||Ne(s,e);else if(c&&u){i=c.original===u.original}const f=e.templater;if(!i)return void function(t,e,r){const o=t.global,s=o.oldest;xe(s),n(t);const c=Ze(e,t,r,{added:0,removed:0})}(r,f,t);const d=p||Ct(s,f);if(!d){return void function(t,e,n,r,o){const s=t.props,c=Xe(e,n,r,s,o),a=e.propsConfig;a.castProps=c;const u=n.propsConfig;u.latest=a.latest}(f,e,s,t,f.propWatch===vt.DEEP?Tt:kt)}if(o.locked)return void o.blocked.push(e);rn(e)}(r,s,e)}(e,t,r)}const u=t.global;if(u){const n=u.newest;if(n)return void function(t,e,n,r){if(typeof n===c.function)return;!function(t,e,n,r){const o=n.templater||n,s=gt(o,r,r.appSupport,e),c=t.subject.global;ve(c.oldest,s)}(t,e,n,r)}(n,t,e,r)}if(s)switch(s){case a.templater:return void ge(r,t,ye);case a.tag:case a.dom:{const o=e;let s=o.templater;s||(s=he(),o.templater=s,s.tag=o);return(t.global?t.global:n(t)).newest=be(s,r,t),void ge(r,t,ye)}}m(e)?Oe(t,e,r,{added:0,removed:0}):typeof e!==c.function?o&&function(t,e){e.checkValueChange=_e;const n=e.placeholder,r=_t(t);e.simpleValueElm=It(r,n)}(e,t):t.value=e}function Ce(t,e,r){r.checkValueChange=Me;const o=t;let s=o.templater;s||(s=nt(vt.DEEP),s.tag=o,o.templater=s);const c=r.global=n(r),a=c.newest=gt(s,e,e.appSupport,r);return c.oldest=a,r}function je(t){const e=t.subject.global,n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].subject.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.subject.renderCount=0}function Se(t){for(const e of t){const t=e.lastArray;if(t){Se(t);continue}const n=e.global;if(!n)continue;const r=n.newest,o=n.subscriptions;o&&o.forEach((t=>t.unsubscribe())),f(r.templater)&&je(r);Se(n.context)}}function ke(t,e=[],n=[]){for(const r of t){const t=r.global;if(!t)continue;const o=t.newest;if(o){e.push(o);const r=t.subscriptions;r&&n.push(...r)}const s=t.context;s&&ke(s,e,n)}return{tags:e,subs:n}}function Te(t,e){const n=t.subject.global,r=n.htmlDomMeta,o=n.context;n.deleted=!0;const s=n.destroys;if(s)return function(t,e,n,r){const o=[];if(t.forEach((t=>{const e=t();e instanceof Promise&&o.push(e)})),o.length){const t=Promise.all(o).then((()=>{Ee(e,n),Ae(r),Rt()}));return void n.push(t)}Ee(e,n),Ae(r),Rt()}(s,o,e,r);Ee(o,e),Ae(r)}function Ee(t,e){for(const n of t){if(n.withinOwnerElement)continue;const t=n.lastArray;if(t){Ie(n,t);continue}const r=n.simpleValueElm;if(r){delete n.simpleValueElm,xt.push(r);continue}const o=n.global;if(void 0===o)continue;if(!0===o.deleted)continue;o.deleted=!0;const s=o.oldest;s&&Te(s,e)}}function Ae(t){t.forEach((t=>{const e=t.marker;e&&xt.push(e);const n=t.domElement;n&&xt.push(n)}))}function xe(t){const e=t.subject.global;e.deleted=!0,t.subject.renderCount=0;const n=[];return Se(e.context),e.destroy$&&je(t),Te(t,n),n}function Oe(t,e,n,r,o){t.lastArray||(t.lastArray=[]);const s=t.lastArray;let c=t.placeholder,a=0;const u=[];for(let t=0;t<s.length;++t){const n=s[t],o=We(n,e,t,s,a,r);0!==o?(a+=o,2===o&&(t-=1)):u.push(n)}t.lastArray=u;const i=o,l=e.length;for(let t=0;t<l;++t){c=Pe(e,t,u,n,c,r,i).placeholder}}function Pe(t,e,n,r,o,s,c){const a=t[e],u=n[e];return u?function(t,e,n,r,o,s,c,a){const u=n.length>o;if(u)return we(e,t,r),e;const i=Ve(t,s,r,c,n,a);return i}(a,u,n,r,e,o,s,c):Ve(a,o,r,s,n,c)}function Ve(t,e,n,r,o,s){const c={value:t,checkValueChange:_e,withinOwnerElement:!1};r.added=r.added+1;const u=document.createTextNode("");return c.placeholder=u,s||Jt.push({element:u,relative:e}),function(t,e,n){const r=t.tagJsType;if(r)switch(r){case a.templater:Ce(t.tag,e,n);break;case a.tag:case a.dom:Ce(t,e,n)}}(t,n,c),Fe(t,c,n,r,`rvp_${o.length}_array`,s),c.value=t,o.push(c),s&&Vt.push({element:u,relative:s}),c}function Je(t,e){const n=t.global;if(n){const t=n.oldest;n.deleted=!0,xe(t),n.deleted=!0}else{const e=t.simpleValueElm;delete t.simpleValueElm,xt.push(e)}++e.removed}function We(t,e,n,r,o,s){const c=e.length-1,a=n-o,u=a<0||c<a,i=r[n];return u?(Je(i,s),++o,1):r[n].value.arrayValue!==e[n].arrayValue?(Je(i,s),r.splice(n,1),++o,2):0}function Ne(t,e){const n=t.templater,r=e.templater,o=n?.tag||t,s=r.tag;if(n?.tagJsType===a.stateRender)return n.dom===r.dom;switch(o.tagJsType){case a.dom:return s?.tagJsType===a.dom&&function(t,e){const n=t.dom,r=e.dom;return n===r}(o,s);case a.tag:{const n=function(t,e,n,r){const o=t.strings,s=e.strings;if(o.length!==s.length)return!1;if(!o.every(((t,e)=>s[e].length===t.length)))return!1;const a=n.templater.values||t.values,u=r.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const r=e.every(((e,n)=>{const r=t[n];if(typeof e===c.function&&typeof r===c.function){return!!(e.toString()===r.toString())}return!0}));if(r)return!0;return!1}(a,u)}(o,s,t,e);return n}}throw new Error(`unknown tagJsType of ${o.tagJsType}`)}function Re(t,e){if(!m(t)){return Ie(e,e.lastArray),9}return!1}function Ie(t,e){const n={added:0,removed:0};for(let t=0;t<e.length;++t)Je(e[t],n);delete t.lastArray}function _e(t,e){if(null==t||typeof t!==c.object)return function(t,e){const n=_t(t),r=e.simpleValueElm;Pt.push([n,r])}(t,e),-1;const n=e.simpleValueElm;return delete e.simpleValueElm,xt.push(n),6}function Me(t,e){const r=e.global,o=r?.newest;if(p(t)){return!Ne(t,o)&&(xe(o),n(e),7)}const s=t?.tagJsType;return!s&&(xe(o),delete e.global,e.renderCount=0,8)}function De(t,e,n){const r=nt(vt.DEEP);r.tagJsType=t.tagJsType;const o=be(r,n,e);function s(){return r.tag=t(),o}return r.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,o}function Le(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const r=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,o=e.templater?.wrapper;let s=o;(o?.original||o?.original)&&(s=o.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},a=new q(r,c);throw console.error($e,c),a}(n,e,t)}M.tagClosed$=new C(void 0,(function(t){dn()||t.next()}));const $e="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function Be(t,e){const n=t.subject;++n.renderCount;const r=M.stateConfig;delete r.support,t.state=r.stateArray,M.tagClosed$.next(e),Le(r,t),n.global.newest=t}function He(t,e,n,r){const o=n.global,s=n.renderCount,c=e?.state,u=M.stateConfig;if(c){const n=e.states;u.prevSupport=e,W(t,M.stateConfig,c,n)}else J(t,u);const i=t.templater;let l;if(i.tagJsType===a.stateRender){l=ut(i,i,gt(i,r,t.appSupport,n)),l.states=t.states}else{l=(0,i.wrapper)(t,n,e),l.states=t.states}return Be(l,r),n.renderCount>s+1?o.newest:l}function Ue(t,e,n,r,o){n.checkValueChange=Me;const s=be(t,e,n);s.ownerSupport=e;const c=fe(s,o,r,void 0);for(const t of c.dom)t.marker&&Vt.push({element:t.marker,relative:r}),t.domElement&&Vt.push({element:t.domElement,relative:r});let a=-1;const u=c.subs.length-1;for(;a++<u;){Ge(c.subs[a])}return s}function Fe(t,e,r,o,s,c){const u=t?.tagJsType;if(u)switch(u){case a.templater:return e.checkValueChange=Me,c?Ue(t,r,e,c,o):ge(r,e,o);case a.dom:case a.tag:{e.checkValueChange=Me;const s=t;let a=s.templater;a||(a=function(t){const e=he();return e.tag=t,t.templater=e,e}(s));const u=n(e);return c?Ue(a,r,e,c,o):(u.newest=be(a,r,e),e.checkValueChange=Me,ge(r,e,o))}case a.stateRender:case a.tagComponent:if(n(e),e.checkValueChange=Me,c){const n=function(t,e,n,r,o){const s=gt(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==a.tagComponent?[]:ht(t,s);c.castProps=e}const u=e.global,{support:i}=Ke(s,u.newest,e,n);return function(t,e,n){let r=Vt.length;const o=fe(t,e,n,void 0);for(const t of o.dom)t.domElement&&Vt.splice(r++,0,{element:t.domElement,relative:n}),t.marker&&Vt.splice(r++,0,{element:t.marker,relative:n});const s=o.subs;for(const t of s)Ge(t)}(i,r,o),i}(t,e,r,o,c);return n}return Ze(t,e,r,o);case a.renderOnce:{n(e);const s=De(t,e,r);He(s,void 0,e,r);const a=Ue(s.templater,r,e,c,o);return e.checkValueChange=Me,a}}if(m(t))return Oe(e,t,r,o,c),void(e.checkValueChange=Re);d(t)||function(t,e,n,r){const o=_t(t),s=It(o,n);s.id=r,e.simpleValueElm=s,e.checkValueChange=_e}(t,e,e.placeholder,s)}function ze(t,e,n){t!==e.value&&(we(e,t,n),M.stateConfig.support||Rt())}function Ge({subject:t,support:e,counts:n,contextItem:r,appendTo:o}){let s=function(t){Fe(t,r,e,{...n},`rvp_-1_${e.templater.tag?.values.length}`,c?o:void 0),c||M.stateConfig.support||Rt(),s=function(t){ze(t,r,e)}};let c=!0;const a=t.subscribe((function(t){s(t)}));r.subject=t,c=!1;const u=e.subject.global;(u.subscriptions=u.subscriptions||[]).push(a)}function Ze(t,e,n,r){const o=gt(t,n,n.appSupport,e),s=o.propsConfig;if(s){const e=t.tagJsType!==a.tagComponent?[]:ht(t,o);s.castProps=e}const c=e.global,{support:u}=Ke(o,c.newest,e,n);return function(t,e,n){n.checkValueChange=Me;const r=fe(t,e,void 0,n.placeholder).subs;for(const t of r)Ge(t)}(u,r,e),u}function Xe(t,e,n,r,o,s=-1){const c=e.subject.global.newest;if(!c){const e=ot(r,t,s);r.push(...e);return t.propsConfig.castProps=e,r}const a=(e=c||e).propsConfig.castProps,u=[];for(let e=0;e<r.length;++e){const c=r[e],i=qe(a[e],c,t,n,s+1,o);u.push(i)}return t.propsConfig.castProps=u,u}function qe(t,e,n,r,o,s){return typeof t===c.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):s===o||at(e)?e:m(e)?function(t,e,n,r,o){for(let s=t.length-1;s>=0;--s){const c=t[s];t[s]=qe(e[s],c,n,r,o+1,s)}return t}(e,t,n,r,s):void 0===t?e:function(t,e,n,r,o,s){const c=Object.keys(t);for(const a of c){const c=t[a],u=qe(e[a],c,n,r,s,o+1);if(t[a]===u)continue;const i=Object.getOwnPropertyDescriptor(t,a)?.set;i||(t[a]=u)}return t}(e,t,n,r,s,o)}function Qe(t){const e=t.subject.global,{subs:r,tags:o}=ke(e.context);Ye(t);for(const t of o)Ye(t);e.subscriptions&&r.forEach((t=>t.unsubscribe())),n(t.subject)}function Ye(t){const e=t.subject,n=e.global;!0!==n.deleted&&(n.deleted=!0,e.renderCount=0,Te(t,[]))}function Ke(t,e,n,r){const o=e?.templater,s=o?.tag,c=He(t,e,n,r),u=!e||Ne(e,c);if(u){if(e){const t=e.templater.tag;t&&n.renderCount>0&&function(t,e,n){if(t.tagJsType===a.dom){const r=n?.dom;return void(r!==t.dom&&Qe(e))}if(n){const r=n.strings;if(r){const n=r?.length;n!==t.strings.length&&Qe(e)}}}(t,e,s)}}else{!function(t,e){const n=t.subject.global;let r=-1;const o=n.providers=n.providers||[],s=o.length-1;for(;r++<s;){const t=o[r];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].subject.global)return t.children.splice(s,1),void t.children.push(e)}}(e,c),Qe(e);const t=c.subject.global;t.oldest=c,t.newest=c}const i=e?.ownerSupport;return c.ownerSupport=r||i,{support:c,wasLikeTags:u}}const tn={added:0,removed:0};function en(t,e,n,r){const o=r.global,{support:s,wasLikeTags:c}=Ke(e,t,r,n);return c?(ve(o.oldest,s),s):(ge(n,r,tn),s)}function nn(t){return a.templater===t.tagJsType}function rn(t){const e=t.subject.global,n=nn(t.templater),r=t.ownerSupport;if(e.locked)return e.blocked.push(t),t;if(n)return on(r,t);e.locked=!0;const o=t.subject;e.blocked.length&&(t=e.blocked.pop(),e.blocked=[]),delete e.locked;return en(e.newest,t,r,o)}function on(t,e){const n=t.subject.global;if(!n||!0===n.deleted)return e;return rn(n.newest||t)}function sn(t,e){return t.length!==e.length}function cn(t){const e=dn();if(!e)throw ln;return an(e,M.stateConfig,t)}function an(t,e,n){const r=e.stateArray,o=e.states;return function(...e){return t.subject.renderCount>0?function(t,e,n,...r){const o=t.subject.global,s=(t=o.newest).state;D(s,n.stateArray,t.states,n.states);const c=e(...r);return D(n.stateArray,s,n.states,t.states),rn(t),g(c)&&c.finally((()=>{D(n.stateArray,s,n.states,t.states),rn(t)})),c}(t,n,{stateArray:r,states:o},...e):n(...e)}}const un=()=>{const t=dn();if(!t)throw ln;const e=M.stateConfig;return function(n){return an(t,e,n)}},ln=new Q("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function pn(t){O(t)}function fn(t){O((function(){dn().subject.global.destroy$.toCallback(t)}))}function dn(){return M.stateConfig.support}const gn=":tagvar",hn=":";function bn(t,e){const n={values:e,ownerSupport:dn(),tagJsType:a.tag,strings:t,key:t=>(n.arrayValue=t,n),html:function(t,e){return n.children={strings:t,values:e},n}};return n}function mn(t,e){const n={values:e,ownerSupport:dn(),dom:t,tagJsType:a.dom,key:function(t){return n.arrayValue=t,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return n}const vn="ondoubleclick",yn=/(:tagvar\d+:)/,wn=/(^:tagvar\d+:|:tagvar\d+:$)/g,Cn="__safeTagVar",jn=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,Sn=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function kn(t,e){Tn(t,e);const n=function(t){const e=[],n=[],r=[];let o=null,s=-1,c=0;const a=new RegExp(Sn,"g");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);for(;c<t.length;){const u=a.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(c<u.index){const e=t.slice(c,u.index);if(e.trim()){En(e).forEach((t=>{t.startsWith(gn)&&(t=gn+ ++s+hn),An(o,n,t)}))}}if(c=u.index+i.length,f){o=r.pop()||null;continue}const g=[];let h;for(;null!==(h=jn.exec(p));){const t=h[1]||h[3]||h[5];let n=h[2]||h[4]||h[6];if(void 0===t)continue;const r=""!==h[2],o=void 0===n&&r,c=t.toLowerCase(),a=c.startsWith("on")?Pn(c):c;if(o){if(t.slice(0,gn.length)===gn){const t=gn+ ++s+hn;e.push(["at",t]),g.push([t]);continue}if(h[0].startsWith(t)&&h[0].slice(t.length,h[0].length).search(/\s+$/)>=0){g.push([a]);continue}n=gn+ ++s+hn}r||(n=h[2]);const u=[a,n],i=Yt(c);i&&u.push(i),g.push(u)}const b={nn:l};g.length&&(b.at=g),o?(o.ch||(o.ch=[]),o.ch.push(b)):n.push(b),d||(r.push(o),o=b)}if(c<t.length){const e=t.slice(c);if(e.trim()){En(e).forEach((t=>(t.startsWith(gn)&&++s,An(o,n,t))))}}return n}(Tn(t,e).join(""));return n}function Tn(t,e){return function(t,e){const n=t.map(((t,n)=>n<e.length?t+gn+n+hn:t));return function(t,e,n){const r=n.length-e.length;if(r>0)for(let n=r;n>0;--n)t.push(gn+(e.length+n-1)+hn)}(n,t,e),n}(t.map((t=>t.replace(wn,((t,e)=>Cn+e)))),e)}function En(t){return t.split(yn).filter((t=>""!==t))}function An(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:On(n)})}const xn=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function On(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 Pn(t){if(t.startsWith("on")){return t.length===vn.length&&t===vn?"dblclick":t.slice(2,t.length)}return t}const Vn=new RegExp(gn+"(\\d+)"+hn,"g"),Jn="ch";function Wn(t,e,n=[],r=[]){const o=t;for(let t=0;t<o.length;t++){const s=[...r,t],c=o[t];if(c.at){const t=c.at;c.at=Rn(t,e)}if(c.ch){const t=c.ch,r=[...s,Jn];c.ch=Wn(t,e,n,r)}t=Nn(c,e,o,t)}return o}function Nn(t,e,n,r){if("text"!==t.nn)return r;const o=t;let c,a=o.tc;if(typeof a!==s.string)return r;for(;null!==(c=Vn.exec(a));){const t=c[1],o=parseInt(t,10);if(!isNaN(o)&&o<e){const t=gn+o+hn,e=a.slice(c.index+t.length);n.splice(r,1,{nn:"text",v:o}),a=e,Vn.lastIndex=0}}return o.tc=a,r}function Rn(t,e){return t.map((t=>{const[n,r,o]=t;if(n.startsWith(gn)){const t=parseInt(n.replace(gn,""),10);if(!isNaN(t)&&t<e)return[{tagJsVar:t}]}if(typeof r===s.string&&r.startsWith(gn)){const t=parseInt(r.replace(gn,""),10);if(!isNaN(t)&&t<e)return[n,{tagJsVar:t},o]}return t}))}const In="__safeTagVar";const _n=/__safeTagVar(\d+)/g;function Mn(t){if(t.at&&(t.at=t.at?t.at.map((t=>{if(1===t.length)return t;const[,e]=t;if(typeof e===s.string&&e.startsWith(In)){const n=parseInt(e.replace(In,""),10);t[1]=gn+n+hn}return t})):[]),t.ch){const e=t.ch;for(let t=0;t<e.length;t++){const n=e[t];if("text"===n.nn){if(typeof n.tc!==s.string)return;n.tc=n.tc.replace(_n,((t,e)=>gn+e+hn))}Mn(n)}0===e.length&&delete t.ch}}const Dn={};function Ln(t,e){const n=function(t){const e=t.map((t=>t.length));return e.push(t.length),Number(e.join(""))}(t),r=Dn[n],o=r&&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,r);if(o)return r.domMetaMap;const s=Wn(kn(t,e),e.length);s.forEach(Mn);const c={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Dn[n]=c,s}function $n(t,...e){const n=bn(t,e),r=nt(vt.NONE);return r.tag=n,n.templater=r,n}$n.dom=function(t,...e){return mn(t,e)};const Bn=[];function Hn(t,e,r){const o=Bn.findIndex((t=>t.element===e));o>=0&&(xe(Bn[o].support),Bn.splice(o,1),console.warn("Found and destroyed app element already rendered to element",{element:e}));let s=()=>l(r);s.propWatch=vt.NONE,s.tagJsType=a.stateRender,s.props=[r],s.isApp=!0;const u=function(t,e){const r={value:t,checkValueChange:Me,withinOwnerElement:!1,renderCount:0,global:void 0},o=n(r);return o.events={},Un(t,r,e),r}(s,e),i=u.global;J(i.newest,M.stateConfig);let l=t(r);const p=typeof l==c.function;p||(f(l)?(i.newest.propsConfig={latest:[r],castProps:[r]},s.propWatch=l.propWatch,s.tagJsType=l.tagJsType,s.wrapper=l.wrapper,s=l):(s.tag=l,l=t));const d=document.createTextNode("");rt.push(s.wrapper||{original:s});const g=Fn(s,d,e,u,p);i.isApp=!0,p&&(l.tag=g.templater.tag),e.destroy=function(){const t=i.events;for(const n in t){const r=t[n];e.removeEventListener(n,r)}i.events={};const n=xe(g);return Rt(),n},++Nt.locks;const h=fe(g,{added:0,removed:0},e,void 0);i.oldest=g,i.newest=g;let b=s.setUse;if(s.tagJsType!==a.stateRender){const e=t.original;b=e.setUse,e.isApp=!0}e.setUse=b,e.ValueTypes=a,Bn.push({element:e,support:g});const m=document.createDocumentFragment();m.appendChild(d);for(const t of h.dom)zn(t,m);for(const t of h.subs)Ge(t);return--Nt.locks,Rt(),e.appendChild(m),{support:g,tags:rt,ValueTypes:a}}function Un(t,e,n){const r=e.global,o=pt(t,e);return ft(t,o,o),o.appElement=n,r.oldest=r.oldest||o,r.newest=o,o}function Fn(t,e,n,r,o){r.placeholder=e;const s=r.global,c=s.newest,u=s.oldest;if(c===u||W(c,M.stateConfig,u.state,u.states),t.tagJsType===a.stateRender){const e=t.wrapper||{original:t};if(!o){const e=Un(t,r,n);return Be(e),e}const s=ut(t,e,c);return Be(s),s}const i=(0,t.wrapper)(c,r);return Be(i),i}function zn(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}const Gn={tagElement:Hn,renderWithSupport:Ke,renderSupport:rn,renderTagOnly:He,paint:Rt};var Zn=e.W9,Xn=e.cg,qn=e.m0,Qn=e.rS,Yn=e.Y2,Kn=e.ei,tr=e.B7,er=e.TU,nr=e.XF,rr=e.PC,or=e.Ot,sr=e.Mj,cr=e.tD,ar=e.j8,ur=e.um,ir=e.E2,lr=e.OH,pr=e.TB,fr=e.Ii,dr=e.yV,gr=e.zV,hr=e.ze,br=e.WJ,mr=e.aZ,vr=e.O,yr=e.Ie,wr=e.B4,Cr=e.Az,jr=e.Xi,Sr=e.pc,kr=e.Ah,Tr=e.ck,Er=e.k6,Ar=e.Gk,xr=e.cF,Or=e.PB,Pr=e.qy,Vr=e.cy,Jr=e.Tn,Wr=e.Gv,Nr=e.yL,Rr=e.D8,Ir=e.Ze,_r=e._4,Mr=e.mn,Dr=e.Eb,Lr=e.z,$r=e.sA,Br=e.MG,Hr=e.PL,Ur=e.nI,Fr=e.PZ,zr=e.N_,Gr=e.r5,Zr=e.uc,Xr=e.pG,qr=e.QB,Qr=e.R6,Yr=e.Ll,Kr=e.vP,to=e.wk,eo=e.xP,no=e.bc,ro=e.ag,oo=e.Tc,so=e.Hf,co=e._A,ao=e.Ag,uo=e.NU,io=e.hW,lo=e.wB,po=e.id,fo=e.MC,go=e.zC;export{Zn as ArrayNoKeyError,Xn as BasicTypes,qn as ImmutableTypes,Qn as PropWatches,Yn as RouteQuery,Kn as StateMismatchError,tr as Subject,er as Subjective,nr as SyncCallbackError,rr as TagError,or as ValueSubject,sr as ValueSubjective,cr as ValueTypes,ar as addOneContext,ur as buildBeforeElement,ir as callback,lr as callbackMaker,pr as checkArrayValueChange,fr as checkSimpleValueChange,dr as checkTagValueChange,gr as combineLatest,hr as createTrigger,br as defineValueOn,mr as destroyArray,vr as destroySupport,yr as empty,wr as getBaseSupport,Cr as getDomMeta,jr as getDomTag,Sr as getHtmlSupport,kr as getNewGlobal,Tr as getStringTag,Er as getSupport,Ar as getTemplaterResult,xr as hmr,Or as howToSetInputValue,Pr as html,Vr as isArray,Jr as isFunction,Wr as isObject,Nr as isPromise,Rr as isSimpleType,Ir as isStaticTag,_r as isSubjectInstance,Mr as isTagComponent,Dr as key,Lr as letProp,$r as onDestroy,Br as onInit,Hr as oneRenderToSupport,Ur as paint,Fr as processFirstSubjectValue,zr as processSubUpdate,Gr as providers,Zr as renderSupport,Xr as renderTagOnly,qr as renderWithSupport,Qr as runWrapper,Yr as setUseMemory,Kr as signal,to as state,eo as states,no as subject,ro as syncError,oo as tag,so as tagElement,co as tags,ao as upgradeBaseToSupport,uo as variablePrefix,io as variableSuffix,lo as watch,po as willCallback,fo as willPromise,go as willSubscribe};
|
|
1
|
+
var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function n(t){return t.renderCount=0,t.global={}}t.d(e,{W9:()=>X,cg:()=>c,m0:()=>s,rS:()=>yt,Y2:()=>r,ei:()=>q,B7:()=>C,TU:()=>S,XF:()=>Q,PC:()=>Z,Ot:()=>k,Mj:()=>T,tD:()=>a,j8:()=>ke,um:()=>je,E2:()=>fn,OH:()=>gn,TB:()=>_e,Ii:()=>He,yV:()=>zt,zV:()=>y,ze:()=>dn,WJ:()=>j,aZ:()=>Be,O:()=>Ut,Ie:()=>o,B4:()=>pt,Az:()=>Fn,Xi:()=>Sn,pc:()=>dt,Ah:()=>n,ck:()=>Cn,k6:()=>gt,Gk:()=>nt,cF:()=>Yn,PB:()=>Gt,qy:()=>zn,cy:()=>m,Tn:()=>h,Gv:()=>b,yL:()=>g,D8:()=>l,Ze:()=>p,_4:()=>d,mn:()=>f,Eb:()=>bt,z:()=>z,sA:()=>mn,MG:()=>bn,PL:()=>Ue,nI:()=>Rt,PZ:()=>qe,N_:()=>Qe,r5:()=>G,uc:()=>un,pG:()=>Ze,QB:()=>on,R6:()=>qn,Ll:()=>D,vP:()=>u,wk:()=>O,xP:()=>F,bc:()=>U,ag:()=>hn,Tc:()=>vt,Hf:()=>Zn,_A:()=>rt,Ag:()=>ft,NU:()=>vn,hW:()=>wn,wB:()=>$,id:()=>E,MC:()=>A,zC:()=>x});class r{get(t){return"todo"}}const o="";var s,c;!function(t){t.string="string",t.number="number",t.boolean="boolean",t[void 0]="undefined"}(s||(s={})),function(t){t.function="function",t.date="date",t.unknown="unknown",t.object="object"}(c||(c={}));const a={tag:"html",dom:"dom",templater:"templater",tagComponent:"tagComponent",tagArray:"tagArray",subject:"subject",tagJsSubject:"tagJsSubject",renderOnce:"renderOnce",stateRender:"stateRender",version:Date.now()};function u(t){return yn()?O((()=>i(t))):i(t)}function i(t){let e=t;const n=new Set;return{get value(){return e},set value(t){e!==t&&(e=t,n.forEach((e=>e(t))))},subscribe(t){t(e),n.add(t);const r=()=>n.delete(t);return r.unsubscribe=r,r}}}function l(t){switch(t){case s.string:case s.number:case s.boolean:return!0}return!1}function p(t){if(!t)return!1;switch(t.tagJsType){case a.dom:case a.tag:case a.templater:return!0}return!1}function f(t){const e=t?.tagJsType;return e===a.tagComponent||e===a.stateRender}function d(t){return b(t)&&typeof t.subscribe===c.function}function g(t){return t&&h(t.then)}function h(t){return typeof t===c.function}function b(t){return typeof t===c.object&&null!==t}function m(t){return Array.isArray(t)}function y(t){const e=new C;return e.subscribeWith=e=>{const n=[],r=[],o=(o,s)=>{n[s]=!0,r[s]=o;if(n.length===t.length){for(const t of n)if(!t)return;e(r,c)}},s=[...t],c=s.shift().subscribe((t=>o(t,0))),a=s.map(((t,e)=>t.subscribe((t=>o(t,e+1)))));return c.subscriptions=a,c},e}function v(t,e,n){const r=C.globalSubCount$;C.globalSubCount$.next(r.value+1);const o=function(){o.unsubscribe()};return o.callback=e,o.subscriptions=[],o.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 r=C.globalSubCount$;C.globalSubCount$.next(r.value-1),t.unsubscribe=()=>t;const o=t.subscriptions;for(const t of o)t.unsubscribe();return t}(o,n,e)},o.add=t=>(o.subscriptions.push(t),o),o.next=t=>{e(t,o)},o}function w(t,e,n){const r=[...e],o=r.shift(),s=t=>{if(r.length)return w(t,r,n);n(t)};let c=s;const a=o(t,{setHandler:t=>c=t,next:s});c(a)}class C{value;onSubscription;methods=[];isSubject=!0;subscribers=[];subscribeWith;constructor(t,e){this.value=t,this.onSubscription=e}subscribe(t){const e=v(0,t,this.subscribers),n=this.subscribeWith;if(n){if(this.methods.length){const n=t;t=t=>{w(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,r)=>{const o=r?.unsubscribe;o?o():setTimeout((()=>e.unsubscribe()),0),t(n)}));return this}pipe(...t){const e=new C(this.value);return e.setMethods(t),e.subscribeWith=t=>this.subscribe(t),e.next=t=>this.next(t),e}setMethods(t){this.methods=t}static all(t){return y(t.map((t=>{if(d(t))return t;return new C(t,(e=>(e.next(t),e)))})))}static globalSubCount$=new C(0)}class S extends C{value;onSubscription;_value;constructor(t,e){super(t,e),this.value=t,this.onSubscription=e,this._value=t,j(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 j(t){Object.defineProperty(t,"value",{set(e){t._value=e,t.emit()},get:()=>t._value})}class k extends C{value;constructor(t){super(t),this.value=t}subscribe(t){const e=super.subscribe(t);return t(this.value,e),e}}class T extends C{value;constructor(t){super(t),this.value=t,this._value=t,j(this)}subscribe(t){const e=super.subscribe(t);return t(this._value,e),e}}function E(t){return(e,n)=>{n.setHandler((()=>{})),t(e,n.next)}}function A(t){return(e,n)=>{n.setHandler((()=>{}));t(e).then((t=>n.next(t)))}}const x=t=>(e,n)=>{n.setHandler((()=>{}));const r=t(e).subscribe((t=>{r.unsubscribe(),n.next(t)}))};function O(t){return D.stateConfig.handlers.handler(t)}function P(t){const e=D.stateConfig;e.states[e.statesIndex]=t;return e.support.states[e.statesIndex]=t,++e.statesIndex,t(((...t)=>(O(t),t)))}function V(t){const e=D.stateConfig,n=e.support,r=e.statesIndex,o=e.prevSupport,s=o?.states[r],c=[];s(((...t)=>(c.push(t),t)));let a=0;return n.states[e.statesIndex]=t,++e.statesIndex,t(((...t)=>{e.stateArray.push({get:()=>t,defaultValue:t});const n=c[a];return++a,n}))}function J(t,e){e.handlers.handler=M,e.handlers.statesHandler=P,e.rearray=[],e.stateArray=[],e.states=[],e.statesIndex=0,e.support=t}function W(t,e,n,r){e.rearray=n,e.stateArray=[],e.states=r,e.statesIndex=0,e.handlers.handler=I,e.handlers.statesHandler=V,e.support=t}class N{}function R(t){const e=t.callback;if(!e)return t.defaultValue;const[n]=function(t){const e=t(N),[n]=e,[r]=t(n);return[n,r]}(e);return n}function I(){const t=D.stateConfig,e=t.rearray[t.stateArray.length];return t.stateArray.push(e),e.defaultValue}function M(t){const e=D.stateConfig;let n=t;if(typeof t===c.function&&(n=t()),typeof n===c.function){const t=n;n=function(...e){return t(...e)},n.original=t}const r={get:function(){return R(r)},defaultValue:n};return e.stateArray.push(r),n}const D={stateConfig:{stateArray:[],version:Date.now(),handlers:{handler:M,statesHandler:P}}};function L(t,e,n,r){for(let n=t.length-1;n>=0;--n){const r=t[n].get(),o=e[n].callback;o&&o(r)}for(let t=r.length-1;t>=0;--t){const e=[],o=(...t)=>(e.push(t),t);r[t](o);let s=0;const c=t=>e[s++];n[t](c)}}const $=(t,e)=>B(t,e),_=t=>t;const B=(t,e,{init:n,before:r,final:o=_}={})=>{const s=O({pastResult:void 0,values:void 0}),c=s.values;if(void 0===c){if(r&&!r(t))return s.values=t,s.pastResult;const a=(n||e)(t,c);return s.pastResult=o(a),s.values=t,s.pastResult}if(t.every(((t,e)=>t===c[e])))return s.pastResult;if(r&&!r(t))return s.values=t,s.pastResult;const a=e(t,c);return s.pastResult=o(a),c.length=0,c.push(...t),s.pastResult};function H(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=O((()=>yn())),r=O((()=>new k(void 0))),o=O((()=>({stateArray:D.stateConfig.stateArray,states:D.stateConfig.states}))),s=(t,s)=>(B(t,((t,e)=>{const c=yn(),a=s(t,e);if(c!==n){const t=o.stateArray,e=n.subject.global.oldest;L(t,e.state,o.states,e.states)}r.next(a)}),e.setup),r);return s.setup=e.setup,H((()=>s),s),s}}),Object.defineProperty(e,"truthy",{get(){const e=t();return e.setup.before=t=>t.every((t=>t)),e}}),e}function U(t,e){return yn()?O((()=>new C(t))):new C(t)}function F(t){return D.stateConfig.handlers.statesHandler(t)}function z(t){const e=u([]),n=u(0),r=u(0);let o=[],s=0;return r.value=n.value,t(((...t)=>(o=t,t))),$(o,(()=>{++s,e.value=o,t((()=>o))})),F((()=>{if(s)return t(((...t)=>(e.value=t,n!=r?e.value:t))),r.value=n.value,void++n.value;t((()=>e.value))})),++s,e.value}H((()=>function(t){const e=(e,n)=>B(e,n,t);return e.setup=t,H((()=>e),e),e}({})),$),U._value=t=>{const e=O((function(){return{stateArray:D.stateConfig.stateArray,states:D.stateConfig.states}})),n=yn();return O((function(){return new k(t).pipe((t=>(L(n.state,e.stateArray,n.states,e.states),t)))}))},U.all=function(t){const e=O((()=>({stateArray:D.stateConfig.stateArray,states:D.stateConfig.states}))),n=yn();return C.all(t).pipe((t=>(L(n.state,e.stateArray,n.states,e.states),t)))};const G={create:t=>{const e=O((()=>({stateDiff:0,provider:void 0})));if(e.stateDiff){let t=e.stateDiff;for(;t--;)O(void 0);return O(void 0)}const n=O((()=>{const n=D.stateConfig,r=n.stateArray.length,o=t.prototype?new t:t(),s=n.support,c=n.stateArray.length-r,a={constructMethod:t,instance:o,stateDiff:c,owner:s,children:[]};e.provider=a;const u=s.subject.global;return(u.providers=u.providers||[]).push(a),e.stateDiff=c,o})),r=t,o=r.compareTo=r.toString();return e.provider.constructMethod.compareTo=o,n},inject:t=>O((()=>{const e=t,n=e.compareTo=e.compareTo||t.toString(),r=yn(),o=[];let s={ownerSupport:r.ownerSupport};for(;s.ownerSupport;){const t=s.ownerSupport.subject.global.providers;if(!t){s=s.ownerSupport;continue}const e=t.find((t=>{o.push(t);if(t.constructMethod.compareTo===n)return!0}));if(e){const t=r.subject.global;return(t.providers=t.providers||[]).push(e),e.children.push(r),e.instance}s=s.ownerSupport}const c=`Could not inject provider: ${t.name} ${t}`;throw console.warn(`${c}. Available providers`,o),new Error(c)}))};class Z extends Error{details;constructor(t,e,n={}){super(t),this.name=Z.name,this.details={...n,errorCode:e}}}class X extends Z{constructor(t,e){super(t,"array-no-key-error",e),this.name=X.name}}class q extends Z{constructor(t,e){super(t,"state-mismatch-error",e),this.name=q.name}}class Q extends Z{constructor(t,e){super(t,"sync-callback-error",e),this.name=Q.name}}function Y(t,e){return K(t,e)}function K(t,e){if(null===t||typeof t!==c.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=m(t)?[]:Object.create(Object.getPrototypeOf(t));if(m(t))for(let r=0;r<t.length;r++)n[r]=K(t[r],e-1);else for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=K(t[r],e-1));return n}function tt(t,e,n){return et(t,e,n)}function et(t,e,n){return!(t!==e&&(r=t,o=e,!h(r)||!h(o)||r.toString()!==o.toString()))||(n<0||typeof t===c.object&&typeof e===c.object&&(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():m(t)&&m(e)?function(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!et(t[r],e[r],n-1))return!1;return!0}(t,e,n-1):!m(t)&&!m(e)&&function(t,e,n){const r=Object.keys(t),o=Object.keys(e);if(0===r.length&&0===o.length)return!0;if(r.length!==o.length)return!1;for(const s of r){if(!o.includes(s)||!et(t[s],e[s],n-1))return!1}return!0}(t,e,n-1)));var r,o}function nt(t,e){const n={propWatch:t,props:e,tagJsType:a.templater,key:function(t){return n.arrayValue=t,n}};return n}const rt=[];function ot(t,e,n){return t.map((t=>function(t,e,n,r){if(p(t)||!t)return t;if(!e)return t;return st(t,e,n,r)}(t,e.ownerSupport,e,n)))}function st(t,e,n,r){if(!t)return t;if(t.tagJsType)return t;if(typeof t===c.function)return function(t,e){const n=t.mem;if(n)return t;const r=function(...t){return r.toCall(...t)};return r.original=t,r.mem=t,r.toCall=function(...t){return function(t,e,n){const r=n.subject.global,o=r?.newest||n,s=void 0===yn(),c=t(...e),a=function(){const t=o.subject.global;if(!1===s){if(!0===t.locked)return c}return function(t,e){const n=t.subject,r=an(t.templater);if(r){return ln(e,t)}const o=n.global;o.locked=!0,cn(o.newest,t,e,n),delete o.locked}(o,n),c};if(s)return a();return D.tagClosed$.toCallback(a),c}(r.mem,t,e)},Object.assign(r,t),r}(t,e);if(r===Tt)return t;return at(t)?t:m(t)?function(t,e,n,r){for(let o=t.length-1;o>=0;--o){const s=t[o];if(t[o]=st(s,n,e,r+1),typeof s===c.function){if(s.mem)continue;ct(r+1,o,s,t,e)}}return t}(t,n,e,r):function(t,e,n,r){const o=Object.keys(t);for(const s of o){const o=t[s],a=st(o,n,e,r+1);if(t[s]===a)continue;const u=Object.getOwnPropertyDescriptor(t,s);if(!(u?.get||u?.set)&&(t[s]=a,typeof a===c.function)){if(o.mem)continue;ct(r+1,s,o,t,e)}}return t}(t,n,e,r)}function ct(t,e,n,r,o){if(t>0){const t=o.subject.global;r[e].subscription=t.destroy$.toCallback((function(){r[e]=n}))}}function at(t){return typeof t!==c.object||!t||t.tagJsType}function ut(t,e,n,r){const o=e.original;let s;t.tagJsType===a.stateRender?s=t():(s=o(...r),typeof s===c.function&&(s=s())),s.templater=t,t.tag=s;const u=D.stateConfig;return n.state=u.stateArray,n.states=u.states,n}function it(t){return t.map(lt)}function lt(t,e){const n=t,r=t?.tagJsType;if(r)switch(r){case a.stateRender:return;case a.dom:case a.tag:case a.templater:return it(n.values)}return m(t)?it(n):Y(t,e)}function pt(t,e,n){const r={templater:t,subject:e,castedProps:n,appSupport:void 0},o=e.global;return o.blocked=[],o.destroy$=new C,r}function ft(t,e,n,r){e.state=[],e.states=[],e.appSupport=n;const o=t.props;return o&&(e.propsConfig=function(t,e,n){const r=t.templater;if(r.tagJsType!==a.stateRender){switch(r.propWatch){case yt.IMMUTABLE:return t.propsConfig={latest:e,castProps:n};case yt.SHALLOW:return t.propsConfig={latest:e.map((t=>lt(t,kt))),castProps:n}}return t.propsConfig={latest:e.map((t=>lt(t,Tt))),castProps:n}}}(e,o,r)),e}function dt(t,e,n,r,o){const s={templater:t,subject:r,castedProps:o,appSupport:void 0};return s.ownerSupport=e,s.appSupport=n,s}function gt(t,e,n,r,o){const s=pt(t,r,o);return s.ownerSupport=e,ft(t,s,n,o)}function ht(t,e,n){const r=t.propWatch===yt.DEEP?Tt:kt,o=t.props,s=e.propsConfig;let c=s.castProps;const a=n?.propsConfig,u=a?.castProps;u&&(s.castProps=u,c=tn(e,n,n.ownerSupport,o,r));return c||ot(o,e,0)}function bt(t){return{set html(e){e.arrayValue=t}}}let mt=0;var yt;function vt(t,e=yt.SHALLOW){const n=function(...r){const o=nt(e,r);o.tagJsType=a.tagComponent;const s=function(t,e){return function(n,r,o){const s=ht(t,n,o),c=n.ownerSupport,a=gt(t,c,n.appSupport,r,s);return ut(t,e,a,s)}}(o,n);return s.original=t,o.wrapper=s,o},r=t;return n.original=t,r.tags=rt,r.setUse=D,r.ValueTypes=a,r.tagIndex=mt++,rt.push(n),n}function wt(){throw new Error("Do not call tag.use as a function but instead set it as: `(props) => tag.use = (use) => html`` `")}function Ct(t,e){const n=function(t,e,n){const r=pn(t,e);if(r)return 11;switch(n){case yt.NONE:return 1;case yt.SHALLOW:return jt(t,e);case yt.IMMUTABLE:return St(t,e)}return function(t,e){let n=t,r=e;n=[...t],r=[...e||[]];if(!n.every(((t,e)=>function(t,e,n,r){const o=r[e];if(typeof t===c.object){const e={...t},n={...o||{}},r=Object.entries(e).every((([t,r])=>Et(r,n[t],(()=>{delete e[t],delete n[t]}))));return r}return Et(t,o,(()=>{n.splice(e,1),r.splice(e,1)}))}(t,e,n,r))))return 7;return!1}(t,e)}(e.props,t.propsConfig.latest,t.templater.propWatch);return n}function St(t,e){const n=t.length;for(let r=0;r<n;++r){if(t[r]!==e[r])return 2}return!1}function jt(t,e){const n=t.length;for(let r=0;r<n;++r){const n=t[r],o=e[r];if(m(n)&&m(o)){if(n===o)continue;return 3}if(typeof n!==c.function||typeof o!==c.function)if(typeof n!==c.object){if(n!==o)return 3.3}else if(typeof e===c.object){const t=Object.entries(n);for(const e of t){if(!At(e,o))return 3.1}}}return!1}!function(t){t.DEEP="deep",t.SHALLOW="shallow",t.NONE="none",t.IMMUTABLE="immutable"}(yt||(yt={})),vt.renderOnce=function(){throw new Error("Do not call tag.renderOnce as a function but instead set it as: `(props) => tag.renderOnce = () => html`` `")},vt.state=wt,vt.use=wt,vt.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`` `")},vt.key=bt,vt.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`` `")},vt.deepPropWatch=vt,vt.immutableProps=function(t){return vt(t,yt.IMMUTABLE)},vt.watchProps=function(t){return vt(t,yt.SHALLOW)},Object.defineProperty(vt,"renderOnce",{set(t){t.tagJsType=a.renderOnce}}),Object.defineProperty(vt,"state",{set(t){t.original={setUse:D,tags:rt},t.tagJsType=a.stateRender}}),Object.defineProperty(vt,"use",{set(t){t.original={setUse:D,tags:rt},t.tagJsType=a.stateRender}});const kt=3,Tt=10;function Et(t,e,n){if(typeof t!==c.function)return!!tt(t,e,Tt)&&4;if(typeof e!==c.function)return!1;const r=e?.original;r&&(e=r);t.original&&(t=t.original);return t.toString()===e.toString()?(n(),5):(n(),6)}function At([t,e],n){const r=n[t];return typeof e===c.function&&typeof r===c.function||r===e}let xt=[],Ot=[],Pt=[],Vt=[],Jt=[],Wt=[];const Nt={locks:0};function Rt(){if(!(Nt.locks>0)){++Nt.locks;for(const t of xt){t.parentNode.removeChild(t)}for(const t of Ot)t();for(const[t,e]of Pt)e.textContent=t;for(const t of Vt)t.relative.appendChild(t.element);for(const{element:t,relative:e}of Jt)e.parentNode.insertBefore(t,e);for(const t of Wt)t();xt=[],Ot=[],Vt=[],Jt=[],Wt=[],Pt=[],--Nt.locks}}function It(t,e){const n=document.createTextNode(t);return Jt.push({element:n,relative:e}),n}function Mt(t){switch(t){case void 0:case!1:case null:return o}return t}function Dt(t){const e=t.subject.global,n=e.providers;if(n)for(const t of n)for(let n=t.children.length-1;n>=0;--n){t.children[n].subject.global===e&&t.children.splice(n,1)}e.destroy$&&e.destroy$.next(),t.subject.renderCount=0}function Lt(t){for(const e of t){const t=e.lastArray;if(t){Lt(t);continue}const n=e.global;if(!n)continue;const r=n.newest,o=n.subscriptions;o&&o.forEach((t=>t.unsubscribe())),f(r.templater)&&Dt(r);Lt(n.context)}}function $t(t,e=[],n=[]){for(const r of t){const t=r.global;if(!t)continue;const o=t.newest;if(o){e.push(o);const r=t.subscriptions;r&&n.push(...r)}const s=t.context;s&&$t(s,e,n)}return{tags:e,subs:n}}function _t(t,e){const n=t.subject.global,r=n.htmlDomMeta,o=n.context;n.deleted=!0;const s=n.destroys;if(s)return function(t,e,n,r){const o=[];if(t.forEach((t=>{const e=t();e instanceof Promise&&o.push(e)})),o.length){const t=Promise.all(o).then((()=>{Bt(e,n),Ht(r),Rt()}));return void n.push(t)}Bt(e,n),Ht(r),Rt()}(s,o,e,r);Bt(o,e),Ht(r)}function Bt(t,e){for(const n of t){if(n.withinOwnerElement)continue;const t=n.lastArray;if(t){Be(n,t);continue}const r=n.simpleValueElm;if(r){delete n.simpleValueElm,xt.push(r);continue}const o=n.global;if(void 0===o)continue;if(!0===o.deleted)continue;o.deleted=!0;const s=o.oldest;s&&_t(s,e)}}function Ht(t){t.forEach((t=>{const e=t.marker;e&&xt.push(e);const n=t.domElement;n&&xt.push(n)}))}function Ut(t){const e=t.subject.global;e.deleted=!0,t.subject.renderCount=0;const n=[];return Lt(e.context),e.destroy$&&Dt(t),_t(t,n),n}function Ft(t,e){const n=t.templater,r=e.templater,o=n?.tag||t,s=r.tag;if(n?.tagJsType===a.stateRender)return n.dom===r.dom;switch(o.tagJsType){case a.dom:return s?.tagJsType===a.dom&&function(t,e){const n=t.dom,r=e.dom;return n===r}(o,s);case a.tag:{const n=function(t,e,n,r){const o=t.strings,s=e.strings;if(o.length!==s.length)return!1;if(!o.every(((t,e)=>s[e].length===t.length)))return!1;const a=n.templater.values||t.values,u=r.templater.values||e.values;return function(t,e){const n=t.length===e.length;if(!n)return!1;const r=e.every(((e,n)=>{const r=t[n];if(typeof e===c.function&&typeof r===c.function){return!!(e.toString()===r.toString())}return!0}));if(r)return!0;return!1}(a,u)}(o,s,t,e);return n}}throw new Error(`unknown tagJsType of ${o.tagJsType}`)}function zt(t,e){const r=e.global,o=r?.newest;if(p(t)){return!Ft(t,o)&&(Ut(o),n(e),7)}const s=t?.tagJsType;if(s){return!0===Ne(e,t,r.newest.ownerSupport)&&-1}return Ut(o),delete e.global,e.renderCount=0,8}function Gt(t,e,n){Ot.push((()=>{void 0!==n&&!1!==n&&null!==n?t.setAttribute(e,n):t.removeAttribute(e)}))}function Zt(t,e,n,r,o,s){switch(r){case"init":{const t=s.added;return void Wt.push((()=>{e({target:n,stagger:t})}))}case"destroy":{const t=++s.removed,r=o.subject.global;return r.destroys=r.destroys||[],void r.destroys.push((()=>e({target:n,stagger:t})))}case"autofocus":return void Wt.push((()=>n.focus()));case"autoselect":return void Wt.push((()=>n.select()));case"style":{const r=t.split(".");return void Ot.push((()=>n.style[r[1]]=e))}case"class":return void function(t,e,n){const r=t.split(".");if(r.shift(),e){for(const t of r)Ot.push((()=>n.classList.add(t)));return}for(const t of r)Ot.push((()=>n.classList.remove(t)))}(t,e,n)}throw new Error(`Invalid special attribute of ${r}. ${t}`)}function Xt(t,e){const n=function(t,e,n=[]){const r=t.subject;n.push({support:t,renderCount:r.renderCount,provider:e});const o=e.children;for(let t=o.length-1;t>=0;--t){const r=o[t],s=r.subject;n.push({support:r,renderCount:s.renderCount,provider:e})}return n}(t,e);return n}function qt(t,e=[]){const n=t.subject.global,r=an(t.templater),o=t.ownerSupport;if(n.locked)return e.push(t),e;if(r)return qt(o,e);const s=t,c=f(s.templater),u=t.templater.tagJsType,i=o&&u!==a.stateRender&&(!c||function(t,e,n){const r=function(t,e){const n=t.props,r=e.propsConfig,o=r.latest;if(pn(n,o))return!0;switch(t.propWatch){case yt.IMMUTABLE:return St(n,o);case yt.SHALLOW:return jt(n,o)}return!tt(n,o,Tt)}(e,n);if(t&&r)return!0;return!1}(o,s.templater,s)),l=function(t){const e=t.subject.global.providers;if(!e)return[];const n=[];for(const t of e){const e=Xt(t.owner,t);n.push(...e.map((t=>t.support)))}return n}(s);return e.push(...l),i?(qt(o,e),c&&e.push(s),e):(e.push(s),e)}function Qt(t){++Nt.locks,t.forEach(Yt),--Nt.locks,Rt()}function Yt(t){const e=t.subject.global;e&&un(e.newest)}D.tagClosed$=new C(void 0,(function(t){yn()||t.next()}));const Kt="no-data-ever",te="promise-no-data-ever";function ee(t,e){const n=e.subject.global,r=function(t,e){if(!0!==n.deleted)return function(t,e,n,r){let o=e;for(;o.ownerSupport&&!f(o.templater);)o=o.ownerSupport;const s=o.subject.global;s.locked=!0;const c=t.apply(n,r);return function(t,e){const n=e.subject.global;return delete n.locked,function(t,e,n){return Qt(qt(t)),function(t,e,n){if(g(t)){return e.subject.global.locked=!0,t.then((()=>{if(!0===n.deleted)return te;delete e.subject.global.locked;return Qt(qt(e)),te}))}return Kt}(e,t,n)}(e,t,n)}(c,o)}(r.tagFunction,r.support,t,e)};return r.tagFunction=t,r.support=e,r}const ne=["init","destroy"];function re(t,e,n,r,o,s,c){if(c)return Zt(t,e,n,c,s,o);r(n,t,e)}function oe(t,e,n,r){const o=t.appElement;"blur"===e&&(e="focusout");const s="_"+e,c=t.subject.global.events;if(!c[e]){const t=function(t){t.originalStopPropagation=t.stopPropagation,se(t,s,t.target)};c[e]=t,o.addEventListener(e,t)}n[s]=r,n[e]=r}function se(t,e,n){const r=n[e];if(r){let e=!1;if(t.stopPropagation=function(){e=!0,t.originalStopPropagation.call(t)},r(t),t.defaultPrevented||e)return}const o=n.parentNode;o&&se(t,e,o)}function ce(t,e,n,r){const o=function(...e){return o.tagFunction(t,e)};o.tagFunction=e,o.support=n,oe(n.appSupport,r,t,o)}function ae(t){if(t.startsWith("class."))return"class";const e=function(t){switch(t){case"autoselect":return"autoselect";case"autofocus":return"autofocus";case"oninit":case"init":return"oninit";case"ondestroy":case"destroy":return"destroy"}return!1}(t);return!1!==e||!!t.startsWith("style.")&&"style"}const ue={added:0,removed:0};function ie(t,e,n,r){if(n.isNameOnly)return function(t,e,n,r,o,s,a,u){if(n){if(be(e))return void r.removeAttribute(n);if(typeof n===c.object){if(typeof e===c.object)for(const t in n)t in e||Ot.push((function(){r.removeAttribute(t)}));else for(const t in n)Ot.push((function(){r.removeAttribute(t)}))}}pe(t,e,r,o,s,a,u)}(t,e,n.value,n.element,r,n.howToSet,[],ue),void(n.value=e);const o=n.element;fe(e,n.attrName,n,o,r,n.howToSet,n.isSpecial,ue),n.value=e}function le(t,e,n,r,o,s,a,u,i){const l=he(e);if(l>=0){const e=t[l],c=ke(e,s,!0);return c.isAttr=!0,c.element=n,c.howToSet=o,c.isNameOnly=!0,c.handler=(t,e)=>ie(e,t,c,r),void pe(t,e,n,r,o,s,u)}const p=he(i);if(p>=0){const i=t[p],l={isAttr:!0,element:n,attrName:e,checkValueChange:He,withinOwnerElement:!0};s.push(l);return d(l.value)?function(t,e,n,r,o,s,c){s&&Ot.push((function(){n.removeAttribute(t)}));const a=e.value;if(d(a)){e.handler=me;const u=function(a){fe(a,t,e,n,r,o,s,c)},i=a.subscribe(u),l=e.global;(l.subscriptions=l.subscriptions||[]).push(i)}return void fe(e.value,t,e,n,r,o,s,c)}(e,l,n,r,o,a,u):(l.handler=(t,e)=>ie(e,t,l,r),function(t,e,n,r,o,s,a,u){n.attrName=t,n.element=r,n.howToSet=o,typeof e===c.function?u&&ne.includes(t)?Zt(t,e,r,t,s,a):ge(n,e,s,t,r):(n.attrName=t,n.element=r,n.howToSet=o,n.isSpecial=u,re(t,e,r,o,a,s,u))}(e,i,l,n,o,r,u,a),void(l.value=i))}return re(e,i,n,o,u,r,a)}function pe(t,e,n,r,s,a,u){if(!be(e))if(typeof e!==c.object)0!==e.length&&s(n,e,o);else for(const o in e){const c=e[o];le(t,o,n,r,s,a,ae(o),u,c)}}function fe(t,e,n,r,o,s,c,u){return h(t)?function(t,e,n,r,o,s,c,u){const i=t.templater.wrapper;if((i?.tagJsType||i?.original?.tagJsType)!==a.renderOnce)return ge(c,e,t,r,n);return de(e,n,r,o,s,t,u)}(o,t,r,e,c,s,n,u):de(t,r,e,c,s,o,u)}function de(t,e,n,r,o,s,c){if(!1===r){switch(t){case void 0:case!1:case null:return void Ot.push((function(){e.removeAttribute(n)}))}if(h(t))return ce(e,t,s,n);o(e,n,t)}else Zt(n,t,e,r,s,c)}function ge(t,e,n,r,o){const s=t.value;return s&&s.tagFunction&&s.support?(s.tagFunction=e,s.support=n,s):ce(o,e=ee(e,n),n,r)}function he(t){return b(t)&&"tagJsVar"in t?t.tagJsVar:-1}function be(t){return null==t||!1===t}const me=()=>{},ye="object"==typeof document&&document.createElement("div");function ve(t,e,n,r,s,c,a,u,i=[]){const l=[];a&&void 0===u&&c>0&&(u=document.createTextNode(o),Vt.push({element:u,relative:a}),a=void 0);for(let o=0;o<t.length;++o){const p=t[o],f={};l.push(f);const d=p.v;if(!isNaN(d)){const t=s.length;Se(e[t],t,s,n,i,r,c,a,u);continue}if("text"===p.nn){Ce(f,p,a,u);continue}const g=we(f,p,e,n,s,r,a,u);p.ch&&(f.ch=ve(p.ch,e,n,r,s,c+1,g,u,i).dom)}return{subs:i,dom:l,context:s}}function we(t,e,n,r,o,s,c,a){const u=t.domElement=document.createElement(e.nn);return e.at&&e.at.map((t=>{const e=t[0],c=t[1],a=t[2]||!1;le(n,e,u,r,Gt,o,a,s,c)})),c?Vt.push({element:u,relative:c}):Jt.push({element:u,relative:a}),u}function Ce(t,e,n,r){const o=t,s=o.tc=e.tc;ye.innerHTML=s;const c=o.domElement=document.createTextNode(ye.innerText);n?Vt.push({element:c,relative:n}):Jt.push({element:c,relative:r})}function Se(t,e,n,r,s,c,a,u,i){const l=document.createTextNode(o),p=ke(t,n,a>0);if(p.placeholder=l,u?Vt.push({relative:u,element:l}):Jt.push({relative:i,element:l}),d(t))return s.push({insertBefore:l,appendTo:u,subject:t,support:r,counts:c,contextItem:p}),void(p.handler=me);p.handler=(t,e,n,r)=>Ve(r,t,n);r.subject.global.locked=!0,qe(t,p,r,c,u,i);delete r.subject.global.locked,p.value=t}function je(t,e,n,r){const o=t.subject.global;o.oldest=t,o.newest=t,++Nt.locks;const s=function(t,e,n,r){const o=function(t){const e=t.templater,n=e.tag;if(n.tagJsType===a.dom)return n.dom;return Fn(n.strings,n.values)}(t),s=t.templater.tag,c=s.values,u=[],i=t.subject.global;i.context=u;const l=ve(o,c,t,e,u,0,n,r);return l}(t,e,n,r);return o.htmlDomMeta=s.dom,--Nt.locks,s}function ke(t,e,n){const r={value:t,checkValueChange:He,withinOwnerElement:n};return e.push(r),r}function Te(t,e,n){const r=e.global.newest;r.ownerSupport=t,e.checkValueChange=zt;const o=je(r,n,void 0,e.placeholder);for(const t of o.subs)Ye(t);return r}function Ee(){return{tagJsType:a.templater}}function Ae(t,e,n){const r=dt(t,e,e.appSupport,n);return n.global.context=[],r}function xe(t,e,n,r){const o=t[e],s=n[e];if(o===s.value)return;(0,s.handler)(o,t,r,s),s.value=o}function Oe(t,e){const n=t.subject.global.context;!function(t,e){const n=e.templater.tag||e.templater,r=e.templater.values||n.values,o=t.templater.tag;o.values=r}(t,e),++Nt.locks,function(t,e){const n=t.templater.tag.values;let r=0;const o=n.length;for(;r<o;)xe(n,r,e,t),++r}(t,n),--Nt.locks,Rt()}const Pe={added:0,removed:0};function Ve(t,e,n){if(e===t.value)return;const r=t.checkValueChange(e,t);if(-1===r)return;const o=e&&e.tagJsType;if(o){if(o===a.renderOnce)return;Ne(t,e,n)}else m(e)?Ie(t,e,n,{added:0,removed:0}):typeof e!==c.function?r&&function(t,e){e.checkValueChange=He;const n=e.placeholder,r=Mt(t);e.simpleValueElm=It(r,n)}(e,t):t.value=e}function Je(t,e,r){if(!e.global.newest)return void Ke(t,e,r,{added:0,removed:0});!function(t,e,r){const o=r.global,s=o.newest,c=s.templater.wrapper,u=e.templater.wrapper;let i=!1;const l=e.templater.tagJsType,p=a.stateRender===l||a.renderOnce===l;if(p)i=e.templater.tagJsType===a.renderOnce||Ft(s,e);else if(c&&u){i=c.original===u.original}const f=e.templater;if(!i)return void function(t,e,r){const o=t.global,s=o.oldest;Ut(s),n(t);const c=Ke(e,t,r,{added:0,removed:0})}(r,f,t);const d=p||Ct(s,f);if(!d){return void function(t,e,n,r,o){const s=t.props,c=tn(e,n,r,s,o),a=e.propsConfig;a.castProps=c;const u=n.propsConfig;u.latest=a.latest}(f,e,s,t,f.propWatch===yt.DEEP?Tt:kt)}if(o.locked)return void o.blocked.push(e);un(e)}(r,gt(t,r,r.appSupport,e),e)}function We(t,e,n,r){typeof n!==c.function&&function(t,e,n,r){const o=gt(n.templater||n,r,r.appSupport,e);Oe(t.subject.global.oldest,o)}(t,e,n,r)}function Ne(t,e,r){const o=e.tagJsType;if(f(e))return void 0===t.global&&n(t),Je(e,t,r),!0;const s=t.global;if(s){const n=s.newest;if(n)return We(n,t,e,r),!0}switch(o){case a.templater:return Te(r,t,Pe),!0;case a.tag:case a.dom:return function(t,e,r){const o=t;let s=o.templater;s||(s=Ee(),o.templater=s,s.tag=o),(e.global?e.global:n(e)).newest=Ae(s,r,e),Te(r,e,Pe)}(e,t,r),!0}return!1}function Re(t,e,r){r.checkValueChange=zt;const o=t;let s=o.templater;s||(s=nt(yt.DEEP),s.tag=o,o.templater=s);const c=r.global=n(r),a=c.newest=gt(s,e,e.appSupport,r);return c.oldest=a,r}function Ie(t,e,n,r,o){t.lastArray||(t.lastArray=[]);const s=t.lastArray;let c=t.placeholder,a=0;const u=[];for(let t=0;t<s.length;++t){const n=s[t],o=$e(n,e,t,s,a,r);0!==o?(a+=o,2===o&&(t-=1)):u.push(n)}t.lastArray=u;const i=o,l=e.length;for(let t=0;t<l;++t){c=Me(e,t,u,n,c,r,i).placeholder}}function Me(t,e,n,r,o,s,c){const a=t[e],u=n[e];return u?function(t,e,n,r,o,s,c,a){const u=n.length>o;if(u)return Ve(e,t,r),e;const i=De(t,s,r,c,n,a);return i}(a,u,n,r,e,o,s,c):De(a,o,r,s,n,c)}function De(t,e,n,r,o,s){const c={value:t,checkValueChange:He,withinOwnerElement:!1};r.added=r.added+1;const u=document.createTextNode("");return c.placeholder=u,s||Jt.push({element:u,relative:e}),function(t,e,n){const r=t.tagJsType;if(r)switch(r){case a.templater:Re(t.tag,e,n);break;case a.tag:case a.dom:Re(t,e,n)}}(t,n,c),qe(t,c,n,r,s),c.value=t,o.push(c),s&&Vt.push({element:u,relative:s}),c}function Le(t,e){const n=t.global;if(n){const t=n.oldest;n.deleted=!0,Ut(t),n.deleted=!0}else{const e=t.simpleValueElm;delete t.simpleValueElm,xt.push(e)}++e.removed}function $e(t,e,n,r,o,s){const c=e.length-1,a=n-o,u=a<0||c<a,i=r[n];return u?(Le(i,s),++o,1):r[n].value.arrayValue!==e[n].arrayValue?(Le(i,s),r.splice(n,1),++o,2):0}function _e(t,e){if(!m(t)){return Be(e,e.lastArray),9}return!1}function Be(t,e){const n={added:0,removed:0};for(let t=0;t<e.length;++t)Le(e[t],n);delete t.lastArray}function He(t,e){if(null==t||typeof t!==c.object)return function(t,e){const n=Mt(t),r=e.simpleValueElm;Pt.push([n,r])}(t,e),-1;const n=e.simpleValueElm;return delete e.simpleValueElm,xt.push(n),6}function Ue(t,e,n){const r=nt(yt.DEEP);r.tagJsType=t.tagJsType;const o=Ae(r,n,e);function s(){return r.tag=t(),o}return r.wrapper=s,s.tagJsType=t.tagJsType,s.original=t.original||t,o}function Fe(t,e){const n=t.rearray;n.length&&n.length!==t.stateArray.length&&function(t,e,n){const r=`Saved states between renders are inconsistent. Expected ${t.length} states got ${n.stateArray.length}.`,o=e.templater?.wrapper;let s=o;(o?.original||o?.original)&&(s=o.original);const c={oldStates:n.stateArray,newStates:n.rearray,tagFunction:s,templater:e.templater},a=new q(r,c);throw console.error(ze,c),a}(n,e,t)}const ze="State tracking requires same number of state calls on every render. This error typically occurs when a state call is only reachable behind a condition. Also, wrapping tags that have state, with tag(), often helps when tag is only reachable by a condition.";function Ge(t,e){const n=t.subject;++n.renderCount;const r=D.stateConfig;delete r.support,t.state=r.stateArray,D.tagClosed$.next(e),Fe(r,t),n.global.newest=t}function Ze(t,e,n,r){const o=n.global,s=n.renderCount,c=e?.state,u=D.stateConfig;if(c){const n=e.states;u.prevSupport=e,W(t,D.stateConfig,c,n)}else J(t,u);const i=t.templater;let l;if(i.tagJsType===a.stateRender){l=ut(i,i,gt(i,r,t.appSupport,n)),l.states=t.states}else{l=(0,i.wrapper)(t,n,e),l.states=t.states}return Ge(l,r),n.renderCount>s+1?o.newest:l}function Xe(t,e,n,r,o,s){n.checkValueChange=zt;const c=Ae(t,e,n);c.ownerSupport=e;const a=je(c,r,o,o?void 0:s);for(const t of a.dom)t.marker&&(o?Vt.push({element:t.marker,relative:o}):Jt.push({element:t.marker,relative:s})),t.domElement&&(o?Vt.push({element:t.domElement,relative:o}):Jt.push({element:t.domElement,relative:s}));let u=-1;const i=a.subs.length-1;for(;u++<i;){Ye(a.subs[u])}return c}function qe(t,e,r,o,s,c){const u=t?.tagJsType;return u?function(t,e,r,o,s,c,u){switch(t){case a.templater:return e.checkValueChange=zt,c?Xe(r,o,e,s,c,u):Te(o,e,s);case a.dom:case a.tag:{e.checkValueChange=zt;const t=r;let a=t.templater;a||(a=function(t){const e=Ee();return e.tag=t,t.templater=e,e}(t));const i=n(e);return c?Xe(a,o,e,s,c,u):(i.newest=Ae(a,o,e),e.checkValueChange=zt,Te(o,e,s))}case a.stateRender:case a.tagComponent:if(n(e),e.checkValueChange=zt,c){const t=function(t,e,n,r,o){const s=gt(t,n,n.appSupport,e),c=s.propsConfig;if(c){const e=t.tagJsType!==a.tagComponent?[]:ht(t,s);c.castProps=e}const u=e.global,{support:i}=on(s,u.newest,e,n);return function(t,e,n){let r=Vt.length;const o=je(t,e,n,void 0);for(const t of o.dom)t.domElement&&Vt.splice(r++,0,{element:t.domElement,relative:n}),t.marker&&Vt.splice(r++,0,{element:t.marker,relative:n});const s=o.subs;for(const t of s)Ye(t)}(i,r,o),i}(r,e,o,s,c);return t}return Ke(r,e,o,s);case a.renderOnce:{n(e);const t=Ue(r,e,o);Ze(t,void 0,e,o);const a=Xe(t.templater,o,e,s,c,u);return e.checkValueChange=zt,a}}}(u,e,t,r,o,s,c):m(t)?(Ie(e,t,r,o,s),void(e.checkValueChange=_e)):void(d(t)||function(t,e,n){const r=Mt(t),o=It(r,n);e.simpleValueElm=o,e.checkValueChange=He}(t,e,e.placeholder))}function Qe(t,e,n){t!==e.value&&(Ve(e,t,n),D.stateConfig.support||Rt())}function Ye({subject:t,support:e,counts:n,contextItem:r,appendTo:o}){let s=function(t){qe(t,r,e,{...n},c?o:void 0),c||D.stateConfig.support||Rt(),s=function(t){Qe(t,r,e)}};let c=!0;const a=t.subscribe((function(t){s(t)}));r.subject=t,c=!1;const u=e.subject.global;(u.subscriptions=u.subscriptions||[]).push(a)}function Ke(t,e,n,r){const o=gt(t,n,n.appSupport,e),s=o.propsConfig;if(s){const e=t.tagJsType!==a.tagComponent?[]:ht(t,o);s.castProps=e}const c=e.global,{support:u}=on(o,c.newest,e,n);return function(t,e,n){n.checkValueChange=zt;const r=je(t,e,void 0,n.placeholder).subs;for(const t of r)Ye(t)}(u,r,e),u}function tn(t,e,n,r,o,s=-1){const c=e.subject.global.newest;if(!c){const e=ot(r,t,s);r.push(...e);return t.propsConfig.castProps=e,r}const a=(e=c||e).propsConfig.castProps,u=[];for(let e=0;e<r.length;++e){const c=r[e],i=en(a[e],c,t,n,s+1,o);u.push(i)}return t.propsConfig.castProps=u,u}function en(t,e,n,r,o,s){return typeof t===c.function?e.mem?(t.mem=e.mem,e):(t.mem=e,t):s===o||at(e)?e:m(e)?function(t,e,n,r,o){for(let s=t.length-1;s>=0;--s){const c=t[s];t[s]=en(e[s],c,n,r,o+1,s)}return t}(e,t,n,r,s):void 0===t?e:function(t,e,n,r,o,s){const c=Object.keys(t);for(const a of c){const c=t[a],u=en(e[a],c,n,r,s,o+1);if(t[a]===u)continue;const i=Object.getOwnPropertyDescriptor(t,a)?.set;i||(t[a]=u)}return t}(e,t,n,r,s,o)}function nn(t){const e=t.subject.global,{subs:r,tags:o}=$t(e.context);rn(t);for(const t of o)rn(t);e.subscriptions&&r.forEach((t=>t.unsubscribe())),n(t.subject)}function rn(t){const e=t.subject,n=e.global;!0!==n.deleted&&(n.deleted=!0,e.renderCount=0,_t(t,[]))}function on(t,e,n,r){const o=e?.templater,s=o?.tag,c=Ze(t,e,n,r),u=!e||Ft(e,c);if(u){if(e){const t=e.templater.tag;t&&n.renderCount>0&&function(t,e,n){if(t.tagJsType===a.dom){const r=n?.dom;return void(r!==t.dom&&nn(e))}if(n){const r=n.strings;if(r){const n=r?.length;n!==t.strings.length&&nn(e)}}}(t,e,s)}}else{!function(t,e){const n=t.subject.global;let r=-1;const o=n.providers=n.providers||[],s=o.length-1;for(;r++<s;){const t=o[r];let s=-1;const c=t.children.length-1;for(;s++<c;)if(n===t.children[s].subject.global)return t.children.splice(s,1),void t.children.push(e)}}(e,c),nn(e);const t=c.subject.global;t.oldest=c,t.newest=c}const i=e?.ownerSupport;return c.ownerSupport=r||i,{support:c,wasLikeTags:u}}const sn={added:0,removed:0};function cn(t,e,n,r){const o=r.global,{support:s,wasLikeTags:c}=on(e,t,r,n);return c?(Oe(o.oldest,s),s):(Te(n,r,sn),s)}function an(t){return a.templater===t.tagJsType}function un(t){const e=t.subject.global,n=an(t.templater),r=t.ownerSupport;if(e.locked)return e.blocked.push(t),t;if(n)return ln(r,t);e.locked=!0;const o=t.subject;e.blocked.length&&(t=e.blocked.pop(),e.blocked=[]),delete e.locked;return cn(e.newest,t,r,o)}function ln(t,e){const n=t.subject.global;if(!n||!0===n.deleted)return e;return un(n.newest||t)}function pn(t,e){return t.length!==e.length}function fn(t){const e=yn();if(!e)throw hn;return dn(e,D.stateConfig,t)}function dn(t,e,n){const r=e.stateArray,o=e.states;return function(...e){return t.subject.renderCount>0?function(t,e,n,...r){const o=t.subject.global,s=(t=o.newest).state;L(s,n.stateArray,t.states,n.states);const c=e(...r);return L(n.stateArray,s,n.states,t.states),un(t),g(c)&&c.finally((()=>{L(n.stateArray,s,n.states,t.states),un(t)})),c}(t,n,{stateArray:r,states:o},...e):n(...e)}}const gn=()=>{const t=yn();if(!t)throw hn;const e=D.stateConfig;return function(n){return dn(t,e,n)}},hn=new Q("callback() was called outside of synchronous rendering. Use `callback = callbackMaker()` to create a callback that could be called out of sync with rendering");function bn(t){O(t)}function mn(t){O((function(){yn().subject.global.destroy$.toCallback(t)}))}function yn(){return D.stateConfig.support}const vn=":tagvar",wn=":";function Cn(t,e){const n={values:e,ownerSupport:yn(),tagJsType:a.tag,strings:t,key:t=>(n.arrayValue=t,n),html:function(t,e){return n.children={strings:t,values:e},n}};return n}function Sn(t,e){const n={values:e,ownerSupport:yn(),dom:t,tagJsType:a.dom,key:function(t){return n.arrayValue=t,n},html:{dom:function(t,e){return n.children={dom:t,values:e},n}}};return n}const jn="ondoubleclick",kn=/(:tagvar\d+:)/,Tn=/(^:tagvar\d+:|:tagvar\d+:$)/g,En="__safeTagVar",An=/([:_a-zA-Z0-9\-.]+)\s*(?:=\s*"([^"]*)"|=\s*(\S+))?/g,xn=/<\/?([a-zA-Z0-9-]+)((?:\s+[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)+\s*|\s*)\/?>/g;function On(t,e){Pn(t,e);const n=function(t){const e=[],n=[],r=[];let o=null,s=-1,c=0;const a=new RegExp(xn,"g");t=function(t){return t.replace(Wn,(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);for(;c<t.length;){const u=a.exec(t);if(!u)break;const[i,l,p]=u,f=i.startsWith("</"),d=i.endsWith("/>");if(c<u.index){const e=t.slice(c,u.index);if(e.trim()){Vn(e).forEach((t=>{t.startsWith(vn)&&(t=vn+ ++s+wn),Jn(o,n,t)}))}}if(c=u.index+i.length,f){o=r.pop()||null;continue}const g=[];let h;for(;null!==(h=An.exec(p));){const t=h[1]||h[3]||h[5];let n=h[2]||h[4]||h[6];if(void 0===t)continue;const r=""!==h[2],o=void 0===n&&r,c=t.toLowerCase(),a=c.startsWith("on")?Rn(c):c;if(o){if(t.slice(0,vn.length)===vn){const t=vn+ ++s+wn;e.push(["at",t]),g.push([t]);continue}if(h[0].startsWith(t)&&h[0].slice(t.length,h[0].length).search(/\s+$/)>=0){g.push([a]);continue}n=vn+ ++s+wn}r||(n=h[2]);const u=[a,n],i=ae(c);i&&u.push(i),g.push(u)}const b={nn:l};g.length&&(b.at=g),o?(o.ch||(o.ch=[]),o.ch.push(b)):n.push(b),d||(r.push(o),o=b)}if(c<t.length){const e=t.slice(c);if(e.trim()){Vn(e).forEach((t=>(t.startsWith(vn)&&++s,Jn(o,n,t))))}}return n}(Pn(t,e).join(""));return n}function Pn(t,e){return function(t,e){const n=t.map(((t,n)=>n<e.length?t+vn+n+wn:t));return function(t,e,n){const r=n.length-e.length;if(r>0)for(let n=r;n>0;--n)t.push(vn+(e.length+n-1)+wn)}(n,t,e),n}(t.map((t=>t.replace(Tn,((t,e)=>En+e)))),e)}function Vn(t){return t.split(kn).filter((t=>""!==t))}function Jn(t,e,n){!function(t,e,n){t?(t.ch||(t.ch=[]),t.ch.push(n)):e.push(n)}(t,e,{nn:"text",tc:Nn(n)})}const Wn=new RegExp("(\x3c!--[\\s\\S]*?--\x3e)","g");function Nn(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 Rn(t){if(t.startsWith("on")){return t.length===jn.length&&t===jn?"dblclick":t.slice(2,t.length)}return t}const In=new RegExp(vn+"(\\d+)"+wn,"g"),Mn="ch";function Dn(t,e,n=[],r=[]){const o=t;for(let t=0;t<o.length;t++){const s=[...r,t],c=o[t];if(c.at){const t=c.at;c.at=$n(t,e)}if(c.ch){const t=c.ch,r=[...s,Mn];c.ch=Dn(t,e,n,r)}t=Ln(c,e,o,t)}return o}function Ln(t,e,n,r){if("text"!==t.nn)return r;const o=t;let c,a=o.tc;if(typeof a!==s.string)return r;for(;null!==(c=In.exec(a));){const t=c[1],o=parseInt(t,10);if(!isNaN(o)&&o<e){const t=vn+o+wn,e=a.slice(c.index+t.length);n.splice(r,1,{nn:"text",v:o}),a=e,In.lastIndex=0}}return o.tc=a,r}function $n(t,e){return t.map((t=>{const[n,r,o]=t;if(n.startsWith(vn)){const t=parseInt(n.replace(vn,""),10);if(!isNaN(t)&&t<e)return[{tagJsVar:t}]}if(typeof r===s.string&&r.startsWith(vn)){const t=parseInt(r.replace(vn,""),10);if(!isNaN(t)&&t<e)return[n,{tagJsVar:t},o]}return t}))}const _n="__safeTagVar";const Bn=/__safeTagVar(\d+)/g;function Hn(t){if(t.at&&(t.at=t.at?t.at.map((t=>{if(1===t.length)return t;const[,e]=t;if(typeof e===s.string&&e.startsWith(_n)){const n=parseInt(e.replace(_n,""),10);t[1]=vn+n+wn}return t})):[]),t.ch){const e=t.ch;for(let t=0;t<e.length;t++){const n=e[t];if("text"===n.nn){if(typeof n.tc!==s.string)return;n.tc=n.tc.replace(Bn,((t,e)=>vn+e+wn))}Hn(n)}0===e.length&&delete t.ch}}const Un={};function Fn(t,e){const n=function(t){const e=t.map((t=>t.length));return e.push(t.length),Number(e.join(""))}(t),r=Un[n],o=r&&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,r);if(o)return r.domMetaMap;const s=Dn(On(t,e),e.length);s.forEach(Hn);const c={interpolation:void 0,string:void 0,strings:t,values:e,domMetaMap:s};return Un[n]=c,s}function zn(t,...e){const n=Cn(t,e),r=nt(yt.NONE);return r.tag=n,n.templater=r,n}zn.dom=function(t,...e){return Sn(t,e)};const Gn=[];function Zn(t,e,r){const o=Gn.findIndex((t=>t.element===e));o>=0&&(Ut(Gn[o].support),Gn.splice(o,1),console.warn("Found and destroyed app element already rendered to element",{element:e}));let s=()=>l(r);s.propWatch=yt.NONE,s.tagJsType=a.stateRender,s.props=[r],s.isApp=!0;const u=function(t,e){const r={value:t,checkValueChange:zt,withinOwnerElement:!1,renderCount:0,global:void 0},o=n(r);return o.events={},Xn(t,r,e),r}(s,e),i=u.global;J(i.newest,D.stateConfig);let l=t(r);const p=typeof l==c.function;p||(f(l)?(i.newest.propsConfig={latest:[r],castProps:[r]},s.propWatch=l.propWatch,s.tagJsType=l.tagJsType,s.wrapper=l.wrapper,s=l):(s.tag=l,l=t));const d=document.createTextNode("");rt.push(s.wrapper||{original:s});const g=qn(s,d,e,u,p);if(i.isApp=!0,p&&(l.tag=g.templater.tag),!e)throw new Error(`Cannot tagElement, element received is type ${typeof e} and not type Element`);e.destroy=function(){const t=i.events;for(const n in t){const r=t[n];e.removeEventListener(n,r)}i.events={};const n=Ut(g);return Rt(),n},++Nt.locks;const h=je(g,{added:0,removed:0},e,void 0);i.oldest=g,i.newest=g;let b=s.setUse;if(s.tagJsType!==a.stateRender){const e=t.original;b=e.setUse,e.isApp=!0}e.setUse=b,e.ValueTypes=a,Gn.push({element:e,support:g});const m=document.createDocumentFragment();m.appendChild(d);for(const t of h.dom)Qn(t,m);for(const t of h.subs)Ye(t);return--Nt.locks,Rt(),e.appendChild(m),{support:g,tags:rt,ValueTypes:a}}function Xn(t,e,n){const r=e.global,o=pt(t,e);return ft(t,o,o),o.appElement=n,r.oldest=r.oldest||o,r.newest=o,o}function qn(t,e,n,r,o){r.placeholder=e;const s=r.global,c=s.newest,u=s.oldest;if(c===u||W(c,D.stateConfig,u.state,u.states),t.tagJsType===a.stateRender){const e=t.wrapper||{original:t};if(!o){const e=Xn(t,r,n);return Ge(e),e}const s=ut(t,e,c);return Ge(s),s}const i=(0,t.wrapper)(c,r);return Ge(i),i}function Qn(t,e){t.domElement&&e.appendChild(t.domElement),t.marker&&e.appendChild(t.marker)}const Yn={tagElement:Zn,renderWithSupport:on,renderSupport:un,renderTagOnly:Ze,paint:Rt};var Kn=e.W9,tr=e.cg,er=e.m0,nr=e.rS,rr=e.Y2,or=e.ei,sr=e.B7,cr=e.TU,ar=e.XF,ur=e.PC,ir=e.Ot,lr=e.Mj,pr=e.tD,fr=e.j8,dr=e.um,gr=e.E2,hr=e.OH,br=e.TB,mr=e.Ii,yr=e.yV,vr=e.zV,wr=e.ze,Cr=e.WJ,Sr=e.aZ,jr=e.O,kr=e.Ie,Tr=e.B4,Er=e.Az,Ar=e.Xi,xr=e.pc,Or=e.Ah,Pr=e.ck,Vr=e.k6,Jr=e.Gk,Wr=e.cF,Nr=e.PB,Rr=e.qy,Ir=e.cy,Mr=e.Tn,Dr=e.Gv,Lr=e.yL,$r=e.D8,_r=e.Ze,Br=e._4,Hr=e.mn,Ur=e.Eb,Fr=e.z,zr=e.sA,Gr=e.MG,Zr=e.PL,Xr=e.nI,qr=e.PZ,Qr=e.N_,Yr=e.r5,Kr=e.uc,to=e.pG,eo=e.QB,no=e.R6,ro=e.Ll,oo=e.vP,so=e.wk,co=e.xP,ao=e.bc,uo=e.ag,io=e.Tc,lo=e.Hf,po=e._A,fo=e.Ag,go=e.NU,ho=e.hW,bo=e.wB,mo=e.id,yo=e.MC,vo=e.zC;export{Kn as ArrayNoKeyError,tr as BasicTypes,er as ImmutableTypes,nr as PropWatches,rr as RouteQuery,or as StateMismatchError,sr as Subject,cr as Subjective,ar as SyncCallbackError,ur as TagError,ir as ValueSubject,lr as ValueSubjective,pr as ValueTypes,fr as addOneContext,dr as buildBeforeElement,gr as callback,hr as callbackMaker,br as checkArrayValueChange,mr as checkSimpleValueChange,yr as checkTagValueChange,vr as combineLatest,wr as createTrigger,Cr as defineValueOn,Sr as destroyArray,jr as destroySupport,kr as empty,Tr as getBaseSupport,Er as getDomMeta,Ar as getDomTag,xr as getHtmlSupport,Or as getNewGlobal,Pr as getStringTag,Vr as getSupport,Jr as getTemplaterResult,Wr as hmr,Nr as howToSetInputValue,Rr as html,Ir as isArray,Mr as isFunction,Dr as isObject,Lr as isPromise,$r as isSimpleType,_r as isStaticTag,Br as isSubjectInstance,Hr as isTagComponent,Ur as key,Fr as letProp,zr as onDestroy,Gr as onInit,Zr as oneRenderToSupport,Xr as paint,qr as processFirstSubjectValue,Qr as processSubUpdate,Yr as providers,Kr as renderSupport,to as renderTagOnly,eo as renderWithSupport,no as runWrapper,ro as setUseMemory,oo as signal,so as state,co as states,ao as subject,uo as syncError,io as tag,lo as tagElement,po as tags,fo as upgradeBaseToSupport,go as variablePrefix,ho as variableSuffix,bo as watch,mo as willCallback,yo as willPromise,vo as willSubscribe};
|
|
2
2
|
//# sourceMappingURL=bundle.js.map
|