UNPKG

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