UNPKG

smart-webcomponents

Version:

Web Components & Custom Elements for Professional Web Applications

41 lines (24 loc) 181 kB
/* Smart UI v22.0.10 (2025-02-10) 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)}}); /***/ }), /***/ 9097: /***/ (() => { Smart("smart-check-box",class extends Smart.ToggleButton{static get properties(){return{checkMode:{value:"both",allowedValues:["both","input","label"],type:"string"},type:{value:"checkbox",type:"string",defaultReflectToAttribute:!0,readonly:!0}}}template(){return"<div id='container' class='smart-container' role=\"presentation\">\n <div class='smart-overlay' role=\"presentation\"></div>\n <span id='checkBoxInput' class='smart-input' aria-hidden=\"true\"></span>\n <span id='checkBoxLabel' inner-h-t-m-l='[[innerHTML]]' class='smart-label'><content></content></span>\n <input id='hiddenInput' class='smart-hidden-input' type='hidden'>\n </div>"}static get listeners(){return{down:"_downHandler","document.up":"_documentUpHandler","checkBoxInput.mouseenter":"_mouseEnterHandler","checkBoxInput.mouseleave":"_mouseLeaveHandler",focus:"_focusHandler",blur:"_blurHandler"}}static get styleUrls(){return["smart.toggle.css"]}_focusHandler(){this.$.setAttributeValue("focus",!0)}_blurHandler(){this.$.setAttributeValue("focus",!1)}_mouseEnterHandler(){this.$.setAttributeValue("hover",!0)}_mouseLeaveHandler(){this.$.setAttributeValue("hover",!1)}ready(){const e=this;super.ready(),e.setAttribute("role","checkbox"),e.indeterminate&&(e._valueCache=e.checked,e.checked=null,e._setAriaState()),e.classList.add("smart-toggle-box"),e._updateHidenInputNameAndValue()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(n._updateContentProperties(),e){case"indeterminate":a?(n._valueCache=n.checked,n.checked=null):n.checked=n._valueCache,n._setAriaState(),n._updateHidenInputNameAndValue();break;case"value":case"checked":n._updateHidenInputNameAndValue();break;case"name":n._updateHidenInputName()}}_documentUpHandler(e){const t=this;if(!t._pressed||"pointercancel"===e.originalEvent.type)return;const a=t.enableShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;if(t._pressed=!1,t.$.setAttributeValue("active",!1),!(t.disabled||t.readonly||"input"===t.checkMode&&a!==t.$.checkBoxInput||"label"===t.checkMode&&a!==t.$.checkBoxLabel)){if("press"===t.clickMode)return e.preventDefault(),void e.stopPropagation();t._changeCheckState("pointer"),t.focus(),t._handleTextSelection(),t._updateHidenInputNameAndValue()}}_downHandler(e){const t=this,a=t.enableShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;if(!(t.disabled||t.readonly||"input"===t.checkMode&&a!==t.$.checkBoxInput||"label"===t.checkMode&&a!==t.$.checkBoxLabel)){if(t.$.setAttributeValue("active",!0),t.hasRippleAnimation){const e=t.$.checkBoxInput.getBoundingClientRect(),a=window.scrollX||window.pageXOffset,n=window.scrollY||window.pageYOffset;Smart.Utilities.Animation.Ripple.animate(t.$.checkBoxInput,e.left+e.width/2+a,e.top+e.height/2+n)}t._pressed=!0,"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||(t._changeCheckState("pointer"),t.$.fireEvent("click"),t.focus(),t._updateHidenInputNameAndValue())}}_setAriaState(){const e=this,t=e.checked;null!==t?e.setAttribute("aria-checked",t):e.setAttribute("aria-checked","mixed")}}); /***/ }), /***/ 9346: /***/ (() => { Smart("smart-drop-down-button",class extends Smart.ContentElement{static get properties(){return{autoCloseDelay:{value:100,type:"number"},placeholderTemplate:{value:"",type:"any"},dropDownAppendTo:{value:null,type:"any"},dropDownButtonPosition:{allowedValues:["none","left","right","top","bottom"],value:"right",type:"string"},dropDownHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownMaxHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownMaxWidth:{value:"",type:"any",validator:"_propertyValidator"},dropDownMinHeight:{value:"",type:"any",validator:"_propertyValidator"},dropDownMinWidth:{value:"",type:"any",validator:"_propertyValidator"},dropDownOpenMode:{allowedValues:["none","default","dropDownButton","auto"],value:"default",type:"string"},dropDownOverlay:{value:!1,type:"boolean"},dropDownPlaceholder:{value:"No Items",type:"string"},dropDownPosition:{allowedValues:["auto","top","bottom","overlay-top","overlay-center","overlay-bottom","center-bottom","center-top"],value:"auto",type:"string"},dropDownWidth:{value:"",type:"any",validator:"_propertyValidator"},hint:{value:"",type:"string"},horizontalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},label:{value:"",type:"string"},messages:{extend:!0,value:{en:{invalidNode:'smart-drop-down-button: Invalid parameter "{{node}}" when calling {{method}}.'}},type:"object"},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},placeholder:{value:"",type:"string"},resizeIndicator:{value:!1,type:"boolean"},resizeMode:{value:"none",allowedValues:["none","horizontal","vertical","both"],type:"string"},verticalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},contentSelector:{value:"",type:"string"}}}static get listeners(){return{"actionButton.down":"_buttonsDownHandler","actionButton.mouseenter":"_buttonsMouseEventsHandler","actionButton.mouseleave":"_buttonsMouseEventsHandler","document.selectstart":"_selectStartHandler","document.dragstart":"_dragStartHandler","document.down":"_documentDownHandler","document.up":"_documentUpHandler","document.move":"_documentMoveHandler","dropDownButton.down":"_buttonsDownHandler","dropDownButton.mouseenter":"_buttonsMouseEventsHandler","dropDownButton.mouseleave":"_buttonsMouseEventsHandler",keydown:"_keyDownHandler",keyup:"_keyUpHandler",focus:"_focusEventHandler",blur:"_blurEventHandler","dropDownContainer.transitionend":"_dropDownTransitionendHandler",mouseenter:"_mouseEnterHandler",mouseleave:"_mouseLeaveHandler",resize:"_resizeHandler","resizeBar.move":"_resizeBarMoveHandler",styleChanged:"_styleChangedHandler"}}template(){return'<div id="container" role="presentation">\n <span class="smart-label" id="label">[[label]]</span>\n <div id="content" class="smart-content" role="presentation">\n <div id="buttonsContainer" class="smart-buttons-container" role="presentation">\n <span id="actionButton" class="smart-action-button">[[placeholder]]</span>\n <span id="dropDownButton" class="smart-drop-down-button">\n <span class="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n </span>\n </div>\n <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="dialog">\n <smart-scroll-viewer id="scrollViewer" inner-h-t-m-l=\'[[innerHTML]]\'\n right-to-left="[[rightToLeft]]"\n horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]">\n <content></content>\n </smart-scroll-viewer>\n <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n <div></div>\n </div>\n </div>\n </div>\n <span class="smart-hidden smart-hint" id="hint">[[hint]]</span>\n </div>'}static get styleUrls(){return["smart.scrollviewer.css","smart.dropdown.css","smart.dropdownbutton.css"]}attached(){const e=this;super.attached(),e.isCompleted&&e.$.dropDownContainer&&(e._positionDetection.dropDownAttached("_setDropDownSize"),e._positionDetection.checkBrowserBounds())}detached(){const e=this;super.detached(),e.$.dropDownContainer&&(e.close(),e._positionDetection.dropDownDetached())}propertyChangedHandler(e,t,o){const n=this;switch(e){case"disabled":case"unfocusable":n._setFocusable();break;case"dropDownAppendTo":n._positionDetection.dropDownAppendToChangedHandler();break;case"dropDownHeight":case"dropDownMaxHeight":case"dropDownMaxWidth":case"dropDownMinHeight":case"dropDownMinWidth":case"dropDownWidth":n._setDropDownSize();break;case"dropDownOpenMode":n._setFocusable(),n.close(),n._setAriaRelations();break;case"dropDownOverlay":o||n._positionDetection.removeOverlay();break;case"dropDownPlaceholder":n.$.dropDownContainer.hasAttribute("empty")&&(n.$.scrollViewer.$.scrollViewerContentContainer.innerHTML=o,n.opened&&n.$.scrollViewer.refresh());break;case"dropDownPosition":n._positionDetection.dropDownPositionChangedHandler();break;case"innerHTML":""===o.trim()?(n.$.dropDownContainer.setAttribute("empty",""),requestAnimationFrame((()=>n.$.scrollViewer.$.scrollViewerContentContainer.innerHTML=n.dropDownPlaceholder))):(n.$.dropDownContainer.removeAttribute("empty"),n.$.scrollViewer.$.scrollViewerContentContainer.innerHTML=o),n.opened&&n.$.scrollViewer.refresh();break;case"opened":o?n.open():n.close();break;case"placeholder":""!==t&&""!==o||n._setFocusable();break;case"resizeIndicator":o?n.$.dropDownContainer.setAttribute("resize-indicator",""):n.$.dropDownContainer.removeAttribute("resize-indicator");break;case"resizeMode":n.$.dropDownContainer.setAttribute("resize-mode",n.resizeMode),n.opened&&n.$.scrollViewer.refresh();break;case"placeholderTemplate":n._applyPlaceholderTemplate();break;case"label":o?n._ariaButton.setAttribute("aria-labelledby",n.$.label.id):"DropDownButton"===n.elementName&&n._ariaButton.setAttribute("aria-labelledby",n.$.actionButton.id)}}appendChild(e){const t=this;if(!t.isCompleted||e instanceof HTMLElement&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?(t.$.scrollViewer.appendChild(e),t.opened&&t.$.scrollViewer.refresh()):t.error(t.localize("invalidNode",{method:"removeChild",node:"node"}))}removeChild(e){const t=this;if(!t.isCompleted||e instanceof HTMLElement&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.removeChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}e?t.$.dropDownContainer.contains(e)&&(t.$.scrollViewer.removeChild(e),t.opened&&t.$.scrollViewer.refresh()):t.error(t.localize("invalidNode",{method:"removeChild",node:"node"}))}removeAll(){const e=this;e.isCompleted&&e.$.scrollViewer.removeAll()}_open(){const e=this;if(!e.disabled&&e.offsetHeight&&e.$dropDownContainer.hasClass("smart-visibility-hidden")){if(e.$dropDownContainer.hasClass("not-in-view")&&e.$dropDownContainer.removeClass("not-in-view"),e.$.dropDownContainer.style.transition=null,e.dropDownAppendTo&&e.dropDownAppendTo.length>0){const t=e.getBoundingClientRect();if(e.$.container.contains(e.$.dropDownContainer)){let t=0;const o=setInterval((function(){const n=e.getBoundingClientRect();t++,n.top===e._positionTop&&t<10||(e.open(),clearInterval(o),e._positionTop=n.top)}),100);return}t.top!==e._positionTop&&(e._positionTop=t.top)}e.$.fireEvent("opening").defaultPrevented||(e.opened=!0,e._ariaButton.setAttribute("aria-expanded",!0),e._positionDetection.placeOverlay(),e._positionDetection.checkBrowserBounds("vertically"),e._positionDetection.positionDropDown(),e._positionDetection.checkBrowserBounds("horizontally"),e.$dropDownContainer.removeClass("smart-visibility-hidden"),e.$.fireEvent("open"),e.$.dropDownButton&&("dropDownButton"===e.dropDownOpenMode?e.$.dropDownButton.setAttribute("selected",""):e.$.dropDownButton.removeAttribute("selected")),e.$.input&&e.$.input.focus())}}toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this,t=document.querySelectorAll("smart-drop-down-button, smart-color-picker");for(let o=0;o<t.length;o++)t[o]!==e&&t[o].opened&&t[o].close();e._open(),e.$.scrollViewer.refresh()}scrollTo(e,t){this.isCompleted&&this.$.scrollViewer.scrollTo(e,t)}ready(){super.ready()}_applyPlaceholderTemplate(){const e=this;if(e.placeholderTemplate){const t=document.createElement("div");let o;if("string"==typeof e.placeholderTemplate&&e.placeholderTemplate.startsWith("#")&&(o=document.querySelector(e.placeholderTemplate)),"function"==typeof e.placeholderTemplate){const t=e.placeholderTemplate();if(t)return void(e.$.actionButton.innerHTML=t)}o instanceof HTMLTemplateElement?t.appendChild(o.content.cloneNode(!0)):o instanceof HTMLElement?t.appendChild(o):t.innerHTML=e.placeholderTemplate,e.$.actionButton.innerHTML=t.innerHTML}}render(){const e=this;if(e.rightToLeft&&(e.dropDownButtonPosition="right"===e.dropDownButtonPosition?"left":"right"),e.classList.add("smart-drop-down-box"),e._edgeMacFF=Smart.Utilities.Core.Browser.Edge||Smart.Utilities.Core.Browser.Firefox&&-1!==navigator.platform.toLowerCase().indexOf("mac"),e._positionDetection=new Smart.Utilities.PositionDetection(e,e.$.dropDownContainer,e.$.container,"close"),e._positionDetection.getDropDownParent(!0),e._positionDetection.setDropDownPosition(),e._calculateDropDownSize(),e.$.dropDownContainer.setAttribute("resize-mode",e.resizeMode),e.resizeIndicator&&e.$.dropDownContainer.setAttribute("resize-indicator",""),e._positionDetection.handleAutoPositioning(),e.$.label&&!e.$.label.id&&(e.$.label.id=e.id+"Label"),e.$.actionButton&&!e.$.actionButton.id&&(e.$.actionButton.id=e.id+"ActionButton"),e.$.hint&&!e.$.hint.id&&(e.$.hint.id=e.id+"Hint"),e.dropDownAppendTo)for(let t=0;t<e.classList.length;t++){const o=e.classList[t];e.$.dropDownContainer.classList.add(o)}if(e._applyPlaceholderTemplate(),e._createElement(),e.contentSelector)if(e.contentSelector instanceof HTMLElement)e.$.scrollViewer.$.scrollViewerContentContainer.appendChild(e.contentSelector);else{const t=document.querySelector(e.contentSelector);t&&(e.$.scrollViewer.innerHTML="",t.style.display="",e.$.scrollViewer.appendChild(t))}e.opened?e.open():e.hasAnimation&&e._edgeMacFF&&e.$dropDownContainer.addClass("not-in-view"),e._positionTop=e.getBoundingClientRect().top,super.render()}_setAriaRelations(e){const t=this;let o,n;"dropDownButton"!==t.dropDownOpenMode?(o=t.$.dropDownButton,o.setAttribute("aria-hidden",!0),n=t,t.$.actionButton.removeAttribute("role")):(o=t,n=t.$.dropDownButton,n.removeAttribute("aria-hidden"),t.$.actionButton.setAttribute("role","button")),t._ariaButton=n,n.setAttribute("role","button"),n.setAttribute("aria-haspopup","dialog"),n.setAttribute("aria-owns",t.$.dropDownContainer.id),n.setAttribute("aria-describedby",t.$.hint.id),t.label?n.setAttribute("aria-labelledby",t.$.label.id):"DropDownButton"===t.elementName&&n.setAttribute("aria-labelledby",t.$.actionButton.id),o.setAttribute("role","presentation"),o.removeAttribute("aria-owns"),e?n.setAttribute("aria-expanded",t.opened):(o.removeAttribute("aria-describedby"),o.removeAttribute("aria-expanded"),o.removeAttribute("aria-haspopup"),o.removeAttribute("aria-labelledby"))}_setDropDownSize(){const e=this;e._dropDownSize||e._calculateDropDownSize(),["dropDownMinWidth","dropDownMinHeight","dropDownMaxWidth","dropDownMaxHeight"].forEach((t=>{e.$.dropDownContainer.style[t.replace("dropDown","").replace(/^./,"m")]=e[t]?e[t]+(e[t].toString().endsWith("%")?"%":"px"):null})),e.dropDownWidth?"auto"!==e.dropDownWidth?e.$.dropDownContainer.style.width=("initial"===e.dropDownWidth?e.offsetWidth:parseFloat(e.dropDownWidth))+"px":e.$.dropDownContainer.style.width="auto":e.$.dropDownContainer.style.width="auto"===e._dropDownSize.width?"auto":(parseFloat(e._dropDownSize.width)||0)+"px",e.dropDownHeight&&"auto"!==e.dropDownHeight?e.$.dropDownContainer.style.height=parseFloat(e.dropDownHeight)+((e.dropDownHeight+"").indexOf("%")>-1?"%":"px"):e.$.dropDownContainer.style.height=e._dropDownSize.height}_setFocusable(){const e=this;if(e.disabled||e.unfocusable)return e.removeAttribute("tabindex"),e.$.actionButton.removeAttribute("tabindex"),void e.$.dropDownButton.removeAttribute("tabindex");let t=e.tabIndex>0?e.tabIndex:0;"dropDownButton"===e.dropDownOpenMode?(e.removeAttribute("tabindex"),e.$.actionButton.setAttribute("tabindex",t),e.$.dropDownButton.setAttribute("tabindex",t)):(e.$.actionButton.removeAttribute("tabindex"),e.$.dropDownButton.removeAttribute("tabindex"),e.tabIndex=t)}_calculateDropDownSize(){const e=this;e._dropDownSize={};const t=window.getComputedStyle(e.$.dropDownContainer),o=parseFloat(t.getPropertyValue("border-top-width").trim()),n=parseFloat(t.getPropertyValue("border-bottom-width").trim()),r=parseFloat(t.getPropertyValue("margin-top").trim()),i=parseFloat(t.getPropertyValue("margin-bottom").trim()),a=parseFloat(t.getPropertyValue("padding-top").trim()),s=parseFloat(t.getPropertyValue("padding-bottom").trim());Smart.Utilities.Core.CSSVariablesSupport()&&(e._dropDownSize.width=t.getPropertyValue("--smart-drop-down-list-drop-down-width").trim(),e._dropDownSize.height=t.getPropertyValue("--smart-drop-down-list-drop-down-height").trim()),(!e._dropDownSize.width||e._dropDownSize.width.indexOf("initial")>-1)&&(e._dropDownSize.width=e.offsetWidth),e._dropDownSize.height||(e._dropDownSize.height="auto"),e._dropDownSize.minHeight=parseFloat(t.getPropertyValue("min-height").trim()),e._dropDownSize.maxHeight=parseFloat(t.getPropertyValue("max-height").trim()),e._dropDownSize.borderWidth=(isNaN(o)?0:o)+(isNaN(n)?0:n),e._dropDownSize.paddingWidth=(isNaN(a)?0:a)+(isNaN(s)?0:s),e._dropDownSize.marginWidth=(isNaN(r)?0:r)+(isNaN(i)?0:i)}_createElement(){const e=this;""===e.innerHTML.trim()&&(e.$.dropDownContainer.setAttribute("empty",""),e.$.scrollViewer.$.scrollViewerContentContainer.innerHTML=e.dropDownPlaceholder),e._setDropDownSize(),e._setFocusable(),e._setAriaRelations(!0),e.$.arrow.noRipple=!0}_dragStartHandler(e){this._resizeDetails&&this._resizeDetails.started&&e.preventDefault()}_dropDownTransitionendHandler(){const e=this;e._edgeMacFF&&!e.opened&&e.hasAnimation&&(e.$.dropDownContainer.style.top=e.$.dropDownContainer.style.left="",e.$dropDownContainer.addClass("not-in-view"))}_blurEventHandler(){const e=this;e.hasAttribute("focus")&&(e.$.dropDownButton&&(e.removeAttribute("focus"),e.$.dropDownButton.removeAttribute("focus")),e.$.actionButton&&(e.removeAttribute("focus"),e.$.actionButton.removeAttribute("focus")),e.$.fireEvent("blur"))}_focusEventHandler(){const e=this;e.hasAttribute("focus")||(e.$.dropDownButton&&(e.setAttribute("focus",""),e.$.dropDownButton.setAttribute("focus","")),e.$.actionButton&&(e.setAttribute("focus",""),e.$.actionButton.setAttribute("focus","")),e.$.fireEvent("focus"))}_getUpEventTarget(e){const t=this;let o=e;if(o===t.$.dropDownContainer)return"dropDownContainer";for(o=void 0===o.parentElement?o.getRootNode().host:o.parentElement;o;){if(o===t.$.dropDownContainer){o="dropDownContainer";break}o=void 0===o.parentElement?o.getRootNode().host:o.parentElement}return o}close(){const e=this;e.$dropDownContainer&&(e.$dropDownContainer.hasClass("smart-visibility-hidden")||e.$.fireEvent("closing").defaultPrevented||(e.$dropDownContainer.addClass("smart-visibility-hidden"),e.$.fireEvent("close"),e.$.dropDownButton&&e.$.dropDownButton.removeAttribute("selected"),e.opened=!1,e._ariaButton.setAttribute("aria-expanded",!1),e._preventDropDownClose=!1,e._positionDetection.removeOverlay(!0),e._edgeMacFF&&!e.hasAnimation&&(e.$.dropDownContainer.style.top=e.$.dropDownContainer.style.left="",e.$dropDownContainer.addClass("not-in-view"))))}_documentUpHandler(e){const t=this,o=t.hasAttribute("resizing");if(t.$.actionButton.removeAttribute("active"),t._resizeDetails&&t._resizeDetails.started)return t._resizeDetails.started=t._resizeDetails.resizeEventFired=!1,t.removeAttribute("resizing"),t._preventDropDownClose=!1,t.focus(),void t.$.fireEvent("resizeEnd",{position:{left:e.pageX,top:e.pageY}});if(t.disabled||t._isDropDownClicked||t.readonly)return void delete t._isDropDownClicked;if(t._overlayDown)return t.close(),void delete t._overlayDown;let n=e.originalEvent.target;if(t.isInShadowDOM&&(n=e.originalEvent.composedPath()[0]),t._preventsSelectStart=!1,void 0===n||n===t.$.resizeBar)return;const r=n.closest(".smart-action-button");let i;if(t._buttonClicked&&("dropDownButton"===t.dropDownOpenMode&&r&&t._buttonClicked===t.$.actionButton?t.$.fireEvent("actionButtonClick"):n.closest(".smart-drop-down-button")!==t._buttonClicked&&r!==t._buttonClicked||(i=!0,t.$.fireEvent("dropDownButtonClick"))),t._buttonClicked=void 0,!t.editable&&r===t.$.actionButton||n.closest(".smart-drop-down-button")===t.$.dropDownButton)return"dropDownButton"===t.dropDownOpenMode&&r===t.$.actionButton?void t.close():void(t.$dropDownContainer.hasClass("smart-visibility-hidden")&&"none"!==t.dropDownOpenMode&&i&&"pointercancel"!==e.originalEvent.type?t.open():t.close());n=t._getUpEventTarget(n),void 0!==n&&(("dropDownContainer"!==n&&"item"!==n||"item"===n&&"checkBox"!==t.selectionMode&&t.selectionMode.indexOf("Many")<0)&&t.close(),o&&t.$.scrollViewer&&t.$.scrollViewer.refresh())}_keyDownHandler(e){const t=this,o=(t.shadowRoot||t.getRootNode()).activeElement||document.activeElement;if(!(t.disabled||t.readonly||o!==t&&o!==t.$.dropDownButton&&o!==t.$.actionButton))switch(e.key){case"Enter":case" ":e.preventDefault(),e.target!==t.$.actionButton&&(t.opened&&"Enter"===e.key?t.close():t.opened||t.readonly||"none"===t.dropDownOpenMode||t.open()),"dropDownButton"===t.dropDOwnOpenMode&&e.target.setAttribute("active","");break;case"End":t.$.scrollViewer.scrollTop=t.$.scrollViewer.scrollHeight;break;case"Home":t.$.scrollViewer.scrollTop=0;break;case"PageUp":case"PageDown":t.$.scrollViewer.scrollTop+=(e.key.indexOf("Down")>-1?1:-1)*t.$.dropDownContainer.offsetHeight;break;case"ArrowUp":case"ArrowDown":if(e.altKey)return void(t.disabled||t.readonly||"none"===t.dropDownOpenMode||(t.$dropDownContainer.hasClass("smart-visibility-hidden")?t.open():t.close()));e.preventDefault(),t.$.scrollViewer.scrollTop+=10*(e.key.indexOf("Down")>-1?1:-1);break;case"Escape":e.preventDefault(),t.close()}}_keyUpHandler(e){const t=this.isInShadowDOM?e.composedPath()[0]:e.target;"Enter"!==e.key&&" "!==e.key||t.removeAttribute("active")}_propertyValidator(e,t){return"number"!=typeof t&&"string"!=typeof t?e:t}_mouseEnterHandler(){const e=this;e._isElementHovered=!0,"auto"!==e.dropDownOpenMode||e.disabled||e.readonly||e.open()}_mouseLeaveHandler(){const e=this;e.removeAttribute("hover"),e._isElementHovered=!1,"auto"!==e.dropDownOpenMode||e.disabled||e.readonly||e._autoClose()}_autoClose(){const e=this;e._autoCloseTimeout=setTimeout(function(){e._isElementHovered||e.close(),clearTimeout(e._autoCloseTimeout)}.bind(e),e.autoCloseDelay)}_documentMoveHandler(e){const t=this,o=t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;if("auto"===t.dropDownOpenMode&&null!==t.dropDownAppendTo&&(t.contains(o)||t.$.dropDownContainer.contains(o)?t._isElementHovered=!0:(t._isElementHovered=!1,t._autoClose())),!t._resizeDetails||t._resizeDetails&&!t._resizeDetails.started)return;t.setAttribute("resizing",""),t._resizeDetails.resizeEventFired||(t.$.fireEvent("resizeStart",{position:{left:e.pageX,top:e.pageY}}),t._resizeDetails.resizeEventFired=!0);const n=document.documentElement,r=t.$.dropDownContainer.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.$.dropDownContainer.hasAttribute("top")?"top":"bottom";let s;function l(){if(s=e.pageY-t._resizeDetails.y,"bottom"===a)t._resizeDetails.height=Math.min(n.clientHeight-r.top-6,Math.max(0,t._resizeDetails.height+s)),t._resizeDetails.y=Math.max(r.top+n.scrollTop-t._resizeDetails.offsetY,Math.min(n.clientHeight+n.scrollTop-1.5*t._resizeDetails.offsetY,e.pageY));else{if(t._resizeDetails.height=Math.min(t._dropDownSize.maxHeight,Math.max(0,Math.min(i.top,t._resizeDetails.height-s))),s=Math.max(0,r.top+(r.height-Math.max(t._dropDownSize.minHeight,t._resizeDetails.height))),t.dropDownAppendTo&&t.dropDownAppendTo.length>0){const e=Math.abs(parseFloat(getComputedStyle(t.$.dropDownContainer).getPropertyValue("margin-bottom")))||0;t.$.dropDownContainer.style.top=t.dropDownAppendTo&&t.dropDownAppendTo.length>0?e+s+"px":""}const o=i.top+n.scrollTop+t._resizeDetails.offsetYtop;t._resizeDetails.y=Math.max(t._resizeDetails.offsetYtop,Math.min(o,Math.max(o-t._dropDownSize.maxHeight,e.pageY)))}t.$.dropDownContainer.style.height=t._resizeDetails.height+"px"}function d(){s=e.pageX-t._resizeDetails.x,t._resizeDetails.width=Math.min(n.clientWidth-r.left-6,Math.max(0,t._resizeDetails.width+s)),t.$.dropDownContainer.style.width=t._resizeDetails.width+"px",t._resizeDetails.x=Math.max(r.left+n.scrollLeft-t._resizeDetails.offsetXR,Math.min(n.clientWidth+n.scrollLeft-1.5*t._resizeDetails.offsetXR,e.pageX))}switch(t.resizeMode){case"vertical":l();break;case"horizontal":d();break;case"both":d(),l()}}_documentDownHandler(e){const t=this;if(t.disabled||t.readonly)return;let o=e.originalEvent.target;if(o===t._overlay&&(t._overlayDown=!0),t.isInShadowDOM){o=e.originalEvent.composedPath()[0];let n=o;for(;n;){if(n.closest(".smart-drop-down-container")===t.$.dropDownContainer){t._isDropDownClicked=!0;break}n=n.getRootNode().host}}else t._isDropDownClicked=o.closest(".smart-drop-down-container")===t.$.dropDownContainer;if(t._buttonClicked=o.closest(".smart-action-button")||o.closest(".smart-drop-down-button"),t._isDropDownClicked&&(t._preventDropDownClose=!0),o!==t.$.resizeBar||"none"===t.resizeMode)return;t._resizeDetails||(t._resizeDetails={});const n=t.$.dropDownContainer.getBoundingClientRect();t._resizeDetails.started=!0,t._resizeDetails.x=e.pageX,t._resizeDetails.y=e.pageY,t._resizeDetails.width=t.$.dropDownContainer.offsetWidth,t._resizeDetails.height=t.$.dropDownContainer.offsetHeight,t._resizeDetails.offsetXL=e.clientX-n.left,t._resizeDetails.offsetXR=n.left+t.$.dropDownContainer.offsetWidth-e.clientX,t._resizeDetails.offsetY=n.top+t.$.dropDownContainer.offsetHeight-e.clientY,t._resizeDetails.offsetYtop=e.clientY-n.top,t._preventDropDownClose=!0}_resizeHandler(){this.refresh()}refresh(){const e=this;"none"===e.resizeMode&&(e._calculateDropDownSize(),e._setDropDownSize())}_resizeBarMoveHandler(e){"touchmove"===e.originalEvent.type&&e.originalEvent.preventDefault()}_styleChangedHandler(e){const t=this;if(t.dropDownAppendTo&&t.dropDownAppendTo.length>0){const o=e.detail.styleProperties,n=["font-size","font-family","font-style","font-weight"];for(let e=0;e<n.length;e++)o[n[e]]&&(t.$.dropDownContainer.style[n[e]]=o[n[e]].value)}t._dropDownSize&&"auto"===t._dropDownSize.height&&t._setDropDownSize()}_buttonsDownHandler(e){const t=this;if(!t.disabled){if(t.hasRippleAnimation)if("dropDownButton"===t.dropDownOpenMode)Smart.Utilities.Animation.Ripple.animate(e.target,e.pageX,e.pageY);else if(e.target===t.$.dropDownButton||!t.editable){const o=t.$.buttonsContainer;o.firstElementChild.noRipple=!0,Smart.Utilities.Animation.Ripple.animate(o,e.pageX,e.pageY),o.firstElementChild.noRipple=!1}t._preventsSelectStart=!0,"dropDownButton"===t.dropDownOpenMode&&e.target===t.$.actionButton&&"smart-drop-down-button"===t.tagName.toLowerCase()&&t.$.actionButton.setAttribute("active",""),t.opened&&(t._preventDropDownClose=!0)}}_buttonsMouseEventsHandler(e){const t=this;t.disabled||("mouseenter"===e.type?(t.setAttribute("hover",""),e.target.setAttribute("hover","")):(t.removeAttribute("hover"),e.target.removeAttribute("hover")))}_selectStartHandler(e){this._preventsSelectStart&&e.preventDefault()}}); /***/ }), /***/ 6321: /***/ (() => { !function(){if(void 0===typeof window)return;const e="21.0.0",t=[];let n="Smart";if(window[n]&&window[n].Version){if(window[n].Version===e)return;if(window[n].Version!==e)n+=e;else{let e=2;for(;window[n];)n+=e.toString(),e++}}const r=navigator.userAgent.indexOf("Edge")>-1&&navigator.appVersion.indexOf("Edge")>-1;document.elementsFromPoint||(document.elementsFromPoint=document.msElementsFromPoint);class o{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,n=["Boolean","Number","String","Function","Array","Date","Object"].find((n=>{if(t["is"+n](e))return n}));return n?n.toLowerCase():void 0}}class i{static animate(e,t,r,o){const i=e;if(!i||i instanceof HTMLElement==0)return;if(0===i.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple"),e.setAttribute("role","presentation");let t=!0,r=null;if(window[n].EnableShadowDOM&&i.enableShadowDOM&&!0!==i.isInShadowDOM){for(let e=0;e<i.shadowRoot.host.shadowRoot.children.length;e++)"link"!==i.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(r=i.shadowRoot.host.shadowRoot.children[e]);i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else r=i.firstElementChild;t&&(r&&!r.noRipple&&r.offsetHeight>0?r.appendChild(e):i.appendChild(e))}let s=null;if(s=window[n].EnableShadowDOM&&i.shadowRoot?i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):i.getElementsByClassName("smart-ripple")[0],!s)return;s.innerHTML="",s.classList.remove("smart-animate"),s.style.height=s.style.width=Math.max(i.offsetHeight,i.offsetWidth)+"px";const a=window.getComputedStyle(s.parentElement),l=parseInt(a.borderLeftWidth)||0,d=parseInt(a.borderTopWidth)||0,c=i.getBoundingClientRect(),u=t-(c.left+window.pageXOffset)-s.offsetWidth/2-l,p=r-(c.top+window.pageYOffset)-s.offsetHeight/2-d;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),o&&o(),s.removeEventListener("animationend",e),s.removeEventListener("animationcancel",e)})),s.addEventListener("animationcancel",(function e(){s.parentElement&&s.parentElement.removeChild(s),o&&o(),s.removeEventListener("animationcancel",e),s.removeEventListener("animationend",e)}))}}class s{static easeInQuad(e,t,n,r){return n*(e/=r)*e+t}static easeOutQuad(e,t,n,r){return-n*(e/=r)*(e-2)+t}static easeInOutQuad(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}static easeInCubic(e,t,n,r){return n*(e/=r)*e*e+t}static easeOutCubic(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}static easeInOutCubic(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t}static easeInQuart(e,t,n,r){return n*(e/=r)*e*e*e+t}static easeOutQuart(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t}static easeInOutQuart(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t}static easeInQuint(e,t,n,r){return n*(e/=r)*e*e*e*e+t}static easeOutQuint(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t}static easeInOutQuint(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t}static easeInSine(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t}static easeOutSine(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t}static easeInOutSine(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t}static easeInExpo(e,t,n,r){return 0===e?t:n*Math.pow(2,10*(e/r-1))+t}static easeOutExpo(e,t,n,r){return e===r?t+n:n*(1-Math.pow(2,-10*e/r))+t}static easeInOutExpo(e,t,n,r){return 0===e?t:e===r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t}static easeInCirc(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t}static easeOutCirc(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t}static easeInOutCirc(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t}static easeInElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)+t)}static easeOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/i)+n+t)}static easeInOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:2==(e/=r/2)?t+n:(i||(i=r*(.3*1.5)),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*-.5+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*.5+n+t)}static easeInBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*(e/=r)*e*((o+1)*e-o)+t}static easeOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*((e=e/r-1)*e*((o+1)*e+o)+1)+t}static easeInOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t}static easeInBounce(e,t,n,r){return n-this.easeOutBounce(r-e,0,n,r)+t}static easeOutBounce(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}static easeInOutBounce(e,t,n,r){return e<r/2?.5*this.easeInBounce(2*e,0,n,r)+t:.5*this.easeOutBounce(2*e-r,0,n,r)+.5*n+t}}class a{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 n=t.indexOf(e);if(-1===n)return;const r=t.indexOf("rv:");return"Trident"===e&&-1!==r?parseFloat(t.substring(r+3)):parseFloat(t.substring(n+e.length+1))};let n={};return n[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 n=0;n<t.length;n++){let r=t[n].string;if(e=t[n].subString,-1!==r.indexOf(t[n].subString))return t[n].identity}return"Other"}()]=!0,n.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",n}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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};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[n].BaseUrl?window[n].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="(",n=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",n="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let r=e.stack.split(t);return r=r[1],r=r.split(n)[0],r=r.split(":"),r.splice(-2,2),r=r.join(":"),r.replace("/smart.element.js","")}()}static CSSVariablesSupport(){return window.CSS&&window.CSS.supports&&window.CSS.supports("(--fake-var: 0)")}static assign(e,t){const n=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let r=Object.assign({},e);return n(e)&&n(t)&&Object.keys(t).forEach((o=>{n(t[o])?o in e?r[o]=this.assign(e[o],t[o]):Object.assign(r,{[o]:t[o]}):Object.assign(r,{[o]:t[o]})})),r}static html(e,t){const n=this;let r="",o=e.childNodes;if(!t){for(let e,t=0,i=o.length;t<i&&(e=o[t]);t++){const t=["strong"];if(e instanceof HTMLElement||e.tagName&&t.indexOf(e.tagName.toLowerCase())>=0){const t=e.tagName.toLowerCase(),o=e.attributes;let i="<"+t;for(let e,t=0;e=o[t];t++)i+=" "+e.name+'="'+e.value.replace(/[&\u00A0"]/g,y.Core.escapeHTML)+'"';i+=">",["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][t]&&(r+=i),r=r+i+n.html(e)+"</"+t+">"}else{if(8===e.nodeType)continue;r+=e.textContent.replace(/[&\u00A0<>]/g,y.Core.escapeHTML)}}return r}{const n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;e.innerHTML=t.replace(n,"<$1></$2>")}}}let l=[];class d{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"