mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-26 21:54:13 +01:00
3 lines
21 KiB
JavaScript
3 lines
21 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t=t||self).tippy=e(t.Popper)}(this,(function(t){"use strict";var e={passive:!0,capture:!0};function n(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function r(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function i(t,e){return"function"==typeof t?t.apply(void 0,e):t}function o(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout((function(){t(r)}),e)};var n}function a(t,e){var n=Object.assign({},t);return e.forEach((function(t){delete n[t]})),n}function s(t){return[].concat(t)}function u(t,e){-1===t.indexOf(e)&&t.push(e)}function c(t){return t.split("-")[0]}function p(t){return[].slice.call(t)}function f(){return document.createElement("div")}function l(t){return["Element","Fragment"].some((function(e){return r(t,e)}))}function d(t){return r(t,"MouseEvent")}function v(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function m(t){return l(t)?[t]:function(t){return r(t,"NodeList")}(t)?p(t):Array.isArray(t)?t:p(document.querySelectorAll(t))}function g(t,e){t.forEach((function(t){t&&(t.style.transitionDuration=e+"ms")}))}function h(t,e){t.forEach((function(t){t&&t.setAttribute("data-state",e)}))}function b(t){var e=s(t)[0];return e&&e.ownerDocument||document}function y(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(e){t[r](e,n)}))}var w={isTouch:!1},E=0;function T(){w.isTouch||(w.isTouch=!0,window.performance&&document.addEventListener("mousemove",x))}function x(){var t=performance.now();t-E<20&&(w.isTouch=!1,document.removeEventListener("mousemove",x)),E=t}function C(){var t=document.activeElement;if(v(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var A="undefined"!=typeof window&&"undefined"!=typeof document?navigator.userAgent:"",O=/MSIE |Trident\//.test(A),L=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},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(){},onClickOutside: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}),D=Object.keys(L);function k(t){var e=(t.plugins||[]).reduce((function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e}),{});return Object.assign({},t,{},e)}function M(t,e){var n=Object.assign({},e,{content:i(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(k(Object.assign({},L,{plugins:e}))):D).reduce((function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e}),{})}(t,e.plugins));return n.aria=Object.assign({},L.aria,{},n.aria),n.aria={expanded:"auto"===n.aria.expanded?e.interactive:n.aria.expanded,content:"auto"===n.aria.content?e.interactive?null:"describedby":n.aria.content},n}function V(t,e){t.innerHTML=e}function R(t){var e=f();return!0===t?e.className="tippy-arrow":(e.className="tippy-svg-arrow",l(t)?e.appendChild(t):V(e,t)),e}function j(t,e){l(e.content)?(V(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?V(t,e.content):t.textContent=e.content)}function P(t){var e=t.firstElementChild,n=p(e.children);return{box:e,content:n.find((function(t){return t.classList.contains("tippy-content")})),arrow:n.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function I(t){var e=f(),n=f();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=f();function i(n,r){var i=P(e),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof 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&&n.allowHTML===r.allowHTML||j(a,t.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(R(r.arrow))):o.appendChild(R(r.arrow)):s&&o.removeChild(s)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),j(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props),{popper:e,onUpdate:i}}I.$$tippy=!0;var S=1,B=[],H=[];function U(r,a){var l,v,m,E,T,x,C,A,D,V=M(r,Object.assign({},L,{},k((l=a,Object.keys(l).reduce((function(t,e){return void 0!==l[e]&&(t[e]=l[e]),t}),{}))))),R=!1,j=!1,I=!1,U=!1,N=[],_=o(bt,V.interactiveDebounce),F=b(V.triggerTarget||r),W=S++,$=(D=V.plugins).filter((function(t,e){return D.indexOf(t)===e})),q={id:W,reference:r,popper:f(),popperInstance:null,props:V,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:$,clearDelayTimeouts:function(){clearTimeout(v),clearTimeout(m),cancelAnimationFrame(E)},setProps:function(t){if(q.state.isDestroyed)return;it("onBeforeUpdate",[q,t]),gt();var e=q.props,n=M(r,Object.assign({},q.props,{},t,{ignoreAttributes:!0}));q.props=n,mt(),e.interactiveDebounce!==n.interactiveDebounce&&(st(),_=o(bt,n.interactiveDebounce));e.triggerTarget&&!n.triggerTarget?s(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):n.triggerTarget&&r.removeAttribute("aria-expanded");at(),rt(),z&&z(e,n);q.popperInstance&&(Tt(),Ct().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));it("onAfterUpdate",[q,t])},setContent:function(t){q.setProps({content:t})},show:function(){var t=q.state.isVisible,e=q.state.isDestroyed,r=!q.state.isEnabled,o=w.isTouch&&!q.props.touch,a=n(q.props.duration,0,L.duration);if(t||e||r||o)return;if(tt().hasAttribute("disabled"))return;if(it("onShow",[q],!1),!1===q.props.onShow(q))return;q.state.isVisible=!0,Z()&&(Y.style.visibility="visible");rt(),ft(),q.state.isMounted||(Y.style.transition="none");if(Z()){var s=et(),c=s.box,p=s.content;g([c,p],0)}C=function(){if(q.state.isVisible&&!U){if(U=!0,Y.offsetHeight,Y.style.transition=q.props.moveTransition,Z()&&q.props.animation){var t=et(),e=t.box,n=t.content;g([e,n],a),h([e,n],"visible")}ot(),at(),u(H,q),q.state.isMounted=!0,it("onMount",[q]),q.props.animation&&Z()&&function(t,e){dt(t,e)}(a,(function(){q.state.isShown=!0,it("onShown",[q])}))}},function(){var t,e=q.props.appendTo,n=tt();t=q.props.interactive&&e===L.appendTo||"parent"===e?n.parentNode:i(e,[n]);t.contains(Y)||t.appendChild(Y);Tt()}()},hide:function(){var t=!q.state.isVisible,e=q.state.isDestroyed,r=!q.state.isEnabled,i=n(q.props.duration,1,L.duration);if(t||e||r)return;if(it("onHide",[q],!1),!1===q.props.onHide(q))return;q.state.isVisible=!1,q.state.isShown=!1,U=!1,Z()&&(Y.style.visibility="hidden");if(st(),lt(),rt(),Z()){var o=et(),a=o.box,s=o.content;q.props.animation&&(g([a,s],i),h([a,s],"hidden"))}ot(),at(),q.props.animation?Z()&&function(t,e){dt(t,(function(){!q.state.isVisible&&Y.parentNode&&Y.parentNode.contains(Y)&&e()}))}(i,q.unmount):q.unmount()},hideWithInteractivity:function(t){F.addEventListener("mousemove",_),u(B,_),_(t)},enable:function(){q.state.isEnabled=!0},disable:function(){q.hide(),q.state.isEnabled=!1},unmount:function(){q.state.isVisible&&q.hide();if(!q.state.isMounted)return;xt(),Ct().forEach((function(t){t._tippy.unmount()})),Y.parentNode&&Y.parentNode.removeChild(Y);H=H.filter((function(t){return t!==q})),q.state.isMounted=!1,it("onHidden",[q])},destroy:function(){if(q.state.isDestroyed)return;q.clearDelayTimeouts(),q.unmount(),gt(),delete r._tippy,q.state.isDestroyed=!0,it("onDestroy",[q])}};if(!V.render)return q;var X=V.render(q),Y=X.popper,z=X.onUpdate;Y.setAttribute("data-tippy-root",""),Y.id="tippy-"+q.id,q.popper=Y,r._tippy=q,Y._tippy=q;var J=$.map((function(t){return t.fn(q)})),G=r.hasAttribute("aria-expanded");return mt(),at(),rt(),it("onCreate",[q]),V.showOnCreate&&At(),Y.addEventListener("mouseenter",(function(){q.props.interactive&&q.state.isVisible&&q.clearDelayTimeouts()})),Y.addEventListener("mouseleave",(function(t){q.props.interactive&&q.props.trigger.indexOf("mouseenter")>=0&&(F.addEventListener("mousemove",_),_(t))})),q;function K(){var t=q.props.touch;return Array.isArray(t)?t:[t,0]}function Q(){return"hold"===K()[0]}function Z(){var t;return!!(null==(t=q.props.render)?void 0:t.$$tippy)}function tt(){return A||r}function et(){return P(Y)}function nt(t){return q.state.isMounted&&!q.state.isVisible||w.isTouch||T&&"focus"===T.type?0:n(q.props.delay,t?0:1,L.delay)}function rt(){Y.style.pointerEvents=q.props.interactive&&q.state.isVisible?"":"none",Y.style.zIndex=""+q.props.zIndex}function it(t,e,n){var r;(void 0===n&&(n=!0),J.forEach((function(n){n[t]&&n[t].apply(void 0,e)})),n)&&(r=q.props)[t].apply(r,e)}function ot(){var t=q.props.aria;if(t.content){var e="aria-"+t.content,n=Y.id;s(q.props.triggerTarget||r).forEach((function(t){var r=t.getAttribute(e);if(q.state.isVisible)t.setAttribute(e,r?r+" "+n:n);else{var i=r&&r.replace(n,"").trim();i?t.setAttribute(e,i):t.removeAttribute(e)}}))}}function at(){!G&&q.props.aria.expanded&&s(q.props.triggerTarget||r).forEach((function(t){q.props.interactive?t.setAttribute("aria-expanded",q.state.isVisible&&t===tt()?"true":"false"):t.removeAttribute("aria-expanded")}))}function st(){F.removeEventListener("mousemove",_),B=B.filter((function(t){return t!==_}))}function ut(t){if(!(w.isTouch&&(I||"mousedown"===t.type)||q.props.interactive&&Y.contains(t.target))){if(tt().contains(t.target)){if(w.isTouch)return;if(q.state.isVisible&&q.props.trigger.indexOf("click")>=0)return}else it("onClickOutside",[q,t]);!0===q.props.hideOnClick&&(R=!1,q.clearDelayTimeouts(),q.hide(),j=!0,setTimeout((function(){j=!1})),q.state.isMounted||lt())}}function ct(){I=!0}function pt(){I=!1}function ft(){F.addEventListener("mousedown",ut,!0),F.addEventListener("touchend",ut,e),F.addEventListener("touchstart",pt,e),F.addEventListener("touchmove",ct,e)}function lt(){F.removeEventListener("mousedown",ut,!0),F.removeEventListener("touchend",ut,e),F.removeEventListener("touchstart",pt,e),F.removeEventListener("touchmove",ct,e)}function dt(t,e){var n=et().box;function r(t){t.target===n&&(y(n,"remove",r),e())}if(0===t)return e();y(n,"remove",x),y(n,"add",r),x=r}function vt(t,e,n){void 0===n&&(n=!1),s(q.props.triggerTarget||r).forEach((function(r){r.addEventListener(t,e,n),N.push({node:r,eventType:t,handler:e,options:n})}))}function mt(){var t;Q()&&(vt("touchstart",ht,{passive:!0}),vt("touchend",yt,{passive:!0})),(t=q.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(vt(t,ht),t){case"mouseenter":vt("mouseleave",yt);break;case"focus":vt(O?"focusout":"blur",wt);break;case"focusin":vt("focusout",wt)}}))}function gt(){N.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),N=[]}function ht(t){var e,n=!1;if(q.state.isEnabled&&!Et(t)&&!j){var r="focus"===(null==(e=T)?void 0:e.type);T=t,A=t.currentTarget,at(),!q.state.isVisible&&d(t)&&B.forEach((function(e){return e(t)})),"click"===t.type&&(q.props.trigger.indexOf("mouseenter")<0||R)&&!1!==q.props.hideOnClick&&q.state.isVisible?n=!0:At(t),"click"===t.type&&(R=!n),n&&!r&&Ot(t)}}function bt(t){var e=t.target,n=r.contains(e)||Y.contains(e);"mousemove"===t.type&&n||function(t,e){var n=e.clientX,r=e.clientY;return t.every((function(t){var e=t.popperRect,i=t.popperState,o=t.props.interactiveBorder,a=c(i.placement),s=i.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,p="top"===a?s.bottom.y:0,f="right"===a?s.left.x:0,l="left"===a?s.right.x:0,d=e.top-r+u>o,v=r-e.bottom-p>o,m=e.left-n+f>o,g=n-e.right-l>o;return d||v||m||g}))}(Ct().concat(Y).map((function(t){var e,n=null==(e=t._tippy.popperInstance)?void 0:e.state;return n?{popperRect:t.getBoundingClientRect(),popperState:n,props:V}:null})).filter(Boolean),t)&&(st(),Ot(t))}function yt(t){Et(t)||q.props.trigger.indexOf("click")>=0&&R||(q.props.interactive?q.hideWithInteractivity(t):Ot(t))}function wt(t){q.props.trigger.indexOf("focusin")<0&&t.target!==tt()||q.props.interactive&&t.relatedTarget&&Y.contains(t.relatedTarget)||Ot(t)}function Et(t){return!!w.isTouch&&Q()!==t.type.indexOf("touch")>=0}function Tt(){xt();var e=q.props,n=e.popperOptions,i=e.placement,o=e.offset,a=e.getReferenceClientRect,s=e.moveTransition,u=Z()?P(Y).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||tt()}:r,p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(Z()){var n=et().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?n.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?n.setAttribute("data-"+t,""):n.removeAttribute("data-"+t)})),e.attributes.popper={}}}}];Z()&&u&&p.push({name:"arrow",options:{element:u,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),q.popperInstance=t.createPopper(c,Y,Object.assign({},n,{placement:i,onFirstUpdate:C,modifiers:p}))}function xt(){q.popperInstance&&(q.popperInstance.destroy(),q.popperInstance=null)}function Ct(){return p(Y.querySelectorAll("[data-tippy-root]"))}function At(t){q.clearDelayTimeouts(),t&&it("onTrigger",[q,t]),ft();var e=nt(!0),n=K(),r=n[0],i=n[1];w.isTouch&&"hold"===r&&i&&(e=i),e?v=setTimeout((function(){q.show()}),e):q.show()}function Ot(t){if(q.clearDelayTimeouts(),it("onUntrigger",[q,t]),q.state.isVisible){if(!(q.props.trigger.indexOf("mouseenter")>=0&&q.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&R)){var e=nt(!1);e?m=setTimeout((function(){q.state.isVisible&&q.hide()}),e):E=requestAnimationFrame((function(){q.hide()}))}}else lt()}}function N(t,n){void 0===n&&(n={});var r=L.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",T,e),window.addEventListener("blur",C);var i=Object.assign({},n,{plugins:r}),o=m(t).reduce((function(t,e){var n=e&&U(e,i);return n&&t.push(n),t}),[]);return l(t)?o[0]:o}N.defaultProps=L,N.setDefaultProps=function(t){Object.keys(t).forEach((function(e){L[e]=t[e]}))},N.currentInput=w;var _={mouseover:"mouseenter",focusin:"focus",click:"click"};var F={name:"animateFill",defaultValue:!1,fn:function(t){var e;if(!(null==(e=t.props.render)?void 0:e.$$tippy))return{};var n=P(t.popper),r=n.box,i=n.content,o=t.props.animateFill?function(){var t=f();return t.className="tippy-backdrop",h([t],"hidden"),t}():null;return{onCreate:function(){o&&(r.insertBefore(o,r.firstElementChild),r.setAttribute("data-animatefill",""),r.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(o){var t=r.style.transitionDuration,e=Number(t.replace("ms",""));i.style.transitionDelay=Math.round(e/10)+"ms",o.style.transitionDuration=t,h([o],"visible")}},onShow:function(){o&&(o.style.transitionDuration="0ms")},onHide:function(){o&&h([o],"hidden")}}}};var W={clientX:0,clientY:0},$=[];function q(t){var e=t.clientX,n=t.clientY;W={clientX:e,clientY:n}}var X={name:"followCursor",defaultValue:!1,fn:function(t){var e=t.reference,n=b(t.props.triggerTarget||e),r=!1,i=!1,o=!0,a=t.props;function s(){return"initial"===t.props.followCursor&&t.state.isVisible}function u(){n.addEventListener("mousemove",f)}function c(){n.removeEventListener("mousemove",f)}function p(){r=!0,t.setProps({getReferenceClientRect:null}),r=!1}function f(n){var r=!n.target||e.contains(n.target),i=t.props.followCursor,o=n.clientX,a=n.clientY,s=e.getBoundingClientRect(),u=o-s.left,c=a-s.top;!r&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=e.getBoundingClientRect(),n=o,r=a;"initial"===i&&(n=t.left+u,r=t.top+c);var s="horizontal"===i?t.top:r,p="vertical"===i?t.right:n,f="horizontal"===i?t.bottom:r,l="vertical"===i?t.left:n;return{width:p-l,height:f-s,top:s,right:p,bottom:f,left:l}}})}function l(){t.props.followCursor&&($.push({instance:t,doc:n}),function(t){t.addEventListener("mousemove",q)}(n))}function d(){0===($=$.filter((function(e){return e.instance!==t}))).filter((function(t){return t.doc===n})).length&&function(t){t.removeEventListener("mousemove",q)}(n)}return{onCreate:l,onDestroy:d,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(e,n){var o=n.followCursor;r||void 0!==o&&a.followCursor!==o&&(d(),o?(l(),!t.state.isMounted||i||s()||u()):(c(),p()))},onMount:function(){t.props.followCursor&&(o&&(f(W),o=!1),i||s()||u())},onTrigger:function(t,e){var n=e.type;i="focus"===n},onHidden:function(){t.props.followCursor&&(p(),c(),o=!0)}}}};var Y={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e,n=t.reference;var r=-1,i=!1,o={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(i){var o=i.state;t.props.inlinePositioning&&(e!==o.placement&&t.setProps({getReferenceClientRect:function(){return function(t){return function(t,e,n,r){if(n.length<2||null===t)return e;if(2===n.length&&r>=0&&n[0].left>n[1].right)return n[r]||e;switch(t){case"top":case"bottom":var i=n[0],o=n[n.length-1],a="top"===t,s=i.top,u=o.bottom,c=a?i.left:o.left,p=a?i.right:o.right;return{top:s,bottom:u,left:c,right:p,width:p-c,height:u-s};case"left":case"right":var f=Math.min.apply(Math,n.map((function(t){return t.left}))),l=Math.max.apply(Math,n.map((function(t){return t.right}))),d=n.filter((function(e){return"left"===t?e.left===f:e.right===l})),v=d[0].top,m=d[d.length-1].bottom;return{top:v,bottom:m,left:f,right:l,width:l-f,height:m-v};default:return e}}(c(t),n.getBoundingClientRect(),p(n.getClientRects()),r)}(o.placement)}}),e=o.placement)}};function a(){var e;i||(e=function(t,e){var n;return{popperOptions:Object.assign({},t.popperOptions,{modifiers:[].concat(((null==(n=t.popperOptions)?void 0:n.modifiers)||[]).filter((function(t){return t.name!==e.name})),[e])})}}(t.props,o),i=!0,t.setProps(e),i=!1)}return{onCreate:a,onAfterUpdate:a,onTrigger:function(e,n){if(d(n)){var i=p(t.reference.getClientRects()),o=i.find((function(t){return t.left-2<=n.clientX&&t.right+2>=n.clientX&&t.top-2<=n.clientY&&t.bottom+2>=n.clientY}));r=i.indexOf(o)}},onUntrigger:function(){r=-1}}}};var z={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var s=r("reference")?(t.popperInstance?t.popperInstance.state.elements.reference:e).getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(s&&J(i,s)||u&&J(o,u))&&t.popperInstance&&t.popperInstance.update(),i=s,o=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function J(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return N.setDefaultProps({plugins:[F,X,Y,z],render:I}),N.createSingleton=function(t,e){void 0===e&&(e={});var n,r=t,i=[],o=e.overrides;function s(){i=r.map((function(t){return t.reference}))}function u(t){r.forEach((function(e){t?e.enable():e.disable()}))}u(!1),s();var c={fn:function(){return{onDestroy:function(){u(!0)},onTrigger:function(t,e){var a=e.currentTarget,s=i.indexOf(a);if(a!==n){n=a;var u=(o||[]).concat("content").reduce((function(t,e){return t[e]=r[s].props[e],t}),{});t.setProps(Object.assign({},u,{getReferenceClientRect:function(){return a.getBoundingClientRect()}}))}}}}},p=N(f(),Object.assign({},a(e,["overrides"]),{plugins:[c].concat(e.plugins||[]),triggerTarget:i})),l=p.setProps;return p.setProps=function(t){o=t.overrides||o,l(t)},p.setInstances=function(t){u(!0),r=t,u(!1),s(),p.setProps({triggerTarget:i})},p},N.delegate=function(t,e){var n=[],r=[],i=e.target,o=a(e,["target"]),u=Object.assign({},o,{trigger:"manual",touch:!1}),c=Object.assign({},o,{showOnCreate:!0}),p=N(t,u);function f(t){if(t.target){var n=t.target.closest(i);if(n){var o=n.getAttribute("data-tippy-trigger")||e.trigger||L.trigger;if(!n._tippy&&!("touchstart"===t.type&&"boolean"==typeof c.touch||"touchstart"!==t.type&&o.indexOf(_[t.type]))){var a=N(n,c);a&&(r=r.concat(a))}}}}function l(t,e,r,i){void 0===i&&(i=!1),t.addEventListener(e,r,i),n.push({node:t,eventType:e,handler:r,options:i})}return s(p).forEach((function(t){var e=t.destroy;t.destroy=function(t){void 0===t&&(t=!0),t&&r.forEach((function(t){t.destroy()})),r=[],n.forEach((function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)})),n=[],e()},function(t){var e=t.reference;l(e,"touchstart",f),l(e,"mouseover",f),l(e,"focusin",f),l(e,"click",f)}(t)})),p},N.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;H.forEach((function(t){var e=!1;if(n&&(e=v(n)?t.reference===n:t.popper===n.popper),!e){var i=t.props.duration;t.setProps({duration:r}),t.hide(),t.state.isDestroyed||t.setProps({duration:i})}}))},N.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>',N}));
|
|
//# sourceMappingURL=tippy.umd.min.js.map
|