smart-webcomponents-react
Version:
[](https://jqwidgets.com/license/)
34 lines (20 loc) • 248 kB
JavaScript
/* Smart UI v23.0.8 (2025-05-13)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */ //
(function(){ if (typeof document === 'undefined') { return; }
/* Smart UI v19.1.1 (2024-June)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 2612:
/***/ (() => {
Smart("smart-button",class extends Smart.ContentElement{static get properties(){return{value:{type:"string"},name:{type:"string"},type:{value:"button",type:"string"},clickMode:{allowedValues:["hover","press","release","pressAndRelease"],type:"string",value:"release"}}}static get styleUrls(){return["smart.button.css"]}template(){return"<button class=\"smart-button smart-unselectable\" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role=\"presentation\"></button>"}refresh(){}static get listeners(){return{"button.down":"_downHandler","button.mouseenter":"_mouseEnterHandler","button.mouseleave":"_mouseLeaveHandler","button.touchend":"_touchEndHandler","button.click":"_clickHandler","button.up":"_upHandler",up:"_upHandler","button.focus":"_focusHandler","button.blur":"_blurHandler"}}focus(){const e=this;e.$.button?e.$.button.focus():HTMLElement.prototype.focus.call(e)}blur(){const e=this;e.$.button?e.$.button.blur():HTMLElement.prototype.blur.call(e)}_upHandler(e){const t=this;if(e.stopPropagation(),t.$.setAttributeValue("active",!1),t.dataset.target){const n=document.querySelector(t.dataset.target);let a=t.dataset.toggle,r=t.dataset.arguments;const i="smart-window".toLowerCase();if(n&&n.nodeName.toLowerCase()===i&&"modal"===a&&(a="openModal"),"tab"===a||"pill"===a||"list"===a){const e=this.closest(".nav, .list-group"),a='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',r=!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?e.children(".active"):e.querySelectorAll("li > .active");if(e){const n=e.querySelectorAll(a);for(let e=0;e<n.length;e++)n[e].classList.remove("primary");for(let e=0;e<r.length;e++)r[e].classList.remove("active");let i=t.parentNode;for(;i;){if("LI"===i.nodeName){i.classList.add("active");break}i=i.parentNode}t.classList.add("primary")}return n.parentNode.querySelectorAll(".active").forEach((e=>{e.classList.remove("active"),e.classList.add("smart-hidden")})),n.classList.add("active"),void n.classList.remove("smart-hidden")}a&&n&&!n[a]&&"collapse"===a&&(setTimeout((()=>{n.classList.contains("smart-hidden")?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden")})),e.originalEvent.preventDefault()),a&&n&&!n[a]&&"dropdown"===a?(setTimeout((()=>{n.opened=!n.opened})),e.originalEvent.preventDefault()):a&&n&&n[a]&&(setTimeout((()=>{r?n[a](r):n[a]()}),50),e.originalEvent.preventDefault())}}_focusHandler(){this.$.setAttributeValue("focus",!0),this.$.fireEvent("focus")}_blurHandler(){this.$.setAttributeValue("focus",!1),this.$.fireEvent("blur")}_clickHandler(e){const t=this;("release"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly)&&(e.preventDefault(),e.stopPropagation())}_downHandler(e){const t=this;if(!(t.disabled||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t.$.setAttributeValue("active",!0),"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly))){if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_mouseEnterHandler(e){const t=this;if(!t.readonly&&(t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0),"hover"===t.clickMode)){const n="buttons"in e?e.buttons:e.which;if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_touchEndHandler(){const e=this;setTimeout((function(){e.$button.setAttributeValue("hover",!1),e.$.setAttributeValue("hover",!1)}),300)}_mouseLeaveHandler(){this.$button.setAttributeValue("hover",!1),this.$.setAttributeValue("hover",!1)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;"disabled"===e?(a._setFocusable(),a.$button&&a.$button.setAttributeValue("hover",!1),a.$.setAttributeValue("hover",!1),a instanceof Smart.RepeatButton&&a._stopRepeat()):"unfocusable"===e&&a._setFocusable()}_setFocusable(){const e=this,t=e.$.button?e.$.button:e;if(e.disabled||e.unfocusable)return t.removeAttribute("tabindex"),void(t.tabIndex=-1);t.tabIndex=e.tabIndex>0?e.tabIndex:0}ready(){const e=this;super.ready(),e.setAttribute("role","button"),e._setFocusable(),e.enableShadowDOM&&e.$.hiddenInput&&e.appendChild(e.$.hiddenInput)}}),Smart("smart-repeat-button",class extends Smart.Button{static get properties(){return{delay:{value:50,type:"number"},initialDelay:{value:150,type:"number"}}}static get listeners(){return{"button.down":"_startRepeat","button.mouseenter":"_overriddenHandler","button.mouseleave":"_overriddenHandler","button.pointerenter":"_updateInBoundsFlag","button.pointerleave":"_updateInBoundsFlag","button.touchmove":"_touchmoveHandler","document.up":"_stopRepeat"}}_clickHandler(e){const t=this;("release"!==t.clickMode||t.preventDefaultClick||t.readonly||t.disabled)&&(e.preventDefault(),e.stopPropagation(),t.preventDefaultClick=!1)}_updateInBoundsFlag(e){const t=this;-1!==e.type.indexOf("leave")?(t._isPointerInBounds=!1,t.$button.setAttributeValue("hover",!1),t.$.setAttributeValue("hover",!1)):(t._isPointerInBounds=!0,t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0)),1!==("buttons"in e?e.buttons:e.which)&&t._stopRepeat(e)}_startRepeat(e){const t=this;t.setAttribute("active",""),t._initialTimer||t.readonly||(t._initialTimer=setTimeout((function(){t._repeatTimer=setInterval((()=>{if(t._isPointerInBounds){if(t.hasAttribute("smart-blazor"))return t.$.dispatchEvent(new Event("click")),void(t.preventDefaultClick=!0);const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),t.preventDefaultClick=!0}}),t.delay)}),t.initialDelay))}_stopRepeat(e){const t=this;t.readonly||e&&("pointercancel"===e.type||e.originalEvent&&"pointercancel"===e.originalEvent.type)||(t.$.setAttributeValue("active",!1),t._repeatTimer&&(clearInterval(t._repeatTimer),t._repeatTimer=null),t._initialTimer&&(clearTimeout(t._initialTimer),t._initialTimer=null))}_touchmoveHandler(e){this.preventDefaultClick&&e.cancelable&&(e.preventDefault(),e.stopPropagation())}_overriddenHandler(){}}),Smart("smart-toggle-button",class extends Smart.Button{static get properties(){return{checked:{value:!1,type:"boolean?"},falseContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminate:{value:!1,type:"boolean"},trueContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateTemplate:{value:null,type:"any"},trueTemplate:{value:null,type:"any"},falseTemplate:{value:null,type:"any"},type:{value:"toggle",type:"string",defaultReflectToAttribute:!0,readonly:!0}}}static get listeners(){return{keydown:"_keyHandler",keyup:"_keyHandler",dragstart:"_dragStartHandler","button.click":"_buttonClickHandler","button.mouseenter":"_buttonMouseEnterHandler","button.mouseleave":"_buttonMouseLeaveHandler","document.up":"_documentUpHandler"}}ready(){super.ready(),this._setAriaState(),this._updateGroupValue()}_setAriaState(){const e=this,t=e.checked;null!==t?e.setAttribute("aria-pressed",t):e.setAttribute("aria-pressed","mixed")}_buttonClickHandler(){}_buttonMouseLeaveHandler(){this.removeAttribute("hover")}_buttonMouseEnterHandler(){const e=this;e.setAttribute("hover",""),e.disabled||e.readonly||"hover"!==e.clickMode||(e._changeCheckState("pointer"),e.focus(),e._updateHidenInputNameAndValue())}_documentUpHandler(e){const t=this;t._pressed&&(t._pressed=!1,t.disabled||t.readonly||"press"===t.clickMode||"pointercancel"===e.originalEvent.type||(t._changeCheckState("pointer"),t.focus(),t._updateHidenInputNameAndValue()))}_downHandler(e){const t=this;t.disabled||t.readonly||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t._pressed=!0,"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||(t._changeCheckState("pointer"),t.hasAttribute("smart-blazor")?t.$.dispatchEvent(new Event("click")):t.$.fireEvent("click"),t._updateHidenInputNameAndValue()),"press"===t.clickMode&&(e.preventDefault(),e.stopPropagation()))}_dragStartHandler(e){e.preventDefault()}_keyHandler(e){const t=this;if(!0!==t.disabled&&!t.readonly&&32===e.keyCode){if("keydown"===e.type)return void e.preventDefault();if("none"===t.switchMode)return;t._changeCheckState("keyboard"),t._updateHidenInputNameAndValue()}}_updateGroupValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const n=document.querySelectorAll('[data-target="'+e.dataset.target+'"]'),a=[];if(e.checked){const n=e.dataset.property,a=e.dataset.value;if(n&&void 0!==t[n]){let e=a;"true"===e&&(e=!0),"false"===e&&(e=!1),t[n]=e}}for(let t=0;t<n.length;t++){const r=n[t];r.checked&&(r.name?(a.push(r.name),e.id&&r.setAttribute("data-id",e.id)):e.id&&a.push(e.id))}t.value=a.toString(),e._targetDispatchTimer&&clearTimeout(e._targetDispatchTimer),e._targetDispatchTimer=setTimeout((()=>{t.dispatchEvent(new Event("change"))}),100)}}}_changeCheckState(e){const t=this;let n=null;null===t.checked?t.checked=!0:(n=t.checked,t.checked=!t.checked),t._handleTextSelection(),t.$.fireEvent("change",{value:t.checked,oldValue:n,changeType:e}),t.checked?t.$.fireEvent("checkValue",{changeType:e}):t.$.fireEvent("uncheckValue",{changeType:e}),t._updateGroupValue(),t._setAriaState()}_handleTextSelection(){const e=this;e.$.addClass("smart-unselectable"),e.timer&&clearTimeout(e.timer),e.timer=setTimeout((()=>e.$.removeClass("smart-unselectable")),500)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;if("checked"===e)return a.$.fireEvent("change",{value:n,oldValue:t,changeType:"api"}),void a._setAriaState();switch(e){case"trueTemplate":a._handleTemplate(!0);break;case"falseTemplate":a._handleTemplate(!1);break;case"indeterminateTemplate":a._handleTemplate()}}_htmlBindOnInitialization(){const e=this;e._bindContentProperty("trueContent","smart-true-content"),e._bindContentProperty("falseContent","smart-false-content"),e._bindContentProperty("indeterminateContent","smart-indeterminate-content")}_bindContentProperty(e,t){const n=this;if(!n.$[e+"Container"])return;let a=document.createElement("div");a.innerHTML=n.innerHTML;let r,i=a.getElementsByClassName(t);if(i.length>0)for(let e=0;e<i.length;e++)r=i[e];""===n[e]&&(n[e]=void 0===r?"":r.outerHTML),n.$[e+"Container"].innerHTML=n[e]}_updateContentProperties(){const e=this;function t(t){e.$[t+"Container"]&&(e[t]=e.$[t+"Container"].innerHTML)}t("trueContent"),t("falseContent"),t("indeterminateContent")}_updateHidenInputValue(){const e=this;if(!e.$.hiddenInput)return;let t;t=null===e.checked?"null":!1===e.checked?"off":e.value||"on",e.$.hiddenInput.setAttribute("value",t)}_updateHidenInputName(){const e=this;if(!e.$.hiddenInput)return;let t=!1===e.checked?"":e.name||"";e.$.hiddenInput.setAttribute("name",t)}_updateHidenInputNameAndValue(){this._updateHidenInputName(),this._updateHidenInputValue()}_handleTemplate(e,t){const n=this;let a,r,i;if(!0===e?(a=n.trueTemplate,r=n.$.trueContentContainer,i=n.trueContent):!1===e?(a=n.falseTemplate,r=n.$.falseContentContainer,i=n.falseContent):(a=n.indeterminateTemplate,r=n.$.indeterminateContentContainer,i=n.indeterminateContent),t&&(r.innerHTML=i||""),null===a||!a)return;if("function"==typeof a)return void a(r,{value:i});if(!("content"in document.createElement("template")))return void n.error(n.localize("htmlTemplateNotSuported",{elementType:n.nodeName.toLowerCase()}));if(a=document.getElementById(a),null===a||!("content"in a))return void n.error(n.localize("invalidTemplate",{elementType:n.nodeName.toLowerCase(),property:"template"}));const o=a.content,l=o.childNodes.length,s=/{{\w+}}/g;let u,d=[];for(let e=0;e<l;e++)for(u=s.exec(o.childNodes[e].innerHTML);u;)d.push({childNodeIndex:e,bindingString:u[0]}),u=s.exec(o.childNodes[e].innerHTML);const c=d.length;let p,h,m=document.importNode(a.content,!0);for(let e=0;e<c;e++){p=m.childNodes[d[e].childNodeIndex],h=d.length;for(let t=0;t<h;t++)p.innerHTML=p.innerHTML.replace(d[e].bindingString,i)}r.innerHTML="";for(let e=0;e<m.childNodes.length;e++)m.childNodes[e].outerHTML&&(r.innerHTML+=m.childNodes[e].outerHTML)}});
/***/ }),
/***/ 8585:
/***/ (() => {
Smart("smart-carousel",class extends Smart.ContentElement{static get properties(){return{adaptiveHeight:{value:!1,type:"boolean"},adaptiveAutoHeight:{value:!1,type:"boolean"},autoPlay:{value:!1,type:"any"},dataSource:{value:[],type:"array",reflectToAttribute:!1},delay:{value:200,type:"number"},displayMode:{allowedValues:["default","multiple","3d"],value:"default",type:"string"},disableItemClick:{value:!1,type:"boolean"},hideArrows:{value:!1,type:"boolean"},hideIndicators:{value:!1,type:"boolean"},indicatorTemplate:{value:null,type:"any"},interval:{value:5e3,type:"number"},itemTemplate:{value:null,type:"any"},keyboard:{value:!1,type:"boolean"},loop:{value:!1,type:"boolean"},messages:{value:{en:{htmlTemplateNotSuported:"{{elementType}}: Browser doesn't support HTMLTemplate elements."}},type:"object",extend:!0},slideShow:{value:!1,type:"boolean"},swipe:{value:!1,type:"boolean"},wheel:{value:!1,type:"boolean"}}}static get listeners(){return{"arrowLeft.click":"_handleArrowClick","arrowRight.click":"_handleArrowClick","indicatorsContainer.click":"_handleIndicatorsContainerClick",keydown:"_handleKeyDown",swipeleft:"_handleSwipe",swiperight:"_handleSwipe",wheel:"_handleMouseWheel","itemsContainer.click":"_handleItemClick","itemsContainer.transitionend":"_handleTransitionEnd"}}static get requires(){return{"Smart.RepeatButton":"smart.button.js"}}static get styleUrls(){return["smart.button.css","smart.carousel.css"]}get enableShadowDOM(){const e=this,t=Smart.EnableShadowDOM;return e._isInShadowDOM?!e._isInShadowDOM:e.isCompleted?null!==e.shadowRoot:t}template(){return'<div id="container" role="presentation">\n <div id="itemsContainer" inner-h-t-m-l="[[innerHTML]]" class="smart-items-container" role="presentation"><content></content></div>\n <smart-repeat-button initial-delay="0" right-to-left="[[rightToLeft]]" delay="[[delay]]" id="arrowLeft" animation="[[animation]]" unfocusable class="smart-arrow smart-arrow-left" aria-label="Previous slide"></smart-repeat-button>\n <smart-repeat-button initial-delay="0" right-to-left="[[rightToLeft]]" delay="[[delay]]" id="arrowRight" animation="[[animation]]" unfocusable class="smart-arrow smart-arrow-right" aria-label="Next slide"></smart-repeat-button>\n <div id="indicatorsContainer" class="smart-indicators-container" role="tablist"></div>\n </div>'}propertyChangedHandler(e,t,a){const n=this;switch(super.propertyChangedHandler(e,t,a),e){case"disabled":n._setFocusable();break;case"dataSource":if(n._currentIndex=0,n._generateIndicators(),n._generateItems(),n._handleIndicatorsState(0,0),n._handleItemsState(0,0),n._handle3dMode(0),!1!==n.autoPlay){const e=parseInt(n.autoPlay);e?setTimeout((function(){n.play()}),e):n.play()}n._animationTrigger(n._currentIndex),(n.adaptiveHeight||n.adaptiveAutoHeight)&&n._setAdaptiveHeight();break;case"itemTemplate":n._generateItems(),n._handleItemsState(n._currentIndex,n._currentIndex+1),(n.adaptiveHeight||n.adaptiveAutoHeight)&&n._setAdaptiveHeight();break;case"indicatorTemplate":n._generateIndicators(),n._handleIndicatorsState(n._currentIndex,n._currentIndex+1);break;case"interval":n.pause(),n.play();break;case"loop":n._handleArrowsActiveState(n._currentIndex,n._currentIndex);break;case"hideArrows":a||n._handleArrowsActiveState(n._currentIndex,n._currentIndex);break;case"displayMode":"multiple"===t&&n.$.itemsContainer.removeAttribute("style")}}render(){const e=this;if(e.setAttribute("role","region"),e.setAttribute("aria-roledescription","carousel"),e._setInitialState(),e._generateIndicators(),e._generateItems(),e._handleIndicatorsState(0,0),e._handleItemsState(0,0),e._handle3dMode(0),!1!==e.autoPlay){const t=parseInt(e.autoPlay);t?setTimeout((function(){e.play()}),t):e.play()}e._setFocusable(),e._animationTrigger(e._currentIndex),e._handleArrowsActiveState(0,e._currentIndex),(e.adaptiveHeight||e.adaptiveAutoHeight)&&(window.addEventListener("resize",(()=>{e._setAdaptiveHeight()})),e._setAdaptiveHeight()),super.render()}_setAdaptiveHeight(){const e=this;let t=10;(e.adaptiveHeight||e.adaptiveAutoHeight)&&(e._items.forEach((a=>{const n=a.querySelector("img");n&&(n.onload=()=>{e.classList.remove("smart-calculated-height"),e.offsetHeight<a.children[0].offsetHeight&&(e.style.height=a.children[0].offsetHeight+"px"),e.classList.add("smart-calculated-height")}),a.children[0].offsetHeight>t&&(t=a.children[0].offsetHeight)})),e.style.height=t+"px",e.classList.add("smart-calculated-height"))}_setAdaptiveAutoHeight(){const e=this;let t=10;e._items.forEach((e=>{e.classList.contains("smart-active")&&(t=e.children[0].offsetHeight)})),e.style.height=t+"px",e.classList.add("smart-calculated-height")}next(){const e=this,t=e.dataSource.length;if(e.disabled||0===t)return;let a=e._currentIndex;a=e.loop?a>=t-1?0:a+1:a>=t-1?a:a+1,e._goToItem(a)}pause(){this._handleRotation(),this._rotate=!1}slideTo(e){const t=this;e=e?parseInt(e):0,t.disabled||e<0||e>t._items.length||t._goToItem(e)}prev(){const e=this,t=e.dataSource.length;if(e.disabled||0===t)return;let a=e._currentIndex;a=e.loop?a<=0?t-1:a-1:a<=0?0:a-1,e._goToItem(a)}play(){const e=this;!e.disabled&&e.slideShow&&(e._rotationInterval&&clearInterval(e._rotationInterval),e._handleRotation(!0),e._rotate=!0)}_animationTrigger(e){const t=this;for(let a=0;a<t._items.length;a++)a!==e&&t._items[a].classList.add("smart-animate-trigger")}_handle3dMode(e){const t=this,a=t.dataSource.length;if(!t.disabled&&a&&"3d"===t.displayMode){e=e||0;for(let n=0;n<a;n++){const a=(n-e)*(t.rightToLeft?-1:1);a?t._items[n].setAttribute("position",a):t._items[n].removeAttribute("position")}}}_handleArrowsActiveState(e){const t=this,a=t.dataSource.length;t.loop?t.$.arrowLeft.disabled=t.$.arrowRight.disabled=!1:t.rightToLeft?(t.$.arrowRight.disabled=0===e,t.$.arrowLeft.disabled=e===a-1):(t.$.arrowLeft.disabled=0===e,t.$.arrowRight.disabled=e===a-1)}_handleArrowClick(e){const t=this,a=t._currentIndex;t.disabled||(t.rightToLeft?t.$.arrowLeft.contains(e.target)?t.next():t.prev():t.$.arrowLeft.contains(e.target)?t.prev():t.next(),t._changeEvent(a,t._currentIndex))}_handleDefaultInnerHTML(){const e=this;if(!(e.dataSource&&e.dataSource.length>0)&&e.$.itemsContainer.innerHTML.indexOf("<ul")>=0){const t=e.$.itemsContainer.getElementsByTagName("ul")[0].getElementsByTagName("li");for(let a=0;a<t.length;a++){const n={HTMLcontent:t[a].innerHTML};e.dataSource.push(n)}}}_handleIndicatorsState(e,t){const a=this;a.disabled||0===a._indicators.length||!e&&0!==e||!t&&0!==t||(e!==t&&(a._indicators[e].classList.remove("smart-active"),a._indicators[e].setAttribute("aria-selected",!1)),a._indicators[t].classList.add("smart-active"),a._indicators[t].setAttribute("aria-selected",!0))}_handleItemClick(e){const t=this,a=e.target.closest(".smart-carousel-item");if(t.disabled||!a||"3d"!==t.displayMode||t.disableItemClick)return;const n=parseInt(a.getAttribute("item-id")),i=parseInt(a.getAttribute("position"));Math.abs(i)>3||t._goToItem(n)}_handleItemsState(e,t){const a=this;a.disabled||0===a._items.length||!e&&0!==e||!t&&0!==t||(e!==t&&(a._items[e].classList.remove("smart-active"),a._items[e].classList.add("smart-out")),a._items[t].classList.add("smart-active"))}_handleIndicatorsContainerClick(e){const t=this,a=e.target.closest(".smart-indicator"),n=t._currentIndex;if(t.disabled||!a)return;const i=parseInt(a.getAttribute("indicator-id"));n!==i&&(t._goToItem(i),t._changeEvent(n,t._currentIndex))}_handleMultipleMode(e){const t=this;if("multiple"!==t.displayMode)return;const a=t._items[e].offsetWidth,n=t.$.container.offsetWidth,i=t.$.itemsContainer.offsetWidth;let r=0;if(0!==e)if(e!==t._items.length-1){for(let a=0;a<e;a++)r+=t._items[e].offsetWidth;r+a/2>=n/2&&r+a<i&&(t.$.itemsContainer.style.marginLeft="-"+(r+a/2-n/2)+"px")}else t.$.itemsContainer.style.marginLeft="-"+(i-n)+"px";else t.$.itemsContainer.style.marginLeft="0px"}_changeEvent(e,t){if(e===t)return;const a=this;a.onIndexChange?a.onIndexChange(t):(a.$.fireEvent("changing",{index:t,previousIndex:e}),a.hasAnimation&&"default"!==a.displayMode||a.$.fireEvent("change",{index:t,previousIndex:e}))}_handleKeyDown(e){const t=this,a=e.key,n=t._currentIndex;if(!t.disabled&&t.keyboard&&-1!==["ArrowLeft","ArrowDown","ArrowRight","ArrowUp","Home","End"," ","Enter"].indexOf(a)){switch(a){case"ArrowLeft":case"ArrowDown":t.rightToLeft?t.next():t.prev();break;case"ArrowUp":case"ArrowRight":t.rightToLeft?t.prev():t.next();break;case"Home":t._goToItem(0);break;case"End":t._goToItem(t.dataSource.length-1);break;case" ":t._rotate?t.pause():t.play();break;case"Enter":t.play()}t._changeEvent(n,t._currentIndex)}}_handleMouseWheel(e){const t=this,a=t._currentIndex;!t.disabled&&t.wheel&&document.activeElement===t&&(e.stopPropagation(),e.preventDefault(),e.deltaY>0?t.next():t.prev(),t._changeEvent(a,t._currentIndex))}_handleRotation(e){const t=this;e?t._rotationInterval=setInterval((function(){t.slideShow&&t.next()}),t.interval):clearInterval(t._rotationInterval)}_handleSwipe(e){const t=this;!t.disabled&&t.swipe&&(e.stopPropagation(),e.preventDefault(),"swipeleft"===e.type?t.prev():t.next())}_generateIndicator(e){const t=this,a=document.createElement("span"),n=e||0;if(t.indicatorTemplate){const e=t._validateTemplate(t.indicatorTemplate);a.innerHTML=t._processItemTemplate(e.content,t.dataSource[n])}return a.setAttribute("role","tab"),a.setAttribute("aria-selected",!1),a.classList.add("smart-indicator"),a.setAttribute("indicator-id",n),a}_generateIndicators(){const e=this,t=e.dataSource.length;let a=[],n=document.createDocumentFragment();for(let i=0;i<t;i++){const t=e._generateIndicator(i);a.push(t),n.appendChild(t)}e._indicators=a;const i=e.$.indicatorsContainer;for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n)}_generateItem(e){const t=this,a=e||0,n=t.dataSource[a],i=document.createElement("div");if(i.id=t.id+"Slide"+e,t.itemTemplate){const e=t._validateTemplate(t.itemTemplate);i.innerHTML=t._processItemTemplate(e.content,t.dataSource[a])}else"string"==typeof n?i.style.backgroundImage='url("'+n+'")':i.innerHTML=`<div class="smart-carousel-item-container" style="background-image:url('${n.image||""}')" role="presentation">\n <h2 id="${i.id+"Label"}" class="smart-carousel-item-label">${n.label||""}</h2 >\n <p class="smart-carousel-item-content">${n.content||""}</p>\n </div>\n <div class="smart-carousel-html-content">${n.HTMLcontent||""}</div>\n </div>`;return n.label?(i.setAttribute("aria-labelledby",i.id+"Label"),t._indicators[e].setAttribute("aria-labelledby",i.id+"Label")):(i.setAttribute("aria-label","Slide "+e),t._indicators[e].setAttribute("aria-label","Slide "+e)),t._indicators[e].setAttribute("aria-controls",i.id),i.setAttribute("role","tabpanel"),i.classList.add("smart-carousel-item"),i.setAttribute("item-id",a),i}_processItemTemplate(e,t){const a=e.match(/{{\w+}}/g);let n=e;return a&&0!==a.length?(a.forEach((function(e){const a=e.replace("{{","").replace("}}","");n=n.replace(e,t[a]||"")})),n):n}_generateItems(){const e=this,t=e.dataSource.length;let a=[],n=document.createDocumentFragment();for(let i=0;i<t;i++){const t=e._generateItem(i);a.push(t),n.appendChild(t)}e._items=a;const i=e.$.itemsContainer;for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(n)}_goToItem(e,t){const a=this,n=a.dataSource.length,i=a._currentIndex;let r=e;e<0?r=0:e>n-1&&(r=n-1),a._removeFadeOut(),a._animationTrigger(),a._handleIndicatorsState(i,r),a._handleItemsState(i,r),a._currentIndex=r,t&&a._changeEvent(i,r),a._handle3dMode(r),a._handleMultipleMode(r),a._handleArrowsActiveState(r,i),a.adaptiveAutoHeight&&a._setAdaptiveAutoHeight()}_setFocusable(){const e=this;if(e.disabled||e.unfocusable)return e.removeAttribute("tabindex"),void(e.tabIndex=-1);let t=e.tabIndex>0?e.tabIndex:0;e.setAttribute("tabindex",t),e.tabIndex=t}_setInitialState(){const e=this;e._currentIndex=0,e._indicators=[],e._items=[],e._rotate=!1,e._handleDefaultInnerHTML()}_validateTemplate(e){const t=this;let a="",n=!1;return"function"==typeof e&&(a=e()),"content"in document.createElement("template")?(a=e instanceof HTMLElement||(e=document.getElementById(e))?e.innerHTML:"",/{{\w+}}/g.exec(a)&&(n=!0),{content:a,hasBindings:n}):(t.error(t.localize("htmlTemplateNotSuported",{elementType:t.nodeName.toLowerCase()})),void(t.itemTemplate=null))}_handleTransitionEnd(e){if(!e.target.classList.contains("smart-carousel-item")||e.target.getAttribute("position"))return;const t=this,a=e.target.getAttribute("item-id");t._lastTransitionEndId!==a&&(t._removeFadeOut(),this.$.fireEvent("change",{index:a,previousIndex:t._lastTransitionEndId}),t._lastTransitionEndId=a)}_removeFadeOut(){const e=this.$.itemsContainer.getElementsByClassName("smart-out");if(e.length)for(let t=0;t<e.length;t++)e[t].classList.remove("smart-out")}});
/***/ }),
/***/ 6321:
/***/ (() => {
!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,