Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-popups

Package Overview
Dependencies
Maintainers
2
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-popups - npm Package Compare versions

Comparing version 15.4.27 to 16.1.24

styles/dialog/_highcontrast-definition.scss

16

CHANGELOG.md

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

- The issue with ng-properties were not working inside a Dialog has been fixed.
- Resolved the issue with accessing EJ2 component’s instances when rendering the EJ2 component inside the Dialog.
### Tooltip
#### Bug Fixes
- Line displayed in between tip and content of tooltip issue fixed by using `font-icons` for tooltip arrow element.
## 15.4.27-preview (2018-01-30)
### Dialog
#### Bug Fixes
- The issue with `Tab` key press on modal Dialog has been fixed.

@@ -11,0 +27,0 @@

4

dist/ej2-popups.umd.min.js
/*!
* filename: ej2-popups.umd.min.js
* version : 15.4.27
* version : 16.1.24
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -11,3 +11,3 @@ * Use of this code is subject to the terms of our license.

!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,e){var i={left:0,top:0},o=t;if(!t||!e)return i;for(;e.offsetParent&&t&&e.offsetParent!==t;)i.left+=t.offsetLeft,i.top+=t.offsetTop,t=t.offsetParent;for(t=o;e.offsetParent&&t&&e.offsetParent!==t;)i.left-=t.scrollLeft,i.top-=t.scrollTop,t=t.parentElement;return i}function n(t,e,i,o){if(tt=!!o,!t)return{left:0,top:0};e||(e="left"),i||(i="top"),J=t.ownerDocument,G=t;return function(t,e,i){switch(Z=G.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 J.documentElement.scrollTop||J.body.scrollTop}function a(){return J.documentElement.scrollLeft||J.body.scrollLeft}function h(){return tt?Z.bottom:Z.bottom+l()}function p(){return d()+Z.height/2}function d(){return tt?Z.top:Z.top+l()}function c(){return Z.left+a()}function u(){return Z.right+a()}function f(){return c()+Z.width/2}function y(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($=e,Q=t.ownerDocument,o||(o=n(t,"left","top")),i.X){var r=$?O():L(),l=N(),a=x(),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=$?P():M(),c=k(),u=A(),f=c-o.top,y=o.top+s.height-u;s.height>d?o.top=f>0&&y<=0?u-s.height:y>0&&f<=0?c:f>y?u-s.height:c:f>0?o.top+=f:y>0&&(o.top-=y)}return o}function m(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=[];$=e,Q=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 g(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}};$=l,Q=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),v(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 v(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>x()&&(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>=x()&&(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),v(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()<=k()&&(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),v(e,o,s),r&&C(t,e,i,o,s,!1))}function w(t,e){var i=!1,o=!1;return t-H()<k()&&(i=!0),e>A()&&(o=!0),{topSide:i,bottomSide:o}}function O(){return $.getBoundingClientRect().width}function P(){return $.getBoundingClientRect().height}function T(){return $.getBoundingClientRect().left}function S(){return $.getBoundingClientRect().top}function k(){return $?S():0}function N(){return $?T():0}function x(){return $?I()+T()+O():I()+L()}function A(){return $?H()+S()+P():H()+M()}function H(){return Q.documentElement.scrollTop||Q.body.scrollTop}function I(){return Q.documentElement.scrollLeft||Q.body.scrollLeft}function M(){return window.innerHeight}function L(){return window.innerWidth}function B(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 U(t,e){var i=D();Bt[i]={timeOut:0,type:"Material",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("class",Ft),i.setAttribute("id",e);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("class",Kt),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",F(i,s,1,75)+"")}(e,t)}function j(t,e){var i=D();Bt[i]={timeOut:0,type:"Fabric",radius:e},function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("id",e),i.setAttribute("class",_t);var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("class",Kt);var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("class",Zt),t.insertBefore(i,t.firstChild),i.appendChild(o),i.appendChild(n)}(t,i),function(t,e){var i=t,o=t,n=2*t,s=e.querySelector(".e-spin-fabric"),r=s.querySelector(".e-path-circle"),l=s.querySelector(".e-path-arc"),a=n/2+"px";r.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(" ")}(i,o,t)),l.setAttribute("d",function(t,e,i,o,n){var s=z(t,e,i,n),r=z(t,e,i,o);return["M",s.x,s.y,"A",i,i,0,0,0,r.x,r.y].join(" ")}(i,o,t,315,45)),s.setAttribute("viewBox","0 0 "+n+" "+n),s.style.transformOrigin=a+" "+a+" "+a,s.style.width=s.style.height=n+"px"}(e,t)}function Y(t,i,o){var n=i.querySelector("."+Wt),s=n.querySelector("svg");switch(e.isNullOrUndefined(s)||n.removeChild(s),t){case"Material":U(n,o);break;case"Fabric":j(n,o);break;case"Bootstrap":!function(t,e){var i=D();Bt[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",zt),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",Kt+"_"+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=z(0,0,24,o),r=i.querySelector("."+Kt+"_"+n);r.setAttribute("cx",s.x+""),r.setAttribute("cy",s.y+""),o=o>=360?0:o,o+=45}}(t,e)}(n,o)}}function X(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 D(){for(var t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<5;i++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}function R(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",F(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?Bt[i.uniqueID].timeOut=setTimeout(a.bind(null,i),1):R(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 F(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 z(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 V(t){W(t,!1)}function W(t,i){var o=t.classList.contains(Vt)?t:t.querySelector("."+Vt),n=o.querySelector("."+Wt);if(i?!o.classList.contains(Jt)&&!o.classList.contains(qt):!o.classList.contains(Jt)&&!o.classList.contains(Rt)){var s=o.querySelector("svg");if(e.isNullOrUndefined(s))return;var r=s.getAttribute("id");switch(Bt[r].isAnimate=!i,Bt[r].type){case"Material":i?clearTimeout(Bt[r].timeOut):function(t,e,i){var o={};Bt[e].timeOut=0,o[e]=function(t,e,i,o){return{radius:e,count:i,previousId:o}}(0,i,0,0),R({uniqueID:e,container:t,globalInfo:o,timeOutVar:0})}(n,r,Bt[r].radius);break;case"Bootstrap":i?clearTimeout(Bt[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){Bt[n].isAnimate&&(++r,t.setAttribute("r",e+""),r>=o.length&&(r=0),Bt[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,X(i,i),e)}(n)}}i?e.classList(o,[qt],[Rt]):e.classList(o,[Rt],[qt])}function K(t){W(t,!0)}var Z,G,J,Q,$,tt=!1,et=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)}}(),it=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},ot="e-popup",nt="e-rtl",st="e-popup-open",rt="e-popup-close",lt=function(t){function i(e,i){var o=t.call(this,i,e)||this;return o.fixedParent=!1,o}return et(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(ot,nt),this.unwireEvents(),t.prototype.destroy.call(this)},i.prototype.render=function(){this.element.classList.add(ot);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(){return"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(nt):this.element.classList.remove(nt)},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();g(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!==m(this.element,this.viewPortElement).length){var e=y(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;t=e.isNullOrUndefined(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||(e.removeClass([this.element],rt),e.addClass([this.element],st),this.checkCollision(),e.removeClass([this.element],st),e.addClass([this.element],rt)),e.isNullOrUndefined(t)?(e.removeClass([this.element],rt),e.addClass([this.element],st),this.trigger("open")):(t.begin=function(){i.isDestroyed||(e.removeClass([i.element],rt),e.addClass([i.element],st))},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],st),e.addClass([this.element],rt),this.trigger("close")):(t.end=function(){i.isDestroyed||(e.removeClass([i.element],st),e.addClass([i.element],rt),i.trigger("close"))},new e.Animation(t).animate(this.element))},i.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),B(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)}},it([e.Property("auto")],i.prototype,"height",void 0),it([e.Property("auto")],i.prototype,"width",void 0),it([e.Property(null)],i.prototype,"content",void 0),it([e.Property("container")],i.prototype,"targetType",void 0),it([e.Property(null)],i.prototype,"viewPortElement",void 0),it([e.Property({X:"none",Y:"none"})],i.prototype,"collision",void 0),it([e.Property(document.body)],i.prototype,"relateTo",void 0),it([e.Property({X:"left",Y:"top"})],i.prototype,"position",void 0),it([e.Property(0)],i.prototype,"offsetX",void 0),it([e.Property(0)],i.prototype,"offsetY",void 0),it([e.Property(1e3)],i.prototype,"zIndex",void 0),it([e.Property(!1)],i.prototype,"enableRtl",void 0),it([e.Property("reposition")],i.prototype,"actionOnScroll",void 0),it([e.Property(null)],i.prototype,"showAnimation",void 0),it([e.Property(null)],i.prototype,"hideAnimation",void 0),it([e.Event()],i.prototype,"open",void 0),it([e.Event()],i.prototype,"close",void 0),it([e.Event()],i.prototype,"targetExitViewport",void 0),i=it([e.NotifyPropertyChanges],i)}(e.Component),at=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)}}(),ht=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},pt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return at(i,t),ht([e.Property()],i.prototype,"buttonModel",void 0),ht([e.Property()],i.prototype,"click",void 0),i}(e.ChildProperty),dt="e-dialog",ct="e-dlg-header-content",ut="e-dlg-header",ft="e-footer-content",yt="e-dlg-modal",mt="e-icon-dlg-close",gt="e-scroll-disabled",vt="e-dlg-fullscreen",bt="e-dlg-closeicon-btn",Et=function(t){function o(e,i){return t.call(this,e,i)||this}return at(o,t),o.prototype.render=function(){this.initialize(),this.initRender(),this.wireEvents()},o.prototype.preRender=function(){var t=this;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),this.headerContent=null},o.prototype.keyDown=function(t){var i=this;9===t.keyCode&&this.isModal&&(e.isNullOrUndefined(this.btnObj)||document.activeElement!==this.btnObj.element||t.shiftKey||(t.preventDefault(),this.focusableElements(this.element).focus()),document.activeElement===this.focusableElements(this.element)&&t.shiftKey&&(t.preventDefault(),e.isNullOrUndefined(this.btnObj)||this.btnObj.element.focus()));var o=document.activeElement,n=["input","textarea"].indexOf(o.tagName.toLowerCase())>-1,s=!1;if(n||(s=o.hasAttribute("contenteditable")&&"true"===o.getAttribute("contenteditable")),27===t.keyCode&&this.closeOnEscape&&(this.hide(),this.closedFrom=t),13===t.keyCode&&!t.ctrlKey&&"textarea"!==o.tagName.toLowerCase()&&n&&!e.isNullOrUndefined(this.primaryButtonEle)||13===t.keyCode&&t.ctrlKey&&("textarea"===o.tagName.toLowerCase()||s)&&!e.isNullOrUndefined(this.primaryButtonEle)){var r;this.buttons.some(function(t,i){r=i;var o=t.buttonModel;return!e.isNullOrUndefined(o)&&!0===o.isPrimary})&&"function"==typeof this.buttons[r].click&&setTimeout(function(){i.buttons[r].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],dt),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"}),e.isNullOrUndefined(this.zIndex)&&this.getZindexPartial(),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 lt(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.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},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.getZindexPartial=function(){for(var t=this.element.parentElement,e=[];t&&"BODY"!==t.tagName;){var i=document.defaultView.getComputedStyle(t,null).getPropertyValue("z-index"),o=document.defaultView.getComputedStyle(t,null).getPropertyValue("position");"auto"!==i&&"static"!==o&&e.push(i),t=t.parentElement}for(var n=[],s=0;s<document.body.children.length;s++)if(!this.element.isEqualNode(document.body.children[s])){i=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("z-index"),o=document.defaultView.getComputedStyle(document.body.children[s],null).getPropertyValue("position");"auto"!==i&&"static"!==o&&n.push(i)}n.push("999");var r=e.concat(n);this.zIndex=Math.max.apply(Math,r)+1},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=[];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=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.appendTo(this.ftrTemplateContent.children[t]),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,"");(this.element.children.length>0||t)&&(this.setProperties({content:this.element.innerHTML},!0),this.element.innerHTML="")},o.prototype.setHeader=function(){this.headerEle=e.createElement("div",{id:this.element.id+"_title",className:ut,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:ft,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:ct}))},o.prototype.renderCloseIcon=function(){this.closeIcon=e.createElement("button",{className:bt,attrs:{type:"button"}}),this.closeIconBtnObj=new i.Button({cssClass:"e-flat",iconCss:mt+" 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],yt),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("."+bt),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(ut).length>0?this.element.getElementsByClassName(ut)[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName(ft).length>0?this.ftrTemplateContent.innerHTML=this.footerTemplate:this.setFooterTemplate();break;case"showCloseIcon":this.element.getElementsByClassName(mt).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],yt),e.removeClass([document.body],gt),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;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=this.position;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(dt)){this.unWireEvents(),t.prototype.destroy.call(this);var i=[dt,"e-rtl",yt];e.removeClass([this.element,this.element],i),this.popupObj.element.classList.contains("e-popup")&&this.popupObj.destroy(),e.isNullOrUndefined(this.btnObj)||this.btnObj.destroy(),this.isModal&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.element.innerHTML=""}},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),this.storeActiveElement=document.activeElement,this.element.tabIndex=-1,this.trigger("beforeOpen"),this.isModal&&!e.isNullOrUndefined(this.dlgOverlay)&&(this.dlgOverlay.style.display="block",this.dlgContainer.style.display="flex",e.isNullOrUndefined(this.targetEle)?e.addClass([document.body],gt):(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],gt)));var i={name:this.animationSettings.effect+"In",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.show():this.popupObj.show(i),this.dialogOpen=!0,this.visible=!0}},o.prototype.hide=function(){this.trigger("beforeClose"),this.isModal&&(this.dlgOverlay.style.display="none",e.isNullOrUndefined(this.targetEle)?e.removeClass([document.body],gt):e.removeClass([this.targetEle],gt));var t={name:this.animationSettings.effect+"Out",duration:this.animationSettings.duration,delay:this.animationSettings.delay};"None"===this.animationSettings.effect?this.popupObj.hide():this.popupObj.hide(t),this.dialogOpen=!1,this.visible=!1},o.prototype.fullScreen=function(t){this.element.offsetTop,this.element.offsetLeft;if(t){e.addClass([this.element],vt);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],gt),this.allowDragging&&!e.isNullOrUndefined(this.dragObj)&&this.dragObj.destroy()}else e.removeClass([this.element],vt),e.removeClass([document.body],gt),!this.allowDragging||this.isModal||e.isNullOrUndefined(this.headerContent)||this.setAllowDragging();return t},ht([e.Property("")],o.prototype,"content",void 0),ht([e.Property(!1)],o.prototype,"showCloseIcon",void 0),ht([e.Property(!1)],o.prototype,"isModal",void 0),ht([e.Property("")],o.prototype,"header",void 0),ht([e.Property(!0)],o.prototype,"visible",void 0),ht([e.Property("auto")],o.prototype,"height",void 0),ht([e.Property("100%")],o.prototype,"width",void 0),ht([e.Property("")],o.prototype,"cssClass",void 0),ht([e.Property()],o.prototype,"zIndex",void 0),ht([e.Property(null)],o.prototype,"target",void 0),ht([e.Property("")],o.prototype,"footerTemplate",void 0),ht([e.Property(!1)],o.prototype,"allowDragging",void 0),ht([e.Collection([{}],pt)],o.prototype,"buttons",void 0),ht([e.Property(!0)],o.prototype,"closeOnEscape",void 0),ht([e.Property({effect:"Fade",duration:400,delay:0})],o.prototype,"animationSettings",void 0),ht([e.Property({X:"center",Y:"center"})],o.prototype,"position",void 0),ht([e.Event()],o.prototype,"created",void 0),ht([e.Event()],o.prototype,"open",void 0),ht([e.Event()],o.prototype,"beforeOpen",void 0),ht([e.Event()],o.prototype,"close",void 0),ht([e.Event()],o.prototype,"beforeClose",void 0),ht([e.Event()],o.prototype,"dragStart",void 0),ht([e.Event()],o.prototype,"dragStop",void 0),ht([e.Event()],o.prototype,"drag",void 0),ht([e.Event()],o.prototype,"overlayClick",void 0),o=ht([e.NotifyPropertyChanges],o)}(e.Component),Ct=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)}}(),wt=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},Ot="e-tooltip",Pt="e-tip-content",Tt="e-arrow-tip",St="e-arrow-tip-outer",kt="e-arrow-tip-inner",Nt="e-tip-bottom",xt="e-tip-top",At="e-tip-right",Ht="e-popup-open",It="e-popup-close",Mt=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return Ct(i,t),wt([e.Property({effect:"FadeIn",duration:150,delay:0})],i.prototype,"open",void 0),wt([e.Property({effect:"FadeOut",duration:150,delay:0})],i.prototype,"close",void 0),i}(e.ChildProperty),Lt=function(t){function i(e,i){return t.call(this,e,i)||this}return Ct(i,t),i.prototype.initialize=function(){this.formatPosition(),e.addClass([this.element],Ot)},i.prototype.formatPosition=function(){0===this.position.indexOf("top")||0===this.position.indexOf("bottom")?(t=this.position.split(" "),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(" "),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:Tt+" "+this.tipClass});t.appendChild(e.createElement("div",{className:St+" "+this.tipClass})),t.appendChild(e.createElement("div",{className:kt+" "+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=xt:0===t.indexOf("left")?this.tipClass=At:this.tipClass=Nt},i.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.popupObj=new lt(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("."+Tt),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"right top":e.left+=s+l,e.top-=o-a;break;case"right center":e.left+=s+l,e.top-=o/2;break;case"right bottom":e.left+=s+l,e.top-=a;break;case"bottom right":e.top+=r+l,e.left-=h;break;case"bottom center":e.top+=r+l,e.left-=i/2;break;case"bottom left":e.top+=r+l,e.left-=i-h;break;case"left bottom":e.left-=s+i+l,e.top-=a;break;case"left center":e.left-=s+i+l,e.top-=o/2;break;case"left top":e.left-=s+i+l,e.top-=o-a;break;case"top left":e.top-=o+r+l,e.left-=i-h;break;case"top right":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("."+Tt+",."+St+",."+kt),o=[Nt,xt,"e-tip-left",At];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("."+Tt),h=a.offsetWidth,p=a.offsetHeight;if(this.tipClass===Nt||this.tipClass===xt){s=this.tipClass===Nt?"100%":-p+"px";n=(d="center"!==i||r>t.offsetWidth||this.mouseTrail)&&"left"===i||!d&&"end"===this.tipPointerPosition?r-h-2+"px":d&&"right"===i||!d&&"start"===this.tipPointerPosition?"2px":r/2-h/2+"px"}else{n=this.tipClass===At?r+"px":-h+"px";var d;s=(d="center"!==o||l>t.offsetHeight||this.mouseTrail)&&"top"===o||!d&&"end"===this.tipPointerPosition?l-p-2+"px":d&&"bottom"===o||!d&&"start"===this.tipPointerPosition?"2px":l/2-p/2+"px"}a.style.top=s,a.style.left=n}},i.prototype.renderContent=function(t){var i=this.tooltipEle.querySelector("."+Pt);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),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:Pt})),document.body.appendChild(this.tooltipEle),this.addDescribedBy(t,this.ctrlId+"_content"),this.renderContent(t),e.addClass([this.tooltipEle],Ht),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],Ht),e.addClass([this.tooltipEle],It),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=m(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="left top"===s||"left center"===s?"top":"bottom",s=o.vertical+" left"),0===s.indexOf("right")&&(o.vertical="right top"===s||"right center"===s?"top":"bottom",s=o.vertical+" right"),o.horizontal=this.tooltipPositionX),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=y(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("."+Tt),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],It),e.addClass([this.tooltipEle],Ht)),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],It),e.addClass([this.tooltipEle],Ht),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,"."+Ot)&&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=Nt,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.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",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",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]");this.tooltipEle&&s&&this.reposition(s);break;case"tipPointerPosition":var r=document.querySelector("[data-tooltip-id= "+this.ctrlId+"_content]");this.tooltipEle&&r&&this.reposition(r);break;case"offsetX":if(this.tooltipEle){var l=t.offsetX-i.offsetX;this.tooltipEle.style.left=(parseInt(this.tooltipEle.style.left,10)+l).toString()+"px"}break;case"offsetY":if(this.tooltipEle){var a=t.offsetY-i.offsetY;this.tooltipEle.style.top=(parseInt(this.tooltipEle.style.top,10)+a).toString()+"px"}break;case"cssClass":this.tooltipEle&&(i.cssClass&&e.removeClass([this.tooltipEle],i.cssClass),t.cssClass&&e.addClass([this.tooltipEle],t.cssClass));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],Ot),this.unwireEvents(this.opensOn),this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&e.remove(this.tooltipEle),this.tooltipEle=null,this.popupObj=null},wt([e.Property("auto")],i.prototype,"width",void 0),wt([e.Property("auto")],i.prototype,"height",void 0),wt([e.Property()],i.prototype,"content",void 0),wt([e.Property()],i.prototype,"target",void 0),wt([e.Property("top center")],i.prototype,"position",void 0),wt([e.Property(0)],i.prototype,"offsetX",void 0),wt([e.Property(0)],i.prototype,"offsetY",void 0),wt([e.Property(!0)],i.prototype,"showTipPointer",void 0),wt([e.Property("auto")],i.prototype,"tipPointerPosition",void 0),wt([e.Property("auto")],i.prototype,"opensOn",void 0),wt([e.Property(!1)],i.prototype,"mouseTrail",void 0),wt([e.Property(!1)],i.prototype,"isSticky",void 0),wt([e.Complex({},Mt)],i.prototype,"animation",void 0),wt([e.Property(0)],i.prototype,"openDelay",void 0),wt([e.Property(0)],i.prototype,"closeDelay",void 0),wt([e.Property()],i.prototype,"cssClass",void 0),wt([e.Property(!1)],i.prototype,"enableRtl",void 0),wt([e.Event()],i.prototype,"beforeRender",void 0),wt([e.Event()],i.prototype,"beforeOpen",void 0),wt([e.Event()],i.prototype,"afterOpen",void 0),wt([e.Event()],i.prototype,"beforeClose",void 0),wt([e.Event()],i.prototype,"afterClose",void 0),wt([e.Event()],i.prototype,"created",void 0),wt([e.Event()],i.prototype,"destroyed",void 0),i=wt([e.NotifyPropertyChanges],i)}(e.Component),Bt={},Ut=null,jt=null,Yt=30,Xt=30,Dt=30,Rt="e-spin-show",qt="e-spin-hide",Ft="e-spin-material",_t="e-spin-fabric",zt="e-spin-bootstrap",Vt="e-spinner-pane",Wt="e-spinner-inner",Kt="e-path-circle",Zt="e-path-arc",Gt="e-spin-label",Jt="e-spin-template";t.Popup=lt,t.getScrollableParent=B,t.calculateRelativeBasedPosition=o,t.calculatePosition=n,t.fit=y,t.isCollide=m,t.flip=g,t.ButtonProps=pt,t.Dialog=Et,t.Animation=Mt,t.Tooltip=Lt,t.createSpinner=function(t){var i,o=function(t){var e=document.createElement("div");e.classList.add(Vt);var i=document.createElement("div");return i.classList.add(Wt),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(Ut)){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?Yt:"Fabric"===e?Xt:Dt;return t=t?parseFloat(t+""):i,"Bootstrap"===e?t:t/2}(e.isNullOrUndefined(t.width)?void 0:t.width,n),Y(n,o.wrap,i),e.isNullOrUndefined(t.label)||function(t,e){var i=document.createElement("div");i.classList.add(Gt),i.textContent=e,t.appendChild(i)}(o.inner_wrap,t.label)}else{var s=e.isNullOrUndefined(t.template)?Ut:t.template;o.wrap.classList.add(Jt),function(t,i,o){e.isNullOrUndefined(o)||t.classList.add(o),t.querySelector(".e-spinner-inner").innerHTML=i}(o.wrap,s,jt)}o.wrap.classList.add(qt)},t.showSpinner=V,t.hideSpinner=K,t.setSpinner=function(t){void 0!==t.template&&(Ut=t.template,void 0!==t.template&&(jt=t.cssClass));for(var i=document.querySelectorAll("."+Vt),o=0;o<i.length;o++)!function(t,i,o,n){e.isNullOrUndefined(t)&&!i.classList.contains(Jt)?(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(Bt[r].timeOut)}Y(i,t,s)}(i,o,n),i.classList.contains(Rt)?(i.classList.remove(Rt),V(i)):(i.classList.remove(qt),K(i))):(Ut=t,e.isNullOrUndefined(n)||(jt=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 y(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():I(),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,y=o.top+s.height-u;s.height>d?o.top=f>0&&y<=0?u-s.height:y>0&&f<=0?c:f>y?u-s.height:c:f>0?o.top+=f:y>0&&(o.top-=y)}return o}function m(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 g(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),v(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 v(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-B()<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-B()<=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),v(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),v(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?B()+T()+O():B()+I()}function A(){return et?H()+S()+P():H()+L()}function H(){return tt.documentElement.scrollTop||tt.body.scrollTop}function B(){return tt.documentElement.scrollLeft||tt.body.scrollLeft}function L(){return window.innerHeight}function I(){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",_(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,Kt),V(e,t,Kt)}(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",Zt),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",_(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,z,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 _(t,e,i,o){return(t-e)*Math.PI*(3*o/100-i/100)}function z(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 K(t){Z(t,!1)}function Z(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(zt)){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],[zt]):e.classList(o,[zt],[Vt])}function G(t){Z(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();g(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!==m(this.element,this.viewPortElement).length){var e=y(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),yt="e-dialog",mt="e-dlg-header-content",gt="e-dlg-header",vt="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,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],yt),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.visible?this.show():this.isModal&&(this.dlgOverlay.style.display="none")},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:gt,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:vt,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:mt}))},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(gt).length>0?this.element.getElementsByClassName(gt)[0].innerHTML=this.header:this.setHeader();break;case"footerTemplate":this.element.getElementsByClassName(vt).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;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=this.position;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(yt)){this.unWireEvents(),t.prototype.destroy.call(this);var i=[yt,"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();this.isModal&&(e.detach(this.dlgOverlay),this.dlgContainer.parentNode.insertBefore(this.element,this.dlgContainer),e.detach(this.dlgContainer)),this.element.innerHTML=""}},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",Bt="e-tip-bottom",Lt="e-tip-top",It="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=It:this.tipClass=Bt},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=[Bt,Lt,"e-tip-left",It];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===Bt||this.tipClass===Lt){this.tipClass===Bt?(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===It?(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=m(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=y(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=Bt,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,_t=30,zt="e-spin-show",Vt="e-spin-hide",Wt="e-spin-material",Kt="e-spin-fabric",Zt="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=y,t.isCollide=m,t.flip=g,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:_t;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=K,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(zt)?(i.classList.remove(zt),K(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 : 15.4.23
* version : 15.4.27
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

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

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

"dependencies": {
"@syncfusion/ej2-base": "^15.4.23",
"@syncfusion/ej2-buttons": "^15.4.27"
"@syncfusion/ej2-base": "^16.1.24",
"@syncfusion/ej2-buttons": "^16.1.24"
},

@@ -15,0 +15,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

define(["require", "exports"], function (require, exports) {
define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {
"use strict";

@@ -9,2 +9,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

function calculateRelativeBasedPosition(anchor, element) {
var fixedElement = false;
var anchorPos = { left: 0, top: 0 };

@@ -15,3 +16,6 @@ var tempAnchor = anchor;

}
while (element.offsetParent && anchor && element.offsetParent !== anchor) {
if (ej2_base_1.isNullOrUndefined(element.offsetParent) && element.style.position === 'fixed') {
fixedElement = true;
}
while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {
anchorPos.left += anchor.offsetLeft;

@@ -22,3 +26,3 @@ anchorPos.top += anchor.offsetTop;

anchor = tempAnchor;
while (element.offsetParent && anchor && element.offsetParent !== anchor) {
while ((element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor) {
anchorPos.left -= anchor.scrollLeft;

@@ -25,0 +29,0 @@ anchorPos.top -= anchor.scrollTop;

@@ -1,3 +0,3 @@

import { Component, Property, Event, Collection, L10n, Browser, EmitType } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { EventHandler } from '@syncfusion/ej2-base';import { Draggable } from '@syncfusion/ej2-base';import { Popup, PositionData } from '../popup/popup';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';
import {AnimationSettings} from "./dialog";
import { Component, Property, Event, Collection, L10n, Browser, EmitType, Complex } from '@syncfusion/ej2-base';import { createElement, addClass, removeClass, detach, attributes, prepend, setStyleAttribute } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { EventHandler } from '@syncfusion/ej2-base';import { Draggable } from '@syncfusion/ej2-base';import { Popup, PositionData, getZindexPartial } from '../popup/popup';import { PositionDataModel } from '../popup/popup-model';import { Button, ButtonModel } from '@syncfusion/ej2-buttons';
import {DialogEffect,BeforeOpenEventArgs,BeforeCloseEventArgs} from "./dialog";
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -24,2 +24,42 @@

/**
* Interface for a class AnimationSettings
*/
export interface AnimationSettingsModel {
/**
* Specifies the effect to open and close the Dialog.
* If the user sets `Fade` effect then the Dialog will open with 'FadeIn' effect and close with 'FadeOut' effect.
* Following list of effects will be available, you can use any of this.
* 1. 'Fade'
* 2. 'FadeZoom'
* 3. 'FlipLeftDown'
* 4. 'FlipLeftUp'
* 5. 'FlipRightDown'
* 6. 'FlipRightUp'
* 7. 'FlipXDown'
* 8. 'FlipXUp'
* 9. 'FlipYLeft'
* 10. 'FlipYRight'
* 11. 'SlideBottom'
* 12. 'SlideLeft'
* 13. 'SlideRight'
* 14. 'SlideTop'
* 15. 'Zoom'
* 16. 'None'
*/
effect?: DialogEffect;
/**
* Specifies the animation `duration` to complete with one animation cycle.
*/
duration?: number;
/**
* Specifies the `delay` value in milliseconds to wait before animation begins.
*/
delay?: number;
}
/**
* Interface for a class Dialog

@@ -118,3 +158,3 @@ */

