Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-popups

Package Overview
Dependencies
2
Maintainers
2
Versions
219
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 16.1.29 to 16.1.30

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

- Issue with click event on primary button has been fixed.
## 16.1.29 (2018-03-13)
### Dialog
#### Bug Fixes
- The multiple Dialog with positioning issue resolved in Dialog components.

@@ -11,0 +19,0 @@

6

dist/ej2-popups.umd.min.js
/*!
* filename: ej2-popups.umd.min.js
* version : 16.1.29
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
* version : 16.1.30
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.

@@ -11,3 +11,3 @@ * A copy of the current license can be obtained at any time by e-mailing

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons"],e):e(t.ej={},t.ej2Base,t.ej2Buttons)}(this,function(t,e,i){"use strict";function o(t,i){var o=!1,n={left:0,top:0},s=t;if(!t||!i)return n;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(o=!0);(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left-=t.scrollLeft,n.top-=t.scrollTop,t=t.parentElement;return n}function n(t,e,i,o){if(it=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),$=t.ownerDocument,Q=t;return function(t,e,i){switch(J=Q.getBoundingClientRect(),e+t){case"topcenter":s(f(),i),r(d(),i);break;case"topright":s(u(),i),r(d(),i);break;case"centercenter":s(f(),i),r(p(),i);break;case"centerright":s(u(),i),r(p(),i);break;case"centerleft":s(c(),i),r(p(),i);break;case"bottomcenter":s(f(),i),r(h(),i);break;case"bottomright":s(u(),i),r(h(),i);break;case"bottomleft":s(c(),i),r(h(),i);break;default:case"topleft":s(c(),i),r(d(),i)}return i}(e.toLowerCase(),i.toLowerCase(),{left:0,top:0})}function s(t,e){e.left=t}function r(t,e){e.top=t}function l(){return $.documentElement.scrollTop||$.body.scrollTop}function a(){return $.documentElement.scrollLeft||$.body.scrollLeft}function h(){return it?J.bottom:J.bottom+l()}function p(){return d()+J.height/2}function d(){return it?J.top:J.top+l()}function c(){return J.left+a()}function u(){return J.right+a()}function f(){return c()+J.width/2}function m(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(et=e,tt=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var r=et?O():B(),l=N(),a=k(),h=l-o.left,p=o.left+s.width-a;s.width>r?o.left=h>0&&p<=0?a-s.width:p>0&&h<=0?l:h>p?a-s.width:l:h>0?o.left+=h:p>0&&(o.left-=p)}if(i.Y){var d=et?P():L(),c=x(),u=A(),f=c-o.top,m=o.top+s.height-u;s.height>d?o.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?o.top+=f:m>0&&(o.top-=m)}return o}function y(t,e,i,o){void 0===e&&(e=null);var s=n(t,"left","top");i&&(s.left=i),o&&(s.top=o);var r=[];et=e,tt=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,h=s.left,p=s.left+l.width,d=w(a,s.top+l.height),c=b(h,p);return d.topSide&&r.push("top"),c.rightSide&&r.push("right"),c.leftSide&&r.push("left"),d.bottomSide&&r.push("bottom"),r}function v(t,e,i,o,s,r,l,a,h){if(void 0===l&&(l=null),void 0===a&&(a={X:!0,Y:!0}),e&&t&&s&&r&&(a.X||a.Y)){var p={TL:null,TR:null,BL:null,BR:null},d={TL:null,TR:null,BL:null,BR:null},c=t.getBoundingClientRect(),u={posX:s,posY:r,offsetX:i,offsetY:o,position:{left:0,top:0}};et=l,tt=e.ownerDocument,function(t,e,i,o){i.position=n(t,i.posX,i.posY,o),e.TL=n(t,"left","top",o),e.TR=n(t,"right","top",o),e.BR=n(t,"left","bottom",o),e.BL=n(t,"right","bottom",o)}(e,p,u,h),g(d,u,c),a.X&&E(e,d,p,u,c,!0),a.Y&&p.TL.top>-1&&C(e,d,p,u,c,!0),function(t,e){var i=0,o=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=n(t.offsetParent,"left","top");i=s.left,o=s.top}t.style.top=e.position.top+e.offsetY-o+"px",t.style.left=e.position.left+e.offsetX-i+"px"}(t,u)}}function g(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 b(t,e){var i=!1,o=!1;return t-I()<N()&&(i=!0),e>k()&&(o=!0),{leftSide:i,rightSide:o}}function E(t,e,i,o,s,r){var l=b(e.TL.left,e.TR.left);i.TL.left-I()<=N()&&(l.leftSide=!1),i.TR.left>=k()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+s.width,o.offsetX=-1*o.offsetX,o.position=n(t,o.posX,o.posY),g(e,o,s),r&&E(t,e,i,o,s,!1))}function C(t,e,i,o,s,r){var l=w(e.TL.top,e.BL.top);i.TL.top-H()<=x()&&(l.topSide=!1),i.BL.top>=A()&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+s.height,o.offsetY=-1*o.offsetY,o.position=n(t,o.posX,o.posY),g(e,o,s),r&&C(t,e,i,o,s,!1))}function w(t,e){var i=!1,o=!1;return t-H()<x()&&(i=!0),e>A()&&(o=!0),{topSide:i,bottomSide:o}}function O(){return et.getBoundingClientRect().width}function P(){return et.getBoundingClientRect().height}function T(){return et.getBoundingClientRect().left}function S(){return et.getBoundingClientRect().top}function x(){return et?S():0}function N(){return et?T():0}function k(){return et?I()+T()+O():I()+B()}function A(){return et?H()+S()+P():H()+L()}function H(){return tt.documentElement.scrollTop||tt.body.scrollTop}function I(){return tt.documentElement.scrollLeft||tt.body.scrollLeft}function L(){return window.innerHeight}function B(){return window.innerWidth}function M(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var r=getComputedStyle(s);"absolute"===i.position&&"static"===r.position||!n.test(r.overflow+r.overflowY+r.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function j(t){for(var e=t.parentElement,i=[];e&&"BODY"!==e.tagName;){var o=document.defaultView.getComputedStyle(e,null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(e,null).getPropertyValue("position");"auto"!==o&&"static"!==n&&i.push(o),e=e.parentElement}for(var s=[],r=0;r<document.body.children.length;r++)if(!t.isEqualNode(document.body.children[r])){o=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&s.push(o)}s.push("999");var l=i.concat(s);return Math.max.apply(Math,l)+1}function U(t,e){var i=X();Yt[i]={timeOut:0,type:"Material",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("class",Wt),i.setAttribute("id",e);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("class",$t),t.insertBefore(i,t.firstChild),i.appendChild(o)}(t,i),function(t,e){var i=2*t,o=e.querySelector("svg.e-spin-material"),n=o.querySelector("path.e-path-circle"),s=q(i),r=i/2+"px";o.setAttribute("viewBox","0 0 "+i+" "+i),o.style.width=o.style.height=i+"px",o.style.transformOrigin=r+" "+r+" "+r,n.setAttribute("stroke-width",s+""),n.setAttribute("d",function(t,e){var i=t/2,o=e/2;return"M"+i+","+o+"A"+(i-o)+","+(i-o)+" 0 1 1 "+o+","+i}(i,s)),n.setAttribute("stroke-dasharray",(i-s)*Math.PI*.75+""),n.setAttribute("stroke-dashoffset",z(i,s,1,75)+"")}(e,t)}function R(t,i,o){var n=i.querySelector("."+Qt),s=n.querySelector("svg");switch(e.isNullOrUndefined(s)||n.removeChild(s),t){case"Material":U(n,o);break;case"Fabric":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"Fabric",radius:e},D(t,i,Zt),V(e,t,Zt)}(n,o);break;case"Bootstrap":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"Bootstrap",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("id",e),i.setAttribute("class",Kt),i.setAttribute("viewBox","0 0 64 64"),t.insertBefore(i,t.firstChild);for(var o=0;o<=7;o++){var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class",$t+"_"+o),n.setAttribute("r","2"),n.setAttribute("transform","translate(32,32)"),i.appendChild(n)}}(t,i),function(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var o=90,n=0;n<=7;n++){var s=W(0,0,24,o),r=i.querySelector("."+$t+"_"+n);r.setAttribute("cx",s.x+""),r.setAttribute("cy",s.y+""),o=o>=360?0:o,o+=45}}(t,e)}(n,o);break;case"HighContrast":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"HighContrast",radius:e},D(t,i,Gt),V(e,t,Gt)}(n,o)}}function Y(t,e){function i(t){o.push(t),t===s&&1!==l||(t<=n&&t>1&&!r?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),r=!0):t<8&&r?8===(t=parseFloat((t+.2).toFixed(2)))&&(r=!1):t<=8&&!r&&(t=parseFloat((t-.2).toFixed(2))),++l,i(t))}var o=[],n=t,s=e,r=!1,l=1;return i(n),o}function X(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function D(t,e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",i);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",$t);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",te),t.insertBefore(o,t.firstChild),o.appendChild(n),o.appendChild(s)}function F(t){!function(t,i,o,n,s,r,l){function a(i){var s=Math.max(0,Math.min((new Date).getTime()-p,n));!function(t,i){if(!e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))&&!e.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))){var o=i.querySelector("svg.e-spin-material"),n=o.querySelector("path.e-path-circle");n.setAttribute("stroke-dashoffset",z(c,u,t,r)+""),n.setAttribute("transform","rotate("+f+" "+c/2+" "+c/2+")")}}(o(s,t,d,n),i.container),h===i.globalInfo[i.uniqueID].previousId&&s<n?Yt[i.uniqueID].timeOut=setTimeout(a.bind(null,i),1):F(i)}var h=++l.globalInfo[l.uniqueID].previousId,p=(new Date).getTime(),d=i-t,c=function(t){return parseFloat(t)}(2*l.globalInfo[l.uniqueID].radius+""),u=q(c),f=-90*(l.globalInfo[l.uniqueID].count||0);a(l)}(1,149,_,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function q(t){return.1*t}function z(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function _(t,e,i,o){var n=(t/=o)*t,s=n*t;return e+i*(6*s*n+-15*n*n+10*s)}function V(t,e,i){var o=t,n=t,s=2*t,r=e.querySelector("."+i),l=r.querySelector(".e-path-circle"),a=r.querySelector(".e-path-arc"),h=s/2+"px";l.setAttribute("d",function(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(" ")}(o,n,t)),a.setAttribute("d",function(t,e,i,o,n){var s=W(t,e,i,n),r=W(t,e,i,o);return["M",s.x,s.y,"A",i,i,0,0,0,r.x,r.y].join(" ")}(o,n,t,315,45)),r.setAttribute("viewBox","0 0 "+s+" "+s),r.style.transformOrigin=h+" "+h+" "+h,r.style.width=r.style.height=s+"px"}function W(t,e,i,o){var n=(o-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function Z(t){K(t,!1)}function K(t,i){var o=t.classList.contains(Jt)?t:t.querySelector("."+Jt),n=o.querySelector("."+Qt);if(i?!o.classList.contains(ie)&&!o.classList.contains(Vt):!o.classList.contains(ie)&&!o.classList.contains(_t)){var s=o.querySelector("svg");if(e.isNullOrUndefined(s))return;var r=s.getAttribute("id");switch(Yt[r].isAnimate=!i,Yt[r].type){case"Material":i?clearTimeout(Yt[r].timeOut):function(t,e,i){var o={};Yt[e].timeOut=0,o[e]=function(t,e,i,o){return{radius:e,count:i,previousId:o}}(0,i,0,0),F({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}(n,r,Yt[r].radius);break;case"Bootstrap":i?clearTimeout(Yt[r].timeOut):function(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,o,n){function s(e){Yt[n].isAnimate&&(++r,t.setAttribute("r",e+""),r>=o.length&&(r=0),Yt[n].timeOut=setTimeout(s.bind(null,o[r]),18))}var r=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,Y(i,i),e)}(n)}}i?e.classList(o,[Vt],[_t]):e.classList(o,[_t],[Vt])}function G(t){K(t,!0)}var J,Q,$,tt,et,it=!1,ot=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),nt=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},st=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ot(i,t),nt([e.Property("left")],i.prototype,"X",void 0),nt([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),rt="e-popup",lt="e-rtl",at="e-popup-open",ht="e-popup-close",pt=function(t){function i(e,i){var o=t.call(this,i,e)||this;return o.fixedParent=!1,o}return ot(i,t),i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){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 r=t.offsetY-i.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+r).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.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.element.classList.remove(rt,lt),this.unwireEvents(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(rt);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.setEnableRtl(),this.setContent(),this.wireEvents()},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 o=i[t];e.EventHandler.add(o,"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 o=i[t];e.EventHandler.remove(o,"scroll",this.scrollRefresh)}},i.prototype.getRelateToElement=function(){var t=""===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?this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement(),t.target);e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},i.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},i.prototype.isElementVisible=function(t,e){var i=t.getBoundingClientRect();if(!i.height||!i.width)return!1;if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return!(i.bottom<o.top||i.bottom>o.bottom||i.right>o.right||i.left<o.left)}var s=window,r=s.scrollY,l=s.scrollX,a=s.scrollX+s.outerWidth,h=s.scrollY+s.outerHeight,p=n(t),d=p.top,c=p.left,u=p.left+i.width,f=p.top+i.height;return h-d>0&&a-c>0&&u-l>0&&f-r>0},i.prototype.preRender=function(){},i.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(lt):this.element.classList.remove(lt)},i.prototype.setContent=function(){e.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:this.element.appendChild(this.content))},i.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},i.prototype.refreshPosition=function(t){e.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),this.checkCollision()},i.prototype.reposition=function(){var t,e=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if(e){var i=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(e,this.element,this.position,this.offsetX,this.offsetY),this.element.style.display=i}else t={left:0,top:0};this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"},i.prototype.getAnchorPosition=function(t,e,i,s,r){var l=e.getBoundingClientRect(),a=t.getBoundingClientRect(),h=t,p={left:0,top:0};switch(p=e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?n(t):o(h,e),i.X){default:case"left":break;case"center":"container"===this.targetType?p.left+=a.width/2-l.width/2:p.left+=a.width/2;break;case"right":"container"===this.targetType?p.left+=a.width-l.width:p.left+=a.width}switch(i.Y){default:case"top":break;case"center":"container"===this.targetType?p.top+=a.height/2-l.height/2:p.top+=a.height/2;break;case"bottom":"container"===this.targetType?p.top+=a.height-l.height:p.top+=a.height}return p.left+=s,p.top+=r,p},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){var e=m(this.element,this.viewPortElement,t);this.element.style.left=e.left+"px",this.element.style.top=e.top+"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}):("fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0}),"flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1})))},i.prototype.show=function(t){var i=this;1e3===this.zIndex&&(this.zIndex=j(this.element),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],ht),e.addClass([this.element],at),this.checkCollision(),e.removeClass([this.element],at),e.addClass([this.element],ht)),e.isNullOrUndefined(t)?(e.removeClass([this.element],ht),e.addClass([this.element],at),this.trigger("open")):(t.begin=function(){i.isDestroyed||(e.removeClass([i.element],ht),e.addClass([i.element],at))},t.end=function(){i.isDestroyed||i.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],at),e.addClass([this.element],ht),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],at),e.addClass([i.element],ht),i.trigger("close"))},new e.Animation(t).animate(this.element))},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),M(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var o=getComputedStyle(i);"fixed"===o.position&&this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&(this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===o.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},nt([e.Property("auto")],i.prototype,"height",void 0),nt([e.Property("auto")],i.prototype,"width",void 0),nt([e.Property(null)],i.prototype,"content",void 0),nt([e.Property("container")],i.prototype,"targetType",void 0),nt([e.Property(null)],i.prototype,"viewPortElement",void 0),nt([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),nt([e.Property("")],i.prototype,"relateTo",void 0),nt([e.Complex({},st)],i.prototype,"position",void 0),nt([e.Property(0)],i.prototype,"offsetX",void 0),nt([e.Property(0)],i.prototype,"offsetY",void 0),nt([e.Property(1e3)],i.prototype,"zIndex",void 0),nt([e.Property(!1)],i.prototype,"enableRtl",void 0),nt([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),nt([e.Property(null)],i.prototype,"showAnimation",void 0),nt([e.Property(null)],i.prototype,"hideAnimation",void 0),nt([e.Event()],i.prototype,"open",void 0),nt([e.Event()],i.prototype,"close",void 0),nt([e.Event()],i.prototype,"targetExitViewport",void 0),i=nt([e.NotifyPropertyChanges],i)}(e.Component),dt=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ct=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ut=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return dt(i,t),ct([e.Property()],i.prototype,"buttonModel",void 0),ct([e.Property()],i.prototype,"click",void 0),i}(e.ChildProperty),ft=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return dt(i,t),ct([e.Property("Fade")],i.prototype,"effect",void 0),ct([e.Property(400)],i.prototype,"duration",void 0),ct([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),mt="e-dialog",yt="e-dlg-header-content",vt="e-dlg-header",gt="e-footer-content",bt="e-dlg-modal",Et="e-icon-dlg-close",Ct="e-scroll-disabled",wt="e-dlg-fullscreen",Ot="e-dlg-closeicon-btn",Pt=function(t){function o(e,i){return t.call(this,e,i)||this}return dt(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents()},o.prototype.preRender=function(){var t=this;this.headerContent=null;for(var i=[],o=0;o<this.element.classList.length;o++)e.isNullOrUndefined(this.element.classList[o].match("e-control"))&&e.isNullOrUndefined(this.element.classList[o].match(mt))||i.push(this.element.classList[o]);e.removeClass([this.element],i),this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.hide(),t.closedFrom=e},this.dlgOverlayClickEventHandler=function(e){t.trigger("overlayClick",e)};this.l10n=new e.L10n("dialog",{close:"Close"},this.locale)},o.prototype.keyDown=function(t){var i=this;if(9===t.keyCode&&this.isModal){var o=void 0;e.isNullOrUndefined(this.btnObj)||(o=this.btnObj[this.btnObj.length-1]),e.isNullOrUndefined(o)||document.activeElement!==o.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),e.isNullOrUndefined(o)||o.element.focus())}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.hide(),this.closedFrom=t),13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!e.isNullOrUndefined(this.primaryButtonEle)){var l;this.buttons.some(function(t,i){l=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[l].click&&setTimeout(function(){i.buttons[l].click.call(i,t)})}},o.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),e.addClass([this.element],mt),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.setCSSClass(),this.setMaxHeight()},o.prototype.initRender=function(){var t=this;e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex&&(this.zIndex=j(this.element)),this.setTargetContent(),""!==this.header&&this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),e.isNullOrUndefined(this.content)||""===this.content?this.element.hasChildNodes()&&(this.contentEle=this.element):this.setContent(),""!==this.footerTemplate&&this.setFooterTemplate(),e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton(),!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)||this.setAllowDragging(),e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new pt(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",open:function(){t.focusContent(),t.trigger("open")},close:function(i){t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closedFrom),t.closedFrom={},e.isNullOrUndefined(t.storeActiveElement)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),e.addClass([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex(),this.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},o.prototype.setOverlayZindex=function(){var t=parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex;this.dlgOverlay.style.zIndex=(t-1).toString(),this.dlgContainer.style.zIndex=t.toString()},o.prototype.positionChange=function(){this.isModal?this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y):this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},o.prototype.setAllowDragging=function(){var t=this;this.dragObj=new e.Draggable(this.element,{clone:!1,handle:".e-dlg-header-content",dragStart:function(e){t.trigger("dragStart",e)},dragStop:function(e){t.trigger("dragStop",e)},drag:function(e){t.trigger("drag",e)}}),e.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle)},o.prototype.setButton=function(){this.buttonContent=[],this.btnObj=[];for(var t=0;t<this.buttons.length;t++){var o=e.createElement("button",{attrs:{type:"button"}});this.buttonContent.push(o.outerHTML)}this.setFooterTemplate();for(t=0;t<this.buttons.length;t++)this.btnObj[t]=new i.Button(this.buttons[t].buttonModel),"function"==typeof this.buttons[t].click&&e.EventHandler.add(this.ftrTemplateContent.children[t],"click",this.buttons[t].click,this),this.btnObj[t].appendTo(this.ftrTemplateContent.children[t]),this.btnObj[t].isPrimary||this.btnObj[t].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]},o.prototype.setContent=function(){e.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=e.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),"string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.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.setMaxHeight()},o.prototype.setMaxHeight=function(){var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=e.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px",this.element.style.display=t},o.prototype.setEnableRTL=function(){this.enableRtl?e.addClass([this.element],"e-rtl"):e.removeClass([this.element],"e-rtl")},o.prototype.setTargetContent=function(){var t=""!==this.element.innerHTML.replace(/\s/g,"");if(this.element.children.length>0||t){for(var e=document.createDocumentFragment();0!==this.element.childNodes.length;)e.appendChild(this.element.childNodes[0]);this.setProperties({content:e},!0)}},o.prototype.setHeader=function(){this.headerEle=e.createElement("div",{id:this.element.id+"_title",className:vt,innerHTML:this.header}),e.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.element.insertBefore(this.headerContent,this.element.children[0])},o.prototype.setFooterTemplate=function(){this.ftrTemplateContent=e.createElement("div",{className:gt,innerHTML:""!==this.footerTemplate?this.footerTemplate:this.buttonContent.join("")}),this.element.appendChild(this.ftrTemplateContent)},o.prototype.createHeaderContent=function(){e.isNullOrUndefined(this.headerContent)&&(this.headerContent=e.createElement("div",{className:yt}))},o.prototype.renderCloseIcon=function(){this.closeIcon=e.createElement("button",{className:Ot,attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:Et+" 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)},o.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t)},o.prototype.setCSSClass=function(t){this.cssClass&&e.addClass([this.element],this.cssClass.split(" ")),t&&e.removeClass([this.element],t.split(" "))},o.prototype.setIsModal=function(){this.dlgContainer=e.createElement("div",{className:"e-dlg-container"}),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),e.addClass([this.element],bt),this.dlgOverlay=e.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},o.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;return e},o.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},o.prototype.getAutoFocusNode=function(t){var i=t.querySelector("."+Ot),o=t.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(o);if(e.isNullOrUndefined(n)){if(n=this.focusableElements(this.contentEle),!e.isNullOrUndefined(n))return i=n;if(!e.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else i=n;return i},o.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msMatchesSelector:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},o.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element);(e.isNullOrUndefined(t)?this.element:t).focus(),this.bindEvent(this.element)},o.prototype.bindEvent=function(t){e.EventHandler.add(t,"keydown",this.keyDown,this)},o.prototype.unBindEvent=function(t){e.EventHandler.remove(t,"keydown",this.keyDown)},o.prototype.getModuleName=function(){return"dialog"},o.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"content":e.isNullOrUndefined(this.content)||""===this.content?e.isNullOrUndefined(this.contentEle)||this.element.removeChild(this.contentEle):e.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.contentEle.innerHTML="","string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),this.setMaxHeight());break;case"header":""===this.header?e.detach(this.headerEle):this.element.getElementsByClassName(vt).length>0?this.element.getElementsByClassName(vt)[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName(gt).length>0?this.ftrTemplateContent.innerHTML=this.footerTemplate:this.setFooterTemplate();break;case"showCloseIcon":this.element.getElementsByClassName(Et).length>0?this.showCloseIcon||""!==this.header?this.showCloseIcon||e.detach(this.closeIcon):e.detach(this.headerContent):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)this.setIsModal(),this.wireEvents(),e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element));else{for(e.removeClass([this.element],bt),e.removeClass([document.body],Ct),e.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex();break;case"cssClass":this.setCSSClass(i.cssClass);break;case"animationSettings":this.show();break;case"buttons":e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||(e.isNullOrUndefined(this.ftrTemplateContent)||e.detach(this.ftrTemplateContent),this.setButton());break;case"allowDragging":!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)?this.dragObj.destroy():this.setAllowDragging();break;case"target":this.popupObj.relateTo=t.target;break;case"position":if(i.position.X===this.position.X&&i.position.Y===this.position.Y)break;if(!this.isModal){this.popupObj.position.X=this.position.X,this.popupObj.position.Y=this.position.Y;break}this.dlgContainer.classList.remove("e-dlg-"+i.position.X+"-"+i.position.Y),this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y);break;case"enableRtl":this.setEnableRTL()}}},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.destroy=function(){if(this.element.classList.contains(mt)){this.unWireEvents(),t.prototype.destroy.call(this);var i=[mt,"e-rtl",bt];if(e.removeClass([this.element,this.element],i),this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),!e.isNullOrUndefined(this.btnObj))for(var o=void 0;o<this.btnObj.length;o++)this.btnObj[o].destroy();for(this.isModal&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.element.innerHTML="";this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);for(var n=0;n<this.clonedEle.attributes.length;n++)this.element.setAttribute(this.clonedEle.attributes[n].name,this.clonedEle.attributes[n].value)}},o.prototype.wireEvents=function(){this.showCloseIcon&&e.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.unWireEvents=function(){if(this.showCloseIcon&&e.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&e.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler),!e.isNullOrUndefined(this.buttons[0].buttonModel))for(var t=0;t<this.buttons.length;t++)"function"==typeof this.buttons[t].click&&e.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},o.prototype.refreshPosition=function(){this.popupObj.refreshPosition()},o.prototype.show=function(t){if(!this.element.classList.contains("e-popup-open")||!e.isNullOrUndefined(t)){e.isNullOrUndefined(t)||this.fullScreen(t);var i={cancel:!1,container:this.isModal?this.dlgContainer:this.element};if(this.trigger("beforeOpen",i),i.cancel)return;this.storeActiveElement=document.activeElement,this.element.tabIndex=-1,this.isModal&&!e.isNullOrUndefined(this.dlgOverlay)&&(this.dlgOverlay.style.display="block",this.dlgContainer.style.display="flex",e.isNullOrUndefined(this.targetEle)?e.addClass([document.body],Ct):(this.targetEle===document.body?this.dlgContainer.style.position="fixed":this.dlgContainer.style.position="absolute",this.dlgOverlay.style.position="absolute",this.element.style.position="relative",e.addClass([this.targetEle],Ct)));var o={name:this.animationSettings.effect+"In",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.show():this.popupObj.show(o),this.dialogOpen=!0,this.visible=!0}},o.prototype.hide=function(){var t={cancel:!1,container:this.isModal?this.dlgContainer:this.element};if(this.trigger("beforeClose",t),!t.cancel){this.isModal&&(this.dlgOverlay.style.display="none",e.isNullOrUndefined(this.targetEle)?e.removeClass([document.body],Ct):e.removeClass([this.targetEle],Ct));var i={name:this.animationSettings.effect+"Out",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.hide():this.popupObj.hide(i),this.dialogOpen=!1,this.visible=!1}},o.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){e.addClass([this.element],wt);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],Ct),this.allowDragging&&!e.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()}else e.removeClass([this.element],wt),e.removeClass([document.body],Ct),!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)||this.setAllowDragging();return t},ct([e.Property("")],o.prototype,"content",void 0),ct([e.Property(!1)],o.prototype,"showCloseIcon",void 0),ct([e.Property(!1)],o.prototype,"isModal",void 0),ct([e.Property("")],o.prototype,"header",void 0),ct([e.Property(!0)],o.prototype,"visible",void 0),ct([e.Property("auto")],o.prototype,"height",void 0),ct([e.Property("100%")],o.prototype,"width",void 0),ct([e.Property("")],o.prototype,"cssClass",void 0),ct([e.Property(1e3)],o.prototype,"zIndex",void 0),ct([e.Property(null)],o.prototype,"target",void 0),ct([e.Property("")],o.prototype,"footerTemplate",void 0),ct([e.Property(!1)],o.prototype,"allowDragging",void 0),ct([e.Collection([{}],ut)],o.prototype,"buttons",void 0),ct([e.Property(!0)],o.prototype,"closeOnEscape",void 0),ct([e.Complex({},ft)],o.prototype,"animationSettings",void 0),ct([e.Complex({X:"center",Y:"center"},st)],o.prototype,"position",void 0),ct([e.Event()],o.prototype,"created",void 0),ct([e.Event()],o.prototype,"open",void 0),ct([e.Event()],o.prototype,"beforeOpen",void 0),ct([e.Event()],o.prototype,"close",void 0),ct([e.Event()],o.prototype,"beforeClose",void 0),ct([e.Event()],o.prototype,"dragStart",void 0),ct([e.Event()],o.prototype,"dragStop",void 0),ct([e.Event()],o.prototype,"drag",void 0),ct([e.Event()],o.prototype,"overlayClick",void 0),o=ct([e.NotifyPropertyChanges],o)}(e.Component),Tt=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),St=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},xt="e-tooltip",Nt="e-tip-content",kt="e-arrow-tip",At="e-arrow-tip-outer",Ht="e-arrow-tip-inner",It="e-tip-bottom",Lt="e-tip-top",Bt="e-tip-right",Mt="e-popup-open",jt="e-popup-close",Ut=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Tt(i,t),St([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),St([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),Rt=function(t){function i(e,i){return t.call(this,e,i)||this}return Tt(i,t),i.prototype.initialize=function(){this.formatPosition(),e.addClass([this.element],xt)},i.prototype.formatPosition=function(){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]);var t,e},i.prototype.renderArrow=function(){this.setTipClass(this.position);var t=e.createElement("div",{className:kt+" "+this.tipClass});t.appendChild(e.createElement("div",{className:At+" "+this.tipClass})),t.appendChild(e.createElement("div",{className:Ht+" "+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=Lt:0===t.indexOf("Left")?this.tipClass=Bt:this.tipClass=It},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.popupObj=new pt(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.getTooltipPosition=function(t){var e=n(t,this.tooltipPositionX,this.tooltipPositionY),i=this.calculateTooltipOffset(this.position);return this.collisionFlipFit(t,e.left+i.left,e.top+i.top)},i.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},i.prototype.openPopupHandler=function(){this.trigger("afterOpen",this.tooltipEventArgs)},i.prototype.closePopupHandler=function(){this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},i.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},i=this.tooltipEle.offsetWidth,o=this.tooltipEle.offsetHeight,n=this.tooltipEle.querySelector("."+kt),s=n?n.offsetWidth:0,r=n?n.offsetHeight:0,l=this.showTipPointer?0:8,a=r/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),h=s/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(l+=2),t){case"RightTop":e.left+=s+l,e.top-=o-a;break;case"RightCenter":e.left+=s+l,e.top-=o/2;break;case"RightBottom":e.left+=s+l,e.top-=a;break;case"BottomRight":e.top+=r+l,e.left-=h;break;case"BottomCenter":e.top+=r+l,e.left-=i/2;break;case"BottomLeft":e.top+=r+l,e.left-=i-h;break;case"LeftBottom":e.left-=s+i+l,e.top-=a;break;case"LeftCenter":e.left-=s+i+l,e.top-=o/2;break;case"LeftTop":e.left-=s+i+l,e.top-=o-a;break;case"TopLeft":e.top-=o+r+l,e.left-=i-h;break;case"TopRight":e.top-=o+r+l,e.left-=h;break;default:e.top-=o+r+l,e.left-=i/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},i.prototype.updateTipPosition=function(t){var i=this.tooltipEle.querySelectorAll("."+kt+",."+At+",."+Ht),o=[It,Lt,"e-tip-left",Bt];e.removeClass(i,o),this.setTipClass(t),e.addClass(i,this.tipClass)},i.prototype.adjustArrow=function(t,e,i,o){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s,r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector("."+kt),h=this.tooltipEle.querySelector("."+Ht),p=a.offsetWidth,d=a.offsetHeight;if(this.tipClass===It||this.tipClass===Lt){this.tipClass===It?(s="99.9%",h.style.top="-"+(d-2)+"px"):(s=-(d-1)+"px",h.style.top="-"+(d-6)+"px");n=(c="Center"!==i||r>t.offsetWidth||this.mouseTrail)&&"Left"===i||!c&&"End"===this.tipPointerPosition?r-p-2+"px":c&&"Right"===i||!c&&"Start"===this.tipPointerPosition?"2px":r/2-p/2+"px"}else{this.tipClass===Bt?(n="99.9%",h.style.left="-"+(p-2)+"px"):(n=-(p-1)+"px",h.style.left=p-2-p+"px");var c;s=(c="Center"!==o||l>t.offsetHeight||this.mouseTrail)&&"Top"===o||!c&&"End"===this.tipPointerPosition?l-d-2+"px":c&&"Bottom"===o||!c&&"Start"===this.tipPointerPosition?"2px":l/2-d/2+"px"}a.style.top=s,a.style.left=n}},i.prototype.renderContent=function(t){var i=this.tooltipEle.querySelector("."+Nt);if(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"))&&(i.innerHTML=t.getAttribute("data-content"));else if("string"==typeof this.content)i.innerHTML=this.content;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(this.content)}},i.prototype.renderCloseIcon=function(){if(this.isSticky){var t=e.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),e.EventHandler.add(t,e.Browser.touchStartEvent,this.onStickyClose,this)}},i.prototype.addDescribedBy=function(t,i){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(i)<0&&o.push(i),e.attributes(t,{"aria-describedby":o.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+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},i.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},i.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){this.autoCloseTimer=setTimeout(function(){e.close()},1500)}},i.prototype.targetClick=function(t){var i;i=this.target?e.closest(t.target,this.target):this.element,e.isNullOrUndefined(i)||(null===i.getAttribute("data-tooltip-id")?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")){for(var o=0,n=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]"));o<n.length;o++){var s=n[o];this.restoreElement(s)}this.showTooltip(i,this.animation.open,t),this.wireMouseEvents(t,i)}},i.prototype.showTooltip=function(t,i,o){var n=this;if(clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeRender",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();if(this.isHidden=!1,e.isNullOrUndefined(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?e.getUniqueID(this.element.getAttribute("id")):e.getUniqueID("tooltip"),this.tooltipEle=e.createElement("div",{className:"e-tooltip-wrap e-popup",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+e.formatUnit(this.width)+";height:"+e.formatUnit(this.height)+";position:absolute;"}),this.cssClass&&e.addClass([this.tooltipEle],this.cssClass.split(" ")),e.Browser.isDevice&&e.addClass([this.tooltipEle],"e-bigger"),"auto"!==this.width&&(this.tooltipEle.style.maxWidth=e.formatUnit(this.width)),this.tooltipEle.appendChild(e.createElement("div",{className:Nt})),document.body.appendChild(this.tooltipEle),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),e.addClass([this.tooltipEle],Mt),this.showTipPointer&&this.renderArrow(),this.renderCloseIcon(),this.renderPopup(t)):(this.adjustArrow(t,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),e.Animation.stop(this.tooltipEle),this.reposition(t)),e.removeClass([this.tooltipEle],Mt),e.addClass([this.tooltipEle],jt),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeOpen",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();var s={name:i.effect,duration:i.duration,delay:i.delay,timingFunction:"easeOut"};if("None"===i.effect&&(s=void 0),this.openDelay>0){this.showTimer=setTimeout(function(){n.popupObj&&n.popupObj.show(s)},this.openDelay)}else this.popupObj.show(s)},i.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=y(this.tooltipEle,this.target?this.element:null,e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},i.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),s=o.position;if(this.tooltipPositionY!==o.vertical&&(s=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===s.indexOf("Left")&&(o.vertical="LeftTop"===s||"LeftCenter"===s?"Top":"Bottom",s=o.vertical+"Left"),0===s.indexOf("Right")&&(o.vertical="RightTop"===s||"RightCenter"===s?"Top":"Bottom",s=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:s},this.trigger("beforeCollision",this.tooltipEventArgs),o.position!==s){var r=n(t,this.tooltipPositionX,o.vertical);this.adjustArrow(t,s,o.horizontal,o.vertical);var l=this.calculateTooltipOffset(s);o.position=s,o.left=r.left+l.left,o.top=r.top+l.top}else this.adjustArrow(t,s,o.horizontal,o.vertical);var a={left:o.left,top:o.top},h=m(this.tooltipEle,this.target?this.element:null,{X:!0,Y:!1},a).left;if(this.showTipPointer&&(0===s.indexOf("Bottom")||0===s.indexOf("Top"))){var p=this.tooltipEle.querySelector("."+kt),d=parseInt(p.style.left,10)-(h-o.left);d<0?d=0:d+p.offsetWidth>this.tooltipEle.clientWidth&&(d=this.tooltipEle.clientWidth-p.offsetWidth),p.style.left=d.toString()+"px"}return a.left=h,a},i.prototype.hideTooltip=function(t,i,o){var n,s=this;if(i?(n=this.target?o||i.target:this.element,this.tooltipEventArgs={type:i.type,cancel:!1,target:n,event:i,element:this.tooltipEle}):(n=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:null,cancel:!1,target:n,event:null,element:this.tooltipEle}),!e.isNullOrUndefined(n))if(this.trigger("beforeClose",this.tooltipEventArgs),this.tooltipEventArgs.cancel)this.isHidden=!1;else{this.restoreElement(n),this.isHidden=!0;var r={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};if("None"===t.effect&&(r=void 0),this.closeDelay>0){this.hideTimer=setTimeout(function(){s.popupObj&&s.popupObj.hide(r)},this.closeDelay)}else this.popupObj.hide(r)}},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(){this.tooltipEle&&(e.removeClass([this.tooltipEle],jt),e.addClass([this.tooltipEle],Mt)),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},i.prototype.onMouseOut=function(t){this.hideTooltip(this.animation.close,t)},i.prototype.onStickyClose=function(t){this.close()},i.prototype.onMouseMove=function(t){var i=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),i=t.touches[0].pageX,o=t.touches[0].pageY):(i=t.pageX,o=t.pageY),e.Animation.stop(this.tooltipEle),e.removeClass([this.tooltipEle],jt),e.addClass([this.tooltipEle],Mt),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=i+n.left+this.offsetX,r=o+n.top+this.offsetY,l=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==l.horizontal||this.tooltipPositionY!==l.vertical){var a=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?l.vertical+l.horizontal:l.horizontal+l.vertical;l.position=a,this.adjustArrow(t.target,l.position,l.horizontal,l.vertical);var h=this.calculateTooltipOffset(l.position);l.left=i+h.left-this.offsetX,l.top=o+h.top-this.offsetY}this.tooltipEle.style.left=l.left+"px",this.tooltipEle.style.top=l.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,"."+xt)&&this.close()},i.prototype.scrollHandler=function(t){this.tooltipEle&&this.close()},i.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn)},i.prototype.preRender=function(){this.tipClass=It,this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},i.prototype.wireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.wireFocusEvents(),"Click"===n&&e.EventHandler.add(this.element,e.Browser.touchStartEvent,this.targetClick,this),"Hover"===n&&(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))}e.EventHandler.add(document,"touchend",this.touchEnd,this),e.EventHandler.add(document,"scroll",this.scrollHandler,this),e.EventHandler.add(document,"keydown",this.keyDown,this)},i.prototype.getTriggerList=function(t){return"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,"focus",this.targetHover,this);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.add(o,"focus",this.targetHover,this)}},i.prototype.wireMouseEvents=function(t,i){this.tooltipEle&&(this.isSticky||("focus"===t.type&&e.EventHandler.add(i,"blur",this.onMouseOut,this),"mouseover"===t.type&&e.EventHandler.add(i,"mouseleave",this.onMouseOut,this)),this.mouseTrail&&e.EventHandler.add(i,"mousemove touchstart mouseenter",this.onMouseMove,this))},i.prototype.unwireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.unwireFocusEvents(),"Click"===n&&e.EventHandler.remove(this.element,e.Browser.touchStartEvent,this.targetClick),"Hover"===n&&(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))}e.EventHandler.remove(document,"touchend",this.touchEnd),e.EventHandler.remove(document,"scroll",this.scrollHandler),e.EventHandler.remove(document,"keydown",this.keyDown)},i.prototype.unwireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.remove(this.element,"focus",this.targetHover);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.remove(o,"focus",this.targetHover)}},i.prototype.unwireMouseEvents=function(t){if(!this.isSticky)for(var i=0,o=this.getTriggerList(this.opensOn);i<o.length;i++){var n=o[i];"Focus"===n&&e.EventHandler.remove(t,"blur",this.onMouseOut),"Hover"!==n||e.Browser.isDevice||e.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.mouseTrail&&e.EventHandler.remove(t,"mousemove touchstart mouseenter",this.onMouseMove)},i.prototype.getModuleName=function(){return"tooltip"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"width":this.tooltipEle&&(this.tooltipEle.style.width=e.formatUnit(t.width));break;case"height":this.tooltipEle&&(this.tooltipEle.style.height=e.formatUnit(t.height));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(i.opensOn),this.wireEvents(t.opensOn);break;case"position":this.formatPosition();var s=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");if(this.tooltipEle&&s){var r=this.tooltipEle.querySelector("."+Ht);r.style.top=r.style.left=null,this.reposition(s)}break;case"tipPointerPosition":var l=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&l&&this.reposition(l);break;case"offsetX":if(this.tooltipEle){var a=t.offsetX-i.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+a).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var h=t.offsetY-i.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+h).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"))}}},i.prototype.open=function(t,e){void 0===e&&(e=this.animation.open),"none"!==t.style.display&&this.showTooltip(t,e)},i.prototype.close=function(t){void 0===t&&(t=this.animation.close),this.hideTooltip(t)},i.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t)},i.prototype.destroy=function(){t.prototype.destroy.call(this),e.removeClass([this.element],xt),this.unwireEvents(this.opensOn),this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null},St([e.Property("auto")],i.prototype,"width",void 0),St([e.Property("auto")],i.prototype,"height",void 0),St([e.Property()],i.prototype,"content",void 0),St([e.Property()],i.prototype,"target",void 0),St([e.Property("TopCenter")],i.prototype,"position",void 0),St([e.Property(0)],i.prototype,"offsetX",void 0),St([e.Property(0)],i.prototype,"offsetY",void 0),St([e.Property(!0)],i.prototype,"showTipPointer",void 0),St([e.Property("Auto")],i.prototype,"tipPointerPosition",void 0),St([e.Property("Auto")],i.prototype,"opensOn",void 0),St([e.Property(!1)],i.prototype,"mouseTrail",void 0),St([e.Property(!1)],i.prototype,"isSticky",void 0),St([e.Complex({},Ut)],i.prototype,"animation",void 0),St([e.Property(0)],i.prototype,"openDelay",void 0),St([e.Property(0)],i.prototype,"closeDelay",void 0),St([e.Property()],i.prototype,"cssClass",void 0),St([e.Property(!1)],i.prototype,"enableRtl",void 0),St([e.Event()],i.prototype,"beforeRender",void 0),St([e.Event()],i.prototype,"beforeOpen",void 0),St([e.Event()],i.prototype,"afterOpen",void 0),St([e.Event()],i.prototype,"beforeClose",void 0),St([e.Event()],i.prototype,"afterClose",void 0),St([e.Event()],i.prototype,"beforeCollision",void 0),St([e.Event()],i.prototype,"created",void 0),St([e.Event()],i.prototype,"destroyed",void 0),i=St([e.NotifyPropertyChanges],i)}(e.Component),Yt={},Xt=null,Dt=null,Ft=30,qt=30,zt=30,_t="e-spin-show",Vt="e-spin-hide",Wt="e-spin-material",Zt="e-spin-fabric",Kt="e-spin-bootstrap",Gt="e-spin-high-contrast",Jt="e-spinner-pane",Qt="e-spinner-inner",$t="e-path-circle",te="e-path-arc",ee="e-spin-label",ie="e-spin-template";t.PositionData=st,t.Popup=pt,t.getScrollableParent=M,t.getZindexPartial=j,t.calculateRelativeBasedPosition=o,t.calculatePosition=n,t.fit=m,t.isCollide=y,t.flip=v,t.ButtonProps=ut,t.AnimationSettings=ft,t.Dialog=Pt,t.Animation=Ut,t.Tooltip=Rt,t.createSpinner=function(t){var i,o=function(t){var e=document.createElement("div");e.classList.add(Jt);var i=document.createElement("div");return i.classList.add(Qt),t.appendChild(e),e.appendChild(i),{wrap:e,inner_wrap:i}}(t.target);if(e.isNullOrUndefined(t.cssClass)||o.wrap.classList.add(t.cssClass),e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(Xt)){var n=e.isNullOrUndefined(t.type)?function(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}(o.wrap):t.type;i=function(t,e){var i="Material"===e?Ft:"Fabric"===e?qt:zt;return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}(e.isNullOrUndefined(t.width)?void 0:t.width,n),R(n,o.wrap,i),e.isNullOrUndefined(t.label)||function(t,e){var i=document.createElement("div");i.classList.add(ee),i.textContent=e,t.appendChild(i)}(o.inner_wrap,t.label)}else{var s=e.isNullOrUndefined(t.template)?Xt:t.template;o.wrap.classList.add(ie),function(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}(o.wrap,s,Dt)}o.wrap.classList.add(Vt)},t.showSpinner=Z,t.hideSpinner=G,t.setSpinner=function(t){void 0!==t.template&&(Xt=t.template,void 0!==t.template&&(Dt=t.cssClass));for(var i=document.querySelectorAll("."+Jt),o=0;o<i.length;o++)!function(t,i,o,n){e.isNullOrUndefined(t)&&!i.classList.contains(ie)?(function(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o);var n=t.querySelector("svg"),s="Bootstrap"===i?parseFloat(n.style.height):parseFloat(n.style.height)/2;if(n.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var r=n.getAttribute("id");clearTimeout(Yt[r].timeOut)}R(i,t,s)}(i,o,n),i.classList.contains(_t)?(i.classList.remove(_t),Z(i)):(i.classList.remove(Vt),G(i))):(Xt=t,e.isNullOrUndefined(n)||(Dt=n))}(t.template,i[o],t.type,t.cssClass)},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons"],e):e(t.ej={},t.ej2Base,t.ej2Buttons)}(this,function(t,e,i){"use strict";function o(t,i){var o=!1,n={left:0,top:0},s=t;if(!t||!i)return n;for(e.isNullOrUndefined(i.offsetParent)&&"fixed"===i.style.position&&(o=!0);(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;for(t=s;(i.offsetParent||o)&&t&&i.offsetParent!==t;)n.left-=t.scrollLeft,n.top-=t.scrollTop,t=t.parentElement;return n}function n(t,e,i,o){if(it=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),$=t.ownerDocument,Q=t;return function(t,e,i){switch(J=Q.getBoundingClientRect(),e+t){case"topcenter":s(f(),i),r(d(),i);break;case"topright":s(u(),i),r(d(),i);break;case"centercenter":s(f(),i),r(p(),i);break;case"centerright":s(u(),i),r(p(),i);break;case"centerleft":s(c(),i),r(p(),i);break;case"bottomcenter":s(f(),i),r(h(),i);break;case"bottomright":s(u(),i),r(h(),i);break;case"bottomleft":s(c(),i),r(h(),i);break;default:case"topleft":s(c(),i),r(d(),i)}return i}(e.toLowerCase(),i.toLowerCase(),{left:0,top:0})}function s(t,e){e.left=t}function r(t,e){e.top=t}function l(){return $.documentElement.scrollTop||$.body.scrollTop}function a(){return $.documentElement.scrollLeft||$.body.scrollLeft}function h(){return it?J.bottom:J.bottom+l()}function p(){return d()+J.height/2}function d(){return it?J.top:J.top+l()}function c(){return J.left+a()}function u(){return J.right+a()}function f(){return c()+J.width/2}function m(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var s=t.getBoundingClientRect();if(et=e,tt=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var r=et?O():B(),l=N(),a=k(),h=l-o.left,p=o.left+s.width-a;s.width>r?o.left=h>0&&p<=0?a-s.width:p>0&&h<=0?l:h>p?a-s.width:l:h>0?o.left+=h:p>0&&(o.left-=p)}if(i.Y){var d=et?P():L(),c=x(),u=A(),f=c-o.top,m=o.top+s.height-u;s.height>d?o.top=f>0&&m<=0?u-s.height:m>0&&f<=0?c:f>m?u-s.height:c:f>0?o.top+=f:m>0&&(o.top-=m)}return o}function y(t,e,i,o){void 0===e&&(e=null);var s=n(t,"left","top");i&&(s.left=i),o&&(s.top=o);var r=[];et=e,tt=t.ownerDocument;var l=t.getBoundingClientRect(),a=s.top,h=s.left,p=s.left+l.width,d=w(a,s.top+l.height),c=b(h,p);return d.topSide&&r.push("top"),c.rightSide&&r.push("right"),c.leftSide&&r.push("left"),d.bottomSide&&r.push("bottom"),r}function v(t,e,i,o,s,r,l,a,h){if(void 0===l&&(l=null),void 0===a&&(a={X:!0,Y:!0}),e&&t&&s&&r&&(a.X||a.Y)){var p={TL:null,TR:null,BL:null,BR:null},d={TL:null,TR:null,BL:null,BR:null},c=t.getBoundingClientRect(),u={posX:s,posY:r,offsetX:i,offsetY:o,position:{left:0,top:0}};et=l,tt=e.ownerDocument,function(t,e,i,o){i.position=n(t,i.posX,i.posY,o),e.TL=n(t,"left","top",o),e.TR=n(t,"right","top",o),e.BR=n(t,"left","bottom",o),e.BL=n(t,"right","bottom",o)}(e,p,u,h),g(d,u,c),a.X&&E(e,d,p,u,c,!0),a.Y&&p.TL.top>-1&&C(e,d,p,u,c,!0),function(t,e){var i=0,o=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=n(t.offsetParent,"left","top");i=s.left,o=s.top}t.style.top=e.position.top+e.offsetY-o+"px",t.style.left=e.position.left+e.offsetX-i+"px"}(t,u)}}function g(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 b(t,e){var i=!1,o=!1;return t-I()<N()&&(i=!0),e>k()&&(o=!0),{leftSide:i,rightSide:o}}function E(t,e,i,o,s,r){var l=b(e.TL.left,e.TR.left);i.TL.left-I()<=N()&&(l.leftSide=!1),i.TR.left>=k()&&(l.rightSide=!1),(l.leftSide&&!l.rightSide||!l.leftSide&&l.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",o.offsetX=o.offsetX+s.width,o.offsetX=-1*o.offsetX,o.position=n(t,o.posX,o.posY),g(e,o,s),r&&E(t,e,i,o,s,!1))}function C(t,e,i,o,s,r){var l=w(e.TL.top,e.BL.top);i.TL.top-H()<=x()&&(l.topSide=!1),i.BL.top>=A()&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+s.height,o.offsetY=-1*o.offsetY,o.position=n(t,o.posX,o.posY),g(e,o,s),r&&C(t,e,i,o,s,!1))}function w(t,e){var i=!1,o=!1;return t-H()<x()&&(i=!0),e>A()&&(o=!0),{topSide:i,bottomSide:o}}function O(){return et.getBoundingClientRect().width}function P(){return et.getBoundingClientRect().height}function T(){return et.getBoundingClientRect().left}function S(){return et.getBoundingClientRect().top}function x(){return et?S():0}function N(){return et?T():0}function k(){return et?I()+T()+O():I()+B()}function A(){return et?H()+S()+P():H()+L()}function H(){return tt.documentElement.scrollTop||tt.body.scrollTop}function I(){return tt.documentElement.scrollLeft||tt.body.scrollLeft}function L(){return window.innerHeight}function B(){return window.innerWidth}function M(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var r=getComputedStyle(s);"absolute"===i.position&&"static"===r.position||!n.test(r.overflow+r.overflowY+r.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function j(t){for(var e=t.parentElement,i=[];e&&"BODY"!==e.tagName;){var o=document.defaultView.getComputedStyle(e,null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(e,null).getPropertyValue("position");"auto"!==o&&"static"!==n&&i.push(o),e=e.parentElement}for(var s=[],r=0;r<document.body.children.length;r++)if(!t.isEqualNode(document.body.children[r])){o=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(document.body.children[r],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&s.push(o)}s.push("999");var l=i.concat(s);return Math.max.apply(Math,l)+1}function U(t,e){var i=X();Yt[i]={timeOut:0,type:"Material",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("class",Wt),i.setAttribute("id",e);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("class",$t),t.insertBefore(i,t.firstChild),i.appendChild(o)}(t,i),function(t,e){var i=2*t,o=e.querySelector("svg.e-spin-material"),n=o.querySelector("path.e-path-circle"),s=q(i),r=i/2+"px";o.setAttribute("viewBox","0 0 "+i+" "+i),o.style.width=o.style.height=i+"px",o.style.transformOrigin=r+" "+r+" "+r,n.setAttribute("stroke-width",s+""),n.setAttribute("d",function(t,e){var i=t/2,o=e/2;return"M"+i+","+o+"A"+(i-o)+","+(i-o)+" 0 1 1 "+o+","+i}(i,s)),n.setAttribute("stroke-dasharray",(i-s)*Math.PI*.75+""),n.setAttribute("stroke-dashoffset",z(i,s,1,75)+"")}(e,t)}function R(t,i,o){var n=i.querySelector("."+Qt),s=n.querySelector("svg");switch(e.isNullOrUndefined(s)||n.removeChild(s),t){case"Material":U(n,o);break;case"Fabric":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"Fabric",radius:e},D(t,i,Zt),V(e,t,Zt)}(n,o);break;case"Bootstrap":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"Bootstrap",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("id",e),i.setAttribute("class",Kt),i.setAttribute("viewBox","0 0 64 64"),t.insertBefore(i,t.firstChild);for(var o=0;o<=7;o++){var n=document.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("class",$t+"_"+o),n.setAttribute("r","2"),n.setAttribute("transform","translate(32,32)"),i.appendChild(n)}}(t,i),function(t,e){var i=t.querySelector("svg.e-spin-bootstrap");i.style.width=i.style.height=e+"px";for(var o=90,n=0;n<=7;n++){var s=W(0,0,24,o),r=i.querySelector("."+$t+"_"+n);r.setAttribute("cx",s.x+""),r.setAttribute("cy",s.y+""),o=o>=360?0:o,o+=45}}(t,e)}(n,o);break;case"HighContrast":!function(t,e){var i=X();Yt[i]={timeOut:0,type:"HighContrast",radius:e},D(t,i,Gt),V(e,t,Gt)}(n,o)}}function Y(t,e){function i(t){o.push(t),t===s&&1!==l||(t<=n&&t>1&&!r?t=parseFloat((t-.2).toFixed(2)):1===t?(t=7,t=parseFloat((t+.2).toFixed(2)),r=!0):t<8&&r?8===(t=parseFloat((t+.2).toFixed(2)))&&(r=!1):t<=8&&!r&&(t=parseFloat((t-.2).toFixed(2))),++l,i(t))}var o=[],n=t,s=e,r=!1,l=1;return i(n),o}function X(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function D(t,e,i){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("id",e),o.setAttribute("class",i);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",$t);var s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("class",te),t.insertBefore(o,t.firstChild),o.appendChild(n),o.appendChild(s)}function F(t){!function(t,i,o,n,s,r,l){function a(i){var s=Math.max(0,Math.min((new Date).getTime()-p,n));!function(t,i){if(!e.isNullOrUndefined(i.querySelector("svg.e-spin-material"))&&!e.isNullOrUndefined(i.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))){var o=i.querySelector("svg.e-spin-material"),n=o.querySelector("path.e-path-circle");n.setAttribute("stroke-dashoffset",z(c,u,t,r)+""),n.setAttribute("transform","rotate("+f+" "+c/2+" "+c/2+")")}}(o(s,t,d,n),i.container),h===i.globalInfo[i.uniqueID].previousId&&s<n?Yt[i.uniqueID].timeOut=setTimeout(a.bind(null,i),1):F(i)}var h=++l.globalInfo[l.uniqueID].previousId,p=(new Date).getTime(),d=i-t,c=function(t){return parseFloat(t)}(2*l.globalInfo[l.uniqueID].radius+""),u=q(c),f=-90*(l.globalInfo[l.uniqueID].count||0);a(l)}(1,149,_,1333,t.globalInfo[t.uniqueID].count,75,t),t.globalInfo[t.uniqueID].count=++t.globalInfo[t.uniqueID].count%4}function q(t){return.1*t}function z(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function _(t,e,i,o){var n=(t/=o)*t,s=n*t;return e+i*(6*s*n+-15*n*n+10*s)}function V(t,e,i){var o=t,n=t,s=2*t,r=e.querySelector("."+i),l=r.querySelector(".e-path-circle"),a=r.querySelector(".e-path-arc"),h=s/2+"px";l.setAttribute("d",function(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(" ")}(o,n,t)),a.setAttribute("d",function(t,e,i,o,n){var s=W(t,e,i,n),r=W(t,e,i,o);return["M",s.x,s.y,"A",i,i,0,0,0,r.x,r.y].join(" ")}(o,n,t,315,45)),r.setAttribute("viewBox","0 0 "+s+" "+s),r.style.transformOrigin=h+" "+h+" "+h,r.style.width=r.style.height=s+"px"}function W(t,e,i,o){var n=(o-90)*Math.PI/180;return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function Z(t){K(t,!1)}function K(t,i){var o=t.classList.contains(Jt)?t:t.querySelector("."+Jt),n=o.querySelector("."+Qt);if(i?!o.classList.contains(ie)&&!o.classList.contains(Vt):!o.classList.contains(ie)&&!o.classList.contains(_t)){var s=o.querySelector("svg");if(e.isNullOrUndefined(s))return;var r=s.getAttribute("id");switch(Yt[r].isAnimate=!i,Yt[r].type){case"Material":i?clearTimeout(Yt[r].timeOut):function(t,e,i){var o={};Yt[e].timeOut=0,o[e]=function(t,e,i,o){return{radius:e,count:i,previousId:o}}(0,i,0,0),F({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}(n,r,Yt[r].radius);break;case"Bootstrap":i?clearTimeout(Yt[r].timeOut):function(t){for(var e=t.querySelector("svg.e-spin-bootstrap").getAttribute("id"),i=1;i<=8;i++)!function(t,e,i,o,n){function s(e){Yt[n].isAnimate&&(++r,t.setAttribute("r",e+""),r>=o.length&&(r=0),Yt[n].timeOut=setTimeout(s.bind(null,o[r]),18))}var r=0;s(e)}(t.getElementsByClassName("e-path-circle_"+(8===i?0:i))[0],i,0,Y(i,i),e)}(n)}}i?e.classList(o,[Vt],[_t]):e.classList(o,[_t],[Vt])}function G(t){K(t,!0)}var J,Q,$,tt,et,it=!1,ot=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),nt=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},st=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ot(i,t),nt([e.Property("left")],i.prototype,"X",void 0),nt([e.Property("top")],i.prototype,"Y",void 0),i}(e.ChildProperty),rt="e-popup",lt="e-rtl",at="e-popup-open",ht="e-popup-close",pt=function(t){function i(e,i){var o=t.call(this,i,e)||this;return o.fixedParent=!1,o}return ot(i,t),i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){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 r=t.offsetY-i.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+r).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.getPersistData=function(){return this.addOnPersist([])},i.prototype.destroy=function(){this.element.classList.remove(rt,lt),this.unwireEvents(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(rt);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.setEnableRtl(),this.setContent(),this.wireEvents()},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 o=i[t];e.EventHandler.add(o,"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 o=i[t];e.EventHandler.remove(o,"scroll",this.scrollRefresh)}},i.prototype.getRelateToElement=function(){var t=""===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?this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement(),t.target);e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},i.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},i.prototype.isElementVisible=function(t,e){var i=t.getBoundingClientRect();if(!i.height||!i.width)return!1;if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return!(i.bottom<o.top||i.bottom>o.bottom||i.right>o.right||i.left<o.left)}var s=window,r=s.scrollY,l=s.scrollX,a=s.scrollX+s.outerWidth,h=s.scrollY+s.outerHeight,p=n(t),d=p.top,c=p.left,u=p.left+i.width,f=p.top+i.height;return h-d>0&&a-c>0&&u-l>0&&f-r>0},i.prototype.preRender=function(){},i.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(lt):this.element.classList.remove(lt)},i.prototype.setContent=function(){e.isNullOrUndefined(this.content)||(this.element.innerHTML="","string"==typeof this.content?this.element.textContent=this.content:this.element.appendChild(this.content))},i.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},i.prototype.refreshPosition=function(t){e.isNullOrUndefined(t)||this.checkFixedParent(t),this.reposition(),this.checkCollision()},i.prototype.reposition=function(){var t,e=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if(e){var i=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(e,this.element,this.position,this.offsetX,this.offsetY),this.element.style.display=i}else t={left:0,top:0};this.element.style.left=t.left+"px",this.element.style.top=t.top+"px"},i.prototype.getAnchorPosition=function(t,e,i,s,r){var l=e.getBoundingClientRect(),a=t.getBoundingClientRect(),h=t,p={left:0,top:0};switch(p=e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?n(t):o(h,e),i.X){default:case"left":break;case"center":"container"===this.targetType?p.left+=a.width/2-l.width/2:p.left+=a.width/2;break;case"right":"container"===this.targetType?p.left+=a.width-l.width:p.left+=a.width}switch(i.Y){default:case"top":break;case"center":"container"===this.targetType?p.top+=a.height/2-l.height/2:p.top+=a.height/2;break;case"bottom":"container"===this.targetType?p.top+=a.height-l.height:p.top+=a.height}return p.left+=s,p.top+=r,p},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){var e=m(this.element,this.viewPortElement,t);this.element.style.left=e.left+"px",this.element.style.top=e.top+"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}):("fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0}),"flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1})))},i.prototype.show=function(t){var i=this;1e3===this.zIndex&&(this.zIndex=j(this.element),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],ht),e.addClass([this.element],at),this.checkCollision(),e.removeClass([this.element],at),e.addClass([this.element],ht)),e.isNullOrUndefined(t)?(e.removeClass([this.element],ht),e.addClass([this.element],at),this.trigger("open")):(t.begin=function(){i.isDestroyed||(e.removeClass([i.element],ht),e.addClass([i.element],at))},t.end=function(){i.isDestroyed||i.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],at),e.addClass([this.element],ht),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],at),e.addClass([i.element],ht),i.trigger("close"))},new e.Animation(t).animate(this.element))},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),M(t,this.fixedParent)},i.prototype.checkFixedParent=function(t){for(var i=t.parentElement;i&&"HTML"!==i.tagName;){var o=getComputedStyle(i);"fixed"===o.position&&this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&(this.element.style.position="fixed",this.fixedParent=!0),i=i.parentElement,e.isNullOrUndefined(this.element.offsetParent)&&"fixed"===o.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},nt([e.Property("auto")],i.prototype,"height",void 0),nt([e.Property("auto")],i.prototype,"width",void 0),nt([e.Property(null)],i.prototype,"content",void 0),nt([e.Property("container")],i.prototype,"targetType",void 0),nt([e.Property(null)],i.prototype,"viewPortElement",void 0),nt([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),nt([e.Property("")],i.prototype,"relateTo",void 0),nt([e.Complex({},st)],i.prototype,"position",void 0),nt([e.Property(0)],i.prototype,"offsetX",void 0),nt([e.Property(0)],i.prototype,"offsetY",void 0),nt([e.Property(1e3)],i.prototype,"zIndex",void 0),nt([e.Property(!1)],i.prototype,"enableRtl",void 0),nt([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),nt([e.Property(null)],i.prototype,"showAnimation",void 0),nt([e.Property(null)],i.prototype,"hideAnimation",void 0),nt([e.Event()],i.prototype,"open",void 0),nt([e.Event()],i.prototype,"close",void 0),nt([e.Event()],i.prototype,"targetExitViewport",void 0),i=nt([e.NotifyPropertyChanges],i)}(e.Component),dt=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ct=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},ut=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return dt(i,t),ct([e.Property()],i.prototype,"buttonModel",void 0),ct([e.Property()],i.prototype,"click",void 0),i}(e.ChildProperty),ft=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return dt(i,t),ct([e.Property("Fade")],i.prototype,"effect",void 0),ct([e.Property(400)],i.prototype,"duration",void 0),ct([e.Property(0)],i.prototype,"delay",void 0),i}(e.ChildProperty),mt="e-dialog",yt="e-dlg-header-content",vt="e-dlg-header",gt="e-footer-content",bt="e-dlg-modal",Et="e-icon-dlg-close",Ct="e-scroll-disabled",wt="e-dlg-fullscreen",Ot="e-dlg-closeicon-btn",Pt=function(t){function o(e,i){return t.call(this,e,i)||this}return dt(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents()},o.prototype.preRender=function(){var t=this;this.headerContent=null;for(var i=[],o=0;o<this.element.classList.length;o++)e.isNullOrUndefined(this.element.classList[o].match("e-control"))&&e.isNullOrUndefined(this.element.classList[o].match(mt))||i.push(this.element.classList[o]);e.removeClass([this.element],i),this.clonedEle=this.element.cloneNode(!0),this.closeIconClickEventHandler=function(e){t.hide(),t.closedFrom=e},this.dlgOverlayClickEventHandler=function(e){t.trigger("overlayClick",e)};this.l10n=new e.L10n("dialog",{close:"Close"},this.locale)},o.prototype.keyDown=function(t){var i=this;if(9===t.keyCode&&this.isModal){var o=void 0;e.isNullOrUndefined(this.btnObj)||(o=this.btnObj[this.btnObj.length-1]),e.isNullOrUndefined(o)||document.activeElement!==o.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),e.isNullOrUndefined(o)||o.element.focus())}var n=document.activeElement,s=["input","textarea"].indexOf(n.tagName.toLowerCase())>-1,r=!1;if(s||(r=n.hasAttribute("contenteditable")&&"true"===n.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.hide(),this.closedFrom=t),13===t.keyCode&&!t.ctrlKey&&"textarea"!==n.tagName.toLowerCase()&&s&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===n.tagName.toLowerCase()||r)&&!e.isNullOrUndefined(this.primaryButtonEle)){var l;this.buttons.some(function(t,i){l=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[l].click&&setTimeout(function(){i.buttons[l].click.call(i,t)})}},o.prototype.initialize=function(){e.isNullOrUndefined(this.target)||(this.targetEle="string"==typeof this.target?document.querySelector(this.target):this.target),e.addClass([this.element],mt),e.Browser.isDevice&&e.addClass([this.element],"e-device"),this.setCSSClass(),this.setMaxHeight()},o.prototype.initRender=function(){var t=this;e.attributes(this.element,{role:"dialog"}),1e3===this.zIndex&&(this.zIndex=j(this.element)),this.setTargetContent(),""!==this.header&&this.setHeader(),this.showCloseIcon&&this.renderCloseIcon(),e.isNullOrUndefined(this.content)||""===this.content?this.element.hasChildNodes()&&(this.contentEle=this.element):this.setContent(),""!==this.footerTemplate&&this.setFooterTemplate(),e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||this.setButton(),!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)||this.setAllowDragging(),e.attributes(this.element,{"aria-modal":this.isModal?"true":"false"}),this.isModal&&this.setIsModal(),e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element)),this.popupObj=new pt(this.element,{height:this.height,width:this.width,zIndex:this.zIndex,relateTo:this.target,actionOnScroll:"none",open:function(){t.focusContent(),t.trigger("open")},close:function(i){t.unBindEvent(t.element),t.isModal&&(t.dlgContainer.style.display="none"),t.trigger("close",t.closedFrom),t.closedFrom={},e.isNullOrUndefined(t.storeActiveElement)||t.storeActiveElement.focus()}}),this.positionChange(),this.setEnableRTL(),e.addClass([this.element],"e-popup-close"),this.isModal&&this.setOverlayZindex(),this.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},o.prototype.setOverlayZindex=function(){var t=parseInt(this.element.style.zIndex,10)?parseInt(this.element.style.zIndex,10):this.zIndex;this.dlgOverlay.style.zIndex=(t-1).toString(),this.dlgContainer.style.zIndex=t.toString()},o.prototype.positionChange=function(){this.isModal?this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y):this.popupObj.setProperties({position:{X:this.position.X,Y:this.position.Y}})},o.prototype.setAllowDragging=function(){var t=this;this.dragObj=new e.Draggable(this.element,{clone:!1,handle:".e-dlg-header-content",dragStart:function(e){t.trigger("dragStart",e)},dragStop:function(e){t.trigger("dragStop",e)},drag:function(e){t.trigger("drag",e)}}),e.isNullOrUndefined(this.targetEle)||(this.dragObj.dragArea=this.targetEle)},o.prototype.setButton=function(){this.buttonContent=[],this.btnObj=[];for(var t=0;t<this.buttons.length;t++){var o=e.createElement("button",{attrs:{type:"button"}});this.buttonContent.push(o.outerHTML)}this.setFooterTemplate();for(t=0;t<this.buttons.length;t++)this.btnObj[t]=new i.Button(this.buttons[t].buttonModel),"function"==typeof this.buttons[t].click&&e.EventHandler.add(this.ftrTemplateContent.children[t],"click",this.buttons[t].click,this),this.btnObj[t].appendTo(this.ftrTemplateContent.children[t]),this.btnObj[t].isPrimary||this.btnObj[t].element.classList.add("e-flat"),this.primaryButtonEle=this.element.getElementsByClassName("e-primary")[0]},o.prototype.setContent=function(){e.attributes(this.element,{"aria-describedby":this.element.id+"_dialog-content"}),this.contentEle=e.createElement("div",{className:"e-dlg-content",id:this.element.id+"_dialog-content"}),"string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.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.setMaxHeight()},o.prototype.setMaxHeight=function(){var t=this.element.style.display;this.element.style.display="none",this.element.style.maxHeight=e.isNullOrUndefined(this.target)?window.innerHeight-20+"px":this.targetEle.offsetHeight-20+"px",this.element.style.display=t},o.prototype.setEnableRTL=function(){this.enableRtl?e.addClass([this.element],"e-rtl"):e.removeClass([this.element],"e-rtl")},o.prototype.setTargetContent=function(){var t=""!==this.element.innerHTML.replace(/\s/g,"");if(this.element.children.length>0||t){for(var e=document.createDocumentFragment();0!==this.element.childNodes.length;)e.appendChild(this.element.childNodes[0]);this.setProperties({content:e},!0)}},o.prototype.setHeader=function(){this.headerEle=e.createElement("div",{id:this.element.id+"_title",className:vt,innerHTML:this.header}),e.attributes(this.element,{"aria-labelledby":this.element.id+"_title"}),this.createHeaderContent(),this.headerContent.appendChild(this.headerEle),this.element.insertBefore(this.headerContent,this.element.children[0])},o.prototype.setFooterTemplate=function(){this.ftrTemplateContent=e.createElement("div",{className:gt,innerHTML:""!==this.footerTemplate?this.footerTemplate:this.buttonContent.join("")}),this.element.appendChild(this.ftrTemplateContent)},o.prototype.createHeaderContent=function(){e.isNullOrUndefined(this.headerContent)&&(this.headerContent=e.createElement("div",{className:yt}))},o.prototype.renderCloseIcon=function(){this.closeIcon=e.createElement("button",{className:Ot,attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:Et+" 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)},o.prototype.closeIconTitle=function(){this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close");this.closeIcon.setAttribute("title",t)},o.prototype.setCSSClass=function(t){this.cssClass&&e.addClass([this.element],this.cssClass.split(" ")),t&&e.removeClass([this.element],t.split(" "))},o.prototype.setIsModal=function(){this.dlgContainer=e.createElement("div",{className:"e-dlg-container"}),this.element.parentNode.insertBefore(this.dlgContainer,this.element),this.dlgContainer.appendChild(this.element),e.addClass([this.element],bt),this.dlgOverlay=e.createElement("div",{className:"e-dlg-overlay"}),this.dlgOverlay.style.zIndex=(this.zIndex-1).toString(),this.dlgContainer.appendChild(this.dlgOverlay)},o.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;return e},o.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},o.prototype.getAutoFocusNode=function(t){var i=t.querySelector("."+Ot),o=t.querySelectorAll("[autofocus]"),n=this.getValidFocusNode(o);if(e.isNullOrUndefined(n)){if(n=this.focusableElements(this.contentEle),!e.isNullOrUndefined(n))return i=n;if(!e.isNullOrUndefined(this.primaryButtonEle))return this.element.querySelector(".e-primary")}else i=n;return i},o.prototype.disableElement=function(t,e){var i=t?t.matches||t.webkitMatchesSelector||t.msMatchesSelector:null;if(i)for(;t;t=t.parentNode)if(t instanceof Element&&i.call(t,e))return t;return null},o.prototype.focusContent=function(){var t=this.getAutoFocusNode(this.element);(e.isNullOrUndefined(t)?this.element:t).focus(),this.bindEvent(this.element)},o.prototype.bindEvent=function(t){e.EventHandler.add(t,"keydown",this.keyDown,this)},o.prototype.unBindEvent=function(t){e.EventHandler.remove(t,"keydown",this.keyDown)},o.prototype.getModuleName=function(){return"dialog"},o.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"content":e.isNullOrUndefined(this.content)||""===this.content?e.isNullOrUndefined(this.contentEle)||this.element.removeChild(this.contentEle):e.isNullOrUndefined(this.contentEle)||"dialog"===this.contentEle.getAttribute("role")?this.setContent():(this.contentEle.innerHTML="","string"==typeof this.content?this.contentEle.innerHTML=this.content:this.contentEle.appendChild(this.content),this.setMaxHeight());break;case"header":""===this.header?e.detach(this.headerEle):this.element.getElementsByClassName(vt).length>0?this.element.getElementsByClassName(vt)[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName(gt).length>0?this.ftrTemplateContent.innerHTML=this.footerTemplate:this.setFooterTemplate();break;case"showCloseIcon":this.element.getElementsByClassName(Et).length>0?this.showCloseIcon||""!==this.header?this.showCloseIcon||e.detach(this.closeIcon):e.detach(this.headerContent):(this.renderCloseIcon(),this.wireEvents());break;case"locale":this.showCloseIcon&&this.closeIconTitle();break;case"visible":this.visible?this.show():this.hide();break;case"isModal":if(this.element.setAttribute("aria-modal",this.isModal?"true":"false"),this.isModal)this.setIsModal(),this.wireEvents(),e.isNullOrUndefined(this.targetEle)||(this.isModal?this.targetEle.appendChild(this.dlgContainer):this.targetEle.appendChild(this.element));else{for(e.removeClass([this.element],bt),e.removeClass([document.body],Ct),e.detach(this.dlgOverlay);this.dlgContainer.firstChild;)this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild,this.dlgContainer);this.dlgContainer.parentElement.removeChild(this.dlgContainer)}break;case"height":e.setStyleAttribute(this.element,{height:e.formatUnit(t.height)});break;case"width":e.setStyleAttribute(this.element,{width:e.formatUnit(t.width)});break;case"zIndex":this.popupObj.zIndex=this.zIndex,this.isModal&&this.setOverlayZindex();break;case"cssClass":this.setCSSClass(i.cssClass);break;case"animationSettings":this.show();break;case"buttons":e.isNullOrUndefined(this.buttons[0].buttonModel)||""!==this.footerTemplate||(e.isNullOrUndefined(this.ftrTemplateContent)||e.detach(this.ftrTemplateContent),this.setButton());break;case"allowDragging":!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)?this.dragObj.destroy():this.setAllowDragging();break;case"target":this.popupObj.relateTo=t.target;break;case"position":if(i.position.X===this.position.X&&i.position.Y===this.position.Y)break;if(!this.isModal){this.popupObj.position.X=this.position.X,this.popupObj.position.Y=this.position.Y;break}this.dlgContainer.classList.remove("e-dlg-"+i.position.X+"-"+i.position.Y),this.dlgContainer.classList.add("e-dlg-"+this.position.X+"-"+this.position.Y);break;case"enableRtl":this.setEnableRTL()}}},o.prototype.getPersistData=function(){return this.addOnPersist([])},o.prototype.destroy=function(){if(this.element.classList.contains(mt)){this.unWireEvents(),t.prototype.destroy.call(this);var i=[mt,"e-rtl",bt];if(e.removeClass([this.element,this.element],i),this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),!e.isNullOrUndefined(this.btnObj))for(var o=void 0;o<this.btnObj.length;o++)this.btnObj[o].destroy();for(this.isModal&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.element.innerHTML="";this.element.attributes.length>0;)this.element.removeAttribute(this.element.attributes[0].name);for(var n=0;n<this.clonedEle.attributes.length;n++)this.element.setAttribute(this.clonedEle.attributes[n].name,this.clonedEle.attributes[n].value)}},o.prototype.wireEvents=function(){this.showCloseIcon&&e.EventHandler.add(this.closeIcon,"click",this.closeIconClickEventHandler,this),this.isModal&&e.EventHandler.add(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler,this)},o.prototype.unWireEvents=function(){if(this.showCloseIcon&&e.EventHandler.remove(this.closeIcon,"click",this.closeIconClickEventHandler),this.isModal&&e.EventHandler.remove(this.dlgOverlay,"click",this.dlgOverlayClickEventHandler),!e.isNullOrUndefined(this.buttons[0].buttonModel))for(var t=0;t<this.buttons.length;t++)"function"==typeof this.buttons[t].click&&e.EventHandler.remove(this.ftrTemplateContent.children[t],"click",this.buttons[t].click)},o.prototype.refreshPosition=function(){this.popupObj.refreshPosition()},o.prototype.show=function(t){if(!this.element.classList.contains("e-popup-open")||!e.isNullOrUndefined(t)){e.isNullOrUndefined(t)||this.fullScreen(t);var i={cancel:!1,container:this.isModal?this.dlgContainer:this.element};if(this.trigger("beforeOpen",i),i.cancel)return;this.storeActiveElement=document.activeElement,this.element.tabIndex=-1,this.isModal&&!e.isNullOrUndefined(this.dlgOverlay)&&(this.dlgOverlay.style.display="block",this.dlgContainer.style.display="flex",e.isNullOrUndefined(this.targetEle)?e.addClass([document.body],Ct):(this.targetEle===document.body?this.dlgContainer.style.position="fixed":this.dlgContainer.style.position="absolute",this.dlgOverlay.style.position="absolute",this.element.style.position="relative",e.addClass([this.targetEle],Ct)));var o={name:this.animationSettings.effect+"In",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.show():this.popupObj.show(o),this.dialogOpen=!0,this.setProperties({visible:!0},!0)}},o.prototype.hide=function(){var t={cancel:!1,container:this.isModal?this.dlgContainer:this.element};if(this.trigger("beforeClose",t),!t.cancel){this.isModal&&(this.dlgOverlay.style.display="none",e.isNullOrUndefined(this.targetEle)?e.removeClass([document.body],Ct):e.removeClass([this.targetEle],Ct));var i={name:this.animationSettings.effect+"Out",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.hide():this.popupObj.hide(i),this.dialogOpen=!1,this.setProperties({visible:!1},!0)}},o.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){e.addClass([this.element],wt);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],Ct),this.allowDragging&&!e.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()}else e.removeClass([this.element],wt),e.removeClass([document.body],Ct),!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)||this.setAllowDragging();return t},ct([e.Property("")],o.prototype,"content",void 0),ct([e.Property(!1)],o.prototype,"showCloseIcon",void 0),ct([e.Property(!1)],o.prototype,"isModal",void 0),ct([e.Property("")],o.prototype,"header",void 0),ct([e.Property(!0)],o.prototype,"visible",void 0),ct([e.Property("auto")],o.prototype,"height",void 0),ct([e.Property("100%")],o.prototype,"width",void 0),ct([e.Property("")],o.prototype,"cssClass",void 0),ct([e.Property(1e3)],o.prototype,"zIndex",void 0),ct([e.Property(null)],o.prototype,"target",void 0),ct([e.Property("")],o.prototype,"footerTemplate",void 0),ct([e.Property(!1)],o.prototype,"allowDragging",void 0),ct([e.Collection([{}],ut)],o.prototype,"buttons",void 0),ct([e.Property(!0)],o.prototype,"closeOnEscape",void 0),ct([e.Complex({},ft)],o.prototype,"animationSettings",void 0),ct([e.Complex({X:"center",Y:"center"},st)],o.prototype,"position",void 0),ct([e.Event()],o.prototype,"created",void 0),ct([e.Event()],o.prototype,"open",void 0),ct([e.Event()],o.prototype,"beforeOpen",void 0),ct([e.Event()],o.prototype,"close",void 0),ct([e.Event()],o.prototype,"beforeClose",void 0),ct([e.Event()],o.prototype,"dragStart",void 0),ct([e.Event()],o.prototype,"dragStop",void 0),ct([e.Event()],o.prototype,"drag",void 0),ct([e.Event()],o.prototype,"overlayClick",void 0),o=ct([e.NotifyPropertyChanges],o)}(e.Component),Tt=function(){var 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])};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),St=function(t,e,i,o){var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r},xt="e-tooltip",Nt="e-tip-content",kt="e-arrow-tip",At="e-arrow-tip-outer",Ht="e-arrow-tip-inner",It="e-tip-bottom",Lt="e-tip-top",Bt="e-tip-right",Mt="e-popup-open",jt="e-popup-close",Ut=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Tt(i,t),St([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),St([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),Rt=function(t){function i(e,i){return t.call(this,e,i)||this}return Tt(i,t),i.prototype.initialize=function(){this.formatPosition(),e.addClass([this.element],xt)},i.prototype.formatPosition=function(){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]);var t,e},i.prototype.renderArrow=function(){this.setTipClass(this.position);var t=e.createElement("div",{className:kt+" "+this.tipClass});t.appendChild(e.createElement("div",{className:At+" "+this.tipClass})),t.appendChild(e.createElement("div",{className:Ht+" "+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=Lt:0===t.indexOf("Left")?this.tipClass=Bt:this.tipClass=It},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.popupObj=new pt(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.getTooltipPosition=function(t){var e=n(t,this.tooltipPositionX,this.tooltipPositionY),i=this.calculateTooltipOffset(this.position);return this.collisionFlipFit(t,e.left+i.left,e.top+i.top)},i.prototype.reposition=function(t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()},i.prototype.openPopupHandler=function(){this.trigger("afterOpen",this.tooltipEventArgs)},i.prototype.closePopupHandler=function(){this.clear(),this.trigger("afterClose",this.tooltipEventArgs)},i.prototype.calculateTooltipOffset=function(t){var e={top:0,left:0},i=this.tooltipEle.offsetWidth,o=this.tooltipEle.offsetHeight,n=this.tooltipEle.querySelector("."+kt),s=n?n.offsetWidth:0,r=n?n.offsetHeight:0,l=this.showTipPointer?0:8,a=r/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),h=s/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(l+=2),t){case"RightTop":e.left+=s+l,e.top-=o-a;break;case"RightCenter":e.left+=s+l,e.top-=o/2;break;case"RightBottom":e.left+=s+l,e.top-=a;break;case"BottomRight":e.top+=r+l,e.left-=h;break;case"BottomCenter":e.top+=r+l,e.left-=i/2;break;case"BottomLeft":e.top+=r+l,e.left-=i-h;break;case"LeftBottom":e.left-=s+i+l,e.top-=a;break;case"LeftCenter":e.left-=s+i+l,e.top-=o/2;break;case"LeftTop":e.left-=s+i+l,e.top-=o-a;break;case"TopLeft":e.top-=o+r+l,e.left-=i-h;break;case"TopRight":e.top-=o+r+l,e.left-=h;break;default:e.top-=o+r+l,e.left-=i/2}return e.left+=this.offsetX,e.top+=this.offsetY,e},i.prototype.updateTipPosition=function(t){var i=this.tooltipEle.querySelectorAll("."+kt+",."+At+",."+Ht),o=[It,Lt,"e-tip-left",Bt];e.removeClass(i,o),this.setTipClass(t),e.addClass(i,this.tipClass)},i.prototype.adjustArrow=function(t,e,i,o){if(!1!==this.showTipPointer){this.updateTipPosition(e);var n,s,r=this.tooltipEle.clientWidth,l=this.tooltipEle.clientHeight,a=this.tooltipEle.querySelector("."+kt),h=this.tooltipEle.querySelector("."+Ht),p=a.offsetWidth,d=a.offsetHeight;if(this.tipClass===It||this.tipClass===Lt){this.tipClass===It?(s="99.9%",h.style.top="-"+(d-2)+"px"):(s=-(d-1)+"px",h.style.top="-"+(d-6)+"px");n=(c="Center"!==i||r>t.offsetWidth||this.mouseTrail)&&"Left"===i||!c&&"End"===this.tipPointerPosition?r-p-2+"px":c&&"Right"===i||!c&&"Start"===this.tipPointerPosition?"2px":r/2-p/2+"px"}else{this.tipClass===Bt?(n="99.9%",h.style.left="-"+(p-2)+"px"):(n=-(p-1)+"px",h.style.left=p-2-p+"px");var c;s=(c="Center"!==o||l>t.offsetHeight||this.mouseTrail)&&"Top"===o||!c&&"End"===this.tipPointerPosition?l-d-2+"px":c&&"Bottom"===o||!c&&"Start"===this.tipPointerPosition?"2px":l/2-d/2+"px"}a.style.top=s,a.style.left=n}},i.prototype.renderContent=function(t){var i=this.tooltipEle.querySelector("."+Nt);if(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"))&&(i.innerHTML=t.getAttribute("data-content"));else if("string"==typeof this.content)i.innerHTML=this.content;else{for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(this.content)}},i.prototype.renderCloseIcon=function(){if(this.isSticky){var t=e.createElement("div",{className:"e-icons e-tooltip-close"});this.tooltipEle.appendChild(t),e.EventHandler.add(t,e.Browser.touchStartEvent,this.onStickyClose,this)}},i.prototype.addDescribedBy=function(t,i){var o=(t.getAttribute("aria-describedby")||"").split(/\s+/);o.indexOf(i)<0&&o.push(i),e.attributes(t,{"aria-describedby":o.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+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},i.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},i.prototype.touchEndHandler=function(t){var e=this;if(!this.isSticky){this.autoCloseTimer=setTimeout(function(){e.close()},1500)}},i.prototype.targetClick=function(t){var i;i=this.target?e.closest(t.target,this.target):this.element,e.isNullOrUndefined(i)||(null===i.getAttribute("data-tooltip-id")?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")){for(var o=0,n=[].slice.call(document.querySelectorAll("[data-tooltip-id= "+this.ctrlId+"_content]"));o<n.length;o++){var s=n[o];this.restoreElement(s)}this.showTooltip(i,this.animation.open,t),this.wireMouseEvents(t,i)}},i.prototype.showTooltip=function(t,i,o){var n=this;if(clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeRender",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();if(this.isHidden=!1,e.isNullOrUndefined(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?e.getUniqueID(this.element.getAttribute("id")):e.getUniqueID("tooltip"),this.tooltipEle=e.createElement("div",{className:"e-tooltip-wrap e-popup",attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"},styles:"width:"+e.formatUnit(this.width)+";height:"+e.formatUnit(this.height)+";position:absolute;"}),this.cssClass&&e.addClass([this.tooltipEle],this.cssClass.split(" ")),e.Browser.isDevice&&e.addClass([this.tooltipEle],"e-bigger"),"auto"!==this.width&&(this.tooltipEle.style.maxWidth=e.formatUnit(this.width)),this.tooltipEle.appendChild(e.createElement("div",{className:Nt})),document.body.appendChild(this.tooltipEle),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),e.addClass([this.tooltipEle],Mt),this.showTipPointer&&this.renderArrow(),this.renderCloseIcon(),this.renderPopup(t)):(this.adjustArrow(t,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),e.Animation.stop(this.tooltipEle),this.reposition(t)),e.removeClass([this.tooltipEle],Mt),e.addClass([this.tooltipEle],jt),this.tooltipEventArgs=o?{type:o.type,cancel:!1,target:t,event:o,element:this.tooltipEle}:{type:null,cancel:!1,target:t,event:null,element:this.tooltipEle},this.trigger("beforeOpen",this.tooltipEventArgs),this.tooltipEventArgs.cancel)return this.isHidden=!0,void this.clear();var s={name:i.effect,duration:i.duration,delay:i.delay,timingFunction:"easeOut"};if("None"===i.effect&&(s=void 0),this.openDelay>0){this.showTimer=setTimeout(function(){n.popupObj&&n.popupObj.show(s)},this.openDelay)}else this.popupObj.show(s)},i.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=y(this.tooltipEle,this.target?this.element:null,e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},i.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),s=o.position;if(this.tooltipPositionY!==o.vertical&&(s=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===s.indexOf("Left")&&(o.vertical="LeftTop"===s||"LeftCenter"===s?"Top":"Bottom",s=o.vertical+"Left"),0===s.indexOf("Right")&&(o.vertical="RightTop"===s||"RightCenter"===s?"Top":"Bottom",s=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:s},this.trigger("beforeCollision",this.tooltipEventArgs),o.position!==s){var r=n(t,this.tooltipPositionX,o.vertical);this.adjustArrow(t,s,o.horizontal,o.vertical);var l=this.calculateTooltipOffset(s);o.position=s,o.left=r.left+l.left,o.top=r.top+l.top}else this.adjustArrow(t,s,o.horizontal,o.vertical);var a={left:o.left,top:o.top},h=m(this.tooltipEle,this.target?this.element:null,{X:!0,Y:!1},a).left;if(this.showTipPointer&&(0===s.indexOf("Bottom")||0===s.indexOf("Top"))){var p=this.tooltipEle.querySelector("."+kt),d=parseInt(p.style.left,10)-(h-o.left);d<0?d=0:d+p.offsetWidth>this.tooltipEle.clientWidth&&(d=this.tooltipEle.clientWidth-p.offsetWidth),p.style.left=d.toString()+"px"}return a.left=h,a},i.prototype.hideTooltip=function(t,i,o){var n,s=this;if(i?(n=this.target?o||i.target:this.element,this.tooltipEventArgs={type:i.type,cancel:!1,target:n,event:i,element:this.tooltipEle}):(n=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]"),this.tooltipEventArgs={type:null,cancel:!1,target:n,event:null,element:this.tooltipEle}),!e.isNullOrUndefined(n))if(this.trigger("beforeClose",this.tooltipEventArgs),this.tooltipEventArgs.cancel)this.isHidden=!1;else{this.restoreElement(n),this.isHidden=!0;var r={name:t.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};if("None"===t.effect&&(r=void 0),this.closeDelay>0){this.hideTimer=setTimeout(function(){s.popupObj&&s.popupObj.hide(r)},this.closeDelay)}else this.popupObj.hide(r)}},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(){this.tooltipEle&&(e.removeClass([this.tooltipEle],jt),e.addClass([this.tooltipEle],Mt)),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},i.prototype.onMouseOut=function(t){this.hideTooltip(this.animation.close,t)},i.prototype.onStickyClose=function(t){this.close()},i.prototype.onMouseMove=function(t){var i=0,o=0;t.type.indexOf("touch")>-1?(t.preventDefault(),i=t.touches[0].pageX,o=t.touches[0].pageY):(i=t.pageX,o=t.pageY),e.Animation.stop(this.tooltipEle),e.removeClass([this.tooltipEle],jt),e.addClass([this.tooltipEle],Mt),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var n=this.calculateTooltipOffset(this.position),s=i+n.left+this.offsetX,r=o+n.top+this.offsetY,l=this.checkCollision(t.target,s,r);if(this.tooltipPositionX!==l.horizontal||this.tooltipPositionY!==l.vertical){var a=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?l.vertical+l.horizontal:l.horizontal+l.vertical;l.position=a,this.adjustArrow(t.target,l.position,l.horizontal,l.vertical);var h=this.calculateTooltipOffset(l.position);l.left=i+h.left-this.offsetX,l.top=o+h.top-this.offsetY}this.tooltipEle.style.left=l.left+"px",this.tooltipEle.style.top=l.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,"."+xt)&&this.close()},i.prototype.scrollHandler=function(t){this.tooltipEle&&this.close()},i.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn)},i.prototype.preRender=function(){this.tipClass=It,this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},i.prototype.wireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.wireFocusEvents(),"Click"===n&&e.EventHandler.add(this.element,e.Browser.touchStartEvent,this.targetClick,this),"Hover"===n&&(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))}e.EventHandler.add(document,"touchend",this.touchEnd,this),e.EventHandler.add(document,"scroll",this.scrollHandler,this),e.EventHandler.add(document,"keydown",this.keyDown,this)},i.prototype.getTriggerList=function(t){return"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,"focus",this.targetHover,this);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.add(o,"focus",this.targetHover,this)}},i.prototype.wireMouseEvents=function(t,i){this.tooltipEle&&(this.isSticky||("focus"===t.type&&e.EventHandler.add(i,"blur",this.onMouseOut,this),"mouseover"===t.type&&e.EventHandler.add(i,"mouseleave",this.onMouseOut,this)),this.mouseTrail&&e.EventHandler.add(i,"mousemove touchstart mouseenter",this.onMouseMove,this))},i.prototype.unwireEvents=function(t){for(var i=0,o=this.getTriggerList(t);i<o.length;i++){var n=o[i];if("Custom"===n)return;"Focus"===n&&this.unwireFocusEvents(),"Click"===n&&e.EventHandler.remove(this.element,e.Browser.touchStartEvent,this.targetClick),"Hover"===n&&(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))}e.EventHandler.remove(document,"touchend",this.touchEnd),e.EventHandler.remove(document,"scroll",this.scrollHandler),e.EventHandler.remove(document,"keydown",this.keyDown)},i.prototype.unwireFocusEvents=function(){if(e.isNullOrUndefined(this.target))e.EventHandler.remove(this.element,"focus",this.targetHover);else for(var t=0,i=[].slice.call(this.element.querySelectorAll(this.target));t<i.length;t++){var o=i[t];e.EventHandler.remove(o,"focus",this.targetHover)}},i.prototype.unwireMouseEvents=function(t){if(!this.isSticky)for(var i=0,o=this.getTriggerList(this.opensOn);i<o.length;i++){var n=o[i];"Focus"===n&&e.EventHandler.remove(t,"blur",this.onMouseOut),"Hover"!==n||e.Browser.isDevice||e.EventHandler.remove(t,"mouseleave",this.onMouseOut)}this.mouseTrail&&e.EventHandler.remove(t,"mousemove touchstart mouseenter",this.onMouseMove)},i.prototype.getModuleName=function(){return"tooltip"},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(t,i){for(var o=0,n=Object.keys(t);o<n.length;o++){switch(n[o]){case"width":this.tooltipEle&&(this.tooltipEle.style.width=e.formatUnit(t.width));break;case"height":this.tooltipEle&&(this.tooltipEle.style.height=e.formatUnit(t.height));break;case"content":this.tooltipEle&&this.renderContent();break;case"opensOn":this.unwireEvents(i.opensOn),this.wireEvents(t.opensOn);break;case"position":this.formatPosition();var s=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");if(this.tooltipEle&&s){var r=this.tooltipEle.querySelector("."+Ht);r.style.top=r.style.left=null,this.reposition(s)}break;case"tipPointerPosition":var l=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&l&&this.reposition(l);break;case"offsetX":if(this.tooltipEle){var a=t.offsetX-i.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+a).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var h=t.offsetY-i.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+h).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"))}}},i.prototype.open=function(t,e){void 0===e&&(e=this.animation.open),"none"!==t.style.display&&this.showTooltip(t,e)},i.prototype.close=function(t){void 0===t&&(t=this.animation.close),this.hideTooltip(t)},i.prototype.refresh=function(t){this.tooltipEle&&this.renderContent(t),this.popupObj&&t&&this.reposition(t)},i.prototype.destroy=function(){t.prototype.destroy.call(this),e.removeClass([this.element],xt),this.unwireEvents(this.opensOn),this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null},St([e.Property("auto")],i.prototype,"width",void 0),St([e.Property("auto")],i.prototype,"height",void 0),St([e.Property()],i.prototype,"content",void 0),St([e.Property()],i.prototype,"target",void 0),St([e.Property("TopCenter")],i.prototype,"position",void 0),St([e.Property(0)],i.prototype,"offsetX",void 0),St([e.Property(0)],i.prototype,"offsetY",void 0),St([e.Property(!0)],i.prototype,"showTipPointer",void 0),St([e.Property("Auto")],i.prototype,"tipPointerPosition",void 0),St([e.Property("Auto")],i.prototype,"opensOn",void 0),St([e.Property(!1)],i.prototype,"mouseTrail",void 0),St([e.Property(!1)],i.prototype,"isSticky",void 0),St([e.Complex({},Ut)],i.prototype,"animation",void 0),St([e.Property(0)],i.prototype,"openDelay",void 0),St([e.Property(0)],i.prototype,"closeDelay",void 0),St([e.Property()],i.prototype,"cssClass",void 0),St([e.Property(!1)],i.prototype,"enableRtl",void 0),St([e.Event()],i.prototype,"beforeRender",void 0),St([e.Event()],i.prototype,"beforeOpen",void 0),St([e.Event()],i.prototype,"afterOpen",void 0),St([e.Event()],i.prototype,"beforeClose",void 0),St([e.Event()],i.prototype,"afterClose",void 0),St([e.Event()],i.prototype,"beforeCollision",void 0),St([e.Event()],i.prototype,"created",void 0),St([e.Event()],i.prototype,"destroyed",void 0),i=St([e.NotifyPropertyChanges],i)}(e.Component),Yt={},Xt=null,Dt=null,Ft=30,qt=30,zt=30,_t="e-spin-show",Vt="e-spin-hide",Wt="e-spin-material",Zt="e-spin-fabric",Kt="e-spin-bootstrap",Gt="e-spin-high-contrast",Jt="e-spinner-pane",Qt="e-spinner-inner",$t="e-path-circle",te="e-path-arc",ee="e-spin-label",ie="e-spin-template";t.PositionData=st,t.Popup=pt,t.getScrollableParent=M,t.getZindexPartial=j,t.calculateRelativeBasedPosition=o,t.calculatePosition=n,t.fit=m,t.isCollide=y,t.flip=v,t.ButtonProps=ut,t.AnimationSettings=ft,t.Dialog=Pt,t.Animation=Ut,t.Tooltip=Rt,t.createSpinner=function(t){var i,o=function(t){var e=document.createElement("div");e.classList.add(Jt);var i=document.createElement("div");return i.classList.add(Qt),t.appendChild(e),e.appendChild(i),{wrap:e,inner_wrap:i}}(t.target);if(e.isNullOrUndefined(t.cssClass)||o.wrap.classList.add(t.cssClass),e.isNullOrUndefined(t.template)&&e.isNullOrUndefined(Xt)){var n=e.isNullOrUndefined(t.type)?function(t){return window.getComputedStyle(t,":after").getPropertyValue("content").replace(/['"]+/g,"")}(o.wrap):t.type;i=function(t,e){var i="Material"===e?Ft:"Fabric"===e?qt:zt;return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}(e.isNullOrUndefined(t.width)?void 0:t.width,n),R(n,o.wrap,i),e.isNullOrUndefined(t.label)||function(t,e){var i=document.createElement("div");i.classList.add(ee),i.textContent=e,t.appendChild(i)}(o.inner_wrap,t.label)}else{var s=e.isNullOrUndefined(t.template)?Xt:t.template;o.wrap.classList.add(ie),function(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}(o.wrap,s,Dt)}o.wrap.classList.add(Vt)},t.showSpinner=Z,t.hideSpinner=G,t.setSpinner=function(t){void 0!==t.template&&(Xt=t.template,void 0!==t.template&&(Dt=t.cssClass));for(var i=document.querySelectorAll("."+Jt),o=0;o<i.length;o++)!function(t,i,o,n){e.isNullOrUndefined(t)&&!i.classList.contains(ie)?(function(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o);var n=t.querySelector("svg"),s="Bootstrap"===i?parseFloat(n.style.height):parseFloat(n.style.height)/2;if(n.getAttribute("class").split(/\s/).indexOf("e-spin-material")>=0){var r=n.getAttribute("id");clearTimeout(Yt[r].timeOut)}R(i,t,s)}(i,o,n),i.classList.contains(_t)?(i.classList.remove(_t),Z(i)):(i.classList.remove(Vt),G(i))):(Xt=t,e.isNullOrUndefined(n)||(Dt=n))}(t.template,i[o],t.type,t.cssClass)},Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-popups.umd.min.js.map
/*!
* filename: index.d.ts
* version : 16.1.28
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
* version : 16.1.29
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
* Use of this code is subject to the terms of our license.

@@ -6,0 +6,0 @@ * A copy of the current license can be obtained at any time by e-mailing

{
"name": "@syncfusion/ej2-popups",
"version": "16.1.29",
"version": "16.1.30",
"description": "Essential JS 2 popup Component",

@@ -11,3 +11,3 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~16.1.29",
"@syncfusion/ej2-base": "~16.1.30",
"@syncfusion/ej2-buttons": "~16.1.28"

@@ -14,0 +14,0 @@ },

@@ -672,3 +672,3 @@ var __extends = (this && this.__extends) || (function () {

this.dialogOpen = true;
this.visible = true;
this.setProperties({ visible: true }, true);
}

@@ -697,3 +697,3 @@ };

this.dialogOpen = false;
this.visible = false;
this.setProperties({ visible: false }, true);
};

@@ -700,0 +700,0 @@ Dialog.prototype.fullScreen = function (args) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc