UNPKG

@syncfusion/ej2-popups

Version:

A package of Essential JS 2 popup components such as Dialog and Tooltip that is used to display information or messages in separate pop-ups.

10 lines 119 kB
/*! * filename: ej2-popups.min.js * version : 33.1.44 * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("SyncfusionBase"),require("SyncfusionButtons")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionButtons"],e):"object"==typeof exports?exports.SyncfusionPopups=e(require("SyncfusionBase"),require("SyncfusionButtons")):t.SyncfusionPopups=e(t.SyncfusionBase,t.SyncfusionButtons)}(self,(t,e)=>(()=>{"use strict";var i={766:e=>{e.exports=t},741:t=>{t.exports=e}},o={};function n(t){var e=o[t];if(void 0!==e)return e.exports;var s=o[t]={exports:{}};return i[t](s,s.exports,n),s.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{n.r(s),n.d(s,{Animation:()=>Mt,AnimationSettings:()=>be,ButtonProps:()=>ve,Dialog:()=>Fe,DialogUtility:()=>me,Popup:()=>tt,PositionData:()=>K,Spinner:()=>Ei,Tooltip:()=>Lt,calculatePosition:()=>c,calculateRelativeBasedPosition:()=>p,createSpinner:()=>Oi,destroy:()=>W,fit:()=>w,flip:()=>T,getMaxZindex:()=>ot,getScrollableParent:()=>et,getTransformElement:()=>S,getZindexPartial:()=>it,getZoomValue:()=>P,hideSpinner:()=>Ii,isCollide:()=>N,setSpinner:()=>Di,showSpinner:()=>Ai});var t,e,i,o,l,r,a,h=n(766),d=!1;function p(t,e){var i=!1,o={left:0,top:0},n=t;if(!t||!e)return o;for((0,h.isNullOrUndefined)(e.offsetParent)&&"fixed"===e.style.position&&(i=!0);(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left+=t.offsetLeft,o.top+=t.offsetTop,t=t.offsetParent;for(t=n;(e.offsetParent||i)&&t&&e.offsetParent!==t;)o.left-=t.scrollLeft,o.top-=t.scrollTop,t=t.parentElement;return o}function c(n,s,l,r,a){if(e=void 0,e=a,d=!!r,!n)return{left:0,top:0};s||(s="left"),l||(l="top"),o=n.ownerDocument,i=n;return function(e,o,n){switch(t=i.getBoundingClientRect(),o+e){case"topcenter":u(C(),n),f(b(),n);break;case"topright":u(O(),n),f(b(),n);break;case"centercenter":u(C(),n),f(v(),n);break;case"centerright":u(O(),n),f(v(),n);break;case"centerleft":u(E(),n),f(v(),n);break;case"bottomcenter":u(C(),n),f(y(),n);break;case"bottomright":u(O(),n),f(y(),n);break;case"bottomleft":u(E(),n),f(y(),n);break;default:u(E(),n),f(b(),n)}return i=null,n}(s.toLowerCase(),l.toLowerCase(),{left:0,top:0})}function u(t,e){e.left=t}function f(t,e){e.top=t}function m(){return o.documentElement.scrollTop||o.body.scrollTop}function g(){return o.documentElement.scrollLeft||o.body.scrollLeft}function y(){return d?t.bottom:t.bottom+m()}function v(){return b()+t.height/2}function b(){return d?t.top:t.top+m()}function E(){return t.left+g()}function O(){var o=i&&((i.classList.contains("e-date-wrapper")||i.classList.contains("e-datetime-wrapper"))&&i.classList.contains("e-rtl")||i.classList.contains("e-ddl")&&i.classList.contains("e-rtl")||i.classList.contains("e-date-range-wrapper")||i.classList.contains("e-filtermenudiv")||i.classList.contains("e-ccdiv"))?e?e.width:0:e&&t.width>=e.width?e.width:0;return i&&i.classList.contains("e-rtl")&&i.classList.contains("e-multiselect")&&(o=e.width),t.right+g()-o}function C(){return E()+t.width/2}function w(t,e,i,o){if(void 0===e&&(e=null),void 0===i&&(i={X:!1,Y:!1}),!i.Y&&!i.X)return{left:0,top:0};var n=t.getBoundingClientRect();if(r=e,l=t.ownerDocument,o||(o=c(t,"left","top")),i.X){var s=r?M():q(),a=I(),h=D(),d=a-o.left,p=o.left+n.width-h;n.width>s?o.left=d>0&&p<=0?h-n.width:p>0&&d<=0?a:d>p?h-n.width:a:d>0?o.left+=d:p>0&&(o.left-=p)}if(i.Y){var u=r?L():F(),f=z(),m=Y(),g=f-o.top,y=o.top+n.height-m;n.height>u?o.top=g>0&&y<=0?m-n.height:y>0&&g<=0?f:g>y?m-n.height:f:g>0?o.top+=g:y>0&&(o.top-=y)}return o}function N(t,e,i,o){void 0===e&&(e=null);var n=c(t,"left","top");i&&(n.left=i),o&&(n.top=o);var s=[];r=e,l=t.ownerDocument;var a=t.getBoundingClientRect(),h=n.top,d=n.left,p=n.left+a.width,u=k(h,n.top+a.height),f=U(d,p);return u.topSide&&s.push("top"),f.rightSide&&s.push("right"),f.leftSide&&s.push("left"),u.bottomSide&&s.push("bottom"),s}function T(t,e,i,o,n,s,a,h,d){if(void 0===a&&(a=null),void 0===h&&(h={X:!0,Y:!0}),e&&t&&n&&s&&(h.X||h.Y)){var u,f={TL:null,TR:null,BL:null,BR:null},m={TL:null,TR:null,BL:null,BR:null};if("none"===window.getComputedStyle(t).display){var g=t.style.visibility;t.style.visibility="hidden",t.style.display="block",u=t.getBoundingClientRect(),t.style.removeProperty("display"),t.style.visibility=g}else u=t.getBoundingClientRect();var y={posX:n,posY:s,offsetX:i,offsetY:o,position:{left:0,top:0}};r=a,l=e.ownerDocument,function(t,e,i,o,n){i.position=c(t,i.posX,i.posY,o,n),e.TL=c(t,"left","top",o,n),e.TR=c(t,"right","top",o,n),e.BR=c(t,"left","bottom",o,n),e.BL=c(t,"right","bottom",o,n)}(e,f,y,d,u),x(m,y,u),h.X&&B(e,m,f,y,u,!0),h.Y&&f.TL.top>-1&&H(e,m,f,y,u,!0),function(t,e,i){var o=0,n=0;if(null!=t.offsetParent&&("absolute"===getComputedStyle(t.offsetParent).position||"relative"===getComputedStyle(t.offsetParent).position)){var s=c(t.offsetParent,"left","top",!1,i);o=s.left,n=s.top}var l=1,r=1,a=S(t);if(a){var h=getComputedStyle(a).transform;if("none"!==h){var d=new DOMMatrix(h);l=d.a,r=d.d}if("none"!==getComputedStyle(a).zoom){var u=P(document.body);l*=u,r*=u}}t.style.top=e.position.top/r+e.offsetY-n/r+"px",t.style.left=e.position.left/l+e.offsetX-o/l+"px";var f=null;t.classList.contains("e-sticky")&&(t.classList.remove("e-sticky"),f=t.offsetParent&&t.offsetParent.classList.contains("sf-grid")?t.offsetParent:null,t.classList.add("e-sticky"));if(f&&(t.classList.contains("e-filter-popup")||t.classList.contains("e-ccdlg"))){var m=p(f,t),g=t.clientWidth,y=m.left-g+f.clientWidth;y<1?y=g+y-16:y-=4;var v=f.offsetWidth;if(v-y<g){var b=g-(v-y);t.style.left=y-b+"px"}}if(t.classList.contains("e-filter-popup")&&t.offsetParent){var E=parseFloat(t.style.left),O=t.offsetParent.clientWidth;g=t.clientWidth;(E<0||E+g>O)&&(t.style.left=Math.max(0,Math.min(E,O-g))+"px")}}(t,y,u)}}function P(t){var e=getComputedStyle(t).zoom;return parseFloat(e)||1}function S(t){for(;t;){var e=window.getComputedStyle(t).transform,i=P(document.body);if(e&&"none"!==e||i&&1!==i)return t;if(t===document.body)return null;t=t.offsetParent||t.parentElement}return null}function x(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 U(t,e){var i=!1,o=!1;return t-j()<I()&&(i=!0),e>D()&&(o=!0),{leftSide:i,rightSide:o}}function B(t,e,i,o,n,s){var l=/\b(e-date-wrapper|e-datetime-wrapper)\b/.test(t.className),r=0;l&&!s&&("leftSide"===a?e.TL.left+=Math.abs(i.TL.left-j()-I()):"rightSide"===a&&(e.TR.left-=i.TR.left-D()));var h=U(e.TL.left,e.TR.left);a=h.leftSide?"leftSide":"rightSide",i.TL.left-j()<=I()&&(l?r=i.TL.left-j()-I():h.leftSide=!1),i.TR.left>D()&&(l?r=i.TR.left-D():h.rightSide=!1),(h.leftSide&&!h.rightSide||!h.leftSide&&h.rightSide)&&("right"===o.posX?o.posX="left":o.posX="right",l?(o.offsetX+=h.leftSide?Math.abs(r):-1*(n.width+(l?r:0)),"rightSide"===a&&(o.position=c(t,o.posX,o.posY,!1))):(o.offsetX=o.offsetX+n.width,o.offsetX=-1*o.offsetX,o.position=c(t,o.posX,o.posY,!1)),x(e,o,n),s&&B(t,e,i,o,n,!1))}function H(t,e,i,o,n,s){var l=k(e.TL.top,e.BL.top);i.TL.top-X()<=z()&&(l.topSide=!1),i.BL.top>=Y()&&t.getBoundingClientRect().bottom<window.innerHeight&&(l.bottomSide=!1),(l.topSide&&!l.bottomSide||!l.topSide&&l.bottomSide)&&("top"===o.posY?o.posY="bottom":o.posY="top",o.offsetY=o.offsetY+n.height,o.offsetY=-1*o.offsetY,o.position=c(t,o.posX,o.posY,!1,n),x(e,o,n),s&&H(t,e,i,o,n,!1))}function k(t,e){var i=!1,o=!1;return t-X()<z()&&(i=!0),e>Y()&&(o=!0),{topSide:i,bottomSide:o}}function M(){return r.getBoundingClientRect().width}function L(){return r.getBoundingClientRect().height}function R(){return r.getBoundingClientRect().left}function A(){return r.getBoundingClientRect().top}function z(){return r?A():0}function I(){return r?R():0}function D(){return r?j()+R()+M():j()+q()}function Y(){return r?X()+A()+L():X()+F()}function X(){return l.documentElement.scrollTop||l.body.scrollTop}function j(){return l.documentElement.scrollLeft||l.body.scrollLeft}function F(){return window.innerHeight}function q(){var t=window.innerWidth,e=document.documentElement.getBoundingClientRect();return t-(t-((0,h.isNullOrUndefined)(document.documentElement)?0:e.width))}function W(){r=null,l=null}var V,_=(V=function(t,e){return V=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])},V(t,e)},function(t,e){function i(){this.constructor=t}V(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Z=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _(e,t),Z([(0,h.Property)("left")],e.prototype,"X",void 0),Z([(0,h.Property)("top")],e.prototype,"Y",void 0),e}(h.ChildProperty),G="e-popup",J="e-rtl",Q="e-popup-open",$="e-popup-close",tt=function(t){function e(e,i){return t.call(this,i,e)||this}return _(e,t),e.prototype.onPropertyChanged=function(t,e){for(var i=0,o=Object.keys(t);i<o.length;i++){switch(o[i]){case"width":(0,h.setStyleAttribute)(this.element,{width:(0,h.formatUnit)(t.width)});break;case"height":(0,h.setStyleAttribute)(this.element,{height:(0,h.formatUnit)(t.height)});break;case"zIndex":(0,h.setStyleAttribute)(this.element,{zIndex:t.zIndex});break;case"enableRtl":this.setEnableRtl();break;case"position":case"relateTo":this.refreshPosition();break;case"offsetX":var n=t.offsetX-e.offsetX;this.element.style.left=(parseInt(this.element.style.left,10)+n).toString()+"px";break;case"offsetY":var s=t.offsetY-e.offsetY;this.element.style.top=(parseInt(this.element.style.top,10)+s).toString()+"px";break;case"content":this.setContent();break;case"actionOnScroll":"none"!==t.actionOnScroll?this.wireScrollEvents():this.unwireScrollEvents()}}},e.prototype.getModuleName=function(){return"popup"},e.prototype.resolveCollision=function(){this.checkCollision()},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.destroy=function(){this.element.classList.contains("e-popup-open")&&this.unwireEvents(),this.element.classList.remove(G,J,Q,$),this.content=null,this.relateTo=null,W(),t.prototype.destroy.call(this)},e.prototype.render=function(){this.element.classList.add(G);var t={};1e3!==this.zIndex&&(t.zIndex=this.zIndex),"auto"!==this.width&&(t.width=(0,h.formatUnit)(this.width)),"auto"!==this.height&&(t.height=(0,h.formatUnit)(this.height)),(0,h.setStyleAttribute)(this.element,t),this.fixedParent=!1,this.setEnableRtl(),this.setContent()},e.prototype.wireEvents=function(){h.Browser.isDevice&&h.EventHandler.add(window,"orientationchange",this.orientationOnChange,this),"none"!==this.actionOnScroll&&this.wireScrollEvents()},e.prototype.wireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];h.EventHandler.add(i,"scroll",this.scrollRefresh,this)}},e.prototype.unwireEvents=function(){h.Browser.isDevice&&h.EventHandler.remove(window,"orientationchange",this.orientationOnChange),"none"!==this.actionOnScroll&&this.unwireScrollEvents()},e.prototype.unwireScrollEvents=function(){if(this.getRelateToElement())for(var t=0,e=this.getScrollableParent(this.getRelateToElement());t<e.length;t++){var i=e[t];h.EventHandler.remove(i,"scroll",this.scrollRefresh)}},e.prototype.getRelateToElement=function(){var t=""===this.relateTo||(0,h.isNullOrUndefined)(this.relateTo)?document.body:this.relateTo;return this.setProperties({relateTo:t},!0),"string"==typeof this.relateTo?document.querySelector(this.relateTo):this.relateTo},e.prototype.scrollRefresh=function(t){if("reposition"===this.actionOnScroll?(0,h.isNullOrUndefined)(this.element)||this.element.offsetParent===t.target||this.element.offsetParent&&"BODY"===this.element.offsetParent.tagName&&null==t.target.parentElement||this.refreshPosition():"hide"===this.actionOnScroll&&this.hide(),"none"!==this.actionOnScroll&&this.getRelateToElement()){var e=this.isElementOnViewport(this.getRelateToElement(),t.target);e||this.targetInvisibleStatus?e&&(this.targetInvisibleStatus=!1):(this.trigger("targetExitViewport"),this.targetInvisibleStatus=!0)}},e.prototype.isElementOnViewport=function(t,e){for(var i=this.getScrollableParent(t),o=0;o<i.length;o++)if(!this.isElementVisible(t,i[o]))return!1;return!0},e.prototype.isElementVisible=function(t,e){var i=this.checkGetBoundingClientRect(t);if(!i.height||!i.width)return!1;if((0,h.isNullOrUndefined)(this.checkGetBoundingClientRect(e))){var o=window,n={top:o.scrollY,left:o.scrollX,right:o.scrollX+o.outerWidth,bottom:o.scrollY+o.outerHeight},s=c(t),l={top:s.top,left:s.left,right:s.left+i.width,bottom:s.top+i.height},r={top:n.bottom-l.top,left:n.right-l.left,bottom:l.bottom-n.top,right:l.right-n.left};return r.top>0&&r.left>0&&r.right>0&&r.bottom>0}var a=e.getBoundingClientRect();return!(i.bottom<a.top||i.bottom>a.bottom||i.right>a.right||i.left<a.left)},e.prototype.preRender=function(){},e.prototype.setEnableRtl=function(){this.reposition(),this.enableRtl?this.element.classList.add(J):this.element.classList.remove(J)},e.prototype.setContent=function(){if(!(0,h.isNullOrUndefined)(this.content))if(this.element.innerHTML="","string"==typeof this.content)this.element.textContent=this.content;else{var t=this.getRelateToElement(),e=this.content.props;t.classList.contains("e-dropdown-btn")&&!(0,h.isNullOrUndefined)(e)||this.element.appendChild(this.content)}},e.prototype.orientationOnChange=function(){var t=this;setTimeout(function(){t.refreshPosition()},200)},e.prototype.refreshPosition=function(t,e){(0,h.isNullOrUndefined)(t)||this.checkFixedParent(t),this.reposition(),e||this.checkCollision()},e.prototype.reposition=function(){var t,e,i=this.getRelateToElement();if("number"==typeof this.position.X&&"number"==typeof this.position.Y)t={left:this.position.X,top:this.position.Y};else if("string"==typeof this.position.X&&"number"==typeof this.position.Y||"number"==typeof this.position.X&&"string"==typeof this.position.Y){var o=void 0,n=this.element.style.display;this.element.style.display="block",this.element.classList.contains("e-dlg-modal")&&(o=this.element.parentElement.style.display,this.element.parentElement.style.display="block"),e=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY),t="string"==typeof this.position.X?{left:e.left,top:this.position.Y}:{left:this.position.X,top:e.top},this.element.style.display=n,this.element.classList.contains("e-dlg-modal")&&(this.element.parentElement.style.display=o)}else if(i){var s=this.element.clientHeight;n=this.element.style.display;this.element.style.display="block",t=this.getAnchorPosition(i,this.element,this.position,this.offsetX,this.offsetY,s),this.element.style.display=n}else t={left:0,top:0};(0,h.isNullOrUndefined)(t)||(this.element.style.left=t.left+"px",this.element.style.top=t.top+"px")},e.prototype.checkGetBoundingClientRect=function(t){try{return t.getBoundingClientRect()}catch(t){return null}},e.prototype.getAnchorPosition=function(t,e,i,o,n,s){void 0===s&&(s=0);var l=this.checkGetBoundingClientRect(e),r=this.checkGetBoundingClientRect(t);if((0,h.isNullOrUndefined)(l)||(0,h.isNullOrUndefined)(r))return null;var a=t,d={left:0,top:0};switch(e.offsetParent&&"BODY"===e.offsetParent.tagName&&"BODY"===t.tagName?d=c(t):(e.classList.contains("e-dlg-modal")&&"BODY"!==a.tagName&&(e=e.parentElement),d=p(a,e)),i.X){default:case"left":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===a.tagName&&"container"===this.targetType?d.left+=window.innerWidth/2-l.width/2:"container"===this.targetType?d.left+=r.width/2-l.width/2:d.left+=r.width/2;break;case"right":if(e.classList.contains("e-dlg-modal")&&"BODY"===a.tagName&&"container"===this.targetType)d.left+=window.innerWidth-l.width;else if("container"===this.targetType){var u=1,f=S(e);if(f){var m=getComputedStyle(f).transform;if("none"!==m)u=new DOMMatrix(m).a;if("none"!==getComputedStyle(f).zoom)u*=P(document.body)}d.left+=(r.width-l.width)/u}else d.left+=r.width}switch(i.Y){default:case"top":break;case"center":e.classList.contains("e-dlg-modal")&&"BODY"===a.tagName&&"container"===this.targetType?d.top+=window.innerHeight/2-l.height/2:"container"===this.targetType?d.top+=r.height/2-l.height/2:d.top+=r.height/2;break;case"bottom":e.classList.contains("e-dlg-modal")&&"BODY"===a.tagName&&"container"===this.targetType?d.top+=window.innerHeight-l.height:"container"!==this.targetType||e.classList.contains("e-dialog")?"container"===this.targetType&&e.classList.contains("e-dialog")?d.top+=r.height-s:d.top+=r.height:d.top+=r.height-l.height}return d.left+=o,d.top+=n,d},e.prototype.callFlip=function(t){var e=this.getRelateToElement();T(this.element,e,this.offsetX,this.offsetY,this.position.X,this.position.Y,this.viewPortElement,t,this.fixedParent)},e.prototype.callFit=function(t){if(0!==N(this.element,this.viewPortElement).length)if((0,h.isNullOrUndefined)(this.viewPortElement)){var e=w(this.element,this.viewPortElement,t);t.X&&(this.element.style.left=e.left+"px"),t.Y&&(this.element.style.top=e.top+"px")}else{var i=this.checkGetBoundingClientRect(this.element),o=this.checkGetBoundingClientRect(this.viewPortElement);if((0,h.isNullOrUndefined)(i)||(0,h.isNullOrUndefined)(o))return null;t&&!0===t.Y&&(o.top>i.top?this.element.style.top="0px":o.bottom<i.bottom&&(this.element.style.top=parseInt(this.element.style.top,10)-(i.bottom-o.bottom)+"px")),t&&!0===t.X&&(o.right<i.right?this.element.style.left=parseInt(this.element.style.left,10)-(i.right-o.right)+"px":o.left>i.left&&(this.element.style.left=parseInt(this.element.style.left,10)+(o.left-i.left)+"px"))}},e.prototype.checkCollision=function(){var t=this.collision.X,e=this.collision.Y;"none"===t&&"none"===e||("flip"===t&&"flip"===e?this.callFlip({X:!0,Y:!0}):"fit"===t&&"fit"===e?this.callFit({X:!0,Y:!0}):("flip"===t?this.callFlip({X:!0,Y:!1}):"flip"===e&&this.callFlip({Y:!0,X:!1}),"fit"===t?this.callFit({X:!0,Y:!1}):"fit"===e&&this.callFit({X:!1,Y:!0})))},e.prototype.show=function(t,e){var i=this;if(this.wireEvents(),this.getRelateToElement(),1e3===this.zIndex||!(0,h.isNullOrUndefined)(e)){var o=(0,h.isNullOrUndefined)(e)?this.element:e;this.zIndex=it(o),(0,h.setStyleAttribute)(this.element,{zIndex:this.zIndex})}t=(0,h.isNullOrUndefined)(t)||"object"!=typeof t?this.showAnimation:t,"none"===this.collision.X&&"none"===this.collision.Y||((0,h.removeClass)([this.element],$),(0,h.addClass)([this.element],Q),this.element.classList.contains("e-sticky")?(this.element.classList.remove("e-sticky"),this.element.offsetParent&&this.element.offsetParent.classList.contains("sf-grid")&&(this.fixedParent=!0),this.element.classList.add("e-sticky")):this.element.offsetParent&&this.element.offsetParent.classList.contains("sf-grid")&&this.enableRtl&&(this.position.X="left"),this.checkCollision(),(0,h.removeClass)([this.element],Q),(0,h.addClass)([this.element],$)),(0,h.isNullOrUndefined)(t)?((0,h.removeClass)([this.element],$),(0,h.addClass)([this.element],Q),this.trigger("open")):(t.begin=function(){i.isDestroyed||((0,h.removeClass)([i.element],$),(0,h.addClass)([i.element],Q))},t.end=function(){i.isDestroyed||i.trigger("open")},new h.Animation(t).animate(this.element))},e.prototype.hide=function(t){var e=this;t=(0,h.isNullOrUndefined)(t)||"object"!=typeof t?this.hideAnimation:t,(0,h.isNullOrUndefined)(t)?((0,h.removeClass)([this.element],Q),(0,h.addClass)([this.element],$),this.trigger("close")):(t.end=function(){e.isDestroyed||((0,h.removeClass)([e.element],Q),(0,h.addClass)([e.element],$),e.trigger("close"))},new h.Animation(t).animate(this.element)),this.unwireEvents()},e.prototype.getScrollableParent=function(t){return this.checkFixedParent(t),et(t,this.fixedParent)},e.prototype.checkFixedParent=function(t){for(var e=t.parentElement;e&&"HTML"!==e.tagName;){var i=getComputedStyle(e);"fixed"!==i.position&&"sticky"!==i.position||(0,h.isNullOrUndefined)(this.element)||!this.element.offsetParent||"BODY"!==this.element.offsetParent.tagName||"hidden"===getComputedStyle(this.element.offsetParent).overflow||(this.element.style.top=window.scrollY>parseInt(this.element.style.top,10)?(0,h.formatUnit)(window.scrollY-parseInt(this.element.style.top,10)):(0,h.formatUnit)(parseInt(this.element.style.top,10)-window.scrollY),this.element.style.position="fixed",this.fixedParent=!0),e=e.parentElement,!(0,h.isNullOrUndefined)(this.element)&&(0,h.isNullOrUndefined)(this.element.offsetParent)&&"fixed"===i.position&&"fixed"===this.element.style.position&&(this.fixedParent=!0)}},Z([(0,h.Property)("auto")],e.prototype,"height",void 0),Z([(0,h.Property)("auto")],e.prototype,"width",void 0),Z([(0,h.Property)(null)],e.prototype,"content",void 0),Z([(0,h.Property)("container")],e.prototype,"targetType",void 0),Z([(0,h.Property)(null)],e.prototype,"viewPortElement",void 0),Z([(0,h.Property)({X:"none",Y:"none"})],e.prototype,"collision",void 0),Z([(0,h.Property)("")],e.prototype,"relateTo",void 0),Z([(0,h.Complex)({},K)],e.prototype,"position",void 0),Z([(0,h.Property)(0)],e.prototype,"offsetX",void 0),Z([(0,h.Property)(0)],e.prototype,"offsetY",void 0),Z([(0,h.Property)(1e3)],e.prototype,"zIndex",void 0),Z([(0,h.Property)(!1)],e.prototype,"enableRtl",void 0),Z([(0,h.Property)("reposition")],e.prototype,"actionOnScroll",void 0),Z([(0,h.Property)(null)],e.prototype,"showAnimation",void 0),Z([(0,h.Property)(null)],e.prototype,"hideAnimation",void 0),Z([(0,h.Event)()],e.prototype,"open",void 0),Z([(0,h.Event)()],e.prototype,"close",void 0),Z([(0,h.Event)()],e.prototype,"targetExitViewport",void 0),e=Z([h.NotifyPropertyChanges],e)}(h.Component);function et(t,e){for(var i=getComputedStyle(t),o=[],n=/(auto|scroll)/,s=t.parentElement;s&&"HTML"!==s.tagName;){var l=getComputedStyle(s);"absolute"===i.position&&"static"===l.position||!n.test(l.overflow+l.overflowY+l.overflowX)||o.push(s),s=s.parentElement}return e||o.push(document),o}function it(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&&parseInt(o,10)<2147483647&&i.push(o),e=e.parentElement}for(var s=[],l=0;l<document.body.children.length;l++)if(!t.isEqualNode(document.body.children[l])){o=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(document.body.children[l],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&parseInt(o,10)<2147483647&&s.push(o)}s.push("999");var r=[];if(!(0,h.isNullOrUndefined)(t.parentElement)&&"BODY"!==t.parentElement.tagName){var a=[].slice.call(t.parentElement.children);for(l=0;l<a.length;l++)if(!t.isEqualNode(a[l])){o=document.defaultView.getComputedStyle(a[l],null).getPropertyValue("z-index"),n=document.defaultView.getComputedStyle(a[l],null).getPropertyValue("position");"auto"!==o&&"static"!==n&&parseInt(o,10)<2147483647&&r.push(o)}}var d=i.concat(s,r),p=Math.max.apply(Math,d)+1;return p>2147483647?2147483647:p}function ot(t){void 0===t&&(t=["*"]);for(var e=[],i=0;i<t.length;i++)for(var o=document.getElementsByTagName(t[i]),n=0;n<o.length;n++){var s=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("z-index"),l=document.defaultView.getComputedStyle(o[n],null).getPropertyValue("position");"auto"!==s&&"static"!==l&&e.push(s)}var r=Math.max.apply(Math,e)+1;return r>2147483647?2147483647:r}var nt,st,lt,rt,at,ht,dt,pt,ct=n(741),ut=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ft=function(t,e,i,o){var n,s=arguments.length,l=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,i,o);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(l=(s<3?n(l):s>3?n(e,i,l):n(e,i))||l);return s>3&&l&&Object.defineProperty(e,i,l),l},mt="e-tooltip",gt="e-rtl",yt="e-icons",vt="e-tooltip-close",bt="e-tooltip-wrap",Et="e-tip-content",Ot="e-arrow-tip",Ct="e-arrow-tip-outer",wt="e-arrow-tip-inner",Nt="e-tip-bottom",Tt="e-tip-top",Pt="e-tip-left",St="e-tip-right",xt="e-popup",Ut="e-popup-open",Bt="e-popup-close",Ht="e-lib",kt="e-tooltip-popup-container",Mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),ft([(0,h.Property)({effect:"FadeIn",duration:150,delay:0})],e.prototype,"open",void 0),ft([(0,h.Property)({effect:"FadeOut",duration:150,delay:0})],e.prototype,"close",void 0),e}(h.ChildProperty),Lt=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o.mouseMoveEvent=null,o.mouseMoveTarget=null,o.containerElement=null,o.isBodyContainer=!0,o}return ut(e,t),e.prototype.initialize=function(){this.formatPosition(),(0,h.addClass)([this.element],mt)},e.prototype.formatPosition=function(){var t,e;this.position&&(0===this.position.indexOf("Top")||0===this.position.indexOf("Bottom")?(t=this.position.split(/(?=[A-Z])/),this.tooltipPositionY=t[0],this.tooltipPositionX=t[1]):(e=this.position.split(/(?=[A-Z])/),this.tooltipPositionX=e[0],this.tooltipPositionY=e[1]))},e.prototype.renderArrow=function(){this.setTipClass(this.position);var t=this.createElement("div",{className:Ot+" "+this.tipClass});t.appendChild(this.createElement("div",{className:Ct+" "+this.tipClass})),t.appendChild(this.createElement("div",{className:wt+" "+this.tipClass})),this.tooltipEle.appendChild(t)},e.prototype.setTipClass=function(t){0===t.indexOf("Right")?this.tipClass=Pt:0===t.indexOf("Bottom")?this.tipClass=Tt:0===t.indexOf("Left")?this.tipClass=St:this.tipClass=Nt},e.prototype.renderPopup=function(t){var e=this.mouseTrail?{top:0,left:0}:this.getTooltipPosition(t);this.tooltipEle.classList.remove(Ht),this.popupObj=new tt(this.tooltipEle,{height:this.height,width:this.width,position:{X:e.left,Y:e.top},enableRtl:this.enableRtl,open:this.openPopupHandler.bind(this),close:this.closePopupHandler.bind(this)})},e.prototype.getScalingFactor=function(t){if(!t)return{x:1,y:1};var e={x:1,y:1},i=t.closest('[style*="transform: scale"]');if(i&&i!==this.tooltipEle&&i.contains(this.tooltipEle)){var o=window.getComputedStyle(i).getPropertyValue("transform").match(/matrix\(([^)]+)\)/)[1].split(",").map(parseFloat);e.x=o[0],e.y=o[3]}return e},e.prototype.getTooltipPosition=function(t){this.tooltipEle.style.display="block";var e=this.element.closest('[style*="zoom"]');e&&(e.contains(this.tooltipEle)||(this.tooltipEle.style.zoom=getComputedStyle(e).zoom));var i=c(t,this.tooltipPositionX,this.tooltipPositionY,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect()),o=this.getScalingFactor(t),n=this.calculateTooltipOffset(this.position,o.x,o.y),s=this.calculateElementPosition(i,n),l=s[0],r=s[1],a=this.collisionFlipFit(t,l,r);return a.left=a.left/o.x,a.top=a.top/o.y,this.tooltipEle.style.display="",a},e.prototype.windowResize=function(){this.reposition(this.findTarget())},e.prototype.reposition=function(t){if(this.popupObj&&t){var e=this.getTooltipPosition(t);this.popupObj.position={X:e.left,Y:e.top},this.popupObj.dataBind()}},e.prototype.openPopupHandler=function(){!this.mouseTrail&&this.needTemplateReposition()&&this.reposition(this.findTarget()),this.trigger("afterOpen",this.tooltipEventArgs),this.tooltipEventArgs=null},e.prototype.closePopupHandler=function(){this.isReact&&"Click"!==this.opensOn&&"function"!=typeof this.content&&this.clearTemplate(["content"]),this.clear();var t={type:this.tooltipEventArgs.event?this.tooltipEventArgs.event.type:null,cancel:!1,target:this.tooltipEventArgs.target,event:this.tooltipEventArgs.event?this.tooltipEventArgs.event:null,element:this.tooltipEle,isInteracted:!(0,h.isNullOrUndefined)(this.tooltipEventArgs.event)};this.trigger("afterClose",t),t=null},e.prototype.calculateTooltipOffset=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=1);var o,n,s,l,r,a,d,p,c={top:0,left:0};if(1!==e||1!==i){var u=this.tooltipEle.getBoundingClientRect(),f=void 0;s=Math.round(u.width),l=Math.round(u.height),(r=(0,h.select)("."+Ot,this.tooltipEle))&&(f=r.getBoundingClientRect()),o=r?Math.round(f.width):0,n=r?Math.round(f.height):0,a=this.showTipPointer?0:8,d=n/2+2+(l-this.tooltipEle.clientHeight*i),p=o/2+2+(s-this.tooltipEle.clientWidth*e)}else s=this.tooltipEle.offsetWidth,l=this.tooltipEle.offsetHeight,o=(r=(0,h.select)("."+Ot,this.tooltipEle))?r.offsetWidth:0,n=r?r.offsetHeight:0,a=this.showTipPointer?0:8,d=n/2+2+(this.tooltipEle.offsetHeight-this.tooltipEle.clientHeight),p=o/2+2+(this.tooltipEle.offsetWidth-this.tooltipEle.clientWidth);switch(this.mouseTrail&&(a+=2),t){case"RightTop":c.left+=o+a,c.top-=l-d;break;case"RightCenter":c.left+=o+a,c.top-=l/2;break;case"RightBottom":c.left+=o+a,c.top-=d;break;case"BottomRight":c.top+=n+a,c.left-=p;break;case"BottomCenter":c.top+=n+a,c.left-=s/2;break;case"BottomLeft":c.top+=n+a,c.left-=s-p;break;case"LeftBottom":c.left-=o+s+a,c.top-=d;break;case"LeftCenter":c.left-=o+s+a,c.top-=l/2;break;case"LeftTop":c.left-=o+s+a,c.top-=l-d;break;case"TopLeft":c.top-=l+n+a,c.left-=s-p;break;case"TopRight":c.top-=l+n+a,c.left-=p;break;default:c.top-=l+n+a,c.left-=s/2}return c.left+=this.offsetX,c.top+=this.offsetY,c},e.prototype.updateTipPosition=function(t){var e=(0,h.selectAll)("."+Ot+",."+Ct+",."+wt,this.tooltipEle),i=[Nt,Tt,Pt,St];(0,h.removeClass)(e,i),this.setTipClass(t),(0,h.addClass)(e,this.tipClass)},e.prototype.adjustArrow=function(t,e,i,o){var n=(0,h.select)("."+Ot,this.tooltipEle);if(!1!==this.showTipPointer&&null!==n){var s,l;this.updateTipPosition(e),this.tooltipEle.style.display="block";var r,a=this.tooltipEle.clientWidth,d=this.tooltipEle.clientHeight,p=(0,h.select)("."+wt,this.tooltipEle),c=n.offsetWidth,u=n.offsetHeight;if(this.tooltipEle.style.display="",this.tipClass===Nt||this.tipClass===Tt){if(this.tipClass===Nt?(l="99.9%",p.style.top="-"+(u-2)+"px"):(l=-(u-1)+"px",p.style.top="-"+(u-6)+"px"),t)s=(r="Center"!==i||a>t.offsetWidth||this.mouseTrail)&&"Left"===i||!r&&"End"===this.tipPointerPosition?a-c-2+"px":r&&"Right"===i||!r&&"Start"===this.tipPointerPosition?"2px":!r||"End"!==this.tipPointerPosition&&"Start"!==this.tipPointerPosition?a/2-c/2+"px":"End"===this.tipPointerPosition?t.offsetWidth+(this.tooltipEle.offsetWidth-t.offsetWidth)/2-c/2-2+"px":(this.tooltipEle.offsetWidth-t.offsetWidth)/2-c/2+2+"px"}else this.tipClass===St?(s="99.9%",p.style.left="-"+(c-2)+"px"):(s=-(c-1)+"px",p.style.left=c-2-c+"px"),l=(r="Center"!==o||d>t.offsetHeight||this.mouseTrail)&&"Top"===o||!r&&"End"===this.tipPointerPosition?d-u-2+"px":r&&"Bottom"===o||!r&&"Start"===this.tipPointerPosition?"2px":d/2-u/2+"px";n.style.top=l,n.style.left=s}},e.prototype.renderContent=function(t){var e=this,i=(0,h.select)("."+Et,this.tooltipEle);if(this.cssClass&&(0,h.addClass)([this.tooltipEle],this.cssClass.split(" ")),t&&!(0,h.isNullOrUndefined)(t.getAttribute("title"))&&(t.setAttribute("data-content",t.getAttribute("title")),t.removeAttribute("title")),(0,h.isNullOrUndefined)(this.content))t&&!(0,h.isNullOrUndefined)(t.getAttribute("data-content"))&&(i.innerHTML=t.getAttribute("data-content"));else if(i.innerHTML="",this.content instanceof HTMLElement)i.appendChild(this.content);else if("string"==typeof this.content){if(this.isAngular?this.setProperties({content:this.enableHtmlSanitizer?h.SanitizeHtmlHelper.sanitize(this.content):this.content},!0):this.content=this.enableHtmlSanitizer?h.SanitizeHtmlHelper.sanitize(this.content):this.content,this.enableHtmlParse)(o=(0,h.compile)(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i,this.root))&&(0,h.append)(o,i);else i.textContent=this.content}else{var o;(o=(0,h.compile)(this.content)({},this,"content",this.element.id+"content",void 0,void 0,i))&&(this.isAngular&&"ZoomIn"===this.animation.open.effect&&setTimeout(function(){e.reposition(t)},1),(0,h.append)(o,i)),this.renderReactTemplates()}},e.prototype.renderCloseIcon=function(){if(this.isSticky){var t=this.createElement("div",{className:yt+" "+vt,attrs:{role:"button","aria-label":"Press escape to close the Tooltip"}});this.tooltipEle.appendChild(t),h.EventHandler.add(t,h.Browser.touchStartEvent,this.onStickyClose,this)}else{var e=this.tooltipEle.querySelector("."+yt+"."+vt);e&&(0,h.remove)(e)}},e.prototype.addDescribedBy=function(t,e){var i=(t.getAttribute("aria-describedby")||"").split(/\s+/);i.indexOf(e)<0&&i.push(e),(0,h.attributes)(t,{"aria-describedby":i.join(" ").trim(),"data-tooltip-id":e})},e.prototype.removeDescribedBy=function(t){var e=t.getAttribute("data-tooltip-id"),i=(t.getAttribute("aria-describedby")||"").split(/\s+/),o=i.indexOf(e);-1!==o&&i.splice(o,1),t.removeAttribute("data-tooltip-id");var n=i.join(" ").trim();n?t.setAttribute("aria-describedby",n):t.removeAttribute("aria-describedby")},e.prototype.tapHoldHandler=function(t){clearTimeout(this.autoCloseTimer),this.targetHover(t.originalEvent)},e.prototype.touchEndHandler=function(){var t=this;if(!this.isSticky){this.autoCloseTimer=setTimeout(function(){t.close()},1500)}},e.prototype.targetClick=function(t){var e;if(e=this.target?(0,h.closest)(t.target,this.target):this.element,!(0,h.isNullOrUndefined)(e)){var i=t;null===e.getAttribute("data-tooltip-id")?"mousedown"===i.type&&2===i.button||this.targetHover(t):this.isSticky||this.hideTooltip(this.animation.close,t,e)}},e.prototype.targetHover=function(t){var e;if(e=this.target?(0,h.closest)(t.target,this.target):this.element,!((0,h.isNullOrUndefined)(e)||null!==e.getAttribute("data-tooltip-id")&&0===this.closeDelay)){!(0,h.isNullOrUndefined)(this.tooltipEle)&&this.tooltipEle.getAttribute("e-animation-id")&&(h.Animation.stop(this.tooltipEle),this.clear());for(var i=0,o=[].slice.call((0,h.selectAll)('[data-tooltip-id= "'+this.ctrlId+'_content"]',document));i<o.length;i++){var n=o[i];this.restoreElement(n)}this.showTooltip(e,this.animation.open,t)}},e.prototype.mouseMoveBeforeOpen=function(t){this.mouseMoveEvent=t},e.prototype.mouseMoveBeforeRemove=function(){this.mouseMoveTarget&&h.EventHandler.remove(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen)},e.prototype.showTooltip=function(t,e,i){var o=this;clearTimeout(this.showTimer),clearTimeout(this.hideTimer),this.openDelay&&this.mouseTrail&&(this.mouseMoveBeforeRemove(),this.mouseMoveTarget=t,h.EventHandler.add(this.mouseMoveTarget,"mousemove touchstart",this.mouseMoveBeforeOpen,this)),this.tooltipEventArgs={type:i?i.type:null,cancel:!1,target:t,event:i||null,element:this.tooltipEle,isInteracted:!(0,h.isNullOrUndefined)(i)};this.trigger("beforeRender",this.tooltipEventArgs,function(n){o.beforeRenderCallback(n,t,i,e)}.bind(this))},e.prototype.beforeRenderCallback=function(t,e,i,o){t.cancel?(this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove()):(this.isHidden=!1,(0,h.isNullOrUndefined)(this.tooltipEle)?(this.ctrlId=this.element.getAttribute("id")?(0,h.getUniqueID)(this.element.getAttribute("id")):(0,h.getUniqueID)("tooltip"),this.tooltipEle=this.createElement("div",{className:bt+" "+xt+" "+Ht,attrs:{role:"tooltip","aria-hidden":"false",id:this.ctrlId+"_content"}}),this.tooltipEle.style.width=(0,h.formatUnit)(this.width),this.tooltipEle.style.height=(0,h.formatUnit)(this.height),this.tooltipEle.style.position="absolute",this.tooltipBeforeRender(e,this),this.tooltipAfterRender(e,i,o,this)):e&&(this.adjustArrow(e,this.position,this.tooltipPositionX,this.tooltipPositionY),this.addDescribedBy(e,this.ctrlId+"_content"),this.renderContent(e),h.Animation.stop(this.tooltipEle),this.reposition(e),this.tooltipAfterRender(e,i,o,this)))},e.prototype.appendContainer=function(t){if("string"==typeof this.container)if("body"===this.container){var e=document.body;if(this.isAngular){var i=this.element&&this.element.closest?this.element.closest(".cdk-overlay-pane"):null,o=this.element&&this.element.closest?this.element.closest("[popover]"):null;i&&o&&(e=i)}this.containerElement=e}else this.isBodyContainer=!1,this.containerElement=(0,h.select)(this.container,document);else this.container instanceof HTMLElement&&(this.containerElement=this.container,this.isBodyContainer="BODY"===this.containerElement.tagName);this.isBodyContainer||(0,h.addClass)([this.containerElement],kt),this.containerElement.appendChild(t.tooltipEle)},e.prototype.tooltipBeforeRender=function(t,e){t&&(h.Browser.isDevice&&(0,h.addClass)([e.tooltipEle],"e-bigger"),"auto"!==e.width&&(e.tooltipEle.style.maxWidth=(0,h.formatUnit)(e.width)),e.tooltipEle.appendChild(e.createElement("div",{className:Et})),this.appendContainer(e),(0,h.removeClass)([e.tooltipEle],"e-hidden"),e.addDescribedBy(t,e.ctrlId+"_content"),e.renderContent(t),(0,h.addClass)([e.tooltipEle],Ut),e.showTipPointer&&e.renderArrow(),e.renderCloseIcon(),e.renderPopup(t),e.adjustArrow(t,e.position,e.tooltipPositionX,e.tooltipPositionY),h.Animation.stop(e.tooltipEle),e.reposition(t))},e.prototype.tooltipAfterRender=function(t,e,i,o){if(t){(0,h.removeClass)([o.tooltipEle],Ut),(0,h.addClass)([o.tooltipEle],Bt),o.tooltipEventArgs={type:e?e.type:null,cancel:!1,target:t,event:e||null,element:o.tooltipEle,isInteracted:!(0,h.isNullOrUndefined)(e)},o.needTemplateReposition()&&!o.mouseTrail&&("None"===i.effect||"FadeIn"===i.effect||this.isReact&&"string"!=typeof o.content)&&(o.tooltipEle.style.display="none");o.trigger("beforeOpen",o.tooltipEventArgs,function(n){o.beforeOpenCallback(n,t,i,e)}.bind(o))}},e.prototype.beforeOpenCallback=function(t,e,i,o){var n=this;if(t.cancel)this.isHidden=!0,this.clear(),this.mouseMoveBeforeRemove(),this.restoreElement(e);else{var s={name:"None"===i.effect&&"Enable"===h.animationMode?"FadeIn":this.animation.open.effect,duration:i.duration,delay:i.delay,timingFunction:"easeOut"};if("None"===i.effect&&(s=void 0),this.openDelay>0){this.showTimer=setTimeout(function(){n.mouseTrail&&h.EventHandler.add(e,"mousemove touchstart mouseenter",n.onMouseMove,n),n.popupObj&&(n.popupObj.show(s,e),n.mouseMoveEvent&&n.mouseTrail&&n.onMouseMove(n.mouseMoveEvent))},this.openDelay)}else this.popupObj&&this.popupObj.show(s,e)}o&&this.wireMouseEvents(o,e)},e.prototype.needTemplateReposition=function(){return!(0,h.isNullOrUndefined)(this.viewContainerRef)&&"string"!=typeof this.viewContainerRef||this.isReact},e.prototype.checkCollision=function(t,e,i){var o={left:e,top:i,position:this.position,horizontal:this.tooltipPositionX,vertical:this.tooltipPositionY},n=N(this.tooltipEle,this.checkCollideTarget(),e,i);return n.length>0&&(o.horizontal=n.indexOf("left")>=0?"Right":n.indexOf("right")>=0?"Left":this.tooltipPositionX,o.vertical=n.indexOf("top")>=0?"Bottom":n.indexOf("bottom")>=0?"Top":this.tooltipPositionY),o},e.prototype.calculateElementPosition=function(t,e){return[this.isBodyContainer?t.left+e.left:t.left-this.containerElement.getBoundingClientRect().left+e.left+window.pageXOffset+this.containerElement.scrollLeft,this.isBodyContainer?t.top+e.top:t.top-this.containerElement.getBoundingClientRect().top+e.top+window.pageYOffset+this.containerElement.scrollTop]},e.prototype.collisionFlipFit=function(t,e,i){var o=this.checkCollision(t,e,i),n=o.position;if(this.tooltipPositionY!==o.vertical&&(n=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?o.vertical+this.tooltipPositionX:this.tooltipPositionX+o.vertical),this.tooltipPositionX!==o.horizontal&&(0===n.indexOf("Left")&&(o.vertical="LeftTop"===n||"LeftCenter"===n?"Top":"Bottom",n=o.vertical+"Left"),0===n.indexOf("Right")&&(o.vertical="RightTop"===n||"RightCenter"===n?"Top":"Bottom",n=o.vertical+"Right"),o.horizontal=this.tooltipPositionX),this.tooltipEventArgs={type:null,cancel:!1,target:t,event:null,element:this.tooltipEle,collidedPosition:n},this.trigger("beforeCollision",this.tooltipEventArgs),this.tooltipEventArgs.cancel)n=this.position;else{var s=o.vertical,l=o.horizontal;if(o.position!==n){var r=c(t,l,s,!this.isBodyContainer,this.isBodyContainer?null:this.containerElement.getBoundingClientRect());this.adjustArrow(t,n,l,s);var a=this.getScalingFactor(t),d=this.calculateTooltipOffset(n,a.x,a.y);d.top-=this.getOffSetPosition("TopBottom",n,this.offsetY),d.left-=this.getOffSetPosition("RightLeft",n,this.offsetX),o.position=n;var p=this.calculateElementPosition(r,d);o.left=p[0],o.top=p[1]}else this.adjustArrow(t,n,l,s)}var u={left:o.left,top:o.top},f=this.isBodyContainer?w(this.tooltipEle,this.checkCollideTarget(),{X:!0,Y:this.windowCollision},u):u;this.tooltipEle.style.display="block";var m=(0,h.select)("."+Ot,this.tooltipEle);if(this.showTipPointer&&null!=m&&(0===n.indexOf("Bottom")||0===n.indexOf("Top"))){var g=parseInt(m.style.left,10)-(f.left-o.left);g<0?g=0:g+m.offsetWidth>this.tooltipEle.clientWidth&&(g=this.tooltipEle.clientWidth-m.offsetWidth),m.style.left=g.toString()+"px"}return this.tooltipEle.style.display="",u.left=f.left,u.top=f.top,u},e.prototype.getOffSetPosition=function(t,e,i){return-1!==t.indexOf(this.position.split(/(?=[A-Z])/)[0])&&-1!==t.indexOf(e.split(/(?=[A-Z])/)[0])?2*i:0},e.prototype.checkCollideTarget=function(){return!this.windowCollision&&this.target?this.element:null},e.prototype.hideTooltip=function(t,e,i){var o=this;if(this.closeDelay>0){clearTimeout(this.hideTimer),clearTimeout(this.showTimer);this.hideTimer=setTimeout(function(){o.closeDelay&&o.tooltipEle&&o.isTooltipOpen||o.tooltipHide(t,e,i)},this.closeDelay)}else this.tooltipHide(t,e,i)},e.prototype.tooltipHide=function(t,e,i){var o,n=this;o=e?this.target?i||e.target:this.element:(0,h.select)('[data-tooltip-id= "'+this.ctrlId+'_content"]',document),this.tooltipEventArgs={type:e?e.type:null,cancel:!1,target:o,event:e||null,element:this.tooltipEle,isInteracted:!(0,h.isNullOrUndefined)(e)},this.trigger("beforeClose",this.tooltipEventArgs,function(i){i.cancel?n.isHidden=!1:(n.mouseMoveBeforeRemove(),n.popupHide(t,o,e))})},e.prototype.popupHide=function(t,e,i){e&&i&&this.restoreElement(e),this.isHidden=!0;var o={name:"None"===t.effect&&"Enable"===h.animationMode?"FadeOut":this.animation.close.effect,duration:t.duration,delay:t.delay,timingFunction:"easeIn"};"None"===t.effect&&(o=void 0),this.popupObj&&this.popupObj.hide(o)},e.prototype.restoreElement=function(t){this.unwireMouseEvents(t),(0,h.isNullOrUndefined)(t.getAttribute("data-content"))||(t.setAttribute("title",t.getAttribute("data-content")),t.removeAttribute("data-content")),this.removeDescribedBy(t)},e.prototype.clear=function(){var t=this.findTarget();t&&this.restoreElement(t),this.tooltipEle&&((0,h.removeClass)([this.tooltipEle],Bt),(0,h.addClass)([this.tooltipEle],Ut)),this.isHidden&&(this.popupObj&&this.popupObj.destroy(),this.tooltipEle&&(0,h.remove)(this.tooltipEle),this.tooltipEle=null,this.popupObj=null)},e.prototype.tooltipHover=function(){this.tooltipEle&&(this.isTooltipOpen=!0)},e.prototype.tooltipMouseOut=function(t){this.isTooltipOpen=!1,this.hideTooltip(this.animation.close,t,this.findTarget())},e.prototype.onMouseOut=function(t){var e=t.relatedTarget;if(e&&!this.mouseTrail){var i=(0,h.closest)(e,"."+bt+"."+Ht+"."+xt);i?h.EventHandler.add(i,"mouseleave",this.tooltipElementMouseOut,this):(this.hideTooltip(this.animation.close,t,this.findTarget()),0===this.closeDelay&&("None"===this.animation.close.effect||this.isReact&&"string"!=typeof this.content)&&this.clear())}else this.hideTooltip(this.animation.close,t,this.findTarget()),this.clear();this.popupObj&&!this.popupObj.element.classList.contains(Ut)&&this.clear()},e.prototype.tooltipElementMouseOut=function(t){this.hideTooltip(this.animation.close,t,this.findTarget()),h.EventHandler.remove(this.element,"mouseleave",this.tooltipElementMouseOut),this.clear()},e.prototype.onStickyClose=function(){this.close()},e.prototype.onMouseMove=function(t){var e=0,i=0;if(t.type.indexOf("touch")>-1?(t.preventDefault(),e=t.touches[0].pageX,i=t.touches[0].pageY):(e=t.pageX,i=t.pageY),!(0,h.isNullOrUndefined)(this.tooltipEle)){h.Animation.stop(this.tooltipEle),(0,h.removeClass)([this.tooltipEle],Bt),(0,h.addClass)([this.tooltipEle],Ut),this.adjustArrow(t.target,this.position,this.tooltipPositionX,this.tooltipPositionY);var o=this.getScalingFactor(t.target),n=this.calculateTooltipOffset(this.position,o.x,o.y),s=e+n.left+this.offsetX,l=i+n.top+this.offsetY,r=this.checkCollision(t.target,s,l);if(this.tooltipPositionX!==r.horizontal||this.tooltipPositionY!==r.vertical){var a=0===this.position.indexOf("Bottom")||0===this.position.indexOf("Top")?r.vertical+r.horizontal:r.horizontal+r.vertical;r.position=a,this.adjustArrow(t.target,r.position,r.horizontal,r.vertical);var d=this.calculateTooltipOffset(r.position,o.x,o.y);r.left=e+d.left-this.offsetX,r.top=i+d.top-this.offsetY}this.tooltipEle.style.left=r.left+"px",this.tooltipEle.style.top=r.top+"px"}},e.prototype.keyDown=function(t){this.tooltipEle&&27===t.keyCode&&this.close()},e.prototype.touchEnd=function(t){this.tooltipEle&&null===(0,h.closest)(t.target,"."+mt)&&!this.isSticky&&this.close()},e.prototype.scrollHandler=function(t){this.tooltipEle&&!this.isSticky&&((0,h.closest)(t.target,"."+bt+"."+Ht+"."+xt)||this.isSticky||this.close())},e.prototype.render=function(){this.initialize(),this.wireEvents(this.opensOn),this.renderComplete()},e.prototype.preRender=function(){this.tipClass=Nt,this.tooltipPositionX="Center",this.tooltipPositionY="Top",this.isHidden=!0},e.prototype.wireEvents=function(t){for(var e=0,i=this.getTriggerList(t);e<i.length;e++){var o=i[e];if("Custom"===o)return;"Focus"===o&&this.wireFocusEvents(),"Click"===o&&(h.Browser.isIos7||h.Browser.isIos)&&h.EventHandler.add(this.element,"mousedown",this.targetClick,this),"Click"!==o||h.Browser.isIos7||h.Browser.isIos||h.EventHandler.add(this.element,h.Browser.touchStartEvent,this.targetClick,this),"Hover"===o&&(h.Browser.isDevice?(this.touchModule=new h.Touch(this.element,{tapHoldThreshold:500,tapHold:this.tapHoldHandler.bind(this)}),h.EventHandler.add(this.element,h.Browser.touchEndEvent,this.touchEndHandler,this)):h.EventHandler.add(this.element,"mouseover",this.targetHover,this))}this.windowResizeBound=this.windowResize.bind(this),this.keyDownBound=this.keyDown.bind(this),this.touchEndBound=this.touchEnd.bind(this),this.scrollWheelBound=this.scrollHandler.bind(this),document.addEventListener("wheel",this.scrollWheelBound),document.addEventListener("scroll",this.scrollWheelBound),document.addEventListener("touchend",this.touchEndBound),document.addEventListener("keydown",this.keyDownBound),window.addEventListener("resize",this.windowResizeBound)},e.prototype.getTriggerList=function(t){return t?("Auto"===t&&(t=h.Browser.isDevice?"Hover":"Hover Focus"),t.split(" ")):[]},e.prototype.wireFocusEvents=function(){if((0,h.isNullOrUndefined)(this.target))h.EventHandler.add(this.element,"focusin",this.targetHover,this);else{var t=[].slice.call((0,h.selectAll)(this.target,this.element));if(this.targetsList=t,!(0,h.isNullOrUndefined)(this.targetsList)&&this.targetsList.length>0)for(var e=0,i=t;e<i.length;e++){var o=i[e];h.EventHandler.add(o,"focus",this.targetHover,this)}else h.EventHandler.add(this.element,"focusin",this.targetHover,this)}},e.prototype.wireMouseEvents=function(t,e){this.tooltipEle&&(this.isSticky||("focus"===t.type&&h.EventHandler.add(e,"blur",this.onMouseOut,this),"focusin"===t.type&&h.EventHandler.add(e,"focusout",this.onMouseOut,this),"mouseover"===t.type&&h.EventHandler.add(e,"mouseleave",this.onMouseOut,this),this.closeDelay&&(h.EventHandler.add(this.tooltipEle,"mouseenter",this.tooltipHover,this),h.EventHandler.add(this.tooltipEle,"mouseleave",this.tooltipMouseOut,this))),this.mouseTrail&&0===this.openDelay&&h.EventHandler.add(e,"mousemove touchstart mouseenter",this.onMouseMove,this))},e.prototype.unwireEvents=function(t){for(var e=0,i=this.getTriggerList(t);e<i.length;e++){var o=i[e];if("Custom"===o)return;"Focus"===o&&this.unwireFocusEvents(),"Click"===o&&h.EventHandler.remove(this.element,h.Browser.touchStartEvent,this.targetClick),"Hover"===o&&(h.Browser.isDevice?(this.touchModule&&this.touchModule.destroy(),h.EventHandler.remove(this.element,h.Browser.touchEndEvent,this.touchEndHandler)):h.EventHandler.remove(this.element,"mouseover",this.targetHover))}document.removeEventListener("touchend",this.touchEndBound),this.touchEndBound=null,document.removeEventListener("wheel",this.scrollWheelBound),document.removeEventListener("scroll",this.scrollWheelBound),this.scrollWheelBound=null,window.removeEventListener("resize",this.windowResizeBound),this.windowResizeBound=null,document.removeEventListener("keydown",this.keyDownBound),this.keyDownBound=null},e.prototype.unwireFocusEvents=function(){if((0,h.isNullOrUndefined)(this.target))h.EventHandler.remove(this.element,"focusin",this.targetHover);else{var t=[].slice.call((0,h.selectAll)(this.target,this.element));if(!(0,h.isNullOrUndefined)(this.targetsList)&&this.targetsList.length>0)for(var e=0,i=t;e<i.length;e++){var o=i[e];h.EventHandler.remove(o,"focus",this.targetHover)}else h.EventHandler.remove(this.element,"focusin",this.targetHover)}},e.prototype.unwireMouseEvents=function(t){if(!this.isSticky){for(var e=0,i=this.getTriggerList(this