!function e(t,s,a){function i(r,o){if(!s[r]){if(!t[r]){var l="function"==typeof require&&require;if(!o&&l)return l(r,!0);if(n)return n(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var c=s[r]={exports:{}};t[r][0].call(c.exports,(function(e){return i(t[r][1][e]||e)}),c,c.exports,e,t,s,a)}return s[r].exports}for(var n="function"==typeof require&&require,r=0;r1;)s=s[a.shift()];s[a.shift()]=t}},{key:"removeDataByString",value:function(e){for(var t=this.data,s=e.split(".");s.length>1;)t=t[s.shift()];var a=s.shift();a.match(/^\d+$/)?t.splice(Number(a),1):delete t[a]}},{key:"resolveBlock",value:function(e,t,s){var a=this,i=e.match(//g),n=e.match(//g),r=e.match(//g),o=e.match(//g);if(i)for(var l=0,d=i.length;l/g,(function(e,t){return(0,o.selector)("#"+t).innerHTML}))}},{key:"resolveWith",value:function(e){return e=e.replace(/(([\n\r\t]|.)*?)/g,(function(e,t){return e=e.replace(/data\-bind=['"](.*?)['"]/g,"data-bind='"+t+".$1'")}))}},{key:"resolveLoop",value:function(e){var t=this;return e=e.replace(/(([\n\r\t]|.)*?)/g,(function(e,s,a){var i=t.getDataByString(s),n=[],r="";if((n="function"==typeof i?i.apply(t):i)instanceof Array)for(var o=0,l=n.length;o(([\n\r\t]|.)*?)/g)}},{key:"getHtml",value:function(e,t){var s=this.atemplate.find((function(t){return t.id===e})),a="";if(s&&s.html&&(a=s.html),t&&(a=e),!a)return"";var i=this.data;for(a=this.resolveInclude(a),a=this.resolveWith(a);this.hasLoop(a);)a=this.resolveLoop(a);return a=(a=this.resolveBlock(a,i)).replace(/\\([^\\])/g,"$1"),(a=this.resolveAbsBlock(a)).replace(/^([\t ])*\n/gm,"")}},{key:"update",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"html",s=arguments[1],a=this.templates;this.beforeUpdated&&this.beforeUpdated();for(var i=function(i,n){var l=a[i],d="#"+l,c=e.getHtml(l),u=(0,o.selector)("[data-id='"+l+"']");if(u)if("text"===t)u.innerText=c;else if(s){var p=document.createElement("div");p.innerHTML=c;var h=p.querySelector(s).outerHTML;(0,r.default)(u.querySelector(s),h)}else(0,r.default)(u,"
"+c+"
");else(0,o.selector)(d).insertAdjacentHTML("afterend",'
'),"text"===t?(0,o.selector)("[data-id='"+l+"']").innerText=c:(0,o.selector)("[data-id='"+l+"']").innerHTML=c;var f=e.atemplate.find((function(e){return e.id===l}));f.binded||(f.binded=!0,e.addDataBind((0,o.selector)("[data-id='"+l+"']")),e.addActionBind((0,o.selector)("[data-id='"+l+"']")))},n=0,l=a.length;n1?s-1:0),i=1;i1;)t=t[s.shift()];var a=s.shift();return a.match(/^\d+$/)?t.splice(Number(a),1):delete t[a],this}}]),e}();s.default=p,t.exports=s.default},{"./util":2,"ie-array-find-polyfill":6,morphdom:7}],2:[function(e,t,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=s.matches=function(e,t){for(var s=(e.document||e.ownerDocument).querySelectorAll(t),a=s.length;--a>=0&&s.item(a)!==e;);return a>-1},i=(s.selector=function(e){return document.querySelector(e)},s.findAncestor=function(e,t){if("function"==typeof e.closest)return e.closest(t)||null;for(;e&&e!==document;){if(a(e,t))return e;e=e.parentElement}return null}),n=[];s.on=function(e,t,s,a){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];s.split(" ").forEach((function(s){var o=function(e){var s=i(e.target,t);s&&(e.delegateTarget=s,a(e))};n.push({listener:o,element:e,query:t,event:s,capture:r}),e.addEventListener(s,o,r)}))},s.off=function(e,t,s){s.split(" ").forEach((function(s){n.forEach((function(a,i){a.element===e&&a.query===t&&a.event===s&&(e.removeEventListener(s,a.listener,a.capture),n.splice(i,1))}))}))}},{}],3:[function(e,t,s){"use strict";try{var a=new window.CustomEvent("test");if(a.preventDefault(),!0!==a.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var i=function(e,t){var s,a;return t=t||{bubbles:!1,cancelable:!1,detail:void 0},(s=document.createEvent("CustomEvent")).initCustomEvent(e,t.bubbles,t.cancelable,t.detail),a=s.preventDefault,s.preventDefault=function(){a.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(e){this.defaultPrevented=!0}},s};i.prototype=window.Event.prototype,window.CustomEvent=i}},{}],4:[function(e,t,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.$=o,s.add=function(){const e=this;let t,s;for(var a=arguments.length,i=new Array(a),n=0;ne.split(" "))));return this.forEach((e=>{e.classList.add(...a)})),this},s.animate=function(e,t){const s=(0,a.getWindow)(),i=this,n={props:Object.assign({},e),params:Object.assign({duration:300,easing:"swing"},t),elements:i,animating:!1,que:[],easingProgress:(e,t)=>"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t,stop(){n.frameId&&s.cancelAnimationFrame(n.frameId),n.animating=!1,n.elements.each((e=>{delete e.dom7AnimateInstance})),n.que=[]},done(e){if(n.animating=!1,n.elements.each((e=>{delete e.dom7AnimateInstance})),e&&e(i),n.que.length>0){const e=n.que.shift();n.animate(e[0],e[1])}},animate(e,t){if(n.animating)return n.que.push([e,t]),n;const a=[];n.elements.each(((t,i)=>{let r,o,l,d,c;t.dom7AnimateInstance||(n.elements[i].dom7AnimateInstance=n),a[i]={container:t},Object.keys(e).forEach((n=>{r=s.getComputedStyle(t,null).getPropertyValue(n).replace(",","."),o=parseFloat(r),l=r.replace(o,""),d=parseFloat(e[n]),c=e[n]+l,a[i][n]={initialFullValue:r,initialValue:o,unit:l,finalValue:d,finalFullValue:c,currentValue:o}}))}));let r,o,l=null,d=0,c=0,u=!1;return n.animating=!0,n.frameId=s.requestAnimationFrame((function p(){let h,f;r=(new Date).getTime(),u||(u=!0,t.begin&&t.begin(i)),null===l&&(l=r),t.progress&&t.progress(i,Math.max(Math.min((r-l)/t.duration,1),0),l+t.duration-r<0?0:l+t.duration-r,l),a.forEach((s=>{const i=s;o||i.done||Object.keys(e).forEach((s=>{if(o||i.done)return;h=Math.max(Math.min((r-l)/t.duration,1),0),f=n.easingProgress(t.easing,h);const{initialValue:u,finalValue:p,unit:m}=i[s];i[s].currentValue=u+f*(p-u);const g=i[s].currentValue;(p>u&&g>=p||p=0&&(t[(s=i.name.split("data-")[1],s.toLowerCase().replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=i.value)}var s;for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t},s.default=void 0,s.detach=function(){return this.remove()},s.each=function(e){return e?(this.forEach(((t,s)=>{e.apply(t,[t,s])})),this):this},s.empty=function(){for(let e=0;et-1)return o([]);if(e<0){const s=t+e;return o(s<0?[]:[this[s]])}return o([this[e]])},s.filter=function(e){return o(r(this,e))},s.find=function(e){const t=[];for(let s=0;se.split(" "))));return r(this,(e=>a.filter((t=>e.classList.contains(t))).length>0)).length>0},s.height=function(){const e=(0,a.getWindow)();if(this[0]===e)return e.innerHeight;if(this.length>0)return parseFloat(this.css("height"));return null},s.hide=function(){for(let e=0;e1)for(let s=0;s1)for(let s=0;s0)return e?this[0].nextElementSibling&&o(this[0].nextElementSibling).is(e)?o([this[0].nextElementSibling]):o([]):this[0].nextElementSibling?o([this[0].nextElementSibling]):o([]);return o([])},s.nextAll=function(e){const t=[];let s=this[0];if(!s)return o([]);for(;s.nextElementSibling;){const a=s.nextElementSibling;e?o(a).is(e)&&t.push(a):t.push(a),s=a}return o(t)},s.off=function(){for(var e=arguments.length,t=new Array(e),s=0;s=0;e-=1){const i=a[e];n&&i.listener===n||n&&i.listener&&i.listener.dom7proxy&&i.listener.dom7proxy===n?(s.removeEventListener(t,i.proxyListener,r),a.splice(e,1)):n||(s.removeEventListener(t,i.proxyListener,r),a.splice(e,1))}}}return this},s.offset=function(){if(this.length>0){const e=(0,a.getWindow)(),t=(0,a.getDocument)(),s=this[0],i=s.getBoundingClientRect(),n=t.body,r=s.clientTop||n.clientTop||0,o=s.clientLeft||n.clientLeft||0,l=s===e?e.scrollY:s.scrollTop,d=s===e?e.scrollX:s.scrollLeft;return{top:i.top+l-r,left:i.left+d-o}}return null},s.on=function(){for(var e=arguments.length,t=new Array(e),s=0;s0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},s.outerWidth=function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},s.parent=function(e){const t=[];for(let s=0;s=0;n-=1)this[s].insertBefore(a.childNodes[n],this[s].childNodes[0])}else if(e instanceof i)for(n=0;n0){const t=this[0];return e?t.previousElementSibling&&o(t.previousElementSibling).is(e)?o([t.previousElementSibling]):o([]):t.previousElementSibling?o([t.previousElementSibling]):o([])}return o([])},s.prevAll=function(e){const t=[];let s=this[0];if(!s)return o([]);for(;s.previousElementSibling;){const a=s.previousElementSibling;e?o(a).is(e)&&t.push(a):t.push(a),s=a}return o(t)},s.prop=function(e,t){if(1!==arguments.length||"string"!=typeof e){for(let s=0;se.split(" "))));return this.forEach((e=>{e.classList.remove(...a)})),this},s.removeData=function(e){for(let t=0;t0?o[0].scrollLeft:null;return o.scrollTo(a,void 0,i,n,r)},s.scrollTo=function(){const e=(0,a.getWindow)();for(var t=arguments.length,s=new Array(t),i=0;i0||0===r,g=n>0||0===n;if(void 0===l&&(l="swing"),m&&(s=t.scrollTop,o||(t.scrollTop=r)),g&&(a=t.scrollLeft,o||(t.scrollLeft=n)),!o)return;m&&(i=t.scrollHeight-t.offsetHeight,u=Math.max(Math.min(r,i),0)),g&&(c=t.scrollWidth-t.offsetWidth,p=Math.max(Math.min(n,c),0));let v=null;m&&u===s&&(m=!1),g&&p===a&&(g=!1),e.requestAnimationFrame((function i(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime();null===v&&(v=n);const r=Math.max(Math.min((n-v)/o,1),0),c="linear"===l?r:.5-Math.cos(r*Math.PI)/2;let w;m&&(h=s+c*(u-s)),g&&(f=a+c*(p-a)),m&&u>s&&h>=u&&(t.scrollTop=u,w=!0),m&&ua&&f>=p&&(t.scrollLeft=p,w=!0),g&&p0?o[0].scrollTop:null;return o.scrollTo(void 0,a,i,n,r)},s.show=function(){const e=(0,a.getWindow)();for(let t=0;te.split(" "))));this.forEach((e=>{a.forEach((t=>{e.classList.toggle(t)}))}))},s.touchstart=s.touchmove=s.touchend=void 0,s.transform=function(e){for(let t=0;tt>0)),i.dispatchEvent(t),i.dom7EventData=[],delete i.dom7EventData}}}return this},s.val=function(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let s=0;s=0;else s.value=e}return this},s.value=function(e){return this.val(e)},s.width=function(){const e=(0,a.getWindow)();if(this[0]===e)return e.innerWidth;if(this.length>0)return parseFloat(this.css("width"));return null};var a=e("ssr-window");class i extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function n(){const e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((t=>{Array.isArray(t)?e.push(...n(t)):e.push(t)})),e}function r(e,t){return Array.prototype.filter.call(e,t)}function o(e,t){const s=(0,a.getWindow)(),n=(0,a.getDocument)();let r=[];if(!t&&e instanceof i)return e;if(!e)return new i(r);if("string"==typeof e){const s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let e="div";0===s.indexOf(">>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var a=arguments[1],i=0;i=97?i===n.toUpperCase():a<=90&&s>=97&&n===i.toUpperCase())}function c(e,t,s){e[s]!==t[s]&&(e[s]=t[s],e[s]?e.setAttribute(s,""):e.removeAttribute(s))}var u={OPTION:function(e,t){var s=e.parentNode;if(s){var a=s.nodeName.toUpperCase();"OPTGROUP"===a&&(a=(s=s.parentNode)&&s.nodeName.toUpperCase()),"SELECT"!==a||s.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),s.selectedIndex=-1)}c(e,t,"selected")},INPUT:function(e,t){c(e,t,"checked"),c(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var s=t.value;e.value!==s&&(e.value=s);var a=e.firstChild;if(a){var i=a.nodeValue;if(i==s||!s&&i==e.placeholder)return;a.nodeValue=s}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var s,a,i=-1,n=0,r=e.firstChild;r;)if("OPTGROUP"===(a=r.nodeName&&r.nodeName.toUpperCase()))r=(s=r).firstChild;else{if("OPTION"===a){if(r.hasAttribute("selected")){i=n;break}n++}!(r=r.nextSibling)&&s&&(r=s.nextSibling,s=null)}e.selectedIndex=i}}};function p(){}function h(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var f=function(e){return function(t,s,a){if(a||(a={}),"string"==typeof s)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var r=s;(s=n.createElement("html")).innerHTML=r}else s=l(s);var o=a.getNodeKey||h,c=a.onBeforeNodeAdded||p,f=a.onNodeAdded||p,m=a.onBeforeElUpdated||p,g=a.onElUpdated||p,v=a.onBeforeNodeDiscarded||p,w=a.onNodeDiscarded||p,b=a.onBeforeElChildrenUpdated||p,y=!0===a.childrenOnly,x=Object.create(null),E=[];function C(e){E.push(e)}function T(e,t){if(1===e.nodeType)for(var s=e.firstChild;s;){var a=void 0;t&&(a=o(s))?C(a):(w(s),s.firstChild&&T(s,t)),s=s.nextSibling}}function S(e,t,s){!1!==v(e)&&(t&&t.removeChild(e),w(e),T(e,s))}function P(e){f(e);for(var t=e.firstChild;t;){var s=t.nextSibling,a=o(t);if(a){var i=x[a];i&&d(t,i)?(t.parentNode.replaceChild(i,t),j(i,t)):P(t)}else P(t);t=s}}function j(t,s,a){var i=o(s);if(i&&delete x[i],!a){if(!1===m(t,s))return;if(e(t,s),g(t),!1===b(t,s))return}"TEXTAREA"!==t.nodeName?function(e,t){var s,a,i,r,l,p=t.firstChild,h=e.firstChild;e:for(;p;){for(r=p.nextSibling,s=o(p);h;){if(i=h.nextSibling,p.isSameNode&&p.isSameNode(h)){p=r,h=i;continue e}a=o(h);var f=h.nodeType,m=void 0;if(f===p.nodeType&&(1===f?(s?s!==a&&((l=x[s])?i===l?m=!1:(e.insertBefore(l,h),a?C(a):S(h,e,!0),h=l):m=!1):a&&(m=!1),(m=!1!==m&&d(h,p))&&j(h,p)):3!==f&&8!=f||(m=!0,h.nodeValue!==p.nodeValue&&(h.nodeValue=p.nodeValue))),m){p=r,h=i;continue e}a?C(a):S(h,e,!0),h=i}if(s&&(l=x[s])&&d(l,p))e.appendChild(l),j(l,p);else{var g=c(p);!1!==g&&(g&&(p=g),p.actualize&&(p=p.actualize(e.ownerDocument||n)),e.appendChild(p),P(p))}p=r,h=i}!function(e,t,s){for(;t;){var a=t.nextSibling;(s=o(t))?C(s):S(t,e,!0),t=a}}(e,h,a);var v=u[e.nodeName];v&&v(e,t)}(t,s):u.TEXTAREA(t,s)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var s=t.firstChild;s;){var a=o(s);a&&(x[a]=s),e(s),s=s.nextSibling}}(t);var _,M,$=t,k=$.nodeType,O=s.nodeType;if(!y)if(1===k)1===O?d(t,s)||(w(t),$=function(e,t){for(var s=e.firstChild;s;){var a=s.nextSibling;t.appendChild(s),s=a}return t}(t,(_=s.nodeName,(M=s.namespaceURI)&&M!==i?n.createElementNS(M,_):n.createElement(_)))):$=s;else if(3===k||8===k){if(O===k)return $.nodeValue!==s.nodeValue&&($.nodeValue=s.nodeValue),$;$=s}if($===s)w(t);else{if(s.isSameNode&&s.isSameNode($))return;if(j($,s,y),E)for(var I=0,A=E.length;I=0;o--)a=(s=r[o]).name,i=s.namespaceURI,n=s.value,i?(a=s.localName||a,e.getAttributeNS(i,a)!==n&&("xmlns"===s.prefix&&(a=s.name),e.setAttributeNS(i,a,n))):e.getAttribute(a)!==n&&e.setAttribute(a,n);for(var l=e.attributes,d=l.length-1;d>=0;d--)a=(s=l[d]).name,(i=s.namespaceURI)?(a=s.localName||a,t.hasAttributeNS(i,a)||e.removeAttributeNS(i,a)):t.hasAttribute(a)||e.removeAttribute(a)}}));t.exports=f},{}],8:[function(e,t,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var a,i=(a=e("a-template"))&&a.__esModule?a:{default:a};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){for(var s=0;s