@syncfusion/ej2-popups
Version:
A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups.
10 lines • 113 kB
JavaScript
/*!
* filename: ej2-popups.min.js
* version : 29.1.37
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("SyncfusionBase"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons"],e):"object"==typeof exports?exports.SyncfusionPopups=e(require("SyncfusionBase"),require("SyncfusionButtons")):t.SyncfusionPopups=e(t.SyncfusionBase,t.SyncfusionButtons)}(self,((t,e)=>(()=>{"use strict";var i={766:e=>{e.exports=t},741:t=>{t.exports=e}},o={};function n(t){var e=o[t];if(void 0!==e)return e.exports;var s=o[t]={exports:{}};return i[t](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{n.r(s),n.d(s,{Animation:()=>Ie,AnimationSettings:()=>Gt,ButtonProps:()=>Zt,Dialog:()=>ye,DialogUtility:()=>Wt,Popup:()=>$,PositionData:()=>Z,Spinner:()=>gi,Tooltip:()=>Ye,calculatePosition:()=>p,calculateRelativeBasedPosition:()=>d,createSpinner:()=>yi,destroy:()=>q,fit:()=>O,flip:()=>N,getMaxZindex:()=>it,getScrollableParent:()=>tt,getTransformElement:()=>S,getZindexPartial:()=>et,getZoomValue:()=>P,hideSpinner:()=>ki,isCollide:()=>w,setSpinner:()=>Mi,showSpinner:()=>Bi});var t,e,i,o,l,r,a=n(766),h=!1;function d(t,e){var i=!1,o={left:0,top:0},n=t;if(!t||!e)return o;for((0,a.isNullOrUndefined)(e.offsetParent)&&"fixed"===e.style.position&&(i=!0);(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;for(t=n;(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left-=t.scrollLeft,o.top-=t.scrollTop,t=t.parentElement;return o}function p(n,s,l,r,a){if(e=void 0,e=a,h=!!r,!n)return{left:0,top:0};s||(s="left"),l||(l="top"),o=n.ownerDocument,i=n;return function(e,o,n){switch(t=i.getBoundingClientRect(),o+e){case"topcenter":c(C(),n),u(v(),n);break;case"topright":c(E(),n),u(v(),n);break;case"centercenter":c(C(),n),u(y(),n);break;case"centerright":c(E(),n),u(y(),n);break;case"centerleft":c(b(),n),u(y(),n);break;case"bottomcenter":c(C(),n),u(g(),n);break;case"bottomright":c(E(),n),u(g(),n);break;case"bottomleft":c(b(),n),u(g(),n);break;default:c(b(),n),u(v(),n)}return i=null,n}(s.toLowerCase(),l.toLowerCase(),{left:0,top:0})}function c(t,e){e.left=t}function u(t,e){e.top=t}function f(){return o.documentElement.scrollTop||o.body.scrollTop}function m(){return o.documentElement.scrollLeft||o.body.scrollLeft}function g(){return h?t.bottom:t.bottom+f()}function y(){return v()+t.height/2}function v(){return h?t.top:t.top+f()}function b(){return t.left+m()}function E(){var o=i&&((i.classList.contains("e-date-wrapper")||i.classList.contains("e-datetime-wrapper"))&&i.classList.contains("e-rtl")||i.classList.contains("e-ddl")&&i.classList.contains("e-rtl")||i.classList.contains("e-date-range-wrapper"))?e?e.width:0:e&&t.width>=e.width?e.width:0;return i&&i.classList.contains("e-rtl")&&i.classList.contains("e-multiselect")&&(o=e.width),t.right+m()-o}function C(){return b()+t.width/2}function O(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var n=t.getBoundingClientRect();if(r=e,l=t.ownerDocument,o||(o=p(t,"left","top")),i.X){var s=r?k():F(),a=A(),h=I(),d=a-o.left,c=o.left+n.width-h;n.width>s?o.left=d>0&&c<=0?h-n.width:c>0&&d<=0?a:d>c?h-n.width:a:d>0?o.left+=d:c>0&&(o.left-=c)}if(i.Y){var u=r?M():j(),f=z(),m=Y(),g=f-o.top,y=o.top+n.height-m;n.height>u?o.top=g>0&&y<=0?m-n.height:y>0&&g<=0?f:g>y?m-n.height:f:g>0?o.top+=g:y>0&&(o.top-=y)}return o}function w(t,e,i,o){void 0===e&&(e=null);var n=p(t,"left","top");i&&(n.left=i),o&&(n.top=o);var s=[];r=e,l=t.ownerDocument;var a=t.getBoundingClientRect(),h=n.top,d=n.left,c=n.left+a.width,u=H(h,n.top+a.height),f=x(d,c);return u.topSide&&s.push("top"),f.rightSide&&s.push("right"),f.leftSide&&s.push("left"),u.bottomSide&&s.push("bottom"),s}function N(t,e,i,o,n,s,a,h,d){if(void 0===a&&(a=null),void 0===h&&(h={X:!0,Y:!0}),e&&t&&n&&s&&(h.X||h.Y)){var c,u={TL:null,TR:null,BL:null,BR:null},f={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var m=t.style.visibility;t.style.visibility="hidden",t.style.display="block",c=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=m}else c=t.getBoundingClientRect();var g={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}};r=a,l=e.ownerDocument,function(t,e,i,o,n){i.position=p(t,i.posX,i.posY,o,n),e.TL=p(t,"left","top",o,n),e.TR=p(t,"right","top",o,n),e.BR=p(t,"left","bottom",o,n),e.BL=p(t,"right","bottom",o,n)}(e,u,g,d,c),T(f,g,c),h.X&&U(e,f,u,g,c,!0),h.Y&&u.TL.top>-1&&B(e,f,u,g,c,!0),function(t,e,i){var o=0,n=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=p(t.offsetParent,"left","top",!1,i);o=s.left,n=s.top}var l=1,r=1,a=S(t);if(a){var h=getComputedStyle(a).transform;if("none"!==h){var d=new DOMMatrix(h);l=d.a,r=d.d}if("none"!==getComputedStyle(a).zoom){var c=P(document.body);l*=c,r*=c}}t.style.top=e.position.top/r+e.offsetY-n/r+"px",t.style.left=e.position.left/l+e.offsetX-o/l+"px"}(t,g,c)}}function P(t){var e=getComputedStyle(t).zoom;return parseFloat(e)||1}function S(t){for(;t;){var e=window.getComputedStyle(t).transform,i=P(document.body);if(e&&"none"!==e||i&&1!==i)return t;if(t===document.body)return null;t=t.offsetParent||t.parentElement}return null}function T(t,e,i){t.TL={top:e.position.top+e.offsetY,left:e.position.left+e.offsetX},t.TR={top:t.TL.top,left:t.TL.left+i.width},t.BL={top:t.TL.top+i.height,left:t.TL.left},t.BR={top:t.TL.top+i.height,left:t.TL.left+i.width}}function x(t,e){var i=!1,o=!1;return t-X()<A()&&(i=!0),e>I()&&(o=!0),{leftSide:i,rightSide:o}}function U(t,e,i,o,n,s){var l=x(e.TL.left,e.TR.left);i.TL.left-X()<=A()&&(l.leftSide=!1),i.TR.left>I()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+n.width,o.offsetX=-1*o.offsetX,o.position=p(t,o.posX,o.posY,!1),T(e,o,n),s&&U(t,e,i,o,n,!1))}function B(t,e,i,o,n,s){var l=H(e.TL.top,e.BL.top);i.TL.top-D()<=z()&&(l.topSide=!1),i.BL.top>=Y()&&t.getBoundingClientRect().bottom<window.innerHeight&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+n.height,o.offsetY=-1*o.offsetY,o.position=p(t,o.posX,o.posY,!1,n),T(e,o,n),s&&B(t,e,i,o,n,!1))}function H(t,e){var i=!1,o=!1;return t-D()<z()&&(i=!0),e>Y()&&(o=!0),{topSide:i,bottomSide:o}}function k(){return r.getBoundingClientRect().width}function M(){return r.getBoundingClientRect().height}function L(){return r.getBoundingClientRect().left}function R(){return r.getBoundingClientRect().top}function z(){return r?R():0}function A(){return r?L():0}function I(){return r?X()+L()+k():X()+F()}function Y(){return r?D()+R()+M():D()+j()}function D(){return l.documentElement.scrollTop||l.body.scrollTop}function X(){return l.documentElement.scrollLeft||l.body.scrollLeft}function j(){return window.innerHeight}function F(){var t=window.innerWidth,e=document.documentElement.getBoundingClientRect();return t-(t-((0,a.isNullOrUndefined)(document.documentElement)?0:e.width))}function q(){r=null,l=null}var W,V=(W=function(t,e){return W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},W(t,e)},function(t,e){function i(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),_=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return V(e,t),_([(0,a.Property)("left")],e.prototype,"X",void 0),_([(0,a.Property)("top")],e.prototype,"Y",void 0),e}(a.ChildProperty),G="e-popup",K="e-rtl",J="e-popup-open",Q="e-popup-close",$=function(t){function e(e,i){return t.call(this,i,e)||this}return V(e,t),e.prototype.onPropertyChanged=function(t,e){for(var i=0,o=Object.keys(t);i<o.length;i++){switch(o[i]){case"width":(0,a.setStyleAttribute)(this.element,{width:(0,a.formatUnit)(t.width)});break;case"height":(0,a.setStyleAttribute)(this.element,{height:(0,a.formatUnit)(t.height)});break;case"zIndex":(0,a.setStyleAttribute)(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var n=t.offsetX-e.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+n).toString()+"px";break;case"offsetY":var s=t.offsetY-e.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+s).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}}},e.prototype.getModuleName=function(){return"popup"},e.prototype.resolveCollision=function(){this.checkCollision()},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(G,K,J,Q),this.content=null,this.relateTo=null,q(),t.prototype.destroy.call(this)},e.prototype.render=function(){this.element.classList.add(G);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=(0,a.formatUnit)(this.width)),"auto"!==this.height&&(t.height=(0,a.formatUnit)(this.height)),(0,a.setStyleAttribute)(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},e.prototype.wireEvents=function(){a.Browser.isDevice&&a.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},e.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];a.EventHandler.add(i,"scroll",this.scrollRefresh,this)}},e.prototype.unwireEvents=function(){a.Browser.isDevice&&a.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},e.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];a.EventHandler.remove(i,"scroll",this.scrollRefresh)}},e.prototype.getRelateToElement=function(){var t=""===this.relateTo||(0,a.isNullOrUndefined)(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},e.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?(0,a.isNullOrUndefined)(this.element)||this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement(),t.target);e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},e.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},e.prototype.isElementVisible=function(t,e){var i=this.checkGetBoundingClientRect(t);if(!i.height||!i.width)return!1;if((0,a.isNullOrUndefined)(this.checkGetBoundingClientRect(e))){var o=window,n={top:o.scrollY,left:o.scrollX,right:o.scrollX+o.outerWidth,bottom:o.scrollY+o.outerHeight},s=p(t),l={top:s.top,left:s.left,right:s.left+i.width,bottom:s.top+i.height},r={top:n.bottom-l.top,left:n.right-l.left,bottom:l.bottom-n.top,right:l.right-n.left};return r.top>0&&r.left>0&&r.right>0&&r.bottom>0}var h=e.getBoundingClientRect();return!(i.bottom<h.top||i.bottom>h.bottom||i.right>h.right||i.left<h.left)},e.prototype.preRender=function(){},e.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(K):this.element.classList.remove(K)},e.prototype.setContent=function(){if(!(0,a.isNullOrUndefined)(this.content))if(this.element.innerHTML="","string"==typeof this.content)this.element.textContent=this.content;else{var t=this.getRelateToElement(),e=this.content.props;t.classList.contains("e-dropdown-btn")&&!(0,a.isNullOrUndefined)(e)||this.element.appendChild(this.content)}},e.prototype.orientationOnChange=function(){var t=this;setTimeout((function(){t.refreshPosition()}),200)},e.prototype.refreshPosition=function(t,e){(0,a.isNullOrUndefined)(t)||this.checkFixedParent(t),this.reposition(),e||this.checkCollision()},e.prototype.reposition=function(){var t,e,i=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var o=void 0,n=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(o=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),e=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY),t="string"==typeof this.position.X?{left:e.left,top:this.position.Y}:{left:this.position.X,top:e.top},this.element.style.display=n,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=o)}else if(i){var s=this.element.clientHeight;n=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY,s),this.element.style.display=n}else t={left:0,top:0};(0,a.isNullOrUndefined)(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},e.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},e.prototype.getAnchorPosition=function(t,e,i,o,n,s){void 0===s&&(s=0);var l=this.checkGetBoundingClientRect(e),r=this.checkGetBoundingClientRect(t);if((0,a.isNullOrUndefined)(l)||(0,a.isNullOrUndefined)(r))return null;var h=t,c={left:0,top:0};switch(e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?c=p(t):(e.classList.contains("e-dlg-modal")&&"BODY"!==h.tagName&&(e=e.parentElement),c=d(h,e)),i.X){default:case"left":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===h.tagName&&"container"===this.targetType?c.left+=window.innerWidth/2-l.width/2:"container"===this.targetType?c.left+=r.width/2-l.width/2:c.left+=r.width/2;break;case"right":if(e.classList.contains("e-dlg-modal")&&"BODY"===h.tagName&&"container"===this.targetType)c.left+=window.innerWidth-l.width;else if("container"===this.targetType){var u=1,f=S(e);if(f){var m=getComputedStyle(f).transform;if("none"!==m)u=new DOMMatrix(m).a;if("none"!==getComputedStyle(f).zoom)u*=P(document.body)}c.left+=(r.width-l.width)/u}else c.left+=r.width}switch(i.Y){default:case"top":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===h.tagName&&"container"===this.targetType?c.top+=window.innerHeight/2-l.height/2:"container"===this.targetType?c.top+=r.height/2-l.height/2:c.top+=r.height/2;break;case"bottom":e.classList.contains("e-dlg-modal")&&"BODY"===h.tagName&&"container"===this.targetType?c.top+=window.innerHeight-l.height:"container"!==this.targetType||e.classList.contains("e-dialog")?"container"===this.targetType&&e.classList.contains("e-dialog")?c.top+=r.height-s:c.top+=r.height:c.top+=r.height-l.height}return c.left+=o,c.top+=n,c},e.prototype.callFlip=function(t){var e=this.getRelateToElement();N(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},e.prototype.callFit=function(t){if(0!==w(this.element,this.viewPortElement).length)if((0,a.isNullOrUndefined)(this.viewPortElement)){var e=O(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=e.left+"px"),t.Y&&(this.element.style.top=e.top+"px")}else{var i=this.checkGetBoundingClientRect(this.element),o=this.checkGetBoundingClientRect(this.viewPortElement);if((0,a.isNullOrUndefined)(i)||(0,a.isNullOrUndefined)(o))return null;t&&!0===t.Y&&(o.top>i.top?this.element.style.top="0px":o.bottom<i.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(i.bottom-o.bottom)+"px")),t&&!0===t.X&&(o.right<i.right?this.element.style.left=parseInt(this.element.style.left,10)-(i.right-o.right)+"px":o.left>i.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(o.left-i.left)+"px"))}},e.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},e.prototype.show=function(t,e){var i=this;if(this.wireEvents(),1e3===this.zIndex||!(0,a.isNullOrUndefined)(e)){var o=(0,a.isNullOrUndefined)(e)?this.element:e;this.zIndex=et(o),(0,a.setStyleAttribute)(this.element,{zIndex:this.zIndex})}t=(0,a.isNullOrUndefined)(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||((0,a.removeClass)([this.element],Q),(0,a.addClass)([this.element],J),this.checkCollision(),(0,a.removeClass)([this.element],J),(0,a.addClass)([this.element],Q)),(0,a.isNullOrUndefined)(t)?((0,a.removeClass)([this.element],Q),(0,a.addClass)([this.element],J),this.trigger("open")):(t.begin=function(){i.isDestroyed||((0,a.removeClass)([i.element],Q),(0,a.addClass)([i.element],J))},t.end=function(){i.isDestroyed||i.trigger("open")},new a.Animation(t).animate(this.element))},e.prototype.hide=function(t){var e=this;t=(0,a.isNullOrUndefined)(t)||"object"!=typeof t?this.hideAnimation:t,(0,a.isNullOrUndefined)(t)?((0,a.removeClass)([this.element],J),(0,a.addClass)([this.element],Q),this.trigger("close")):(t.end=function(){e.isDestroyed||((0,a.removeClass)([e.element],J),(0,a.addClass)([e.element],Q),e.trigger("close"))},new a.Animation(t).animate(this.element)),this.unwireEvents()},e.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),tt(t,this.fixedParent)},e.prototype.checkFixedParent=function(t){for(var e=t.parentElement;e&&"HTML"!==e.tagName;){var i=getComputedStyle(e);"fixed"!==i.position&&"sticky"!==i.position||(0,a.isNullOrUndefined)(this.element)||!this.element.offsetParent||"BODY"!==this.element.offsetParent.tagName||"hidden"===getComputedStyle(this.element.offsetParent).overflow||(this.element.style.top=window.scrollY>parseInt(this.element.style.top,10)?(0,a.formatUnit)(window.scrollY-parseInt(this.element.style.top,10)):(0,a.formatUnit)(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),e=e.parentElement,!(0,a.isNullOrUndefined)(this.element)&&(0,a.isNullOrUndefined)(this.element.offsetParent)&&"fixed"===i.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},_([(0,a.Property)("auto")],e.prototype,"height",void 0),_([(0,a.Property)("auto")],e.prototype,"width",void 0),_([(0,a.Property)(null)],e.prototype,"content",void 0),_([(0,a.Property)("container")],e.prototype,"targetType",void 0),_([(0,a.Property)(null)],e.prototype,"viewPortElement",void 0),_([(0,a.Property)({X:"none",Y:"none"})],e.prototype,"collision",void 0),_([(0,a.Property)("")],e.prototype,"relateTo",void 0),_([(0,a.Complex)({},Z)],e.prototype,"position",void 0),_([(0,a.Property)(0)],e.prototype,"offsetX",void 0),_([(0,a.Property)(0)],e.prototype,"offsetY",void 0),_([(0,a.Property)(1e3)],e.prototype,"zIndex",void 0),_([(0,a.Property)(!1)],e.prototype,"enableRtl",void 0),_([(0,a.Property)("reposition")],e.prototype,"actionOnScroll",void 0),_([(0,a.Property)(null)],e.prototype,"showAnimation",void 0),_([(0,a.Property)(null)],e.prototype,"hideAnimation",void 0),_([(0,a.Event)()],e.prototype,"open",void 0),_([(0,a.Event)()],e.prototype,"close",void 0),_([(0,a.Event)()],e.prototype,"targetExitViewport",void 0),e=_([a.NotifyPropertyChanges],e)}(a.Component);function tt(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var l=getComputedStyle(s);"absolute"===i.position&&"static"===l.position||!n.test(l.overflow+l.overflowY+l.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function et(t){for(var e=t.parentElement,i=[];e&&"BODY"!==e.tagName;){var o=document.defaultView.getComputedStyle(e,null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(e,null).getPropertyValue("position");"auto"!==o&&"static"!==n&&i.push(o),e=e.parentElement}for(var s=[],l=0;l<document.body.children.length;l++)if(!t.isEqualNode(document.body.children[l])){o=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&s.push(o)}s.push("999");var r=[];if(!(0,a.isNullOrUndefined)(t.parentElement)&&"BODY"!==t.parentElement.tagName){var h=[].slice.call(t.parentElement.children);for(l=0;l<h.length;l++)if(!t.isEqualNode(h[l])){o=document.defaultView.getComputedStyle(h[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(h[l],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&r.push(o)}}var d=i.concat(s,r),p=Math.max.apply(Math,d)+1;return p>2147483647?2147483647:p}function it(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i<t.length;i++)for(var o=document.getElementsByTagName(t[i]),n=0;n<o.length;n++){var s=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("z-index"),l=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("position");"auto"!==s&&"static"!==l&&e.push(s)}var r=Math.max.apply(Math,e)+1;return r>2147483647?2147483647:r}var ot,nt,st,lt,rt,at,ht,dt,pt=n(741),ct=["north-west","north","north-east","west","east","south-west","south","south-east"],ut="e-resize-handle",ft="e-focused-handle",mt=["e-restrict-left"],gt="e-resize-viewport",yt=["north","west","east","south"],vt=0,bt=0,Et=0,Ct=0,Ot=0,wt=0,Nt=null,Pt=null,St=null,Tt=!0,xt=0,Ut=!0;function Bt(t){zt();var e=(0,a.createElement)("span",{attrs:{unselectable:"on",contenteditable:"false"}});e.setAttribute("class","e-dialog-border-resize e-"+t),"south"===t&&(e.style.height="2px",e.style.width="100%",e.style.bottom="0px",e.style.left="0px"),"north"===t&&(e.style.height="2px",e.style.width="100%",e.style.top="0px",e.style.left="0px"),"east"===t&&(e.style.height="100%",e.style.width="2px",e.style.right="0px",e.style.top="0px"),"west"===t&&(e.style.height="100%",e.style.width="2px",e.style.left="0px",e.style.top="0px"),ot.appendChild(e)}function Ht(t){var e;return(0,a.isNullOrUndefined)(t)||(e="string"==typeof t?document.querySelector(t):t),e}function kt(t){for(var e=t||this,i=ot.querySelectorAll("."+ut),o=0;o<i.length;o++){nt=i[o],a.EventHandler.add(nt,"mousedown",Lt,e);var n="msie"===a.Browser.info.name?"pointerdown":"touchstart";a.EventHandler.add(nt,n,At,e)}var s=ot.querySelectorAll(".e-dialog-border-resize");if(!(0,a.isNullOrUndefined)(s))for(o=0;o<s.length;o++){nt=s[o],a.EventHandler.add(nt,"mousedown",Lt,e);n="msie"===a.Browser.info.name?"pointerdown":"touchstart";a.EventHandler.add(nt,n,At,e)}}function Mt(t){return t.indexOf("mouse")>-1?"mouse":"touch"}function Lt(t){if(t.preventDefault(),ot=t.target.parentElement,zt(),Ot=t.pageX,wt=t.pageY,t.target.classList.add(ft),!(0,a.isNullOrUndefined)(Nt)){if(!0===Nt(t,this))return}this.targetEle&&ot&&ot.querySelector(".e-dlg-resizable")&&(ht="body"===this.target?null:this.targetEle,at=this.targetEle.clientWidth,lt=this.targetEle.clientHeight);var e=(0,a.isNullOrUndefined)(ht)?document:ht;a.EventHandler.add(e,"mousemove",It,this),a.EventHandler.add(document,"mouseup",Rt,this);for(var i=0;i<mt.length;i++)Tt=!ot.classList.contains(mt[i])}function Rt(t){var e="msie"===a.Browser.info.name?"pointermove":"touchmove",i="msie"===a.Browser.info.name?"pointerup":"touchend",o=(0,a.isNullOrUndefined)(ht)?document:ht,n="msie"===a.Browser.info.name?"pointerdown":"touchstart";if(a.EventHandler.remove(o,"mousemove",It),a.EventHandler.remove(o,e,It),a.EventHandler.remove(o,n,It),(0,a.isNullOrUndefined)(document.body.querySelector("."+ft))||document.body.querySelector("."+ft).classList.remove(ft),!(0,a.isNullOrUndefined)(St)){St(t,this)}a.EventHandler.remove(document,"mouseup",Rt),a.EventHandler.remove(document,i,Rt)}function zt(){vt=parseFloat(getComputedStyle(ot,null).getPropertyValue("width").replace("px","")),bt=parseFloat(getComputedStyle(ot,null).getPropertyValue("height").replace("px","")),Et=ot.getBoundingClientRect().left,Ct=ot.getBoundingClientRect().top}function At(t){ot=t.target.parentElement,zt();var e=ot.classList.contains("e-dialog");(t.target.classList.contains(ut)||t.target.classList.contains("e-dialog-border-resize"))&&e&&t.target.classList.add(ft);var i=t.touches?t.changedTouches[0]:t;if(Ot=i.pageX,wt=i.pageY,!(0,a.isNullOrUndefined)(Nt)){if(!0===Nt(t,this))return}var o="msie"===a.Browser.info.name?"pointermove":"touchmove",n="msie"===a.Browser.info.name?"pointerup":"touchend",s=(0,a.isNullOrUndefined)(ht)?document:ht;a.EventHandler.add(s,o,It,this),a.EventHandler.add(document,n,Rt,this)}function It(t){if(t.target.classList.contains(ut)&&t.target.classList.contains(ft)?nt=t.target:(0,a.isNullOrUndefined)(document.body.querySelector("."+ft))||(nt=document.body.querySelector("."+ft)),!(0,a.isNullOrUndefined)(nt)){for(var e="",i=0;i<ct.length;i++)nt.classList.contains("e-"+ct[i])&&(e=ct[i]);if(!(0,a.isNullOrUndefined)(Pt)){Pt(t,this)}switch(e){case"south":Dt(t);break;case"north":Xt(t);break;case"west":jt(t);break;case"east":Ft(t);break;case"south-east":Dt(t),Ft(t);break;case"south-west":Dt(t),jt(t);break;case"north-east":Xt(t),Ft(t);break;case"north-west":Xt(t),jt(t)}}}function Yt(t){return t.getBoundingClientRect()}function Dt(t){var e,i=document.documentElement.clientHeight,o=!1,n=(t.touches?t.changedTouches[0]:t).pageY,s=Yt(ot);(0,a.isNullOrUndefined)(ht)||(e=Yt(ht)),(0,a.isNullOrUndefined)(ht)?(0,a.isNullOrUndefined)(ht)&&(i-n>=0||s.top<0)&&(o=!0):o=!0;var l=bt+(n-wt);l=l>st?l:st;var r=0;(0,a.isNullOrUndefined)(ht)||(r=e.top);var h=(0,a.isNullOrUndefined)(ht)?0:ht.offsetHeight-ht.clientHeight,d=s.top-r-h/2;if(d=d<0?0:d,s.top>0&&d+l>lt){if(o=!1,ot.classList.contains(gt))return;ot.style.height=lt-parseInt(d.toString(),10)+"px"}else{var p=0;if(o){s.top<0&&i+(s.height+s.top)>0&&l+(p=s.top)<=30&&(l=s.height-(s.height+s.top)+30),l+s.top>=lt&&(ot.style.height=s.height+(i-(s.height+s.top))+"px");var c=(0,a.isNullOrUndefined)(ht)?p:d;l>=st&&l+c<=lt&&(ot.style.height=l+"px")}}}function Xt(t){var e,i=!1,o="mouse"===Mt(t.type)?t.pageY:t.touches[0].pageY,n=Yt(ot),s=(0,a.isNullOrUndefined)(ht)?0:ht.offsetHeight-ht.clientHeight;(0,a.isNullOrUndefined)(ht)||(e=Yt(ht)),(!(0,a.isNullOrUndefined)(ht)&&n.top-e.top>0||(0,a.isNullOrUndefined)(ht)&&o>0||!(0,a.isNullOrUndefined)(ht)&&Math.floor(n.top-e.top+n.height+(e.bottom-n.bottom))-s<=lt)&&(i=!0);var l=bt-(o-wt);if(i&&l>=st&&l<=lt){var r=0;(0,a.isNullOrUndefined)(ht)||(r=e.top);var h=Ct-r+(o-wt);h=h>0?h:1,ot.style.height=l+"px",ot.style.top=h+"px"}}function jt(t){var e,i=document.documentElement.clientWidth,o=!1;(0,a.isNullOrUndefined)(ht)||(e=Yt(ht));var n="mouse"===Mt(t.type)?t.pageX:t.touches[0].pageX,s=Yt(ot),l=(0,a.isNullOrUndefined)(ht)?0:ht.offsetWidth-ht.clientWidth,r=(0,a.isNullOrUndefined)(ht)?0:e.left,h=(0,a.isNullOrUndefined)(ht)?0:e.width;(0,a.isNullOrUndefined)(dt)&&((0,a.isNullOrUndefined)(ht)?dt=i:(dt=s.left-r-l/2+s.width,dt+=h-l-dt)),(!(0,a.isNullOrUndefined)(ht)&&Math.floor(s.left-e.left+s.width+(e.right-s.right))-l<=at||(0,a.isNullOrUndefined)(ht)&&n>=0)&&(o=!0);var d=vt-(n-Ot);if(Tt&&(d=d>dt?dt:d),o&&d>=rt&&d<=at){var p=0;(0,a.isNullOrUndefined)(ht)||(p=e.left);var c=Et-p+(n-Ot);c=c>0?c:1,d!==xt&&Ut&&(ot.style.width=d+"px"),Tt&&(ot.style.left=c+"px",Ut=1!==c)}xt=d}function Ft(t){var e,i=document.documentElement.clientWidth,o=!1;(0,a.isNullOrUndefined)(ht)||(e=Yt(ht));var n=(t.touches?t.changedTouches[0]:t).pageX,s=Yt(ot);(!(0,a.isNullOrUndefined)(ht)&&(s.left-e.left+s.width<=at||s.right-e.left>=s.width)||(0,a.isNullOrUndefined)(ht)&&i-n>0)&&(o=!0);var l=vt+(n-Ot),r=0;if((0,a.isNullOrUndefined)(ht)||(r=e.left),s.left-r+l>at){if(o=!1,ot.classList.contains(gt))return;ot.style.width=at-(s.left-r)+"px"}o&&l>=rt&&l<=at&&(ot.style.width=l+"px")}function qt(){for(var t=ot.querySelectorAll("."+ut),e=0;e<t.length;e++)(0,a.detach)(t[e]);var i=ot.querySelectorAll(".e-dialog-border-resize");if(!(0,a.isNullOrUndefined)(i))for(e=0;e<i.length;e++)(0,a.detach)(i[e])}var Wt,Vt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),_t=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vt(e,t),_t([(0,a.Property)(!0)],e.prototype,"isFlat",void 0),_t([(0,a.Property)()],e.prototype,"buttonModel",void 0),_t([(0,a.Property)("Button")],e.prototype,"type",void 0),_t([(0,a.Event)()],e.prototype,"click",void 0),e}(a.ChildProperty),Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vt(e,t),_t([(0,a.Property)("Fade")],e.prototype,"effect",void 0),_t([(0,a.Property)(400)],e.prototype,"duration",void 0),_t([(0,a.Property)(0)],e.prototype,"delay",void 0),e}(a.ChildProperty),Kt="e-dialog",Jt="e-rtl",Qt="e-dlg-header-content",$t="e-dlg-header",te="e-footer-content",ee="e-dlg-modal",ie="e-icon-dlg-close",oe="e-dlg-target",ne="e-scroll-disabled",se="e-device",le="e-dlg-fullscreen",re="e-dlg-closeicon-btn",ae="e-popup-open",he="Information",de="e-scroll-disabled",pe="e-alert-dialog",ce="e-confirm-dialog",ue="e-dlg-resizable",fe="e-restrict-left",me="e-resize-viewport",ge="user action",ye=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.needsID=!0,o}return Vt(e,t),e.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents(),"100%"===this.width&&(this.element.style.width=""),""!==this.minHeight&&(this.element.style.minHeight=(0,a.formatUnit)(this.minHeight)),this.enableResize&&(this.setResize(),this.isModal&&(this.isModelResize=!0),"None"===this.animationSettings.effect&&this.getMinHeight()),this.renderComplete()},e.prototype.initializeValue=function(){this.dlgClosedBy=ge},e.prototype.preRender=function(){var t=this;this.initializeValue(),this.headerContent=null,this.allowMaxHeight=!0,this.preventVisibility=!0,this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.dlgClosedBy="close icon",t.hide(e)},this.dlgOverlayClickEventHandler=function(e){t.dlgClosedBy="overlayClick",e.preventFocus=!1,t.trigger("overlayClick",e,(function(e){e.preventFocus||t.focusContent(),t.dlgClosedBy=ge}))};if(this.l10n=new a.L10n("dialog",{close:"Close"},this.locale),this.checkPositionData(),(0,a.isNullOrUndefined)(this.target)){var e=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.target=document.body,this.isProtectedOnChange=e}},e.prototype.updatePersistData=function(){this.enablePersistence&&this.setProperties({width:parseFloat(this.element.style.width),height:parseFloat(this.element.style.height),position:{X:parseFloat(this.dragObj.element.style.left),Y:parseFloat(this.dragObj.element.style.top)}},!0)},e.prototype.isNumberValue=function(t){return/^[-+]?\d*\.?\d+$/.test(t)},e.prototype.checkPositionData=function(){if(!(0,a.isNullOrUndefined)(this.position)){if(!(0,a.isNullOrUndefined)(this.position.X)&&"number"!=typeof this.position.X)if(this.isNumberValue(this.position.X)){var t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.X=parseFloat(this.position.X),this.isProtectedOnChange=t}if(!(0,a.isNullOrUndefined)(this.position.Y)&&"number"!=typeof this.position.Y)if(this.isNumberValue(this.position.Y)){t=this.isProtectedOnChange;this.isProtectedOnChange=!0,this.position.Y=parseFloat(this.position.Y),this.isProtectedOnChange=t}}},e.prototype.getEle=function(t,e){for(var i=void 0,o=0;o<t.length;o++)if(t[o].classList.contains(e)){i=t[o];break}return i},e.prototype.getMinHeight=function(){var t="0px",e="0px";(0,a.isNullOrUndefined)(this.element.querySelector("."+Qt))||(t=getComputedStyle(this.headerContent).height);var i=this.getEle(this.element.children,te);(0,a.isNullOrUndefined)(i)||(e=getComputedStyle(i).height);var o,n=parseInt(t.slice(0,t.indexOf("p")),10),s=parseInt(e.slice(0,e.indexOf("p")),10);return o=n+30+(isNaN(s)?0:s),st=o,n+30+s},e.prototype.onResizeStart=function(t,e){if(e.trigger("resizeStart",t),!t.cancel&&this.isModelResize&&!(0,a.isNullOrUndefined)(this.dlgContainer)&&this.dlgContainer.classList.contains("e-dlg-"+this.position.X+"-"+this.position.Y)){this.setPopupPosition(),this.dlgContainer.classList.remove("e-dlg-"+this.position.X+"-"+this.position.Y);var i=this.getTargetContainer(this.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")?this.element.style.position="absolute":this.element.style.position="relative";else this.element.style.position="relative";this.element.classList.contains(fe)&&this.element.classList.remove(fe),this.isModelResize=!1}return t.cancel},e.prototype.onResizing=function(t,e){e.trigger("resizing",t)},e.prototype.onResizeComplete=function(t,e){e.trigger("resizeStop",t),this.updatePersistData()},e.prototype.setResize=function(){if(this.enableResize){this.element.classList.add(ue);for(var t=getComputedStyle(this.element).minHeight,e=getComputedStyle(this.element).minWidth,i="",o=0;o<this.resizeHandles.length;o++){if("All"===this.resizeHandles[o]){i="south north east west north-east north-west south-east south-west";break}var n="";switch(this.resizeHandles[o].toString()){case"SouthEast":n="south-east";break;case"SouthWest":n="south-west";break;case"NorthEast":n="north-east";break;case"NorthWest":n="north-west";break;default:n=this.resizeHandles[o].toString()}i+=n.toLocaleLowerCase()+" "}this.enableRtl&&"south-east"===i.trim()?i="south-west":this.enableRtl&&"south-west"===i.trim()&&(i="south-east"),this.isModal&&this.enableRtl?this.element.classList.add(fe):this.isModal&&this.target===document.body&&this.element.classList.add(me),function(t){Nt=t.resizeBegin,Pt=t.resizing,St=t.resizeComplete,ot=Ht(t.element),ht=Ht(t.boundary);for(var e=t.direction.split(" "),i=0;i<e.length;i++)if(yt.indexOf(e[i])>=0&&e[i])Bt(e[i]);else if(""!==e[i].trim()){var o=(0,a.createElement)("div",{className:"e-icons "+ut+" e-"+e[i]});ot.appendChild(o)}st=t.minHeight,rt=t.minWidth,at=t.maxWidth,lt=t.maxHeight,t.proxy&&t.proxy.element&&t.proxy.element.classList.contains("e-dialog")?kt(t.proxy):kt()}({element:this.element,direction:i,minHeight:parseInt(t.slice(0,e.indexOf("p")),10),maxHeight:this.targetEle.clientHeight,minWidth:parseInt(e.slice(0,e.indexOf("p")),10),maxWidth:this.targetEle.clientWidth,boundary:this.target===document.body?null:this.targetEle,resizeBegin:this.onResizeStart.bind(this),resizeComplete:this.onResizeComplete.bind(this),resizing:this.onResizing.bind(this),proxy:this}),this.wireWindowResizeEvent()}else qt(),this.unWireWindowResizeEvent(),this.isModal?this.element.classList.remove(fe):this.element.classList.remove(me),this.element.classList.remove(ue)},e.prototype.getFocusElement=function(t){var e=t.querySelectorAll('input,select,textarea,button:enabled,a,[contenteditable="true"],[tabindex]');return{element:e[e.length-1]}},e.prototype.keyDown=function(t){var e=this;if(9===t.keyCode&&this.isModal){var i=void 0;(0,a.isNullOrUndefined)(this.btnObj)||(i=this.btnObj[this.btnObj.length-1]),(0,a.isNullOrUndefined)(this.btnObj)&&!(0,a.isNullOrUndefined)(this.ftrTemplateContent)&&(i=this.getFocusElement(this.ftrTemplateContent)),(0,a.isNullOrUndefined)(this.btnObj)&&(0,a.isNullOrUndefined)(this.ftrTemplateContent)&&!(0,a.isNullOrUndefined)(this.contentEle)&&(i=this.getFocusElement(this.contentEle)),(0,a.isNullOrUndefined)(i)||document.activeElement!==i.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),(0,a.isNullOrUndefined)(i)||i.element.focus())}var o,n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,l=!1;if(s||(l=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape){this.dlgClosedBy="escape";var r=document.querySelector(".e-popup-open:not(.e-dialog)");((0,a.isNullOrUndefined)(r)||r.classList.contains("e-toolbar-pop")||r.classList.contains("e-slider-tooltip"))&&this.hide(t)}(13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!(0,a.isNullOrUndefined)(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||l)&&!(0,a.isNullOrUndefined)(this.primaryButtonEle))&&(this.buttons.some((function(t,e){o=e;var i=t.buttonModel;return!(0,a.isNullOrUndefined)(i)&&!0===i.isPrimary}))&&"function"==typeof this.buttons[o].click&&!this.primaryButtonEle.disabled&&setTimeout((function(){e.buttons[o].click.call(e,t)})))},e.prototype.initialize=function(){(0,a.isNullOrUndefined)(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),this.isBlazorServerRender()||(0,a.addClass)([this.element],Kt),a.Browser.isDevice&&(0,a.addClass)([this.element],se),this.isBlazorServerRender()||this.setCSSClass(),this.setMaxHeight()},e.prototype.initRender=function(){var t=this;if(this.initialRender=!0,this.isBlazorServerRender()||(0,a.attributes)(this.element,{role:"dialog"}),1e3===this.zIndex?(this.setzIndex(this.element,!1),this.calculatezIndex=!0):this.calculatezIndex=!1,this.setTargetContent(),""===this.header||(0,a.isNullOrUndefined)(this.header)||this.setHeader(),this.renderCloseIcon(),this.setContent(),""===this.footerTemplate||(0,a.isNullOrUndefined)(this.footerTemplate)?(0,a.isNullOrUndefined)(this.buttons[0])||(0,a.isNullOrUndefined)(this.buttons[0].buttonModel)||this.setButton():this.setFooterTemplate(),this.allowDragging&&!(0,a.isNullOrUndefined)(this.headerContent)&&this.setAllowDragging(),(0,a.attributes)(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),!0!==this.element.classList.contains(pe)&&!0!==this.element.classList.contains(ce)&&!(0,a.isNullOrUndefined)(this.element.parentElement)){var e=this.isModal?this.dlgContainer.parentElement:this.element.parentElement;this.refElement=this.createElement("div",{className:"e-dlg-ref-element"}),e.insertBefore(this.refElement,this.isModal?this.dlgContainer:this.element)}if((0,a.isNullOrUndefined)(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new $(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",enableRtl:this.enableRtl,open:function(e){var i={container:t.isModal?t.dlgContainer:t.element,element:t.element,target:t.target,preventFocus:!1};t.enableResize&&t.resetResizeIcon(),t.trigger("open",i,(function(e){e.preventFocus||t.focusContent()}))},close:function(e){t.isModal&&(0,a.addClass)([t.dlgOverlay],"e-fade"),t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closeArgs);var i=document.activeElement;(0,a.isNullOrUndefined)(i)||(0,a.isNullOrUndefined)(i.blur)||i.blur(),(0,a.isNullOrUndefined)(t.storeActiveElement)||(0,a.isNullOrUndefined)(t.storeActiveElement.focus)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),this.isBlazorServerRender()||((0,a.addClass)([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex()),this.visible){if(this.show(),this.isModal){var i=this.getTargetContainer(this.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")&&this.setPopupPosition()}}else this.isModal&&(this.dlgOverlay.style.display="none");this.initialRender=!1},e.prototype.getTargetContainer=function(t){var e=null;if("string"==typeof t)if(t.startsWith("#"))e=document.getElementById(t.substring(1));else if(t.startsWith(".")){var i=document.getElementsByClassName(t.substring(1));e=i.length>0?i[0]:null}else t instanceof HTMLElement||t===document.body||(e=document.querySelector(t));else t instanceof HTMLElement&&(e=t);return e},e.prototype.resetResizeIcon=function(){var t=this.getMinHeight();if(this.targetEle.offsetHeight<t){var e=this.enableRtl?"e-south-west":"e-south-east",i=this.element.querySelector("."+e);(0,a.isNullOrUndefined)(i)||(i.style.bottom="-"+t.toString()+"px")}},e.prototype.setOverlayZindex=function(t){var e;e=(0,a.isNullOrUndefined)(t)?parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex:t,this.dlgOverlay.style.zIndex=(e-1).toString(),this.dlgContainer.style.zIndex=e.toString()},e.prototype.positionChange=function(){this.isModal&&(isNaN(parseFloat(this.position.X))||isNaN(parseFloat(this.position.Y)))?!isNaN(parseFloat(this.position.X))&&isNaN(parseFloat(this.position.Y))||isNaN(parseFloat(this.position.X))&&!isNaN(parseFloat(this.position.Y))?this.setPopupPosition():(this.element.style.top="0px",this.element.style.left="0px",this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y)):this.setPopupPosition()},e.prototype.setPopupPosition=function(){this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},e.prototype.setAllowDragging=function(){var t=this,e="."+Qt;this.element.classList.contains("e-draggable")||(this.dragObj=new a.Draggable(this.element,{clone:!1,isDragScroll:!0,abort:".e-dlg-closeicon-btn",handle:e,dragStart:function(e){t.trigger("dragStart",e,(function(t){(0,a.isBlazor)()&&t.bindEvents(e.dragElement)}))},dragStop:function(e){if(t.isModal){t.IsDragStop=!0,(0,a.isNullOrUndefined)(t.position)||t.dlgContainer.classList.remove("e-dlg-"+t.position.X+"-"+t.position.Y);var i=t.getTargetContainer(t.target);if(i instanceof Element)"rtl"===window.getComputedStyle(i).getPropertyValue("direction")?t.element.style.position="absolute":t.element.style.position="relative";else t.element.style.position="relative"}t.trigger("dragStop",e),t.isModelResize=!1,t.element.classList.remove(fe),t.updatePersistData()},drag:function(e){t.trigger("drag",e)}}),(0,a.isNullOrUndefined)(this.targetEle)||(this.dragObj.dragArea=this.targetEle))},e.prototype.setButton=function(){if(!this.isBlazorServerRender()){this.buttonContent=[],this.btnObj=[];for(var t=0;t<this.buttons.length;t++)if(!(0,a.isNullOrUndefined)(this.buttons[t].buttonModel)){var e=(0,a.isNullOrUndefined)(this.buttons[t].type)?"button":this.buttons[t].type.toLowerCase(),i=this.createElement("button",{className:this.cssClass,attrs:{type:e,tabindex:"0"}});this.buttonContent.push(i.outerHTML)}this.setFooterTemplate()}t=0;for(var o,n=this.element.children;t<n.length;t++)n[t].classList.contains(te)&&(o=n[t].querySelectorAll("button"));for(t=0;t<this.buttons.length;t++)(0,a.isNullOrUndefined)(this.buttons[t].buttonModel)||(this.isBlazorServerRender()||(this.btnObj[t]=new pt.Button(this.buttons[t].buttonModel)),!(0,a.isNullOrUndefined)(this.ftrTemplateContent)&&o.length>0&&("function"==typeof this.buttons[t].click&&a.EventHandler.add(o[t],"click",this.buttons[t].click,this),"object"==typeof this.buttons[t].click&&a.EventHandler.add(o[t],"click",this.buttonClickHandler.bind(this,t),this)),this.isBlazorServerRender()||(0,a.isNullOrUndefined)(this.ftrTemplateContent)||(this.btnObj[t].appendTo(this.ftrTemplateContent.children[t]),this.buttons[t].isFlat&&this.btnObj[t].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]))},e.prototype.buttonClickHandler=function(t){this.trigger("buttons["+t+"].click",{})},e.prototype.setContent=function(){this.contentEle=this.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),this.headerEle?(0,a.attributes)(this.element,{"aria-describedby":this.element.id+"_title "+this.element.id+"_dialog-content"}):(0,a.attributes)(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.innerContentElement?this.contentEle.appendChild(this.innerContentElement):((0,a.isNullOrUndefined)(this.content)||""===this.content)&&this.initialRender||(("string"!=typeof this.content||(0,a.isBlazor)())&&this.content instanceof HTMLElement?this.contentEle.appendChild(this.content):this.setTemplate(this.content,this.contentEle,"content")),(0,a.isNullOrUndefined)(this.headerContent)?this.element.insertBefore(this.contentEle,this.element.children[0]):this.element.insertBefore(this.contentEle,this.element.children[1]),"auto"===this.height&&(this.isBlazorServerRender()||!a.Browser.isIE||""!==this.element.style.width||(0,a.isNullOrUndefined)(this.width)||(this.element.style.width=(0,a.formatUnit)(this.width)),this.setMaxHeight())},e.prototype.setTemplate=function(t,e,i){var o,n,s;n=e.classList.contains($t)?this.element.id+"header":e.classList.contains(te)?this.element.id+"footerTemplate":this.element.id+"content",(0,a.isNullOrUndefined)(t.outerHTML)?("string"==typeof t||"string"!=typeof t||(0,a.isBlazor)()&&!this.isStringTemplate)&&("string"==typeof t&&(t=this.sanitizeHelper(t)),this.isVue||"string"!=typeof t?(o=(0,a.compile)(t),s=t):e.innerHTML=t):e.appendChild(t);var l=[];if(!(0,a.isNullOrUndefined)(o)){for(var r=0,h=o({},this,i,n,!((0,a.isBlazor)()&&!this.isStringTemplate&&0===s.indexOf("<div>Blazor"))||this.isStringTemplate);r<h.length;r++){var d=h[r];l.push(d)}(0,a.append)([].slice.call(l),e)}},e.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var e=a.SanitizeHtmlHelper.beforeSanitize();(0,a.extend)(e,e,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",e),e.cancel&&!(0,a.isNullOrUndefined)(e.helper)?t=e.helper(t):e.cancel||(t=a.SanitizeHtmlHelper.serializeValue(e,t))}return t},e.prototype.setMaxHeight=function(){if(this.allowMaxHeight){var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=!(0,a.isNullOrUndefined)(this.target)&&this.targetEle.offsetHeight<window.innerHeight?this.targetEle.offsetHeight-20+"px":window.innerHeight-20+"px",this.element.style.display=t,a.Browser.isIE&&"auto"===this.height&&!(0,a.isNullOrUndefined)(this.contentEle)&&this.element.offsetHeight<this.contentEle.offsetHeight&&(this.element.style.height="inherit")}},e.prototype.setEnableRTL=function(){this.isBlazorServerRender()||(this.enableRtl?(0,a.addClass)([this.element],Jt):(0,a.removeClass)([this.element],Jt)),(0,a.isNullOrUndefined)(this.element.querySelector(".e-resize-handle"))||(qt(),this.setResize())},e.prototype.setTargetContent=function(){var t=this;if((0,a.isNullOrUndefined)(this.content)||""===this.content){var e=""!==this.element.innerHTML.replace(/\s|<(\/?|\/?)(!--!--)>/g,"");(this.element.children.length>0||e)&&(this.innerContentElement=document.createDocumentFragment(),[].slice.call(this.element.childNodes).forEach((function(e){8!==e.nodeType&&t.innerContentElement.appendChild(e)})))}},e.prototype.setHeader=function(){this.headerEle?this.headerEle.innerHTML="":this.headerEle=this.createElement("div",{id:this.element.id+"_title",className:$t}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.setTemplate(this.header,this.headerEle,"header"),(0,a.attributes)(this.element,{"aria-describedby":this.element.id+"_title"}),(0,a.attributes)(this.element,{"aria-labelledby":this.element.id+"_dialog-header"}),this.element.insertBefore(this.headerContent,this.element.children[0]),this.allowDragging&&!(0,a.isNullOrUndefined)(this.headerContent)&&this.setAllowDragging()},e.prototype.setFooterTemplate=function(){this.ftrTemplateContent?this.ftrTemplateContent.innerHTML="":this.ftrTemplateContent=this.createElement("div",{className:te}),""===this.footerTemplate||(0,a.isNullOrUndefined)(this.footerTemplate)?this.ftrTemplateContent.innerHTML=this.buttonContent.join(""):this.setTemplate(this.footerTemplate,this.ftrTemplateContent,"footerTemplate"),this.element.appendChild(this.ftrTemplateContent)},e.prototype.createHeaderContent=function(){(0,a.isNullOrUndefined)(this.headerContent)&&(this.headerContent=this.createElement("div",{id:this.element.id+"_dialog-header",className:Qt}))},e.prototype.renderCloseIcon=function(){this.showCloseIcon&&(this.closeIcon=this.createElement("button",{className:re,attrs:{type:"button"}}),this.closeIconBtnObj=new pt.Button({cssClass:"e-flat",iconCss:ie+" e-icons"}),this.closeIconTitle(),(0,a.isNullOrUndefined)(this.headerContent)?(this.createHeaderContent(),(0,a.prepend)([this.closeIcon],this.headerContent),this.element.insertBefore(this.headerContent,this.element.children[0])):(0,a.prepend)([this.closeIcon],this.headerContent),this.closeIconBtnObj.appendTo(this.closeIcon))},e.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t),this.closeIcon.setAttribute("aria-label",t)},e.prototype.setCSSClass=function(t){t&&((0,a.removeClass)([this.element],t.split(" ")),this.isModal&&!(0,a.isNullOrUndefined)(this.dlgContainer)&&(0,a.removeClass)([this.dlgContainer],t.split(" "))),this.cssClass&&((0,a.addClass)([this.element],this.cssClass.split(" ")),this.isModal&&!(0,a.isNullOrUndefined)(this.dlgContainer)&&(0,a.addClass)([this.dlgContainer],this.cssClass.split(" ")))},e.prototype.setIsModal=function(){this.dlgContainer=this.createElement("div",{className:"e-dlg-container"}),this.setCSSClass(),this.element.classList.remove(ae),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),(0,a.addClass)([this.element],ee),this.dlgOverlay=this.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},e.prototype.getValidFocusNode=function(t){for(var e,i=0;i<t.length;i++){if(((e=t[i]).clientHeight>0||"a"===e.tagName.toLowerCase()&&e.hasAttribute("href"))&&e.tabIndex>-1&&!e.disabled&&!this.disableElement(e,'[disabled],[aria-disabled="true"],[type="hidden"]'))return e;e=null}return e},e.prototype.focusableElements=function(t){if(!(0,a.isNullOrUndefined)(t)){var e=t.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');return this.getValidFocusNode(e)}return null},e.prototype.getAutoFocusNode=function(t){var e=t.querySelector("."+re),i=t.querySelectorAll("[autofocus]"),o=this.getValidFocusNode(i);if((0,a.isBlazor)()&&(this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]),(0,a.isNullOrUndefined)(o)){if(o=this.focusableElements(this.contentEle),!(0,a.isNullOrUndefined)(o))return o;if(!(0,a.isNullOrUndefined)(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else e=o;return e},e.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msGetRegionContent:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},e.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element),e=(0,a.isNullOrUndefined)(t)?this.element:t,i=a.Browser.userAgent;(i.indexOf("MSIE ")>0||i.indexOf("Trident/")>0)&&this.element.focus(),e.focus(),this.unBindEvent(this.element),this.bindEvent(this.element)},e.prototype.bindEvent=function(t){a.EventHandler.add(t,"keydown",this.keyDown,this)},e.prototype.unBindEvent=function(t){a.EventHandler.remove(t,"keydown",this.keyDown)},e.prototype.updateSanitizeContent=function(){this.isBlazorServerRender()||(this.contentEle.innerHTML=this.sanitizeHelper(this.content))},e.prototype.isBlazorServerRender=function(){return(0,a.isBlazor)()&&this.isServerRendered},e.prototype.getModuleName=function(){return"dialog"},e.prototype.onPropertyChanged=function(t,e){if(this.element.classList.contains(Kt))for(var i=0,o=Object.keys(t);i<o.length;i++){switch(o[i]){case"content":(0,a.isNullOrUndefined)(this.content)||""===this.content?(0,a.isNullOrUndefined)(this.contentEle)||((0,a.detach)(this.contentEle),this.contentEle=null):(this.isBlazorServerRender()&&(this.contentEle=this.element.querySelector(".e-dlg-content")),(0,a.isNullOrUndefined)(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.isBlazorServerRender()||(this.contentEle.innerHTML=""),"function"==typeof this.content?(this.clearTemplate(["content"]),(0,a.detach)(this.contentEle),this.contentEle=null,this.setContent()):"string"==typeof this.content?this.updateSanitizeContent():this.contentEle.appendChild(this.content),this.setMaxHeight()));break;case"header":""===this.header||(0,a.isNullOrUndefined)(this.header)?this.headerEle&&((0,a.detach)(this.headerEle),this.headerEle=null):this.setHeader();break;case"footerTemplate":if(""===this.footerTemplate||(0,a.isNullOrUndefined)(this.footerTemplate)){if(!this.ftrTemplateContent)return;(0,a.detach)(this.ftrTemplateContent),this.ftrTemplateContent=null,this.buttons=[{}]}else this.setFooterTemplate(),this.buttons=[{}];break;case"showCloseIcon":this.element.getElementsByClassName(ie).length>0?this.showCloseIcon||""!==this.header&&!(0,a.isNullOrUndefined)(this.header)?this.showCloseIcon||(0,a.detach)(this.closeIcon):((0,a.detach)(this.headerContent),this.headerContent=null):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":this.updateIsModal();break;case"height":(0,a.setStyleAttribute)(this.element,{height:(0,a.formatUnit)(t.height)}),this.updatePersistData();break;case"width":(0,a.setStyleAttribute)(this.element,{width:(0,a.formatUnit)(t.width)}),this.updatePersistData();break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex(this.zIndex),this.element.style.zIndex!==this.zIndex.toString()&&(this.calculatezIndex=!1);break;case"cssClass":this.setCSSClass(e.cssClass);break;case"buttons":this.unWireButtonEvents(),this.destroyButtons(),(0,a.isNullOrUndefined)(this.ftrTemplateContent)||((0,a.detach)(this.ftrTemplateContent),this.ftrTemplateContent=null),this.footerTemplate="",this.setButton();break;case"allowDragging":this.allowDragging&&!(0,a.isNullOrUndefined)(this.headerContent)?this.setAllowDragging():this.dragObj.destroy();break;case"target":this.setTarget(t.target);break;case"position":if(this.checkPositionData(),this.isModal){var n=this.position.X,s=this.position.Y;(0,a.isNullOrUndefined)(e.position)||((0,a.isNullOrUndefined)(e.position.X)||(n=e.position.X),(0,a.isNullOrUndefined)(e.position.Y)||(s=e.position.Y)),this.dlgContainer.classList.contains("e-dlg-"+n+"-"+s)&&this.dlgContainer.classList.remove("e-dlg-"+n+"-"+s)}this.positionChange(),this.updatePersistData();break;case"enableRtl":this.setEnableRTL();break;case"enableResize":this.setResize(),this.isModelResize=this.enableResize&&this.isModal,this.enableResize&&this.dialogOpen&&this.resetResizeIcon();break;case"minHeight":""!==this.minHeight&&(this.element.style.minHeight=(0,a.formatUnit)(this.minHeight))}}},e.prototype.setTarget=function(t){this.popupObj.relateTo=t,this.target=t,this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target,this.dragObj&&(this.dragObj.dragArea=this.targetEle),this.setMaxHeight(),this.isModal&&this.updateIsModal(),this.enableResize&&this.setResize(),(0,a.isNullOrUndefined)(this.targetEle)||(this.isModal&&!(0,a.isNullOrUndefined)(this.dlgContainer)?this.targetEle.appendChild(this.dlgContainer):(0,a.isNullOrUndefined)(this.element)||this.targetEle.appendChild(this.element))},e.prototype.updateIsModal=function(){if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)(0,a.isNullOrUndefined)(this.dlgOverlay)&&(this.setIsModal(),this.element.style.top="0px",this.element.style.left="0px",(0,a.isNullOrUndefined)(this.targetEle)||this.targetEle.appendChild(this.dlgContainer));else{for((0,a.removeClass)([this.element],ee),(0,a.removeClass)([document.body],[oe,ne]),(0,a.detach)(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}this.visible&&this.show(),this.positionChange(),this.isModal&&this.dlgOverlay&&a.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},e.prototype.setzIndex=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!0;var o=et(t);this.zIndex=o>this.zIndex?o:this.zIndex,this.isProtectedOnChange=i,e&&(this.popupObj.zIndex=this.zIndex)},e.prototype.windowResizeHandler=function(){var t;t=this.targetEle.clientWidth,at=t,function(t){lt=t}(this.targetEle.clientHeight),this.setMaxHeight()},e.prototype.getPersistData=function(){return this.addOnPersist(["width","height","position"])},e.prototype.removeAllChildren=function(t){for(;t.children[0];)this.removeAllChildren(t.children[0]),t.removeChild(t.children[0])},e.prototype.destroy=function(){if(!this.isDestroyed){var e=[Jt,ee,ue,fe,le,se],i=["role","aria-modal","aria-labelledby","aria-describedby","aria-grabbed","tabindex","style"];(0,a.removeClass)([this.targetEle],[oe,ne]),!(0,a.isNullOrUndefined)(this.element)&&this.element.classList.contains(le)&&(0,a.removeClass)([document.body],[oe,ne]),this.isModal&&(0,a.removeClass)([(0,a.isNullOrUndefined)(this.targetEle)?document.body:this.targetEle],ne),this.unWireEvents(),this.unWireButtonEvents(),this.destroyButtons(),(0,a.isNullOrUndefined)(this.closeIconBtnObj)||this.closeIconBtnObj.destroy(),(0,a.isNullOrUndefined)(this.dragObj)||this.dragObj.destroy(),!(0,a.isNullOrUndefined)(this.popupObj.element)&&this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),(0,a.removeClass)([this.element],e),(0,a.isNullOrUndefined)(this.cssClass)||""===this.cssClass||(0,a.removeClass)([this.element],this.cssClass.split(" ")),(0,a.isNullOrUndefined)(this.refElement)||(0,a.isNullOrUndefined)(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.isModal?this.dlgContainer:this.element,this.refElement),(0,a.detach)(this.refElement),this.refElement=void 0),this.isModal&&((0,a.detach)(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),(0,a.detach)(this.dlgContainer)),this.element.innerHTML=this.clonedEle.innerHTML;for(var o=0;o<i.length;o++)this.element.removeAttribute(i[o]);this.ftrTemplateContent=null,this.headerContent=null,this.isReact||this.isVue||(0,a.isNullOrUndefined)(this.contentEle)||this.removeAllChildren(this.contentEle),this.contentEle=null,ot=null,nt=null,ht=null,dt=null,Nt=null,Pt=null,St=null,t.prototype.destroy.call(this),this.isReact&&this.clearTemplate()}},e.prototype.wireWindowResizeEvent=function(){this.boundWindowResizeHandler=this.windowResizeHandler.bind(this),window.addEventListener("resize",this.boundWindowResizeHandler)},e.prototype.unWireWindowResizeEvent=function(){window.removeEventListener("resize",this.boundWindowResizeHandler),this.boundWindowResizeHandler=null},e.prototype.wireEvents=function(){this.showCloseIcon&&a.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&this.dlgOverlay&&a.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},e.prototype.unWireEvents=function(){this.showCloseIcon&&a.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&a.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler)},e.prototype.refreshPosition=function(){this.popupObj.refreshPosition(),this.element.classList.contains(ee)&&this.positionChange()},e.prototype.getDimension=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},e.prototype.show=function(t){var e=this;if(this.element.classList.contains(Kt)){if(!this.element.classList.contains(ae)||!(0,a.isNullOrUndefined)(t)){(0,a.isNullOrUndefined)(t)||this.fullScreen(t);var i=(0,a.isBlazor)()?{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,maxHeight:this.element.style.maxHeight}:{cancel:!1,element:this.element,container:this.isModal?this.dlgContainer:this.element,target:this.target,maxHeight:this.element.style.maxHeight};this.trigger("beforeOpen",i,(function(t){if(!t.cancel){if(e.element.style.maxHeight!==i.maxHeight&&(e.allowMaxHeight=!1,e.element.style.maxHeight=i.maxHeight),e.enableResize&&null==e.boundWindowResizeHandler&&!e.initialRender&&e.wireWindowResizeEvent(),e.storeActiveElement=document.activeElement,e.element.tabIndex=-1,e.isModal&&!(0,a.isNullOrUndefined)(e.dlgOverlay))if(e.dlgOverlay.style.display="block",e.dlgContainer.style.display="flex",(0,a.removeClass)([e.dlgOverlay],"e-fade"),(0,a.isNullOrUndefined)(e.targetEle))(0,a.addClass)([document.body],[oe,ne]);else{if(e.targetEle===document.body?e.dlgContainer.style.position="fixed":e.dlgContainer.style.position="absolute",e.dlgOverlay.style.position="absolute",(o=e.getTargetContainer(e.target))instanceof Element)"rtl"===window.getComputedStyle(o).getPropertyValue("direction")?e.element.style.position="absolute":e.element.style.position="relative";else e.element.style.position="relative";(0,a.addClass)([e.targetEle],[oe,ne])}var o,n={name:"None"===e.animationSettings.effect&&"Enable"===a.animationMode?"ZoomIn":e.animationSettings.effect+"In",duration:e.animationSettings.duration,delay:e.animationSettings.delay},s=e.isModal?e.element.parentElement:e.element;if(e.calculatezIndex&&(e.setzIndex(s,!0),(0,a.setStyleAttribute)(e.element,{zIndex:e.zIndex}),e.isModal&&e.setOverlayZindex(e.zIndex)),"None"===e.animationSettings.effect&&"Enable"===a.animationMode?e.popupObj.show(n):"None"===e.animationSettings.effect?e.popupObj.show():e.popupObj.show(n),e.isModal)if((o=e.getTargetContainer(e.target))instanceof Element)"rtl"!==window.getComputedStyle(o).getPropertyValue("direction")||e.IsDragStop||e.setPopupPosition();e.dialogOpen=!0;var l=e.isProtectedOnChange;e.isProtectedOnChange=!0,e.visible=!0,e.preventVisibility=!0,e.isProtectedOnChange=l}}))}this.isReact&&this.renderReactTemplates()}},e.prototype.hide=function(t){var e=this;if(this.element.classList.contains(Kt)&&this.preventVisibility){var i=(0,a.isBlazor)()?{cancel:!1,isInteracted:!!t,element:this.element,container:this.isModal?this.dlgContainer:this.element,event:t}:{cancel:!1,isInteracted:!!t,element:this.element,target:this.target,container:this.isModal?this.dlgContainer:this.element,event:t,closedBy:this.dlgClosedBy};this.closeArgs=i,this.trigger("beforeClose",i,(function(t){if(!t.cancel){e.enableResize&&e.unWireWindowResizeEvent();var i={name:"None"===e.animationSettings.effect&&"Enable"===a.animationMode?"ZoomOut":e.animationSettings.effect+"Out",duration:e.animationSettings.duration,delay:e.animationSettings.delay};"None"===e.animationSettings.effect&&"Enable"===a.animationMode?e.popupObj.hide(i):"None"===e.animationSettings.effect?e.popupObj.hide():e.popupObj.hide(i),setTimeout((function(){e.isModal&&!(0,a.isNullOrUndefined)(e.targetEle)&&e.targetEle.classList.contains(oe)&&e.targetEle.classList.contains(ne)&&(0,a.removeClass)([e.targetEle],[oe,ne]),document.body.classList.contains(oe)&&document.body.classList.contains(ne)&&(0,a.removeClass)([document.body],[oe,ne])}),e.animationSettings.duration+e.animationSettings.delay),e.dialogOpen=!1;var o=e.isProtectedOnChange;e.isProtectedOnChange=!0,e.visible=!1,e.preventVisibility=!1,e.isProtectedOnChange=o}e.dlgClosedBy=ge}))}},e.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){this.isModal||(this.element.style.top=document.scrollingElement.scrollTop+"px"),(0,a.addClass)([this.element],le);var e=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=(0,a.isNullOrUndefined)(this.target)?window.innerHeight+"px":this.targetEle.offsetHeight+"px",this.element.style.display=e,(0,a.addClass)([document.body],[oe,ne]),this.allowDragging&&!(0,a.isNullOrUndefined)(this.dragObj)&&this.dragObj.destroy()}else(0,a.removeClass)([this.element],le),(0,a.removeClass)([document.body],[oe,ne]),this.allowDragging&&!(0,a.isNullOrUndefined)(this.headerContent)&&this.setAllowDragging();return t},e.prototype.getButtons=function(t){return(0,a.isNullOrUndefined)(t)?this.btnObj:this.btnObj[t]},e.prototype.unWireButtonEvents=function(){if(this.buttons.length>0&&""===this.footerTemplate&&this.ftrTemplateContent)for(var t=0;t<this.buttons.length;t++)this.buttons[t].click&&"function"==typeof this.buttons[t].click&&this.ftrTemplateContent.children[t]&&a.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},e.prototype.destroyButtons=function(){if(!(0,a.isNullOrUndefined)(this.btnObj))for(var t=0;t<this.btnObj.length;t++)this.btnObj[t]&&!this.btnObj[t].isDestroyed&&this.btnObj[t].destroy()},_t([(0,a.Property)("")],e.prototype,"content",void 0),_t([(0,a.Property)(!0)],e.prototype,"enableHtmlSanitizer",void 0),_t([(0,a.Property)(!1)],e.prototype,"enablePersistence",void 0),_t([(0,a.Property)(!1)],e.prototype,"showCloseIcon",void 0),_t([(0,a.Property)(!1)],e.prototype,"isModal",void 0),_t([(0,a.Property)("")],e.prototype,"header",void 0),_t([(0,a.Property)(!0)],e.prototype,"visible",void 0),_t([(0,a.Property)(!1)],e.prototype,"enableResize",void 0),_t([(0,a.Property)(["South-East"])],e.prototype,"resizeHandles",void 0),_t([(0,a.Property)("auto")],e.prototype,"height",void 0),_t([(0,a.Property)("")],e.prototype,"minHeight",void 0),_t([(0,a.Property)("100%")],e.prototype,"width",void 0),_t([(0,a.Property)("")],e.prototype,"cssClass",void 0),_t([(0,a.Property)(1e3)],e.prototype,"zIndex",void 0),_t([(0,a.Property)(null)],e.prototype,"target",void 0),_t([(0,a.Property)("")],e.prototype,"footerTemplate",void 0),_t([(0,a.Property)(!1)],e.prototype,"allowDragging",void 0),_t([(0,a.Collection)([{}],Zt)],e.prototype,"buttons",void 0),_t([(0,a.Property)(!0)],e.prototype,"closeOnEscape",void 0),_t([(0,a.Complex)({},Gt)],e.prototype,"animationSettings",void 0),_t([(0,a.Complex)({X:"center",Y:"center"},Z)],e.prototype,"position",void 0),_t([(0,a.Event)()],e.prototype,"created",void 0),_t([(0,a.Event)()],e.prototype,"open",void 0),_t([(0,a.Event)()],e.prototype,"beforeSanitizeHtml",void 0),_t([(0,a.Event)()],e.prototype,"beforeOpen",void 0),_t([(0,a.Event)()],e.prototype,"close",void 0),_t([(0,a.Event)()],e.prototype,"beforeClose",void 0),_t([(0,a.Event)()],e.prototype,"dragStart",void 0),_t([(0,a.Event)()],e.prototype,"dragStop",void 0),_t([(0,a.Event)()],e.prototype,"drag",void 0),_t([(0,a.Event)()],e.prototype,"overlayClick",void 0),_t([(0,a.Event)()],e.prototype,"resizeStart",void 0),_t([(0,a.Event)()],e.prototype,"resizing",void 0),_t([(0,a.Event)()],e.prototype,"resizeStop",void 0),_t([(0,a.Event)()],e.prototype,"destroyed",void 0),e=_t([a.NotifyPropertyChanges],e)}(a.Component);!function(t){function e(t,e){var i=new ye(t);return i.appendTo(e),i}function i(t,e){return t.header=(0,a.isNullOrUndefined)(e.title)?null:e.title,t.content=(0,a.isNullOrUndefined)(e.content)?"":e.content,t.isModal=!!(0,a.isNullOrUndefined)(e.isModal)||e.isModal,t.showCloseIcon=!(0,a.isNullOrUndefined)(e.showCloseIcon)&&e.showCloseIcon,t.allowDragging=!(0,a.isNullOrUndefined)(e.isDraggable)&&e.isDraggable,t.closeOnEscape=!(0,a.isNullOrUndefined)(e.closeOnEscape)&&e.closeOnEscape,t.position=(0,a.isNullOrUndefined)(e.position)?{X:"center",Y:"top"}:e.position,t.animationSettings=(0,a.isNullOrUndefined)(e.animationSettings)?{effect:"Fade",duration:400,delay:0}:e.animationSettings,t.cssClass=(0,a.isNullOrUndefined)(e.cssClass)?"":e.cssClass,t.zIndex=(0,a.isNullOrUndefined)(e.zIndex)?1e3:e.zIndex,t.open=(0,a.isNullOrUndefined)(e.open)?null:e.open,t.width=(0,a.isNullOrUndefined)(e.width)?"auto":e.width,t.height=(0,a.isNullOrUndefined)(e.height)?"auto":e.height,t}function o(t,e,i){var o=i;return(0,a.isNullOrUndefined)(e.text)||(o.buttonModel.content=e.text),(0,a.isNullOrUndefined)(e.icon)||(o.buttonModel.iconCss=e.icon),(0,a.isNullOrUndefined)(e.cssClass)||(o.buttonModel.cssClass=e.cssClass),(0,a.isNullOrUndefined)(e.click)||(o.click=e.click),(0,a.isNullOrUndefined)(e.isFlat)||(o.isFlat=e.isFlat),o}t.alert=function(t){var n,s,l=(0,a.createElement)("div",{className:pe});return document.body.appendChild(l),(n=e("string"==typeof t?{content:t,position:{X:"center",Y:"top"},isModal:!0,header:he,buttons:[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}]}:function(t,e){var i=[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}}];return(0,a.isNullOrUndefined)(e.okButton)?t.buttons=i:t.buttons[0]=o(t.buttons[0],e.okButton,i[0]),t}(i({buttons:[]},s=t),s),l)).close=function(){t&&t.close&&t.close.apply(n),n.destroy(),n.element.classList.contains("e-dlg-modal")?(n.element.parentElement.remove(),n.target.classList.remove(de)):n.element.remove()},n},t.confirm=function(t){var n,s,l=(0,a.createElement)("div",{className:ce});return document.body.appendChild(l),(n=e("string"==typeof t?{position:{X:"center",Y:"top"},content:t,isModal:!0,header:he,buttons:[{buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},{buttonModel:{content:"Cancel"},click:function(){this.hide()}}]}:function(t,e){var i={buttonModel:{isPrimary:!0,content:"OK"},click:function(){this.hide()}},n={buttonModel:{content:"Cancel"},click:function(){this.hide()}};return(0,a.isNullOrUndefined)(e.okButton)?t.buttons[0]=i:t.buttons[0]=o(t.buttons[0],e.okButton,i),(0,a.isNullOrUndefined)(e.cancelButton)?t.buttons[1]=n:t.buttons[1]=o(t.buttons[1],e.cancelButton,n),t}(i({buttons:[]},s=t),s),l)).close=function(){t&&t.close&&t.close.apply(n),n.destroy(),n.element.classList.contains("e-dlg-modal")?(n.element.parentElement.remove(),n.target.classList.remove(de)):n.element.remove()},n}}(Wt||(Wt={}));var ve=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),be=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},Ee="e-tooltip",Ce="e-rtl",Oe="e-icons",we="e-tooltip-close",Ne="e-tooltip-wrap",Pe="e-tip-content",Se="e-arrow-tip",Te="e-arrow-tip-outer",xe="e-arrow-tip-inner",Ue="e-tip-bottom",Be="e-tip-top",He="e-tip-left",ke="e-tip-right",Me="e-popup",Le="e-popup-open",Re="e-popup-close",ze="e-lib",Ae="e-tooltip-popup-container",Ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ve(e,t),be([(0,a.Property)({effect:"FadeIn",duration:150,delay:0})],e.prototype,"open",void 0),be([(0,a.Property)({effect:"FadeOut",duration:150,delay:0})],e.prototype,"close",void 0),e}(a.ChildProperty),Ye=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.mouseMoveEvent=null,o.mouseMoveTarget=null,o.containerElement=null,o.isBodyContainer=!0,o}return ve(e,t),e.prototype.initialize=function(){this.formatPosition(),(0,a.addClass)([this.element],Ee)},e.prototype.formatPosition=function(){var t,e;this.position&&(0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1]))},e.prototype.renderArrow=function(){this.setTipClass(this.position);var t=this.createElement("div",{className:Se+" "+this.tipClass});t.appendChild(this.createElement("div",{className:Te+" "+this.tipClass})),t.appendChild(this.createElement("div",{className:xe+" "+this.tipClass})),this.tooltipEle.appendChild(t)},e.prototype.setTipClass=function(t){0===t.indexOf("Right")?this.tipClass=He:0===t.indexOf("Bottom")?this.tipClass=Be:0===t.indexOf("Left")?this.tipClass=ke:this.tipClass=Ue},e.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.tooltipEle.classList.remove(ze),this.popupObj=new $(this.tooltipEle,{height:this.height,width:this.width,position:{X:e.left,Y:e.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},e.prototype.getScalingFactor=function(t){if(!t)return{x:1,y:1};var e={x:1,y:1},i=t.closest('[style*="transform: scale"]');if(i&&i!==this.tooltipEle&&i.contains(this.tooltipEle)){var o=window.getComputedStyle(i).getPropertyValue("transform").match(/matrix\(([^)]+)\)/)[1].split(",").map(parseFloat);e.x=o[0],e.y=o[3]}return e},e.prototype.getTooltipPosition=function(t){this.tooltipEle.style.display="block";var e=this.element.closest('[style*="zoom"]');e&&(e.contains(this.tooltipEle)||(this.tooltipEle.style.zoom=getComputedStyle(e).zoom));var i=p(t,this.tooltipPositionX,this.tooltipPositionY,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect()),o=this.getScalingFactor(t),n=this.calculateTooltipOffset(this.position,o.x,o.y),s=this.calculateElementPosition(i,n),l=s[0],r=s[1],a=this.collisionFlipFit(t,l,r);return a.left=a.left/o.x,a.top=a.top/o.y,this.tooltipEle.style.display="",a},e.prototype.windowResize=function(){this.reposition(this.findTarget())},e.prototype.reposition=function(t){if(this.popupObj&&t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()}},e.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs),this.tooltipEventArgs=null},e.prototype.closePopupHandler=function(){this.isReact&&"Click"!==this.opensOn&&"function"!=typeof this.content&&this.clearTemplate(["content"]),this.clear();var t={type:this.tooltipEventArgs.event?this.tooltipEventArgs.event.type:null,cancel:!1,target:this.tooltipEventArgs.target,event:this.tooltipEventArgs.event?this.tooltipEventArgs.event:null,element:this.tooltipEle,isInteracted:!(0,a.isNullOrUndefined)(this.tooltipEventArgs.event)};this.trigger("afterClose",t),t=null},e.prototype.calculateTooltipOffset=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var o,n,s,l,r,h,d,p,c={top:0,left:0};if(1!==e||1!==i){var u=this.tooltipEle.getBoundingClientRect(),f=void 0;s=Math.round(u.width),l=Math.round(u.height),(r=(0,a.select)("."+Se,this.tooltipEle))&&(f=r.getBoundingClientRect()),o=r?Math.round(f.width):0,n=r?Math.round(f.height):0,h=this.showTipPointer?0:8,d=n/2+2+(l-this.tooltipEle.clientHeight*i),p=o/2+2+(s-this.tooltipEle.clientWidth*e)}else s=this.tooltipEle.offsetWidth,l=this.tooltipEle.offsetHeight,o=(r=(0,a.select)("."+Se,this.tooltipEle))?r.offsetWidth:0,n=r?r.offsetHeight:0,h=this.showTipPointer?0:8,d=n/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),p=o/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(h+=2),t){case"RightTop":c.left+=o+h,c.top-=l-d;break;case"RightCenter":c.left+=o+h,c.top-=l/2;break;case"RightBottom":c.left+=o+h,c.top-=d;break;case"BottomRight":c.top+=n+h,c.left-=p;break;case"BottomCenter":c.top+=n+h,c.left-=s/2;break;case"BottomLeft":c.top+=n+h,c.left-=s-p;break;case"LeftBottom":c.left-=o+s+h,c.top-=d;break;case"LeftCenter":c.left-=o+s+h,c.top-=l/2;break;case"LeftTop":c.left-=o+s+h,c.top-=l-d;break;case"TopLeft":c.top-=l+n+h,c.left-=s-p;break;case"TopRight":c.top-=l+n+h,c.left-=p;break;default:c.top-=l+n+h,c.left-=s/2}return c.left+=this.offsetX,c.top+=this.offsetY,c},e.prototype.updateTipPosition=function(t){var e=(0,a.selectAll)("."+Se+",."+Te+",."+xe,this.tooltipEle),i=[Ue,Be,He,ke];(0,a.removeClass)(e,i),this.setTipClass(t),(0,a.addClass)(e,this.tipClass)},e.prototype.adjustArrow=function(t,e,i,o){var n=(0,a.select)("."+Se,this.tooltipEle);if(!1!==this.showTipPointer&&null!==n){var s,l;this.updateTipPosition(e),this.tooltipEle.style.display="block";var r,h=this.tooltipEle.clientWidth,d=this.tooltipEle.clientHeight,p=(0,a.select)("."+xe,this.tooltipEle),c=n.offsetWidth,u=n.offsetHeight;if(this.tooltipEle.style.display="",this.tipClass===Ue||this.tipClass===Be){if(this.tipClass===Ue?(l="99.9%",p.style.top="-"+(u-2)+"px"):(l=-(u-1)+"px",p.style.top="-"+(u-6)+"px"),t)s=(r="Center"!==i||h>t.offsetWidth||this.mouseTrail)&&"Left"===i||!r&&"End"===this.tipPointerPosition?h-c-2+"px":r&&"Right"===i||!r&&"Start"===this.tipPointerPosition?"2px":!r||"End"!==this.tipPointerPosition&&"Start"!==this.tipPointerPosition?h/2-c/2+"px":"End"===this.tipPointerPosition?t.offsetWidth+(this.tooltipEle.offsetWidth-t.offsetWidth)/2-c/2-2+"px":(this.tooltipEle.offsetWidth-t.offsetWidth)/2-c/2+2+"px"}else this.tipClass===ke?(s="99.9%",p.style.left="-"+(c-2)+"px"):(s=-(c-1)+"px",p.style.left=c-2-c+"px"),l=(r="Center"!==o||d>t.offsetHeight||this.mouseTrail)&&"Top"===o||!r&&"End"===this.tipPointerPosition?d-u-2+"px":r&&"Bottom"===o||!r&&"Start"===this.tipPointerPosition?"2px":d/2-u/2+"px";n.style.top=l,n.style.left=s}},e.prototype.renderContent=function(t){var e=this,i=(0,a.select)("."+Pe,this.tooltipEle);if(this.cssClass&&(0,a.addClass)([this.tooltipEle],this.cssClass.split(" ")),t&&!(0,a.isNullOrUndefined)(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),(0,a.isNullOrUndefined)(this.content))t&&!(0,a.isNullOrUndefined)(t.getAttribute("data-content"))&&(i.innerHTML=t.getAttribute("data-content"));else if(i.innerHTML="",this.content instanceof HTMLElement)i.appendChild(this.content);else if("string"==typeof this.content){if(this.isAngular?this.setProperties({content:a.SanitizeHtmlHelper.sanitize(this.content)},!0):this.content=this.enableHtmlSanitizer?a.SanitizeHtmlHelper.sanitize(this.content):this.content,this.enableHtmlParse)(o=(0,a.compile)(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i,this.root))&&(0,a.append)(o,i);else i.textContent=this.content}else{var o;(o=(0,a.compile)(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i))&&(this.isAngular&&setTimeout((function(){e.reposition(t)}),1),(0,a.append)(o,i)),this.renderReactTemplates()}},e.prototype.renderCloseIcon=function(){if(this.isSticky){var t=this.createElement("div",{className:Oe+" "+we,attrs:{role:"button","aria-label":"Press escape to close the Tooltip"}});this.tooltipEle.appendChild(t),a.EventHandler.add(t,a.Browser.touchStartEvent,this.onStickyClose,this)}else{var e=this.tooltipEle.querySelector("."+Oe+"."+we);e&&(0,a.remove)(e)}},e.prototype.addDescribedBy=function(t,e){var i=(t.getAttribute("aria-describedby")||"").split(/\s+/);i.indexOf(e)<0&&i.push(e),(0,a.attributes)(t,{"aria-describedby":i.join(" ").trim(),"data-tooltip-id":e})},e.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),i=(t.getAttribute("aria-describedby")||"").split(/\s+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},e.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},e.prototype.touchEndHandler=function(){var t=this;if(!this.isSticky){this.autoCloseTimer=setTimeout((function(){t.close()}),1500)}},e.prototype.targetClick=function(t){var e;if(e=this.target?(0,a.closest)(t.target,this.target):this.element,!(0,a.isNullOrUndefined)(e)){var i=t;null===e.getAttribute("data-tooltip-id")?"mousedown"===i.type&&2===i.button||this.targetHover(t):this.isSticky||this.hideTooltip(this.animation.close,t,e)}},e.prototype.targetHover=function(t){var e;if(e=this.target?(0,a.closest)(t.target,this.target):this.element,!((0,a.isNullOrUndefined)(e)||null!==e.getAttribute("data-tooltip-id")&&0===this.closeDelay)){!(0,a.isNullOrUndefined)(this.tooltipEle)&&this.tooltipEle.getAttribute("e-animation-id")&&(a.Animation.stop(this.tooltipEle),this.clear());for(var i=0,o=[].slice.call((0,a.selectAll)('[data-tooltip-id= "'+this.ctrlId+'_content"]',document));i<o.length;i++){var n=o[i];this.restoreElement(n)}this.showTooltip(e,this.animation.open,t)}},e.prototype.mouseMoveBeforeOpen=function(t){this.mouseMoveEvent=t},e.prototype.mouseMoveBeforeRemove=function(){this.mouseMoveTarget&&a.EventHandler.remove(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen)},e.prototype.showTooltip=function(t,e,i){var o=this;clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.openDelay&&this.mouseTrail&&(this.mouseMoveBeforeRemove(),this.mouseMoveTarget=t,a.EventHandler.add(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen,this)),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:t,event:i||null,element:this.tooltipEle,isInteracted:!(0,a.isNullOrUndefined)(i)};this.trigger("beforeRender",this.tooltipEventArgs,function(n){o.beforeRenderCallback(n,t,i,e)}.bind(this))},e.prototype.beforeRenderCallback=function(t,e,i,o){t.cancel?(this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove()):(this.isHidden=!1,(0,a.isNullOrUndefined)(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?(0,a.getUniqueID)(this.element.getAttribute("id")):(0,a.getUniqueID)("tooltip"),this.tooltipEle=this.createElement("div",{className:Ne+" "+Me+" "+ze,attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"}}),this.tooltipEle.style.width=(0,a.formatUnit)(this.width),this.tooltipEle.style.height=(0,a.formatUnit)(this.height),this.tooltipEle.style.position="absolute",this.tooltipBeforeRender(e,this),this.tooltipAfterRender(e,i,o,this)):e&&(this.adjustArrow(e,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(e,this.ctrlId+"_content"),this.renderContent(e),a.Animation.stop(this.tooltipEle),this.reposition(e),this.tooltipAfterRender(e,i,o,this)))},e.prototype.appendContainer=function(t){"string"==typeof this.container?"body"===this.container?this.containerElement=document.body:(this.isBodyContainer=!1,this.containerElement=(0,a.select)(this.container,document)):this.container instanceof HTMLElement&&(this.containerElement=this.container,this.isBodyContainer="BODY"===this.containerElement.tagName),this.isBodyContainer||(0,a.addClass)([this.containerElement],Ae),this.containerElement.appendChild(t.tooltipEle)},e.prototype.tooltipBeforeRender=function(t,e){t&&(a.Browser.isDevice&&(0,a.addClass)([e.tooltipEle],"e-bigger"),"auto"!==e.width&&(e.tooltipEle.style.maxWidth=(0,a.formatUnit)(e.width)),e.tooltipEle.appendChild(e.createElement("div",{className:Pe})),this.appendContainer(e),(0,a.removeClass)([e.tooltipEle],"e-hidden"),e.addDescribedBy(t,e.ctrlId+"_content"),e.renderContent(t),(0,a.addClass)([e.tooltipEle],Le),e.showTipPointer&&e.renderArrow(),e.renderCloseIcon(),e.renderPopup(t),e.adjustArrow(t,e.position,e.tooltipPositionX,e.tooltipPositionY),a.Animation.stop(e.tooltipEle),e.reposition(t))},e.prototype.tooltipAfterRender=function(t,e,i,o){if(t){(0,a.removeClass)([o.tooltipEle],Le),(0,a.addClass)([o.tooltipEle],Re),o.tooltipEventArgs={type:e?e.type:null,cancel:!1,target:t,event:e||null,element:o.tooltipEle,isInteracted:!(0,a.isNullOrUndefined)(e)},o.needTemplateReposition()&&!o.mouseTrail&&("None"===i.effect||"FadeIn"===i.effect||this.isReact&&"string"!=typeof o.content)&&(o.tooltipEle.style.display="none");o.trigger("beforeOpen",o.tooltipEventArgs,function(n){o.beforeOpenCallback(n,t,i,e)}.bind(o))}},e.prototype.beforeOpenCallback=function(t,e,i,o){var n=this;if(t.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove(),this.restoreElement(e);else{var s={name:"None"===i.effect&&"Enable"===a.animationMode?"FadeIn":this.animation.open.effect,duration:i.duration,delay:i.delay,timingFunction:"easeOut"};if("None"===i.effect&&(s=void 0),this.openDelay>0){this.showTimer=setTimeout((function(){n.mouseTrail&&a.EventHandler.add(e,"mousemove touchstart mouseenter",n.onMouseMove,n),n.popupObj&&(n.popupObj.show(s,e),n.mouseMoveEvent&&n.mouseTrail&&n.onMouseMove(n.mouseMoveEvent))}),this.openDelay)}else this.popupObj&&this.popupObj.show(s,e)}o&&this.wireMouseEvents(o,e)},e.prototype.needTemplateReposition=function(){return!(0,a.isNullOrUndefined)(this.viewContainerRef)&&"string"!=typeof this.viewContainerRef||this.isReact},e.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=w(this.tooltipEle,this.checkCollideTarget(),e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},e.prototype.calculateElementPosition=function(t,e){return[this.isBodyContainer?t.left+e.left:t.left-this.containerElement.getBoundingClientRect().left+e.left+window.pageXOffset+this.containerElement.scrollLeft,this.isBodyContainer?t.top+e.top:t.top-this.containerElement.getBoundingClientRect().top+e.top+window.pageYOffset+this.containerElement.scrollTop]},e.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),n=o.position;if(this.tooltipPositionY!==o.vertical&&(n=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===n.indexOf("Left")&&(o.vertical="LeftTop"===n||"LeftCenter"===n?"Top":"Bottom",n=o.vertical+"Left"),0===n.indexOf("Right")&&(o.vertical="RightTop"===n||"RightCenter"===n?"Top":"Bottom",n=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:n},this.trigger("beforeCollision",this.tooltipEventArgs),this.tooltipEventArgs.cancel)n=this.position;else{var s=o.vertical,l=o.horizontal;if(o.position!==n){var r=p(t,l,s,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect());this.adjustArrow(t,n,l,s);var h=this.getScalingFactor(t),d=this.calculateTooltipOffset(n,h.x,h.y);d.top-=this.getOffSetPosition("TopBottom",n,this.offsetY),d.left-=this.getOffSetPosition("RightLeft",n,this.offsetX),o.position=n;var c=this.calculateElementPosition(r,d);o.left=c[0],o.top=c[1]}else this.adjustArrow(t,n,l,s)}var u={left:o.left,top:o.top},f=this.isBodyContainer?O(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:this.windowCollision},u):u;this.tooltipEle.style.display="block";var m=(0,a.select)("."+Se,this.tooltipEle);if(this.showTipPointer&&null!=m&&(0===n.indexOf("Bottom")||0===n.indexOf("Top"))){var g=parseInt(m.style.left,10)-(f.left-o.left);g<0?g=0:g+m.offsetWidth>this.tooltipEle.clientWidth&&(g=this.tooltipEle.clientWidth-m.offsetWidth),m.style.left=g.toString()+"px"}return this.tooltipEle.style.display="",u.left=f.left,u.top=f.top,u},e.prototype.getOffSetPosition=function(t,e,i){return-1!==t.indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!==t.indexOf(e.split(/(?=[A-Z])/)[0])?2*i:0},e.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},e.prototype.hideTooltip=function(t,e,i){var o=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);this.hideTimer=setTimeout((function(){o.closeDelay&&o.tooltipEle&&o.isTooltipOpen||o.tooltipHide(t,e,i)}),this.closeDelay)}else this.tooltipHide(t,e,i)},e.prototype.tooltipHide=function(t,e,i){var o,n=this;o=e?this.target?i||e.target:this.element:(0,a.select)('[data-tooltip-id= "'+this.ctrlId+'_content"]',document),this.tooltipEventArgs={type:e?e.type:null,cancel:!1,target:o,event:e||null,element:this.tooltipEle,isInteracted:!(0,a.isNullOrUndefined)(e)},this.trigger("beforeClose",this.tooltipEventArgs,(function(i){i.cancel?n.isHidden=!1:(n.mouseMoveBeforeRemove(),n.popupHide(t,o,e))}))},e.prototype.popupHide=function(t,e,i){e&&i&&this.restoreElement(e),this.isHidden=!0;var o={name:"None"===t.effect&&"Enable"===a.animationMode?"FadeOut":this.animation.close.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};"None"===t.effect&&(o=void 0),this.popupObj&&this.popupObj.hide(o)},e.prototype.restoreElement=function(t){this.unwireMouseEvents(t),(0,a.isNullOrUndefined)(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},e.prototype.clear=function(){var t=this.findTarget();t&&this.restoreElement(t),this.tooltipEle&&((0,a.removeClass)([this.tooltipEle],Re),(0,a.addClass)([this.tooltipEle],Le)),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&(0,a.remove)(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},e.prototype.tooltipHover=function(){this.tooltipEle&&(this.isTooltipOpen=!0)},e.prototype.tooltipMouseOut=function(t){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,t,this.findTarget())},e.prototype.onMouseOut=function(t){var e=t.relatedTarget;if(e&&!this.mouseTrail){var i=(0,a.closest)(e,"."+Ne+"."+ze+"."+Me);i?a.EventHandler.add(i,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,t,this.findTarget()),0===this.closeDelay&&("None"===this.animation.close.effect||this.isReact&&"string"!=typeof this.content)&&this.clear())}else this.hideTooltip(this.animation.close,t,this.findTarget()),this.clear();this.popupObj&&!this.popupObj.element.classList.contains(Le)&&this.clear()},e.prototype.tooltipElementMouseOut=function(t){this.hideTooltip(this.animation.close,t,this.findTarget()),a.EventHandler.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},e.prototype.onStickyClose=function(){this.close()},e.prototype.onMouseMove=function(t){var e=0,i=0;if(t.type.indexOf("touch")>-1?(t.preventDefault(),e=t.touches[0].pageX,i=t.touches[0].pageY):(e=t.pageX,i=t.pageY),!(0,a.isNullOrUndefined)(this.tooltipEle)){a.Animation.stop(this.tooltipEle),(0,a.removeClass)([this.tooltipEle],Re),(0,a.addClass)([this.tooltipEle],Le),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var o=this.getScalingFactor(t.target),n=this.calculateTooltipOffset(this.position,o.x,o.y),s=e+n.left+this.offsetX,l=i+n.top+this.offsetY,r=this.checkCollision(t.target,s,l);if(this.tooltipPositionX!==r.horizontal||this.tooltipPositionY!==r.vertical){var h=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?r.vertical+r.horizontal:r.horizontal+r.vertical;r.position=h,this.adjustArrow(t.target,r.position,r.horizontal,r.vertical);var d=this.calculateTooltipOffset(r.position,o.x,o.y);r.left=e+d.left-this.offsetX,r.top=i+d.top-this.offsetY}this.tooltipEle.style.left=r.left+"px",this.tooltipEle.style.top=r.top+"px"}},e.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},e.prototype.touchEnd=function(t){this.tooltipEle&&null===(0,a.closest)(t.target,"."+Ee)&&!this.isSticky&&this.close()},e.prototype.scrollHandler=function(t){this.tooltipEle&&!this.isSticky&&((0,a.closest)(t.target,"."+Ne+"."+ze+"."+Me)||this.isSticky||this.close())},e.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},e.prototype.preRender=function(){this.tipClass=Ue,this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},e.prototype.wireEvents=function(t){for(var e=0,i=this.getTriggerList(t);e<i.length;e++){var o=i[e];if("Custom"===o)return;"Focus"===o&&this.wireFocusEvents(),"Click"===o&&a.EventHandler.add(this.element,a.Browser.touchStartEvent,this.targetClick,this),"Hover"===o&&(a.Browser.isDevice?(this.touchModule=new a.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),a.EventHandler.add(this.element,a.Browser.touchEndEvent,this.touchEndHandler,this)):a.EventHandler.add(this.element,"mouseover",this.targetHover,this))}this.windowResizeBound=this.windowResize.bind(this),this.keyDownBound=this.keyDown.bind(this),this.touchEndBound=this.touchEnd.bind(this),this.scrollWheelBound=this.scrollHandler.bind(this),document.addEventListener("wheel",this.scrollWheelBound),document.addEventListener("scroll",this.scrollWheelBound),document.addEventListener("touchend",this.touchEndBound),document.addEventListener("keydown",this.keyDownBound),window.addEventListener("resize",this.windowResizeBound)},e.prototype.getTriggerList=function(t){return t?("Auto"===t&&(t=a.Browser.isDevice?"Hover":"Hover Focus"),t.split(" ")):[]},e.prototype.wireFocusEvents=function(){if((0,a.isNullOrUndefined)(this.target))a.EventHandler.add(this.element,"focusin",this.targetHover,this);else{var t=[].slice.call((0,a.selectAll)(this.target,this.element));if(this.targetsList=t,!(0,a.isNullOrUndefined)(this.targetsList)&&this.targetsList.length>0)for(var e=0,i=t;e<i.length;e++){var o=i[e];a.EventHandler.add(o,"focus",this.targetHover,this)}else a.EventHandler.add(this.element,"focusin",this.targetHover,this)}},e.prototype.wireMouseEvents=function(t,e){this.tooltipEle&&(this.isSticky||("focus"===t.type&&a.EventHandler.add(e,"blur",this.onMouseOut,this),"focusin"===t.type&&a.EventHandler.add(e,"focusout",this.onMouseOut,this),"mouseover"===t.type&&a.EventHandler.add(e,"mouseleave",this.onMouseOut,this),this.closeDelay&&(a.EventHandler.add(this.tooltipEle,"mouseenter",this.tooltipHover,this),a.EventHandler.add(this.tooltipEle,"mouseleave",this.tooltipMouseOut,this))),this.mouseTrail&&0===this.openDelay&&a.EventHandler.add(e,"mousemove touchstart mouseenter",this.onMouseMove,this))},e.prototype.unwireEvents=function(t){for(var e=0,i=this.getTriggerList(t);e<i.length;e++){var o=i[e];if("Custom"===o)return;"Focus"===o&&this.unwireFocusEvents(),"Click"===o&&a.EventHandler.remove(this.element,a.Browser.touchStartEvent,this.targetClick),"Hover"===o&&(a.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),a.EventHandler.remove(this.element,a.Browser.touchEndEvent,this.touchEndHandler)):a.EventHandler.remove(this.element,"mouseover",this.targetHover))}document.removeEventListener("touchend",this.touchEndBound),this.touchEndBound=null,document.removeEventListener("wheel",this.scrollWheelBound),document.removeEventListener("scroll",this.scrollWheelBound),this.scrollWheelBound=null,window.removeEventListener("resize",this.windowResizeBound),this.windowResizeBound=null,document.removeEventListener("keydown",this.keyDownBound),this.keyDownBound=null},e.prototype.unwireFocusEvents=function(){if((0,a.isNullOrUndefined)(this.target))a.EventHandler.remove(this.element,"focusin",this.targetHover);else{var t=[].slice.call((0,a.selectAll)(this.target,this.element));if(!(0,a.isNullOrUndefined)(this.targetsList)&&this.targetsList.length>0)for(var e=0,i=t;e<i.length;e++){var o=i[e];a.EventHandler.remove(o,"focus",this.targetHover)}else a.EventHandler.remove(this.element,"focusin",this.targetHover)}},e.prototype.unwireMouseEvents=function(t){if(!this.isSticky){for(var e=0,i=this.getTriggerList(this.opensOn);e<i.length;e++){var o=i[e];"Focus"===o&&(a.EventHandler.remove(t,"blur",this.onMouseOut),a.EventHandler.remove(t,"focusout",this.onMouseOut)),"Hover"!==o||a.Browser.isDevice||a.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.closeDelay&&(a.EventHandler.remove(t,"mouseenter",this.tooltipHover),a.EventHandler.remove(t,"mouseleave",this.tooltipMouseOut))}this.mouseTrail&&a.EventHandler.remove(t,"mousemove touchstart mouseenter",this.onMouseMove)},e.prototype.findTarget=function(){return(0,a.select)('[data-tooltip-id= "'+this.ctrlId+'_content"]',document)},e.prototype.getModuleName=function(){return"tooltip"},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.onPropertyChanged=function(t,e){for(var i=this.findTarget(),o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"width":this.tooltipEle&&i&&(this.tooltipEle.style.width=this.tooltipEle.style.maxWidth=(0,a.formatUnit)(t.width),this.reposition(i));break;case"height":this.tooltipEle&&i&&(this.tooltipEle.style.height=(0,a.formatUnit)(t.height),this.reposition(i));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(e.opensOn),this.wireEvents(t.opensOn);break;case"position":if(this.formatPosition(),this.tooltipEle&&i){var s=(0,a.select)("."+xe,this.tooltipEle);s&&(s.style.top=s.style.left=null),this.reposition(i)}break;case"tipPointerPosition":this.tooltipEle&&i&&this.reposition(i);break;case"offsetX":if(this.tooltipEle){var l=t.offsetX-e.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+l).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var r=t.offsetY-e.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+r).toString()+"px"}break;case"cssClass":this.tooltipEle&&(e.cssClass&&(0,a.removeClass)([this.tooltipEle],e.cssClass.split(" ")),t.cssClass&&(0,a.addClass)([this.tooltipEle],t.cssClass.split(" ")));break;case"enableRtl":this.tooltipEle&&(this.enableRtl?(0,a.addClass)([this.tooltipEle],Ce):(0,a.removeClass)([this.tooltipEle],Ce));break;case"isSticky":this.tooltipEle&&i&&(this.renderCloseIcon(),this.reposition(i));break;case"container":(0,a.isNullOrUndefined)(this.containerElement)||(0,a.removeClass)([this.containerElement],Ae),this.container=t.container,this.tooltipEle&&i&&(this.appendContainer(this),this.reposition(i))}}},e.prototype.open=function(t,e){(0,a.isNullOrUndefined)(e)&&(e=this.animation.open),(0,a.isNullOrUndefined)(t)&&(t=this.element),"none"!==t.style.display&&this.showTooltip(t,e)},e.prototype.close=function(t){t||(t=this.animation.close),this.hideTooltip(t)},e.prototype.refresh=function(t){(this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t),(0,a.isNullOrUndefined)(this.targetsList)||(0,a.isNullOrUndefined)(this.target))||(0,a.selectAll)(this.target,this.element).length!==this.targetsList.length&&(this.unwireEvents(this.opensOn),this.wireEvents(this.opensOn))},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltipEle&&(0,a.remove)(this.tooltipEle),this.popupObj&&this.popupObj.destroy(),q(),(0,a.removeClass)([this.element],Ee),this.unwireEvents(this.opensOn),this.unwireMouseEvents(this.element),this.tooltipEle=null,this.popupObj=null;for(var e=0,i=(0,a.selectAll)('[data-tooltip-id= "'+this.ctrlId+'_content"]',this.element);e<i.length;e++){var o=i[e];this.restoreElement(o)}this.containerElement=null,this.tipClass=null,this.tooltipPositionX=null,this.tooltipPositionY=null,this.ctrlId=null,this.tooltipEventArgs=null,this.touchModule=null,this.mouseMoveEvent=null,this.mouseMoveTarget=null,this.containerElement=null,this.targetsList=null},be([(0,a.Property)("auto")],e.prototype,"width",void 0),be([(0,a.Property)("auto")],e.prototype,"height",void 0),be([(0,a.Property)()],e.prototype,"content",void 0),be([(0,a.Property)("body")],e.prototype,"container",void 0),be([(0,a.Property)()],e.prototype,"target",void 0),be([(0,a.Property)("TopCenter")],e.prototype,"position",void 0),be([(0,a.Property)(0)],e.prototype,"offsetX",void 0),be([(0,a.Property)(0)],e.prototype,"offsetY",void 0),be([(0,a.Property)(!0)],e.prototype,"showTipPointer",void 0),be([(0,a.Property)(!0)],e.prototype,"enableHtmlParse",void 0),be([(0,a.Property)(!1)],e.prototype,"windowCollision",void 0),be([(0,a.Property)("Auto")],e.prototype,"tipPointerPosition",void 0),be([(0,a.Property)("Auto")],e.prototype,"opensOn",void 0),be([(0,a.Property)(!1)],e.prototype,"mouseTrail",void 0),be([(0,a.Property)(!1)],e.prototype,"isSticky",void 0),be([(0,a.Complex)({},Ie)],e.prototype,"animation",void 0),be([(0,a.Property)(0)],e.prototype,"openDelay",void 0),be([(0,a.Property)(0)],e.prototype,"closeDelay",void 0),be([(0,a.Property)()],e.prototype,"cssClass",void 0),be([(0,a.Property)(!0)],e.prototype,"enableHtmlSanitizer",void 0),be([(0,a.Property)("")],e.prototype,"htmlAttributes",void 0),be([(0,a.Event)()],e.prototype,"beforeRender",void 0),be([(0,a.Event)()],e.prototype,"beforeOpen",void 0),be([(0,a.Event)()],e.prototype,"afterOpen",void 0),be([(0,a.Event)()],e.prototype,"beforeClose",void 0),be([(0,a.Event)()],e.prototype,"afterClose",void 0),be([(0,a.Event)()],e.prototype,"beforeCollision",void 0),be([(0,a.Event)()],e.prototype,"created",void 0),be([(0,a.Event)()],e.prototype,"destroyed",void 0),e=be([a.NotifyPropertyChanges],e)}(a.Component),De={},Xe=30,je=30,Fe=30,qe=30,We=30,Ve=30,_e=36,Ze=36,Ge="e-spin-show",Ke="e-spin-hide",Je="e-spin-material",Qe="e-spin-material3",$e="e-spin-tailwind3",ti="e-spin-fabric",ei="e-spin-fluent",ii="e-spin-fluent2",oi="e-spin-tailwind",ni="e-spin-bootstrap",si="e-spin-bootstrap4",li="e-spin-bootstrap5",ri="e-spin-high-contrast",ai="e-spinner-pane",hi="e-spinner-inner",di="e-path-circle",pi="e-path-arc",ci="e-spin-label",ui="e-spin-template",fi=null,mi=null;function gi(t,e,i,o){switch(t){case"Create":yi({type:o,target:document.querySelector(e.target),cssClass:e.cssClass,label:e.label,width:e.width});break;case"Show":Bi(document.querySelector(i));break;case"Hide":ki(document.querySelector(i));break;case"Set":Mi({cssClass:e.cssClass,type:o})}}function yi(t,e){var i;if(t.target){var o,n=(0,a.isNullOrUndefined)(e)?a.createElement:e,s=function(t,e){var i=e("div",{}),o=e("div",{});return i.classList.add(ai),o.classList.add(hi),o.setAttribute("aria-disabled","true"),t.appendChild(i),i.appendChild(o),{wrap:i,inner_wrap:o}}(t.target,n);if(!(0,a.isNullOrUndefined)(t.cssClass)){var l=t.cssClass.split(" ").filter((function(t){return""!==t.trim()}));(i=s.wrap.classList).add.apply(i,l)}if((0,a.isNullOrUndefined)(t.template)&&(0,a.isNullOrUndefined)(fi)){var r=(0,a.isNullOrUndefined)(t.type)?function(t){var e=window.getComputedStyle(t,":after").getPropertyValue("content");return e.replace(/['"]+/g,"")}(s.wrap):t.type;o=function(t,e){var i;switch(e){case"Material":i=Xe;break;case"Material3":i=je;break;case"Fabric":case"Tailwind":case"Tailwind-dark":case"Tailwind3":i=Fe;break;case"Fluent":i=qe;break;case"Fluent2":i=We;break;case"Bootstrap4":i=_e;break;case"Bootstrap5":i=Ze;break;default:i=Ve}return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}((0,a.isNullOrUndefined)(t.width)?void 0:t.width,r),vi(r,s.wrap,o,n),(0,a.isNullOrUndefined)(t.label)||function(t,e,i){var o=i("div",{});o.classList.add(ci),o.innerHTML=e,t.appendChild(o)}(s.inner_wrap,t.label,n)}else{var h=(0,a.isNullOrUndefined)(t.template)?fi:t.template;s.wrap.classList.add(ui),bi(s.wrap,h,mi)}s.wrap.classList.add(Ke),s=null}}function vi(t,e,i,o){var n=e.querySelector("."+hi),s=n.querySelector("svg");switch((0,a.isNullOrUndefined)(s)||n.removeChild(s),t){case"Material":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Material",radius:e},Oi(t,o,i,Je),Ni(e,t,"Material",Je)}(n,i,o);break;case"Material3":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Material3",radius:e},Oi(t,o,i,Qe),Ni(e,t,"Material3",Qe)}(n,i,o);break;case"Fabric":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Fabric",radius:e},Ci(t,o,ti,i),xi(e,t,ti)}(n,i,o);break;case"Fluent":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Fluent",radius:e},Ci(t,o,ei,i),xi(e,t,ei)}(n,i,o);break;case"Fluent2":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Fluent2",radius:e},Ci(t,o,ii,i),xi(e,t,ii)}(n,i,o);break;case"Bootstrap":!function(t,e){var i=Ei();De[""+i]={timeOut:0,type:"Bootstrap",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=64,n=32,s=2;i.setAttribute("id",e),i.setAttribute("class",ni),i.setAttribute("viewBox","0 0 "+o+" "+o),t.insertBefore(i,t.firstChild);for(var l=0;l<=7;l++){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.setAttribute("class",di+"_"+l),r.setAttribute("r",s+""),r.setAttribute("transform","translate("+n+","+n+")"),i.appendChild(r)}}(t,i),function(t,e){var i=t.querySelector("svg.e-spin-bootstrap"),o=0,n=0,s=24;i.style.width=i.style.height=e+"px";for(var l=90,r=0;r<=7;r++){var a=Ui(o,n,s,l),h=i.querySelector("."+di+"_"+r);h.setAttribute("cx",a.x+""),h.setAttribute("cy",a.y+""),l=l>=360?0:l,l+=45}}(t,e)}(n,i);break;case"HighContrast":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"HighContrast",radius:e},Ci(t,o,ri,i),xi(e,t,ri)}(n,i,o);break;case"Bootstrap4":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Bootstrap4",radius:e},Oi(t,o,i,si),Ni(e,t,"Bootstrap4",si)}(n,i,o);break;case"Bootstrap5":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Bootstrap5",radius:e},Oi(t,o,i,li),Ni(e,t,"Bootstrap5",li)}(n,i,o);break;case"Tailwind":case"Tailwind-dark":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Tailwind",radius:e},Ci(t,o,oi,i),xi(e,t,oi)}(n,i,o);break;case"Tailwind3":!function(t,e,i){var o=Ei();De[""+o]={timeOut:0,type:"Tailwind3",radius:e},Oi(t,o,i,$e),Ni(e,t,"Tailwind3",$e)}(n,i,o)}}function bi(t,e,i){(0,a.isNullOrUndefined)(i)||t.classList.add(i),t.querySelector(".e-spinner-inner").innerHTML=e}function Ei(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(62*Math.random()));return t}function Ci(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("id",e),n.setAttribute("class",i);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",di);var l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("class",pi),t.insertBefore(n,t.firstChild),n.appendChild(s),n.appendChild(l)}function Oi(t,e,i,o){var n=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",o),n.setAttribute("id",e),s.setAttribute("class",di),t.insertBefore(n,t.firstChild),n.appendChild(s)}function wi(t){!function(t,e,i,o,n,s,l){var r=++l.globalInfo[l.uniqueID].previousId,h=(new Date).getTime(),d=e-t,p=(f=2*l.globalInfo[l.uniqueID].radius+"",parseFloat(f)),c=Pi(p),u=-90*(l.globalInfo[l.uniqueID].count||0);var f;function m(e){var n=Math.max(0,Math.min((new Date).getTime()-h,o));g(i(n,t,d,o),e.container),r===e.globalInfo[e.uniqueID].previousId&&n<o?De[e.uniqueID].timeOut=setTimeout(m.bind(null,e),1):wi(e)}function g(t,e){if(!(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material"))||!(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material3"))||!(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-tailwind3"))){var i=void 0;if((0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material"))||(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))?(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material3"))||(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-material3").querySelector("path.e-path-circle"))?(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-tailwind3"))||(0,a.isNullOrUndefined)(e.querySelector("svg.e-spin-tailwind3").querySelector("path.e-path-circle"))||(i=e.querySelector("svg.e-spin-tailwind3")):i=e.querySelector("svg.e-spin-material3"):i=e.querySelector("svg.e-spin-material"),!(0,a.isNullOrUndefined)(i)){var o=i.querySelector("path.e-path-circle");o.setAttribute("stroke-dashoffset",Si(p,c,t,s)+""),o.setAttribute("transform","rotate("+u+" "+p/2+" "+p/2+")")}}}m(l)}(1,149,Ti,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function Ni(t,e,i,o){var n=2*t,s=e.querySelector("svg."+o),l=s.querySelector("path.e-path-circle"),r=Pi(n),a=n/2+"px";s.setAttribute("viewBox","0 0 "+n+" "+n),s.style.width=s.style.height=n+"px",s.style.transformOrigin=a+" "+a+" "+a,l.setAttribute("d",function(t,e){var i=t/2,o=e/2;return"M"+i+","+o+"A"+(i-o)+","+(i-o)+" 0 1 1 "+o+","+i}(n,r)),"Material"!==i&&"Material3"!==i&&"Fluent2"!==i&&"Tailwind3"!==i||(l.setAttribute("stroke-width",r+""),l.setAttribute("stroke-dasharray",(n-r)*Math.PI*.75+""),l.setAttribute("stroke-dashoffset",Si(n,r,1,75)+""))}function Pi(t){return.1*t}function Si(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function Ti(t,e,i,o){var n=(t/=o)*t,s=n*t;return e+i*(6*s*n+-15*n*n+10*s)}function xi(t,e,i){var o=t,n=t,s=2*t,l=e.querySelector("."+i),r=l.querySelector(".e-path-circle"),a=l.querySelector(".e-path-arc"),h=s/2+"px";r.setAttribute("d",function(t,e,i){var o=["M",t,e,"m",-i,0,"a",i,i,0,1,0,2*i,0,"a",i,i,0,1,0,2*-i,0].join(" ");return o}(o,n,t)),a.setAttribute("d",function(t,e,i,o,n){var s=Ui(t,e,i,n),l=Ui(t,e,i,o),r=["M",s.x,s.y,"A",i,i,0,0,0,l.x,l.y].join(" ");return r}(o,n,t,315,45)),l.setAttribute("viewBox","0 0 "+s+" "+s),l.style.transformOrigin=h+" "+h+" "+h,l.style.width=l.style.height=s+"px"}function Ui(t,e,i,o){var n=(o-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function Bi(t){Hi(t,!1),t=null}function Hi(t,e){var i;if(t)if(t.classList.contains(ai))i=t;else{var o=t.querySelectorAll("."+ai);if(a.Browser.isIE){for(var n=0;n<o.length;n++)if(o[n].parentElement&&o[n].parentElement===t){i=o[n];break}}else i=Array.from(o).find((function(e){return e.parentElement===t}))||null}if(t&&i){var s=i.querySelector("."+hi);if(e?!i.classList.contains(ui)&&!i.classList.contains(Ke):!i.classList.contains(ui)&&!i.classList.contains(Ge)){var l=i.querySelector("svg");if((0,a.isNullOrUndefined)(l))return;var r=l.getAttribute("id");switch(De[""+r].isAnimate=!e,De[""+r].type){case"Material":case"Material3":case"Tailwind3":e?clearTimeout(De[r].timeOut):function(t,e,i){var o={};De[""+e].timeOut=0,o[""+e]=function(t,e){return{radius:e,count:0,previousId:0}}(0,i),wi({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}(s,r,De[r].radius);break;case"Bootstrap":e?clearTimeout(De[r].timeOut):function(t){for(var e,i,o,n,s,l=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),r=1;r<=8;r++)a(t.getElementsByClassName("e-path-circle_"+(8===r?0:r))[0],r,r,(e=void 0,i=void 0,o=void 0,n=void 0,s=void 0,e=[],o=r,n=!1,s=1,function t(l){e.push(l),(l!==o||1===s)&&(l<=i&&l>1&&!n?l=parseFloat((l-.2).toFixed(2)):1===l?(l=7,l=parseFloat((l+.2).toFixed(2)),n=!0):l<8&&n?8===(l=parseFloat((l+.2).toFixed(2)))&&(n=!1):l<=8&&!n&&(l=parseFloat((l-.2).toFixed(2))),++s,t(l))}(i=r),e),l);function a(t,e,i,o,n){var s=0;!function e(i){De[""+n].isAnimate&&(++s,t.setAttribute("r",i+""),s>=o.length&&(s=0),De[n].timeOut=setTimeout(e.bind(null,o[s]),18))}(e)}}(s)}}e?(0,a.classList)(i,[Ke],[Ge]):(0,a.classList)(i,[Ge],[Ke]),t=null}}function ki(t){Hi(t,!0),t=null}function Mi(t,e){var i=(0,a.isNullOrUndefined)(e)?a.createElement:e;void 0!==t.template&&(fi=t.template,void 0!==t.template&&(mi=t.cssClass));for(var o=document.querySelectorAll("."+ai),n=0;n<o.length;n++)Li(t.template,o[n],t.type,t.cssClass,i)}function Li(t,e,i,o,n){(0,a.isNullOrUndefined)(t)&&!e.classList.contains(ui)?(!function(t,e,i,o){(0,a.isNullOrUndefined)(i)||t.classList.add(i);var n=t.querySelector("svg");if(!(0,a.isNullOrUndefined)(n)){var s="Bootstrap"===e?parseFloat(n.style.height):parseFloat(n.style.height)/2;if(n.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var l=n.getAttribute("id");clearTimeout(De[""+l].timeOut)}vi(e,t,s,o)}}(e,i,o,n),e.classList.contains(Ge)?(e.classList.remove(Ge),Bi(e)):(e.classList.remove(Ke),ki(e))):(fi=t,(0,a.isNullOrUndefined)(o)||(mi=o),(0,a.isNullOrUndefined)(fi)||bi(e,fi,mi))}})(),s})()));