UNPKG

doz-router

Version:
3 lines 87 kB
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function o(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=o(r);fetch(r.href,i)}})();function Ze(e,t){if(typeof e!="object"||e==null)throw new TypeError("expected an object!");let o=Object.assign({},e),n=Object.keys(e);for(let r=n.length-1;r>=0;--r){let i=o[n[r]];typeof i=="function"?o[n[r]]=i.bind(t):typeof i=="object"&&i!=null&&(o[n[r]]=Ze(i,t))}return o}const gt=/\n/g,bt=/\s+/g,Le=" ";let se;const Ae={create(e,t){let o;e=e.replace(gt,Le),e=e.replace(bt,Le);let n=document.createElement("div");return n.innerHTML=e,t&&n.childNodes.length>1?(o=document.createElement(t),o.innerHTML=n.innerHTML):o=n.firstChild||document.createTextNode(""),o},decode(e){return se=se||document.createElement("div"),se.innerHTML=e,se.textContent}},Qe="componentDynamicInstance",E="componentInstance",U="componentRootInstance",D="props",Je="__default__",wt={SVG:"http://www.w3.org/2000/svg"},v={ROOT:"dz-root",EACH:"dz-each-root",APP:"dz-app",EMPTY:"dz-empty",MOUNT:"dz-mount",SLOT:"dz-slot",SLOT_UPPERCASE:"DZ-SLOT",SUFFIX_ROOT:"-root",TEXT_NODE_PLACE:"dz-text-node",ITERATE_NODE_PLACE:"dz-iterate-node"},R={IS_DIRECTIVE:/^d[-:][\w-]+$/,IS_CUSTOM_TAG:/^\w+-[\w-]+$/,IS_CUSTOM_TAG_STRING:/<\w+-[\w-]+/,IS_LISTENER:/^on/,IS_ID_SELECTOR:/^#[\w-_:.]+$/,IS_PARENT_METHOD:/^parent.(.*)/,IS_STRING_QUOTED:/^"\w+"/,IS_SVG:/^svg$/,GET_LISTENER:/^this.(.*)\((.*)\)/,GET_LISTENER_SCOPE:/^scope.(.*)\((.*)\)/,IS_LISTENER_SCOPE:/(^|\()scope[.)]/g,TRIM_QUOTES:/^["'](.*)["']$/,THIS_TARGET:/\B\$this(?!\w)/g,HTML_MARKUP:/<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.0-9_a-z]*)\s*([^>]*?)(\/?)>|<\/>/ig,HTML_ATTRIBUTE:/(^|\s)([\w-:]+)(\s*=\s*("([^"]+)"|'([^']+)'|(\S+)))?/ig,MATCH_NLS:/\n\s+/gm,REPLACE_QUOT:/"/g,REPLACE_D_DIRECTIVE:/^d[-:]/,EXTRACT_STYLE_DISPLAY_PROPERTY:/display(?:\s+)?:(?:\s+)?([\w-]+)/},$e={FORCE_UPDATE:"forceupdate"},Et={},Pt={tags:{},ids:{}},Tt=[],kt={},It=[],vt={};var P={components:Et,webComponents:Pt,plugins:Tt,directives:kt,directivesKeys:It,directivesMethodsMap:vt};function et(e){const t=e.tag.toUpperCase();Object.prototype.hasOwnProperty.call(P.components,t)&&console.warn("Doz",`component ${t} overwritten`),P.components[t]=e}function Lt(){P.components={}}function St(e){return e=e.toUpperCase(),P.components[e]}function tt(e){P.plugins.push(e)}function ot(e,t={}){if(typeof e!="string")throw new TypeError("Doz directive name must be a string");if(typeof t!="object"||!t)throw new TypeError("Doz directive config must be an object");e[0]===":"&&(t._onlyDozComponent=!0,e=e.substring(1)),e=e.toLowerCase();let o=[];e.indexOf("-")!==-1&&(o=e.split("-"),e=o[0],o.shift()),t.name=e,t._keyArguments=o.map(n=>n.substring(1)),Object.prototype.hasOwnProperty.call(P.directives,e)&&console.warn("Doz",`directive ${e} overwritten`),P.directives[e]=t,P.directivesKeys.includes(e)||P.directivesKeys.push(e);for(let n in t)typeof t[n]=="function"&&n[0]==="o"&&n[1]==="n"&&n[2]==="A"&&n[3]==="p"&&n[4]==="p"&&(t[n].___this___=t,P.directivesMethodsMap[n]?P.directivesMethodsMap[n].push(t[n]):P.directivesMethodsMap[n]=[t[n]])}var nt={registerComponent:et,registerPlugin:tt,getComponent:St,registerDirective:ot,removeAll:Lt,data:P};function T(...e){let t=e.shift(),o;for(let n=0;n<e.length;n++)if(typeof e[n]=="function"){o=e[n];break}if(P.directivesMethodsMap[t])for(let n=0;n<P.directivesMethodsMap[t].length;n++){let r=P.directivesMethodsMap[t][n],i=r.apply(r.___this___,e);i!==void 0&&o&&o(i)}}function Ot(...e){let t=["onAppInit"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Mt(...e){let t=["onAppComponentCreate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Dt(...e){let t=["onAppComponentBeforeCreate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Rt(...e){let t=["onAppComponentConfigCreate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function zt(...e){let t=["onAppComponentBeforeMount"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Bt(...e){let t=["onAppComponentMount"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Ut(...e){let t=["onAppComponentMountAsync"];Array.prototype.push.apply(t,e),T.apply(null,t)}function jt(...e){let t=["onAppComponentBeforeUpdate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Nt(...e){let t=["onAppComponentUpdate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Ht(...e){let t=["onAppComponentDrawByParent"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Wt(...e){let t=["onAppComponentAfterRender"];Array.prototype.push.apply(t,e),T.apply(null,t)}function qt(...e){let t=["onAppComponentBeforeUnmount"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Ft(...e){let t=["onAppComponentUnmount"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Kt(...e){let t=["onAppComponentBeforeDestroy"];Array.prototype.push.apply(t,e),T.apply(null,t)}function xt(...e){let t=["onAppComponentSetConfig"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Gt(...e){let t=["onAppComponentSetProps"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Vt(...e){let t=["onAppComponentLoadProps"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Xt(...e){let t=["onAppComponentDestroy"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Yt(...e){let t=["onAppComponentAssignIndex"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Zt(...e){let t=["onAppWalkDOM"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Qt(...e){let t=["onAppComponentAssignName"];Array.prototype.push.apply(t,e),T.apply(null,t)}function Jt(...e){let t=["onAppComponentPropsAssignName"];Array.prototype.push.apply(t,e),T.apply(null,t)}function $t(...e){let t=["onAppDOMElementCreate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function eo(...e){let t=["onAppDynamicInstanceCreate"];Array.prototype.push.apply(t,e),T.apply(null,t)}function to(...e){let t=["onAppComponentRenderOverwrite"];Array.prototype.push.apply(t,e),T.apply(null,t)}function oo(...e){let t=["onAppComponentWaitMount"];Array.prototype.push.apply(t,e),T.apply(null,t)}var no={callAppInit:Ot,callAppComponentCreate:Mt,callAppComponentLoadProps:Vt,callAppComponentSetConfig:xt,callAppComponentSetProps:Gt,callAppComponentDestroy:Xt,callAppComponentAssignIndex:Yt,callAppComponentBeforeCreate:Dt,callAppComponentConfigCreate:Rt,callAppComponentBeforeMount:zt,callAppComponentMount:Bt,callAppComponentBeforeDestroy:Kt,callAppComponentUnmount:Ft,callAppComponentBeforeUnmount:qt,callAppComponentAfterRender:Wt,callAppComponentDrawByParent:Ht,callAppComponentUpdate:Nt,callAppComponentBeforeUpdate:jt,callAppComponentMountAsync:Ut,callAppWalkDOM:Zt,callAppComponentAssignName:Qt,callAppDOMElementCreate:$t,callAppDynamicInstanceCreate:eo,callAppComponentPropsAssignName:Jt,callAppComponentRenderOverwrite:to,callAppComponentWaitMount:oo},ro=function(t){for(let o in t)return!1;return!0};function io(e){let t;ro(e.props)?t=e._rawProps:t=e.props,e._directiveProps||(e._directiveProps={});for(let o in t)if(Y(o)){let n=o.substring(2);e._directiveProps[n]=t[o]}return e._directiveProps}function Y(e){return e[0]==="d"&&(e[1]==="-"||e[1]===":")}function so(e){if(!e._dozAttach[D]||!e._dozAttach[D].style)return null;let t=e._dozAttach[D].style.match(R.EXTRACT_STYLE_DISPLAY_PROPERTY);return t?t[1]:null}function Ee(e){e=e.replace(R.REPLACE_D_DIRECTIVE,"");let t=e,o=[];return t.indexOf("-")!==-1&&(o=t.split("-"),t=o[0],o.shift()),[t,o]}function z(...e){let t=e[0],o=e[1];e.shift();let n=o._directiveProps||io(o);o._directiveKeys||(o._directiveKeys=Object.keys(n)),o._directiveKeys.forEach(r=>{let i=[],l={},s=r;r.indexOf("-")!==-1&&(i=r.split("-"),r=i[0],i.shift());let a=P.directives[r];if(a&&typeof a[t]=="function"){let p=Object.assign([],e);p.push(n[s]),a._keyArguments.forEach((u,f)=>l[u]=i[f]),p.push(l),a[t].apply(a,p)}})}function lo(...e){let t=["onComponentBeforeCreate"];Array.prototype.push.apply(t,e),z.apply(null,t)}function ao(...e){let t=["onComponentCreate"];Array.prototype.push.apply(t,e),z.apply(null,t)}function po(...e){let t=["onComponentBeforeMount"];Array.prototype.push.apply(t,e),z.apply(null,t)}function uo(...e){let t=["onComponentMount"];Array.prototype.push.apply(t,e),z.apply(null,t)}function fo(...e){let t=["onComponentMountAsync"];Array.prototype.push.apply(t,e),z.apply(null,t)}function co(...e){let t=["onComponentAfterRender"];Array.prototype.push.apply(t,e),z.apply(null,t)}function ho(...e){let t=["onComponentBeforeUpdate"];Array.prototype.push.apply(t,e),z.apply(null,t)}function yo(...e){let t=["onComponentUpdate"];Array.prototype.push.apply(t,e),z.apply(null,t)}function mo(...e){let t=["onComponentBeforeUnmount"];Array.prototype.push.apply(t,e),z.apply(null,t)}function _o(...e){let t=["onComponentUnmount"];Array.prototype.push.apply(t,e),z.apply(null,t)}function Ao(...e){let t=["onComponentBeforeDestroy"];Array.prototype.push.apply(t,e),z.apply(null,t)}function Co(...e){let t=["onComponentDestroy"];Array.prototype.push.apply(t,e),z.apply(null,t)}function go(...e){let t=["onComponentLoadProps"];Array.prototype.push.apply(t,e),z.apply(null,t)}function bo(...e){let t=["onComponentWaitMount"];Array.prototype.push.apply(t,e),z.apply(null,t)}function wo(e,t,o){let n="onComponentDOMElementCreate";if(!t._dozAttach[D])return;let r=Object.keys(t._dozAttach[D]);for(let i=0;i<r.length;i++){let l=r[i],s=t._dozAttach[D][r[i]];if(Y(l)){let[a,p]=Ee(l),u=s,f=P.directives[a];f&&f[n]&&f[n].apply(f,[e,t,u,o,p])}}}function Eo(e,t){let o="onComponentDOMElementUpdate";if(!t._dozAttach[D])return;let n=Object.keys(t._dozAttach[D]);for(let r=0;r<n.length;r++){let i=n[r],l=t._dozAttach[D][n[r]];if(Y(i)){let[s,a]=Ee(i),p=l,u=P.directives[s];u&&u[o]&&u[o].apply(u,[e,t,p,a])}}}function Po(e,t,o){if(!t||!t.props)return;let n="onComponentVNodeTick",r=Object.keys(t.props);for(let i=0;i<r.length;i++){let l=r[i];if(Y(l)){let[s,a]=Ee(l),p=t.props[l],u=P.directives[s];u&&u[n]&&u[n].apply(u,[e,t,o,p,a])}}}var To={callComponentBeforeCreate:lo,callComponentCreate:ao,callComponentBeforeMount:po,callComponentMount:uo,callComponentMountAsync:fo,callComponentAfterRender:co,callComponentBeforeUpdate:ho,callComponentUpdate:yo,callComponentBeforeUnmount:mo,callComponentUnmount:_o,callComponentBeforeDestroy:Ao,callComponentDestroy:Co,callComponentLoadProps:go,callComponentDOMElementCreate:wo,callComponentDOMElementUpdate:Eo,callComponentVNodeTick:Po,callComponentWaitMount:bo};function ko(e,t={}){ot(e,t)}var h=Object.assign({directive:ko},no,To);function Io(e){if(h.callAppComponentBeforeCreate(e),h.callComponentBeforeCreate(e),typeof e.onBeforeCreate=="function")return e.onBeforeCreate.call(e)}function vo(e){h.callAppComponentCreate(e),h.callComponentCreate(e),typeof e.onCreate=="function"&&e.onCreate.call(e),e.app.emit("componentCreate",e)}function Lo(e){h.callAppComponentConfigCreate(e),typeof e.onConfigCreate=="function"&&e.onConfigCreate.call(e),e.parent&&typeof e.parent[e.__onConfigCreate]=="function"&&e.parent[e.__onConfigCreate].call(e.parent,e),e.app.emit("componentConfigCreate",e)}function So(e){if(h.callAppComponentBeforeMount(e),h.callComponentBeforeMount(e),typeof e.onBeforeMount=="function")return e.onBeforeMount.call(e)}function Oo(e){h.callAppComponentMount(e),h.callComponentMount(e),typeof e.onMount=="function"&&e.onMount.call(e),e.app.emit("componentMount",e)}function Mo(e){h.callAppComponentMountAsync(e),h.callComponentMountAsync(e),typeof e.onMountAsync=="function"&&e.onMountAsync.call(e),e.app.emit("componentMountAsync",e)}function Do(e,t){if(h.callAppComponentBeforeUpdate(e,t),h.callComponentBeforeUpdate(e,t),typeof e.onBeforeUpdate=="function")return e.onBeforeUpdate.call(e,t)}function Ro(e,t){h.callAppComponentUpdate(e,t),h.callComponentUpdate(e,t),typeof e.onUpdate=="function"&&e.onUpdate.call(e,t),e.app.emit("componentUpdate",e,t)}function zo(e,t,o){if(e){if(h.callAppComponentDrawByParent(e,t,o),typeof e.onDrawByParent=="function")return e.onDrawByParent.call(e,t,o);if(e.parent&&typeof e.parent[e.__onDrawByParent]=="function")return e.parent[e.__onDrawByParent].call(e.parent,e,t,o)}}function Bo(e){if(h.callAppComponentBeforeUnmount(e),h.callComponentBeforeUnmount(e),typeof e.onBeforeUnmount=="function")return e.onBeforeUnmount.call(e)}function Uo(e){h.callAppComponentUnmount(e),h.callComponentUnmount(e),typeof e.onUnmount=="function"&&e.onUnmount.call(e),e.app.emit("componentUnmount",e)}function jo(e){if(h.callAppComponentBeforeDestroy(e),h.callComponentBeforeDestroy(e),typeof e.onBeforeDestroy=="function")return e.onBeforeDestroy.call(e)}function No(e){h.callAppComponentDestroy(e),h.callComponentDestroy(e),e.app.emit("componentDestroy",e);const t=document.getElementById(e.uId+"--style"),o=document.getElementById(e.uId+"--style-reset");t&&t.parentNode.removeChild(t),o&&o.parentNode.removeChild(o),e._unmountedPlaceholder&&e._unmountedPlaceholder.parentNode&&e._unmountedPlaceholder.parentNode.removeChild(e._unmountedPlaceholder),typeof e.onDestroy=="function"&&(e.onDestroy.call(e),e=null)}function Ho(e){h.callAppComponentLoadProps(e),h.callComponentLoadProps(e),typeof e.onLoadProps=="function"&&e.onLoadProps.call(e),e.app.emit("componentLoadProps",e)}function Wo(e){h.callAppComponentWaitMount(e),h.callComponentWaitMount(e),typeof e.onWaitMount=="function"&&e.onWaitMount.call(e),e.app.emit("componentWaitMount",e)}var M={callBeforeCreate:Io,callCreate:vo,callConfigCreate:Lo,callBeforeMount:So,callMount:Oo,callMountAsync:Mo,callBeforeUpdate:Do,callUpdate:Ro,callDrawByParent:zo,callBeforeUnmount:Bo,callUnmount:Uo,callBeforeDestroy:jo,callDestroy:No,callLoadProps:Ho,callWaitMount:Wo};function re(e){return e.replace(/(-\w)/g,function(t){return t[1].toUpperCase()})}const qo=new Map,oe=Object.create(null),Fo=new Map;var Se={kCache:qo,tplCache:oe,hCache:Fo};const Ko=new RegExp(`</?(${v.TEXT_NODE_PLACE}|${v.ITERATE_NODE_PLACE})?>$`),xo={meta:!0,img:!0,link:!0,input:!0,area:!0,br:!0,hr:!0},Oe={li:{li:!0},p:{p:!0,div:!0},td:{td:!0,th:!0},th:{td:!0,th:!0}},Me={li:{ul:!0,ol:!0},a:{div:!0},b:{div:!0},i:{div:!0},p:{div:!0},td:{tr:!0,table:!0},th:{tr:!0,table:!0}};function le(e){return e[e.length-1]}function Go(e){return e.replace(R.MATCH_NLS,"")}class De{constructor(t,o,n,r,i){this.type=t,this.props=o,this.children=[],r&&(this.style=r),i&&(this.styleScoped=i),(n||t==="svg")&&(this.isSVG=!0),o.key!==void 0&&(this.key=o.key)}appendChild(t){return t.props&&t.props.key!==void 0&&(this.hasKeys=!0),this.children.push(t),t}}function Pe(e){if(!e)return"";if(oe[e])return oe[e];const t=new De(null,{}),o=[t];let n=t,r=-1,i,l;for(;i=R.HTML_MARKUP.exec(e);){if(r>-1&&r+i[0].length<R.HTML_MARKUP.lastIndex){let s=Go(e.substring(r,R.HTML_MARKUP.lastIndex-i[0].length));s&&(n.type==="style"&&n.props["data-is-webcomponent"]!==void 0&&(s=s.replace(/:(component|wrapper|root)/g,":host")),n.style===!0?n.style=s:(s.substr(0,5)===" e-0_"&&(s=s.trim()),n.appendChild(s)))}if(r=R.HTML_MARKUP.lastIndex,i[0][1]!=="!"){if(i[0]==="</>"){let s=le(o).type;s&&(i[0]=`</${s}>`,i[1]="/",i[2]=s)}if(!Ko.test(i[0])){if(i[3]&&i[3].startsWith("...")&&(i[3]=i[3].replace("...",'__spreadprops="')+'"'),i[2]==="slot"&&(i[2]=v.SLOT),!i[1]&&i[0]){l={};for(let s;s=R.HTML_ATTRIBUTE.exec(i[3]);)l[s[2]]=s[5]||s[6]||"",Ce(i[0].substring(1,i[0].length-1),s[2],l[s[2]],l);if(!i[4]&&Oe[n.type]&&Oe[n.type][i[2]]&&(o.pop(),n=le(o)),i[2]==="style"&&l["data-is-webcomponent"]===void 0){n.style=!0,l["data-scoped"]===""&&(n.styleScoped=!0);continue}n=n.appendChild(new De(i[2],l,n.isSVG)),o.push(n)}if(i[1]||i[4]||xo[i[2]])for(;;)if(n.type===i[2]){o.pop(),n=le(o);break}else{if(Me[n.type]&&Me[n.type][i[2]]){o.pop(),n=le(o);continue}break}}}}if(t.style&&typeof t.children[0]=="object"&&(t.children[0].style=t.style,t.children[0].styleScoped=t.styleScoped),t.children.length>1)t.type=v.ROOT;else if(t.children.length)return oe[e]=t.children[0],t.children[0];return oe[e]=t,t}function Vo(e){const t={};if(e._dozAttach[D]){let o=Object.keys(e._dozAttach[D]);for(let n=0;n<o.length;n++)Ce(e.nodeName,o[n],e._dozAttach[D][o[n]],t)}else if(e.attributes){const o=Array.from(e.attributes);for(let n=o.length-1;n>=0;--n){let r=o[n];Ce(e.nodeName,r.name,r.nodeValue,t)}}return t}function Ce(e,t,o,n){typeof o=="string"&&R.IS_STRING_QUOTED.test(o)&&(o=o.replace(R.REPLACE_QUOT,"&quot;"));let r=Y(t),i=R.IS_CUSTOM_TAG.test(e)&&!r?re(t):t;n[i]=t===$e.FORCE_UPDATE?!0:o}function Xo(e,t){if(!t||!t.hot)return;const o="__doz_hmr_props_store__",n="__doz_hmr_init_props_store__";window[o]=window[o]||{},window[n]=window[n]||{};const r=t.id;window[o][r]=window[o][r]||new Map,window[n][r]=window[n][r]||new Map,Object.keys(e.props).forEach(i=>{e._initialProps[i]===window[n][r].get(i)?e.props[i]=window[o][r].get(i)||e.props[i]:e.props[i]=e._initialProps[i]}),t.hot.dispose(()=>{Object.keys(e.props).forEach(i=>{window[o][r].set(i,e.props[i]),window[n][r].set(i,e._initialProps[i])})})}let rt=window.setTimeout.bind(window);window.requestAnimationFrame&&(rt=window.requestAnimationFrame.bind(window));var $=rt;function Yo(e){return typeof e=="string"?e.replace(/&(?!\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&grave;"):e}function Zo(e){return typeof e=="string"?e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&grave;/g,"`"):e}var Qo={encode:Yo,decode:Zo};const x=function(){let e=[],t=[],o=[],n=null,r=function(l,s){return s.split(".").reduce(function(a,p){return a?a[p]:void 0},l||self)},i=function(l,s,a,p){let u=s==null,f=a||null,A=p||"",c=[],C=function(_,y){return _ instanceof Array?A!==""?A:y:A!==""?A+"."+y:y},k=0,d=function(_){if(f.paused!==!0)if(u&&(s=++k>1,$(function(){k=0})),s===!0)$(function(){if(_===c.length){for(let y=0;y<f.observers.length;y++)f.observers[y](c);c=[]}});else{for(let y=0;y<f.observers.length;y++)f.observers[y](c);c=[]}},m={get:function(_,y){if(y==="__getTarget")return _;if(y==="__isProxy")return!0;if(y==="__getParent")return function(I){typeof I>"u"&&(I=1);let L=C(_,"__getParent").split(".");return L.splice(-(I+1),I+1),r(f.parentProxy,L.join("."))};if(y==="__getPath")return C(_,"__getParent").slice(0,-12);if(y==="prototype")return _[y];let w=_[y];if(_ instanceof Date&&w instanceof Function)return w.bind(_);if(w instanceof Object&&_.hasOwnProperty(y)){w.__isProxy===!0&&(w=w.__getTarget);let I=-1,L=f.targets;for(let S=0,H=L.length;S<H;S++)if(w===L[S]){I=S;break}if(I>-1)return f.proxies[I];let B=A!==""?A+"."+y:y;return i(w,s,f,B)}else{let I=f.renderMode?Qo.encode(w):w,L=f.manipulate;return typeof L=="function"&&(I=L(I,y,!0)),I}},deleteProperty:function(_,y){let w=!0;n===g&&(w=!1,n=null);let I=Object.assign({},_),L=C(_,y);if(!f.paused){if(c.push({type:"delete",target:_,property:y,newValue:null,previousValue:I[y],currentPath:L,proxy:g}),typeof f.beforeChange=="function"&&f.checkBeforeChange!==L&&(f.checkBeforeChange=L,f.beforeChange(c)===!1))return f.checkBeforeChange="",!0;f.checkBeforeChange=""}if(w===!0){let B,S;for(B=0,S=t.length;B<S&&_!==t[B];B++);let H=o[B]||[],G=H.length;for(;G--;)H[G].proxy!==g&&(n=H[G].proxy,delete H[G].proxy[y]);delete _[y]}return d(c.length),!0},set:function(_,y,w,I){let L=!0;n===g&&(L=!1,n=null);let B=_[y];if(B!==w||L===!1){let S=typeof B,H=C(_,y),G="update";S==="undefined"&&(G="add");let ke=f.manipulate;if(typeof ke=="function"&&(w=ke(w,H,!1)),!f.paused){if(c.push({type:G,target:_,property:y,newValue:w,previousValue:I[y],currentPath:H,proxy:g}),typeof f.beforeChange=="function"&&f.checkBeforeChange!==H&&(f.checkBeforeChange=H,f.beforeChange(c)===!1))return f.checkBeforeChange="",!0;f.checkBeforeChange=""}if(L===!0){let Z,Ie;for(Z=0,Ie=t.length;Z<Ie&&_!==t[Z];Z++);let ee=o[Z];if(ee)for(let V=0,ie=ee.length;V<ie;V++)ee[V].proxy!==g&&(n=ee[V].proxy,ee[V].proxy[y]=w);_[y]=w,w instanceof Object&&w!==null&&function V(ie){let de=ie.__getTarget,ve=Object.keys(de);for(let he=0,Ct=ve.length;he<Ct;he++){let ye=ve[he];de[ye]instanceof Object&&de[ye]!==null&&V(ie[ye])}}(g[y])}d(c.length)}return!0}},g=new Proxy(l,m);f===null?(f={parentTarget:l,domDelay:s,parentProxy:g,observers:[],targets:[l],proxies:[g],path:A},e.push(f)):(f.targets.push(l),f.proxies.push(g));let b={target:l,proxy:g,observable:f},N=-1;for(let _=0,y=t.length;_<y;_++)if(l===t[_]){N=_;break}return N>-1?o[N].push(b):(t.push(l),o.push([b])),g};return{create:function(l,s,a,p){l.__isProxy===!0&&(l=l.__getTarget);let u=i(l,s);return typeof a=="function"&&this.observe(u,a),function f(A){let c=A.__getTarget,C=Object.keys(c);for(let k=0,d=C.length;k<d;k++){let m=C[k];typeof p=="function"&&p(c,m),c[m]instanceof Object&&c[m]!==null&&f(A[m])}}(u),u},observe:function(l,s){let a=e.length;for(;a--;)if(e[a].parentProxy===l){e[a].observers.push(s);break}},remove:function(l){let s=null,a=!1,p=e.length;for(;p--;)if(e[p].parentProxy===l){s=e[p],a=!0;break}let u=o.length;for(;u--;){let f=o[u].length;for(;f--;)o[u][f].observable===s&&(o[u].splice(f,1),o[u].length===0&&(t[u]=null))}a===!0&&e.splice(p,1)},manipulate:function(l,s){if(typeof s!="function")throw new Error("callback is required");let a=e.length;for(;a--;)if(e[a].parentProxy===l){e[a].manipulate=s;break}},beforeChange:function(l,s){if(typeof s!="function")throw new Error("callback is required");let a=e.length;for(;a--;)if(e[a].parentProxy===l){e[a].beforeChange=s;break}},beginRender:function(l){let s=e.length;for(;s--;)if(e[s].parentProxy===l){e[s].renderMode=!0;break}},endRender:function(l){let s=e.length;for(;s--;)if(e[s].parentProxy===l){e[s].renderMode=!1;break}},pause:function(l){let s=e.length;for(;s--;)if(e[s].parentProxy===l){e[s].paused=!0;break}},resume:function(l){let s=e.length;for(;s--;)if(e[s].parentProxy===l){e[s].paused=!1;break}}}}();function Jo(e,t){if(typeof e.propsListener=="object")for(let o=0;o<t.length;o++){const n=t[o],r=e.propsListener[n.currentPath];if(n.type==="update"&&r){const i=e[r]||r;typeof i=="function"&&i.call(e,n.newValue,n.previousValue)}}if(typeof e.propsListenerAsync=="object")for(let o=0;o<t.length;o++){const n=t[o],r=e.propsListenerAsync[n.currentPath];if(n.type==="update"&&r){const i=e[r]||r;typeof i=="function"&&function(l){$(()=>i.call(e,l.newValue,l.previousValue))}(n)}}}const Re={string(e){return typeof e=="string"?e:JSON.stringify(e)},number(e){return typeof e=="number"?e:Number(e)},boolean(e){return typeof e=="boolean"?e:e==="true"||e===1?!0:e==="false"||e===0?!1:!!e},object(e){if(typeof e=="object"&&e)return e;try{return JSON.parse(e)}catch{return e}},array(e){return this.object(e)},date(e){return e instanceof Date?e:new Date(e)}};var $o=function(t,o){return Re[o]!==void 0&&(t=Re[o](t)),t};function ge(e,t,o,n,r){if(typeof e.propsType=="object"){const i=e.propsType[o];i!==void 0&&(t=$o(t,i))}if(r&&(n=e.propsConvertOnFly),e.propsConvert&&e.propsConvertOnFly===n&&typeof e.propsConvert=="object"){const i=e.propsConvert[o],l=e[i]||i;if(typeof l=="function")return l.call(e,t)}if(r&&(n=e.propsComputedOnFly),e.propsComputed&&e.propsComputedOnFly===n&&typeof e.propsComputed=="object"){let i=e._computedCache.get(o);if(i===void 0)i=new Map,e._computedCache.set(o,i);else{const a=i.get(t);if(a!==void 0)return a}const l=e.propsComputed[o],s=e[l]||l;if(typeof s=="function"){const a=s.call(e,t);return i.set(t,a),a}}return t}function ze(e,t){M.callUpdate(e,t),Jo(e,t),e.render(void 0,t)}function en(e){let t=!1;e._props&&e._props.__isProxy&&(x.remove(e._props),t=!0),e._props=x.create(e._rawProps,!0,o=>{e._isRendered&&(e.delayUpdate?setTimeout(()=>{ze(e,o)},e.delayUpdate):ze(e,o))},(o,n)=>{o[n]=ge(e,o[n],n)}),x.manipulate(e._props,(o,n,r)=>ge(e,o,n,r)),x.beforeChange(e._props,o=>{if(M.callBeforeUpdate(e,o)===!1)return!1}),t&&e._isRendered&&e.render()}var me={create:en},tn=function(t){return typeof t!="string"?!1:t[0]==="o"&&t[1]==="n"},W=function(e){e&&!e._dozAttach&&(e._dozAttach={})},on=["async","autocomplete","autofocus","autoplay","border","challenge","checked","compact","contenteditable","controls","default","defer","disabled","formNoValidate","frameborder","hidden","indeterminate","ismap","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","readonly","required","reversed","scoped","scrolling","seamless","selected","sortable","spellcheck","translate"];function it(e){return tn(e)}function st(e,t,o,n,r,i){if(t==="data-attributeoriginaletagname")return;if(W(e),e._dozAttach[D]||(e._dozAttach[D]={}),e._dozAttach[D][t]=o,t==="key"){e._dozAttach.key===void 0&&(e._dozAttach.key=o);return}let l=Y(t);l&&(e._dozAttach.hasDirective=!0),!(e.tagName.indexOf("-")!==-1&&!n.exposeAttributes.includes(t)&&!t.startsWith("data-"))&&((rn(t)||typeof o=="function"||typeof o=="object")&&!l||(o===void 0&&(o=""),t==="class"&&!i?e.className=o:e[t]!==void 0&&!i?(o===""&&on.indexOf(t)>-1&&(o=!0),e[t]=o):(t.startsWith("data-")||t.startsWith("aria-")||t==="role"||t==="for"||i||n&&n.app&&n.app.setAllAttributes||window.SSR&&!t.startsWith("d-"))&&e.setAttribute(t,o)))}function nn(e,t,o,n,r,i,l){st(e,t,o,r,i,l),r.$$afterAttributeUpdate(e,t,o)}function Be(e,t,o={},n,r,i){const l=Object.assign({},t,o);let s=[],a=Object.keys(l),p;for(let u=0;u<a.length;u++)if(p=a[u],!(!e||e.nodeType!==1)&&t[p]!==o[p]){nn(e,p,t[p],o[p],n,r,i);let f={};f[p]=t[p],s.push(f)}return s}function rn(e){return it(e)||e===$e.FORCE_UPDATE}function Ue(e){return e.slice(2).toLowerCase()}function sn(e,t,o,n,r){if(!it(t))return;let i=!1;typeof o=="function"&&(i=!0),typeof o=="function"&&(i?e.addEventListener(Ue(t),o.bind(n)):e.addEventListener(Ue(t),o))}function ln(e,t,o,n,r){let i;const l=Object.keys(t);for(let s=0,a=l.length;s<a;s++)i=l[s],sn(e,i,t[i],o),st(e,i,t[i],o,n,r),o&&o.app&&o.app.emit&&o.app.emit("elementAttributesAttach",e,i,t[i],o)}function be(e){return/&\w+;/.test(e)?Ae.decode(e):e}function lt(e,t,o){if(typeof e!="string")return;let n=t.replace(/[^\w]/g,"");return/:root/.test(e)&&console.warn("[DEPRECATION] the :root pseudo selector is deprecated, use :component or :wrapper instead"),e=e.replace(/{/g,`{ `).replace(/}/g,`} `).replace(/^(\s+)?:(component|wrapper|root)(\s+)?{/gm,t+" {").replace(/:(component|wrapper|root)/g,"").replace(/(@(?:[\w-]+-)?keyframes\s+)([\w-_]+)/g,`$1 ${n}-$2`).replace(/((?:[\w-]+-)?animation(?:-name)?(?:\s+)?:(?:\s+))([\w-_]+)/g,`$1 ${n}-$2`).replace(/\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/gm,"").replace(/[^\s].*{/gm,r=>{if(/^(@|:host|(from|to|\d+%)[^-_])/.test(r))return r;let i=r.split(",");const l=new RegExp(`^${t.replace(/[[\]]/g,"\\$&")}(\\s+)?{`);for(let s=0;s<i.length;s++)i[s]=i[s].trim(),!l.test(i[s])&&(/^:global/.test(i[s])?i[s]=i[s].replace(":global",""):i[s]=`${t} ${i[s]}`);return r=i.join(","),r}),e=e.replace(/\s{2,}/g," ").replace(/{ /g,"{").replace(/ }/g,"}").replace(/\s:/g,":").replace(/\n/g,"").trim(),e}var an=["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"];function pn(e,t,o,n,r){let i;const l=`${t}--style`,s=`${t}--style-reset`;let a;if(r&&r.app.useShadowRoot?a=r.app._root.getElementById(l):a=document.getElementById(l),a)i=a.innerHTML=e;else{if(n){let u=`${o}, ${o} *,`;u+=an.map(A=>`${o} ${A}`).join(","),u+=" {all: initial}";const f=document.createElement("style");if(f.id=s,f.innerHTML=u,r&&r.app.useShadowRoot){let A=r.app._root.querySelector(v.APP);r.app._root.insertBefore(f,A)}else document.head.appendChild(f)}const p=document.createElement("style");if(p.id=l,i=p.innerHTML=e,r&&r.app.useShadowRoot){let u=r.app._root.querySelector(v.APP);r.app._root.insertBefore(p,u)}else document.head.appendChild(p)}return i}function un(e,t,o,n,r){if(typeof e=="string")return e=lt(e,o),pn(e,t,o,n,r)}const je=Object.create(null),F=[];function fn(e,t){return typeof e!=typeof t||typeof e=="string"&&e!==t||e.type!==t.type||e.props&&e.props.forceupdate}function K(e,t,o,n){if(e.type==="dz-suspend"||typeof e>"u"||Array.isArray(e)&&e.length===0)return;let r,i,l;if(typeof e!="object")return document.createTextNode(be(e));if(t.app.hydIdUsedCounter<t.app.hydIdCounter&&(l=t.app.hydMap.get(t.app.hydIdUsedCounter++)),l)i=l,t.hydrated=!0;else{if((!e||e.type==null||e.type[0]==="#")&&(e={type:v.EMPTY,props:{},children:[]}),e.props&&e.props.slot&&!e.isNewSlotEl)return document.createComment(`slot(${e.props.slot})`);r=je[e.type],r?i=r.cloneNode():(i=e.isSVG?document.createElementNS(wt.SVG,e.type):document.createElement(e.type),je[e.type]=i.cloneNode(!0))}if(ln(i,e.props,t,n,e.isSVG),!e.hasKeys&&e.children.length)if(e.children.length===1&&typeof e.children[0]=="string")i.textContent=be(e.children[0]);else if(e.props.suspendcontent===void 0&&t.props.suspendcontent===void 0&&!t.suspendContent)for(let s=0;s<e.children.length;s++){if(l&&typeof e.children[s]!="object")continue;let a=K(e.children[s],t,o,n);a&&i.appendChild(a)}else t.suspendedNodes.push(e);return W(i),i._dozAttach.injected=e.injected,i._dozAttach.elementChildren=e.children,i._dozAttach.originalTagName=e.props["data-attributeoriginaletagname"],t.$$afterNodeElementCreate(i,e,o,t),e.style&&at(e,t),i}function at(e,t){t.__hasStyle=!0;let o=e.styleScoped;const n=t.uId;let r=`[data-uid="${n}"]`;un(e.style,n,r,o,t)}function ne(e,t,o,n=0,r,i,l){if(r.app.hydration&&!r.hydrationRestored&&t&&o&&t.children&&o.children&&e.childNodes[n]&&e.childNodes[n].childNodes.length<t.children.length){console.error("There is not match between virtual nodes and child nodes for element ",e.childNodes[n]),console.error(e.childNodes[n].childNodes,t.children),console.error("I'm trying to restore it"),e.childNodes[n].innerHTML="",t.children.forEach(s=>{let a=K(s,r,i,e._dozAttach[E]||l);e.childNodes[n].appendChild(a)}),r.hydrationRestored=!0;return}if(!(!e||t===o&&r.tag!==v.MOUNT)){if(r&&r.app&&r.app.onVdomUpdateElement){let s=r.app.onVdomUpdateElement(e,t,o,r,i,l);s&&(e=s.$parent||e,t=s.newNode||t,o=s.oldNode||o,r=s.cmp||r)}if(t&&t.cmp&&(r=t.cmp),t&&o&&t.style!==o.style&&at(t,r),l&&e._dozAttach[E]){let s=M.callDrawByParent(e._dozAttach[E],t,o);s!=null&&typeof s=="object"&&(t=s.newNode||t,o=s.oldNode||o);let a=t&&t.props?t.props.slot:!1;if(e._dozAttach[E]._defaultSlot&&!a&&(a=Je),typeof t=="object"&&a&&e._dozAttach[E]._slots[a]){e._dozAttach[E]._slots[a].forEach(p=>{if(p.parentNode){t.isNewSlotEl=!0;let u=K(t,r,i,e._dozAttach[E]||l);u.removeAttribute("slot"),p.parentNode.replaceChild(u,p),p.__newSlotEl=u}else{let u=Array.from(p.__newSlotEl.parentNode.children).indexOf(p.__newSlotEl);ne(p.__newSlotEl.parentNode,t,o,u,r,i,e._dozAttach[E]||l)}});return}}if(t&&t.props&&t.props["data-follow"]){let s=document.querySelector(`[data-follow="${t.props["data-follow"]}"]`);s&&s.parentElement&&(e=s.parentElement,W(e))}if(o){if(!t)e.childNodes[n]&&F.push(e.childNodes[n]);else if(fn(t,o)){let s=e.childNodes[n];if(!s)if(r.app.hydration&&!r.hydrationRestored)s=K(o,r,i,e._dozAttach[E]||l),e.appendChild(s),console.error("$oldElement not found. It was restored."),r.hydrationRestored=!0;else return;const a=r.$$beforeNodeChange(e,s,t,o);if(a)return a;const p=K(t,r,i,e._dozAttach[E]||l);return e.replaceChild(p,s),r.$$afterNodeChange(p,s),s._dozAttach&&s._dozAttach[E]&&(s._dozAttach[E].unmount(),s._dozAttach[E].destroy()),p}else if(t.hasKeys!==void 0||o.hasKeys!==void 0){let s=e.childNodes[n],a=t.children.map(b=>b.key),p=o.children.map(b=>b.key);s._dozAttach.keyList===void 0&&(s._dozAttach.keyList=new Map);let u=p.filter(b=>!a.includes(b));for(let b=0;b<u.length;b++)if(s._dozAttach.keyList.has(u[b])){let N=s._dozAttach.keyList.get(u[b]);N._dozAttach[E]?N._dozAttach[E].destroy():s.removeChild(N),s._dozAttach.keyList.delete(u[b]),r.app.cacheStores.kCache.delete(u[b])}u.length&&(p=p.filter(b=>!~u.indexOf(b)));let f=[],A=[],c=Object.create(null);for(let b=0;b<a.length;b++){a[b]!==p[b]&&(A.push(b),c[b]=!0);let N=a[b],_=s._dozAttach.keyList.get(N);if(_){let y=r.app.cacheStores.kCache.get(N),w=y.next,I=y.prev;w.children||(w.children=[]),I.children||(I.children=[]),f.push(_),y.isChanged&&Be(_,w.props,I.props,r,e._dozAttach[E]||l,w.isSVG);const L=w.children.length,B=I.children.length;for(let S=0;S<L||S<B;S++)w.children[S]===void 0||I.children[S]===void 0||ne(_,w.children[S],I.children[S],S,r,i,e._dozAttach[E]||l)}else{let y=K(t.children[b],r,i,e._dozAttach[E]||l);s._dozAttach.keyList.set(N,y),f.push(y)}}if(A[0]===void 0)return;if(s.childNodes.length===A[0]){for(let b=0;b<f.length;b++)s.appendChild(f[b]);return}let C=!0,k,d,m=0,g=f.length-1;for(;m<=g;)C?(k=s.childNodes[m],d=f[m],c[m]&&Array.prototype.indexOf.call(s.childNodes,d)!==m&&(s.insertBefore(d,k),C=!1),m++):(k=s.childNodes[g],d=f[g],c[g]&&Array.prototype.indexOf.call(s.childNodes,d)!==g&&(k?s.insertBefore(d,k.nextSibling):(s.appendChild(d),g++),C=!0),g--)}else if(t.type){if(e._dozAttach[E]===r&&e.childNodes.length){let u=e.childNodes.length-1;e.childNodes[u]._dozAttach&&e.childNodes[u]._dozAttach[U]&&(n+=u)}let s=Be(e.childNodes[n],t.props,o.props,r,e._dozAttach[E]||l,t.isSVG);if(r.$$beforeNodeWalk(e,n,s))return;const a=t.children.length,p=o.children.length;for(let u=0;u<a||u<p;u++)ne(e.childNodes[n],t.children[u],o.children[u],u,r,i,e._dozAttach[E]||l);cn()}}else{let s;if(e.childNodes.length){let a=e.childNodes[e.childNodes.length-1];if(W(a),a._dozAttach[U])return s=K(t,r,i,e._dozAttach[E]||l),e.insertBefore(s,a),s}return W(e),s=K(t,r,i,e._dozAttach[E]||l),e.appendChild(s),s}}}function cn(){let e=F.length;for(;e--;)F[e].parentNode.removeChild(F[e]),F[e]._dozAttach&&F[e]._dozAttach[E]&&(F[e]._dozAttach[E].unmount(),F[e]._dozAttach[E].destroy()),F.splice(e,1)}var dn={create:K,update:ne};const hn=dn.update;function pt(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function yn(e,t=!0){return e=Object.entries(e).reduce((o,[n,r])=>`${o}${pt(n)}:${r};`,""),t?`style="${e}"`:e}function mn(e){let t=e.__proto__;typeof e.onAppReady=="function"?(e.onAppReady._instance=e,e.app._onAppReadyCB.push(e.onAppReady)):t&&t.constructor&&t.constructor.__postListeners&&t.constructor.__postListeners.onAppReady&&(t.constructor.__postListeners.onAppReady._instance=e,e.app._onAppReadyCB.push(t.constructor.__postListeners.onAppReady))}var _n={add:mn};function An(e){typeof e.onAppDraw=="function"&&(e.onAppDraw._instance=e,e.app._onAppDrawCB.push(e.onAppDraw))}function Cn(e,t,o){e.app._onAppDrawCB.forEach(n=>{typeof n=="function"&&n._instance&&n.call(n._instance,t,o,e)})}var Ne={add:An,emit:Cn};function gn(e,t,o){Object.assign(e,t,o)}function ue(e){if(typeof e!="object"||e===null)return e;let t,o;if(Array.isArray(e)){let n;for(t=[],o=0,n=e.length;o<n;o++)t[o]=ue(e[o]);return t}t={};for(o in e)e.hasOwnProperty(o)&&(t[o]=ue(e[o]));return t}const He=v.TEXT_NODE_PLACE,bn="<",wn=">",En=/e-0_(\d+)_0-e/g,Pn=/e-0_(\d+)_0-e/;function Tn(e,t){if(typeof e!="string")return e;if(e[0]==="e"&&e[1]==="-"){let o=Pn.exec(e);return o?o[1][0]==="0"&&o[1].length>=2?t[o[1].substring(1)]+"":t[o[1]]:e}else return e.replace(En,(o,n)=>n?t[n]:o)}function kn(e){let t="";for(let o=0;o<e.length;o++)typeof e[o]!="function"&&typeof e[o]!="object"&&(t+=e[o]);return t}function ut(e,t,o,n){let r=Object.keys(e);if(e.__spreadprops){for(let i in t[0])e[i]=t[0][i];delete e.__spreadprops}for(let i=0;i<r.length;i++)if(e[r[i]]&&typeof e[r[i]]=="object")ut(e[r[i]],t,e,n);else{let l=Tn(e[r[i]],t);if(r[i]==="type"&&typeof l!="string"){let s=l||{},a=pt(s.tag||s.name||v.ROOT);a=a.replace(/_+/,""),a.indexOf("-")===-1&&(a=`${a}-${a}`);let p=a+"-"+n.uId+"-"+n._localComponentLastId++;n._componentsMap.has(l)?p=n._componentsMap.get(l):n._componentsMap.set(l,p),n._components[p]===void 0&&(n._components[p]={tag:a,cfg:s}),n.app._components[p]===void 0&&(n.app._components[p]={tag:a,cfg:s}),l=a,e.props["data-attributeoriginaletagname"]=p}Array.isArray(l)&&r[i]==="0"?(o.children=l,l[0]&&l[0].key!==void 0&&(o.hasKeys=!0)):(l===""&&r[i]==="0"&&(l=" "),e[r[i]]=l)}}var ft=function(e,...t){let o,n,r;this&&this.app?(o=this.app.cacheStores.hCache,n=this.app.cacheStores.kCache,r=this.app.isWebComponent&&this._mainComponentByAppCreate):(o=Se.hCache,n=Se.kCache);let i=o.get(e);if(!i){i=e[0];let p=!1,u=!1,f=!1,A=t.length;for(let c=0;c<A;++c){let C=e[c],k=C.length,d=C[k-1];for(let m=0;m<k;m++)C[m]===bn?p=!1:C[m]===wn&&(p=!0);C.indexOf("<style")>-1&&(u=!0,f=!0),C.indexOf("</style")>-1&&(u=!1),f&&r&&(i=i.replace(/<style>/,"<style data-is-webcomponent>")),u&&(p=!1,i=i.replace(/ scoped>/," data-scoped>")),p?typeof t[c]=="object"||typeof t[c]=="function"?i+=`e-0_${c}_0-e${e[c+1]}`:(t[c]===""&&(t[c]=" "),/<.*>/.test(t[c])?i+=`${t[c]}${e[c+1]}`:i+=`<${He}>e-0_0${c}_0-e</${He}>${e[c+1]}`):d==="/"?i+=e[c+1]:i+=`e-0_${c}_0-e${e[c+1]}`}i=i.trim(),o.set(e,i)}let l,s=Pe(i),a;if(s.props.forceupdate&&o.delete(e),(s.key!==void 0||s.props["item-list"]!==void 0)&&(a=kn(t),l=a?o.get(a):void 0),l||(l=ue(s),ut(l,t,null,this),a&&o.set(a,l)),s.key!==void 0){let p=n.get(l.key);p?n.set(l.key,{isChanged:a!==p.clonedKey,clonedKey:a,next:l,prev:p.next}):n.set(l.key,{isChanged:!0,clonedKey:a,next:l,prev:{}})}return l};function We(e){Array.isArray(e.components)?(e.components.forEach(t=>{typeof t=="object"&&typeof t.tag=="string"&&typeof t.cfg=="object"&&(e._components[t.tag]=t)}),delete e.components):typeof e.components=="object"&&(Object.keys(e.components).forEach(t=>{e._components[t]={tag:t,cfg:e.components[t]}}),delete e.components)}function ct(e,t=[]){if(typeof e!="object"||e==null)throw new TypeError("expected an object");Array.isArray(t)||(t=[t]);for(let o=t.length-1;o>=0;--o){let n=Object.keys(t[o]);for(let r=n.length-1;r>=0;--r){let i=n[r];typeof e[i]>"u"?e[i]=t[o][i]:console.warn("Doz",`mixin failed for already defined property: ${i}`)}}return e}function qe(e){ct(e,e.mixin),e.mixin=[]}function dt(e,t){let o=Object.keys(t);for(let n=0,r=o.length;n<r;n++){let i=o[n];t[i]instanceof Object&&t[i]!==null?dt(e,t[i]):t[i]=ge(e,t[i],i,!1,!0)}}function fe(e){dt(e,e._rawProps)}function ht(e,t){let o=e.app.createInstance({root:null,template:t,app:e.app,parent:e});o&&o._rootElement&&(o._rootElement.parentNode._dozAttach[Qe]=o)}class X{constructor(t={}){if(t.cmp=t.cmp||{tag:t.tag,cfg:{}},t.app=t.app||{},this._opt=t,this._cfgRoot=t.root,this._publicProps=t.props,this._isRendered=!1,this._prev=null,this._rootElement=null,this._parentElement=null,this._components={},this._processing=[],this._dynamicChildren=[],this._unmounted=!1,this._unmountedParentNode=null,this._configured=!1,this._props={},this._directiveProps=null,this._computedCache=new Map,this._renderPause=!1,this._hasSlots=!1,this._slots={},this._defaultSlot=null,this._localComponentLastId=0,this._componentsMap=new Map,this.tag=t.cmp.tag,this.cmpName=t.cmpName,this.app=t.app,this.exposeAttributes=["style","class"],this.parent=t.parentCmp,this.appRoot=t.app._root,this.action=t.app.action,this.shared=t.app.shared,this._childrenInc=0,this._injectCount=0,this.children={},this.childrenByTag={},this.rawChildren=[],this.rawChildrenVnode=[],this.injectTemplates=new Map,this.updateChildrenProps=!0,this.mixin=[],this.propsConvertOnFly=!1,this.propsComputedOnFly=!1,this.delayUpdate=0,this.hydrated=!1,this.suspendContent=!1,this.suspendedNodes=[],this.lockRemoveInstanceByCallback=null,this.waitMount=!1,this._isSubclass=this.__proto__.constructor!==X,this.uId=this.app.generateUId(),this.h=ft.bind(this),this._initRawProps(t),gn(this,t.cmp.cfg),qe(this),We(this),M.callBeforeCreate(this)===!1){this.__beforeCreateReturnsFalse=!0;return}me.create(this,!0),_n.add(this),Ne.add(this),M.callCreate(this),this.app.componentsById&&!this.app.componentsById[this.uId]&&(this.app.componentsById[this.uId]={instance:this})}set props(t){typeof t=="function"&&(t=t()),this._rawProps=Object.assign({},t,this._opt?this._opt.props:{}),me.create(this),h.callAppComponentSetProps(this),this.app.emit("componentSetProps",this)}get props(){return this._props}loadProps(t){if(typeof t!="object")throw new TypeError("Props must be an object");this._rawProps=Object.assign({},t),fe(this),me.create(this),M.callLoadProps(this)}set config(t){if(!this._isSubclass)throw new Error("Config is allowed only for classes");if(this._configured)throw new Error("Already configured");if(typeof t!="object")throw new TypeError("Config must be an object");h.callAppComponentSetConfig(this,t),typeof t.mixin=="object"&&(this.mixin=t.mixin,qe(this)),typeof t.components=="object"&&(this.components=t.components,We(this)),typeof t.updateChildrenProps=="boolean"&&(this.updateChildrenProps=t.updateChildrenProps),this._configured=!0,M.callConfigCreate(this)}getHTMLElement(){return this._parentElement}beginSafeRender(){x.beginRender(this.props)}endSafeRender(){x.endRender(this.props)}each(t,o,n=!1){let r;return Array.isArray(t)&&(n&&this.beginSafeRender(),r=t.map(o),n&&this.endSafeRender()),r}toStyle(t,o=!0){return yn(t,o)}inject(t){let o=Symbol("inject"+this._injectCount++);t.injected=o,this.injectTemplates.set(o,{cmp:null,node:t}),this.render();let{cmp:n}=this.injectTemplates.get(o);return{id:o,cmp:n}}eject(t){typeof t=="object"&&(t=t.id),this.injectTemplates.delete(t),this.render()}render(t){if(this._renderPause)return;this.beginSafeRender();let o=this.template(this.h);if(o)this.injectTemplates.forEach(i=>o.children.push(i.node));else if(this.injectTemplates.size){let i=Array.from(this.injectTemplates.values());i.length&&(o=i[i.length-1].node)}this.endSafeRender();let n=o&&typeof o=="object"?o:Pe(o);this.app.emit("draw",n,this._prev,this),Ne.emit(this,n,this._prev);const r=hn(this._cfgRoot,n,this._prev,0,this,t);!this._rootElement&&r&&(this._rootElement=r,W(this._rootElement),this._parentElement=r.parentNode,this.__hasStyle&&(this._parentElement.dataset?this._parentElement.dataset.uid=this.uId:this._parentElement.firstElementChild.nextElementSibling.dataset.uid=this.uId)),this._prev=n}renderPause(){this._renderPause=!0}renderResume(t=!0){this._renderPause=!1,t&&this.render()}prepareCommit(){x.pause(this.props),this.renderPause()}commit(){this.renderResume(),x.resume(this.props)}get isRenderPause(){return this._renderPause}mount(t,o={}){if(this._unmounted)return M.callBeforeMount(this)===!1?this:(this._unmountedPlaceholder.parentNode.replaceChild(this._unmountedParentNode,this._unmountedPlaceholder),this._unmounted=!1,this._unmountedParentNode=null,this._unmountedPlaceholder=null,M.callMount(this),Object.keys(this.children).forEach(n=>{this.children[n].mount()}),this);if(t){let n=this._rootElement;return typeof o.selector=="string"?n=n.querySelector(o.selector):o.selector instanceof HTMLElement?n=o.selector:this._rootElement.nodeType!==1&&(n=this.getHTMLElement()),this._unmounted=!1,this._unmountedParentNode=null,this._unmountedPlaceholder=null,this.app.mount(t,n,this)}}unmount(t=!1,o,n){if(this.lockRemoveInstanceByCallback&&typeof this.lockRemoveInstanceByCallback=="function"){this.lockRemoveInstanceByCallback(this.unmount,t,o,n);return}if(!(!t&&(this._unmountedParentNode||!this._rootElement||!this._rootElement.parentNode||!this._rootElement.parentNode.parentNode)))return M.callBeforeUnmount(this)===!1?!1:(this._unmountedParentNode=this._rootElement.parentNode,this._unmountedPlaceholder=document.createComment(Date.now().toString()),t?this._rootElement.parentNode&&this._rootElement.parentNode.parentNode.removeChild(this._rootElement.parentNode):this._rootElement.parentNode.parentNode.replaceChild(this._unmountedPlaceholder,this._unmountedParentNode),this._unmounted=!o,n||M.callUnmount(this),Object.keys(this.children).forEach(r=>{this.children[r].unmount(t,o,n)}),this)}destroy(t){if(this.lockRemoveInstanceByCallback&&typeof this.lockRemoveInstanceByCallback=="function"){this.lockRemoveInstanceByCallback(this.destroy,t);return}if(this.unmount(t,!0)!==!1&&!(!t&&(!this._rootElement||M.callBeforeDestroy(this)===!1))){if(Object.keys(this.children).forEach(o=>{this.children[o].destroy()}),M.callDestroy(this),this.parent&&this.parent.children){for(let o in this.parent.children)this.parent.children.hasOwnProperty(o)&&this===this.parent.children[o]&&delete this.parent.children[o];if(this.parent.childrenByTag[this.tag]){let o=this.parent.childrenByTag[this.tag].indexOf(this);o!==-1&&this.parent.childrenByTag[this.tag].splice(o,1)}}return!0}}template(){return""}_initRawProps(t){this._isSubclass?this._rawProps=Object.assign({},t.props):this._rawProps=Object.assign({},typeof t.cmp.cfg.props=="function"?t.cmp.cfg.props():t.cmp.cfg.props,t.props),this._initialProps=ue(this._rawProps)}getDozWebComponentById(t){return this.getWebComponentById(t)}getDozWebComponentByTag(t){return this.getWebComponentByTag(t)}getWebComponentById(t){return P.webComponents.ids[t]||null}getWebComponentByTag(t){return P.webComponents.tags[t]||null}_setProps(t){for(let o in t)t.hasOwnProperty(o)&&(this.props[o]=t[o])}setProps(t){this.prepareCommit(),this._setProps(t),this.commit()}setPropsAsync(t){$(()=>this._setProps(t))}$$afterNodeElementCreate(t,o,n){if(t._dozAttach.hasDirective&&(h.callAppDOMElementCreate(this,t,o,n),h.callComponentDOMElementCreate(this,t,n)),typeof t.hasAttribute=="function"&&(o.type.indexOf("-")!==-1&&ht(this,t),o.type===v.SLOT)){let r=t._dozAttach[D]?t._dozAttach[D].name:null;r||(this._defaultSlot=t,r=Je),this._slots[r]===void 0?this._slots[r]=[t]:this._slots[r].push(t),this._hasSlots=!0}}$$beforeNodeChange(t,o,n,r){if(typeof n=="string"&&typeof r=="string"&&o)return t.nodeName==="SCRIPT"?t.type==="text/style"&&t._dozAttach.styleData.id&&t._dozAttach.styleData.owner&&document.getElementById(t._dozAttach.styleData.id)&&(document.getElementById(t._dozAttach.styleData.id).textContent=lt(n,t._dozAttach.styleData.ownerByData)):o.textContent=be(n),o}$$afterNodeChange(t,o){W(o),W(t),o._dozAttach[U]&&(t._dozAttach[U]=o._dozAttach[U],t._dozAttach[U]._rootElement=t,t._dozAttach[U]._rootElement.parentNode.dataset.uid=o._dozAttach[U].uId)}$$beforeNodeWalk(t,o,n){if(t.childNodes[o]){W(t.childNodes[o]);const r=t.childNodes[o]._dozAttach[Qe];if(r&&n.length)return n.forEach(i=>{Object.keys(i).forEach(l=>{r.props[l]=i[l]})}),!0}return!1}$$afterAttributeUpdate(t,o,n){let r=Y(o);if(this.updateChildrenProps&&t){o=r?o:re(o);const i=t.firstChild;W(i),i&&i._dozAttach[U]&&Object.prototype.hasOwnProperty.call(i._dozAttach[U]._publicProps,o)?i._dozAttach[U].props[o]=n:t._dozAttach[E]&&(t._dozAttach[E].props[o]=n)}h.callComponentDOMElementUpdate(this,t),t&&r&&t.removeAttribute(o)}}function In(e){return e._dozAttach.originalTagName||e.nodeName.toLowerCase()}const vn=[];function Fe(e,t){if(e.cmp){let o=e.cmp._childrenInc++;h.callAppComponentAssignIndex(t,o,n=>{e.cmp.children[n]=t}),e.cmp.childrenByTag[t.tag]===void 0?e.cmp.childrenByTag[t.tag]=[t]:e.cmp.childrenByTag[t.tag].push(t)}}function Ke(){vn.forEach(e=>e.remove())}function ae(e=null,t,o){if(e._isRendered)return;e._isRendered=!0,e.render(!0);let n=e.getHTMLElement()._dozAttach.injected;if(n&&e.parent){let r=e.parent.injectTemplates.get(n);r&&(r.cmp=e),e.parent.injectTemplates.set(n,r)}if(e._rootElement._dozAttach[U]=e,e.getHTMLElement()._dozAttach[E]=e,e._defaultSlot&&e.getHTMLElement().firstElementChild){let r=document.createComment("slot");e.getHTMLElement().replaceChild(r,e.getHTMLElement().firstElementChild)}e._hasSlots&&o&&$(()=>o.render(!1,[],!0)),M.callMount(e),e.waitMount&&(e.appReadyExcluded||t.app._onAppComponentsMounted.delete(e))}function xe(e,t={},o){W(e);let n=In(e);h.callAppComponentAssignName(t,e,l=>{n=l});let r={};t.cmp&&t.cmp._components&&(r=t.cmp._components);const i=o.autoCmp||r[n]||o.app._components[n]||nt.getComponent(n);if(i){if(t.cmp&&t.cmp.mounted)return;const l=Vo(e),s={},a=t.cmp||o.parent;let p;if(typeof i.cfg=="function"){if(!(i.cfg.prototype instanceof X)){const u=i.cfg;i.cfg=class extends X{},i.cfg.prototype.template=u}p=new i.cfg({tag:i.tag||n,root:e,app:o.app,props:l,componentDirectives:s,parentCmp:a})}else if(i.cfg.then){let u=null,f=null;e.parentElement&&e.parentElement._dozAttach&&e.parentElement._dozAttach.props&&(e.parentElement._dozAttach.props["d-async-loading"]&&(u=e.parentElement._dozAttach.props["d-async-loading"]),e.parentElement._dozAttach.props["d-async-error"]&&(f=e.parentElement._dozAttach.props["d-async-error"])),((A,c,C)=>{let k=null;if(c){let d={},m={};typeof c=="object"&&c.component&&(d=c.props||d,m=c.directives||m,c=c.component),p=new c({tag:c.tag||"loading-component",root:A,app:o.app,props:d,componentDirectives:m,parentCmp:a}),k=p}i.cfg.then(d=>{if(typeof d=="object"){let m=Object.keys(d);d=d[m[m.length-1]]}if(d.tag){let m=document.createElement(d.tag);A.replaceWith(m),A=m}p=new d({tag:i.tag||n,root:A,app:o.app,props:l,componentDirectives:s,parentCmp:a}),fe(p),p.app.emit("componentPropsInit",p),k&&k.destroy(),ae(p,o,a),Fe(t,p)}).catch(d=>{if(C){let m={},g={};typeof C=="object"&&C.component&&(m=C.props||m,g=C.directives||g,C=C.component),p=new C({tag:C.tag||"error-component",root:A,app:o.app,props:m,componentDirectives:g,parentCmp:a})}console.error(d)})})(e,u,f)}else p=new X({tag:i.tag||n,cmp:i,root:e,app:o.app,props:l,componentDirectives:s,parentCmp:a});return p&&p.__beforeCreateReturnsFalse&&(p=void 0),p?(p.rawChildrenObject=e._dozAttach.elementChildren,p.$domEl=e,typeof p.module=="object"&&Xo(p,p.module),fe(p),p.app.emit("componentPropsInit",p),p.waitMount?(p.appReadyEx