tippy.js
Version:
Highly customizable tooltip and popover library
3 lines (2 loc) • 20.1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@popperjs/core")):"function"==typeof define&&define.amd?define(["exports","@popperjs/core"],t):t((e=e||self).tippy={},e.Popper)}(this,(function(e,t){"use strict";function n(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function r(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function i(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function o(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}function a(e){return[].concat(e)}function s(e,t){-1===e.indexOf(t)&&e.push(t)}function u(e,t){return e.filter((function(e){return e.name===t})).reduce((function(e,t){return Object.assign({},e,{},t,{options:Object.assign({},e.options,{},t.options)})}),{})}function c(e){return e.split("-")[0]}function p(e){return[].slice.call(e)}var f=Object.assign({appendTo:function(){return document.body},aria:"describedby",content:"",delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),l=Object.keys(f);function d(e){var t=(e.plugins||[]).reduce((function(t,n){var r=n.name,i=n.defaultValue;return r&&(t[r]=void 0!==e[r]?e[r]:i),t}),{});return Object.assign({},e,{},t)}function v(e,t){var n=Object.assign({},t,{},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(d(Object.assign({},f,{plugins:t}))):l).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.interactive&&(n.aria=null),n}var m="undefined"!=typeof window&&"undefined"!=typeof document,g=m?navigator.userAgent:"",h=/MSIE |Trident\//.test(g),b=m&&/iPhone|iPad|iPod/.test(navigator.platform),y={passive:!0};function w(){return document.createElement("div")}function T(e){return r(e,"Element")}function E(e){return r(e,"MouseEvent")}function A(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function x(e){return T(e)?[e]:function(e){return r(e,"NodeList")}(e)?p(e):Array.isArray(e)?e:p(document.querySelectorAll(e))}function O(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function C(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function D(e,t){for(;e;){if(t(e))return e;e=e.parentElement}return null}function L(e){var t=a(e)[0];return t&&t.ownerDocument||document}function P(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}var k={isTouch:!1},V=0;function j(){k.isTouch||(k.isTouch=!0,window.performance&&document.addEventListener("mousemove",M))}function M(){var e=performance.now();e-V<20&&(k.isTouch=!1,document.removeEventListener("mousemove",M)),V=e}function R(){var e=document.activeElement;if(A(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function S(e,t){e.innerHTML=t}function I(e){var t=w();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",T(e)?t.appendChild(e):S(t,e)),t}function B(e,t){var n=t.props,r=t.reference,i="function"==typeof n.content?n.content(r):n.content;T(i)?(S(e,""),e.appendChild(i)):n.allowHTML?S(e,i):e.textContent=i}function N(e){var t=e.firstElementChild,n=p(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")}))||null,backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))||null}}function H(e){var t=w(),n=w();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=w();function i(n,r){var i=N(t),o=i.box,a=i.content,s=i.arrow;t.style.zIndex=""+r.zIndex,r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content!==r.content&&B(a,e),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(I(r.arrow))):o.appendChild(I(r.arrow)):s&&o.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),B(r,e),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,update:i}}function _(e){return e.$$tippy}H.$$tippy=!0;var U=1,F=[],W=[];function q(e,r){var o,l,m,g,T,A,x,V,j=v(e,Object.assign({},f,{},d(r))),M=!1,R=!1,S=!1,I=[],B=i(he,j.interactiveDebounce),H=L(j.triggerTarget||e),q=U++,z=(V=j.plugins).filter((function(e,t){return V.indexOf(e)===t})),X={id:q,reference:e,popper:w(),popperInstance:null,props:j,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:z,clearDelayTimeouts:function(){clearTimeout(o),clearTimeout(l),cancelAnimationFrame(m)},setProps:function(t){if(X.state.isDestroyed)return;oe("onBeforeUpdate",[X,t]),me();var n=X.props,r=v(e,Object.assign({},X.props,{},t,{ignoreAttributes:!0}));X.props=r,ve(),n.interactiveDebounce!==r.interactiveDebounce&&(ue(),B=i(he,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?a(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");se(),re(),J&&J(n,r);X.popperInstance&&Te();oe("onAfterUpdate",[X,t])},setContent:function(e){X.setProps({content:e})},show:function(){var e=X.state.isVisible,t=X.state.isDestroyed,r=!X.state.isEnabled,i=k.isTouch&&!X.props.touch,o=n(X.props.duration,0,f.duration);if(e||t||r||i)return;if(ee().hasAttribute("disabled"))return;if(oe("onShow",[X],!1),!1===X.props.onShow(X))return;X.state.isVisible=!0,$.style.visibility="visible",re(),pe(),$.style.transition="none",A=function(){if(X.state.isVisible&&!S){if(S=!0,$.offsetHeight,$.style.transition=X.props.moveTransition,_(X.props.render)){var e=te(),t=e.box,n=e.content;X.props.animation&&(O([t,n],o),C([t,n],"visible"))}ae(),se(),s(W,X),ie(!0),X.state.isMounted=!0,oe("onMount",[X]),X.props.animation&&_(X.props.render)&&function(e,t){le(e,t)}(o,(function(){X.state.isShown=!0,oe("onShown",[X])}))}},function(){var e,t=X.props.appendTo,n=ee();X.props.interactive&&t===f.appendTo||"parent"===t?e=n.parentNode:(i=[n],e="function"==typeof(r=t)?r.apply(void 0,i):r);var r,i;e.contains($)||e.appendChild($);Te()}()},hide:function(){var e=!X.state.isVisible,t=X.state.isDestroyed,r=!X.state.isEnabled,i=n(X.props.duration,1,f.duration);if(e||t||r)return;if(oe("onHide",[X],!1),!1===X.props.onHide(X))return;if(X.state.isVisible=!1,X.state.isShown=!1,$.style.visibility="hidden",S=!1,ue(),fe(),re(),_(X.props.render)){var o=te(),a=o.box,s=o.content;X.props.animation&&(O([a,s],i),C([a,s],"hidden"))}ae(),se(),X.props.animation&&_(X.props.render)&&function(e,t){le(e,(function(){!X.state.isVisible&&$.parentNode&&$.parentNode.contains($)&&t()}))}(i,Ce)},enable:function(){X.state.isEnabled=!0},disable:function(){X.hide(),X.state.isEnabled=!1},unmount:Ce,destroy:function(){if(X.state.isDestroyed)return;X.clearDelayTimeouts(),X.unmount(),me(),delete e._tippy,X.state.isDestroyed=!0,oe("onDestroy",[X])}};if(!j.render)return X;var Y=j.render(X),$=Y.popper,J=Y.update;$.setAttribute("data-tippy-root",""),$.id="tippy-"+X.id,X.popper=$,e._tippy=X,$._tippy=X;var G=z.map((function(e){return e.fn(X)})),K=e.hasAttribute("aria-expanded");return ve(),se(),oe("onCreate",[X]),j.showOnCreate&&xe(),$.addEventListener("mouseenter",(function(){X.props.interactive&&X.state.isVisible&&X.clearDelayTimeouts()})),$.addEventListener("mouseleave",(function(){X.props.interactive&&X.props.trigger.indexOf("mouseenter")>=0&&H.addEventListener("mousemove",B)})),X;function Q(){var e=X.props.touch;return Array.isArray(e)?e:[e,0]}function Z(){return"hold"===Q()[0]}function ee(){return x||e}function te(){return N($)}function ne(e){return X.state.isMounted&&!X.state.isVisible||k.isTouch||g&&"focus"===g.type?0:n(X.props.delay,e?0:1,f.delay)}function re(){$.style.pointerEvents=X.props.interactive&&X.state.isVisible?"":"none"}function ie(e){var t=e&&b&&k.isTouch;H.body.classList[t?"add":"remove"]("tippy-iOS")}function oe(e,t,n){var r;(void 0===n&&(n=!0),G.forEach((function(n){n[e]&&n[e].apply(void 0,t)})),n)&&(r=X.props)[e].apply(r,t)}function ae(){var t=X.props.aria;if(t){var n="aria-"+t,r=$.id;a(X.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(X.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function se(){K||a(X.props.triggerTarget||e).forEach((function(e){X.props.interactive?e.setAttribute("aria-expanded",X.state.isVisible&&e===ee()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ue(){H.body.removeEventListener("mouseleave",Oe),H.removeEventListener("mousemove",B),F=F.filter((function(e){return e!==B}))}function ce(e){if(!X.props.interactive||!$.contains(e.target)){if(ee().contains(e.target)){if(k.isTouch)return;if(X.state.isVisible&&X.props.trigger.indexOf("click")>=0)return}!0===X.props.hideOnClick&&(M=!1,X.clearDelayTimeouts(),X.hide(),R=!0,setTimeout((function(){R=!1})),X.state.isMounted||fe())}}function pe(){H.addEventListener("mousedown",ce,!0)}function fe(){H.removeEventListener("mousedown",ce,!0)}function le(e,t){var n=te().box;function r(e){e.target===n&&(P(n,"remove",r),t())}if(0===e)return t();P(n,"remove",T),P(n,"add",r),T=r}function de(t,n,r){void 0===r&&(r=!1),a(X.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),I.push({node:e,eventType:t,handler:n,options:r})}))}function ve(){var e;Z()&&(de("touchstart",ge,y),de("touchend",be,y)),(e=X.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(de(e,ge),e){case"mouseenter":de("mouseleave",be);break;case"focus":de(h?"focusout":"blur",ye);break;case"focusin":de("focusout",ye)}}))}function me(){I.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),I=[]}function ge(e){var t=!1;if(X.state.isEnabled&&!we(e)&&!R){if(g=e,x=e.currentTarget,se(),!X.state.isVisible&&E(e)&&F.forEach((function(t){return t(e)})),"click"===e.type&&(X.props.trigger.indexOf("mouseenter")<0||M)&&!1!==X.props.hideOnClick&&X.state.isVisible)t=!0;else{var n=Q(),r=n[0],i=n[1];k.isTouch&&"hold"===r&&i?o=setTimeout((function(){xe(e)}),i):xe(e)}"click"===e.type&&(M=!t),t&&Oe(e)}}function he(t){D(t.target,(function(t){return t===e||t===$}))||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.basePlacement,i=e.popperRect,o=e.props,a=e.offsetData,s=o.interactiveBorder,u="bottom"===t?a.top.y:0,c="top"===t?a.bottom.y:0,p="right"===t?a.left.x:0,f="left"===t?a.right.x:0,l=i.top-r+u>s,d=r-i.bottom-c>s,v=i.left-n+p>s,m=n-i.right-f>s;return l||d||v||m}))}(Ae().concat($).map((function(e){var t=e._tippy;return t.popperInstance?{popperRect:e.getBoundingClientRect(),basePlacement:c(t.state.currentPlacement),offsetData:t.popperInstance.state.modifiersData.offset,props:j}:null})).filter(Boolean),t)&&(ue(),Oe(t))}function be(e){if(!(we(e)||X.props.trigger.indexOf("click")>=0&&M))return X.props.interactive?(H.body.addEventListener("mouseleave",Oe),H.addEventListener("mousemove",B),void s(F,B)):void Oe(e)}function ye(e){X.props.trigger.indexOf("focusin")<0&&e.target!==ee()||X.props.interactive&&e.relatedTarget&&$.contains(e.relatedTarget)||Oe(e)}function we(e){var t="ontouchstart"in window,n=e.type.indexOf("touch")>=0,r=Z();return t&&k.isTouch&&r&&!n||k.isTouch&&!r&&n}function Te(){Ee();var n=X.props,r=n.popperOptions,i=n.placement,o=n.offset,a=n.getReferenceClientRect,s=n.moveTransition,c=_(X.props.render)?N($).arrow:null,p=a?{getBoundingClientRect:a}:e,f={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;_(X.props.render)&&(delete t.attributes.popper["data-popper-placement"],te().box.setAttribute("data-placement",t.placement)),X.state.currentPlacement=t.placement}},l={name:"arrow",enabled:!!c,options:{element:c,padding:3}},d=[].concat((null==r?void 0:r.modifiers)||[],[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"computeStyles",options:{adaptive:!s}},f]).concat(_(X.props.render)?[l]:[]);X.popperInstance=t.createPopper(p,$,Object.assign({},r,{placement:i,onFirstUpdate:A,modifiers:[u(d,"offset"),u(d,"arrow"),u(d,"preventOverflow"),u(d,"flip"),u(d,"computeStyles")].concat(d)}))}function Ee(){X.popperInstance&&(X.popperInstance.destroy(),X.popperInstance=null)}function Ae(){return p($.querySelectorAll("[data-tippy-root]"))}function xe(e){X.clearDelayTimeouts(),e&&oe("onTrigger",[X,e]),pe();var t=ne(!0);t?o=setTimeout((function(){X.show()}),t):X.show()}function Oe(e){if(X.clearDelayTimeouts(),oe("onUntrigger",[X,e]),X.state.isVisible){if(!(X.props.trigger.indexOf("mouseenter")>=0&&X.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&M)){var t=ne(!1);t?l=setTimeout((function(){X.state.isVisible&&X.hide()}),t):m=requestAnimationFrame((function(){X.hide()}))}}else fe()}function Ce(){Ee(),Ae().forEach((function(e){e._tippy.unmount()})),$.parentNode&&$.parentNode.removeChild($),0===(W=W.filter((function(e){return e!==X}))).length&&ie(!1),X.state.isMounted=!1,oe("onHidden",[X])}}function z(e,t){void 0===t&&(t={});var n=f.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",j,Object.assign({},y,{capture:!0})),window.addEventListener("blur",R);var r=Object.assign({},t,{plugins:n}),i=x(e).reduce((function(e,t){var n=t&&q(t,r);return n&&e.push(n),e}),[]);return T(e)?i[0]:i}z.defaultProps=f,z.setDefaultProps=function(e){Object.keys(e).forEach((function(t){f[t]=e[t]}))},z.currentInput=k;var X={mouseover:"mouseenter",focusin:"focus",click:"click"};var Y={name:"animateFill",defaultValue:!1,fn:function(e){var t=N(e.popper),n=t.box,r=t.content,i=e.props.animateFill?function(){var e=w();return e.className="tippy-backdrop",C([e],"hidden"),e}():null;return{onCreate:function(){i&&(n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",e.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(i){var e=n.style.transitionDuration,t=Number(e.replace("ms",""));r.style.transitionDelay=Math.round(t/10)+"ms",i.style.transitionDuration=e,C([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&C([i],"hidden")}}}};var $={name:"followCursor",defaultValue:!1,fn:function(e){var t,n=e.reference,r=L(e.props.triggerTarget||n),i=null;function o(){return"manual"===e.props.trigger.trim()}function a(){var t=!!o()||null!==i&&!(0===i.clientX&&0===i.clientY);return e.props.followCursor&&t}function s(){e.setProps({getReferenceClientRect:null})}function u(){a()?r.addEventListener("mousemove",p):s()}function c(){r.removeEventListener("mousemove",p)}function p(r){var i=t=r,o=i.clientX,a=i.clientY,s=D(r.target,(function(e){return e===n})),u=e.props.followCursor;!s&&e.props.interactive||e.setProps({getReferenceClientRect:function(){var e=n.getBoundingClientRect();return{width:0,height:0,top:"horizontal"===u?e.top:a,bottom:"horizontal"===u?e.bottom:a,left:"vertical"===u?e.left:o,right:"vertical"===u?e.right:o}}}),(k.isTouch||"initial"===e.props.followCursor&&e.state.isVisible)&&c()}return{onMount:function(){a()&&p(t)},onShow:function(){o()&&(t=i={clientX:0,clientY:0},u())},onTrigger:function(e,n){i||(E(n)&&(i={clientX:n.clientX,clientY:n.clientY},t=n),u())},onUntrigger:function(){e.state.isVisible||(c(),i=null)},onHidden:function(){c(),s(),i=null}}}},J={name:"inlinePositioning",defaultValue:!1,fn:function(e){var t,n=e.reference;var r={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(r){var i=r.state;e.props.inlinePositioning&&(t!==i.placement&&e.setProps({getReferenceClientRect:function(){return function(e){return function(e,t,n){if(n.length<2||null===e)return t;switch(e){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===e,a=r.top,s=i.bottom,u=o?r.left:i.left,c=o?r.right:i.right;return{top:a,bottom:s,left:u,right:c,width:c-u,height:s-a};case"left":case"right":var p=Math.min.apply(Math,n.map((function(e){return e.left}))),f=Math.max.apply(Math,n.map((function(e){return e.right}))),l=n.filter((function(t){return"left"===e?t.left===p:t.right===f})),d=l[0].top,v=l[l.length-1].bottom;return{top:d,bottom:v,left:p,right:f,width:f-p,height:v-d};default:return t}}(c(e),n.getBoundingClientRect(),p(n.getClientRects()))}(i.placement)}}),t=i.placement)}};return{onCreate:function(){var t;e.setProps({popperOptions:{modifiers:[].concat((null==(t=e.popperInstance)?void 0:t.state.options.modifiers)||[],[r])}})}}}};var G={name:"sticky",defaultValue:!1,fn:function(e){var t=e.reference,n=e.popper;function r(t){return!0===e.props.sticky||e.props.sticky===t}var i=null,o=null;function a(){var s=r("reference")?(e.popperInstance?e.popperInstance.state.elements.reference:t).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&K(i,s)||u&&K(o,u))&&e.popperInstance&&e.popperInstance.update(),i=s,o=u,e.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){e.props.sticky&&a()}}}};function K(e,t){return!e||!t||(e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left)}z.setDefaultProps({plugins:[Y,$,J,G],render:H}),z.createSingleton=function(e,t){var n;void 0===t&&(t={}),e.forEach((function(e){e.disable()}));var r=e.map((function(e){return e.reference})),i={fn:function(){return{onDestroy:function(){e.forEach((function(e){e.enable()}))},onTrigger:function(i,o){var a=o.currentTarget,s=r.indexOf(a);if(a!==n){n=a;var u=(t.overrides||[]).concat("content").reduce((function(t,n){return t[n]=e[s].props[n],t}),{});i.setProps(Object.assign({},u,{getReferenceClientRect:function(){return a.getBoundingClientRect()}}))}}}}};return z(w(),Object.assign({},o(t,["overrides"]),{plugins:[i].concat(t.plugins||[]),triggerTarget:r}))},z.delegate=function(e,t){var n=[],r=[],i=t.target,s=o(t,["target"]),u=Object.assign({},s,{trigger:"manual"}),c=Object.assign({},s,{showOnCreate:!0}),p=z(e,u);function l(e){if(e.target){var n=e.target.closest(i);if(n)if(!((n.getAttribute("data-tippy-trigger")||t.trigger||f.trigger).indexOf(X[e.type])<0||n._tippy)){var o=z(n,c);o&&(r=r.concat(o))}}}function d(e,t,r,i){void 0===i&&(i=!1),e.addEventListener(t,r,i),n.push({node:e,eventType:t,handler:r,options:i})}return a(p).forEach((function(e){var t=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&r.forEach((function(e){e.destroy()})),r=[],n.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),n=[],t()},function(e){var t=e.reference;d(t,"mouseover",l),d(t,"focusin",l),d(t,"click",l)}(e)})),p},z.hideAll=function(e){var t=void 0===e?{}:e,n=t.exclude,r=t.duration;W.forEach((function(e){var t=!1;if(n&&(t=A(n)?e.reference===n:e.popper===n.popper),!t){var i=e.props.duration;e.setProps({duration:r}),e.hide(),e.setProps({duration:i})}}))},z.roundArrow='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',e.default=z}));
//# sourceMappingURL=tippy.umd.min.js.map