text: 
  /* Smart HTML Elements v4.6.0 (2019-Oct) 
  Copyright (c) 2011-2019 jQWidgets. 
  License: https://htmlelements.com/license/ */
  
  (function(){"use strict";function e(e,t){const a=t.properties;t._properties=[];const n=function(a,r){const o=Object.keys(a);for(let l=0;l<o.length;l++){const i=o[l],s=a[i];if(t._properties[r+i]=s,Array.isArray(s)){t._properties[r+i]=new ObservableArray(s,function(t){const a=i+"."+t.path,n=t.newValue,r=document.querySelector(e);if(r){const e=a.split(".");let t=r;for(let a=0;a<e.length;a++){const n=e[a];t=t[n]}t=n}});continue}(Object.defineProperty(a,i,{configurable:!1,enumerable:!0,get(){return t._properties[r+i]},set(e){t._properties[r+i]=e}}),!(s&&"DataAdapter"===s.constructor.name))&&(s&&"object"==typeof s&&Smart.DataAdapter&&s instanceof Smart.DataAdapter||"object"==typeof s&&s&&0<Object.keys(s).length&&n(s,r+i+"."))}};n(a,""),Object.defineProperty(t,"properties",{configurable:!1,enumerable:!0,get(){return a}});const r=document.querySelector(e);if(r&&r.isReady)for(let e in a)r[e]=a[e]}var t=Math.floor,n=Math.asin,r=Math.abs,a=Math.sqrt,o=Math.pow,i=Math.sin,l=Math.cos,m=Math.PI,s=Math.max;const d="5.0.0",p=[];let c="Smart";if(window[c]&&window[c].Version){if(window[c].Version===d)return;if(window[c].Version!==d)c+=d;else for(let e=2;window[c];)c+=e.toString(),e++}class LocalizationModule{static get moduleName(){return"LocalizationModule"}static get properties(){return{messages:{value:{en:{}},type:"object",inherit:!0,reflectToAttribute:!1},locale:{value:"en",type:"string",reflectToAttribute:!1},localizeFormatFunction:{value:void 0,type:"function",reflectToAttribute:!1}}}addMessages(e,t){const a=this;Object.assign(a.messages[e],t)}localize(e,t){const a=this;if(!a.messages||!a.messages[a.locale])return;let n=a.messages[a.locale][e];if(""===n)return"";if(n){const e=n;for(let e in t){let a=t[e];n=n.replace(new RegExp("{{"+e+"}}","g"),a)}return a.localizeFormatFunction&&a.localizeFormatFunction(e,n,t),n}}}class ErrorModule{static get moduleName(){return"ErrorModule"}static get properties(){return{rethrowError:{value:!0,type:"boolean",reflectToAttribute:!1},debugMode:{value:!0,type:"boolean",reflectToAttribute:!1}}}log(e){const t=this;t._logger("log",e)}warn(e){const t=this;t._logger("warn",e)}error(e){const t=this;t._logger("error",e)}_logger(e,t){const a=this;if(a.debugMode){const a=t instanceof Error?t.message:t.toString();console[e](a)}if(a.rethrowError&&"error"===e)throw t}}class BindingModule{static get moduleName(){return"BindingModule"}getBindings(e,t){const a=this;let n=0,r={},o=(e=>{if(e instanceof HTMLElement)return a.parseAttributes(e);else{let t=a.parseProperty(e.data?e.data.trim():null,"textContent",e);if(t)return a.ownerElement&&e.parentNode===a.ownerElement.$.content&&(t.value=""===a.ownerElement.$.html?void 0:a.ownerElement.$.html,a.ownerElement.innerHTML=""),{textContent:t}}})(e);o&&(r.data=o),t||(r.mapping=[],t=r),e.getAttribute&&(r.nodeId=e.getAttribute("smart-id"),t&&o&&(t.mapping[r.nodeId]=o)),r.node=e,e.firstChild&&(r.children={});for(let o=e.firstChild;o;o=o.nextSibling)r.children[n++]=a.getBindings(o,t);return r}_addRemovePropertyBinding(e,t,a,n,r){if(!e||!t||!a)return;const o=this,i=o.ownerElement.bindings,l=a.getAttribute("smart-id"),s=0<=e.indexOf("{{");e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","");let d=!1;0<=e.indexOf("!")&&(e=e.replace("!",""),d=!0);const p=o.ownerElement._properties[e],m={name:e,reflectToAttribute:p.reflectToAttribute,twoWay:s,type:p.type,not:d};if(r&&!n){const a={},n={name:e,targetPropertyName:t,reflectToAttribute:p.reflectToAttribute,twoWay:s,type:p.type,not:d};a[e]=n,i.mapping[l]=a}const c=function(e){for(let r in e){const i=e[r];if(i.nodeId===l){i.data||(i.data={}),n?(i.data[t]=null,delete i.data[t]):i.data[t]=m;break}if(i.children)c(i.children);else if(i.node&&i.node.children&&i.node===a.parentElement){const e=i.node;if(e.firstChild)i.children={};else continue;let t=0;for(let a=e.firstChild;a;a=a.nextSibling)i.children[t++]=o.getBindings(a);c(i.children)}}};c(i.children),n?delete o.ownerElement.boundProperties[e]:o.ownerElement.boundProperties[e]=!0,o.updateBoundNodes(e)}addPropertyBinding(e,t,a,n){const r=this;r._addRemovePropertyBinding(e,t,a,!1,n)}removePropertyBinding(e,t,a,n){const r=this;r._addRemovePropertyBinding(e,t,a,!0,n)}parseAttributes(e){const t=this;let a;for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],o=r.name,i=r.value;BindingModule.cache["toCamelCase"+o]||(BindingModule.cache["toCamelCase"+o]=Utilities.Core.toCamelCase(o));const l=BindingModule.cache["toCamelCase"+o];if(0<=o.indexOf("(")){let n=o.substring(1,o.length-1);if(t.ownerElement&&!t.ownerElement.dataContext){t.ownerElement.templateListeners[e.getAttribute("smart-id")+"."+n]=i,e.removeAttribute(o);continue}else{a||(a={});const e=i.substring(0,i.indexOf("("));a[l]={isEvent:!0,name:n,value:e};continue}}let s=t.parseProperty(i,o,e);s&&(a||(a={}),a[l]=s)}return a}parseProperty(e,t){if(!e||!e.length)return;const a=this;let n=e.length,r=0,o=0,i=0,l=!0,s;for(;o<n;){r=e.indexOf("{{",o);let t=e.indexOf("[[",o),a="}}";if(0<=t&&(0>r||t<r)&&(r=t,l=!1,a="]]"),i=0>r?-1:e.indexOf(a,r+2),0>i)return;s=s||{};let n=e.slice(r+2,i).trim();s.name=n,o=i+2}const d=s.name,p=a.ownerElement?a.ownerElement._properties[d]:null;if(s.twoWay=l,s.ready=!1,a.ownerElement&&(0<=d.indexOf("::")?a.ownerElement.boundProperties[d.substring(0,d.indexOf("::"))]=!0:a.ownerElement.boundProperties[d]=!0),p)s.type=p.type,s.reflectToAttribute=p.reflectToAttribute;else{s.type=0<=["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)?"boolean":"string",s.reflectToAttribute=!0}return s}updateTextNodes(){const e=this;e.updateTextNode(e.ownerElement.shadowRoot||e.ownerElement,e.ownerElement.bindings,e.ownerElement)}updateTextNode(e,t,a){const n=this;if(!t)return;let r=0;for(let o=e.firstChild;o&&!!t.children;o=o.nextSibling)n.updateTextNode(o,t.children[r++],a);if(t&&t.data)for(let e in t.data){const n=t.data[e],r=n.name;"textContent"==e&&n.twoWay&&!n.updating&&void 0!==n.value&&(a[r]=n.value)}}updateBoundProperty(e,t){if(t.updating)return;const a=this,n=a.ownerElement;t.updating=!0,n[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.ownerElement.shadowRoot||t.ownerElement,t.ownerElement.bindings,t.ownerElement,e),0<t.ownerElement.detachedChildren.length)for(let a=0;a<t.ownerElement.detachedChildren.length;a++){const n=t.ownerElement.detachedChildren[a],r=n.getAttribute("smart-id"),o=function(e){if(e.nodeId===r)return e;for(let t in e.children){const a=e.children[t],n=a.getAttribute?a.getAttribute("smart-id"):"";if(n===r)return e;if(a.children){const e=o(a);if(e)return e}}return null},i=o(t.ownerElement.bindings);if(i)t.updateBoundNode(n,i,t.ownerElement,e,!0);else if(n.getAttribute&&t.ownerElement.bindings.mapping){const a=t.ownerElement,n=t.ownerElement.bindings;if(n)for(let r in n.mapping){const o=a.querySelector("[smart-id=\""+r+"\"]");if(o){const i=n.mapping[r];t.updateBoundData(o,i,a,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.ownerElement.bindings,a=e.ownerElement;if(t.mapping)for(let n in t.mapping){let r=a.querySelector("[smart-id=\""+n+"\"]");if(a.shadowRoot&&(r=a.querySelector("[id=\""+n+"\"]"),!r&&(r=a.shadowRoot.querySelector("[id=\""+n+"\"]")||a.shadowRoot.querySelector("[smart-id=\""+n+"\"]"))),r){const o=t.mapping[n];e.updateBoundData(r,o,a)}else if(a.getAttribute("aria-controls")){let o=document.getElementById(a.getAttribute("aria-controls"));if(!o&&a.shadowRoot&&(o=a.shadowRoot.getElementById(a.getAttribute("aria-controls"))),r=o.querySelector("[smart-id=\""+n+"\"]"),r){const o=t.mapping[n];e.updateBoundData(r,o,a)}}}}updateBoundNode(e,t,a,n,r){const o=this;if(!t)return;let i=0;if(!r){for(let r=e.firstChild;r&&!!t.children;r=r.nextSibling)if(r.getAttribute){const e=r.getAttribute("smart-id"),l=function(){for(let a in t.children)if(t.children[a].nodeId===e)return t.children[a]}();o.updateBoundNode(r,l,a,n),i++}else o.updateBoundNode(r,t.children[i++],a,n);}else if(r&&!t.data)for(let l=e.firstChild;l&&!!t.children;l=l.nextSibling)if(l.getAttribute){const e=l.getAttribute("smart-id"),r=function(){for(let a in t.children)if(t.children[a].nodeId===e)return t.children[a]}();o.updateBoundNode(l,r,a,n),i++}else o.updateBoundNode(l,t.children[i++],a,n,r);if(t&&t.data){const r=t.data;o.updateBoundData(e,r,a,n)}}updateBoundData(e,t,a,n){const r=this;for(let o in t){const i=t[o];let l=i.name;if(!i.updating&&(0<=l.indexOf("::")&&(l=l.substring(0,l.indexOf("::"))),void 0===n||n===l)){if(0<=l.indexOf("(")){let e=l.substring(l.indexOf("("));const t=l.substring(0,l.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /ig,""),e=e.split(","),0<e.length&&""!==e[0]){let n=[];for(let t=0;t<e.length;t++)n.push(a[e[t]]);i.value=a[t].apply(a,n)}else i.value=a[t]();i.type=typeof i.value}else i.value=a[l];if("innerHTML"===l?e[o].toString().trim()!==a[l].toString().trim()&&(i.ready?e[o]=i.value.toString().trim():a._properties[l].defaultValue!==i.value&&(e[o]=i.value.toString().trim())):i.not?(e[o]=!i.value,i.targetPropertyName&&(e[i.targetPropertyName]=!i.value)):(e[o]=i.value,i.targetPropertyName&&(e[i.targetPropertyName]=i.value)),e.$&&e.$.isNativeElement){BindingModule.cache["toDash"+o]||(BindingModule.cache["toDash"+o]=Utilities.Core.toDash(o));const t=BindingModule.cache["toDash"+o],a=e.$.getAttributeValue(t,i.type);i.reflectToAttribute&&(a!==i.value||!i.ready)&&e.$.setAttributeValue(t,i.value,i.type),i.reflectToAttribute||e.$.setAttributeValue(t,null,i.type)}if(!i.ready){if(e.$&&e.$.isCustomElement){BindingModule.cache["toDash"+o]||(BindingModule.cache["toDash"+o]=Utilities.Core.toDash(o));const t=BindingModule.cache["toDash"+o];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[o]||(e._properties[o]={attributeName:t},e._beforeCreatedProperties&&(e._beforeCreatedProperties[o]=e._properties[o]),e.propertyByAttributeName[t]=e._properties[o]);const a=e._properties[o];a.isUpdating=!0,i.reflectToAttribute&&(i.not?e.$.setAttributeValue(a.attributeName,!i.value,i.type):e.$.setAttributeValue(a.attributeName,i.value,i.type)),i.reflectToAttribute||e.$.setAttributeValue(a.attributeName,null,i.type),a.isUpdating=!1}if(i.twoWay){const t=function(t){if(i.value=t,e.$&&e.$.isNativeElement){BindingModule.cache["toDash"+o]||(BindingModule.cache["toDash"+o]=Utilities.Core.toDash(o));const t=BindingModule.cache["toDash"+o],a=e.$.getAttributeValue(t,i.type);i.reflectToAttribute&&a!==i.value&&e.$.setAttributeValue(t,i.value,i.type),i.reflectToAttribute||e.$.setAttributeValue(t,null,i.type)}};if(0<=i.name.indexOf("::")){const a=i.name.indexOf("::"),n=i.name.substring(a+2);r.ownerElement["$"+e.getAttribute("smart-id")].listen(n,function(){t(e[o]);const a=i.name.substring(0,i.name.indexOf("::"));r.updateBoundProperty(a,i)})}if(e.$&&e.$.isCustomElement){e._properties[o]&&(e._properties[o].notify=!0),BindingModule.cache["toDash"+o]||(BindingModule.cache["toDash"+o]=Utilities.Core.toDash(o));const a=BindingModule.cache["toDash"+o];r.ownerElement["$"+e.getAttribute("smart-id")].listen(a+"-changed",function(e){let a=e.detail;t(a.value);const n=r.ownerElement.context;e.context!==document&&(r.ownerElement.context=r.ownerElement),r.updateBoundProperty(i.name,i),r.ownerElement.context=n})}}}i.ready=!0}}}static clearCache(){const e=this;e.cache={}}}class Types{static isBoolean(e){return"boolean"==typeof e}static isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)}static isArray(e){return Array.isArray(e)}static isObject(e){const t=this;return e&&("object"==typeof e||t.isFunction(e))||!1}static isDate(e){return e instanceof Date}static isString(e){return"string"==typeof e}static isNumber(e){return"number"==typeof e}static getType(e){const t=this,a=["Boolean","Number","String","Function","Array","Date","Object"].find(a=>{if(t["is"+a](e))return a});return a?a.toLowerCase():void 0}}class Ripple{static animate(e,t,a,n){const r=e;if(!r||!1==r instanceof HTMLElement)return;if(0===r.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple");let t=!0,a=null;if(window[c].EnableShadowDOM&&r.enableShadowDOM&&!0!==r.isInShadowDOM){for(let e=0;e<r.shadowRoot.host.shadowRoot.children.length;e++)"link"!==r.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(a=r.shadowRoot.host.shadowRoot.children[e]);r.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else a=r.firstElementChild;t&&(a&&!a.noRipple&&0<a.offsetHeight?a.appendChild(e):r.appendChild(e))}let o=null;if(o=window[c].EnableShadowDOM&&r.shadowRoot?r.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):r.getElementsByClassName("smart-ripple")[0],!!o){o.innerHTML="",o.classList.remove("smart-animate"),o.style.height=o.style.width=s(r.offsetHeight,r.offsetWidth)+"px";const e=window.getComputedStyle(o.parentElement),i=parseInt(e.borderLeftWidth)||0,l=parseInt(e.borderTopWidth)||0,d=r.getBoundingClientRect(),p=t-(d.left+window.pageXOffset)-o.offsetWidth/2-i,m=a-(d.top+window.pageYOffset)-o.offsetHeight/2-l;o.style.left=p+"px",o.style.top=m+"px",o.classList.add("smart-animate"),o.addEventListener("animationend",function e(){o.parentElement&&o.parentElement.removeChild(o),n&&n(),o.removeEventListener("animationend",e),o.removeEventListener("animationcancel",e)}),o.addEventListener("animationcancel",function e(){o.parentElement&&o.parentElement.removeChild(o),n&&n(),o.removeEventListener("animationcancel",e),o.removeEventListener("animationend",e)})}}}class Easings{static easeInQuad(e,a,n,r){return n*(e/=r)*e+a}static easeOutQuad(e,a,n,r){return-n*(e/=r)*(e-2)+a}static easeInOutQuad(e,a,n,r){return 1>(e/=r/2)?n/2*e*e+a:-n/2*(--e*(e-2)-1)+a}static easeInCubic(e,a,n,r){return n*(e/=r)*e*e+a}static easeOutCubic(e,a,n,r){return n*((e=e/r-1)*e*e+1)+a}static easeInOutCubic(e,a,n,r){return 1>(e/=r/2)?n/2*e*e*e+a:n/2*((e-=2)*e*e+2)+a}static easeInQuart(e,a,n,r){return n*(e/=r)*e*e*e+a}static easeOutQuart(e,a,n,r){return-n*((e=e/r-1)*e*e*e-1)+a}static easeInOutQuart(e,a,n,r){return 1>(e/=r/2)?n/2*e*e*e*e+a:-n/2*((e-=2)*e*e*e-2)+a}static easeInQuint(e,a,n,r){return n*(e/=r)*e*e*e*e+a}static easeOutQuint(e,a,n,r){return n*((e=e/r-1)*e*e*e*e+1)+a}static easeInOutQuint(e,a,n,r){return 1>(e/=r/2)?n/2*e*e*e*e*e+a:n/2*((e-=2)*e*e*e*e+2)+a}static easeInSine(e,t,a,n){return-a*l(e/n*(m/2))+a+t}static easeOutSine(e,t,a,n){return a*i(e/n*(m/2))+t}static easeInOutSine(e,t,a,n){return-a/2*(l(m*e/n)-1)+t}static easeInExpo(e,t,a,n){return 0===e?t:a*o(2,10*(e/n-1))+t}static easeOutExpo(e,t,a,n){return e===n?t+a:a*(-o(2,-10*e/n)+1)+t}static easeInOutExpo(e,a,n,r){return 0===e?a:e===r?a+n:1>(e/=r/2)?n/2*o(2,10*(e-1))+a:n/2*(-o(2,-10*--e)+2)+a}static easeInCirc(e,n,r,o){return-r*(a(1-(e/=o)*e)-1)+n}static easeOutCirc(e,n,r,o){return r*a(1-(e=e/o-1)*e)+n}static easeInOutCirc(e,n,r,o){return 1>(e/=o/2)?-r/2*(a(1-e*e)-1)+n:r/2*(a(1-(e-=2)*e)+1)+n}static easeInElastic(e,l,u,c){let d=1.70158,y=0,h=u;return 0===e?l:1===(e/=c)?l+u:(y||(y=.3*c),h<r(u)?(h=u,d=y/4):d=y/(2*m)*n(u/h),-(h*o(2,10*(e-=1))*i((e*c-d)*(2*m)/y))+l)}static easeOutElastic(e,l,u,c){let d=1.70158,y=0,h=u;return 0===e?l:1===(e/=c)?l+u:(y||(y=.3*c),h<r(u)?(h=u,d=y/4):d=y/(2*m)*n(u/h),h*o(2,-10*e)*i((e*c-d)*(2*m)/y)+u+l)}static easeInOutElastic(e,l,u,c){let d=1.70158,y=0,h=u;return 0===e?l:2==(e/=c/2)?l+u:(y||(y=c*(1.5*.3)),h<r(u)?(h=u,d=y/4):d=y/(2*m)*n(u/h),1>e?-.5*(h*o(2,10*(e-=1))*i((e*c-d)*(2*m)/y))+l:.5*(h*o(2,-10*(e-=1))*i((e*c-d)*(2*m)/y))+u+l)}static easeInBack(e,a,n,r,o){return void 0===o&&(o=1.70158),n*(e/=r)*e*((o+1)*e-o)+a}static easeOutBack(e,a,n,r,o){return void 0===o&&(o=1.70158),n*((e=e/r-1)*e*((o+1)*e+o)+1)+a}static easeInOutBack(e,a,n,r,o){return void 0===o&&(o=1.70158),1>(e/=r/2)?n/2*(e*e*(((o*=1.525)+1)*e-o))+a:n/2*((e-=2)*e*(((o*=1.525)+1)*e+o)+2)+a}static easeInBounce(e,t,a,n){return a-this.easeOutBounce(n-e,0,a,n)+t}static easeOutBounce(e,a,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+a:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+a:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+a:n*(7.5625*(e-=2.625/2.75)*e+.984375)+a}static easeInOutBounce(e,t,a,n){return e<n/2?.5*this.easeInBounce(2*e,0,a,n)+t:.5*this.easeOutBounce(2*e-n,0,a,n)+.5*a+t}}class Core{static get isMobile(){const e=/(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());return e}static get Browser(){let e;const t=function(t){let a=t.indexOf(e);if(-1!==a){const n=t.indexOf("rv:");return"Trident"===e&&-1!==n?parseFloat(t.substring(n+3)):parseFloat(t.substring(a+e.length+1))}};let a={};return a[function(){const t=[{string:navigator.userAgent,subString:"Edge",identity:"Edge"},{string:navigator.userAgent,subString:"MSIE",identity:"IE"},{string:navigator.userAgent,subString:"Trident",identity:"IE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Opera",identity:"Opera"},{string:navigator.userAgent,subString:"OPR",identity:"Opera"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Safari",identity:"Safari"}];for(let a=0,n;a<t.length;a++)if(n=t[a].string,e=t[a].subString,-1!==n.indexOf(t[a].subString))return t[a].identity;return"Other"}()]=!0,a.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",a}static toCamelCase(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}static toDash(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}static unescapeHTML(e){let t=new DOMParser().parseFromString(e,"text/html");return t.documentElement.textContent}static escapeHTML(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return(e+"").replace(/[&<>"'`=\/]/g,e=>t[e])}static createGUID(){function e(){return t(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getScriptLocation(){if("./"!==window[c].BaseUrl)return window[c].BaseUrl;const e=function(){if(document.currentScript){let e=document.currentScript.src,t=e.lastIndexOf("/");return e=e.substring(0,t),e}const e=new Error;let t="(",a=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",a="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let n=e.stack.split(t);return n=n[1],n=n.split(a)[0],n=n.split(":"),n.splice(-2,2),n=n.join(":"),n.replace("/smart.element.js","")}();return e}static CSSVariablesSupport(){return window.CSS&&window.CSS.supports&&window.CSS.supports("(--fake-var: 0)")}static assign(e,t){const a=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let n=Object.assign({},e);return a(e)&&a(t)&&Object.keys(t).forEach(r=>{a(t[r])?r in e?n[r]=this.assign(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}static html(e,t){const a=this;let n="",r=e.childNodes;if(t){const a=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;return void(e.innerHTML=t.replace(a,"<$1></$2>"))}for(let o=0,i=r.length,l;o<i&&(l=r[o]);o++){if(l instanceof HTMLElement||l.tagName&&0<=["strong"].indexOf(l.tagName.toLowerCase())){const e=l.tagName.toLowerCase(),t=l.attributes;let r="<"+e;for(let e=0,a;a=t[e];e++)r+=" "+a.name+"=\""+a.value.replace(/[&\u00A0"]/g,Utilities.Core.escapeHTML)+"\"";r+=">";["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][e]&&(n+=r),n=n+r+a.html(l)+"</"+e+">"}else n+=l.textContent.replace(/[&\u00A0<>]/g,Utilities.Core.escapeHTML)}return n}}let u=[];class StyleObserver{static watch(e){u.push(e),StyleObserver.interval&&clearInterval(StyleObserver.interval),StyleObserver.interval=setInterval(function(){StyleObserver.observe()},100)}static observeElement(e){const t=e;let a=e._computedStyle||"resize"!==t.hasStyleObserver?document.defaultView.getComputedStyle(t,null):{},n=!0,r="resize"===t.hasStyleObserver?[]:["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","display","visibility","font-size","font-family","font-style","font-weight","max-height","min-height","max-width","min-width","overflow","overflow-x","overflow-y"];if(e.styleProperties&&(r=r.concat(e.styleProperties)),e.observableStyleProperties&&(r=e.observableStyleProperties),!t._styleInfo){t._styleInfo=[];for(let e=0;e<r.length;e++){const n=r[e];t._styleInfo[n]=a[n]}return}if(e.isHidden||"none"===a.display||0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0),e.isHidden)if(e.visibilityChangedHandler(),!e.isHidden)n=!1;else return;let o=[];for(let n=0;n<r.length;n++){const e=r[n];t._styleInfo[e]!==a[e]&&(o[e]={oldValue:t._styleInfo[e],value:a[e]},o.length++),t._styleInfo[e]=a[e]}0<o.length&&(t.$.fireEvent("styleChanged",{styleProperties:o},{bubbles:!1,cancelable:!0}),o.display&&n&&t.$.fireEvent("resize",t,{bubbles:!1,cancelable:!0}))}static observe(){for(let e=0;e<u.length;e++){const t=u[e];this.observeElement(t)}}static unwatch(e){StyleObserver.interval&&clearInterval(StyleObserver.interval);const t=u.indexOf(e);-1!==t&&u.splice(t,1),0<u.length&&(StyleObserver.interval=setInterval(function(){StyleObserver.observe()},100))}}let y=[];const h=[],g=["resize","down","up","move","tap","taphold","swipeleft","swiperight","swipetop","swipebottom"];class InputEvents{constructor(e){const t=this;t.target=e,t.$target=new Extend(e),t.$document=new Extend(document),t.id=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase();let a={handlers:{},boundEventTypes:[],listen:t.listen.bind(t),unlisten:t.unlisten.bind(t)};return t.tapHoldDelay=750,t.swipeMin=10,t.swipeMax=5e3,t.swipeDelay=1e3,t.tapHoldDelay=750,t.inputEventProperties=["clientX","clientY","pageX","pageY","screenX","screenY"],g.forEach(e=>{a[e]=t=>{a.handlers[e]=t},t[e]=e=>{if(!a.handlers[e.type]){if(("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type)&&a.handlers.move){const n=t.createEvent(e,"move");a.handlers.move(n)}return!0}return a.handlers[e.type](e)}}),t.listen(),t.handlers=a.handlers,a}listen(e){const t=this;if("resize"===e&&!t.target.resizeTrigger&&t.target!==document&&t.target!==window&&!1!==t.target.hasResizeObserver){const e=document.createElement("div");e.className="smart-resize-trigger-container",e.innerHTML="<div class=\"smart-resize-trigger-container\"><div class=\"smart-resize-trigger\"></div></div><div class=\"smart-resize-trigger-container\"><div class=\"smart-resize-trigger-shrink\"></div></div>",window[c].EnableShadowDOM&&t.target.shadowRoot?t.target.shadowRoot.appendChild(e):t.target.appendChild(e),t.target.resizeTrigger=e;const a=e.childNodes[0],n=a.childNodes[0],r=e.childNodes[1],o=function(){n.style.width="100000px",n.style.height="100000px",a.scrollLeft=1e5,a.scrollTop=1e5,r.scrollLeft=1e5,r.scrollTop=1e5};let i=t.target.offsetWidth,l=t.target.offsetHeight,s,d,p,m;if(0===i||0===l){const e=function(){o(),t.target.removeEventListener("resize",e)};t.target.addEventListener("resize",e),o()}else o();t.target.resizeHandler=function(){d||(d=requestAnimationFrame(function(){if(d=0,p=t.target.offsetWidth,m=t.target.offsetHeight,s=p!==i||m!==l,t.target.requiresLayout&&(s=!0),!!s){i=p,l=m;const e=new CustomEvent("resize",{bubbles:!1,cancelable:!0});t.resize(e),t.target.requiresLayout=!1}})),o()},a.addEventListener("scroll",t.target.resizeHandler),r.addEventListener("scroll",t.target.resizeHandler)}if(!t.isListening){if(t.isListening=!0,t.isPressed=!1,t.isReleased=!1,t.isInBounds=!1,window.PointerEvent)t.$target.listen("pointerdown.inputEvents"+t.id,t.pointerDown.bind(t)),t.$target.listen("pointerup.inputEvents"+t.id,t.pointerUp.bind(t)),t.$target.listen("pointermove.inputEvents"+t.id,t.pointerMove.bind(t)),t.$target.listen("pointercancel.inputEvents"+t.id,t.pointerCancel.bind(t));else{const e="ontouchstart"in window;e&&(t.$target.listen("touchmove.inputEvents"+t.id,t.touchMove.bind(t)),t.$target.listen("touchstart.inputEvents"+t.id,t.touchStart.bind(t)),t.$target.listen("touchend.inputEvents"+t.id,t.touchEnd.bind(t)),t.$target.listen("touchcancel.inputEvents"+t.id,t.touchCancel.bind(t))),t.$target.listen("mousedown.inputEvents"+t.id,t.mouseDown.bind(t)),t.$target.listen("mouseup.inputEvents"+t.id,t.mouseUp.bind(t)),t.$target.listen("mousemove.inputEvents"+t.id,t.mouseMove.bind(t)),t.$target.listen("mouseleave.inputEvents"+t.id,t.mouseLeave.bind(t))}t.$document.listen("mouseup.inputEvents"+t.id,t.handleDocumentUp.bind(t))}}unlisten(e){const t=this;if(t.isListening=!1,window.PointerEvent)t.$target.unlisten("pointerdown.inputEvents"+t.id),t.$target.unlisten("pointerup.inputEvents"+t.id),t.$target.unlisten("pointermove.inputEvents"+t.id),t.$target.unlisten("pointercancel.inputEvents"+t.id);else{const e="ontouchstart"in window;e&&(t.$target.unlisten("touchstart.inputEvents"+t.id),t.$target.unlisten("touchmove.inputEvents"+t.id),t.$target.unlisten("touchend.inputEvents"+t.id),t.$target.unlisten("touchcancel.inputEvents"+t.id)),t.$target.unlisten("mousedown.inputEvents"+t.id),t.$target.unlisten("mouseup.inputEvents"+t.id),t.$target.unlisten("mousemove.inputEvents"+t.id),t.$target.unlisten("mouseleave.inputEvents"+t.id)}if(t.$document.unlisten("mouseup.inputEvents"+t.id,t.handleDocumentUp),"resize"===e&&t.target.resizeTrigger){const e=t.target.resizeTrigger,a=e.childNodes[0],n=e.childNodes[1];a.removeEventListener("scroll",t.target.resizeHandler),n.removeEventListener("scroll",t.target.resizeHandler),t.target.resizeHandler=null,e.parentNode.removeChild(e),delete t.target.resizeTrigger}}handleDocumentUp(e){const t=this;t.isPressed=!1,t.isReleased=!1,t.resetSwipe(e)}createEvent(e,t){const a=this,n=e.touches,r=e.changedTouches,o=n&&n.length?n[0]:r&&r.length?r[0]:void 0,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:void 0!==a.$target.element.getRootNode().host});if(i.originalEvent=e,o){for(let e=0;e<a.inputEventProperties.length;e++){const t=a.inputEventProperties[e];i[t]=o[t]}return i}for(let a in e)a in i||(i[a]=e[a]);return i}fireTap(e){const t=this;if(clearTimeout(this.tapHoldTimeout),!this.tapHoldFired&&this.isInBounds){const a=t.createEvent(e,"tap");t.tap(a)}}initTap(e){const t=this;t.isInBounds=!0,t.tapHoldFired=!1,t.tapHoldTimeout=setTimeout(function(){if(t.isInBounds){t.tapHoldFired=!0;const a=t.createEvent(e,"taphold");t.taphold(a)}},t.tapHoldDelay)}pointerDown(e){const t=this;return t.handleDown(e)}mouseDown(e){const t=this;return t.isPressed||t.touchStartTime&&500>new Date-t.touchStartTime?void 0:t.handleDown(e)}touchStart(e){const t=this;return t.touchStartTime=new Date,t.isTouchMoved=!0,t.handleDown(e)}mouseUp(e){const t=this;return t.isReleased||t.touchEndTime&&500>new Date-t.touchEndTime?void 0:t.handleUp(e)}handleDown(e){const t=this;t.isReleased=!1,t.isPressed=!0;const a=t.createEvent(e,"down");return(t.handlers.tap||t.handlers.taphold)&&t.initTap(a),(t.handlers.swipeleft||t.handlers.swiperight||t.handlers.swipetop||t.handlers.swipebottom)&&t.initSwipe(a),t.down(a)}handleUp(e){const t=this;t.isReleased=!0,t.isPressed=!1;const a=t.createEvent(e,"up"),n=t.up(a);return(t.handlers.tap||t.handlers.taphold)&&t.fireTap(a),t.resetSwipe(a),n}handleMove(e){const t=this;let a=t.move(e);return t.isPressed&&(t._maxSwipeVerticalDistance=s(t._maxSwipeVerticalDistance,r(t._startY-e.pageY)),t._maxSwipeHorizontalDistance=s(t._maxSwipeHorizontalDistance,r(t._startX-e.pageX)),a=t.handleSwipeEvents(e)),a}touchEnd(e){const t=this;return t.touchEndTime=new Date,t.handleUp(e)}pointerUp(e){const t=this;return t.handleUp(e)}pointerCancel(e){const t=this;t.pointerUp(e)}touchCancel(e){const t=this;t.touchEnd(e)}mouseLeave(){const e=this;e.isInBounds=!1}mouseMove(e){const t=this;return t.isTouchMoved?void 0:t.handleMove(e)}pointerMove(e){const t=this;return t.handleMove(e)}touchMove(e){const t=this,a=e.touches,n=e.changedTouches,r=a&&a.length?a[0]:n&&n.length?n[0]:void 0;for(let a=0;a<t.inputEventProperties.length;a++){const n=t.inputEventProperties[a];void 0===e[n]&&(e[n]=r[n])}return t.isTouchMoved=!0,t.handleMove(e)}handleSwipeEvents(e){const t=this;let a=!0;return((t.handlers.swipetop||t.handlers.swipebottom)&&(a=this.handleVerticalSwipeEvents(e)),!1===a)?a:((t.handlers.swipeleft||t.handlers.swiperight)&&(a=this.handleHorizontalSwipeEvents(e)),a)}handleVerticalSwipeEvents(e){let t,a;return t=e.pageY,a=t-this._startY,this.swiped(e,a,"vertical")}handleHorizontalSwipeEvents(e){let t,a;return t=e.pageX,a=t-this._startX,this.swiped(e,a,"horizontal")}swiped(e,t,a){const n=this;if(a=a||0,r(t)>=n.swipeMin&&!n._swipeEvent&&!n._swipeLocked){let o=0>t?"swipeleft":"swiperight";if("horizontal"===a?n._swipeEvent=n.createEvent(e,o):(o=0>t?"swipetop":"swipebottom",n._swipeEvent=n.createEvent(e,0>t?"swipetop":"swipebottom")),n[o]&&(n[o](this._swipeEvent),r(t)<=this.swipeMax))return e.stopImmediatePropagation(),!1}return!0}resetSwipe(){const e=this;e._swipeEvent=null,clearTimeout(this._swipeTimeout)}initSwipe(e){const t=this;t._maxSwipeVerticalDistance=0,t._maxSwipeHorizontalDistance=0,t._startX=e.pageX,t._startY=e.pageY,t._swipeLocked=!1,t._swipeEvent=null,t._swipeTimeout=setTimeout(function(){t._swipeLocked=!0},t.swipeDelay)}}class Scroll{get scrollWidth(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.max:-1}set scrollWidth(e){const t=this;0>e&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.max=e)}get scrollHeight(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.max:-1}set scrollHeight(e){const t=this;0>e&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.max=e)}get scrollLeft(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.value:-1}set scrollLeft(e){const t=this;0>e&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.value=e)}get scrollTop(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.value:-1}set scrollTop(e){const t=this;0>e&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.value=e)}get vScrollBar(){const e=this;return e.verticalScrollBar}get hScrollBar(){const e=this;return e.horizontalScrollBar}constructor(e,t,a){const n=this;n.container=e,n.horizontalScrollBar=t,n.verticalScrollBar=a,n.disableSwipeScroll=!1,n.listen()}listen(){function e(){let n,r;h.amplitude&&(a.container.$.fireEvent("kineticScroll"),n=Date.now()-m,r=-h.amplitude*t(-n/l),5<r||-5>r?(_(h.targetValue+r),cancelAnimationFrame(d),d=0,d=requestAnimationFrame(e)):_(h.targetValue))}var t=Math.exp;const a=this,n=Core.isMobile,o=a.horizontalScrollBar,i=a.verticalScrollBar;a.inputEvents=new InputEvents(a.container);let l=500,s,d,p,m,c,u,y,h;const g=function(e){return{amplitude:0,delta:0,initialValue:0,min:0,max:e.max,previousValue:0,pointerPosition:0,targetValue:0,scrollBar:e,value:0,velocity:0}},b=g(o),f=g(i),v=function(){u=Date.now(),y=u-m,m=u;const e=function(e){e.delta=e.value-e.previousValue,e.previousValue=e.value;let t=1e3*e.delta/(1+y);e.velocity=.8*t+.2*e.velocity};e(f),e(b)},_=function(e){return h.value=e>h.max?h.max:e<h.min?h.min:e,h.scrollBar.value=h.value,e>h.max?"max":e<h.min?"min":"value"};a.inputEvents.down(function(e){if(n){const t=e.originalEvent.target,n=t&&t.closest?t.closest("smart-scroll-bar"):void 0;if(n!==a.horizontalScrollBar&&n!==a.verticalScrollBar){p=!0,s=!1;const t=function(e,t){e.amplitude=0,e.pointerPosition=t,e.previousValue=e.value,e.value=e.scrollBar.value,e.initialValue=e.value,e.max=e.scrollBar.max};t(f,e.clientY),t(b,e.clientX),m=Date.now(),clearInterval(c),c=setInterval(v,l)}}}),a.inputEvents.up(function(){if(!p)return!0;if(clearInterval(c),a.disableSwipeScroll)return void(p=!1);const t=function(t){h=t,t.amplitude=.8*t.velocity,t.targetValue=Math.round(t.value+t.amplitude),m=Date.now(),cancelAnimationFrame(d),d=requestAnimationFrame(e),t.velocity=0};10<f.velocity||-10>f.velocity?t(f):(10<b.velocity||-10>b.velocity)&&t(b),p=!1}),a.inputEvents.move(function(e){if(!p)return!0;if(a.disableSwipeScroll)return;if(s&&(e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()),b.visible=0<o.offsetHeight,f.visible=0<i.offsetWidth,!p||!b.visible&&!f.visible)return;f.ratio=-f.max/f.scrollBar.offsetHeight,f.delta=(e.clientY-f.pointerPosition)*f.ratio,b.ratio=-b.max/b.scrollBar.offsetWidth,b.delta=(e.clientX-b.pointerPosition)*b.ratio;let t="value";const n=function(e,n,r){return 5<e.delta||-5>e.delta?(h=e,t=e.initialValue+e.delta>h.max?"max":e.initialValue+e.delta<h.min?"min":"value","min"==t&&0===e.initialValue)||"max"==t&&e.initialValue===e.max||!e.visible||(a.container.$.fireEvent("kineticScroll"),_(e.initialValue+e.delta),v(),r.originalEvent.preventDefault(),r.originalEvent.stopPropagation(),s=!0,!1):null};let r=n(f,e.clientY,e);if(null===r){let t=n(b,e.clientX,e);if(null!==t)return t}else return r});let w;a.scrollTo=function(e,n){const o=!1===n?b:f;let i=!1;m||(m=Date.now()),w||(w=Date.now()),375<r(Date.now()-w)?m=Date.now():i=!0,w=Date.now(),o.value=o.scrollBar.value,o.delta=e-o.value,o.max=o.scrollBar.max,e<=o.min&&(e=o.min),e>=o.max&&(e=o.max),o.targetValue=e;const l=e;let s=o.value;o.velocity=100*o.delta/(1+o.max),o.from=s;const p=function(e){return o.value=e>o.max?o.max:e<o.min?o.min:e,o.scrollBar.value=o.value,e>o.max?"max":e<o.min?"min":"value"},c=function(){let n=175,r=Date.now()-w,u=Math.min(1e3,Date.now()-m),y=o.velocity*t(u/n),h;if(i)0>y&&o.value<=e?y=0:0<y&&o.value>=e&&(y=0),(o.value+y<=o.min||o.value+y>=o.max)&&(y=0),.5<y||-.5>y?(p(o.value+y),cancelAnimationFrame(d),d=0,d=requestAnimationFrame(c)):p(o.targetValue);else{if(r>=n)return cancelAnimationFrame(d),a.container.$.fireEvent("kineticScroll"),void(d=0);h=Utilities.Animation.Easings.easeInSine(r,s,l-s,n),p(h),cancelAnimationFrame(d),d=0,d=requestAnimationFrame(c)}};cancelAnimationFrame(d),d=requestAnimationFrame(c)},a.inputEvents.listen()}unlisten(){const e=this;e.inputEvents&&e.inputEvents.unlisten(),delete e.inputEvents}}class Extend{constructor(e){this.events={},this.handlers={},this.element=e}hasClass(e){const t=this,a=e.split(" ");for(let n=0;n<a.length;n++){const e=t.element.classList.contains(a[n]);if(!e)return!1}return!0}addClass(e){const t=this;if(!t.hasClass(e)){const a=e.split(" ");for(let e=0;e<a.length;e++)t.element.classList.add(a[e]);t.isNativeElement||StyleObserver.observeElement(t.element)}}removeClass(e){const t=this;if(0===arguments.length)return void t.element.removeAttribute("class");const a=e.split(" ");for(let n=0;n<a.length;n++)t.element.classList.remove(a[n]);""===t.element.className&&t.element.removeAttribute("class"),t.isNativeElement||StyleObserver.observeElement(t.element)}get isCustomElement(){const e=this;return!(!0!=e.element instanceof window[c].BaseElement)||"DIV"!==e.element.tagName&&"SPAN"!==e.element.tagName&&"BUTTON"!==e.element.tagName&&"INPUT"!==e.element.tagName&&"UL"!==e.element.tagName&&"LI"!==e.element.tagName&&!(!0!=document.createElement(e.element.nodeName)instanceof window[c].BaseElement)}get isNativeElement(){const e=this;return!e.isCustomElement}dispatch(e){const t=this,a=t.events[e.type];let n=!1;if(1<a.length)for(let e=0;e<a.length;e++){const t=a[e];if(t.namespace&&0<=t.namespace.indexOf("_")){n=!0;break}}n&&a.sort(function(e,t){let a=e.namespace,n=t.namespace;return a=-1===a.indexOf("_")?0:parseInt(a.substring(a.indexOf("_")+1)),n=-1===n.indexOf("_")?0:parseInt(n.substring(n.indexOf("_")+1)),a<n?-1:a>n?1:0});for(let n=0;n<a.length;n++){const r=a[n];if(e.namespace=r.namespace,e.context=r.context,e.defaultPrevented)break;const o=r.handler.apply(t.element,[e]);if(void 0!==o&&(e.result=o,!1===o)){e.preventDefault(),e.stopPropagation();break}}return e.result}fireEvent(e,t,a){const n=this;a||(a={composed:!0,bubbles:!0,cancelable:!0,composed:n.isInShadowDOM}),a.detail=t||{};const r=new CustomEvent(e,a);return r.originalStopPropagation=r.stopPropagation,r.stopPropagation=function(){return r.isPropagationStopped=!0,r.originalStopPropagation()},n.dispatchEvent(r),r}get isPassiveSupported(){const e=this;if(e.supportsPassive!==void 0)return e.supportsPassive;e.supportsPassive=!1;try{let t=Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(t){}return e.supportsPassive}dispatchEvent(e){const t=this,a=e.type,n=t.element.context;t.element.context=document,t.element["on"+a]?t.element["on"+a](e):t.element.dispatchEvent(e),t.element.context=n}listen(e,t){const a=this,n=e.split("."),r=n.slice(1).join("."),o=n[0];a.events[o]||(a.events[o]=[]);const i={type:o,handler:t,context:a.element,namespace:r};0<=g.indexOf(o)&&(!a.inputEvents&&(a.inputEvents=new InputEvents(a.element)),a.inputEvents[o](function(e){a.dispatchEvent(e)}),a.inputEvents.boundEventTypes.push(o),a.inputEvents.listen(o)),0===a.events[o].length&&(a.handlers[o]=a.dispatch.bind(a),"wheel"===o?a.element.addEventListener("wheel",a.handlers[o],!!a.isPassiveSupported&&{passive:!1}):a.element.addEventListener(o,a.handlers[o],!1)),a.events[o].push(i)}unlisten(e){const t=this,a=e.split("."),n=a.slice(1).join("."),r=a[0];let o=t.events[r];if(t.inputEvents&&0<=t.inputEvents.boundEventTypes.indexOf(r)&&(t.inputEvents.boundEventTypes.splice(t.inputEvents.boundEventTypes.indexOf(r),1),0===t.inputEvents.boundEventTypes.length&&t.inputEvents.unlisten(r)),!!o){for(let e=0;e<o.length;e++)if(""!==n){let e=o.findIndex(e=>e.namespace===n);o.splice(e,1);break}else o=[];0===o.length&&(t.element.removeEventListener(r,t.handlers[r]),t.events[r]=[],delete t.handlers[r])}}getAttributeValue(e,t){const a=this,n=a.element.getAttribute(e);if(a.isNativeElement)return a.deserialize(n,t);const r=a.element.propertyByAttributeName[e],o=r.deserialize===void 0?a.deserialize(n,t,r.nullable):a.element[r.deserialize](n);return o}setAttributeValue(e,t,a){const n=this;let r=!1,o;if(!n.isNativeElement){const i=n.element.propertyByAttributeName[e];r=!i||i.nullable,o=i&&i.serialize?n.element[i.serialize](t):n.serialize(t,a,r)}else if(o=n.serialize(t,a),"boolean"===a){if(0<=["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(e))return void(t?n.element.setAttribute(e,""):n.element.removeAttribute(e))}return("array"===a||"object"===a)&&("[]"===o||"{}"===o)?void n.element.removeAttribute(e):void(void 0===o?n.element.removeAttribute(e):n.element.setAttribute(e,o))}serialize(e,t,a){if(void 0===t&&(t=Utilities.Types.getType(e)),void 0!==e&&(a||null!==e)){if(a&&null===e)return"null";if("string"===t)return e;if("boolean"===t||"bool"===t){if(!0===e||"true"===e||1===e||"1"===e)return"";if(!1===e||"false"===e||0===e||"0"===e)return}if("array"===t)return JSON.stringify(e);return 0<=["string","number","int","integer","float","date","any","function"].indexOf(t)?e.toString():"object"===t?JSON.stringify(e):void 0}}deserialize(e,t,a){const n="null"===e;if(void 0!==e&&(!n||a)){if(n&&a)return null;if("boolean"===t||"bool"===t)return null!==e;if("number"===t||"float"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-Infinity:parseFloat(e);if("int"===t||"integer"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-Infinity:parseInt(e);if("string"===t)return e;if("any"===t)return e;if("date"===t)return new Date(e);if("function"===t){if("function"==typeof window[e])return window[e];}else if("array"===t||"object"===t)try{const t=JSON.parse(e);if(t)return t}catch(a){if(window[e]&&"object"==typeof window[e])return window[e];if("array"===t&&0<=e.indexOf("[")){if(0<=e.indexOf("{")){let t=e.replace(/{/ig,"").replace("[","").replace("]","").replace(/'/ig,"").replace(/"/ig,"").trim();t=t.split("},");for(let e=0;e<t.length;e++){let a={},n=t[e].trim().split(",");for(let e=0;e<n.length;e++){const t=n[e].split(":")[0].trim(),r=n[e].split(":")[1].trim();a[t]=r}t[e]=a}return t}const t=e.replace("[","").replace("]","").replace(/'/ig,"").replace(/"/ig,"").trim().split(",");return t}}}}}class Animation{static get Ripple(){return Ripple}static get Easings(){return Easings}}class Utilities{static get Types(){return Types}static get Core(){return Core}static get Animation(){return Animation}static get Scroll(){return Scroll}static get InputEvents(){return InputEvents}static Extend(e){return new Extend(e)}static Assign(e,t){if(0<=e.indexOf(".")){const a=e.split(".");return Utilities[a[0]]||(Utilities[a[0]]={}),void(Utilities[a[0]][a[1]]=t)}Utilities[e]=t}}const b=Utilities.Extend(document);BindingModule.cache={};class BaseElement extends HTMLElement{static get properties(){return{animation:{value:"advanced",type:"string",allowedValues:["none","simple","advanced"]},unfocusable:{value:!1,type:"boolean"},disabled:{value:!1,type:"boolean"},dataContext:{value:null,reflectToAttribute:!1,type:"any"},messages:{value:{en:{propertyUnknownName:"Invalid property name: '{{name}}'!",propertyUnknownType:"'{{name}}' property is with undefined 'type' member!",propertyInvalidValue:"Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!",propertyInvalidValueType:"Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",methodInvalidValueType:"Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!",methodInvalidArgumentsCount:"Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!",methodInvalidReturnType:"Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",elementNotInDOM:"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",moduleUndefined:"Module is undefined.",missingReference:"{{elementType}}: Missing reference to '{{files}}'.",htmlTemplateNotSuported:"{{elementType}}: Web Browser doesn't support HTMLTemplate elements.",invalidTemplate:"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."}},reflectToAttribute:!1,type:"object"},props:{value:null,reflectToAttribute:!1,isHierarchicalProperty:!0,type:"any"},readonly:{value:!1,type:"boolean"},renderMode:{value:"auto",type:"string",reflectToAttribute:!1,allowedValues:["auto","manual"]},rightToLeft:{value:!1,type:"boolean"},theme:{value:window[c].Theme,type:"string"},visibility:{value:"visible",allowedValues:["visible","collapsed","hidden"],type:"string"},wait:{value:!1,type:"boolean"}}}static get requires(){return{}}static get listeners(){return{"theme-changed":function(e){this.theme=e.detail.newValue}}}static get methods(){return{}}get classNamesMap(){return{animation:"smart-animate",rippleAnimation:"smart-ripple"}}get hasAnimation(){const e=this;return"none"!==e.animation}get hasRippleAnimation(){const e=this;return"none"!==e.animation&&!("advanced"!==e.animation)}static get modules(){return window[c].Modules}get properties(){const e=this;return e._properties||(e._properties=[]),e._properties}get parents(){const e=this;let t=[],a=e.parentNode;for(;a&&9!==a.nodeType;)!0==a instanceof HTMLElement&&t.push(a),a=a.parentNode;return window[c].EnableShadowDOM&&e.isInShadowDOM&&e.shadowParent&&(t=t.concat(e.shadowParent.parents)),t}get focused(){return this.contains(document.activeElement)}template(){return"<div></div>"}registered(){const e=this;e.onRegistered&&e.onRegistered()}created(){const e=this;e.isReady=!1,e._initElement(e),e._setModuleState("created"),e.onCreated&&e.onCreated()}completed(){const e=this;e.isCompleted=!0,e._onCompleted&&e._onCompleted(),e.onCompleted&&e.onCompleted()}whenReady(e){const t=this;return t.isCompleted?void e():void(!t.whenReadyCallbacks&&(t.whenReadyCallbacks=[]),t.whenReadyCallbacks.push(e))}whenRendered(e){const t=this;return t.isRendered?void e():void(!t.whenRenderedCallbacks&&(t.whenRenderedCallbacks=[]),t.whenRenderedCallbacks.push(e))}addThemeClass(){const e=this;""!==e.theme&&e.classList.add("smart-"+e.theme)}addDefaultClass(){const e=this;e.classList.add(c.toLowerCase()+"-element"),e.classList.add(e.nodeName.toLowerCase()+"-element")}render(){const e=this;if(!e.isRendered&&(e.isRendered=!0,e.isRendering=!1,e.context=document,e.whenRenderedCallbacks)){for(let t=0;t<e.whenRenderedCallbacks.length;t++)e.whenRenderedCallbacks[t]();e.whenRenderedCallbacks=[]}e.onRender&&e.onRender()}ready(){const e=this;if(e.addThemeClass(),e.addDefaultClass(),"collapsed"===e.visibility?e.classList.add("smart-hidden"):"hidden"===e.visibility&&e.classList.add("smart-visibility-hidden"),e.dataContext&&e.applyDataContext(),e.onReady&&e.onReady(),e.shadowRoot&&Smart(e._selector)){if(Smart(e._selector).styleUrls){const t=Smart(e._selector).styleUrls;for(let a=0;a<t.length;a++)e.importStyle(t[a])}if(Smart(e._selector).styles){const t=document.createElement("style");t.innerHTML=Smart(e._selector).styles,e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild)}}Smart(e._selector)&&Smart(e._selector).ready&&Smart(e._selector).ready()}checkLicense(){const e=this;"Evaluation"===window[c].License&&-1===window.location.hostname.indexOf("htmlelements")&&-1===window.location.hostname.indexOf("localhost")&&-1===window.location.protocol.indexOf("file")&&(e.logWatermark(),e.logLicense(),""===window[c].License)}logWatermark(){const e=this,t=document.createElement("a");t.href="https://www.htmlelements.com/",t.innerHTML="https://www.htmlelements.com/",t.style.position="absolute",t.style.right="5px",t.style.bottom="5px",t.style.color="#fff",t.style.padding="20px",t.style.borderRadius="5px",t.style.background="#20C933",t.style.cursor="pointer",t.style.zIndex="999999",t.style.display="block",t.style.fontSize="24px",t.style.textDecoration="none",t.style.fontWeight="bold",t.style.opacity=0,t.style.transition="opacity .35s ease-in-out",t.id="watermark";document.getElementById("watermark")||setTimeout(()=>{document.getElementById("watermark")||(document.body.appendChild(t),setTimeout(()=>{t.style.opacity=1}),setTimeout(()=>{t.style.opacity=0,setTimeout(()=>{t.parentNode.removeChild(t)},350)},6e3))},1e3)}logLicense(){console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("*Smart HTML Elements License Key Not Found."),console.log("*This is an evaluation only version, it is not licensed for development projects intended for production."),console.log("*if you want to hide the watermark, please send an email to: info@htmlelements.com for a license."),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************")}get _selector(){const e=this;return e.id?"#"+e.id:0<e.classList.length?"."+e.classList[0]:void 0}applyDataContext(e){const t=this;let a="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext;if(e&&(a=e,t.dataContext=e),!a){t.dataContextProperties=null;const e=function(){const a="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext;a&&(t.applyDataContext(),window.removeEventListener("load",e))};return void window.addEventListener("load",e)}if(!a._uid)for(let e in a._uid=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),a._properties=[],a){const n=a[e];"function"!=typeof n&&"_properties"!=e&&"_uid"!=e&&(a._properties[e]=n,Object.defineProperty(a,e,{configurable:!1,enumerable:!0,get(){return a._properties[e]},set(n){const r=a._properties[e];a._properties[e]=n;let o=[];o[e]={oldValue:r,value:n},o.length++,t.updatingDataContext=!0,b.fireEvent("dataContextPropertyChanged",{dataContext:a,properties:o},{bubbles:!1,cancelable:!0}),t.updatingDataContext=!1}}))}if(t.dataContextProperties=t.parseAttributes(t),t.dataContextPropertiesMap={},t.dataContextListeners={},!t.dataContextProperties)return void(t.dataContextProperties=null);for(let n in t.updatingDataContext=!0,t.dataContextProperties){const e=t.dataContextProperties[n],r=e.name;if(e.propertyName=n,t.dataContextPropertiesMap[r]=n,BindingModule.cache["toDash"+n]||(BindingModule.cache["toDash"+n]=Utilities.Core.toDash(r)),e.isEvent){const n=e.value;t.dataContextListeners[r]&&t.removeEventListener(r,t.dataContextListeners[r]),t.dataContextListeners[r]=function(e){a[n](e)},t.addEventListener(r,t.dataContextListeners[r])}if(0<=r.indexOf(".")){const e=r.split(".");let o=a[e[0]];for(let t=1;t<e.length;t++)o=o[e[t]];void 0!==o&&(t[n]=o)}else t[n]=a[r]}t.dataContextPropertyChangedHandler=function(e){const a=e.detail.properties,n=e.detail.dataContext,r="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext;if(n===r)for(let e in a){const n=t.dataContextPropertiesMap[e],r=t.context;n&&(t.context=document,t[n]=a[e].value,t.context=r)}},b.listen("dataContextPropertyChanged",t.dataContextPropertyChangedHandler),t.updatingDataContext=!1}updateDataContextProperty(e){const t=this,a="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext,n=t.dataContextProperties[e];if(!t.updatingDataContext&&n.twoWay){const r=n.name;if(0<=r.indexOf(".")){const n=r.split(".");let o=a[n[0]];for(let e=1;e<n.length;e++)o=o[n[e]];void 0!==o&&(o=t[e],y[a._uid]&&(y[a._uid][e]=o))}else a[r]=t[e],y[a._uid]&&(y[a._uid][e]=a[r])}}static get version(){return window[c].Version}initProperties(){const e=this;if(Smart(e._selector)&&Smart(e._selector).properties&&(e._initProperties=Smart(e._selector).properties),e.hasAttribute("props")&&!e.props?e._initProperties=window[e.getAttribute("props")]:e.props&&(e._initProperties=e.props),e._initProperties){const t=Object.keys(e._initProperties);for(let a=0;a<t.length;a++){const n=t[a],r=e._initProperties[n];if(r.constructor===Smart.ObservableArray||r instanceof Smart.ObservableArray){e[n]=r.toArray();continue}if(r.constructor===Smart.DataAdapter||"smartDataAdapter"===r.constructor.name||"object"==typeof r&&Smart.DataAdapter&&r instanceof Smart.DataAdapter||r instanceof Smart.Observable||r.constructor===Smart.Observable||"object"!=typeof r||Utilities.Types.isArray(r)){if(void 0===e[n]&&-1===["onReady","onAttached","onDetached","onCreated","onCompleted"].indexOf(n)){const t=e.localize("propertyUnknownName",{name:n});e.log(t)}e[n]=r;continue}if("object"==typeof r){const t=function(a,n){const r=Object.keys(a);for(let o=0;o<r.length;o++){const i=r[o],l=a[i],s=e._properties[n+"_"+i];if(s&&null===s.value){if(void 0===e[n+"_"+i]){const t=e.localize("propertyUnknownName",{name:n+"_"+i});e.log(t)}e[n+"_"+i]=l;continue}if("object"==typeof l&&!Utilities.Types.isArray(l)&&l&&l.constructor!==Date)t(l,n+"_"+i);else{if(void 0===e[n+"_"+i]){const t=e.localize("propertyUnknownName",{name:n+"_"+i});e.log(t)}e[n+"_"+i]=l}}};t(r,n)}}}}setup(){const e=this;if(e.context=this,e.isReady&&!e.isCompleted)return;if(e.isReady)return e._setModuleState("attached"),e.isAttached=!0,e.attached(),e._handleListeners("listen"),void(e.context=document);e.ownerElement&&0<=e.ownerElement.detachedChildren.indexOf(e)&&e.ownerElement.detachedChildren.splice(e.ownerElement.detachedChildren.indexOf(e),1),e.isReady=!0,e.methods=e.getStaticMember("methods"),e.initProperties();const t=Core.isMobile;t&&e.classList.add("smart-mobile");for(let t=0;t<e.attributes.length;t+=1){const a=e.propertyByAttributeName[e.attributes[t].name];if(!a)continue;let n=e.$.getAttributeValue(a.attributeName,a.type);const r=n?n.toString():"";if(!(0<=r.indexOf("{{")||0<=r.indexOf("[["))&&!("object"!==a.type&&"array"!==a.type&&(0<=e.attributes[t].value.indexOf("{{")||0<=e.attributes[t].value.indexOf("[[")))&&void 0!==n&&a.value!==n){const r=Utilities.Types.getType(n),o=e.attributes[t].value;if(("any"===a.type||"object"===a.type)&&""+e[a.name]===n)continue;if("array"===a.type&&e[a.name]&&JSON.stringify(e[a.name])===n)continue;if("number"===r&&isNaN(n)&&"NaN"!==o&&"Infinity"!==o&&"-Infinity"!==o){const t=e.localize("propertyInvalidValueType",{name:a.name,actualType:"string",type:a.type});e.log(t)}a.isUpdatingFromAttribute=!0,e[a.name]=n,a.isUpdatingFromAttribute=!1}}for(let t in e._properties){const a=e._properties[t];if("innerHTML"==t&&a.value===a.defaultValue&&(a.value=a.defaultValue=Utilities.Core.html(e)),("boolean"===a.type||"bool"===a.type)&&"false"===e.getAttribute(a.attributeName)&&(a.isUpdating=!0,e.setAttribute(a.attributeName,""),a.isUpdating=!1),a.defaultReflectToAttribute&&a.reflectToAttribute){if(a.defaultReflectToAttribute&&a.defaultReflectToAttributeConditions){let t=!0;for(let n=0;n<a.defaultReflectToAttributeConditions.length;n++){const r=a.defaultReflectToAttributeConditions[n];let o,i;for(let e in r)o=e,i=r[e];e._properties[o]&&e._properties[o].value!==i&&(t=!1)}if(!t)continue}a.isUpdating=!0,e.$.setAttributeValue(a.attributeName,a.value,a.type),a.isUpdating=!1}}const a=[];if(0<e.children.length)for(let t=0;t<e.children.length;t++){const n=e.children[t];Utilities.Extend(n).isCustomElement&&a.push(n)}e.applyTemplate(),e.complete=function(){if(!e.templateBindingsReady){const t=e=>{e.templateBindingsReady||(e.templateBindingsReady=!0,e.updateTextNodes(),e.updateBoundNodes())};if(!e.ownerElement)t(e);else{let a=e.ownerElement,n=[];for(;a;)n.push(a),a=a.ownerElement;for(let e=n.length-1;0<=e;e--)t(n[e]);t(e)}}const t=()=>{if(e._setModuleState("ready"),e.ready(),"auto"!==e.renderMode||e.isRendered||e.render(),e.isAttached=!0,e._setModuleState("attached"),e.attached(),e._handleListeners("listen"),e.isHidden||0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0),e.completed(),e.isRendered&&(e.context=document),e.whenReadyCallbacks){for(let t=0;t<e.whenReadyCallbacks.length;t++)e.whenReadyCallbacks[t]();e.whenReadyCallbacks=[]}};if(!!e.wait)e.classList.add("smart-visibility-hidden");else if(!e.classList.contains("smart-async")){const a=e.shadowParent;e.shadowParent=null;const n=e.parents;if(e.shadowParent=a,0===n.length)return;const r=()=>{let t=e.ownerElement,a=[];for(;t;)a.push(t),t=t.ownerElement;for(let e=a.length-1;0<=e;e--)a[e].updateBoundMappedNodes()};e.ownerElement&&"HTML"!==n[n.length-1].nodeName?e.ownerElement&&"HTML"===e.ownerElement.parents[e.ownerElement.parents.length-1].nodeName?(r(),t()):e.checkIsInDomInterval=setInterval(()=>{const a=e.parents;"HTML"===a[a.length-1].nodeName&&(clearInterval(e.checkIsInDomInterval),r(),t())},100):t()}else requestAnimationFrame(()=>{t()})};let n=[].slice.call(e.querySelectorAll("[smart-id]")).concat(a);if(e.enableShadowDOM&&!0!==e.isInShadowDOM&&(n=[].slice.call(e.shadowRoot.querySelectorAll("[smart-id]")).concat(a)),0===n.length)e.complete();else{e._completeListeners=0;for(let t=0;t<n.length;t++){const a=n[t];if(Utilities.Extend(a).isCustomElement){const t=function(){e._completeListeners--,0===e._completeListeners&&(e.complete(),delete e._completeListeners)}.bind(e);a.isCompleted||a.isUtilityElement||!1!==a.wait||(e._completeListeners++,!a._onCompleted&&(a.completeHandlers=[],a._onCompleted=function(){for(let e=0;e<a.completeHandlers.length;e++)a.completeHandlers[e]()}),a.completeHandlers.push(t))}}0===e._completeListeners&&e.complete()}}visibilityChangedHandler(){const e=this;e.isReady&&requestAnimationFrame(()=>{0===e.offsetWidth||0===e.offsetHeight?e.isHidden=!0:(e.isHidden=!1,e.$.fireEvent("resize",e,{bubbles:!1,cancelable:!0}))})}attributeChangedCallback(e,t,a){const n=this,r=n.propertyByAttributeName[e];if(("class"===e||"style"===e)&&n.visibilityChangedHandler(),r||n.attributeChanged(e,t,a),!(!r||r&&r.isUpdating)){let e=n.$.getAttributeValue(r.attributeName,r.type);void 0!==a&&n[r.name]!==e&&(r.isUpdatingFromAttribute=!0,n[r.name]=void 0===e?n._properties[r.name].defaultValue:e,r.isUpdatingFromAttribute=!1)}}attributeChanged(e,t,a){}set hasStyleObserver(e){const t=this;t._hasStyleObserver===void 0&&(t._hasStyleObserver=e),e?StyleObserver.watch(t):StyleObserver.unwatch(t)}get hasStyleObserver(){const e=this;return!(void 0!==e._hasStyleObserver)||e._hasStyleObserver}attached(){const e=this;e.hasStyleObserver&&StyleObserver.watch(e),e.onAttached&&e.onAttached(),Smart(e._selector)&&Smart(e._selector).attached&&Smart(e._selector).attached()}detached(){const e=this;e.hasStyleObserver&&StyleObserver.unwatch(e),e._setModuleState("detached"),e.isAttached=!1,e.ownerElement&&-1===e.ownerElement.detachedChildren.indexOf(e)&&e.ownerElement.detachedChildren.push(e),e._handleListeners("unlisten"),e.onDetached&&e.onDetached(),Smart(e._selector)&&Smart(e._selector).detached&&Smart(e._selector).detached()}propertyChangedHandler(e,t,a){const n=this;t===a||("theme"===e&&(""!==t&&n.classList.remove("smart-"+t),""!==a&&n.classList.add("smart-"+a)),"visibility"===e&&("collapsed"===t?n.classList.remove("smart-hidden"):"hidden"==t&&n.classList.remove("smart-visibility-hidden"),"collapsed"===a?n.classList.add("smart-hidden"):"hidden"==a&&n.classList.add("smart-visibility-hidden")),n.propertyChanged&&n.propertyChanged(e,t,a))}_handleListeners(e){const t=this,a=t.tagName.toLowerCase(),n=t.getStaticMember("listeners"),r=n=>{for(let r in n){const o=r.split(".");let i=o[0],l=t.$;if(!o[1])t.smartId&&(i=i+"."+t.smartId);else if(i=o[1],l=t["$"+o[0]],"document"===o[0]){let e=t.smartId;""===e&&(e=Utilities.Core.toCamelCase(a)),i=i+"."+e}else t.smartId&&(i=i+"."+t.smartId+"_"+t.parents.length);const s=n[r];l&&l[e](i,function(e){const a=t.context;t.context=t,t[s]&&t[s].apply(t,[e]),t.context=a})}};r(n),r(t.templateListeners),Smart(t._selector)&&Smart(t._selector).properties&&r(Smart(t._selector).listeners)}parseTemplate(){const e=this,t=e.template(),a=document.createDocumentFragment();if(p[e.nodeName])return p[e.nodeName].cloneNode(!0);if(""===t)return null;let n=document.createElement("div");a.appendChild(n),n.innerHTML=t;let r=n.childNodes;n.parentNode.removeChild(n);for(let e=0;e<r.length;e++)a.appendChild(r[e]);return p[e.nodeName]=a,a.cloneNode(!0)}applyTemplate(){const e=this,t=e.parseTemplate();if(!t)return;if(!t.hasChildNodes)return;const a=t.childNodes[0],n=(t,a)=>{e["$"+t]=a.$=Utilities.Extend(a),e.$[t]=a,a.ownerElement=e};let r=a;if(0<a.getElementsByTagName("content").length){let e=a.getElementsByTagName("content")[0];r=e.parentNode,r.removeChild(e)}else{const e=t.querySelectorAll("[inner-h-t-m-l]");e&&0<e.length&&(r=e[0])}e.$.template="template"===a.nodeName.toLowerCase()?a:a.querySelector("template");let o=t.querySelectorAll("[id]");0===o.length&&(o=t.querySelectorAll("*")),n("root",a),n("content",r),e.$.html=e.innerHTML.toString().trim();for(let t=0,a;t<o.length;t+=1)a=o[t],""===a.id&&(a.id="child"+t),n(a.id,a),a.setAttribute("smart-id",a.id),e.shadowRoot?a.shadowParent=e:a.removeAttribute("id");for(e.bindings=!1===e.hasTemplateBindings?[]:e.getBindings(t),e.$root.addClass("smart-container");e.childNodes.length;)r.appendChild(e.firstChild);if(e.appendTemplate(t),e.$.template){const t=document.createElement("div");t.classList.add("smart-template-container"),e.$.templateContainer=t,e.$.template.parentNode.insertBefore(t,e.$.template),e.refreshTemplate()}}refreshTemplate(){const e=this;if(!e.$.templateContainer)return;e.templateDetached(e.$.templateContainer);const t=e.$.template.content.cloneNode(!0);e.templateBindings=e.getBindings(t),e.templateProperties=[];let a=document.createDocumentFragment();const n=function(t,a,r){for(let o in t){const l=t[o],s=l.node.cloneNode();a.appendChild(s);let d=[],i=!1;if(l.data)for(let t in l.data){const n=l.data[t],o=n.name;if(e.templateProperties[o]=!0,s.removeAttribute(Utilities.Core.toDash(t)),"*items"==t)d=e[o],i=!0;else if(0<=o.indexOf("item.")&&r)n.value=r[o.substring(5)],s[t]=n.value;else if(0<=o.indexOf("item")&&r)n.value=r,s[t]=n.value;else if("*if"!=t)e.updateBoundNode(s,l,e,o);else if(0<=o.indexOf("(")){let t=o.substring(o.indexOf("(")),n;const r=o.substring(0,o.indexOf("("));if(t=t.substring(1,t.length-1),t=t.replace(/ /ig,""),t=t.split(","),0<t.length&&""!==t[0]){let a=[];for(let n=0;n<t.length;n++)a.push(e[t[n]]);n=e[r].apply(e,a)}else n=e[r]();!1===n&&a.removeChild(s)}else e[o]||a.removeChild(s)}if(0<d.length||i)for(let e=0;e<d.length;e++)l.children&&n(l.children,s,d[e]);else l.children&&n(l.children,s,r)}};n(e.templateBindings.children,a),e.$.templateContainer.innerHTML="",e.$.templateContainer.appendChild(a),e.templateAttached(e.$.templateContainer)}templateAttached(){}templateDetached(){}appendTemplate(e){const t=this;t.appendChild(e)}defineElementModules(){const e=this,t=e.constructor.prototype;if("BaseElement"===t.elementName){t.modules=e.constructor.modules;const a=t.modules;for(let t=0;t<a.length;t+=1)e.addModule(a[t])}else{const a=t.modules;for(let t=0;t<a.length;t+=1){const n=a[t],r=n.prototype;e.defineElementMethods(r.methodNames,r),e.defineElementProperties(n.properties)}}}watch(e,t){const a=this;return null===e||null===t?void(a._watch=null):void(a._watch={properties:e,propertyChangedCallback:t})}unwatch(){const e=this;e._watch=null}set(e,t,a){const n=this,r=n.context;n.context=!0===a?document:n,n[e]=t,n.context=r}get(e){const t=this;return t[e]}_setModuleState(e,t){const a=this,n="is"+e.substring(0,1).toUpperCase()+e.substring(1),r="on"+e.substring(0,1).toUpperCase()+e.substring(1);for(let o=0;o<a.modulesList.length;o++){const i=a.modulesList[o];i[n]=!0,i[e]&&i[e](t),i[r]&&i[r](t)}}addModule(e,t){const a=this;if(!e)return;const n=a.modules.slice(0),r=e.prototype,o=Object.getPrototypeOf(e);o.name&&o.name!==e.name&&a.addModule(o),!e.moduleName&&e.name&&(e.moduleName=e.name),-1===n.findIndex(t=>e.moduleName===t.moduleName)&&n.push(e),a.defineModule(e),a.defineElementMethods(r.methodNames,r),a.defineElementProperties(e.properties);const i=a.constructor.prototype;if(i.modules=n,t)for(let t in Smart.Elements.tagNames){const n=Smart.Elements.tagNames[t];let r=Object.getPrototypeOf(n),o=[];for(;r!==HTMLElement;)o.push(r.prototype),r=Object.getPrototypeOf(r);0<=o.indexOf(a)&&n!==a&&n.prototype.addModule(e)}}defineModule(e){if(e.isDefined)return;e.prototype._initModule=function(e){const t=this;t.ownerElement=e};const t=e.properties||{},a=Object.keys(t),n=Object.getOwnPropertyNames(e.prototype);e.prototype.methodNames=n;for(let n=0;n<a.length;n+=1){const r=a[n],o=t[r];Object.defineProperty(e.prototype,r,{configurable:!1,enumerable:!0,get(){const e=this;return e.ownerElement?e.ownerElement[r]:o.value},set(e){const t=this;t.ownerElement[r]=e}})}e.isDefined=!0}getStaticMember(e,t){const a=this,n=window[c][a.elementName],r=n[e];t||(t="");let o="array"===t?[]:"string"===t?"":{},i=Object.getPrototypeOf(n),l=[];for(;i[e];)l.push(i[e]),i=Object.getPrototypeOf(i);for(let a=l.length-1;0<=a;a--)if("array"===t)for(let e=0;e<l[a].length;e++)-1===o.indexOf(l[a][e])&&o.push(l[a][e]);else"string"===t?-1===o.indexOf(l[a])&&(o+=l[a]):o=Utilities.Core.assign(o,l[a]);if("array"===t){for(let e=0;e<r.length;e++)-1===o.indexOf(r[e])&&o.push(r[e]);return o}return"string"===t?(-1===o.indexOf(r)&&(o+=r),o):Utilities.Core.assign(o,r)}defineElementHierarchicalProperties(e,t){const a=this,n=[];(function(e){const a=Object.keys(e);for(let r=0;r<a.length;r++){const o=a[r];if("messages"===o)continue;const i=e[o],l=Object.keys(i),s=0<=l.indexOf("value")&&0<=l.indexOf("type")&&"object"==typeof i.value;if("propertyObject"===i.type||s){const e=function(a,r){if(a.value){const o=Object.keys(a.value);for(let i=0;i<o.length;i++){const l=o[i],s=a.value[l],d=r+"_"+l;if("object"!=typeof s||null===s)break;const p=Object.keys(s),m=0<=p.indexOf("value")&&0<=p.indexOf("type");if(!m)break;if("array"!==a.type&&(a.isHierarchicalProperty=!0),s.parentPropertyName=r,t){const e=t._properties[d];if(a.value.hasOwnProperty(l))if(!e.isDefined)delete a.value[l];else continue;e.isDefined=!0,Object.defineProperty(a.value,l,{configurable:!1,enumerable:!0,get(){return t._properties[d].value},set(e){t.updateProperty(t,t._properties[d],e)}})}n[d]||(n[d]=s,n.length++),("propertyObject"===s.type||"object"==typeof s.value&&"array"!==s.type)&&(t?e(t._properties[d],d):e(s,d))}}};e(i,o)}}})(e),0<n.length&&!t&&a.defineElementProperties(n)}defineElement(){const e=this,t=e.constructor.prototype,a=e.getStaticMember("properties"),n=Object.getOwnPropertyNames(t);t.extendedProperties={},t.boundProperties={},t.templateListeners={},e.defineElementModules(),e.defineElementMethods(n,t),e.defineElementProperties(a),e.defineElementHierarchicalProperties(e.extendedProperties),t._initElement=function(){const e=this,a=t.extendedProperties,n=Object.keys(a),r=e.modules;e.$=Utilities.Extend(e),e.$document=b,e.smartId=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),e.isCreated||(e.modulesList=[],e._properties=[],e._beforeCreatedProperties&&(e._properties=e._beforeCreatedProperties,delete e._beforeCreatedProperties),e.detachedChildren=[],e.propertyByAttributeName=[]);for(let t=0;t<r.length;t+=1){const a=r[t];let n=new a;n._initModule(e),e.modulesList.push(n)}for(let t=0;t<n.length;t+=1){const r=n[t],o=a[r];let i=o.value;if(e._properties[r])if(void 0!==e._properties[r].notify)continue;else delete e._properties[r];if(w&&"innerHTML"===r&&delete e[r],-1===window.navigator.userAgent.indexOf("PhantomJS")&&e.hasOwnProperty(r)&&(i=e[r],delete e[r]),"array"===o.type&&void 0!==i&&null!==i&&(i=i.slice(0)),"object"===o.type&&void 0!==i&&null!==i&&(Array.isArray(i)?i=i.slice(0):i=Object.assign({},i)),e._properties[r]={name:r,notify:o.notify,allowedValues:o.allowedValues,type:o.type,nullable:o.nullable,reflectToAttribute:o.reflectToAttribute,defaultReflectToAttribute:o.defaultReflectToAttribute,defaultReflectToAttributeConditions:o.defaultReflectToAttributeConditions,value:i,readOnly:o.readOnly,defaultValue:i,attributeName:o.attributeName,observer:o.observer,inherit:o.inherit,extend:o.extend,validator:o.validator},e.propertyByAttributeName[o.attributeName]=e._properties[r],!o.hasOwnProperty("type")){const t=e.localize("propertyUnknownType",{name:r});e.log(t)}if("any"===o.type||"propertyObject"===o.type)continue;const l=Utilities.Types.getType(i);if(void 0!==i&&null!==i&&o.type!==l&&!o.validator){if("object"===o.type&&"array"===l)continue;if("number"===l){const e=["integer","int","float"].findIndex(e=>e===o.type);if(0<=e)continue}const t=e.localize("propertyInvalidValueType",{name:r,actualType:l,type:o.type});e.log(t)}}e.defineElementHierarchicalProperties(e._properties,e),e.isCreated=!0},t.registered()}defineElementMethods(e,t){const a=this,n=a.constructor.prototype,r=function(e,t){const a=Array.prototype.slice.call(arguments,2),n=function(){if(!this.isReady&&"localize"!==t&&"localize"!==t&&"importStyle"!==t&&"log"!==t&&"parseAttributes"!==t){const e=this.localize("elementNotInDOM");this.log(e)}let n=this;for(let e=0,a;e<this.modulesList.length;e++)if(a=this.modulesList[e],t in a){n=a;break}const r=this.context,o=a.concat(Array.prototype.slice.call(arguments));let i=null;const l=function(e,t){return e===t||"number"===e&&("int"===t||"integer"===t||"float"===t)||"bool"===e&&"boolean"===t||"boolean"===e&&"bool"===t||"object"===e&&"any"===t||void 0};if(this.methods){const e=this.methods[t];if(e){const a=e.split(":");i=a[a.length-1].trim();const n=e.substring(1+e.indexOf("("),e.lastIndexOf(")")),r=[],s=n.split(",");let d="";for(let e=0;e<s.length;e++){const t=s[e];d+=t,0<=t.indexOf(":")?(r.push(d),d=""):d+=","}let p=r.length;for(let e=0;e<r.length;e++){const a=r[e].trim(),n=a.split(":"),i=n[0].split("=")[0].trim(),s=0<=i.indexOf("?"),d=0<=n[1].indexOf("?"),m=n[1].replace(/\?/ig,"").trim(),c=m.split("|");let u=n[0].split("=")[1];const y=Utilities.Types.getType(o[e]);if(void 0===o[e]&&u){switch(u=u.trim(),m[0]){case"date":{let e=u.substring(u.indexOf("(")+1,u.lastIndexOf(")"));e=0<e.length?e.split(",").map(e=>parseInt(e)):[],u=0===e.length?new Date:new Date(e[0],e[1],e[2]);break}case"bool":case"boolean":u="true"===u||"1"===u;break;case"int":case"integer":u=parseInt(u);break;case"float":case"number":u=parseFloat(u);break;case"any":case"object":u=0<=u.indexOf("{")?JSON.parse(u):u;}o.push(u)}else s&&p--;if(m!==y&&y){let a=!0;for(let e=0;e<c.length;e++)if(l(y,c[e])){a=!1;break}if(a&&!(null===o[e]&&d)){const a=this.localize("methodInvalidValueType",{name:t,actualType:y,type:m,argumentIndex:e});this.log(a)}}if(o.length<p){const e=this.localize("methodInvalidArgumentsCount",{name:t,actualArgumentsCount:o.length,argumentsCount:p});this.log(e)}}}}this.context=this;const s=e.apply(n,o);if(i){const e=void 0===Utilities.Types.getType(s)?"void":Utilities.Types.getType(s);if(!l(e,i)){const a=this.localize("methodInvalidReturnType",{name:t,actualType:e,type:i});this.log(a)}}return this.context=r,s};return n},o=["constructor","ready","created","render","attached","detached","appendChild","insertBefore","removeChild","connect","disconnectedCallback","connectedCallback","attributeChangedCallback","propertyChangedHandler","enableShadowDOM","isInShadowDOM"];for(let a in e){let i=e[a];i.startsWith("_")||void 0!==o.find(e=>e===i)||!n.extendedProperties[i]&&Utilities.Types.isFunction(t[i])&&(n[i]=r(t[i],i))}}defineElementProperties(e){if(!e)return;const t=this,a=t.constructor.prototype,n=Object.keys(e),r=t.getStaticMember("properties");Object.assign(a.extendedProperties,e),t.updateProperty=function(e,t,a){const n=e;if(!t||t.readOnly)return;if(t.allowedValues){let e=!1;for(let n=0;n<t.allowedValues.length;n++)if(t.allowedValues[n]===a){e=!0;break}if(!e){const e=JSON.stringify(t.allowedValues).replace(/\[|\]/gi,"").replace(",",", ").replace(/"/gi,"'"),r="'"+a+"'",o=n.localize("propertyInvalidValue",{name:t.name,actualValue:r,value:e});return void n.log(o)}}const r=t.name,o=n._properties[r].value;if(t.validator&&n[t.validator]){const e=n.context;n.context=n;const r=n[t.validator](o,a);void 0!==r&&(a=r),n.context=e}if(o!==a){if(n.propertyChanging){const e=n.propertyChanging(r,o,a);if(!1===e||null===e)return}if(!t.hasOwnProperty("type")){const e=n.localize("propertyUnknownType",{name:r});n.log(e)}if("array"!==t.type||JSON.stringify(o)!==JSON.stringify(a)){if(void 0!==a&&null!==a&&"any"!==t.type&&"propertyObject"!==t.type&&t.type!==Utilities.Types.getType(a)&&!t.validator||null===a&&!t.nullable){let e=!0;if("object"===t.type&&"array"===Utilities.Types.getType(a)&&(e=!1),"number"===Utilities.Types.getType(a)){const a=["integer","int","float"].findIndex(e=>e===t.type);0<=a&&(e=!1)}if(e){const e=n.localize("propertyInvalidValueType",{name:r,actualType:Utilities.Types.getType(a),type:t.type});return void n.error(e)}}if(t.isUpdating=!0,t.isHierarchicalProperty){const e=function(t,a){const r=Object.keys(t);for(let o=0;o<r.length;o++){const i=r[o],l=t[i];"object"==typeof l&&!Utilities.Types.isArray(l)&&l&&l.constructor!==Date?e(l,a+"_"+i):n[a+"_"+i]=l}};e(a,r)}else n._properties[r].value=a;!t.isUpdatingFromAttribute&&t.reflectToAttribute&&n.$.setAttributeValue(t.attributeName,a,t.type);const e=n.isReady&&(!n.ownerElement||n.ownerElement&&n.ownerElement.isReady);if(e){if("wait"!==r||a||!o||n.isCompleted||(n.classList.remove("smart-visibility-hidden"),n.ownerElement&&n.ownerElement.updateBoundMappedNodes(),n.updateBoundMappedNodes(),n.complete()),"renderMode"===r)return;if(n.context!==n&&!n.wait){const e=n.context;n.context=n,n.propertyChangedHandler(r,o,a),n.context=e,t.observer&&n[t.observer]&&(n.context=n,n[t.observer](o,a),n.context=document),n._watch&&0<=n._watch.properties.indexOf(r)&&n._watch.propertyChangedCallback(r,o,a)}const e=t.notify||n.boundProperties[r];e&&(n.$.fireEvent(t.attributeName+"-changed",{context:n.context,oldValue:o,value:n[r]}),n.boundProperties[r]&&n.updateBoundNodes(r)),e&&n.templateProperties&&n.templateProperties[r]&&n.refreshTemplate(),n.dataContextProperties&&("dataContext"===r?n.applyDataContext():n.dataContextProperties[r]&&n.updateDataContextProperty(r))}t.isUpdating=!1}}};for(let t=0;t<n.length;t+=1){const o=n[t],i=e[o],l=Utilities.Core.toDash(o),s=i.type||"any",d=0<=s.indexOf("?")||"any"===s;(d&&"any"!==s&&(i.type=s.substring(0,s.length-1)),i.nullable=d,i.attributeName=l.toLowerCase(),i.name=o,i.reflectToAttribute=void 0===i.reflectToAttribute||i.reflectToAttribute,i.inherit&&r[o]&&(i.value=r[o].value),i.extend&&r[o]&&Utilities.Core.assign(i.value,r[o].value),!a.hasOwnProperty(o))&&Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get(){const e=this;return e._properties[o]?e._properties[o].value:void 0},set(e){const t=this;t.updateProperty(t,t._properties[o],e)}})}}}let f=[],v=[],_=[],w=!1;const N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(N){const e=parseInt(N[2],10);50>=e&&(w=!0)}const C=function(){if("complete"===document.readyState){_.sort(function(e,t){let a=e.element.parents.length,n=t.element.parents.length;return a<n?-1:a>n?1:0});for(let e=0;e<_.length;e++)_[e].element.isLoading=!1,_[e].callback();_=[],document.removeEventListener("readystatechange",C)}};document.addEventListener("readystatechange",C);class BaseCustomElement extends BaseElement{static get observedAttributes(){let e=this,t=["external-style"];for(let a in e.prototype.extendedProperties){const n=e.prototype.extendedProperties[a];t.push(n.attributeName)}return t}static get styleUrls(){return[]}static get styles(){return""}get styleUrl(){this;return this._styleUrl}set styleUrl(e){this._styleUrl=e}get isInShadowDOM(){const e=this;if(e.shadowParent)return!0;let t=!1;return void 0!==e.enableShadowDOM&&(t=(t=>{for(;t;t=t.parentNode)if(t.host||t.enableShadowDOM||t.shadowRoot)return e.shadowParent=t.host?t.host:t,!0;return!1})(e.parentNode)),t}get enableShadowDOM(){const e=this,t=window[c].EnableShadowDOM;return t}importStyle(e,t){const a=this;a._importStyle(e,t)}_importStyle(e,t){const a=this;if(!a.shadowRoot||!e)return;const n=e=>{const n=a.shadowRoot.children;for(let a=0;a<n.length;a++){const r=n[a];if(r instanceof HTMLLinkElement&&r.href===e)return t&&t(),null}const r=document.createElement("link");return r.rel="stylesheet",r.type="text/css",r.href=e,r.onload=t,r},r=(()=>{const e=a.shadowRoot.children;let t=null;for(let a=0;a<e.length;a++){const n=e[a];n instanceof HTMLLinkElement&&(t=n)}return t})(),o=(e,t)=>{t.parentNode.insertBefore(e,t.nextSibling)};if(Array.isArray(e)){const t=document.createDocumentFragment();for(let a=0;a<e.length;a++){const r=n(e[a]);r&&t.appendChild(r)}r?o(t,r):a.shadowRoot.insertBefore(t,a.shadowRoot.firstChild)}else{const t=n(e);if(!t)return;r?o(t,r):a.shadowRoot.insertBefore(t,a.shadowRoot.firstChild)}}attributeChanged(e,t,a){"style-url"===e&&(this.styleUrl=a)}attributeChangedCallback(e,t,a){const n=this;n.isReady&&super.attributeChangedCallback(e,t,a)}constructor(e,t){super();const a=this;if(e){t&&(a._initProperties=t);const n=e=>{if("string"==typeof e?document.querySelector(e):e){const n="string"==typeof e?document.querySelector(e):e;if(n instanceof HTMLDivElement){const r=document.createElement(a.tagName);for(let e of n.attributes)r.setAttribute(e.name,n.getAttribute(e.name));for(;n.childNodes.length;)r.appendChild(n.firstChild);return"string"==typeof e&&(r.id=e.substring(1)),r._initProperties=t,n.parentNode&&n.parentNode.replaceChild(r,n),r}if(t){const e=n.context;if(n._initProperties=t,n.isReady){n.context=n;const a={},r={};for(let e in t)a[e]=n[e],r[e]=t[e];0<Object.getOwnPropertyNames(t).length&&(n.initProperties(),n.propertyChangedHandler(t,a,r)),n.context=e}}return n}};if("string"==typeof e){const t=document.querySelectorAll(e),a=[];if(1<t.length){for(let e=0;e<t.length;e++){const r=n(t[e]);a.push(r)}return a}}else if(e&&0<e.length){const t=e;if(1<t.length){for(let e=0;e<t.length;e++){const a=n(t[e]);f.push(a)}return f}}return n(e)}a._styleUrl="";a.isUtilityElement||a.created()}_getRootShadowParent(){const e=this;let t=e.shadowParent;for(;t;){if(!t.shadowParent)return t;t=t.shadowParent}return t||e.shadowParent}_getStyleUrl(e){const t=this;let a=Utilities.Core.getScriptLocation()+window[c].StyleBaseUrl+e;return t.shadowParent&&(a=a.replace("scoped/","")),a}_getStyleUrls(){const e=this;let t=[],a=[];e.nodeName.startsWith(c)&&(t=["smart.common.css"],a=["smart.misc.css"]);const n=e.getStaticMember("styleUrls","array"),r=[];for(let t=0;t<n.length;t++){const a=n[t],o=e._getStyleUrl(a);r.push(o)}return r}_getShadowDomStyleUrls(){const e=this;let t=[].slice.call(e.querySelectorAll("[smart-id]")).concat(e.children);e.enableShadowDOM&&!0!==e.isInShadowDOM&&(t=[].slice.call(e.shadowRoot.querySelectorAll("[smart-id]")).concat(t),t=[].slice.call(e.shadowRoot.querySelectorAll(".smart-element-init")).concat(t));const a=function(e,n){for(let r=0;r<e.length;r++){const o=e[r];o.$&&o.$.isCustomElement&&-1===t.indexOf(o)&&n.push(o),a(o.children,n)}};a(e.shadowRoot.children,t);let n=[],r=[];e.nodeName.startsWith(c)&&(n=[e._getStyleUrl("smart.common.css")],r=[e._getStyleUrl("smart.misc.css")]);let o=e._getStyleUrls();for(let e=0;e<t.length;e++){const a=t[e];if(a._getStyleUrls){const e=a._getStyleUrls();1===n.length&&1===r.length&&(n.push(a._getStyleUrl("smart.common.css")),r.push(a._getStyleUrl("smart.misc.css")));for(let t=0;t<e.length;t++){const a=e[t];-1===o.indexOf(a)&&o.push(a)}}}return n.concat(o).concat(r)}_whenStylesReady(e){const t=this;return t._stylesReady?void e():void(!t.whenStylesReady&&(t.whenStylesReady=[]),t.whenStylesReady.push(e))}_importShadowRootStyles(){const e=this,t=e._getShadowDomStyleUrls();e._styleUrls=t,e._styleUrlsReadyCount=0;for(let a=0;a<t.length;a++){const n=t[a];e._importStyle(n,function(){if(e._styleUrlsReadyCount++,e._styleUrlsReadyCount===e._styleUrls.length){if(e._stylesReady=!0,e.whenStylesReady){for(let t=0;t<e.whenStylesReady.length;t++)e.whenStylesReady[t]();e.whenStylesReady=[]}if(!e.isRendered&&!e.hasAttribute("wait")&&!e.isRendering){if(e.resizeTrigger){const t=e.resizeTrigger.childNodes[0],a=e.resizeTrigger.childNodes[1];t.scrollLeft=1e5,t.scrollTop=1e5,a.scrollLeft=1e5,a.scrollTop=1e5}e.isRendering=!0,e.context=e,e.render(),e.renderMode="auto"}e.classList.remove("smart-element-init")}})}}_setupShadowRoot(){const e=this,t=e.renderMode;e.isRendered||e.wait||(e.renderMode="manual"),e.classList.add("smart-element-init"),e.setup(),e._importShadowRootStyles()}connect(){const e=this,t=e.isReady;if(e.enableShadowDOM&&!e.shadowRoot&&!0!==e.isInShadowDOM&&(e.attachShadow({mode:"open"}),e.shadowRoot&&e.$.root&&e.shadowRoot.appendChild(e.$.root)),!e.shadowRoot&&!e.shadowParent)e.setup();else if(e.shadowRoot)e._setupShadowRoot();else if(e.shadowParent&&e.enableShadowDOM){const t=e._getRootShadowParent();if(e.isRendered||e.hasAttribute("wait")||(e.renderMode="manual"),e.classList.add("smart-element-init"),e.setup(),t._styleUrls){const e=t._getShadowDomStyleUrls();e.length!==t._styleUrls.length&&t._importShadowRootStyles()}t._whenStylesReady(()=>{e.isRendered||e.wait||e.isRendering||(e.isRendering=!0,e.context=e,e.render(),e.renderMode="auto"),e.classList.remove("smart-element-init")})}else e.setup()}connectedCallback(){const e=this;if(e.isLoading||e.isUtilityElement)return;e.classList.add("smart-element-init");const t=function(){e.classList.remove("smart-element-init")};if("complete"===document.readyState){const a=e.parents;a.length&&"HTML"===a[a.length-1].nodeName?(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),t(),e.connect()):(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),0<a.length&&(e.checkIsInDomTimer=setInterval(()=>{const a=e.parents;0===a.length&&clearInterval(e.checkIsInDomTimer),0<a.length&&"HTML"===a[a.length-1].nodeName&&(clearInterval(e.checkIsInDomTimer),t(),e.connect())},100)))}else e.isLoading=!0,_.push({element:this,callback:function(){this.isReady||(t(),this.connect())}.bind(e)})}disconnectedCallback(){const e=this;e.shadowParent=null;e.isAttached&&e.detached()}adoptedCallback(){const e=this;e.setup()}appendTemplate(e){const t=this;t.shadowRoot?t.shadowRoot.appendChild(e):t.appendChild(e)}}class ElementRegistry{static register(e,t){const a=t.prototype;let n=Core.toCamelCase(e).replace(/[a-z]+/,""),r=t.version||window[c].Version;if(!(window.customElements.get(e)&&window.customElements.get(e).version===r)){let o=e;for(r=r.split(".");window.customElements.get(e);)e=o+"-"+r.join("."),r[2]=parseInt(r[2])+1;if(!f[e]){if(e.startsWith(c.toLowerCase()))f[e]=window[c][n]=window[c.toLowerCase()+n]=t;else{let a=e.split("-")[0];a=a.substring(0,1).toUpperCase()+a.substring(1),window[c][a]||(window[c][a]={}),f[e]=window[c][a][n]=window[a.toLowerCase()+n]=t,n=Core.toCamelCase(e),window[c][n]=t}a.elementName=n,a.defineElement(),v[e]&&v[e](a),window.customElements.define(e,t)}}}static registerElements(){const e=this;if(e.toRegister){e.isRegistering=!0;for(let t=0;t<e.toRegister.length;t++){const a=e.toRegister[t];e.register(a.tagName,a.element)}e.isRegistering=!1}}static get(e){return f[e]?f[e]:void 0}static whenRegistered(e,t){if(!e)throw new Error("Syntax Error: Invalid tag name");const a=this,n=v[e],r=a.get(e),o=r?r.modules.length:3;try{n||r?!n&&r?(t(r.prototype),v[e]=void 0):n&&!r?v[e]=function(e){n(e),t(e)}:n&&r&&(r.proto&&(n(r.proto),t(r.proto)),v[e]=void 0):v[e]=function(e){try{t(e)}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}}}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}if(r&&o!==r.prototype.modules.length){const t=document.querySelectorAll(e);for(let e=0;e<t.length;e++){const a=t[e];a.isCreated&&a._initElement()}}}}ElementRegistry.lazyRegister=!1,ElementRegistry.tagNames=[];class Observable{constructor(e,t){const a=this;this.name="observable",e&&Object.assign(a,e);(function(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>"constructor"===t||!!t.startsWith("_")||void(a[t]=e[t]))})(e);const n=new Proxy(a,{deleteProperty:function(e,t){return delete e[t],!0},get:function(e,t){return e[t]},set:function(e,n,r){const o=e[n];return!(o!==r)||!(e[n]=r,!("notifyFn"===n||n.startsWith("_")||"canNotify"===n))||!!(t&&-1===t.indexOf(n))||!a.canNotify||(a._notify({target:e,propertyName:n,oldValue:o,newValue:r}),!0)}});return n}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){const t=this;t._canNotify=e}_notify(e){const t=this;if(t.canNotify&&t.notifyFn)for(let a=0;a<t.notifyFn.length;a++)t.notifyFn[a](e)}notify(e){const t=this;e&&(!t.notifyFn&&(t.notifyFn=[]),t.notifyFn.push(e))}}class ObservableArray{constructor(){const e=this;e.name="observableArray",e.observables=3>arguments.length?null:arguments[2];const t=new Proxy(e,{deleteProperty:function(e,t){return delete e[t],!0},apply:function(e,t,a){return e.apply(t,a)},get:function(t,a){return t[a]||isNaN(parseInt(a))?t[a]:e.getItem(parseInt(a))},set:function(t,a,n){return t[a]||isNaN(parseInt(a))?(t[a]=n,!0):(e.setItem(parseInt(a),n),!0)}});if(e._addArgs={eventName:"change",object:t,action:"add",index:null,removed:[],addedCount:1},e._removeArgs={eventName:"change",object:t,action:"remove",index:null,removed:null,addedCount:0},1<=arguments.length&&Array.isArray(arguments[0])){e._array=[];const t=arguments[0];for(let a=0,n=t.length;a<n;a++){const n=e._getItem(e._array.length,t[a]);e._array.push(n)}}else e._array=Array.apply(null,arguments);return 2===arguments.length&&(e.notifyFn=arguments[1]),t}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){const t=this;t._canNotify=e}_notify(e){const t=this;!t.canNotify||t.notifyFn&&t.notifyFn(e)}notify(e){const t=this;e&&(t.notifyFn=e)}toArray(){const e=this;return e._array}_getItem(e,t){const a=this;if("string"==typeof t)return t;if("number"==typeof t)return t;if(void 0===t)return t;const n=new Proxy(t,{deleteProperty:function(e,t){delete e[t]},set:function(t,n,r){const o=t[n];return!(t[n]=r,a._canNotify&&!1!==t.canNotify)||!(!a.observables||a.observables[n])||(a._notify({eventName:"change",object:a,target:t,action:"update",index:e,path:e+"."+n,oldValue:o,newValue:r,propertyName:n}),!0)}});return n}getItem(e){return this._array[e]}setItem(e,t){const a=this,n=a._array[e];a._array[e]=a._getItem(e,t),a._notify({eventName:"change",object:a._array,action:"update",index:e,removed:[n],addedCount:1})}get length(){return this._array.length}set length(e){const t=this;Types.isNumber(e)&&t._array&&t._array.length!==e&&t.splice(e,t._array.length-e)}toString(){const e=this;return e._array.toString()}toLocaleString(){const e=this;return e._array.toLocaleString()}concat(){const e=this;e._addArgs.index=e._array.length;const t=e._array.concat.apply(e._array,arguments);return new Smart.ObservableArray(t)}join(e){const t=this;return t._array.join(e)}pop(){const e=this;e._removeArgs.index=e._array.length-1,delete e[e._array.length-1];const t=e._array.pop();return e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}push(){const e=this;if(e._addArgs.index=e._array.length,1===arguments.length&&Array.isArray(arguments[0])){const t=arguments[0];for(let a=0,n=t.length;a<n;a++){const n=e._getItem(e._array.length,t[a]);e._array.push(n)}}else{const t=e._getItem(e._addArgs.index,arguments[0]);e._array.push.apply(e._array,[t])}return e._addArgs.addedCount=e._array.length-e._addArgs.index,e._notify(e._addArgs),e._notifyLengthChange(),e._array.length}_notifyLengthChange(){const e=this;if(e.canNotify){const t=e._createPropertyChangeData("length",e._array.length);e._notify(t)}}_createPropertyChangeData(e,t,a){return{eventName:"change",object:this,action:e,value:t,oldValue:a}}reverse(){const e=this;return e._array.reverse()}shift(){const e=this,t=e._array.shift();return e._removeArgs.index=0,e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}slice(e,t){const a=this;return a._array.slice(e,t)}sort(e){const t=this;return t._array.sort(e)}splice(e,t,a){const n=this,r=n._array.length;let o;if(a&&a.length)for(let r=0;r<a.length;r++)o=n._array.splice(e+r,t,a[r]);else o=n._array.splice.apply(n._array,arguments);if(!a)n._notify({eventName:"change",object:this,action:"remove",index:e,removed:o,addedCount:n._array.length>r?n._array.length-r:0});else{let t=n.canNotify;if(n.canNotify=!1,a.length)for(let t=0;t<a.length;t++)n.setItem(e+t,a[t]);else n.setItem(e,a);n.canNotify=t,n._notify({eventName:"change",object:this,action:"add",index:e,added:o,addedCount:n._array.length>r?n._array.length-r:0})}return n._array.length!==r&&n._notifyLengthChange(),o}unshift(){const e=this,t=e._array.length,a=e._array.unshift.apply(e._array,arguments);return e._addArgs.index=0,e._addArgs.addedCount=a-t,e._notify(this._addArgs),e._notifyLengthChange(),a}indexOf(e,t){const a=this,n=t?t:0;for(let r=n,o=a._array.length;r<o;r++)if(a._array[r]===e)return r;return-1}lastIndexOf(e,t){const a=this,n=t?t:a._array.length-1;for(let r=n;0<=r;r--)if(a._array[r]===e)return r;return-1}find(e,t){const a=this;return a._array.find(e,t)}findIndex(e,t){const a=this;return a._array.findIndex(e,t)}every(e,t){const a=this;return a._array.every(e,t)}some(e,t){const a=this;return a._array.some(e,t)}forEach(e,t){const a=this;a._array.forEach(e,t)}map(e,t){const a=this;return a._array.map(e,t)}filter(e,t){const a=this,n=a._array.filter(e,t);return n}reduce(e,t){const a=this;return t===void 0?a._array.reduce(e):a._array.reduce(e,t)}reduceRight(e,t){const a=this;return t===void 0?a._array.reduceRight(e):a._array.reduceRight(e,t)}}let x={};window[c]&&(x=window[c]),window[c]=function(t,a){let n=t;if(t){if(0<=t.indexOf("#")||0<=t.indexOf("."))return h[t]?h[t]:a?(h[t]=new a,e(t,h[t]),h[t]):void 0;if(a){if(ElementRegistry.tagNames[t]=a,ElementRegistry.lazyRegister){ElementRegistry.toRegister||(ElementRegistry.toRegister=[]);const e=Core.toCamelCase(n).replace(/[a-z]+/,"");return window[c][e]=a,void ElementRegistry.toRegister.push({tagName:n,element:a})}ElementRegistry.register(n,a)}}},window.addEventListener("load",function(){const e=window[c].Elements.tagNames;let t=[];for(let a in e){const n=e[a];let r=document.querySelectorAll("["+a+"]");for(let e=0;e<r.length;e++){const t=r[e];t instanceof HTMLDivElement&&(t.__proto__=n.prototype,t.created(),t.connectedCallback()),t.classList.add("smart-element-ready")}let o=n.name;"Item"===o&&(o="ListItem"),r=document.querySelectorAll("[is=\""+c.toLocaleLowerCase()+o+"\"]");for(let e=0;e<r.length;e++)t.push(r[e])}if(0<t.length){const e=e=>{let t=[],a=e.parentNode;for(;a&&9!==a.nodeType;)!0==a instanceof HTMLElement&&t.push(a),a=a.parentNode;return t};t.sort(function(t,a){let n=e(t).length,r=e(a).length;return n<r?1:n>r?-1:0});for(let e=0;e<t.length;e++){const a=t[e],n=a.getAttribute("is");let r;r="smartItem"===n?new window.smartListItem(a):new window[n](a),r.removeAttribute("is")}}});class Component{constructor(e,t){const a=this,n=this.name;let r=null;return e?r=new window[n](e,t):(r=new window[n],r._initProperties=t),a._element=r,r}get name(){return"Component"}get element(){return this._element}}class App{constructor(e){const t=this;t._id=e.id,e.id?t._appRoot=document.getElementById(t._id):t._id=window[c].Utilities.Core.createGUID(),e.selector&&(t._id=window[c].Utilities.Core.createGUID(),t._appRoot=document.querySelector(e.selector)),t._appRoot||(t._appRoot=document.body),t._appRoot.classList.add("smart-visibility-hidden");const a={};if(e.render){const t=e.render(),n=e.components,r=function(){const r=document.createDocumentFragment(),o=document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),i=document.createElementNS("http://www.w3.org/1999/xhtml","body"),l=document.createElement("div");o.documentElement.appendChild(i),i.appendChild(l),l.innerHTML=t;for(let e=0;e<n.length;e++){const t=n[e],r=t.name,i=Utilities.Core.toDash(r),s=o.querySelectorAll(r);t.tagName=i;for(let e=0;e<s.length;e++){const t=s[e],n=t.getAttribute("id")||window[c].Utilities.Core.createGUID(),o=document.createElement("div");o.id=n,l.insertBefore(o,t),a["#"+n]={name:r,properties:[],rendered:!1},t.parentNode.removeChild(t)}}r.appendChild(l);const s=document.querySelector(e.selector);s&&s.appendChild(r)};r()}t._template=e.template||{},t._data=e.data||{},t._components=a;const n=function(){t._addAttributeBindings(),t._renderForBindings(),t._addModelBindings(),t._observeData(),t.render(),t._appRoot.classList.remove("smart-visibility-hidden")};"complete"===document.readyState?n():window.addEventListener("load",n)}_addAttributeBindings(e,a){const n=this,r=new BindingModule,o=e?r.getBindings(e):r.getBindings(n._appRoot);a||(a="");const i=function(){return t(65536*(1+Math.random())).toString(16).substring(1)},l=function(e){const t=function(e){if(e.data){let t=e.node.id;for(let r in t||(e.node.id=t="id"+i()),e.data){const o=e.data[r];if("textContent"==r&&(e.node.parentNode.id?t=e.node.parentNode.id:(e.node.id="",e.node.parentNode.id=t)),o.isEvent){const e={};e[o.name]=o.value,n._addListenerBinding(t,e)}else{const e={};e[r]=a+o.name,n._addTemplateBinding(t,e)}}}};for(let a in t(e),e.children){const n=e.children[a];n.node&&n.node.getAttribute&&n.node.getAttribute("smart-for")&&null===n.node.getAttribute("smart-for-rendered")||(t(n),n.children&&l(n))}};l(o)}get template(){return this._template}set template(e){this._template=e,this.render()}get id(){return this._id}set id(e){this._id=e}get jsonData(){const e=this;return e.toJSON()}get formData(){const e=this,t=new FormData,a=e.toJSON();const n=function(e,a){for(let r in e){const o=e[r];if(Utilities.Types.isFunction(o))continue;else"object"!=typeof o||Array.isArray(o)||n(o,r);("object"!=typeof o||Array.isArray(o))&&(""===a?t.append(r,o):t.append(a+"."+r,o))}};return n(a,""),t}toJSON(){const e=this,t=function(e,a){for(let n in e){if(n.startsWith("_")||"notifyFn"==n||"canNotify"==n||"name"==n)continue;if("propertyName"==n||"toString"==n||"propertyIsEnumerable"==n||"valueOf"==n||"toLocaleString"==n)continue;if("hasOwnProperty"==n||"isPrototypeOf"==n)continue;const r=e[n];if("observableArray"===r.name){a[n]=r.toArray();continue}if("observable"===r.name){const e={};for(let a in r)if(!(a.startsWith("_")||"propertyIsEnumerable"==a||"notifyFn"==a||"canNotify"==a||"name"==a)&&!(a.startsWith("_")||"notifyFn"==a||"canNotify"==a||"name"==a)&&"propertyName"!=a&&"toString"!=a&&"valueOf"!=a&&"toLocaleString"!=a&&"hasOwnProperty"!=a&&"isPrototypeOf"!=a){if("object"==typeof r&&"object"==typeof r[a]&&!Utilities.Types.isFunction(r)){const o=t(r[a],{},n+"."+a);e[a]=o;continue}e[a]=r[a]}a[n]=e;continue}if("object"==typeof r&&!Utilities.Types.isFunction(r)){const e=t(r,{},n);a[n]=e;continue}a[n]=r}return a},a=t(e._data,{},"");return a}get data(){const e=this;return e._data||(e._data={}),e._data}set data(e){const t=this;t._data=e,t._observeData(),t.render()}_addTemplateBinding(e,t){const a=this;a.template["#"+e]?a.template["#"+e].bind?Object.assign(a.template["#"+e].bind,t):a.template["#"+e].bind=t:a.template["#"+e]={bind:t}}_addListenerBinding(e,t){const a=this;a.template["#"+e]?a.template["#"+e].listeners?Object.assign(a.template["#"+e].listeners,t):a.template["#"+e].listeners=t:a.template["#"+e]={listeners:t}}_updateDataFromBooleanElement(e,t){const a=this,n=t.checked,r=a._data[n];if(!(e.value&&"on"!==e.value))a._data[n]=e.checked;else if(!(Array.isArray(r)||"observableArray"===r.name))"radio"===e.type?e.checked&&(a._data[n]=e.value):e.checked?a._data[n]=e.value:a._data[n]="";else if(e.checked)r.push(e.value);else{const t=r.indexOf(e.value);0<=t&&r.splice(t,1)}}_updateDataFromNativeElement(e,t){const a=this;if("SELECT"===e.tagName&&e.addEventListener("change",function(){const n=t.value;let r=a._data[n];if(e.__updating=!0,Array.isArray(r)||"observableArray"===r.name){if(r=new ObservableArray,e.selectedOptions)for(let t=0;t<e.selectedOptions.length;t++){const a=e.selectedOptions[t];r.push(a.value)}a._data[n]=r}else a._data[n]=e.value;e.__updating=!1}),"INPUT"===e.tagName||"TEXTAREA"===e.tagName){e.addEventListener("change",function(){e.__updating=!0,n?a._updateDataFromBooleanElement(e,t):a._data.value=e.value,e.__updating=!1});let n="checkbox"===e.type||"radio"===e.type;n||e.addEventListener("keyup",function(){const n=t.value;a._data[n]=e.value})}}_addModelBindings(e){const t=this,a=e?e.querySelectorAll("[smart-model]"):t._appRoot.querySelectorAll("[smart-model]");for(let n=0;n<a.length;n++){const e=a[n];let r={value:e.getAttribute("smart-model")};"list"===e.type&&(r={selectedValues:e.getAttribute("smart-model")}),("checkbox"===e.type||"radio"===e.type)&&(r={checked:e.getAttribute("smart-model")}),e.id||(e.id="id"+Smart.Utilities.Core.createGUID().replace(/-/ig,"")),t._updateDataFromNativeElement(e,r),t._addTemplateBinding(e.id,r)}}_renderForBindings(e){const t=this,a=t._appRoot.querySelectorAll("[smart-for]");for(let n=0;n<a.length;n++){const e=a[n],r=e.getAttribute("smart-for"),o=t._data[r];e.id||(e.id="id"+Smart.Utilities.Core.createGUID().replace(/-/ig,"")),e.setAttribute("smart-for-rendered","");const i=null!==e.getAttribute("smart-for-self"),l=i?e.parentNode.querySelectorAll(".smart-for-item-"+e.id):e.querySelectorAll(".smart-for-item-"+e.id);for(let e=0;e<l.length;e++)t.template[l[e].id]&&delete t.template[l[e].id],l[e].remove();const s=i?e:e.firstElementChild,d=document.createDocumentFragment();for(let t=0;t<o.length;t++){const a=s.cloneNode(!0);a.style.display="",a.id=e.id+"_"+t,a.classList.add("smart-for-item"),a.classList.add("smart-for-item-"+e.id),a.removeAttribute("smart-for"),d.appendChild(a)}s.style.display="none",i?e.parentNode.insertBefore(d,e.nextSibling):e.appendChild(d);let p=t._appRoot.querySelectorAll(".smart-for-item-"+e.id);for(let e=0;e<p.length;e++){const a=p[e];t._addAttributeBindings(a,r+"."+e+".")}}e&&0<a.length&&t.render()}notify(e){const t=this;t.notifyFn=function(a){a.owner=t,e(a)}}_notify(e){const t=this;if("length"===e.propertyName)return;t.notifyFn&&t.notifyFn(e);let a=e.propertyName;for(let n in e.object&&(a=e.object.propertyName),t.template){const e=t.template[n];let r=null;for(let t in e.bind)if("function"!=typeof e.bind[t]&&0<=e.bind[t].indexOf(a)){r=t;break}r&&t._setPropertyFromData(e,r)}t._renderForBindings(!0)}_observeData(){const e=this;e._data=new window[c].Observable(e._data),e._data.canNotify=!1,e._data.notify(e._notify.bind(e));const t=function(a){for(let n in a.canNotify=!1,a){if("function"==typeof a[n]){a[n]=a[n].bind(a);continue}if(n.startsWith("_")||"notifyFn"==n||"canNotify"==n||"name"==n)continue;const r=a[n];Array.isArray(r)?(a[n]=new Smart.ObservableArray(a[n]),a[n].canNotify=!1,a[n].notify(e._notify.bind(e)),a[n].canNotify=!0,a[n].propertyName=n):"object"==typeof r&&r.constructor===Smart.DataAdapter?a[n].propertyName=n:"object"==typeof r&&r instanceof Date?a[n].propertyName=n:"object"==typeof r&&(a[n]=new Smart.Observable(a[n]),a[n].canNotify=!1,a[n].notify(e._notify.bind(e)),a[n].canNotify=!0,a[n].propertyName=n,t(a[n]))}a.canNotify=!0};for(let a in e._data){if("function"==typeof e._data[a]){e._data[a]=e._data[a].bind(e._data);continue}if(a.startsWith("_")||"notifyFn"==a||"canNotify"==a||"name"==a)continue;const n=e._data[a];Array.isArray(n)?(e._data[a]=new Smart.ObservableArray(e._data[a]),e._data[a].canNotify=!1,e._data[a].notify(e._notify.bind(e)),e._data[a].canNotify=!0,e._data[a].propertyName=a):"object"==typeof n&&n.constructor===Smart.DataAdapter?e._data[a].propertyName=a:"object"==typeof n&&n instanceof Date?e._data[a].propertyName=a:"object"==typeof n&&(e._data[a]=new Smart.Observable(e._data[a]),e._data[a].canNotify=!1,e._data[a].notify(e._notify.bind(e)),e._data[a].canNotify=!0,e._data[a].propertyName=a,t(e._data[a]))}e._data.canNotify=!0}_setPropertyFromData(e,t){const a=this;if(e.element.__updating||!e.bind)return;const n=e.bind[t];if("function"==typeof n)return;const r=n?n.split("."):[];let o=a._data;for(let a=0;a<r.length;a++){const e=r[a];if("string"==typeof o)break;if(void 0===o[e])break;o=o[e]}if(e.bind.computed){const t={item:e,name:n,value:o};e.bind.computed(t),t.value!==o&&(o=t.value)}if(e.element.__updatingProperties=!0,n&&void 0!==o){if("observableArray"===o.name)e.element[t]="checkbox"===e.element.type?0<=o.indexOf(e.element.value):o.toArray().slice(0);else if("observable"===o.name){const a=function(e){let t=null;for(let r in e){if("function"==typeof e[r])continue;if(r.startsWith("_")||"notifyFn"==r||"canNotify"==r||"name"==r)continue;const o=e[r];if(Array.isArray(o))continue;else if("object"==typeof o&&o.constructor===Smart.DataAdapter)continue;else"object"==typeof o&&(t=a(e[r]));if(r===n){t=o;break}if(t)return t}return t},r=a(o);e.element[t]=r?r:o}else e.element[t]="radio"===e.element.type?e.element.value===o:o;a._components[e.selector]&&!a._components[e.selector].rendered&&(a._components[e.selector].properties[t]=o)}else e.properties&&(e.element[t]=e.properties[t],a._components[e.selector]&&!a._components[e.selector].rendered&&(a._components[e.selector].properties[t]=e.properties[t]));e.element.__updatingProperties=!1}render(){const e=this;for(let t in e.template){const a=e.template[t],n=a.element?a.element:document.querySelector(t),r=a.properties,o=a.listeners,i=a.bind;if(!n)continue;for(let o in a.selector=t,a.element=n,n._properties||(n._properties=[]),r){const t=n._properties?n._properties[o]:null;t&&(t.notify=!0),e._setPropertyFromData(a,o)}for(let t in i){const r=n._properties?n._properties[t]:null;r&&(r.notify=!0),e._setPropertyFromData(a,t)}if(e._components&&e._components[t]&&!1===e._components[t].rendered){const n=e._components[t];a.element=n.instance=new window[n.name](t,n.properties),n.rendered=!0}const l=function(t){const n=a.element;for(let a in o)n.$||(n.$=Smart.Utilities.Extend(n)),n.$[t](a,function(t){const n=o[a];if(0<=n.indexOf(".")){const a=n.split(".");let r=e._data[a[0]];for(let e=1;e<a.length;e++)r=r[a[e]];void 0!==r&&r(t)}else e._data[n]&&e._data[n](t)});for(let a in i){const r=n._properties?n._properties[a]:null;if(r){const o=function(t){if(!n.__updatingProperties){n.__updating=!0;const r=function(e){if("radio"===n.type){const t=n.parentNode.querySelectorAll("[type=\"radio\"]");for(let a=0;a<t.length;a++)t[a].__updating=e}};r(!0);const o=i[a];if("radio"===n.type||"toggle"===n.type||"checkbox"===n.type)e._updateDataFromBooleanElement(n,i);else{(function(e,t,a){var n;for(n=0;n<t.length-1;n++)e=e[t[n]];e[t[n]]=a})(e._data,o.split("."),t.detail.value)}n.__updating=!1,r(!1)}};"textarea"===n.type&&n.$[t]("input.keyup",function(e){const t=new CustomEvent("keyup",{detail:{originalEvent:e,value:n.$.input.value}});o(t)}),n.$[t](r.attributeName+"-changed",function(e){o(e)})}else;}};l("unlisten"),l("listen"),n.onAttached=function(){l("listen")},n.onDetached=function(){l("unlisten")}}}}Object.assign(window[c],{Elements:ElementRegistry,Modules:[ErrorModule,LocalizationModule,BindingModule],BaseElement:BaseCustomElement,Utilities:Utilities,Import:function(e,t){let a=0;const n=function(e,t){return new Promise(a=>{const n=document.createElement("script");n.src=e,n.onload=a;for(let e=0;e<document.head.children.length;e++){const n=document.head.children[e];if(n.src&&0<=n.src.toString().indexOf(t))return void a()}document.head.appendChild(n)})};return new Promise(r=>{const o=Utilities.Core.getScriptLocation(),i=function(t){if(e[t]){const l=o+"/"+e[t];n(l,e[t]).then(function(){a++,a===e.length&&r(),i(t+1)})}};if(t)for(let t=0;t<e.length;t++){const i=o+"/"+e[t];n(i,e[t]).then(function(){a++,a===e.length&&r()})}else i(0)})},ObservableArray:ObservableArray,Observable:Observable,App:App,Component:Component,Theme:x.Theme||"",EnableShadowDOM:!1,BaseUrl:"./",StyleBaseUrl:"/styles/default/scoped/",Version:"5.0.0",License:"Evaluation"});let E=window[c].Theme;Object.defineProperty(window[c],"Theme",{configurable:!1,enumerable:!0,get(){return E},set(e){const t=E;E=e,b.fireEvent("theme-changed",{oldValue:t,newValue:e},{bubbles:!0,cancelable:!0})}}),window[c]("smart-base-element",window[c].BaseElement),window[c]("smart-content-element",class extends window[c].BaseElement{static get properties(){return{content:{type:"any",reflectToAttribute:!1},innerHTML:{type:"string",reflectToAttribute:!1}}}template(){return"<div inner-h-t-m-l='[[innerHTML]]'></div>"}ready(){super.ready();const e=this;e.applyContent()}clearContent(){for(const e=this;e.$.content.firstChild;)e.$.content.removeChild(e.$.content.firstChild)}applyContent(){const e=this;if(void 0===e.content)return void(e.content=e.$.content);if(""===e.content||null===e.content)return void e.clearContent();if(e.content instanceof HTMLElement)return e.clearContent(),void e.$.content.appendChild(e.content);const t=document.createDocumentFragment();let a=document.createElement("div");t.appendChild(a),e.content instanceof HTMLElement?a.appendChild(e.content):a.innerHTML=e.content;let n=Array.from(a.childNodes);a.parentNode.removeChild(a);for(let e=0;e<n.length;e++)t.appendChild(n[e]);e.clearContent(),e.$.content.appendChild(t)}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;t===a||("innerHTML"===e&&(n.content=a,n.applyContent(),n.innerHTML=n.content=Utilities.Core.html(n.$.content)),"content"===e&&n.applyContent())}}),window[c]("smart-scroll-viewer",class extends window[c].ContentElement{static get properties(){return{horizontalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},verticalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]}}}static get listeners(){return{"horizontalScrollBar.change":"_horizontalScrollbarHandler","verticalScrollBar.change":"_verticalScrollbarHandler",wheel:"_mouseWheelHandler"}}template(){return`<div id="container" class="smart-container">
                      <div id="scrollViewerContainer" class ="smart-scroll-viewer-container">
                        <div id="scrollViewerContentContainer" inner-h-t-m-l=\'[[innerHTML]]\' class ="smart-scroll-viewer-content-container">
                            <content></content>
                        </div>
                      </div>
                      <smart-scroll-bar id="verticalScrollBar" animation="[[animation]]" disabled="[[disabled]]" orientation="vertical"></smart-scroll-bar>
                      <smart-scroll-bar id="horizontalScrollBar" animation="[[animation]]" disabled="[[disabled]]"></smart-scroll-bar>
                  </div>`}appendChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.appendChild(e)}}removeChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.removeChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.removeChild(e)}}removeAll(){const e=this;e.isCompleted&&(e.$.scrollViewerContentContainer.innerHTML="")}_horizontalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.left=-t.scrollLeft+"px",e.stopPropagation(),t.onHorizontalChange&&t.onHorizontalChange(e)}_verticalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.top=-t.scrollTop+"px",e.stopPropagation(),t.onVerticalChange&&t.onVerticalChange(e)}_mouseWheelHandler(e){const t=this;!t.disabled&&(t.computedHorizontalScrollBarVisibility||t.computedVerticalScrollBarVisibility)&&(t.computedVerticalScrollBarVisibility?(e.stopPropagation(),e.preventDefault(),0<t.scrollHeight&&t.scrollTo(t.scrollTop+t._getScrollCoefficient(e,t.offsetHeight))):t.computedHorizontalScrollBarVisibility&&(e.stopPropagation(),e.preventDefault(),0<t.scrollWidth&&t.scrollTo(void 0,t.scrollLeft+t._getScrollCoefficient(e,t.offsetWidth))))}_getScrollCoefficient(e,t){const a=e.deltaMode,n=r(e.deltaY);let o;return 0===a?n<100/3?o=n:o=t:1===a?1>n?o=n*(100/3):o=t:2===a&&(o=t),0>e.deltaY?-o:o}applyContent(){const e=this;super.applyContent(),e.refresh()}get computedHorizontalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?!e._scrollView.hScrollBar.$.hasClass("smart-hidden"):null}get computedVerticalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?!e._scrollView.vScrollBar.$.hasClass("smart-hidden"):null}scrollTo(e,t){const a=this;a._scrollView&&(e!==void 0&&a._scrollView.scrollTo(e),t!==void 0&&a._scrollView.scrollTo(t,!1))}refreshScrollBarsVisibility(){const e=this;e._scrollView&&(e._scrollView.hScrollBar.disabled=e.disabled,e._scrollView.vScrollBar.disabled=e.disabled,"disabled"===e.horizontalScrollBarVisibility&&(e._scrollView.hScrollBar.disabled=!0),"disabled"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.disabled=!0),0<e.scrollWidth?e._scrollView.hScrollBar.$.removeClass("smart-hidden"):"visible"!==e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),0<e.scrollHeight?e._scrollView.vScrollBar.$.removeClass("smart-hidden"):"visible"!==e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"hidden"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),"hidden"===e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"visible"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.removeClass("smart-hidden"),"visible"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.$.removeClass("smart-hidden"),!e.disabled&&(e._scrollView.vScrollBar.disabled=0>=e.scrollHeight)),e.computedHorizontalScrollBarVisibility&&e.computedVerticalScrollBarVisibility?(e._scrollView.hScrollBar.$.addClass("bottom-corner"),e._scrollView.vScrollBar.$.addClass("bottom-corner")):(e._scrollView.hScrollBar.$.removeClass("bottom-corner"),e._scrollView.vScrollBar.$.removeClass("bottom-corner")))}ready(){super.ready();const e=this;e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar),e.refresh()}refresh(){function e(){const e=a.$.scrollViewerContentContainer.offsetWidth-a.$.scrollViewerContainer.offsetWidth;return 0<e&&"hidden"!==a.horizontalScrollBarVisibility||"visible"===a.horizontalScrollBarVisibility?a.$.scrollViewerContainer.classList.add("hscroll"):a.$.scrollViewerContainer.classList.remove("hscroll"),e}function t(){let e;if(Smart.Utilities.Core.Browser.Safari){const t=a.$.scrollViewerContentContainer.getBoundingClientRect().height,n=a.$.scrollViewerContainer.getBoundingClientRect().height;e=t&&n?parseInt(t)-parseInt(n):a.$.scrollViewerContentContainer.offsetHeight-a.$.scrollViewerContainer.offsetHeight}else e=a.$.scrollViewerContentContainer.offsetHeight-a.$.scrollViewerContainer.offsetHeight;return 0<e&&"hidden"!==a.verticalScrollBarVisibility||"visible"===a.verticalScrollBarVisibility?a.$.scrollViewerContainer.classList.add("vscroll"):a.$.scrollViewerContainer.classList.remove("vscroll"),e}const a=this;if(a.$.scrollViewerContentContainer){let n=a.scrollWidth,r=a.scrollHeight;a.scrollWidth=e(),a.scrollHeight=t(),a.scrollHeight&&r===a.scrollHeight||(a.scrollWidth=e()),a.scrollWidth&&n===a.scrollWidth||(a.scrollHeight=t()),a.computedVerticalScrollBarVisibility&&(a.scrollHeight+=a._scrollView.hScrollBar.offsetHeight),a.computedHorizontalScrollBarVisibility&&(a.scrollWidth+=a._scrollView.vScrollBar.offsetWidth)}}attached(){const e=this;super.attached(),e._scrollView||(e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar))}detached(){const e=this;super.detached(),e._scrollView&&(e._scrollView.unlisten(),delete e._scrollView)}get scrollWidth(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?1===e._scrollView.hScrollBar.max&&"visible"===e.horizontalScrollBarVisibility?0:e._scrollView.hScrollBar.max:-1}set scrollWidth(e){const t=this;0>e&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(t._scrollView.hScrollBar.max=0===e&&"visible"===t.horizontalScrollBarVisibility?0:e,t.refreshScrollBarsVisibility())}get scrollHeight(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?1===e._scrollView.vScrollBar.max&&"visible"===e.verticalScrollBarVisibility?0:e._scrollView.vScrollBar.max:0}set scrollHeight(e){const t=this;0>e&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(t._scrollView.vScrollBar.max=0===e&&"visible"===t.verticalScrollBarVisibility?1:e,t.refreshScrollBarsVisibility())}get scrollLeft(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?e._scrollView.hScrollBar.value:0}set scrollLeft(e){const t=this;0>e&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(t._scrollView.hScrollBar.value=e)}get scrollTop(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?e._scrollView.vScrollBar.value:0}set scrollTop(e){const t=this;0>e&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(t._scrollView.vScrollBar.value=e)}propertyChangedHandler(e,t,a){const n=this;super.propertyChangedHandler(e,t,a),"animation"!==e&&"theme"!==e&&n.refresh()}}),window[c].Utilities.Assign("PositionDetection",class{constructor(e,a,n,r){const o=this;if(a){const n="dropDown"+t(65536*(1+Math.random())).toString(16).substring(1);a.id=n,e.setAttribute("aria-controls",n)}o.context=e,o.dropDown=a,o.defaultParent=n,o.closeMethod=r}handleAutoPositioning(){function e(){o=n(e),("auto"!==a.dropDownPosition||a.disabled||null===a.parentElement)&&cancelAnimationFrame(o);const i=Date.now();200<=i-r&&(t.scrollHandler(),r=Date.now())}const t=this,a=t.context;if("auto"!==a.dropDownPosition||a.disabled)return;const n=(()=>window.requestAnimationFrame)();let r=Date.now(),o;return o=n(e)}checkBrowserBounds(e){const t=this.context;"auto"!==t.dropDownPosition||t.disabled||("vertically"===e?this.checkBrowserBoundsVertically():"horizontally"===e?this.checkBrowserBoundsHorizontally():(this.checkBrowserBoundsVertically(),this.checkBrowserBoundsHorizontally()))}checkBrowserBoundsHorizontally(){const e=this.context,t=this.dropDown;let a=0,n;Core.isMobile||window.innerWidth===document.documentElement.clientWidth||(a=window.innerWidth-document.documentElement.clientWidth),null===e._dropDownParent?t.style.left="":n=!0;const o=window.innerWidth-a;let i=e.getBoundingClientRect().left;if(0>i&&(t.style.left=(n?0:r(i))+"px",i=parseFloat(t.style.left)),i+t.offsetWidth>o){const e=i-r(o-i-t.offsetWidth),l=s(0,document.documentElement.scrollWidth-(window.innerWidth+document.documentElement.scrollLeft-a));t.style.left=(n?e:s(0,e-i)-l)+"px",window.innerWidth===document.documentElement.clientWidth&&(t.style.left=parseFloat(t.style.left)+a+"px"),n&&window.innerHeight===document.documentElement.clientHeight&&this.positionDropDown(!0)}}checkBrowserBoundsVertically(e){const t=this.context,a=this.dropDown,n=t._dropDownListPosition;e||(e=t.getBoundingClientRect());0===e.height||(t._dropDownListPosition=0<=document.documentElement.clientHeight-r(e.top+e.height+a.offsetHeight)?"bottom":0<=e.top-a.offsetHeight?"top":"overlay-center",this.updatePositionAttribute(n,t._dropDownListPosition))}scrollHandler(){const e=this.context;if(e.parentElement){const t=e.getBoundingClientRect();if(t.top!==e._positionTop){const a=e._dropDownListPosition;this.checkBrowserBoundsVertically(t),e._dropDownListPosition!==a&&this.positionDropDown(),e._positionTop=t.top}}}getDropDownParent(e){const t=this.context,a=this.dropDown;let n=t.dropDownAppendTo;t._positionedParent=null,null===n?t._dropDownParent=null:"body"===n||n===document.body?t._dropDownParent=document.body:n instanceof HTMLElement?t._dropDownParent=n:"string"==typeof n?(n=document.getElementById(n),n instanceof HTMLElement?t._dropDownParent=n:(t.dropDownAppendTo=null,t._dropDownParent=null)):(t.dropDownAppendTo=null,t._dropDownParent=null);let r=t._dropDownParent;if(null!==r){for(;"static"===window.getComputedStyle(r).position&&r!==document.body;)r=r.parentElement;t._positionedParent=r===document.body?null:r,a&&(a.setAttribute("animation",t.animation),""!==t.theme&&a.$.addClass(t.theme),e&&(t._dropDownParent.appendChild(a),a.$.addClass("smart-drop-down-repositioned")),-1===t.detachedChildren.indexOf(a)&&t.detachedChildren.push(a))}}dropDownAppendToChangedHandler(){const e=this.context,t=this.dropDown,a=e._dropDownParent;this.getDropDownParent();e._dropDownParent===a||(e[this.closeMethod](),["left","top","font-size","font-family","font-style","font-weight"].forEach(e=>t.style[e]=null),null===e._dropDownParent?(this.defaultParent.appendChild(t),t.$.removeClass("smart-drop-down-repositioned")):(e._dropDownParent.appendChild(t),t.$.addClass("smart-drop-down-repositioned")))}dropDownPositionChangedHandler(){const e=this;e.dropDown.style.transition="none",e.context[e.closeMethod](),e.setDropDownPosition(),e.handleAutoPositioning()}dropDownAttached(e){const t=this.context;null===t._dropDownParent||(t._dropDownParent.appendChild(this.dropDown),this.handleAutoPositioning(),e&&t[e]())}dropDownDetached(){const e=this.context;null!==e._dropDownParent&&document.body.contains(this.dropDown)&&document.body.contains(e._dropDownParent)&&e._dropDownParent.removeChild(this.dropDown)}setDropDownPosition(){const e=this.context,t=e.dropDownPosition,a=e._dropDownListPosition;"auto"===t?this.checkBrowserBounds():e._dropDownListPosition=t,this.updatePositionAttribute(a,e._dropDownListPosition)}updatePositionAttribute(e,t){const a=this.context,n=this.dropDown;a.$.dropDownButton&&!a.$.dropDownButton.hasAttribute(t)&&(a.$.dropDownButton.removeAttribute(e),a.$.dropDownButton.setAttribute(t,"")),n.hasAttribute(t)||(n.style.transition="none",n.removeAttribute(e),n.setAttribute(t,""),requestAnimationFrame(function(){n.style.transition=null}))}positionDropDown(e){const t=this.context,a=this.dropDown;if(!t.opened||null===t._dropDownParent)return;const n=t.getBoundingClientRect();let r,o;if(this.customPositionDropDown){const e=this.customPositionDropDown(n);r=e.left,o=e.top}else switch(r=n.left,o=n.top,t._dropDownListPosition){case"bottom":o+=t.$.container.offsetHeight-1;break;case"center-bottom":o+=t.$.container.offsetHeight-1,r+=t.offsetWidth-a.offsetWidth/2;break;case"center-top":o-=a.offsetHeight-1,r+=t.offsetWidth-a.offsetWidth/2;break;case"top":o-=a.offsetHeight-1;break;case"overlay-bottom":break;case"overlay-center":o-=a.offsetHeight/2-t.offsetHeight/2;break;case"overlay-top":o-=a.offsetHeight-t.offsetHeight;}const i=this.getDropDownOffset();a.style.top=o+i.y+"px";e||(a.style.left=r+i.x+"px")}getDropDownOffset(){const e=this.context._positionedParent;let t,a;if(e){const n=e.getBoundingClientRect();t=-n.left,a=-n.top}else t=window.pageXOffset,a=window.pageYOffset;return{x:t,y:a}}placeOverlay(){const e=this.context;if(e.dropDownOverlay&&!e._overlay){const t=document.createElement("div");t.classList.add("smart-drop-down-overlay"),t.style.width=document.documentElement.scrollWidth+"px",t.style.height=document.documentElement.scrollHeight+"px",document.body.appendChild(t),e._overlay=t}}removeOverlay(e){function t(){0<a.dropDown.getBoundingClientRect().height?requestAnimationFrame(t):(document.body.removeChild(n._overlay),delete n._overlay)}const a=this,n=a.context;n._overlay&&(n.hasAnimation&&e?requestAnimationFrame(t):(document.body.removeChild(n._overlay),delete n._overlay))}})})();