this.primereact=this.primereact||{},this.primereact.tooltip=function(t,e,n,i,o,r){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(e),l=s(n),u=s(r);function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;ns.width?(this.containerEl.style.left="0px",this.containerEl.style.right=window.innerWidth-s.width-o+"px"):(this.containerEl.style.right="",this.containerEl.style.left=o+"px"),this.containerEl.style.top=r+"px",i.DomHandler.addClass(this.containerEl,"p-tooltip-active")}else{var c=i.DomHandler.findCollisionPosition(this.state.position),p=this.getTargetOption(t,"my")||this.props.my||c.my,h=this.getTargetOption(t,"at")||this.props.at||c.at;this.containerEl.style.padding="0px",i.DomHandler.flipfitCollision(this.containerEl,t,p,h,(function(t){var e=t.at,o=e.x,r=n.props.at?"center"!==o&&o!==t.my.x?o:e.y:t.at["".concat(c.axis)];n.containerEl.style.padding="",n.setState({position:r},(function(){n.updateContainerPosition(),i.DomHandler.addClass(n.containerEl,"p-tooltip-active")}))}))}}},{key:"updateContainerPosition",value:function(){if(this.containerEl){var t=getComputedStyle(this.containerEl);"left"===this.state.position?this.containerEl.style.left=parseFloat(t.left)-2*parseFloat(t.paddingLeft)+"px":"top"===this.state.position&&(this.containerEl.style.top=parseFloat(t.top)-2*parseFloat(t.paddingTop)+"px")}}},{key:"onMouseEnter",value:function(){this.isAutoHide()||(this.allowHide=!1)}},{key:"onMouseLeave",value:function(t){this.isAutoHide()||(this.allowHide=!0,this.hide(t))}},{key:"bindDocumentResizeListener",value:function(){var t=this;this.documentResizeListener=function(e){i.DomHandler.isTouchDevice()||t.hide(e)},window.addEventListener("resize",this.documentResizeListener)}},{key:"unbindDocumentResizeListener",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"bindScrollListener",value:function(){var t=this;this.scrollHandler||(this.scrollHandler=new i.ConnectedOverlayScrollHandler(this.currentTarget,(function(e){t.state.visible&&t.hide(e)}))),this.scrollHandler.bindScrollListener()}},{key:"unbindScrollListener",value:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}},{key:"bindTargetEvent",value:function(t){if(t){var e=this.getEvents(t),n=e.showEvent,i=e.hideEvent,o=this.getTarget(t);o.addEventListener(n,this.show),o.addEventListener(i,this.hide)}}},{key:"unbindTargetEvent",value:function(t){if(t){var e=this.getEvents(t),n=e.showEvent,i=e.hideEvent,o=this.getTarget(t);o.removeEventListener(n,this.show),o.removeEventListener(i,this.hide)}}},{key:"applyDelay",value:function(t,e){this.clearTimeouts();var n=this.getTargetOption(this.currentTarget,t.toLowerCase())||this.props[t];n?this["".concat(t,"Timeout")]=setTimeout((function(){return e()}),n):e()}},{key:"sendCallback",value:function(t){if(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i