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