*/
animationSettings?: AnimationSettings;
animationSettings?: AnimationSettingsModel;

@@ -124,3 +164,3 @@ /**

* respect to the associated target elements.
* For ex: {X:'left', Y:'top'} or { X: 100, Y: 100 }
* For ex: {X:'left', Y:'top'} or { X: 100, Y: 100 }.
* Following list of positions are available.

@@ -131,3 +171,3 @@ * * for X is: left, center, right (or) any offset value

*/
position?: PositionData;
position?: PositionDataModel;

@@ -150,3 +190,3 @@ /**

*/
beforeOpen?: EmitType<Object>;
beforeOpen?: EmitType<BeforeOpenEventArgs>;

@@ -163,3 +203,3 @@ /**

*/
beforeClose?: EmitType<Object>;
beforeClose?: EmitType<BeforeCloseEventArgs>;

@@ -166,0 +206,0 @@ /**

import { Component, EmitType } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, ChildProperty } from '@syncfusion/ej2-base';
import { ButtonPropsModel, DialogModel } from './dialog-model';
import { PositionData } from '../popup/popup';
import { ButtonPropsModel, DialogModel, AnimationSettingsModel } from './dialog-model';
import { PositionDataModel } from '../popup/popup-model';
import { ButtonModel } from '@syncfusion/ej2-buttons';

@@ -20,3 +20,3 @@ export declare class ButtonProps extends ChildProperty<ButtonProps> {

*/
export interface AnimationSettings {
export declare class AnimationSettings extends ChildProperty<AnimationSettings> {
/**

@@ -43,11 +43,11 @@ * Specifies the effect to open and close the Dialog.

*/
effect?: DialogEffect;
effect: DialogEffect;
/**
* Specifies the animation `duration` to complete with one animation cycle.
*/
duration?: number;
duration: number;
/**
* Specifies the `delay` value in milliseconds to wait before animation begins.
*/
delay?: number;
delay: number;
}

@@ -58,2 +58,10 @@ /**

export declare type DialogEffect = 'Fade' | 'FadeZoom' | 'FlipLeftDown' | 'FlipLeftUp' | 'FlipRightDown' | 'FlipRightUp' | 'FlipXDown' | 'FlipXUp' | 'FlipYLeft' | 'FlipYRight' | 'SlideBottom' | 'SlideLeft' | 'SlideRight' | 'SlideTop' | 'Zoom' | 'None';
export interface BeforeOpenEventArgs {
cancel: boolean;
container: HTMLElement;
}
export interface BeforeCloseEventArgs {
cancel: boolean;
container: HTMLElement;
}
/**

@@ -170,7 +178,7 @@ * Represents the Dialog component that displays information to the user, and used to get the user input.

*/
animationSettings: AnimationSettings;
animationSettings: AnimationSettingsModel;
/**
* Specifies to `position` the Dialog on built-in 9 places or any custom location with
* respect to the associated target elements.
* For ex: {X:'left', Y:'top'} or { X: 100, Y: 100 }
* For ex: {X:'left', Y:'top'} or { X: 100, Y: 100 }.
* Following list of positions are available.

@@ -181,3 +189,3 @@ * * for X is: left, center, right (or) any offset value

*/
position: PositionData;
position: PositionDataModel;
/**

@@ -197,3 +205,3 @@ * Event triggers when the Dialog is `created`.

*/
beforeOpen: EmitType<Object>;
beforeOpen: EmitType<BeforeOpenEventArgs>;
/**

@@ -208,3 +216,3 @@ * Event triggers once the Dialog is closed.

*/
beforeClose: EmitType<Object>;
beforeClose: EmitType<BeforeCloseEventArgs>;
/**

@@ -257,3 +265,2 @@ * Event triggers when user starts to drag the Dialog.

private positionChange();
private getZindexPartial();
private setAllowDragging();

@@ -260,0 +267,0 @@ private setButton();

@@ -34,2 +34,19 @@ var __extends = (this && this.__extends) || (function () {

exports.ButtonProps = ButtonProps;
var AnimationSettings = (function (_super) {
__extends(AnimationSettings, _super);
function AnimationSettings() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
ej2_base_1.Property('Fade')
], AnimationSettings.prototype, "effect", void 0);
__decorate([
ej2_base_1.Property(400)
], AnimationSettings.prototype, "duration", void 0);
__decorate([
ej2_base_1.Property(0)
], AnimationSettings.prototype, "delay", void 0);
return AnimationSettings;
}(ej2_base_3.ChildProperty));
exports.AnimationSettings = AnimationSettings;
var ROOT = 'e-dialog';

@@ -66,2 +83,3 @@ var RTL = 'e-rtl';

var _this = this;
this.headerContent = null;
this.closeIconClickEventHandler = function (event) {

@@ -74,5 +92,4 @@ _this.hide();

};
var localeText = { close: 'close' };
var localeText = { close: 'Close' };
this.l10n = new ej2_base_1.L10n('dialog', localeText, this.locale);
this.headerContent = null;
};

@@ -84,3 +101,7 @@ ;

if (this.isModal) {
if (!ej2_base_4.isNullOrUndefined(this.btnObj) && document.activeElement === this.btnObj.element && !event.shiftKey) {
var buttonObj = void 0;
if (!ej2_base_4.isNullOrUndefined(this.btnObj)) {
buttonObj = this.btnObj[this.btnObj.length - 1];
}
if (!ej2_base_4.isNullOrUndefined(buttonObj) && document.activeElement === buttonObj.element && !event.shiftKey) {
event.preventDefault();

@@ -91,4 +112,4 @@ this.focusableElements(this.element).focus();

event.preventDefault();
if (!ej2_base_4.isNullOrUndefined(this.btnObj)) {
this.btnObj.element.focus();
if (!ej2_base_4.isNullOrUndefined(buttonObj)) {
buttonObj.element.focus();
}

@@ -140,4 +161,4 @@ }

ej2_base_2.attributes(this.element, { role: 'dialog' });
if (ej2_base_4.isNullOrUndefined(this.zIndex)) {
this.getZindexPartial();
if (this.zIndex === 1000) {
this.zIndex = popup_1.getZindexPartial(this.element);
}

@@ -219,33 +240,2 @@ this.setTargetContent();

};
Dialog.prototype.getZindexPartial = function () {
var dialogParent = this.element.parentElement;
var parentZindex = [];
while (dialogParent) {
if (dialogParent.tagName !== 'BODY') {
var index = document.defaultView.getComputedStyle(dialogParent, null).getPropertyValue('z-index');
var position = document.defaultView.getComputedStyle(dialogParent, null).getPropertyValue('position');
if (index !== 'auto' && position !== 'static') {
parentZindex.push(index);
}
dialogParent = dialogParent.parentElement;
}
else {
break;
}
}
var childrenZindex = [];
for (var i = 0; i < document.body.children.length; i++) {
if (!this.element.isEqualNode(document.body.children[i])) {
var index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('z-index');
var position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('position');
if (index !== 'auto' && position !== 'static') {
childrenZindex.push(index);
}
}
}
childrenZindex.push('999');
var finalValue = parentZindex.concat(childrenZindex);
this.zIndex = Math.max.apply(Math, finalValue) + 1;
};
;
Dialog.prototype.setAllowDragging = function () {

@@ -273,2 +263,3 @@ var _this = this;

this.buttonContent = [];
this.btnObj = [];
var primaryBtnFlag = true;

@@ -281,7 +272,10 @@ for (var i = 0; i < this.buttons.length; i++) {

for (var i = 0; i < this.buttons.length; i++) {
this.btnObj = new ej2_buttons_1.Button(this.buttons[i].buttonModel);
this.btnObj[i] = new ej2_buttons_1.Button(this.buttons[i].buttonModel);
if (typeof (this.buttons[i].click) === 'function') {
ej2_base_5.EventHandler.add(this.ftrTemplateContent.children[i], 'click', this.buttons[i].click, this);
}
this.btnObj.appendTo(this.ftrTemplateContent.children[i]);
this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]);
if (!this.btnObj[i].isPrimary) {
this.btnObj[i].element.classList.add('e-flat');
}
this.primaryButtonEle = this.element.getElementsByClassName('e-primary')[0];

@@ -313,4 +307,7 @@ }

if (this.element.children.length > 0 || isContent) {
this.setProperties({ content: this.element.innerHTML }, true);
this.element.innerHTML = '';
var contentDiv = document.createDocumentFragment();
while (this.element.childNodes.length !== 0) {
contentDiv.appendChild(this.element.childNodes[0]);
}
this.setProperties({ content: contentDiv }, true);
}

@@ -580,3 +577,5 @@ };

if (!ej2_base_4.isNullOrUndefined(this.btnObj)) {
this.btnObj.destroy();
for (var i = void 0; i < this.btnObj.length; i++) {
this.btnObj[i].destroy();
}
}

@@ -622,5 +621,12 @@ if (this.isModal) {

}
var eventArgs = {
cancel: false,
container: this.isModal ? this.dlgContainer : this.element
};
this.trigger('beforeOpen', eventArgs);
if (eventArgs.cancel) {
return;
}
this.storeActiveElement = document.activeElement;
this.element.tabIndex = -1;
this.trigger('beforeOpen');
if (this.isModal && (!ej2_base_4.isNullOrUndefined(this.dlgOverlay))) {

@@ -655,3 +661,10 @@ this.dlgOverlay.style.display = 'block';

Dialog.prototype.hide = function () {
this.trigger('beforeClose');
var eventArgs = {
cancel: false,
container: this.isModal ? this.dlgContainer : this.element
};
this.trigger('beforeClose', eventArgs);
if (eventArgs.cancel) {
return;
}
if (this.isModal) {

@@ -720,3 +733,3 @@ this.dlgOverlay.style.display = 'none';

__decorate([
ej2_base_1.Property()
ej2_base_1.Property(1000)
], Dialog.prototype, "zIndex", void 0);

@@ -739,6 +752,6 @@ __decorate([

__decorate([
ej2_base_1.Property({ effect: 'Fade', duration: 400, delay: 0 })
ej2_base_1.Complex({}, AnimationSettings)
], Dialog.prototype, "animationSettings", void 0);
__decorate([
ej2_base_1.Property({ X: 'center', Y: 'center' })
ej2_base_1.Complex({ X: 'center', Y: 'center' }, popup_1.PositionData)
], Dialog.prototype, "position", void 0);

@@ -745,0 +758,0 @@ __decorate([

@@ -1,6 +0,23 @@

import { setStyleAttribute, addClass, removeClass } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { Browser } from '@syncfusion/ej2-base';import { calculatePosition, OffsetPosition, calculateRelativeBasedPosition } from '../common/position';import { Animation, AnimationModel, Property, Event, EmitType, Component } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { EventHandler } from '@syncfusion/ej2-base';import { flip, fit, isCollide , CollisionCoordinates } from '../common/collision';
import {TargetType,CollisionAxis,PositionData,ActionOnScrollType} from "./popup";
import { setStyleAttribute, addClass, removeClass, ChildProperty, Complex } from '@syncfusion/ej2-base';import { isNullOrUndefined, formatUnit } from '@syncfusion/ej2-base';import { Browser } from '@syncfusion/ej2-base';import { calculatePosition, OffsetPosition, calculateRelativeBasedPosition } from '../common/position';import { Animation, AnimationModel, Property, Event, EmitType, Component } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { EventHandler } from '@syncfusion/ej2-base';import { flip, fit, isCollide , CollisionCoordinates } from '../common/collision';
import {TargetType,CollisionAxis,ActionOnScrollType} from "./popup";
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class PositionData
*/
export interface PositionDataModel {
/**
* specify the offset left value
*/
X?: string | number;
/**
* specify the offset top value.
*/
Y?: string | number;
}
/**
* Interface for a class Popup

@@ -57,3 +74,3 @@ */

*/
position?: PositionData;
position?: PositionDataModel;

@@ -60,0 +77,0 @@ /**

@@ -0,18 +1,17 @@

import { ChildProperty } from '@syncfusion/ej2-base';
import { AnimationModel, EmitType, Component } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
import { PopupModel } from './popup-model';
import { PopupModel, PositionDataModel } from './popup-model';
/**
* Specifies the offset position values.
*/
export interface PositionData {
export declare class PositionData extends ChildProperty<PositionData> {
/**
* specify the offset left value
* @default : "left"
*/
X?: string | number;
X: string | number;
/**
* specify the offset top value.
* @default : "top"
*/
Y?: string | number;
Y: string | number;
}

@@ -98,3 +97,3 @@ export interface CollisionAxis {

*/
position: PositionData;
position: PositionDataModel;
/**

@@ -235,1 +234,7 @@ * specifies the popup element offset-x value, respective to the relative element.

export declare function getScrollableParent(element: HTMLElement, fixedParent?: Boolean): HTMLElement[];
/**
* Gets the maximum z-index of the given element.
* @param { HTMLElement } element - Specify the element to get the maximum z-index of it.
* @private
*/
export declare function getZindexPartial(element: HTMLElement): number;

@@ -20,2 +20,16 @@ var __extends = (this && this.__extends) || (function () {

Object.defineProperty(exports, "__esModule", { value: true });
var PositionData = (function (_super) {
__extends(PositionData, _super);
function PositionData() {
return _super !== null && _super.apply(this, arguments) || this;
}
__decorate([
ej2_base_4.Property('left')
], PositionData.prototype, "X", void 0);
__decorate([
ej2_base_4.Property('top')
], PositionData.prototype, "Y", void 0);
return PositionData;
}(ej2_base_1.ChildProperty));
exports.PositionData = PositionData;
var CLASSNAMES = {

@@ -137,2 +151,4 @@ ROOT: 'e-popup',

Popup.prototype.getRelateToElement = function () {
var relateToElement = this.relateTo === '' ? document.body : this.relateTo;
this.setProperties({ relateTo: relateToElement }, true);
return ((typeof this.relateTo) === 'string') ?

@@ -361,2 +377,6 @@ document.querySelector(this.relateTo) : this.relateTo;

var _this = this;
if (this.zIndex === 1000) {
this.zIndex = getZindexPartial(this.element);
ej2_base_1.setStyleAttribute(this.element, { 'zIndex': this.zIndex });
}
animationOptions = (!ej2_base_2.isNullOrUndefined(animationOptions) && typeof animationOptions === 'object') ?

@@ -449,6 +469,6 @@ animationOptions : this.showAnimation;

__decorate([
ej2_base_4.Property(document.body)
ej2_base_4.Property('')
], Popup.prototype, "relateTo", void 0);
__decorate([
ej2_base_4.Property({ X: 'left', Y: 'top' })
ej2_base_1.Complex({}, PositionData)
], Popup.prototype, "position", void 0);

@@ -510,2 +530,33 @@ __decorate([

exports.getScrollableParent = getScrollableParent;
function getZindexPartial(element) {
var parent = element.parentElement;
var parentZindex = [];
while (parent) {
if (parent.tagName !== 'BODY') {
var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue('z-index');
var position = document.defaultView.getComputedStyle(parent, null).getPropertyValue('position');
if (index !== 'auto' && position !== 'static') {
parentZindex.push(index);
}
parent = parent.parentElement;
}
else {
break;
}
}
var childrenZindex = [];
for (var i = 0; i < document.body.children.length; i++) {
if (!element.isEqualNode(document.body.children[i])) {
var index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('z-index');
var position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue('position');
if (index !== 'auto' && position !== 'static') {
childrenZindex.push(index);
}
}
}
childrenZindex.push('999');
var finalValue = parentZindex.concat(childrenZindex);
return Math.max.apply(Math, finalValue) + 1;
}
exports.getZindexPartial = getZindexPartial;
});
/**
* Defines the type of spinner.
*/
export declare type SpinnerType = 'Material' | 'Fabric' | 'Bootstrap';
export declare type SpinnerType = 'Material' | 'Fabric' | 'Bootstrap' | 'HighContrast';
/**

@@ -6,0 +6,0 @@ * Create a spinner for the specified target element.

@@ -15,2 +15,3 @@ define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) {

var CLS_BOOTSPIN = 'e-spin-bootstrap';
var CLS_HIGHCONTRASTSPIN = 'e-spin-high-contrast';
var CLS_SPINWRAP = 'e-spinner-pane';

@@ -69,5 +70,11 @@ var CLS_SPININWRAP = 'e-spinner-inner';

globalTimeOut[uniqueID] = { timeOut: 0, type: 'Fabric', radius: radius };
create_fabric_element(container, uniqueID);
fb_calculate_attributes(radius, container);
create_fabric_element(container, uniqueID, CLS_FABRICSPIN);
fb_calculate_attributes(radius, container, CLS_FABRICSPIN);
}
function createHighContrastSpinner(container, radius) {
var uniqueID = random_generator();
globalTimeOut[uniqueID] = { timeOut: 0, type: 'HighContrast', radius: radius };
create_fabric_element(container, uniqueID, CLS_HIGHCONTRASTSPIN);
fb_calculate_attributes(radius, container, CLS_HIGHCONTRASTSPIN);
}
function getTheme(container) {

@@ -92,2 +99,6 @@ var theme = window.getComputedStyle(container, ':after').getPropertyValue('content');

createBootstrapSpinner(innerContainer, radius);
break;
case 'HighContrast':
createHighContrastSpinner(innerContainer, radius);
break;
}

@@ -217,6 +228,6 @@ }

}
function create_fabric_element(innerContainer, uniqueID) {
function create_fabric_element(innerContainer, uniqueID, themeClass) {
var svgFabric = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svgFabric.setAttribute('id', uniqueID);
svgFabric.setAttribute('class', CLS_FABRICSPIN);
svgFabric.setAttribute('class', themeClass);
var fabricCirclePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');

@@ -319,3 +330,3 @@ fabricCirclePath.setAttribute('class', CLS_SPINCIRCLE);

}
function fb_calculate_attributes(radius, innerConainer) {
function fb_calculate_attributes(radius, innerConainer, trgClass) {
var centerX = radius;

@@ -326,3 +337,3 @@ var centerY = radius;

var endArc = 45;
var svg = innerConainer.querySelector('.e-spin-fabric');
var svg = innerConainer.querySelector('.' + trgClass);
var circle = svg.querySelector('.e-path-circle');

@@ -329,0 +340,0 @@ var path = svg.querySelector('.e-path-arc');

@@ -28,4 +28,4 @@ import { Component, Property, ChildProperty, Event, BaseEventArgs } from '@syncfusion/ej2-base';import { EventHandler, EmitType, Touch, TapEventArgs, Browser, Animation as PopupAnimation } from '@syncfusion/ej2-base';import { isNullOrUndefined, getUniqueID, formatUnit } from '@syncfusion/ej2-base';import { attributes, createElement, closest, removeClass, addClass, remove } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, Complex } from '@syncfusion/ej2-base';import { Popup } from '../popup/popup';import { OffsetPosition, calculatePosition } from '../common/position';import { isCollide, fit } from '../common/collision';

/**
* Sets the `width` of the Tooltip, accepting both string and number values.
* When set to `auto`, the Tooltip width gets auto adjusted to display its content within the viewable screen.
* It is used to set the width of Tooltip component which accepts both string and number values.
* When set to auto, the Tooltip width gets auto adjusted to display its content within the viewable screen.
* @default 'auto'

@@ -36,5 +36,6 @@ */

/**
* Sets the `height` of the Tooltip, accepting both string and number values.
* When `height` is specified with a certain pixel value and if the Tooltip content overflows,
* then the scrolling mode gets enabled on the Tooltip.
* It is used to set the height of Tooltip component which accepts both string and number values.
* When Tooltip content gets overflow due to height value then the scroll mode will be enabled.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/setting-dimension.html?lang=typescript here}
* to know more about this property with demo.
* @default 'auto'

@@ -45,3 +46,5 @@ */

/**
* Displays the content value on the Tooltip, accepting both string and HTMLElement values.
* It is used to display the content of Tooltip which can be both string and HTML Elements.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/content.html?lang=typescript here}
* to know more about this property with demo.
*/

@@ -51,4 +54,4 @@ content?: string | HTMLElement;

/**
* Denotes the target selectors on which the Tooltip gets triggered.
* In this case, the initialized Tooltip element is considered the parent container.
* It is used to denote the target selector where the Tooltip need to be displayed.
* The target element is considered as parent container.
*/

@@ -58,4 +61,4 @@ target?: string;

/**
* Allows you to set the position for the Tooltip element, and provides 12 default options to position the Tooltip.
* @default 'top center'
* It is used to set the position of Tooltip element, with respect to Target element.
* @default 'TopCenter'
*/

@@ -65,3 +68,3 @@ position?: Position;

/**
* Sets the space between the target and Tooltip element in X axis.
* It sets the space between the target and Tooltip element in X axis.
* @default 0

@@ -72,3 +75,3 @@ */

/**
* Sets the space between the target and Tooltip element in Y axis.
* It sets the space between the target and Tooltip element in Y axis.
* @default 0

@@ -79,3 +82,3 @@ */

/**
* Allows you to either show or hide the tip pointer on the Tooltip.
* It is used to show or hide the tip pointer of Tooltip.
* @default true

@@ -86,6 +89,9 @@ */

/**
* Sets the position of the tip pointer on the Tooltip.
* When set to `auto`, the tip pointer auto adjusts within the space of target's length
* and does not point outside.
* @default 'auto'
* It is used to set the position of tip pointer on tooltip.
* When it sets to auto, the tip pointer auto adjusts within the space of target's length
* and does not point outside.
* Refer the documentation
* {@link http://ej2.syncfusion.com/documentation/tooltip/position.html?lang=typescript#tip-pointer-positioning here}
* to know more about this property with demo.
* @default 'Auto'
*/

@@ -95,6 +101,6 @@ tipPointerPosition?: TipPointerPosition;

/**
* Determines on which open mode, the Tooltip needs to be shown. With the default value set to `auto`,
* Tooltip appears when the user hovers or focuses on a target on the desktop.
* If the Tooltip is to be displayed on touch devices, then one needs to tap and hold the target element to view it's related content.
* @default 'auto'
* It is used to determine the device mode to display the Tooltip content.
* If it is in desktop, it will show the Tooltip content when hovering on the target element.
* If it is in touch device, it will show the Tooltip content when tap and holding on the target element.
* @default 'Auto'
*/

@@ -104,3 +110,5 @@ opensOn?: string;

/**
* When set to `true`, allows the Tooltip to follow the mouse pointer movement over the specified target element.
* It allows the Tooltip to follow the mouse pointer movement over the specified target element.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/position.html?lang=typescript#mouse-trailing here}
* to know more about this property with demo.
* @default false

@@ -111,3 +119,5 @@ */

/**
* When set to `true`, allows the Tooltip to stay open on the target until it is manually closed.
* It is used to display the Tooltip in an open state until closed by manually.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/open-mode.html?lang=typescript#sticky-mode here}
* to know more about this property with demo.
* @default false

@@ -118,3 +128,5 @@ */

/**
* Allows to set the same or different animation option for the Tooltip, when it is opened or closed.
* We can set the same or different animation option to Tooltip while it is in open or close state.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/animation.html?lang=typescript here}
* to know more about this property with demo.
* @default { open: { effect: 'FadeIn', duration: 150, delay: 0 }, close: { effect: 'FadeOut', duration: 150, delay: 0 } }

@@ -125,3 +137,3 @@ */

/**
* Opens the Tooltip after the specified delay in milliseconds.
* It is used to open the Tooltip after the specified delay in milliseconds.
* @default 0

@@ -132,3 +144,3 @@ */

/**
* Closes the Tooltip after the specified delay in milliseconds.
* It is used to close the Tooltip after a specified delay in milliseconds.
* @default 0

@@ -139,3 +151,4 @@ */

/**
* Allows the CSS class name to be applied to the Tooltip.
* It is used to customize the Tooltip which accepts custom CSS class names that
* defines specific user-defined styles and themes to be applied on the Tooltip element.
* @default null

@@ -146,4 +159,3 @@ */

/**
* When set to `true`, enables the RTL mode on the Tooltip, and the Tooltip and its content are displayed
* in the right to left direction.
* It is used to display the Tooltip and content of Tooltip from right to left direction.
* @default false

@@ -154,6 +166,9 @@ */

/**
* Triggers before the Tooltip and its contents are added to the DOM.
* We can trigger `beforeRender` event before the Tooltip and its contents are added to the DOM.
* When one of its arguments `cancel` is set to true, the Tooltip can be prevented from rendering on the page.
* This event is mainly used for the purpose of customizing the Tooltip before it shows up on the screen.
* For example, to load the AJAX content or to set new animation effects on the Tooltip, this event can be opted.
* Refer the documentation
* {@link http://ej2.syncfusion.com/documentation/tooltip/content.html?lang=typescript#dynamic-content-via-ajax here}
* to know more about this property with demo.
* @event

@@ -164,3 +179,3 @@ */

/**
* Triggers before the Tooltip is displayed over the target element.
* We can trigger `beforeOpen` event before the Tooltip is displayed over the target element.
* When one of its arguments `cancel` is set to true, the Tooltip display can be prevented.

@@ -174,3 +189,3 @@ * This event is mainly used for the purpose of refreshing the Tooltip positions dynamically or to

/**
* Triggers after the Tooltip UI is shown on the target.
* We can trigger `afterOpen` event after the Tooltip Component gets opened.
* @event

@@ -181,3 +196,3 @@ */

/**
* Triggers before the Tooltip hides from the screen. If returned false, then the Tooltip is no more hidden.
* We can trigger `beforeClose` event before the Tooltip hides from the screen. If returned false, then the Tooltip is no more hidden.
* @event

@@ -188,3 +203,3 @@ */

/**
* Triggers after the Tooltip UI is hidden.
* We can trigger `afterClose` event when the Tooltip Component gets closed.
* @event

@@ -195,9 +210,15 @@ */

/**
* Triggers after the Tooltip control is created.
* We can trigger `beforeCollision` event for every collision fit calculation.
* @event
*/
beforeCollision?: EmitType<TooltipEventArgs>;
/**
* We can trigger `created` event after the Tooltip component is created.
* @event
*/
created?: EmitType<Object>;
/**
* Triggers when the Tooltip control is destroyed.
* We can trigger `destroyed` event when the Tooltip component is destroyed.
* @event

@@ -204,0 +225,0 @@ */

@@ -8,11 +8,11 @@ import { Component, ChildProperty, BaseEventArgs } from '@syncfusion/ej2-base';

*/
export declare type OpenMode = 'auto' | 'hover' | 'click' | 'focus' | 'custom';
export declare type OpenMode = 'Auto' | 'Hover' | 'Click' | 'Focus' | 'Custom';
/**
* Applicable positions where the Tooltip can be displayed over specific target elements.
*/
export declare type Position = 'top left' | 'top center' | 'top right' | 'bottom left' | 'bottom center' | 'bottom right' | 'left top' | 'left center' | 'left bottom' | 'right top' | 'right center' | 'right bottom';
export declare type Position = 'TopLeft' | 'TopCenter' | 'TopRight' | 'BottomLeft' | 'BottomCenter' | 'BottomRight' | 'LeftTop' | 'LeftCenter' | 'LeftBottom' | 'RightTop' | 'RightCenter' | 'RightBottom';
/**
* Applicable tip positions attached to the Tooltip.
*/
export declare type TipPointerPosition = 'auto' | 'start' | 'middle' | 'end';
export declare type TipPointerPosition = 'Auto' | 'Start' | 'Middle' | 'End';
/**

@@ -27,21 +27,25 @@ * Animation effects that are applicable for Tooltip.

/**
* Denotes the type of the triggered event.
* It is used to denote the type of the triggered event.
*/
type: String;
/**
* Illustrates whether the current action needs to be prevented or not.
* It illustrates whether the current action needs to be prevented or not.
*/
cancel: Boolean;
/**
* Specifies the current event object.
* It is used to specify the current event object.
*/
event: Event;
/**
* Current target element where the Tooltip is to be displayed.
* It is used to denote the current target element where the Tooltip is to be displayed.
*/
target: HTMLElement;
/**
* Tooltip element
* It is used to denote the Tooltip element
*/
element: HTMLElement;
/**
* It is used to denote the Collided Tooltip position
*/
collidedPosition?: string;
}

@@ -53,11 +57,11 @@ /**

/**
* Animation effect that applies on the Tooltip, during open and close actions.
* It is used to apply the Animation effect on the Tooltip, during open and close actions.
*/
effect?: Effect;
/**
* Denotes the `duration` of the animation that is completed per animation cycle.
* It is used to denote the duration of the animation that is completed per animation cycle.
*/
duration?: number;
/**
* Specifies the `delay` value in milliseconds, indicating the waiting time before animation begins.
* It is used to denote the delay value in milliseconds and indicating the waiting time before animation begins.
*/

@@ -104,4 +108,4 @@ delay?: number;

/**
* Sets the `width` of the Tooltip, accepting both string and number values.
* When set to `auto`, the Tooltip width gets auto adjusted to display its content within the viewable screen.
* It is used to set the width of Tooltip component which accepts both string and number values.
* When set to auto, the Tooltip width gets auto adjusted to display its content within the viewable screen.
* @default 'auto'

@@ -111,5 +115,6 @@ */

/**
* Sets the `height` of the Tooltip, accepting both string and number values.
* When `height` is specified with a certain pixel value and if the Tooltip content overflows,
* then the scrolling mode gets enabled on the Tooltip.
* It is used to set the height of Tooltip component which accepts both string and number values.
* When Tooltip content gets overflow due to height value then the scroll mode will be enabled.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/setting-dimension.html?lang=typescript here}
* to know more about this property with demo.
* @default 'auto'

@@ -119,17 +124,19 @@ */

/**
* Displays the content value on the Tooltip, accepting both string and HTMLElement values.
* It is used to display the content of Tooltip which can be both string and HTML Elements.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/content.html?lang=typescript here}
* to know more about this property with demo.
*/
content: string | HTMLElement;
/**
* Denotes the target selectors on which the Tooltip gets triggered.
* In this case, the initialized Tooltip element is considered the parent container.
* It is used to denote the target selector where the Tooltip need to be displayed.
* The target element is considered as parent container.
*/
target: string;
/**
* Allows you to set the position for the Tooltip element, and provides 12 default options to position the Tooltip.
* @default 'top center'
* It is used to set the position of Tooltip element, with respect to Target element.
* @default 'TopCenter'
*/
position: Position;
/**
* Sets the space between the target and Tooltip element in X axis.
* It sets the space between the target and Tooltip element in X axis.
* @default 0

@@ -139,3 +146,3 @@ */

/**
* Sets the space between the target and Tooltip element in Y axis.
* It sets the space between the target and Tooltip element in Y axis.
* @default 0

@@ -145,3 +152,3 @@ */

/**
* Allows you to either show or hide the tip pointer on the Tooltip.
* It is used to show or hide the tip pointer of Tooltip.
* @default true

@@ -151,17 +158,22 @@ */

/**
* Sets the position of the tip pointer on the Tooltip.
* When set to `auto`, the tip pointer auto adjusts within the space of target's length
* and does not point outside.
* @default 'auto'
* It is used to set the position of tip pointer on tooltip.
* When it sets to auto, the tip pointer auto adjusts within the space of target's length
* and does not point outside.
* Refer the documentation
* {@link http://ej2.syncfusion.com/documentation/tooltip/position.html?lang=typescript#tip-pointer-positioning here}
* to know more about this property with demo.
* @default 'Auto'
*/
tipPointerPosition: TipPointerPosition;
/**
* Determines on which open mode, the Tooltip needs to be shown. With the default value set to `auto`,
* Tooltip appears when the user hovers or focuses on a target on the desktop.
* If the Tooltip is to be displayed on touch devices, then one needs to tap and hold the target element to view it's related content.
* @default 'auto'
* It is used to determine the device mode to display the Tooltip content.
* If it is in desktop, it will show the Tooltip content when hovering on the target element.
* If it is in touch device, it will show the Tooltip content when tap and holding on the target element.
* @default 'Auto'
*/
opensOn: string;
/**
* When set to `true`, allows the Tooltip to follow the mouse pointer movement over the specified target element.
* It allows the Tooltip to follow the mouse pointer movement over the specified target element.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/position.html?lang=typescript#mouse-trailing here}
* to know more about this property with demo.
* @default false

@@ -171,3 +183,5 @@ */

/**
* When set to `true`, allows the Tooltip to stay open on the target until it is manually closed.
* It is used to display the Tooltip in an open state until closed by manually.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/open-mode.html?lang=typescript#sticky-mode here}
* to know more about this property with demo.
* @default false

@@ -177,3 +191,5 @@ */

/**
* Allows to set the same or different animation option for the Tooltip, when it is opened or closed.
* We can set the same or different animation option to Tooltip while it is in open or close state.
* Refer the documentation {@link http://ej2.syncfusion.com/documentation/tooltip/animation.html?lang=typescript here}
* to know more about this property with demo.
* @default { open: { effect: 'FadeIn', duration: 150, delay: 0 }, close: { effect: 'FadeOut', duration: 150, delay: 0 } }

@@ -183,3 +199,3 @@ */

/**
* Opens the Tooltip after the specified delay in milliseconds.
* It is used to open the Tooltip after the specified delay in milliseconds.
* @default 0

@@ -189,3 +205,3 @@ */

/**
* Closes the Tooltip after the specified delay in milliseconds.
* It is used to close the Tooltip after a specified delay in milliseconds.
* @default 0

@@ -195,3 +211,4 @@ */

/**
* Allows the CSS class name to be applied to the Tooltip.
* It is used to customize the Tooltip which accepts custom CSS class names that
* defines specific user-defined styles and themes to be applied on the Tooltip element.
* @default null

@@ -201,4 +218,3 @@ */

/**
* When set to `true`, enables the RTL mode on the Tooltip, and the Tooltip and its content are displayed
* in the right to left direction.
* It is used to display the Tooltip and content of Tooltip from right to left direction.
* @default false

@@ -208,6 +224,9 @@ */

/**
* Triggers before the Tooltip and its contents are added to the DOM.
* We can trigger `beforeRender` event before the Tooltip and its contents are added to the DOM.
* When one of its arguments `cancel` is set to true, the Tooltip can be prevented from rendering on the page.
* This event is mainly used for the purpose of customizing the Tooltip before it shows up on the screen.
* For example, to load the AJAX content or to set new animation effects on the Tooltip, this event can be opted.
* Refer the documentation
* {@link http://ej2.syncfusion.com/documentation/tooltip/content.html?lang=typescript#dynamic-content-via-ajax here}
* to know more about this property with demo.
* @event

@@ -217,3 +236,3 @@ */

/**
* Triggers before the Tooltip is displayed over the target element.
* We can trigger `beforeOpen` event before the Tooltip is displayed over the target element.
* When one of its arguments `cancel` is set to true, the Tooltip display can be prevented.

@@ -226,3 +245,3 @@ * This event is mainly used for the purpose of refreshing the Tooltip positions dynamically or to

/**
* Triggers after the Tooltip UI is shown on the target.
* We can trigger `afterOpen` event after the Tooltip Component gets opened.
* @event

@@ -232,3 +251,3 @@ */

/**
* Triggers before the Tooltip hides from the screen. If returned false, then the Tooltip is no more hidden.
* We can trigger `beforeClose` event before the Tooltip hides from the screen. If returned false, then the Tooltip is no more hidden.
* @event

@@ -238,3 +257,3 @@ */

/**
* Triggers after the Tooltip UI is hidden.
* We can trigger `afterClose` event when the Tooltip Component gets closed.
* @event

@@ -244,8 +263,13 @@ */

/**
* Triggers after the Tooltip control is created.
* We can trigger `beforeCollision` event for every collision fit calculation.
* @event
*/
beforeCollision: EmitType<TooltipEventArgs>;
/**
* We can trigger `created` event after the Tooltip component is created.
* @event
*/
created: EmitType<Object>;
/**
* Triggers when the Tooltip control is destroyed.
* We can trigger `destroyed` event when the Tooltip component is destroyed.
* @event

@@ -255,3 +279,3 @@ */

/**
* Constructor for creating the Tooltip widget
* Constructor for creating the Tooltip Component
*/

@@ -332,3 +356,3 @@ constructor(options?: TooltipModel, element?: string | HTMLElement);

/**
* Shows the Tooltip on the specified target with specific animation settings.
* It is used to show the Tooltip on the specified target with specific animation settings.
* @param element Target element where the Tooltip is to be displayed.

@@ -340,3 +364,3 @@ * @param animation Sets the specific animation, while showing the Tooltip on the screen.

/**
* Hides the Tooltip with specific animation effect.
* It is used to hide the Tooltip with specific animation effect.
* @param animation Sets the specific animation when hiding Tooltip from the screen.

@@ -347,3 +371,3 @@ * @return {void}

/**
* Refreshes the Tooltip content and its position.
* It is used to refresh the Tooltip content and its position.
* @param target Target element where the Tooltip content or position needs to be refreshed.

@@ -354,3 +378,3 @@ * @return {void}

/**
* Destroys the Tooltip widget.
* It is used to destroy the Tooltip component.
* @method destroy

@@ -357,0 +381,0 @@ * @return {void}

@@ -67,7 +67,7 @@ var __extends = (this && this.__extends) || (function () {

Tooltip.prototype.formatPosition = function () {
if (this.position.indexOf('top') === 0 || this.position.indexOf('bottom') === 0) {
_a = this.position.split(' '), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];
if (this.position.indexOf('Top') === 0 || this.position.indexOf('Bottom') === 0) {
_a = this.position.split(/(?=[A-Z])/), this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1];
}
else {
_b = this.position.split(' '), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];
_b = this.position.split(/(?=[A-Z])/), this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1];
}

@@ -84,9 +84,9 @@ var _a, _b;

Tooltip.prototype.setTipClass = function (position) {
if (position.indexOf('right') === 0) {
if (position.indexOf('Right') === 0) {
this.tipClass = TIP_LEFT;
}
else if (position.indexOf('bottom') === 0) {
else if (position.indexOf('Bottom') === 0) {
this.tipClass = TIP_TOP;
}
else if (position.indexOf('left') === 0) {
else if (position.indexOf('Left') === 0) {
this.tipClass = TIP_RIGHT;

@@ -144,43 +144,43 @@ }

switch (position) {
case 'right top':
case 'RightTop':
pos.left += tipWidth + tipAdjust;
pos.top -= tooltipEleHeight - tipHeightAdjust;
break;
case 'right center':
case 'RightCenter':
pos.left += tipWidth + tipAdjust;
pos.top -= (tooltipEleHeight / 2);
break;
case 'right bottom':
case 'RightBottom':
pos.left += tipWidth + tipAdjust;
pos.top -= (tipHeightAdjust);
break;
case 'bottom right':
case 'BottomRight':
pos.top += (tipHeight + tipAdjust);
pos.left -= (tipWidthAdjust);
break;
case 'bottom center':
case 'BottomCenter':
pos.top += (tipHeight + tipAdjust);
pos.left -= (tooltipEleWidth / 2);
break;
case 'bottom left':
case 'BottomLeft':
pos.top += (tipHeight + tipAdjust);
pos.left -= (tooltipEleWidth - tipWidthAdjust);
break;
case 'left bottom':
case 'LeftBottom':
pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);
pos.top -= (tipHeightAdjust);
break;
case 'left center':
case 'LeftCenter':
pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);
pos.top -= (tooltipEleHeight / 2);
break;
case 'left top':
case 'LeftTop':
pos.left -= (tipWidth + tooltipEleWidth + tipAdjust);
pos.top -= (tooltipEleHeight - tipHeightAdjust);
break;
case 'top left':
case 'TopLeft':
pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);
pos.left -= (tooltipEleWidth - tipWidthAdjust);
break;
case 'top right':
case 'TopRight':
pos.top -= (tooltipEleHeight + tipHeight + tipAdjust);

@@ -215,11 +215,19 @@ pos.left -= (tipWidthAdjust);

var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);
var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);
var tipWidth = arrowEle.offsetWidth;
var tipHeight = arrowEle.offsetHeight;
if (this.tipClass === TIP_BOTTOM || this.tipClass === TIP_TOP) {
topValue = this.tipClass === TIP_BOTTOM ? '100%' : -(tipHeight) + 'px';
var tipPosExclude = tooltipPositionX !== 'center' || (tooltipWidth > target.offsetWidth) || this.mouseTrail;
if ((tipPosExclude && tooltipPositionX === 'left') || (!tipPosExclude && this.tipPointerPosition === 'end')) {
if (this.tipClass === TIP_BOTTOM) {
topValue = '99.9%';
arrowInnerELe.style.top = '-' + (tipHeight - 2) + 'px';
}
else {
topValue = -(tipHeight - 1) + 'px';
arrowInnerELe.style.top = '-' + (tipHeight - 6) + 'px';
}
var tipPosExclude = tooltipPositionX !== 'Center' || (tooltipWidth > target.offsetWidth) || this.mouseTrail;
if ((tipPosExclude && tooltipPositionX === 'Left') || (!tipPosExclude && this.tipPointerPosition === 'End')) {
leftValue = (tooltipWidth - tipWidth - POINTER_ADJUST) + 'px';
}
else if ((tipPosExclude && tooltipPositionX === 'right') || (!tipPosExclude && this.tipPointerPosition === 'start')) {
else if ((tipPosExclude && tooltipPositionX === 'Right') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {
leftValue = POINTER_ADJUST + 'px';

@@ -232,8 +240,15 @@ }

else {
leftValue = this.tipClass === TIP_RIGHT ? tooltipWidth + 'px' : -(tipWidth) + 'px';
var tipPosExclude = tooltipPositionY !== 'center' || (tooltipHeight > target.offsetHeight) || this.mouseTrail;
if ((tipPosExclude && tooltipPositionY === 'top') || (!tipPosExclude && this.tipPointerPosition === 'end')) {
if (this.tipClass === TIP_RIGHT) {
leftValue = '99.9%';
arrowInnerELe.style.left = '-' + (tipWidth - 2) + 'px';
}
else {
leftValue = -(tipWidth - 1) + 'px';
arrowInnerELe.style.left = (-(tipWidth) + (tipWidth - 2)) + 'px';
}
var tipPosExclude = tooltipPositionY !== 'Center' || (tooltipHeight > target.offsetHeight) || this.mouseTrail;
if ((tipPosExclude && tooltipPositionY === 'Top') || (!tipPosExclude && this.tipPointerPosition === 'End')) {
topValue = (tooltipHeight - tipHeight - POINTER_ADJUST) + 'px';
}
else if ((tipPosExclude && tooltipPositionY === 'bottom') || (!tipPosExclude && this.tipPointerPosition === 'start')) {
else if ((tipPosExclude && tooltipPositionY === 'Bottom') || (!tipPosExclude && this.tipPointerPosition === 'Start')) {
topValue = POINTER_ADJUST + 'px';

@@ -374,3 +389,3 @@ }

if (this.cssClass) {
ej2_base_4.addClass([this.tooltipEle], this.cssClass);
ej2_base_4.addClass([this.tooltipEle], this.cssClass.split(' '));
}

@@ -436,5 +451,5 @@ if (ej2_base_2.Browser.isDevice) {

if (affectedPos.length > 0) {
elePos.horizontal = affectedPos.indexOf('left') >= 0 ? 'right' : affectedPos.indexOf('right') >= 0 ? 'left' :
elePos.horizontal = affectedPos.indexOf('left') >= 0 ? 'Right' : affectedPos.indexOf('right') >= 0 ? 'Left' :
this.tooltipPositionX;
elePos.vertical = affectedPos.indexOf('top') >= 0 ? 'bottom' : affectedPos.indexOf('bottom') >= 0 ? 'top' :
elePos.vertical = affectedPos.indexOf('top') >= 0 ? 'Bottom' : affectedPos.indexOf('bottom') >= 0 ? 'Top' :
this.tooltipPositionY;

@@ -448,16 +463,21 @@ }

if (this.tooltipPositionY !== elePos.vertical) {
newpos = ((this.position.indexOf('bottom') === 0 || this.position.indexOf('top') === 0) ?
elePos.vertical + ' ' + this.tooltipPositionX : this.tooltipPositionX + ' ' + elePos.vertical);
newpos = ((this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?
elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical);
}
if (this.tooltipPositionX !== elePos.horizontal) {
if (newpos.indexOf('left') === 0) {
elePos.vertical = (newpos === 'left top' || newpos === 'left center') ? 'top' : 'bottom';
newpos = (elePos.vertical + ' ' + 'left');
if (newpos.indexOf('Left') === 0) {
elePos.vertical = (newpos === 'LeftTop' || newpos === 'LeftCenter') ? 'Top' : 'Bottom';
newpos = (elePos.vertical + 'Left');
}
if (newpos.indexOf('right') === 0) {
elePos.vertical = (newpos === 'right top' || newpos === 'right center') ? 'top' : 'bottom';
newpos = (elePos.vertical + ' ' + 'right');
if (newpos.indexOf('Right') === 0) {
elePos.vertical = (newpos === 'RightTop' || newpos === 'RightCenter') ? 'Top' : 'Bottom';
newpos = (elePos.vertical + 'Right');
}
elePos.horizontal = this.tooltipPositionX;
}
this.tooltipEventArgs = {
type: null, cancel: false, target: target, event: null,
element: this.tooltipEle, collidedPosition: newpos
};
this.trigger('beforeCollision', this.tooltipEventArgs);
if (elePos.position !== newpos) {

@@ -476,3 +496,3 @@ var pos = position_1.calculatePosition(target, this.tooltipPositionX, elePos.vertical);

var left = collision_1.fit(this.tooltipEle, (this.target ? this.element : null), { X: true, Y: false }, eleOffset).left;
if (this.showTipPointer && (newpos.indexOf('bottom') === 0 || newpos.indexOf('top') === 0)) {
if (this.showTipPointer && (newpos.indexOf('Bottom') === 0 || newpos.indexOf('Top') === 0)) {
var arrowEle = this.tooltipEle.querySelector('.' + ARROW_TIP);

@@ -586,9 +606,9 @@ var arrowleft = parseInt(arrowEle.style.left, 10) - (left - elePos.left);

if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {
var newpos = (this.position.indexOf('bottom') === 0 || this.position.indexOf('top') === 0) ?
elePos.vertical + ' ' + elePos.horizontal : elePos.horizontal + ' ' + elePos.vertical;
var newpos = (this.position.indexOf('Bottom') === 0 || this.position.indexOf('Top') === 0) ?
elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;
elePos.position = newpos;
this.adjustArrow(event.target, elePos.position, elePos.horizontal, elePos.vertical);
var colpos = this.calculateTooltipOffset(elePos.position);
elePos.left = eventPageX + colpos.left + this.offsetX;
elePos.top = eventPageY + colpos.top + this.offsetY;
elePos.left = eventPageX + colpos.left - this.offsetX;
elePos.top = eventPageY + colpos.top - this.offsetY;
}

@@ -619,4 +639,4 @@ this.tooltipEle.style.left = elePos.left + 'px';

this.tipClass = TIP_BOTTOM;
this.tooltipPositionX = 'center';
this.tooltipPositionY = 'top';
this.tooltipPositionX = 'Center';
this.tooltipPositionY = 'Top';
this.isHidden = true;

@@ -628,12 +648,12 @@ };

var opensOn = triggerList_1[_i];
if (opensOn === 'custom') {
if (opensOn === 'Custom') {
return;
}
if (opensOn === 'focus') {
if (opensOn === 'Focus') {
this.wireFocusEvents();
}
if (opensOn === 'click') {
if (opensOn === 'Click') {
ej2_base_2.EventHandler.add(this.element, ej2_base_2.Browser.touchStartEvent, this.targetClick, this);
}
if (opensOn === 'hover') {
if (opensOn === 'Hover') {
if (ej2_base_2.Browser.isDevice) {

@@ -656,4 +676,4 @@ this.touchModule = new ej2_base_2.Touch(this.element, {

Tooltip.prototype.getTriggerList = function (trigger) {
if (trigger === 'auto') {
trigger = (ej2_base_2.Browser.isDevice) ? 'hover' : 'hover focus';
if (trigger === 'Auto') {
trigger = (ej2_base_2.Browser.isDevice) ? 'Hover' : 'Hover Focus';
}

@@ -675,13 +695,15 @@ return trigger.split(' ');

Tooltip.prototype.wireMouseEvents = function (e, target) {
if (!this.isSticky) {
if (e.type === 'focus') {
ej2_base_2.EventHandler.add(target, 'blur', this.onMouseOut, this);
if (this.tooltipEle) {
if (!this.isSticky) {
if (e.type === 'focus') {
ej2_base_2.EventHandler.add(target, 'blur', this.onMouseOut, this);
}
if (e.type === 'mouseover') {
ej2_base_2.EventHandler.add(target, 'mouseleave', this.onMouseOut, this);
}
}
if (e.type === 'mouseover') {
ej2_base_2.EventHandler.add(target, 'mouseleave', this.onMouseOut, this);
if (this.mouseTrail) {
ej2_base_2.EventHandler.add(target, 'mousemove touchstart mouseenter', this.onMouseMove, this);
}
}
if (this.mouseTrail) {
ej2_base_2.EventHandler.add(target, 'mousemove touchstart', this.onMouseMove, this);
}
};

@@ -692,12 +714,12 @@ Tooltip.prototype.unwireEvents = function (trigger) {

var opensOn = triggerList_2[_i];
if (opensOn === 'custom') {
if (opensOn === 'Custom') {
return;
}
if (opensOn === 'focus') {
if (opensOn === 'Focus') {
this.unwireFocusEvents();
}
if (opensOn === 'click') {
if (opensOn === 'Click') {
ej2_base_2.EventHandler.remove(this.element, ej2_base_2.Browser.touchStartEvent, this.targetClick);
}
if (opensOn === 'hover') {
if (opensOn === 'Hover') {
if (ej2_base_2.Browser.isDevice) {

@@ -735,6 +757,6 @@ if (this.touchModule) {

var opensOn = triggerList_3[_i];
if (opensOn === 'focus') {
if (opensOn === 'Focus') {
ej2_base_2.EventHandler.remove(target, 'blur', this.onMouseOut);
}
if (opensOn === 'hover' && !ej2_base_2.Browser.isDevice) {
if (opensOn === 'Hover' && !ej2_base_2.Browser.isDevice) {
ej2_base_2.EventHandler.remove(target, 'mouseleave', this.onMouseOut);

@@ -745,3 +767,3 @@ }

if (this.mouseTrail) {
ej2_base_2.EventHandler.remove(target, 'mousemove touchstart', this.onMouseMove);
ej2_base_2.EventHandler.remove(target, 'mousemove touchstart mouseenter', this.onMouseMove);
}

@@ -782,2 +804,4 @@ };

if (this.tooltipEle && target) {
var arrowInnerELe = this.tooltipEle.querySelector('.' + ARROW_TIP_INNER);
arrowInnerELe.style.top = arrowInnerELe.style.left = null;
this.reposition(target);

@@ -807,6 +831,6 @@ }

if (oldProp.cssClass) {
ej2_base_4.removeClass([this.tooltipEle], oldProp.cssClass);
ej2_base_4.removeClass([this.tooltipEle], oldProp.cssClass.split(' '));
}
if (newProp.cssClass) {
ej2_base_4.addClass([this.tooltipEle], newProp.cssClass);
ej2_base_4.addClass([this.tooltipEle], newProp.cssClass.split(' '));
}

@@ -873,3 +897,3 @@ }

__decorate([
ej2_base_1.Property('top center')
ej2_base_1.Property('TopCenter')
], Tooltip.prototype, "position", void 0);

@@ -886,6 +910,6 @@ __decorate([

__decorate([
ej2_base_1.Property('auto')
ej2_base_1.Property('Auto')
], Tooltip.prototype, "tipPointerPosition", void 0);
__decorate([
ej2_base_1.Property('auto')
ej2_base_1.Property('Auto')
], Tooltip.prototype, "opensOn", void 0);

@@ -930,2 +954,5 @@ __decorate([

ej2_base_1.Event()
], Tooltip.prototype, "beforeCollision", void 0);
__decorate([
ej2_base_1.Event()
], Tooltip.prototype, "created", void 0);

@@ -932,0 +959,0 @@ __decorate([

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc