Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@neuronet.io/vido

Package Overview
Dependencies
Maintainers
1
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neuronet.io/vido - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

2

package.json
{
"name": "@neuronet.io/vido",
"version": "1.0.27",
"version": "1.0.28",
"description": "Compilation-less and eval free frontend framework for fast scalable apps.",

@@ -5,0 +5,0 @@ "main": "vido.js",

@@ -41,3 +41,3 @@ /**

* http://polymer.github.io/PATENTS.txt
*/const y=` ${l} `;class _{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?y:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class b extends _{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
*/const y=` ${l} `;class _{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=g.exec(e);t+=null===i?e+(n?y:c):e.substr(0,i.index)+i[1]+i[2]+u+i[3]+l}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class x extends _{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),s(t,n.firstChild),e}}
/**

@@ -55,3 +55,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const x=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class N{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new A(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(x(e)||!w(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class A{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||x(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class E{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(x(e)?e!==this.value&&this.__commitText(e):e instanceof _?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):w(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new E(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class V{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class T extends N{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new C(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class C extends A{}let k=!1;try{const e={get capture(){return k=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class M{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=S(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const S=e=>e&&(k?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const b=e=>null===e||!("object"==typeof e||"function"==typeof e),w=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class N{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new A(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(b(e)||!w(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class A{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===r||b(e)&&e===this.value||(this.value=e,n(e)||(this.committer.dirty=!0))}commit(){for(;n(this.value);){const e=this.value;this.value=r,e(this)}this.value!==r&&this.committer.commit()}}class E{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(f()),this.endNode=e.appendChild(f())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=f()),e.__insert(this.endNode=f())}insertAfterPart(e){e.__insert(this.startNode=f()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}const e=this.__pendingValue;e!==r&&(b(e)?e!==this.value&&this.__commitText(e):e instanceof _?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):w(e)?this.__commitIterable(e):e===a?(this.value=a,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const n=new v(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new E(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){i(this.startNode.parentNode,e.nextSibling,this.endNode)}}class V{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=r}}class T extends N{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new C(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class C extends A{}let k=!1;try{const e={get capture(){return k=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class M{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=r,e(this)}if(this.__pendingValue===r)return;const e=this.__pendingValue,t=this.value,o=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||o);o&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=S(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=r}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const S=e=>e&&(k?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -109,3 +109,3 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const L=(e,...t)=>new _(e,t,"html",I),W=(e,...t)=>new b(e,t,"svg",I);
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const L=(e,...t)=>new _(e,t,"html",I),W=(e,...t)=>new x(e,t,"svg",I);
/**

@@ -137,3 +137,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/var R=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const B=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new E(n.options);n.value=e;let r=0;try{for(var a,l=R(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),D=new WeakMap,q=t(e=>t=>{if(!(t instanceof E))throw new Error("cache can only be used in text bindings");let n=D.get(t);void 0===n&&(n=new WeakMap,D.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof _&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof _){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),z=new WeakMap,G=t(e=>t=>{if(!(t instanceof A)||t instanceof C||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;z.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=z.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const o=J.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||J.has(n)))return;n.setValue(t()),J.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof A){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new E(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof E))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof A)||t instanceof C||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof E))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&x(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(x(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
*/var R=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const B=t((e,t)=>async n=>{var o,s;if(!(n instanceof E))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new E(n.options);n.value=e;let r=0;try{for(var a,l=R(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),D=new WeakMap,q=t(e=>t=>{if(!(t instanceof E))throw new Error("cache can only be used in text bindings");let n=D.get(t);void 0===n&&(n=new WeakMap,D.set(t,n));const o=t.value;if(o instanceof v){if(e instanceof _&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),s(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof _){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),z=new WeakMap,G=t(e=>t=>{if(!(t instanceof A)||t instanceof C||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;z.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=z.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}z.set(t,e)}),J=new WeakMap,K=t((e,t)=>n=>{const o=J.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||J.has(n)))return;n.setValue(t()),J.set(n,Array.isArray(e)?Array.from(e):e)}),Q=t(e=>t=>{if(void 0===e&&t instanceof A){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),U=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(f(),o);n.insertBefore(f(),o);const i=new E(e.options);return i.insertAfterNode(s),i},X=(e,t)=>(e.setValue(t),e.commit(),e),Y=(e,t,n)=>{const o=e.startNode.parentNode,i=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==i&&s(o,t.startNode,r,i)},Z=e=>{i(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},ee=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},te=new WeakMap,ne=new WeakMap,oe=t((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof E))throw new Error("repeat can only be used in text bindings");const s=te.get(t)||[],i=ne.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=X(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=X(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=X(s[p],a[f]),Y(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=X(s[h],a[m]),Y(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=ee(l,m,f),d=ee(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=U(t,s[p]);X(e,a[m]),r[m]=e}else r[m]=X(n,a[m]),Y(t,n,s[p]),s[e]=null;m++}else Z(s[h]),h--;else Z(s[p]),p++;for(;m<=f;){const e=U(t,r[f+1]);X(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&Z(e)}te.set(t,r),ne.set(t,l)}}),se=new WeakMap,ie=t(e=>t=>{if(!(t instanceof A)||t instanceof C||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;se.has(t)||(o.cssText=n.strings.join(" "));const s=se.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);se.set(t,e)}),re=new WeakMap,ae=t(e=>t=>{if(!(t instanceof E))throw new Error("unsafeHTML can only be used in text bindings");const n=re.get(t);if(void 0!==n&&b(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),re.set(t,{value:e,fragment:s})}),le=new WeakMap,ce=t((...e)=>t=>{let n=le.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},le.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(b(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
/**

@@ -151,3 +151,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function de(e){return e&&"object"==typeof e&&!Array.isArray(e)}function ue(e,...t){const n=t.shift();if(de(e)&&de(n))for(const t in n)if(de(n[t]))void 0===e[t]&&(e[t]={}),e[t]=ue(e[t],n[t]);else if(Array.isArray(n[t])){e[t]=[];for(let o of n[t])de(o)?e[t].push(ue({},{},o)):e[t].push(o)}else e[t]=n[t];return t.length?ue(e,...t):e}export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:L,svg:W,directive:t,asyncAppend:F,asyncReplace:B,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(ue({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return t.debug&&(console.groupCollapsed(`html component ${e}`),console.log(ue({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),s[e].update(n,t)}}}(n,i),p=e(i,t),h={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(ue({},{props:t,components:Object.keys(s),destroyable:r})),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:e=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(ue({},{props:e,components:Object.keys(s),onChangeFunctions:l})),console.trace(),console.groupEnd()),p(e)),change(e){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(ue({},{props:t,components:Object.keys(s),onChangeFunctions:l,changedProps:e})),console.trace(),console.groupEnd());for(const t of l)t(e);i.lastProps=e}};return s[n]=h,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(ue({},{props:t,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(ue({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(ue({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){j(s[i].update(),r),u.executeActions()}};return u}export{ue as mergeDeep};
*/function de(e){return e&&"object"==typeof e&&!Array.isArray(e)}function ue(e,...t){const n=t.shift();if(de(e)&&de(n))for(const t in n)if(de(n[t]))void 0===e[t]&&(e[t]={}),e[t]=ue(e[t],n[t]);else if(Array.isArray(n[t])){e[t]=[];for(let o of n[t])de(o)?e[t].push(ue({},{},o)):e[t].push(o)}else e[t]=n[t];return t.length?ue(e,...t):e}export default function(e,n){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return t((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:n,html:L,svg:W,directive:t,asyncAppend:F,asyncReplace:B,cache:q,classMap:G,guard:K,ifDefined:Q,repeat:oe,styleMap:ie,unsafeHTML:ae,until:ce,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(ue({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return s[e].update(n,t)}}}(n,i),p=e(i,t),h={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(ue({},{props:t,components:Object.keys(s),destroyable:r})),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:e=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(ue({},{props:e,components:Object.keys(s),onChangeFunctions:l})),console.trace(),console.groupEnd()),p(e)),change(e){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(ue({},{props:t,components:Object.keys(s),onChangeFunctions:l,changedProps:e})),console.trace(),console.groupEnd());for(const t of l)t(e);i.lastProps=e}};return s[n]=h,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(ue({},{props:t,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(ue({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(ue({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(ue({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){j(s[i].update(),r),u.executeActions()}};return u}export{ue as mergeDeep};
//# sourceMappingURL=vido.esm.min.js.map

@@ -41,3 +41,3 @@ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Vido={})}(this,(function(e){"use strict";

* http://polymer.github.io/PATENTS.txt
*/const _=` ${c} `;class b{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=v.exec(e);t+=null===i?e+(n?_:d):e.substr(0,i.index)+i[1]+i[2]+p+i[3]+c}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class x extends b{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),i(t,n.firstChild),e}}
*/const _=` ${c} `;class x{constructor(e,t,n,o){this.strings=e,this.values=t,this.type=n,this.processor=o}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let o=0;o<e;o++){const e=this.strings[o],s=e.lastIndexOf("\x3c!--");n=(s>-1||n)&&-1===e.indexOf("--\x3e",s+1);const i=v.exec(e);t+=null===i?e+(n?_:d):e.substr(0,i.index)+i[1]+i[2]+p+i[3]+c}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}class b extends x{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const e=super.getTemplateElement(),t=e.content,n=t.firstChild;return t.removeChild(n),i(t,n.firstChild),e}}
/**

@@ -55,3 +55,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),N=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class A{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new E(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(w(e)||!N(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class E{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===a||w(e)&&e===this.value||(this.value=e,o(e)||(this.committer.dirty=!0))}commit(){for(;o(this.value);){const e=this.value;this.value=a,e(this)}this.value!==a&&this.committer.commit()}}class V{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(g()),this.endNode=e.appendChild(g())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=g()),e.__insert(this.endNode=g())}insertAfterPart(e){e.__insert(this.startNode=g()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}const e=this.__pendingValue;e!==a&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof b?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):N(e)?this.__commitIterable(e):e===l?(this.value=l,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof y&&this.value.template===t)this.value.update(e.values);else{const n=new y(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new V(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){r(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=a}}class C extends A{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new k(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class k extends E{}let M=!1;try{const e={get capture(){return M=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class S{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=a}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(M?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),N=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class A{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new E(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let o=0;o<t;o++){n+=e[o];const t=this.parts[o];if(void 0!==t){const e=t.value;if(w(e)||!N(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t]}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class E{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===a||w(e)&&e===this.value||(this.value=e,o(e)||(this.committer.dirty=!0))}commit(){for(;o(this.value);){const e=this.value;this.value=a,e(this)}this.value!==a&&this.committer.commit()}}class V{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(g()),this.endNode=e.appendChild(g())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=g()),e.__insert(this.endNode=g())}insertAfterPart(e){e.__insert(this.startNode=g()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}const e=this.__pendingValue;e!==a&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof x?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):N(e)?this.__commitIterable(e):e===l?(this.value=l,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof y&&this.value.template===t)this.value.update(e.values);else{const n=new y(t,e.processor,this.options),o=n._clone();n.update(e.values),this.__commitNode(o),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,o=0;for(const s of e)void 0===(n=t[o])&&(n=new V(this.options),t.push(n),0===o?n.appendIntoPart(this):n.insertAfterPart(t[o-1])),n.setValue(s),n.commit(),o++;o<t.length&&(t.length=o,this.clear(n&&n.endNode))}clear(e=this.startNode){r(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=a}}class C extends A{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new k(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class k extends E{}let M=!1;try{const e={get capture(){return M=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}class S{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;o(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=I(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=a}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const I=e=>e&&(M?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);
/**

@@ -109,3 +109,3 @@ * @license

*/
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const W=(e,...t)=>new b(e,t,"html",P),H=(e,...t)=>new x(e,t,"svg",P);
(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const W=(e,...t)=>new x(e,t,"html",P),H=(e,...t)=>new b(e,t,"svg",P);
/**

@@ -137,3 +137,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/var B=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const D=n((e,t)=>async n=>{var o,s;if(!(n instanceof V))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new V(n.options);n.value=e;let r=0;try{for(var a,l=B(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),q=new WeakMap,z=n(e=>t=>{if(!(t instanceof V))throw new Error("cache can only be used in text bindings");let n=q.get(t);void 0===n&&(n=new WeakMap,q.set(t,n));const o=t.value;if(o instanceof y){if(e instanceof b&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),i(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof b){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),G=new WeakMap,J=n(e=>t=>{if(!(t instanceof E)||t instanceof k||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;G.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=G.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}G.set(t,e)}),K=new WeakMap,Q=n((e,t)=>n=>{const o=K.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||K.has(n)))return;n.setValue(t()),K.set(n,Array.isArray(e)?Array.from(e):e)}),U=n(e=>t=>{if(void 0===e&&t instanceof E){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),X=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(g(),o);n.insertBefore(g(),o);const i=new V(e.options);return i.insertAfterNode(s),i},Y=(e,t)=>(e.setValue(t),e.commit(),e),Z=(e,t,n)=>{const o=e.startNode.parentNode,s=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==s&&i(o,t.startNode,r,s)},ee=e=>{r(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},te=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},ne=new WeakMap,oe=new WeakMap,se=n((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof V))throw new Error("repeat can only be used in text bindings");const s=ne.get(t)||[],i=oe.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=Y(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=Y(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=Y(s[p],a[f]),Z(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=Y(s[h],a[m]),Z(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=te(l,m,f),d=te(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=X(t,s[p]);Y(e,a[m]),r[m]=e}else r[m]=Y(n,a[m]),Z(t,n,s[p]),s[e]=null;m++}else ee(s[h]),h--;else ee(s[p]),p++;for(;m<=f;){const e=X(t,r[f+1]);Y(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&ee(e)}ne.set(t,r),oe.set(t,l)}}),ie=new WeakMap,re=n(e=>t=>{if(!(t instanceof E)||t instanceof k||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;ie.has(t)||(o.cssText=n.strings.join(" "));const s=ie.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);ie.set(t,e)}),ae=new WeakMap,le=n(e=>t=>{if(!(t instanceof V))throw new Error("unsafeHTML can only be used in text bindings");const n=ae.get(t);if(void 0!==n&&w(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),ae.set(t,{value:e,fragment:s})}),ce=new WeakMap,de=n((...e)=>t=>{let n=ce.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},ce.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(w(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
*/var B=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(o,s){(function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)})(o,s,(t=e[n](t)).done,t.value)}))}}};const D=n((e,t)=>async n=>{var o,s;if(!(n instanceof V))throw new Error("asyncReplace can only be used in text bindings");if(e===n.value)return;const i=new V(n.options);n.value=e;let r=0;try{for(var a,l=B(e);!(a=await l.next()).done;){let o=a.value;if(n.value!==e)break;0===r&&(n.clear(),i.appendIntoPart(n)),void 0!==t&&(o=t(o,r)),i.setValue(o),i.commit(),r++}}catch(e){o={error:e}}finally{try{a&&!a.done&&(s=l.return)&&await s.call(l)}finally{if(o)throw o.error}}}),q=new WeakMap,z=n(e=>t=>{if(!(t instanceof V))throw new Error("cache can only be used in text bindings");let n=q.get(t);void 0===n&&(n=new WeakMap,q.set(t,n));const o=t.value;if(o instanceof y){if(e instanceof x&&o.template===t.options.templateFactory(e))return void t.setValue(e);{let e=n.get(o.template);void 0===e&&(e={instance:o,nodes:document.createDocumentFragment()},n.set(o.template,e)),i(e.nodes,t.startNode.nextSibling,t.endNode)}}if(e instanceof x){const o=t.options.templateFactory(e),s=n.get(o);void 0!==s&&(t.setValue(s.nodes),t.commit(),t.value=s.instance)}t.setValue(e)}),G=new WeakMap,J=n(e=>t=>{if(!(t instanceof E)||t instanceof k||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:n}=t,{element:o}=n;G.has(t)||(o.className=n.strings.join(" "));const{classList:s}=o,i=G.get(t);for(const t in i)t in e||s.remove(t);for(const t in e){const n=e[t];if(!i||n!==i[t]){s[n?"add":"remove"](t)}}G.set(t,e)}),K=new WeakMap,Q=n((e,t)=>n=>{const o=K.get(n);if(Array.isArray(e)){if(Array.isArray(o)&&o.length===e.length&&e.every((e,t)=>e===o[t]))return}else if(o===e&&(void 0!==e||K.has(n)))return;n.setValue(t()),K.set(n,Array.isArray(e)?Array.from(e):e)}),U=n(e=>t=>{if(void 0===e&&t instanceof E){if(e!==t.value){const e=t.committer.name;t.committer.element.removeAttribute(e)}}else t.setValue(e)}),X=(e,t)=>{const n=e.startNode.parentNode,o=void 0===t?e.endNode:t.startNode,s=n.insertBefore(g(),o);n.insertBefore(g(),o);const i=new V(e.options);return i.insertAfterNode(s),i},Y=(e,t)=>(e.setValue(t),e.commit(),e),Z=(e,t,n)=>{const o=e.startNode.parentNode,s=n?n.startNode:e.endNode,r=t.endNode.nextSibling;r!==s&&i(o,t.startNode,r,s)},ee=e=>{r(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},te=(e,t,n)=>{const o=new Map;for(let s=t;s<=n;s++)o.set(e[s],s);return o},ne=new WeakMap,oe=new WeakMap,se=n((e,t,n)=>{let o;return void 0===n?n=t:void 0!==t&&(o=t),t=>{if(!(t instanceof V))throw new Error("repeat can only be used in text bindings");const s=ne.get(t)||[],i=oe.get(t)||[],r=[],a=[],l=[];let c,d,u=0;for(const t of e)l[u]=o?o(t,u):u,a[u]=n(t,u),u++;let p=0,h=s.length-1,m=0,f=a.length-1;for(;p<=h&&m<=f;)if(null===s[p])p++;else if(null===s[h])h--;else if(i[p]===l[m])r[m]=Y(s[p],a[m]),p++,m++;else if(i[h]===l[f])r[f]=Y(s[h],a[f]),h--,f--;else if(i[p]===l[f])r[f]=Y(s[p],a[f]),Z(t,s[p],r[f+1]),p++,f--;else if(i[h]===l[m])r[m]=Y(s[h],a[m]),Z(t,s[h],s[p]),h--,m++;else if(void 0===c&&(c=te(l,m,f),d=te(i,p,h)),c.has(i[p]))if(c.has(i[h])){const e=d.get(l[m]),n=void 0!==e?s[e]:null;if(null===n){const e=X(t,s[p]);Y(e,a[m]),r[m]=e}else r[m]=Y(n,a[m]),Z(t,n,s[p]),s[e]=null;m++}else ee(s[h]),h--;else ee(s[p]),p++;for(;m<=f;){const e=X(t,r[f+1]);Y(e,a[m]),r[m++]=e}for(;p<=h;){const e=s[p++];null!==e&&ee(e)}ne.set(t,r),oe.set(t,l)}}),ie=new WeakMap,re=n(e=>t=>{if(!(t instanceof E)||t instanceof k||"style"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");const{committer:n}=t,{style:o}=n.element;ie.has(t)||(o.cssText=n.strings.join(" "));const s=ie.get(t);for(const t in s)t in e||(-1===t.indexOf("-")?o[t]=null:o.removeProperty(t));for(const t in e)-1===t.indexOf("-")?o[t]=e[t]:o.setProperty(t,e[t]);ie.set(t,e)}),ae=new WeakMap,le=n(e=>t=>{if(!(t instanceof V))throw new Error("unsafeHTML can only be used in text bindings");const n=ae.get(t);if(void 0!==n&&w(e)&&e===n.value&&t.value===n.fragment)return;const o=document.createElement("template");o.innerHTML=e;const s=document.importNode(o.content,!0);t.setValue(s),ae.set(t,{value:e,fragment:s})}),ce=new WeakMap,de=n((...e)=>t=>{let n=ce.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},ce.set(t,n));const o=n.values;let s=o.length;n.values=e;for(let i=0;i<e.length&&!(i>n.lastRenderedIndex);i++){const r=e[i];if(w(r)||"function"!=typeof r.then){t.setValue(r),n.lastRenderedIndex=i;break}i<s&&r===o[i]||(n.lastRenderedIndex=2147483647,s=0,Promise.resolve(r).then(e=>{const o=n.values.indexOf(r);o>-1&&o<n.lastRenderedIndex&&(n.lastRenderedIndex=o,t.setValue(e),t.commit())}))}});
/**

@@ -151,3 +151,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/function ue(e){return e&&"object"==typeof e&&!Array.isArray(e)}function pe(e,...t){const n=t.shift();if(ue(e)&&ue(n))for(const t in n)if(ue(n[t]))void 0===e[t]&&(e[t]={}),e[t]=pe(e[t],n[t]);else if(Array.isArray(n[t])){e[t]=[];for(let o of n[t])ue(o)?e[t].push(pe({},{},o)):e[t].push(o)}else e[t]=n[t];return t.length?pe(e,...t):e}e.default=function(e,t){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return n((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:t,html:W,svg:H,directive:n,asyncAppend:R,asyncReplace:D,cache:z,classMap:J,guard:Q,ifDefined:U,repeat:se,styleMap:re,unsafeHTML:le,until:de,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(pe({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return t.debug&&(console.groupCollapsed(`html component ${e}`),console.log(pe({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),s[e].update(n,t)}}}(n,i),p=e(i,t),h={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(pe({},{props:t,components:Object.keys(s),destroyable:r})),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:e=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(pe({},{props:e,components:Object.keys(s),onChangeFunctions:l})),console.trace(),console.groupEnd()),p(e)),change(e){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(pe({},{props:t,components:Object.keys(s),onChangeFunctions:l,changedProps:e})),console.trace(),console.groupEnd());for(const t of l)t(e);i.lastProps=e}};return s[n]=h,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(pe({},{props:t,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(pe({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(pe({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){L(s[i].update(),r),u.executeActions()}};return u},e.mergeDeep=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
*/function ue(e){return e&&"object"==typeof e&&!Array.isArray(e)}function pe(e,...t){const n=t.shift();if(ue(e)&&ue(n))for(const t in n)if(ue(n[t]))void 0===e[t]&&(e[t]={}),e[t]=pe(e[t],n[t]);else if(Array.isArray(n[t])){e[t]=[];for(let o of n[t])ue(o)?e[t].push(pe({},{},o)):e[t].push(o)}else e[t]=n[t];return t.length?pe(e,...t):e}e.default=function(e,t){let o=0;const s={};let i,r,a=[],l=0;const c=Promise.resolve();function d(e){return n((function(t,n){return function(o){const s=o.committer.element;for(const o of t)if("function"==typeof o){const t=a.find(t=>t.instance===e&&t.componentAction.create===o&&t.element===s);if(t)t.props=n;else{void 0!==s.__vido__&&delete s.__vido__;const t={create:o,update(){},destroy(){}};a.push({instance:e,componentAction:t,element:s,props:n})}}}}))}const u={debug:!1,state:e,api:t,html:W,svg:H,directive:n,asyncAppend:R,asyncReplace:D,cache:z,classMap:J,guard:Q,ifDefined:U,repeat:se,styleMap:re,unsafeHTML:le,until:de,lastProps:{},actions(e,t){},onDestroy(){},onChange(e){},componentsFromDataArray(e,t,n,o){if(e.length<t.length){let s=t.length-e.length;for(;s;){const i=t[t.length-s];e.push(u.createComponent(o,n(i))),s--}}else if(e.length>t.length){let n=e.length-t.length;for(;n;){e[e.length-n].destroy(),n--}e.length=t.length}let s=0;for(const o of t)e[s].change(n(o)),s++;return e},createComponent(e,t){const n=e.name+":"+o++;let i;const r=[];let l=[];i=Object.assign(Object.assign({},u),{update:function(){u.updateTemplate(i)},onDestroy:function(e){r.push(e)},onChange:function(e){l.push(e)},instance:n,actions:d(n),lastProps:t});const c=function(e,t){return{instance:e,vidoInstance:t,destroy:()=>(t.debug&&(console.groupCollapsed(`destroying component ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.destroyComponent(e,t)),update:()=>(t.debug&&(console.groupCollapsed(`updating component ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),u.updateTemplate(t)),change(n){t.debug&&(console.groupCollapsed(`changing component ${e}`),console.log(pe({},{props:n,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),void 0!==s[e]&&s[e].change(n,t)},html(n={}){if(void 0!==s[e])return s[e].update(n,t)}}}(n,i),p=e(i,t),h={instance:n,vidoInstance:i,lastProps:t,destroy(){i.debug&&(console.groupCollapsed(`component destroy method fired ${n}`),console.log(pe({},{props:t,components:Object.keys(s),destroyable:r})),console.trace(),console.groupEnd());for(const e of r)e();l.length=0,r.length=0},update:e=>(i.debug&&(console.groupCollapsed(`component update method fired ${n}`),console.log(pe({},{props:e,components:Object.keys(s),onChangeFunctions:l})),console.trace(),console.groupEnd()),p(e)),change(e){i.debug&&(console.groupCollapsed(`component change method fired ${n}`),console.log(pe({},{props:t,components:Object.keys(s),onChangeFunctions:l,changedProps:e})),console.trace(),console.groupEnd());for(const t of l)t(e);i.lastProps=e}};return s[n]=h,s[n].change(t),i.debug&&(console.groupCollapsed(`component created ${n}`),console.log(pe({},{props:t,components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),c},destroyComponent(e,t){t.debug&&(console.groupCollapsed(`destroying component ${e}...`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd()),a=a.filter(t=>(t.instance===e&&"function"==typeof t.componentAction.destroy&&t.componentAction.destroy(t.element,t.props),t.instance!==e)),void 0!==s[e]&&"function"==typeof s[e].destroy&&s[e].destroy(),delete s[e],t.debug&&(console.groupCollapsed(`component destroyed ${e}`),console.log(pe({},{components:Object.keys(s),actions:a})),console.trace(),console.groupEnd())},updateTemplate(e){const t=++l,n=this;c.then((function(){t===l&&(n.render(),l=0,e.debug&&(console.groupCollapsed("templates updated"),console.trace(),console.groupEnd()))}))},createApp(e,t){r=t;const n=this.createComponent(e);return i=n.instance,this.render(),n},executeActions(){for(const e of a)if(void 0===e.element.__vido__){if("function"==typeof e.componentAction.create){const t=e.componentAction.create(e.element,e.props);u.debug&&(console.groupCollapsed(`create action executed ${e.instance}`),console.log(pe({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()),void 0!==t&&("function"==typeof t.update&&(e.componentAction.update=t.update),"function"==typeof t.destroy&&(e.componentAction.destroy=t.destroy))}}else"function"==typeof e.componentAction.update&&(e.componentAction.update(e.element,e.props),u.debug&&(console.groupCollapsed(`update action executed ${e.instance}`),console.log(pe({},{components:Object.keys(s),action:e,actions:a})),console.trace(),console.groupEnd()));for(const e of a)e.element.__vido__={instance:e.instance,props:e.props}},render(){L(s[i].update(),r),u.executeActions()}};return u},e.mergeDeep=pe,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=vido.min.js.map

@@ -355,8 +355,2 @@ import { render, html, directive, svg } from 'lit-html';

if (typeof components[instance] !== 'undefined') {
if (vidoInstance.debug) {
console.groupCollapsed(`html component ${instance}`);
console.log(mergeDeep({}, { props, components: Object.keys(components), actions }));
console.trace();
console.groupEnd();
}
return components[instance].update(props, vidoInstance);

@@ -363,0 +357,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc