smart-webcomponents-react
Version:
[](https://jqwidgets.com/license/)
6 lines (4 loc) • 209 kB
JavaScript
/* Smart UI v23.0.8 (2025-05-13)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */ //
!function(){if(void 0===typeof window)return;const e="21.0.0",t=[];let i="Smart";if(window[i]&&window[i].Version){if(window[i].Version===e)return;if(window[i].Version!==e)i+=e;else{let e=2;for(;window[i];)i+=e.toString(),e++}}const n=navigator.userAgent.indexOf("Edge")>-1&&navigator.appVersion.indexOf("Edge")>-1;document.elementsFromPoint||(document.elementsFromPoint=document.msElementsFromPoint);class r{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){return e&&("object"==typeof e||this.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,i=["Boolean","Number","String","Function","Array","Date","Object"].find((i=>{if(t["is"+i](e))return i}));return i?i.toLowerCase():void 0}}class a{static animate(e,t,n,r){const a=e;if(!a||a instanceof HTMLElement==0)return;if(0===a.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple"),e.setAttribute("role","presentation");let t=!0,n=null;if(window[i].EnableShadowDOM&&a.enableShadowDOM&&!0!==a.isInShadowDOM){for(let e=0;e<a.shadowRoot.host.shadowRoot.children.length;e++)"link"!==a.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(n=a.shadowRoot.host.shadowRoot.children[e]);a.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else n=a.firstElementChild;t&&(n&&!n.noRipple&&n.offsetHeight>0?n.appendChild(e):a.appendChild(e))}let s=null;if(s=window[i].EnableShadowDOM&&a.shadowRoot?a.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):a.getElementsByClassName("smart-ripple")[0],!s)return;s.innerHTML="",s.classList.remove("smart-animate"),s.style.height=s.style.width=Math.max(a.offsetHeight,a.offsetWidth)+"px";const o=window.getComputedStyle(s.parentElement),l=parseInt(o.borderLeftWidth)||0,c=parseInt(o.borderTopWidth)||0,d=a.getBoundingClientRect(),u=t-(d.left+window.pageXOffset)-s.offsetWidth/2-l,p=n-(d.top+window.pageYOffset)-s.offsetHeight/2-c;s.style.left=u+"px",s.style.top=p+"px",s.classList.add("smart-animate"),s.addEventListener("animationend",(function e(){s.parentElement&&s.parentElement.removeChild(s),r&&r(),s.removeEventListener("animationend",e),s.removeEventListener("animationcancel",e)})),s.addEventListener("animationcancel",(function e(){s.parentElement&&s.parentElement.removeChild(s),r&&r(),s.removeEventListener("animationcancel",e),s.removeEventListener("animationend",e)}))}}class s{static easeInQuad(e,t,i,n){return i*(e/=n)*e+t}static easeOutQuad(e,t,i,n){return-i*(e/=n)*(e-2)+t}static easeInOutQuad(e,t,i,n){return(e/=n/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t}static easeInCubic(e,t,i,n){return i*(e/=n)*e*e+t}static easeOutCubic(e,t,i,n){return i*((e=e/n-1)*e*e+1)+t}static easeInOutCubic(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}static easeInQuart(e,t,i,n){return i*(e/=n)*e*e*e+t}static easeOutQuart(e,t,i,n){return-i*((e=e/n-1)*e*e*e-1)+t}static easeInOutQuart(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e+t:-i/2*((e-=2)*e*e*e-2)+t}static easeInQuint(e,t,i,n){return i*(e/=n)*e*e*e*e+t}static easeOutQuint(e,t,i,n){return i*((e=e/n-1)*e*e*e*e+1)+t}static easeInOutQuint(e,t,i,n){return(e/=n/2)<1?i/2*e*e*e*e*e+t:i/2*((e-=2)*e*e*e*e+2)+t}static easeInSine(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t}static easeOutSine(e,t,i,n){return i*Math.sin(e/n*(Math.PI/2))+t}static easeInOutSine(e,t,i,n){return-i/2*(Math.cos(Math.PI*e/n)-1)+t}static easeInExpo(e,t,i,n){return 0===e?t:i*Math.pow(2,10*(e/n-1))+t}static easeOutExpo(e,t,i,n){return e===n?t+i:i*(1-Math.pow(2,-10*e/n))+t}static easeInOutExpo(e,t,i,n){return 0===e?t:e===n?t+i:(e/=n/2)<1?i/2*Math.pow(2,10*(e-1))+t:i/2*(2-Math.pow(2,-10*--e))+t}static easeInCirc(e,t,i,n){return-i*(Math.sqrt(1-(e/=n)*e)-1)+t}static easeOutCirc(e,t,i,n){return i*Math.sqrt(1-(e=e/n-1)*e)+t}static easeInOutCirc(e,t,i,n){return(e/=n/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+t:i/2*(Math.sqrt(1-(e-=2)*e)+1)+t}static easeInElastic(e,t,i,n){let r=1.70158,a=0,s=i;return 0===e?t:1==(e/=n)?t+i:(a||(a=.3*n),s<Math.abs(i)?(s=i,r=a/4):r=a/(2*Math.PI)*Math.asin(i/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*n-r)*(2*Math.PI)/a)+t)}static easeOutElastic(e,t,i,n){let r=1.70158,a=0,s=i;return 0===e?t:1==(e/=n)?t+i:(a||(a=.3*n),s<Math.abs(i)?(s=i,r=a/4):r=a/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*n-r)*(2*Math.PI)/a)+i+t)}static easeInOutElastic(e,t,i,n){let r=1.70158,a=0,s=i;return 0===e?t:2==(e/=n/2)?t+i:(a||(a=n*(.3*1.5)),s<Math.abs(i)?(s=i,r=a/4):r=a/(2*Math.PI)*Math.asin(i/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*n-r)*(2*Math.PI)/a)*-.5+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*n-r)*(2*Math.PI)/a)*.5+i+t)}static easeInBack(e,t,i,n,r){return void 0===r&&(r=1.70158),i*(e/=n)*e*((r+1)*e-r)+t}static easeOutBack(e,t,i,n,r){return void 0===r&&(r=1.70158),i*((e=e/n-1)*e*((r+1)*e+r)+1)+t}static easeInOutBack(e,t,i,n,r){return void 0===r&&(r=1.70158),(e/=n/2)<1?i/2*(e*e*((1+(r*=1.525))*e-r))+t:i/2*((e-=2)*e*((1+(r*=1.525))*e+r)+2)+t}static easeInBounce(e,t,i,n){return i-this.easeOutBounce(n-e,0,i,n)+t}static easeOutBounce(e,t,i,n){return(e/=n)<1/2.75?i*(7.5625*e*e)+t:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+t:i*(7.5625*(e-=2.625/2.75)*e+.984375)+t}static easeInOutBounce(e,t,i,n){return e<n/2?.5*this.easeInBounce(2*e,0,i,n)+t:.5*this.easeOutBounce(2*e-n,0,i,n)+.5*i+t}}class o{static get isMobile(){const e=/(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());return e||["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}static get Browser(){let e;const t=function(t){let i=t.indexOf(e);if(-1===i)return;const n=t.indexOf("rv:");return"Trident"===e&&-1!==n?parseFloat(t.substring(n+3)):parseFloat(t.substring(i+e.length+1))};let i={};return i[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 i=0;i<t.length;i++){let n=t[i].string;if(e=t[i].subString,-1!==n.indexOf(t[i].subString))return t[i].identity}return"Other"}()]=!0,i.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",i}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){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}static escapeHTML(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(e=>t[e]))}static sanitizeHTML(e){if(e&&(e.indexOf("onclick")>=0||e.indexOf("onload")>=0||e.indexOf("onerror")>=0))return this.escapeHTML(e);const t=new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>","ig");return String(e).replace(t,(e=>this.escapeHTML(e)))}static createGUID(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getScriptLocation(){return"./"!==window[i].BaseUrl?window[i].BaseUrl: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="(",i=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",i="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let n=e.stack.split(t);return n=n[1],n=n.split(i)[0],n=n.split(":"),n.splice(-2,2),n=n.join(":"),n.replace("/smart.element.js","")}()}static CSSVariablesSupport(){return window.CSS&&window.CSS.supports&&window.CSS.supports("(--fake-var: 0)")}static assign(e,t){const i=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let n=Object.assign({},e);return i(e)&&i(t)&&Object.keys(t).forEach((r=>{i(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 i=this;let n="",r=e.childNodes;if(!t){for(let e,t=0,a=r.length;t<a&&(e=r[t]);t++){const t=["strong"];if(e instanceof HTMLElement||e.tagName&&t.indexOf(e.tagName.toLowerCase())>=0){const t=e.tagName.toLowerCase(),r=e.attributes;let a="<"+t;for(let e,t=0;e=r[t];t++)a+=" "+e.name+'="'+e.value.replace(/[&\u00A0"]/g,y.Core.escapeHTML)+'"';a+=">",["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][t]&&(n+=a),n=n+a+i.html(e)+"</"+t+">"}else{if(8===e.nodeType)continue;n+=e.textContent.replace(/[&\u00A0<>]/g,y.Core.escapeHTML)}}return n}{const i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;e.innerHTML=t.replace(i,"<$1></$2>")}}}let l=[];class c{static watch(e){switch(e.nodeName.toLowerCase()){case"smart-grid":case"smart-kanban":case"smart-table":case"smart-pivot-table":case"smart-scheduler":case"smart-tabs":case"smart-card-view":case"smart-list-box":case"smart-combo-box":case"smart-drop-down-list":case"smart-calendar":case"smart-gauge":case"smart-numeric-text-box":case"smart-menu":case"smart-tree":l.push(e);break;default:return}c.start()}static start(){c.isStarted||(c.isStarted=!0,c.interval&&clearInterval(c.interval),0===l.length||document.hidden?c.isStarted=!1:c.interval=setInterval((function(){c.observe()}),100))}static stop(){c.isStarted=!1,c.interval&&clearInterval(c.interval)}static observeElement(e){const t=e;if("test"===window.Smart.Mode||document.hidden)return void(c.interval&&clearInterval(c.interval));let i=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],a=n.startsWith("--")?i.getPropertyValue(n):i[n];t._styleInfo[n]=a}return}if(e.isHidden||"none"!==i.display&&(0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0)),e.isHidden){if(e.visibilityChangedHandler(),e.isHidden)return;n=!1}let a=[];for(let e=0;e<r.length;e++){const n=r[e],s=n.startsWith("--")?i.getPropertyValue(n):i[n];t._styleInfo[n]!==s&&(a[n]={oldValue:t._styleInfo[n],value:s},a.length++),t._styleInfo[n]=s}a.length>0&&(t.$.fireEvent("styleChanged",{styleProperties:a},{bubbles:!1,cancelable:!0}),a.display&&n&&t.$.fireEvent("resize",t,{bubbles:!1,cancelable:!0}))}static observe(){for(let e=0;e<l.length;e++){const t=l[e];this.observeElement(t)}}static unwatch(e){c.stop();const t=l.indexOf(e);-1!==t&&l.splice(t,1),c.start()}}let d=[];const u=[],p=["resize","down","up","move","tap","taphold","swipeleft","swiperight","swipetop","swipebottom"];class m{constructor(e){const t=this;t.target=e,t.$target=new g(e),t.$document=e.$document?e.$document:new g(document),t.id=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase();let i={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"],p.forEach((e=>{i[e]=t=>{i.handlers[e]=t},t[e]=e=>{if(!i.handlers[e.type]){if(("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type)&&i.handlers.move){const n=t.createEvent(e,"move");i.handlers.move(n)}return!0}return i.handlers[e.type](e)}})),t.listen(),t.handlers=i.handlers,i}listen(e){const t=this;if("resize"===e&&t.target!==document&&t.target!==window&&!1!==t.target.hasResizeObserver)if(Smart.Utilities.Core.Browser.Firefox){if(!t.target.resizeObserver){let e,i,n,r=!1,a=t.target.offsetWidth,s=t.target.offsetHeight;const o=new ResizeObserver((()=>{if(!r)return void(r=!0);const o=new CustomEvent("resize",{bubbles:!1,cancelable:!0});i=t.target.offsetWidth,n=t.target.offsetHeight,e=i!==a||n!==s,t.target.requiresLayout&&(e=!0),e&&(t.resize(o),t.target.requiresLayout=!1,a=i,s=n)}));o.observe(t.target),t.target.resizeObserver=o}}else if(!t.target.resizeTrigger){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>',e.setAttribute("aria-hidden",!0),window[i].EnableShadowDOM&&t.target.shadowRoot?t.target.shadowRoot.appendChild(e):t.target.appendChild(e),t.target.resizeTrigger=e;const n=e.childNodes[0],r=n.childNodes[0],a=e.childNodes[1],s=function(){r.style.width="100000px",r.style.height="100000px",n.scrollLeft=1e5,n.scrollTop=1e5,a.scrollLeft=1e5,a.scrollTop=1e5};let o,l,c,d,u=t.target.offsetWidth,p=t.target.offsetHeight;if(0===u||0===p){const e=function(){s(),t.target.removeEventListener("resize",e)};t.target.addEventListener("resize",e),s()}else s();t.target.resizeHandler=function(){l||(l=requestAnimationFrame((function(){if(l=0,c=t.target.offsetWidth,d=t.target.offsetHeight,o=c!==u||d!==p,t.target.requiresLayout&&(o=!0),!o)return;u=c,p=d;const e=new CustomEvent("resize",{bubbles:!1,cancelable:!0});t.resize(e),t.target.requiresLayout=!1}))),s()},n.addEventListener("scroll",t.target.resizeHandler),a.addEventListener("scroll",t.target.resizeHandler)}t.isListening||(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))):("ontouchstart"in window&&(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.target._handleDocumentUp||(t.target._handleDocumentUp=t.handleDocumentUp.bind(t),t.target._handleDocumentUpId=t.id,t.$document.listen("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp)))}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)):("ontouchstart"in window&&(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)),t.target._handleDocumentUp&&(t.$document.unlisten("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp),delete t.target._handleDocumentUp,delete t.target._handleDocumentUpId),"resize"===e)if(Smart.Utilities.Core.Browser.Firefox)t.target.resizeObserver&&(t.target.resizeObserver.unobserve(t.target),delete t.target.resizeObserver);else if(t.target.resizeTrigger){const e=t.target.resizeTrigger,i=e.childNodes[0],n=e.childNodes[1];i.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 i=this,n=e.touches,r=e.changedTouches,a=n&&n.length?n[0]:r&&r.length?r[0]:void 0,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:void 0!==i.$target.element.getRootNode().host});if(s.originalEvent=e,a){for(let e=0;e<i.inputEventProperties.length;e++){const t=i.inputEventProperties[e];s[t]=a[t]}return s}for(let t in e)t in s||(s[t]=e[t]);return s}fireTap(e){const t=this;if(clearTimeout(this.tapHoldTimeout),!this.tapHoldFired&&this.isInBounds){const i=t.createEvent(e,"tap");t.tap(i)}}initTap(e){const t=this;t.isInBounds=!0,t.tapHoldFired=!1,t.tapHoldTimeout=setTimeout((function(){if(t.isInBounds){t.tapHoldFired=!0;const i=t.createEvent(e,"taphold");t.taphold(i)}}),t.tapHoldDelay)}pointerDown(e){return this.handleDown(e)}mouseDown(e){const t=this;if(!(t.isPressed||t.touchStartTime&&new Date-t.touchStartTime<500))return t.handleDown(e)}touchStart(e){const t=this;return t.touchStartTime=new Date,t.isTouchMoved=!0,t.handleDown(e)}mouseUp(e){const t=this;if(!(t.isReleased||t.touchEndTime&&new Date-t.touchEndTime<500))return t.handleUp(e)}handleDown(e){const t=this;t.isReleased=!1,t.isPressed=!0;const i=t.createEvent(e,"down");return(t.handlers.tap||t.handlers.taphold)&&t.initTap(i),(t.handlers.swipeleft||t.handlers.swiperight||t.handlers.swipetop||t.handlers.swipebottom)&&t.initSwipe(i),t.down(i)}handleUp(e){const t=this;t.isReleased=!0,t.isPressed=!1;const i=t.createEvent(e,"up"),n=t.up(i);return(t.handlers.tap||t.handlers.taphold)&&t.fireTap(i),t.resetSwipe(i),n}handleMove(e){const t=this;let i=t.move(e);return t.isPressed&&(t._maxSwipeVerticalDistance=Math.max(t._maxSwipeVerticalDistance,Math.abs(t._startY-e.pageY)),t._maxSwipeHorizontalDistance=Math.max(t._maxSwipeHorizontalDistance,Math.abs(t._startX-e.pageX)),i=t.handleSwipeEvents(e)),i}touchEnd(e){return this.touchEndTime=new Date,this.handleUp(e)}pointerUp(e){return this.handleUp(e)}pointerCancel(e){this.pointerUp(e)}touchCancel(e){this.touchEnd(e)}mouseLeave(){this.isInBounds=!1}mouseMove(e){if(!this.isTouchMoved)return this.handleMove(e)}pointerMove(e){return this.handleMove(e)}touchMove(e){const t=this,i=e.touches,n=e.changedTouches,r=i&&i.length?i[0]:n&&n.length?n[0]:void 0;for(let i=0;i<t.inputEventProperties.length;i++){const n=t.inputEventProperties[i];void 0===e[n]&&(e[n]=r[n])}return t.isTouchMoved=!0,t.handleMove(e)}handleSwipeEvents(e){const t=this;let i=!0;return(t.handlers.swipetop||t.handlers.swipebottom)&&(i=this.handleVerticalSwipeEvents(e)),!1===i||(t.handlers.swipeleft||t.handlers.swiperight)&&(i=this.handleHorizontalSwipeEvents(e)),i}handleVerticalSwipeEvents(e){let t,i;return t=e.pageY,i=t-this._startY,this.swiped(e,i,"vertical")}handleHorizontalSwipeEvents(e){let t,i;return t=e.pageX,i=t-this._startX,this.swiped(e,i,"horizontal")}swiped(e,t,i){const n=this;if(i=i||0,Math.abs(t)>=n.swipeMin&&!n._swipeEvent&&!n._swipeLocked){let r=t<0?"swipeleft":"swiperight";if("horizontal"===i?n._swipeEvent=n.createEvent(e,r):(r=t<0?"swipetop":"swipebottom",n._swipeEvent=n.createEvent(e,t<0?"swipetop":"swipebottom")),n[r]&&(n[r](this._swipeEvent),Math.abs(t)<=this.swipeMax))return e.stopImmediatePropagation(),!1}return!0}resetSwipe(){this._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 h{get scrollWidth(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.max:-1}set scrollWidth(e){const t=this;e<0&&(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;e<0&&(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;e<0&&(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;e<0&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.value=e)}get vScrollBar(){return this.verticalScrollBar}get hScrollBar(){return this.horizontalScrollBar}constructor(e,t,i){const n=this;n.container=e,n.horizontalScrollBar=t,n.verticalScrollBar=i,n.disableSwipeScroll=!1,n.listen()}listen(){const e=this,t=o.isMobile,i=e.horizontalScrollBar,n=e.verticalScrollBar;let r,a,s,l,c,d,u,p;e.inputEvents=new m(e.container);const h=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}},g=h(i),f=h(n),b=function(){const t=e.container.touchVelocityCoefficient||50;d=Date.now(),u=d-l,l=d;const i=function(e){e.delta=e.value-e.previousValue,e.previousValue=e.value;let i=t*e.delta/(1+u);e.velocity=.8*i+.2*e.velocity};i(f),i(g)},v=function(e){return p.value=e>p.max?p.max:e<p.min?p.min:e,p.scrollBar.value=p.value,e>p.max?"max":e<p.min?"min":"value"};function w(){let t,i;p.amplitude&&(e.container.$.fireEvent("kineticScroll"),t=Date.now()-l,i=-p.amplitude*Math.exp(-t/500),i>5||i<-5?(v(p.targetValue+i),cancelAnimationFrame(a),a=0,a=requestAnimationFrame(w)):v(p.targetValue))}let k;e.inputEvents.down((function(i){if(!t)return;const n=i.originalEvent.target,a=n&&n.closest?n.closest("smart-scroll-bar"):void 0;if(a===e.horizontalScrollBar||a===e.verticalScrollBar)return;s=!0,r=!1;const o=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};o(f,i.clientY),o(g,i.clientX),l=Date.now(),clearInterval(c),c=setInterval(b,500)})),e.inputEvents.up((function(){if(!s)return!0;if(clearInterval(c),e.disableSwipeScroll)return void(s=!1);const t=function(e){p=e,e.amplitude=.8*e.velocity,e.targetValue=Math.round(e.value+e.amplitude),l=Date.now(),cancelAnimationFrame(a),a=requestAnimationFrame(w),e.velocity=0};f.velocity>10||f.velocity<-10?t(f):(g.velocity>10||g.velocity<-10)&&t(g),s=!1})),e.inputEvents.move((function(t){if(!s)return!0;if(e.disableSwipeScroll)return;if(r&&(t.originalEvent.preventDefault(),t.originalEvent.stopPropagation()),g.visible=e.scrollWidth>0,f.visible=e.scrollHeight>0,!s||!g.visible&&!f.visible)return;const i=e.container.touchScrollRatio,n=e.container;let a,o;i&&("number"==typeof i?(a=-i,o=-i):"function"==typeof i&&(a=i(f.max,n.offsetHeight),o=i(g.max,n.offsetWidth))),f.ratio=a||-f.max/n.offsetHeight,f.delta=(t.clientY-f.pointerPosition)*f.ratio,g.ratio=o||-g.max/n.offsetWidth,g.delta=(t.clientX-g.pointerPosition)*g.ratio;let l="value";const c=function(t,i,n){return t.delta>5||t.delta<-5?(p=t,l=t.initialValue+t.delta>p.max?"max":t.initialValue+t.delta<p.min?"min":"value","min"===l&&0===t.initialValue||"max"===l&&t.initialValue===t.max||!t.visible||(e.container.$.fireEvent("kineticScroll"),v(t.initialValue+t.delta),b(),n.originalEvent.preventDefault(),n.originalEvent.stopPropagation(),r=!0,!1)):null};let d=c(f,t.clientY,t);if(null!==d)return d;{let e=c(g,t.clientX,t);if(null!==e)return e}})),e.scrollTo=function(t,i){const n=!1===i?g:f;let r=!1;l||(l=Date.now()),k||(k=Date.now()),Math.abs(Date.now()-k)>375?l=Date.now():r=!0,k=Date.now(),n.value=n.scrollBar.value,n.delta=t-n.value,n.max=n.scrollBar.max,t<=n.min&&(t=n.min),t>=n.max&&(t=n.max),n.targetValue=t;const s=t;let o=n.value;n.velocity=100*n.delta/(1+n.max),n.from=o;const c=function(e){return n.value=e>n.max?n.max:e<n.min?n.min:e,n.scrollBar.value=n.value,e>n.max?"max":e<n.min?"min":"value"},d=function(){let i,u=Date.now()-k,p=Math.min(1e3,Date.now()-l),m=n.velocity*Math.exp(p/175);if(r)(m<0&&n.value<=t||m>0&&n.value>=t)&&(m=0),(n.value+m<=n.min||n.value+m>=n.max)&&(m=0),m>.5||m<-.5?(c(n.value+m),cancelAnimationFrame(a),a=0,a=requestAnimationFrame(d)):c(n.targetValue);else{if(u>=175)return cancelAnimationFrame(a),e.container.$.fireEvent("kineticScroll"),void(a=0);i=y.Animation.Easings.easeInSine(u,o,s-o,175),c(i),cancelAnimationFrame(a),a=0,a=requestAnimationFrame(d)}};cancelAnimationFrame(a),a=requestAnimationFrame(d)},e.inputEvents.listen()}unlisten(){const e=this;e.inputEvents&&e.inputEvents.unlisten(),delete e.inputEvents}}class g{constructor(e){this.events={},this.handlers={},this.element=e}hasClass(e){const t=this,i=e.split(" ");for(let e=0;e<i.length;e++)if(!t.element.classList.contains(i[e]))return!1;return!0}addClass(e){const t=this;if(t.hasClass(e))return;const i=e.split(" ");for(let e=0;e<i.length;e++)t.element.classList.add(i[e]);t.isNativeElement||c.observeElement(t.element)}removeClass(e){const t=this;if(0===arguments.length)return void t.element.removeAttribute("class");const i=e.split(" ");for(let e=0;e<i.length;e++)t.element.classList.remove(i[e]);""===t.element.className&&t.element.removeAttribute("class"),t.isNativeElement||c.observeElement(t.element)}get isCustomElement(){const e=this;return!!e.element.tagName.startsWith(i)||e.element instanceof window[i].BaseElement==1||"DIV"!==e.element.tagName&&"SPAN"!==e.element.tagName&&"BUTTON"!==e.element.tagName&&"INPUT"!==e.element.tagName&&"UL"!==e.element.tagName&&"LI"!==e.element.tagName&&document.createElement(e.element.nodeName)instanceof window[i].BaseElement==1}get isNativeElement(){return!this.isCustomElement}dispatch(e){const t=this,i=t.events[e.type];let n=!1;if(i.length>1)for(let e=0;e<i.length;e++){const t=i[e];if(t.namespace&&t.namespace.indexOf("_")>=0){n=!0;break}}n&&i.sort((function(e,t){let i=e.namespace,n=t.namespace;return i=-1===i.indexOf("_")?0:parseInt(i.substring(i.indexOf("_")+1)),n=-1===n.indexOf("_")?0:parseInt(n.substring(n.indexOf("_")+1)),i<n?-1:i>n?1:0}));for(let n=0;n<i.length;n++){const r=i[n];if(e.namespace=r.namespace,e.context=r.context,e.defaultPrevented)break;const a=r.handler.apply(t.element,[e]);if(void 0!==a&&(e.result=a,!1===a)){e.preventDefault(),e.stopPropagation();break}}return e.result}fireEvent(e,t,n){const r=this;n||(n={bubbles:!0,cancelable:!0,composed:null!==r.element.getRootNode().host}),n.detail=t||{};const a=new CustomEvent(e,n);if(a.originalStopPropagation=a.stopPropagation,a.stopPropagation=function(){return a.isPropagationStopped=!0,a.originalStopPropagation()},r.dispatchEvent(a),window[i].isVue){const t=y.Core.toDash(e);if(t!==e){const e=new CustomEvent(t,n);e.originalStopPropagation=a.stopPropagation,e.stopPropagation=function(){return e.isPropagationStopped=!0,e.originalStopPropagation()},r.dispatchEvent(e)}}return a}get isPassiveSupported(){const e=this;if(void 0!==e.supportsPassive)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(e){}return e.supportsPassive}dispatchEvent(e){const t=this,i=e.type,n=t.element.context,r=i.substring(0,1).toUpperCase()+i.substring(1);t.element.context=document,t.element["on"+r]?t.element["on"+r](e):t.element["on"+i.toLowerCase()]?t.element["on"+i.toLowerCase()](e):t.element.dispatchEvent(e),t.element.context=n}listen(e,t){const i=this,n=e.split("."),r=n.slice(1).join("."),a=n[0];i.events[a]||(i.events[a]=[]);const s={type:a,handler:t,context:i.element,namespace:r};p.indexOf(a)>=0&&(i.inputEvents||(i.inputEvents=new m(i.element)),i.inputEvents[a]((function(e){i.dispatchEvent(e)})),i.inputEvents.boundEventTypes.push(a),i.inputEvents.listen(a)),0===i.events[a].length&&(i.handlers[a]=i.dispatch.bind(i),"wheel"===a?i.element.addEventListener("wheel",i.handlers[a],!!i.isPassiveSupported&&{passive:!1}):"touchmove"===a||"touchstart"===a||"touchend"===a?i.element.addEventListener(a,i.handlers[a],!!i.isPassiveSupported&&{passive:!1}):i.element.addEventListener(a,i.handlers[a],!1)),i.events[a].push(s)}unlisten(e){const t=this,i=e.split("."),n=i.slice(1).join("."),r=i[0];let a=t.events[r];if(t.inputEvents&&t.inputEvents.boundEventTypes.indexOf(r)>=0&&(t.inputEvents.boundEventTypes.splice(t.inputEvents.boundEventTypes.indexOf(r),1),0===t.inputEvents.boundEventTypes.length&&t.inputEvents.unlisten(r)),a){for(let e=0;e<a.length;e++){if(""!==n){let e=a.findIndex((e=>e.namespace===n));a.splice(e,1);break}a=[]}0===a.length&&(t.element.removeEventListener(r,t.handlers[r]),t.events[r]=[],delete t.handlers[r])}}getAttributeValue(e,t){const i=this,n=i.element.getAttribute(e);if(i.isNativeElement)return i.deserialize(n,t);const r=i.element.propertyByAttributeName[e];return void 0===r.deserialize?i.deserialize(n,t,r.nullable):i.element[r.deserialize](n)}setAttributeValue(e,t,i){const n=this;let r,a=!1;if(n.isNativeElement){if(r=n.serialize(t,i),"boolean"===i&&["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(e)>=0)return void(t?n.element.setAttribute(e,""):n.element.removeAttribute(e))}else{const s=n.element.propertyByAttributeName[e];a=!s||s.nullable,r=s&&s.serialize?n.element[s.serialize](t):n.serialize(t,i,a)}"array"!==i&&"object"!==i||"[]"!==r&&"{}"!==r?void 0===r?(n.element.removeAttribute(e),n.element.shadowRoot&&n.element.$.root&&n.element.$.root.removeAttribute(e)):(n.element.setAttribute(e,r),n.element.shadowRoot&&n.element.$.root&&n.element.$.root.setAttribute(e,r)):n.element.removeAttribute(e)}serialize(e,t,i){if(void 0===t&&(t=y.Types.getType(e)),void 0!==e&&(i||null!==e)){if(i&&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}return"array"===t?JSON.stringify(e):["string","number","int","integer","float","date","any","function"].indexOf(t)>=0?e.toString():"object"===t?JSON.stringify(e):void 0}}deserialize(e,t,i){const n="null"===e;if(void 0!==e&&(!n||i)){if(n&&i)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?-1/0:parseFloat(e);if("int"===t||"integer"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0: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(i){if(window[e]&&"object"==typeof window[e])return window[e];if("object"===t&&e.indexOf("{")>=0){let t=(e=e.replace(/{/gi,"").replace(/}/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim()).trim().split(","),i={};for(let e=0;e<t.length;e++){const n=t[e].split(":")[0].trim(),r=t[e].split(":")[1].trim();i[n]=r}return i}if("array"===t&&e.indexOf("[")>=0){if(e.indexOf("{")>=0){let t=e.replace(/{/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim();t=t.split("},");for(let e=0;e<t.length;e++){let i={},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();i[t]=r}t[e]=i}return t}return e.replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim().split(",")}}}}}class f{static get Ripple(){return a}static get Easings(){return s}}class y{static get Types(){return r}static get Core(){return o}static get Animation(){return f}static get Scroll(){return h}static get InputEvents(){return m}static Extend(e){return new g(e)}static Assign(e,t){if(e.indexOf(".")>=0){const i=e.split(".");return y[i[0]]||(y[i[0]]={}),void(y[i[0]][i[1]]=t)}y[e]=t}}const b=y.Extend(document);let v=null;document.addEventListener("click",(()=>{c.start(),v&&clearTimeout(v),v=setTimeout((()=>{c.stop()}),1e4)})),document.addEventListener("mouseenter",(()=>{c.start()})),document.addEventListener("mouseleave",(()=>{c.stop()}));class w{}w.cache={};class k 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"},debugMode:{value:!0,type:"boolean",reflectToAttribute:!1},unlockKey:{value:"",type:"string",reflectToAttribute:!1},locale:{value:"en",type:"string",reflectToAttribute:!1},localizeFormatFunction:{value:null,type:"any",reflectToAttribute:!1},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,inherit:!0,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"},rethrowError:{value:!0,type:"boolean",reflectToAttribute:!1},theme:{value:window[i].Theme,type:"string"},visibility:{value:"visible",allowedValues:["visible","collapsed","hidden"],type:"string"},wait:{value:!1,type:"boolean"}}}getBindings(e,t){const i=this;let n=0,r={},a=(e=>{if(e instanceof HTMLElement)return i.parseAttributes(e);{let t=i.parseProperty(e.data?e.data.trim():null,"textContent",e);if(t)return i&&e.parentNode===i.$.content&&(t.value=""!==i.$.html?i.$.html:void 0,i.innerHTML=""),{textContent:t}}})(e);a&&(r.data=a),t||(r.mapping=[],t=r),e.getAttribute&&(r.nodeId=e.getAttribute("smart-id"),t&&a&&(t.mapping[r.nodeId]=a)),r.node=e,e.firstChild&&(r.children={});for(let a=e.firstChild;a;a=a.nextSibling)r.children[n++]=i.getBindings(a,t);return r}_addRemovePropertyBinding(e,t,i,n,r){if(!e||!t||!i)return;const a=this,s=a.bindings,o=i.getAttribute("smart-id"),l=e.indexOf("{{")>=0;let c=!1;(e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","")).indexOf("!")>=0&&(e=e.replace("!",""),c=!0);const d=a._properties[e],u={name:e,reflectToAttribute:d.reflectToAttribute,twoWay:l,type:d.type,not:c};if(r&&!n){const i={},n={name:e,targetPropertyName:t,reflectToAttribute:d.reflectToAttribute,twoWay:l,type:d.type,not:c};i[e]=n,s.mapping[o]=i}const p=function(e){for(let r in e){const s=e[r];if(s.nodeId===o){s.data||(s.data={}),n?(s.data[t]=null,delete s.data[t]):s.data[t]=u;break}if(s.children)p(s.children);else if(s.node&&s.node.children&&s.node===i.parentElement){const e=s.node;if(!e.firstChild)continue;s.children={};let t=0;for(let i=e.firstChild;i;i=i.nextSibling)s.children[t++]=a.getBindings(i);p(s.children)}}};p(s.children),n?delete a.boundProperties[e]:a.boundProperties[e]=!0,a.updateBoundNodes(e)}addPropertyBinding(e,t,i,n){this._addRemovePropertyBinding(e,t,i,!1,n)}removePropertyBinding(e,t,i,n){this._addRemovePropertyBinding(e,t,i,!0,n)}parseAttributes(e){const t=this;let i;for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],a=r.name,s=r.value;w.cache["toCamelCase"+a]||(w.cache["toCamelCase"+a]=y.Core.toCamelCase(a));const o=w.cache["toCamelCase"+a];if(a.indexOf("(")>=0){let n=a.substring(1,a.length-1);if(t&&!t.dataContext){t.templateListeners[e.getAttribute("smart-id")+"."+n]=s,e.removeAttribute(a);continue}{i||(i={});const e=s.substring(0,s.indexOf("("));i[o]={isEvent:!0,name:n,value:e};continue}}let l=t.parseProperty(s,a,e);l&&(i||(i={}),i[o]=l)}return i}parseProperty(e,t){if(!e||!e.length)return;const i=this;let n,r=e.length,a=0,s=0,o=0,l=!0;for(;s<r;){a=e.indexOf("{{",s);let t=e.indexOf("[[",s),i="}}";if(t>=0&&(a<0||t<a)&&(a=t,l=!1,i="]]"),o=a<0?-1:e.indexOf(i,a+2),o<0)return;n=n||{};let r=e.slice(a+2,o).trim();n.name=r,s=o+2}const c=n.name,d=i?i._properties[c]:null;return n.twoWay=l,n.ready=!1,i&&(c.indexOf("::")>=0?i.boundProperties[c.substring(0,c.indexOf("::"))]=!0:i.boundProperties[c]=!0),d?(n.type=d.type,n.reflectToAttribute=d.reflectToAttribute):(["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)>=0?n.type="boolean":n.type="string",n.reflectToAttribute=!0),n}updateTextNodes(){const e=this;e.updateTextNode(e.shadowRoot||e,e.bindings,e)}updateTextNode(e,t,i){const n=this;if(!t)return;let r=0;for(let a=e.firstChild;a&&t.children;a=a.nextSibling)n.updateTextNode(a,t.children[r++],i);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&&(i[r]=n.value)}}updateBoundProperty(e,t){if(t.updating)return;const i=this;t.updating=!0,i[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.shadowRoot||t,t.bindings,t,e),t.detachedChildren.length>0)for(let i=0;i<t.detachedChildren.length;i++){const n=t.detachedChildren[i],r=n.getAttribute("smart-id"),a=function(e){if(e.nodeId===r)return e;for(let t in e.children){const i=e.children[t];if((i.getAttribute?i.getAttribute("smart-id"):"")===r)return e;if(i.children){const e=a(i);if(e)return e}}return null},s=a(t.bindings);if(s)t.updateBoundNode(n,s,t,e,!0);else if(n.getAttribute&&t.bindings.mapping){const i=t,n=t.bindings;if(n)for(let r in n.mapping){const a=i.querySelector('[smart-id="'+r+'"]');if(a){const s=n.mapping[r];t.updateBoundData(a,s,i,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.bindings,i=e;if(t.mapping)for(let n in t.mapping){let r=i.querySelector('[smart-id="'+n+'"]');if(i.shadowRoot&&(r=i.querySelector('[id="'+n+'"]'),r||(r=i.shadowRoot.querySelector('[id="'+n+'"]')||i.shadowRoot.querySelector('[smart-id="'+n+'"]'))),r){const a=t.mapping[n];e.updateBoundData(r,a,i)}else if(i.getAttribute("aria-controls")){let a=document.getElementById(i.getAttribute("aria-controls"));if(!a&&i.shadowRoot&&(a=i.shadowRoot.getElementById(i.getAttribute("aria-controls"))),r=a.querySelector('[smart-id="'+n+'"]'),r){const a=t.mapping[n];e.updateBoundData(r,a,i)}}}}updateBoundNode(e,t,i,n,r){const a=this;if(!t)return;let s=0;if(r){if(r&&!t.data)for(let o=e.firstChild;o&&t.children;o=o.nextSibling)if(o.getAttribute){const e=o.getAttribute("smart-id"),r=function(){for(let i in t.children)if(t.children[i].nodeId===e)return t.children[i]}();a.updateBoundNode(o,r,i,n),s++}else a.updateBoundNode(o,t.children[s++],i,n,r)}else for(let r=e.firstChild;r&&t.children;r=r.nextSibling)if(r.getAttribute){const e=r.getAttribute("smart-id"),o=function(){for(let i in t.children)if(t.children[i].nodeId===e)return t.children[i]}();a.updateBoundNode(r,o,i,n),s++}else a.updateBoundNode(r,t.children[s++],i,n);if(!t||!t.data)return;const o=t.data;a.updateBoundData(e,o,i,n)}updateBoundData(e,t,i,n){const r=this;for(let a in t){const s=t[a];let o=s.name;if(!s.updating&&(o.indexOf("::")>=0&&(o=o.substring(0,o.indexOf("::"))),void 0===n||n===o)){if(o.indexOf("(")>=0){let e=o.substring(o.indexOf("("));const t=o.substring(0,o.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /gi,""),e=e.split(","),e.length>0&&""!==e[0]){let n=[];for(let t=0;t<e.length;t++)n.push(i[e[t]]);s.value=i[t].apply(i,n)}else s.value=i[t]();s.type=typeof s.value}else s.value=i[o];if("innerHTML"===o){if(e[a].toString().trim()!==i[o].toString().trim()){if(window.smartBlazor&&e[a].indexOf("\x3c!--")>=0){(s.ready||i._properties[o].defaultValue!==s.value)&&(e[a]=s.value.toString());continue}(s.ready||i._properties[o].defaultValue!==s.value)&&(e[a]=s.value.toString().trim())}}else s.not?(e[a]=!s.value,s.targetPropertyName&&(e[s.targetPropertyName]=!s.value)):(e[a]=s.value,s.targetPropertyName&&(e[s.targetPropertyName]=s.value));if(e.$&&e.$.isNativeElement){w.cache["toDash"+a]||(w.cache["toDash"+a]=y.Core.toDash(a));const t=w.cache["toDash"+a],i=e.$.getAttributeValue(t,s.type);!s.reflectToAttribute||i===s.value&&s.ready||e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}if(!s.ready){if(e.$&&e.$.isCustomElement){w.cache["toDash"+a]||(w.cache["toDash"+a]=y.Core.toDash(a));const t=w.cache["toDash"+a];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[a]||(e._properties[a]={attributeName:t},e._beforeCreatedProperties&&(e._beforeCreatedProperties[a]=e._properties[a]),e.propertyByAttributeName[t]=e._properties[a]);const i=e._properties[a];i.isUpdating=!0,s.reflectToAttribute&&(s.not?e.$.setAttributeValue(i.attributeName,!s.value,s.type):e.$.setAttributeValue(i.attributeName,s.value,s.type)),s.reflectToAttribute||e.$.setAttributeValue(i.attributeName,null,s.type),i.isUpdating=!1}if(s.twoWay){const t=function(t){if(s.value=t,e.$&&e.$.isNativeElement){w.cache["toDash"+a]||(w.cache["toDash"+a]=y.Core.toDash(a));const t=w.cache["toDash"+a],i=e.$.getAttributeValue(t,s.type);s.reflectToAttribute&&i!==s.value&&e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}};if(s.name.indexOf("::")>=0){const i=s.name.indexOf("::"),n=s.name.substring(i+2);r["$"+e.getAttribute("smart-id")].listen(n,(function(){t(e[a]);const i=s.name.substring(0,s.name.indexOf("::"));r.updateBoundProperty(i,s)}))}if(e.$&&e.$.isCustomElement){e._properties[a]&&(e._properties[a].notify=!0),w.cache["toDash"+a]||(w.cache["toDash"+a]=y.Core.toDash(a));const i=w.cache["toDash"+a];r["$"+e.getAttribute("smart-id")].listen(i+"-changed",(function(e){let i=e.detail;t(i.value);const n=r.context;e.context!==document&&(r.context=r),r.updateBoundProperty(s.name,s),r.context=n}))}}}s.ready=!0}}}static clearCache(){this.cache={}}addMessages(e,t){Object.assign(this.messages[e],t)}localize(e,t){const i=this;if(!i.messages||!i.messages[i.locale])return;let n=i.messages[i.locale][e];if(""===n)return"";if(!n){const n=i.messages.en;if(n){let i=n[e];if(i){for(let e in t){let n=t[e];i=i.replace(new RegExp("{{"+e+"}}","g"),n)}return i}return e}}const r=n;for(let e in t){let i=t[e];n=n.replace(new RegExp("{{"+e+"}}","g"),i)}if(i.localizeFormatFunction){const a=i.localizeFormatFunction(r,n,t,e);if(void 0!==a)return a}return n}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(){return"none"!==this.animation}get hasRippleAnimation(){return"none"!==this.animation&&"advanced"===this.animation}static get modules(){return window[i].Modules}get properties(){const e=this;return e._properties||(e._properties=[]),e._properties}get parents(){const e=this;let t=[],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==1&&t.push(n),n=n.parentNode;const r=e.getRootNode();if(r.host){const e=e=>{let t=[e],i=e.parentNode;for(;i&&9!==i.nodeType;)i instanceof HTMLElement==1&&t.push(i),i=i.parentNode;return t};t=t.concat(e(r.host))}return window[i].EnableShadowDOM&&e.isInShadowDOM&&e.shadowParent&&(t=t.concat(e.shadowParent.parents)),t}log(e){this._logger("log",e)}warn(e){this._logger("warn",e)}error(e){this._logger("error",e)}_logger(e,t){if(this.debugMode){const i=t instanceof Error?t.message:t.toString();console[e](i)}if(this.rethrowError&&"error"===e)throw 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;t.isCompleted?e():(t.whenReadyCallbacks||(t.whenReadyCallbacks=[]),t.whenReadyCallbacks.push(e))}whenRendered(e){const t=this;t.isRendered?e():(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(i.toLowerCase()+"-element"),e.classList.add(e.nodeName.toLowerCase())}_renderShadowRoot(){const e=this;if(e.shadowRoot){e.$.root.classList.add(e.nodeName.toLowerCase());for(let t=0;t<e.attributes.length;t++){const i=e.attributes[t];"class"===i.name||"id"===i.name||"style"===i.name||"tabindex"===i.name||i.name.indexOf("aria")>=0||e.$.root.setAttribute(i.name,i.value)}for(let t=0;t<e.classList.length;t++){const i=e.classList[t];"smart-element-init"!==i&&"smart-element"!==i&&"smart-hidden"!==i&&"smart-visibility-hidden"!==i&&e.$.root.classList.add(i)}}}render(){const e=this;if(!e.isRendered&&(e.isRendered=!0,e.isRendering=!1,e.context=document,e._renderShadowRoot(),e.whenRenderedCallbacks)){for(let t=0;t<e.whenRenderedCallbacks.length;t++)e.whenRenderedCallbacks[t]();e.whenRenderedCallbacks=[]}e.onRender&&e.onRender(),e.disabled&&e.setAttribute("aria-disabled",!0),e.readonly&&-1!==["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(e.getAttribute("role"))&&e.setAttribute("aria-readonly",!0)}ready(){const e=this;if(e._setId(),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 i=0;i<t.length;i++)e.importStyle(t[i])}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()}_setId(){const e=this;if(!e.id){const t=e.elementName;e.id=t.slice(0,1).toLowerCase()+t.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}}checkLicense(){const e=this;if(-1===window.location.hostname.indexOf("htmlelements")&&"8414516F-15A2-4D84-A7AF-A9A72400DB02"!==window[i].License){if("8414516F-15A2-4D84-A7AF-A9A72400DB02"===e.unlockKey)return;if(document.body.hasAttribute("smart-license")&&"8414516F-15A2-4D84-A7AF-A9A72400DB02"===document.body.getAttribute("smart-license"))return void(window[i].License="8414516F-15A2-4D84-A7AF-A9A72400DB02");e.logWatermark(),e.logLicense(),window[i].License="8414516F-15A2-4D84-A7AF-A9A72400DB02"}}logWatermark(){const e=document.createElement("a");e.href="https://www.htmlelements.com/",e.innerHTML="https://www.htmlelements.com/",e.style.position="absolute",e.style.right="5px",e.style.bottom="5px",e.style.color="#fff",e.style.padding="20px",e.style.borderRadius="5px",e.style.background="#0C3D78",e.style.cursor="pointer",e.style.zIndex="999999",e.style.display="block",e.style.fontSize="24px",e.style.textDecoration="none",e.style.fontWeight="bold",e.style.opacity=0,e.style.transition="opacity .35s ease-in-out",e.id="watermark",document.getElementById("watermark")||setTimeout((()=>{document.getElementById("watermark")||(document.body.appendChild(e),setTimeout((()=>{e.style.opacity=1})),setTimeout((()=>{e.style.opacity=0,setTimeout((()=>{e.parentNode.removeChild(e)}),350)}),6e3))}),1e3)}logLicense(){console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("*jQWidgets License Key Not Found."),console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."),console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("********************************************