Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tippy.js

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tippy.js - npm Package Compare versions

Comparing version 0.16.3 to 0.17.0

3

dist/tippy.min.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tippy=e()}(this,function(){"use strict";function t(t){var e=!1,n=0,i=document.createElement("span");return new MutationObserver(function(){t(),e=!1}).observe(i,{attributes:!0}),function(){e||(e=!0,i.setAttribute("x-index",n),n+=1)}}function e(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},Mt))}}function n(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function i(t,e){Object.keys(e).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&n(e[i])&&(r="px"),t.style[i]=e[i]+r})}function r(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function o(t,e){if(1!==t.nodeType)return[];var n=window.getComputedStyle(t,null);return e?n[e]:n}function a(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function s(t){if(!t||-1!==["HTML","BODY","#document"].indexOf(t.nodeName))return window.document.body;var e=o(t),n=e.overflow,i=e.overflowX;return/(auto|scroll)/.test(n+e.overflowY+i)?t:s(a(t))}function p(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||t.firstElementChild.offsetParent===t)}function l(t){return null!==t.parentNode?l(t.parentNode):t}function u(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?e:window.document.documentElement}function f(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return window.document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,r=n?e:t,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||i.contains(r))return p(a)?a:u(a);var s=l(t);return s.host?f(s.host,e):f(t,l(e).host)}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var r=window.document.documentElement;return(window.document.scrollingElement||r)[n]}return t[n]}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=c(e,"top"),r=c(e,"left"),o=n?-1:1;return t.top+=i*o,t.bottom+=i*o,t.left+=r*o,t.right+=r*o,t}function h(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return+t["border"+n+"Width"].split("px")[0]+ +t["border"+i+"Width"].split("px")[0]}function m(t,e,n,i){return Math.max(e["offset"+t],n["client"+t],n["offset"+t],Bt()?n["offset"+t]+i["margin"+("Height"===t?"Top":"Left")]+i["margin"+("Height"===t?"Bottom":"Right")]:0)}function v(){var t=window.document.body,e=window.document.documentElement,n=Bt()&&window.getComputedStyle(e);return{height:m("Height",t,e,n),width:m("Width",t,e,n)}}function g(t){return Wt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(t){var e={};if(Bt())try{e=t.getBoundingClientRect();var n=c(t,"top"),i=c(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}catch(t){}else e=t.getBoundingClientRect();var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},a="HTML"===t.nodeName?v():{},s=a.width||t.clientWidth||r.right-r.left,p=a.height||t.clientHeight||r.bottom-r.top,l=t.offsetWidth-s,u=t.offsetHeight-p;if(l||u){var f=o(t);l-=h(f,"x"),u-=h(f,"y"),r.width-=l,r.height-=u}return g(r)}function w(t,e){var n=Bt(),i="HTML"===e.nodeName,r=b(t),a=b(e),p=s(t),l=g({top:r.top-a.top,left:r.left-a.left,width:r.width,height:r.height});if(i||"BODY"===e.nodeName){var u=o(e),f=n&&i?0:+u.borderTopWidth.split("px")[0],c=n&&i?0:+u.borderLeftWidth.split("px")[0],h=n&&i?0:+u.marginTop.split("px")[0],m=n&&i?0:+u.marginLeft.split("px")[0];l.top-=f-h,l.bottom-=f-h,l.left-=c-m,l.right-=c-m,l.marginTop=h,l.marginLeft=m}return(n?e.contains(p):e===p&&"BODY"!==p.nodeName)&&(l=d(l,e)),l}function y(t){var e=window.document.documentElement,n=w(t,e),i=Math.max(e.clientWidth,window.innerWidth||0),r=Math.max(e.clientHeight,window.innerHeight||0),o=c(e),a=c(e,"left");return g({top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:i,height:r})}function E(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===o(t,"position")||E(a(t)))}function O(t,e,n,i){var r={top:0,left:0},o=f(t,e);if("viewport"===i)r=y(o);else{var p=void 0;"scrollParent"===i?(p=s(a(t)),"BODY"===p.nodeName&&(p=window.document.documentElement)):p="window"===i?window.document.documentElement:i;var l=w(p,o);if("HTML"!==p.nodeName||E(o))r=l;else{var u=v(),c=u.height,d=u.width;r.top+=l.top-l.marginTop,r.bottom=c+l.top,r.left+=l.left-l.marginLeft,r.right=d+l.left}}return r.left+=n,r.top+=n,r.right-=n,r.bottom-=n,r}function x(t){return t.width*t.height}function T(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=O(n,i,o,r),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},p=Object.keys(s).map(function(t){return Wt({key:t},s[t],{area:x(s[t])})}).sort(function(t,e){return e.area-t.area}),l=p.filter(function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight}),u=l.length>0?l[0].key:p[0].key,f=t.split("-")[1];return u+(f?"-"+f:"")}function L(t,e,n){return w(n,f(e,n))}function k(t){var e=window.getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),i=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+i,height:t.offsetHeight+n}}function A(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function C(t,e,n){n=n.split("-")[0];var i=k(t),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",p=o?"height":"width",l=o?"width":"height";return r[a]=e[a]+e[p]/2-i[p]/2,r[s]=n===s?e[s]-i[l]:e[A(s)],r}function M(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function S(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var i=M(t,function(t){return t[e]===n});return t.indexOf(i)}function D(t,e,n){return(void 0===n?t:t.slice(0,S(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&r(n)&&(e=n(e,t))}),e}function H(){if(!this.state.isDestroyed){var t={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=L(this.state,this.popper,this.reference),t.placement=T(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=C(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=D(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function I(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function B(t){for(var e=[!1,"ms","webkit","moz","o"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length-1;i++){var r=e[i],o=r?""+r+n:t;if(void 0!==window.document.body.style[o])return o}return null}function N(){return this.state.isDestroyed=!0,I(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function F(t,e,n,i){var r="BODY"===t.nodeName,o=r?window:t;o.addEventListener(e,n,{passive:!0}),r||F(s(o.parentNode),e,n,i),i.push(o)}function P(t,e,n,i){n.updateBound=i,window.addEventListener("resize",n.updateBound,{passive:!0});var r=s(t);return F(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function W(){this.state.eventsEnabled||(this.state=P(this.reference,this.options,this.state,this.scheduleUpdate))}function j(t,e){return window.removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function q(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function R(t,e){Object.keys(e).forEach(function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function U(t,e){var n={position:t.offsets.popper.position},r={"x-placement":t.placement},o=Math.round(t.offsets.popper.left),a=Math.round(t.offsets.popper.top),s=B("transform");return e.gpuAcceleration&&s?(n[s]="translate3d("+o+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=a,n.willChange="top, left"),i(t.instance.popper,Wt({},n,t.styles)),R(t.instance.popper,Wt({},r,t.attributes)),t.offsets.arrow&&i(t.arrowElement,t.offsets.arrow),t}function z(t,e,n,i,r){var o=L(r,e,t),a=T(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),n}function Y(t,e,n){var i=M(t,function(t){return t.name===e}),r=!!i&&t.some(function(t){return t.name===n&&t.enabled&&t.order<i.order});if(!r){var o="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}function _(t,e){if(!Y(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],r=g(t.offsets.popper),o=t.offsets.reference,a=-1!==["left","right"].indexOf(i),s=a?"height":"width",p=a?"top":"left",l=a?"left":"top",u=a?"bottom":"right",f=k(n)[s];o[u]-f<r[p]&&(t.offsets.popper[p]-=r[p]-(o[u]-f)),o[p]+f>r[u]&&(t.offsets.popper[p]+=o[p]+f-r[u]);var c=o[p]+o[s]/2-f/2,d=c-g(t.offsets.popper)[p];return d=Math.max(Math.min(r[s]-f,d),0),t.arrowElement=n,t.offsets.arrow={},t.offsets.arrow[p]=Math.round(d),t.offsets.arrow[l]="",t}function K(t){return"end"===t?"start":"start"===t?"end":t}function X(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=qt.indexOf(t),i=qt.slice(n+1).concat(qt.slice(0,n));return e?i.reverse():i}function G(t,e){if(I(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=O(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),i=t.placement.split("-")[0],r=A(i),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case Rt.FLIP:a=[i,r];break;case Rt.CLOCKWISE:a=X(i);break;case Rt.COUNTERCLOCKWISE:a=X(i,!0);break;default:a=e.behavior}return a.forEach(function(s,p){if(i!==s||a.length===p+1)return t;i=t.placement.split("-")[0],r=A(i);var l=g(t.offsets.popper),u=t.offsets.reference,f=Math.floor,c="left"===i&&f(l.right)>f(u.left)||"right"===i&&f(l.left)<f(u.right)||"top"===i&&f(l.bottom)>f(u.top)||"bottom"===i&&f(l.top)<f(u.bottom),d=f(l.left)<f(n.left),h=f(l.right)>f(n.right),m=f(l.top)<f(n.top),v=f(l.bottom)>f(n.bottom),b="left"===i&&d||"right"===i&&h||"top"===i&&m||"bottom"===i&&v,w=-1!==["top","bottom"].indexOf(i),y=!!e.flipVariations&&(w&&"start"===o&&d||w&&"end"===o&&h||!w&&"start"===o&&m||!w&&"end"===o&&v);(c||b||y)&&(t.flipped=!0,(c||b)&&(i=a[p+1]),y&&(o=K(o)),t.placement=i+(o?"-"+o:""),t.offsets.popper=Wt({},t.offsets.popper,C(t.instance.popper,t.offsets.reference,t.placement)),t=D(t.instance.modifiers,t,"flip"))}),t}function V(t){var e=g(t.offsets.popper),n=t.offsets.reference,i=t.placement.split("-")[0],r=Math.floor,o=-1!==["top","bottom"].indexOf(i),a=o?"right":"bottom",s=o?"left":"top",p=o?"width":"height";return e[a]<r(n[s])&&(t.offsets.popper[s]=r(n[s])-e[p]),e[s]>r(n[a])&&(t.offsets.popper[s]=r(n[a])),t}function J(t,e,n,i){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],a=r[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=i}return g(s)[e]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function Q(t,e,i,r){var o=[0,0],a=-1!==["right","left"].indexOf(r),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),p=s.indexOf(M(s,function(t){return-1!==t.search(/,|\s/)}));s[p]&&-1===s[p].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=-1!==p?[s.slice(0,p).concat([s[p].split(/\s*,\s*|\s+/)[0]]),[s[p].split(/\s*,\s*|\s+/)[1]].concat(s.slice(p+1))]:[s];return l=l.map(function(t,n){var r=(1===n?!a:a)?"height":"width",o=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)},[]).map(function(t){return J(t,r,e,i)})}),l.forEach(function(t,e){t.forEach(function(i,r){n(i)&&(o[e]+=i*("-"===t[r-1]?-1:1))})}),o}function Z(t,e){var i=e.offset,r=t.placement,o=t.offsets,a=o.popper,s=o.reference,p=r.split("-")[0],l=void 0;return l=n(+i)?[+i,0]:Q(i,a,s,p),"left"===p?(a.top+=l[0],a.left-=l[1]):"right"===p?(a.top+=l[0],a.left+=l[1]):"top"===p?(a.left+=l[0],a.top-=l[1]):"bottom"===p&&(a.left+=l[0],a.top+=l[1]),t.popper=a,t}function $(t,e){var n=e.boundariesElement||u(t.instance.popper),i=O(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=i;var r=e.priority,o=g(t.offsets.popper),a={primary:function(t){var n=o[t];return o[t]<i[t]&&!e.escapeWithReference&&(n=Math.max(o[t],i[t])),Pt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=o[n];return o[t]>i[t]&&!e.escapeWithReference&&(r=Math.min(o[n],i[t]-("right"===t?o.width:o.height))),Pt({},n,r)}};return r.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";o=Wt({},o,a[e](t))}),t.offsets.popper=o,t}function tt(t){var e=t.placement,n=e.split("-")[0],i=e.split("-")[1];if(i){var r=t.offsets.reference,o=g(t.offsets.popper),a=-1!==["bottom","top"].indexOf(n),s=a?"left":"top",p=a?"width":"height",l={start:Pt({},s,r[s]),end:Pt({},s,r[s]+r[p]-o[p])};t.offsets.popper=Wt({},o,l[i])}return t}function et(t){if(!Y(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=M(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function nt(t){var e=t.placement,n=e.split("-")[0],i=g(t.offsets.popper),r=g(t.offsets.reference),o=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[o?"left":"top"]=r[e]-(a?i[o?"width":"height"]:0),t.placement=A(e),t.offsets.popper=g(i),t}function it(){it.done||(it.done=!0,Vt.supported=!!rt("transform"),Vt.supported&&(document.addEventListener("click",function(t){var e=at(t.target,Qt.el),n=at(t.target,Qt.popper);if(n){if(st(Jt,function(t){return t.popper===n}).settings.interactive)return}if(e){var i=st(Jt,function(t){return t.el===e}),r=i.popper,o=i.settings,a=o.hideOnClick,s=o.multiple,p=o.trigger;if(!0!==a||Vt.touch||clearTimeout(r.getAttribute("data-delay")),!s&&Vt.touch||!s&&-1!==p.indexOf("click"))return Ot(i);if(!0!==a||-1!==p.indexOf("click"))return}!at(t.target,Qt.controller)&&document.querySelector(Qt.popper)&&Ot()}),Vt.supportsTouch?document.addEventListener("touchstart",function t(){Vt.touch=!0,Vt.iOS&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}):(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&(Vt.touch=!0),Zt=Object.freeze({html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:document.body,zIndex:9999,popperOptions:{}}),$t=Object.keys(Zt)))}function rt(t){for(var e=[!1,"webkit"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var r=e[i],o=r?""+r+n:t;if(void 0!==window.document.body.style[o])return o}return null}function ot(t){return t.replace(/-.+/,"")}function at(t,e){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}}),t.closest(e)}function st(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function pt(t){var e=t.el,n=t.popper,i=t.settings,r=i.position,o=i.popperOptions,a=i.offset,s=i.distance,p=n.querySelector(Qt.tooltip),l=Xt({placement:r},o||{},{modifiers:Xt({},o?o.modifiers:{},{flip:Xt({padding:s+5},o&&o.modifiers?o.modifiers.flip:{}),offset:Xt({offset:a},o&&o.modifiers?o.modifiers.offset:{})}),onUpdate:function(){p.style.top="",p.style.bottom="",p.style.left="",p.style.right="",p.style[ot(n.getAttribute("x-placement"))]=-(s-Zt.distance)+"px"}});return new Yt(e,n,l)}function lt(t,e,n){var i=n.position,r=n.distance,o=n.arrow,a=n.animateFill,s=n.inertia,p=n.animation,l=n.arrowSize,u=n.size,f=n.theme,c=n.html,d=n.zIndex,h=document.createElement("div");h.setAttribute("class","tippy-popper"),h.setAttribute("role","tooltip"),h.setAttribute("aria-hidden","true"),h.setAttribute("id","tippy-tooltip-"+t),h.style.zIndex=d;var m=document.createElement("div");if(m.setAttribute("class","tippy-tooltip tippy-tooltip--"+u+" "+f+"-theme leave"),m.setAttribute("data-animation",p),o){var v=document.createElement("div");v.setAttribute("class","arrow-"+l),v.setAttribute("x-arrow",""),m.appendChild(v)}if(a){m.setAttribute("data-animatefill","");var g=document.createElement("div");g.setAttribute("class","leave"),g.setAttribute("x-circle",""),m.appendChild(g)}s&&m.setAttribute("data-inertia","");var b=document.createElement("div");if(b.setAttribute("class","tippy-tooltip-content"),c){var w=void 0;c instanceof Element?(b.appendChild(c),w=c.id||"tippy-html-template"):(b.innerHTML=document.getElementById(c.replace("#","")).innerHTML,w=c),h.classList.add("html-template"),h.setAttribute("tabindex","0"),m.setAttribute("data-template-id",w)}else b.innerHTML=e;return m.style[ot(i)]=-(r-Zt.distance)+"px",m.appendChild(b),h.appendChild(m),h}function ut(t,e,n){var i=[];return"manual"===t?i:(e.addEventListener(t,n.handleTrigger),i.push({event:t,handler:n.handleTrigger}),"mouseenter"===t&&(e.addEventListener("mouseleave",n.handleMouseleave),i.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===t&&(e.addEventListener("blur",n.handleBlur),i.push({event:"blur",handler:n.handleBlur})),i)}function ft(t){Jt.push(t)}function ct(t){var e=t.getAttribute("title");t.setAttribute("data-original-title",e||"html"),t.removeAttribute("title")}function dt(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function ht(t){var e=this,n=st(Jt,function(t){return t.el===e}),i=n.popper,r=ot(i.getAttribute("x-placement")),o=Math.round(i.offsetWidth/2),a=Math.round(i.offsetHeight/2),s=document.documentElement.offsetWidth||document.body.offsetWidth,p=t.pageX,l=t.pageY,u=void 0,f=void 0;"top"===r?(u=p-o,f=l-2.5*a):"left"===r?(u=p-2*o-15,f=l-a):"right"===r?(u=p+a,f=l-a):"bottom"===r&&(u=p-o,f=l+a/1.5),"top"!==r&&"bottom"!==r||(p+5+o>s?u=s-5-2*o:p-5-o<0&&(u=5)),i.style[rt("transform")]="translate3d("+u+"px, "+f+"px, 0)"}function mt(t,e){e?window.getComputedStyle(e)[rt("transform")]:window.getComputedStyle(t).opacity}function vt(t,e){t.forEach(function(t){t&&e(t.classList)})}function gt(t,e){var n=e;t.forEach(function(t){t&&(n=e,t.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),t.style[rt("transitionDuration")]=n+"ms")})}function bt(t,e,n){var i=t.popper.querySelector(Qt.tooltip),r=!1,o=function t(e){e.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",t),i.removeEventListener("transitionend",t),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(t.transitionendTimeout),t.transitionendTimeout=setTimeout(function(){!r&&n()},e)}function wt(t,e){return t.style.visibility===e}function yt(t){var e=t.el,n=(t.popper,t.settings),i=n.appendTo,r=n.followCursor;i.appendChild(t.popper),t.popperInstance?(t.popperInstance.update(),!r&&t.popperInstance.enableEventListeners()):(t.popperInstance=pt(t),r&&!Vt.touch&&(e.addEventListener("mousemove",ht),t.popperInstance.disableEventListeners()))}function Et(t){var e=t.popper,n=t.popperInstance,i=t.settings.stickyDuration,r=function(){return e.style[rt("transitionDuration")]=i+"ms"},o=function(){return e.style[rt("transitionDuration")]=""};ee(function t(){n&&n.scheduleUpdate(),r();var i="visible"===e.style.visibility;window.requestAnimationFrame?i?window.requestAnimationFrame(t):o():i?setTimeout(t,20):o()})}function Ot(t){Jt.forEach(function(e){var n=e.popper,i=e.tippyInstance,r=e.settings,o=r.appendTo,a=r.hideOnClick,s=r.hideDuration,p=r.trigger;if(o.contains(n)){var l=!0===a||-1!==p.indexOf("focus"),u=!t||n!==t.popper;l&&u&&i.hide(n,s)}})}function xt(t){return t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t))}function Tt(t,e,n){if(!e.getAttribute("x-placement"))return!1;var i=t.clientX,r=t.clientY,o=n.interactiveBorder,a=n.distance,s=e.getBoundingClientRect(),p=ot(e.getAttribute("x-placement")),l=o+a,u=s.top-r>o,f=r-s.bottom>o,c=s.left-i>o,d=i-s.right>o;return"top"===p?u=s.top-r>l:"bottom"===p?f=r-s.bottom>l:"left"===p?c=s.left-i>l:"right"===p&&(d=i-s.right>l),u||f||c||d}function Lt(t,e){return new ne(t,e)}for(var kt=["native code","[object MutationObserverConstructor]"],At="undefined"!=typeof window,Ct=["Edge","Trident","Firefox"],Mt=0,St=0;St<Ct.length;St+=1)if(At&&navigator.userAgent.indexOf(Ct[St])>=0){Mt=1;break}var Dt=At&&function(t){return kt.some(function(e){return(t||"").toString().indexOf(e)>-1})}(window.MutationObserver),Ht=Dt?t:e,It=void 0,Bt=function(){return void 0===It&&(It=-1!==navigator.appVersion.indexOf("MSIE 10")),It},Nt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ft=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Pt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Wt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},jt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],qt=jt.slice(3),Rt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Ut={shift:{order:100,enabled:!0,fn:tt},offset:{order:200,enabled:!0,fn:Z,offset:0},preventOverflow:{order:300,enabled:!0,fn:$,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:V},arrow:{order:500,enabled:!0,fn:_,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:G,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:nt},hide:{order:800,enabled:!0,fn:et},applyStyle:{order:900,enabled:!0,fn:U,onLoad:z,gpuAcceleration:!0}},zt={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Ut},Yt=function(){function t(e,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Nt(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=Ht(this.update.bind(this)),this.options=Wt({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=n.jquery?n[0]:n,i(this.popper,{position:"absolute"}),this.options.modifiers={},Object.keys(Wt({},t.Defaults.modifiers,a.modifiers)).forEach(function(e){o.options.modifiers[e]=Wt({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return Wt({name:t},o.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&r(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Ft(t,[{key:"update",value:function(){return H.call(this)}},{key:"destroy",value:function(){return N.call(this)}},{key:"enableEventListeners",value:function(){return W.call(this)}},{key:"disableEventListeners",value:function(){return q.call(this)}}]),t}();Yt.Utils=("undefined"!=typeof window?window:global).PopperUtils,Yt.placements=jt,Yt.Defaults=zt;var _t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Kt=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Xt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Gt="undefined"!=typeof window,Vt={};Gt&&(Vt.supportsTouch="ontouchstart"in window,Vt.iOS=/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream,Vt.touch=!1);var Jt=[],Qt={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"},Zt=void 0,$t=void 0,te=1,ee=function(){var t=void 0;return function(e){clearTimeout(t),window.requestAnimationFrame?window.requestAnimationFrame(function(){t=setTimeout(e,0)}):t=setTimeout(e,0)}}(),ne=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(_t(this,t),it(),Vt.supported){this.selector=e,this.settings=Object.freeze(Xt({},Zt,n)),this.callbacks={wait:n.wait,beforeShown:n.beforeShown||new Function,shown:n.shown||new Function,beforeHidden:n.beforeHidden||new Function,hidden:n.hidden||new Function};var i=xt(e);this._createTooltips(i)}}return Kt(t,[{key:"_applyIndividualSettings",value:function(t){var e=this,n={};return $t.forEach(function(i){var r=t.getAttribute("data-"+i.toLowerCase())||e.settings[i];"false"===r&&(r=!1),"true"===r&&(r=!0),isNaN(parseFloat(r))||(r=parseFloat(r)),n[i]=r}),n.arrow&&(n.animateFill=!1),Xt({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(t,e,n){var i=this,r=(n.position,n.delay),o=n.hideDelay,a=n.hideDuration,s=n.duration,p=n.interactive,l=(n.interactiveBorder,n.distance,n.hideOnClick),u=n.trigger,f=function(){clearTimeout(e.getAttribute("data-delay")),clearTimeout(e.getAttribute("data-hidedelay"))},c=function(){if(f(),"visible"!==e.style.visibility)if(r){var t=setTimeout(function(){return i.show(e,s)},r);e.setAttribute("data-delay",t)}else i.show(e,s)},d=function(t){return i.callbacks.wait?i.callbacks.wait.call(e,c,t):c()},h=function(){if(f(),o){var t=setTimeout(function(){return i.hide(e,a)},o);e.setAttribute("data-hidedelay",t)}else i.hide(e,a)};return{handleTrigger:function(t){var n="click"===t.type,i="visible"===e.style.visibility,r="persistent"!==l;n&&i&&r?h():d(t)},handleMouseleave:function(i){if(p){var r=function i(r){var o=function(){document.removeEventListener("mousemove",i),h()},a=at(r.target,Qt.el),s=at(r.target,Qt.popper)===e,p=a===t,l=-1!==u.indexOf("click");if(a&&a!==t)return o();s||p||l||Tt(r,e,n)&&o()};return document.addEventListener("mousemove",r)}h()},handleBlur:function(t){!Vt.touch&&t.relatedTarget&&(at(t.relatedTarget,Qt.popper)||h())}}}},{key:"_createTooltips",value:function(t){var e=this;t.forEach(function(t){var n=e._applyIndividualSettings(t),i=n.html,r=n.trigger,o=t.getAttribute("title");if(o||i){var a=te;t.setAttribute("data-tooltipped",""),t.setAttribute("aria-describedby","tippy-tooltip-"+a),ct(t);var s=lt(a,o,n),p=e._getEventListenerHandlers(t,s,n),l=[];r.trim().split(" ").forEach(function(e){return l=l.concat(ut(e,t,p))}),ft({id:a,el:t,popper:s,settings:n,listeners:l,tippyInstance:e}),te++}})}},{key:"getPopperElement",value:function(t){try{return st(Jt,function(e){return e.el===t}).popper}catch(t){console.error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(t){try{return st(Jt,function(e){return e.popper===t}).el}catch(t){console.error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"getReference",value:function(t){return st(Jt,function(e){return e.el===t})||st(Jt,function(e){return e.popper===t})}},{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeShown.call(t);var i=st(Jt,function(e){return e.popper===t}),r=t.querySelector(Qt.tooltip),o=t.querySelector(Qt.circle),a=i.el,s=i.settings,p=s.appendTo,l=s.sticky,u=s.interactive,f=s.followCursor,c=s.flipDuration;gt([t,r,o],0),!p.contains(t)&&yt(i),t.style.visibility="visible",t.setAttribute("aria-hidden","false"),ee(function(){wt(t,"visible")&&(!f&&i.popperInstance.update(),gt([r,o],n),!f&&gt([t],c),u&&a.classList.add("active"),l&&Et(i),mt(r,o),vt([r,o],function(t){t.contains("tippy-notransition")&&t.remove("tippy-notransition"),t.remove("leave"),t.add("enter")}),bt(i,n,function(){wt(t,"visible")&&!i.onShownFired&&(u&&t.focus(),r.classList.add("tippy-notransition"),i.onShownFired=!0,e.callbacks.shown.call(t))}))})}},{key:"hide",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(t);var i=st(Jt,function(e){return e.popper===t}),r=t.querySelector(Qt.tooltip),o=t.querySelector(Qt.circle),a=(t.querySelector(Qt.content),i.el),s=i.settings,p=s.appendTo,l=(s.sticky,s.interactive),u=(s.followCursor,s.html),f=s.trigger;i.onShownFired=!1,l&&a.classList.remove("active"),t.style.visibility="hidden",t.setAttribute("aria-hidden","true"),n===Zt.hideDuration?n=parseInt(r.style[rt("transitionDuration")]):gt([r,o],n),vt([r,o],function(t){t.contains("tippy-tooltip")&&t.remove("tippy-notransition"),t.remove("enter"),t.add("leave")}),u&&-1!==f.indexOf("click")&&dt(a)&&a.focus(),bt(i,n,function(){wt(t,"hidden")&&p.contains(t)&&(i.popperInstance.disableEventListeners(),p.removeChild(t),e.callbacks.hidden.call(t))})}},{key:"destroy",value:function(t){var e=st(Jt,function(e){return e.popper===t}),n=e.el,i=e.popperInstance,r=e.listeners;wt(t,"hidden")||this.hide(t,0),r.forEach(function(t){return n.removeEventListener(t.event,t.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),Jt.splice(Jt.map(function(t){return t.popper}).indexOf(t),1)}},{key:"update",value:function(t){var e=st(Jt,function(e){return e.popper===t}),n=t.querySelector(Qt.content),i=e.el,r=e.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.getAttribute("title")||i.getAttribute("data-original-title"),ct(i))}}]),t}();return Lt});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Tippy=e()}(this,function(){"use strict";function t(t){var e=!1,n=0,r=document.createElement("span");return new MutationObserver(function(){t(),e=!1}).observe(r,{attributes:!0}),function(){e||(e=!0,r.setAttribute("x-index",n),n+=1)}}function e(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},Dt))}}function n(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function r(t,e){Object.keys(e).forEach(function(r){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(r)&&n(e[r])&&(i="px"),t.style[r]=e[r]+i})}function i(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function o(t,e){if(1!==t.nodeType)return[];var n=window.getComputedStyle(t,null);return e?n[e]:n}function a(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function s(t){if(!t||-1!==["HTML","BODY","#document"].indexOf(t.nodeName))return window.document.body;var e=o(t),n=e.overflow,r=e.overflowX;return/(auto|scroll)/.test(n+e.overflowY+r)?t:s(a(t))}function u(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||t.firstElementChild.offsetParent===t)}function p(t){return null!==t.parentNode?p(t.parentNode):t}function l(t){var e=t&&t.offsetParent,n=e&&e.nodeName;return n&&"BODY"!==n&&"HTML"!==n?e:window.document.documentElement}function c(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return window.document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||r.contains(i))return u(a)?a:l(a);var s=p(t);return s.host?c(s.host,e):c(t,p(e).host)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=window.document.documentElement;return(window.document.scrollingElement||i)[n]}return t[n]}function d(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=f(e,"top"),i=f(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function h(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return+t["border"+n+"Width"].split("px")[0]+ +t["border"+r+"Width"].split("px")[0]}function m(t,e,n,r){return Math.max(e["offset"+t],n["client"+t],n["offset"+t],Pt()?n["offset"+t]+r["margin"+("Height"===t?"Top":"Left")]+r["margin"+("Height"===t?"Bottom":"Right")]:0)}function v(){var t=window.document.body,e=window.document.documentElement,n=Pt()&&window.getComputedStyle(e);return{height:m("Height",t,e,n),width:m("Width",t,e,n)}}function g(t){return Rt({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(t){var e={};if(Pt())try{e=t.getBoundingClientRect();var n=f(t,"top"),r=f(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}catch(t){}else e=t.getBoundingClientRect();var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},a="HTML"===t.nodeName?v():{},s=a.width||t.clientWidth||i.right-i.left,u=a.height||t.clientHeight||i.bottom-i.top,p=t.offsetWidth-s,l=t.offsetHeight-u;if(p||l){var c=o(t);p-=h(c,"x"),l-=h(c,"y"),i.width-=p,i.height-=l}return g(i)}function w(t,e){var n=Pt(),r="HTML"===e.nodeName,i=b(t),a=b(e),u=s(t),p=g({top:i.top-a.top,left:i.left-a.left,width:i.width,height:i.height});if(r||"BODY"===e.nodeName){var l=o(e),c=n&&r?0:+l.borderTopWidth.split("px")[0],f=n&&r?0:+l.borderLeftWidth.split("px")[0],h=n&&r?0:+l.marginTop.split("px")[0],m=n&&r?0:+l.marginLeft.split("px")[0];p.top-=c-h,p.bottom-=c-h,p.left-=f-m,p.right-=f-m,p.marginTop=h,p.marginLeft=m}return(n?e.contains(u):e===u&&"BODY"!==u.nodeName)&&(p=d(p,e)),p}function y(t){var e=window.document.documentElement,n=w(t,e),r=Math.max(e.clientWidth,window.innerWidth||0),i=Math.max(e.clientHeight,window.innerHeight||0),o=f(e),a=f(e,"left");return g({top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:i})}function E(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===o(t,"position")||E(a(t)))}function x(t,e,n,r){var i={top:0,left:0},o=c(t,e);if("viewport"===r)i=y(o);else{var u=void 0;"scrollParent"===r?(u=s(a(t)),"BODY"===u.nodeName&&(u=window.document.documentElement)):u="window"===r?window.document.documentElement:r;var p=w(u,o);if("HTML"!==u.nodeName||E(o))i=p;else{var l=v(),f=l.height,d=l.width;i.top+=p.top-p.marginTop,i.bottom=f+p.top,i.left+=p.left-p.marginLeft,i.right=d+p.left}}return i.left+=n,i.top+=n,i.right-=n,i.bottom-=n,i}function O(t){return t.width*t.height}function T(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=x(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map(function(t){return Rt({key:t},s[t],{area:O(s[t])})}).sort(function(t,e){return e.area-t.area}),p=u.filter(function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight}),l=p.length>0?p[0].key:u[0].key,c=t.split("-")[1];return l+(c?"-"+c:"")}function L(t,e,n){return w(n,c(e,n))}function k(t){var e=window.getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),r=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function A(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function C(t,e,n){n=n.split("-")[0];var r=k(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",p=o?"width":"height";return i[a]=e[a]+e[u]/2-r[u]/2,i[s]=n===s?e[s]-r[p]:e[A(s)],i}function M(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function S(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var r=M(t,function(t){return t[e]===n});return t.indexOf(r)}function H(t,e,n){return(void 0===n?t:t.slice(0,S(t,"name",n))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&i(n)&&(e=n(e,t))}),e}function D(){if(!this.state.isDestroyed){var t={instance:this,styles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=L(this.state,this.popper,this.reference),t.placement=T(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.offsets.popper=C(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position="absolute",t=H(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function N(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function B(t){for(var e=[!1,"ms","webkit","moz","o"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length-1;r++){var i=e[r],o=i?""+i+n:t;if(void 0!==window.document.body.style[o])return o}return null}function I(){return this.state.isDestroyed=!0,N(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[B("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function F(t,e,n,r){var i="BODY"===t.nodeName,o=i?window:t;o.addEventListener(e,n,{passive:!0}),i||F(s(o.parentNode),e,n,r),r.push(o)}function P(t,e,n,r){n.updateBound=r,window.addEventListener("resize",n.updateBound,{passive:!0});var i=s(t);return F(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function W(){this.state.eventsEnabled||(this.state=P(this.reference,this.options,this.state,this.scheduleUpdate))}function q(t,e){return window.removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function j(){this.state.eventsEnabled&&(window.cancelAnimationFrame(this.scheduleUpdate),this.state=q(this.reference,this.state))}function R(t,e){Object.keys(e).forEach(function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function U(t,e){var n={position:t.offsets.popper.position},i={"x-placement":t.placement},o=Math.round(t.offsets.popper.left),a=Math.round(t.offsets.popper.top),s=B("transform");return e.gpuAcceleration&&s?(n[s]="translate3d("+o+"px, "+a+"px, 0)",n.top=0,n.left=0,n.willChange="transform"):(n.left=o,n.top=a,n.willChange="top, left"),r(t.instance.popper,Rt({},n,t.styles)),R(t.instance.popper,Rt({},i,t.attributes)),t.offsets.arrow&&r(t.arrowElement,t.offsets.arrow),t}function Y(t,e,n,r,i){var o=L(i,e,t),a=T(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),n}function z(t,e,n){var r=M(t,function(t){return t.name===e}),i=!!r&&t.some(function(t){return t.name===n&&t.enabled&&t.order<r.order});if(!i){var o="`"+e+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}function K(t,e){if(!z(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],i=g(t.offsets.popper),o=t.offsets.reference,a=-1!==["left","right"].indexOf(r),s=a?"height":"width",u=a?"top":"left",p=a?"left":"top",l=a?"bottom":"right",c=k(n)[s];o[l]-c<i[u]&&(t.offsets.popper[u]-=i[u]-(o[l]-c)),o[u]+c>i[l]&&(t.offsets.popper[u]+=o[u]+c-i[l]);var f=o[u]+o[s]/2-c/2,d=f-g(t.offsets.popper)[u];return d=Math.max(Math.min(i[s]-c,d),0),t.arrowElement=n,t.offsets.arrow={},t.offsets.arrow[u]=Math.round(d),t.offsets.arrow[p]="",t}function X(t){return"end"===t?"start":"start"===t?"end":t}function G(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Yt.indexOf(t),r=Yt.slice(n+1).concat(Yt.slice(0,n));return e?r.reverse():r}function V(t,e){if(N(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=x(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement),r=t.placement.split("-")[0],i=A(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case zt.FLIP:a=[r,i];break;case zt.CLOCKWISE:a=G(r);break;case zt.COUNTERCLOCKWISE:a=G(r,!0);break;default:a=e.behavior}return a.forEach(function(s,u){if(r!==s||a.length===u+1)return t;r=t.placement.split("-")[0],i=A(r);var p=g(t.offsets.popper),l=t.offsets.reference,c=Math.floor,f="left"===r&&c(p.right)>c(l.left)||"right"===r&&c(p.left)<c(l.right)||"top"===r&&c(p.bottom)>c(l.top)||"bottom"===r&&c(p.top)<c(l.bottom),d=c(p.left)<c(n.left),h=c(p.right)>c(n.right),m=c(p.top)<c(n.top),v=c(p.bottom)>c(n.bottom),b="left"===r&&d||"right"===r&&h||"top"===r&&m||"bottom"===r&&v,w=-1!==["top","bottom"].indexOf(r),y=!!e.flipVariations&&(w&&"start"===o&&d||w&&"end"===o&&h||!w&&"start"===o&&m||!w&&"end"===o&&v);(f||b||y)&&(t.flipped=!0,(f||b)&&(r=a[u+1]),y&&(o=X(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=Rt({},t.offsets.popper,C(t.instance.popper,t.offsets.reference,t.placement)),t=H(t.instance.modifiers,t,"flip"))}),t}function _(t){var e=g(t.offsets.popper),n=t.offsets.reference,r=t.placement.split("-")[0],i=Math.floor,o=-1!==["top","bottom"].indexOf(r),a=o?"right":"bottom",s=o?"left":"top",u=o?"width":"height";return e[a]<i(n[s])&&(t.offsets.popper[s]=i(n[s])-e[u]),e[s]>i(n[a])&&(t.offsets.popper[s]=i(n[a])),t}function J(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return g(s)[e]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}function Q(t,e,r,i){var o=[0,0],a=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map(function(t){return t.trim()}),u=s.indexOf(M(s,function(t){return-1!==t.search(/,|\s/)}));s[u]&&-1===s[u].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var p=-1!==u?[s.slice(0,u).concat([s[u].split(/\s*,\s*|\s+/)[0]]),[s[u].split(/\s*,\s*|\s+/)[1]].concat(s.slice(u+1))]:[s];return p=p.map(function(t,n){var i=(1===n?!a:a)?"height":"width",o=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)},[]).map(function(t){return J(t,i,e,r)})}),p.forEach(function(t,e){t.forEach(function(r,i){n(r)&&(o[e]+=r*("-"===t[i-1]?-1:1))})}),o}function Z(t,e){var r=e.offset,i=t.placement,o=t.offsets,a=o.popper,s=o.reference,u=i.split("-")[0],p=void 0;return p=n(+r)?[+r,0]:Q(r,a,s,u),"left"===u?(a.top+=p[0],a.left-=p[1]):"right"===u?(a.top+=p[0],a.left+=p[1]):"top"===u?(a.left+=p[0],a.top-=p[1]):"bottom"===u&&(a.left+=p[0],a.top+=p[1]),t.popper=a,t}function $(t,e){var n=e.boundariesElement||l(t.instance.popper),r=x(t.instance.popper,t.instance.reference,e.padding,n);e.boundaries=r;var i=e.priority,o=g(t.offsets.popper),a={primary:function(t){var n=o[t];return o[t]<r[t]&&!e.escapeWithReference&&(n=Math.max(o[t],r[t])),jt({},t,n)},secondary:function(t){var n="right"===t?"left":"top",i=o[n];return o[t]>r[t]&&!e.escapeWithReference&&(i=Math.min(o[n],r[t]-("right"===t?o.width:o.height))),jt({},n,i)}};return i.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";o=Rt({},o,a[e](t))}),t.offsets.popper=o,t}function tt(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets.reference,o=g(t.offsets.popper),a=-1!==["bottom","top"].indexOf(n),s=a?"left":"top",u=a?"width":"height",p={start:jt({},s,i[s]),end:jt({},s,i[s]+i[u]-o[u])};t.offsets.popper=Rt({},o,p[r])}return t}function et(t){if(!z(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=M(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function nt(t){var e=t.placement,n=e.split("-")[0],r=g(t.offsets.popper),i=g(t.offsets.reference),o=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[o?"left":"top"]=i[e]-(a?r[o?"width":"height"]:0),t.placement=A(e),t.offsets.popper=g(r),t}function rt(){rt.done||(rt.done=!0,document.addEventListener("click",function(t){if(!(t.target instanceof Element))return xt();var e=at(t.target,ee.el),n=at(t.target,ee.popper);if(n){if(st(te,function(t){return t.popper===n}).settings.interactive)return}if(e){var r=st(te,function(t){return t.el===e}),i=r.popper,o=r.settings,a=o.hideOnClick,s=o.multiple,u=o.trigger;if(!0!==a||Zt.touch||clearTimeout(i.getAttribute("data-delay")),!s&&Zt.touch||!s&&-1!==u.indexOf("click"))return xt(r);if(!0!==a||-1!==u.indexOf("click"))return}!at(t.target,ee.controller)&&document.querySelector(ee.popper)&&xt()}),Zt.supportsTouch?document.addEventListener("touchstart",function t(){Zt.touch=!0,Zt.iOS&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}):(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&(Zt.touch=!0),ne.appendTo=document.body)}function it(t){for(var e=[!1,"webkit"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var i=e[r],o=i?""+i+n:t;if(void 0!==window.document.body.style[o])return o}return null}function ot(t){return t.replace(/-.+/,"")}function at(t,e){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}}),t.closest(e)}function st(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function ut(t){var e={view:window,bubbles:!0,cancelable:!0},n=window.MouseEvent?new MouseEvent("click",e):new Event("click",e);t.dispatchEvent(n)}function pt(t){var e=t.el,n=t.popper,r=t.settings,i=r.position,o=r.popperOptions,a=r.offset,s=r.distance,u=n.querySelector(ee.tooltip),p=Jt({placement:i},o||{},{modifiers:Jt({},o?o.modifiers:{},{flip:Jt({padding:s+5},o&&o.modifiers?o.modifiers.flip:{}),offset:Jt({offset:a},o&&o.modifiers?o.modifiers.offset:{})}),onUpdate:function(){u.style.top="",u.style.bottom="",u.style.left="",u.style.right="",u.style[ot(n.getAttribute("x-placement"))]=-(s-ne.distance)+"px"}});return new Gt(e,n,p)}function lt(t,e,n){var r=n.position,i=n.distance,o=n.arrow,a=n.animateFill,s=n.inertia,u=n.animation,p=n.arrowSize,l=n.size,c=n.theme,f=n.html,d=n.zIndex,h=document.createElement("div");h.setAttribute("class","tippy-popper"),h.setAttribute("role","tooltip"),h.setAttribute("aria-hidden","true"),h.setAttribute("id","tippy-tooltip-"+t),h.style.zIndex=d;var m=document.createElement("div");if(m.setAttribute("class","tippy-tooltip tippy-tooltip--"+l+" "+c+"-theme leave"),m.setAttribute("data-animation",u),o){var v=document.createElement("div");v.setAttribute("class","arrow-"+p),v.setAttribute("x-arrow",""),m.appendChild(v)}if(a){m.setAttribute("data-animatefill","");var g=document.createElement("div");g.setAttribute("class","leave"),g.setAttribute("x-circle",""),m.appendChild(g)}s&&m.setAttribute("data-inertia","");var b=document.createElement("div");if(b.setAttribute("class","tippy-tooltip-content"),f){var w=void 0;f instanceof Element?(b.appendChild(f),w=f.id||"tippy-html-template"):(b.innerHTML=document.getElementById(f.replace("#","")).innerHTML,w=f),h.classList.add("html-template"),h.setAttribute("tabindex","0"),m.setAttribute("data-template-id",w)}else b.innerHTML=e;return m.style[ot(r)]=-(i-ne.distance)+"px",m.appendChild(b),h.appendChild(m),h}function ct(t,e,n,r){var i=[];return"manual"===t?i:(e.addEventListener(t,n.handleTrigger),i.push({event:t,handler:n.handleTrigger}),"mouseenter"===t&&(Zt.supportsTouch&&r&&(e.addEventListener("touchstart",n.handleTrigger),i.push({event:"touchstart",handler:n.handleTrigger}),e.addEventListener("touchend",n.handleMouseleave),i.push({event:"touchend",handler:n.handleMouseleave})),e.addEventListener("mouseleave",n.handleMouseleave),i.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===t&&(e.addEventListener("blur",n.handleBlur),i.push({event:"blur",handler:n.handleBlur})),i)}function ft(t){var e=t.getAttribute("title");t.setAttribute("data-original-title",e||"html"),t.removeAttribute("title")}function dt(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function ht(t){var e=this,n=st(te,function(t){return t.el===e}),r=n.popper,i=ot(r.getAttribute("x-placement")),o=Math.round(r.offsetWidth/2),a=Math.round(r.offsetHeight/2),s=document.documentElement.offsetWidth||document.body.offsetWidth,u=t.pageX,p=t.pageY,l=void 0,c=void 0;switch(i){case"top":l=u-o,c=p-2.5*a;break;case"left":l=u-2*o-15,c=p-a;break;case"right":l=u+a,c=p-a;break;case"bottom":l=u-o,c=p+a/1.5}var f=u+5+o>s,d=u-5-o<0;"top"!==i&&"bottom"!==i||(f&&(l=s-5-2*o),d&&(l=5)),r.style[it("transform")]="translate3d("+l+"px, "+c+"px, 0)"}function mt(t,e){e?window.getComputedStyle(e)[it("transform")]:window.getComputedStyle(t).opacity}function vt(t,e){t.forEach(function(t){t&&e(t.classList)})}function gt(t,e){var n=e;t.forEach(function(t){t&&(n=e,t.hasAttribute("x-circle")&&(n=Math.round(n/1.2)),t.style[it("transitionDuration")]=n+"ms")})}function bt(t,e,n){var r=t.popper.querySelector(ee.tooltip),i=!1,o=function t(e){e.target===r&&(i=!0,r.removeEventListener("webkitTransitionEnd",t),r.removeEventListener("transitionend",t),n())};r.addEventListener("webkitTransitionEnd",o),r.addEventListener("transitionend",o),clearTimeout(t.transitionendTimeout),t.transitionendTimeout=setTimeout(function(){!i&&n()},e)}function wt(t){return"visible"===t.style.visibility}function yt(t){var e=t.el,n=(t.popper,t.listeners,t.settings),r=n.appendTo,i=n.followCursor;r.appendChild(t.popper),t.popperInstance?(t.popperInstance.update(),!i&&t.popperInstance.enableEventListeners()):(t.popperInstance=pt(t),i&&!Zt.touch&&(e.addEventListener("mousemove",ht),t.popperInstance.disableEventListeners()))}function Et(t){var e=t.popper,n=t.popperInstance,r=t.settings.stickyDuration,i=function(){return e.style[it("transitionDuration")]=r+"ms"},o=function(){return e.style[it("transitionDuration")]=""};ie(function t(){n&&n.scheduleUpdate(),i(),wt(e)?window.requestAnimationFrame(t):o()})}function xt(t){te.forEach(function(e){var n=e.popper,r=e.tippyInstance,i=e.settings,o=i.appendTo,a=i.hideOnClick,s=i.hideDuration,u=i.trigger;if(o.contains(n)){var p=!0===a||-1!==u.indexOf("focus"),l=!t||n!==t.popper;p&&l&&r.hide(n,s)}})}function Ot(t){return t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t))}function Tt(t,e,n){if(!e.getAttribute("x-placement"))return!1;var r=t.clientX,i=t.clientY,o=n.interactiveBorder,a=n.distance,s=e.getBoundingClientRect(),u=ot(e.getAttribute("x-placement")),p=o+a,l={top:s.top-i>o,bottom:i-s.bottom>o,left:s.left-r>o,right:r-s.right>o};switch(u){case"top":l.top=s.top-i>p;break;case"bottom":l.bottom=i-s.bottom>p;break;case"left":l.left=s.left-r>p;break;case"right":l.right=r-s.right>p}return l.top||l.bottom||l.left||l.right}function Lt(t,e){var n=re.reduce(function(n,r){var i=t.getAttribute("data-"+r.toLowerCase())||e[r];return"false"===i&&(i=!1),"true"===i&&(i=!0),isNaN(parseFloat(i))||(i=parseFloat(i)),n[r]=i,n},{});return n.arrow&&(n.animateFill=!1),Jt({},e,n)}function kt(t,e,n){var r=this,i=(n.position,n.delay),o=n.hideDelay,a=n.hideDuration,s=n.duration,u=n.interactive,p=(n.interactiveBorder,n.distance,n.hideOnClick),l=n.trigger,c=n.touchHold,f=function(){clearTimeout(e.getAttribute("data-delay")),clearTimeout(e.getAttribute("data-hidedelay"))},d=function(){if(f(),!wt(e))if(i){var t=setTimeout(function(){return r.show(e,s)},i);e.setAttribute("data-delay",t)}else r.show(e,s)},h=function(t){return r.callbacks.wait?r.callbacks.wait.call(e,d,t):d()},m=function(){if(f(),o){var t=setTimeout(function(){return r.hide(e,a)},o);e.setAttribute("data-hidedelay",t)}else r.hide(e,a)};return{handleTrigger:function(n){if("mouseenter"===n.type&&Zt.supportsTouch&&Zt.touch){if(c)return;if(Zt.iOS){var r=function(){return ut(t)};"A"===t.nodeName?setTimeout(r,300):r()}}var i="click"===n.type,o="persistent"!==p;i&&wt(e)&&o?m():h(n)},handleMouseleave:function(r){if(!("mouseleave"===r.type&&Zt.supportsTouch&&Zt.touch&&c)){if(u){var i=function r(i){var o=function(){document.removeEventListener("mousemove",r),m()},a=at(i.target,ee.el),s=at(i.target,ee.popper)===e,u=a===t,p=-1!==l.indexOf("click");if(a&&a!==t)return o();s||u||p||Tt(i,e,n)&&o()};return document.addEventListener("mousemove",i)}m()}},handleBlur:function(t){!Zt.touch&&t.relatedTarget&&(at(t.relatedTarget,ee.popper)||m())}}}function At(t){var e=this;t.forEach(function(t){var n=Lt(t,e.settings),r=n.html,i=n.trigger,o=n.touchHold,a=t.getAttribute("title");if(a||r){var s=$t;t.setAttribute("data-tooltipped",""),t.setAttribute("aria-describedby","tippy-tooltip-"+s),ft(t);var u=lt(s,a,n),p=kt.call(e,t,u,n),l=[];i.trim().split(" ").forEach(function(e){return l=l.concat(ct(e,t,p,o))}),te.push({id:s,el:t,popper:u,settings:n,listeners:l,tippyInstance:e}),$t++}})}function Ct(t,e){return new oe(t,e)}for(var Mt=["native code","[object MutationObserverConstructor]"],St="undefined"!=typeof window,Ht=["Edge","Trident","Firefox"],Dt=0,Nt=0;Nt<Ht.length;Nt+=1)if(St&&navigator.userAgent.indexOf(Ht[Nt])>=0){Dt=1;break}var Bt=St&&function(t){return Mt.some(function(e){return(t||"").toString().indexOf(e)>-1})}(window.MutationObserver),It=Bt?t:e,Ft=void 0,Pt=function(){return void 0===Ft&&(Ft=-1!==navigator.appVersion.indexOf("MSIE 10")),Ft},Wt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},qt=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),jt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Rt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ut=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Yt=Ut.slice(3),zt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},Kt={shift:{order:100,enabled:!0,fn:tt},offset:{order:200,enabled:!0,fn:Z,offset:0},preventOverflow:{order:300,enabled:!0,fn:$,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:_},arrow:{order:500,enabled:!0,fn:K,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:V,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:nt},hide:{order:800,enabled:!0,fn:et},applyStyle:{order:900,enabled:!0,fn:U,onLoad:Y,gpuAcceleration:!0}},Xt={placement:"bottom",eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:Kt},Gt=function(){function t(e,n){var o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Wt(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=It(this.update.bind(this)),this.options=Rt({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e.jquery?e[0]:e,this.popper=n.jquery?n[0]:n,r(this.popper,{position:"absolute"}),this.options.modifiers={},Object.keys(Rt({},t.Defaults.modifiers,a.modifiers)).forEach(function(e){o.options.modifiers[e]=Rt({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return Rt({name:t},o.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&i(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return qt(t,[{key:"update",value:function(){return D.call(this)}},{key:"destroy",value:function(){return I.call(this)}},{key:"enableEventListeners",value:function(){return W.call(this)}},{key:"disableEventListeners",value:function(){return j.call(this)}}]),t}();Gt.Utils=("undefined"!=typeof window?window:global).PopperUtils,Gt.placements=Ut,Gt.Defaults=Xt;var Vt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_t=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),Jt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Qt="undefined"!=typeof window,Zt={};Qt&&(Zt.supported=!!window.requestAnimationFrame,Zt.supportsTouch="ontouchstart"in window,Zt.iOS=/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream,Zt.touch=!1);var $t=1,te=[],ee={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"},ne={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:null,zIndex:9999,touchHold:!1,popperOptions:{}},re=Zt.supported&&Object.keys(ne),ie=function(){var t=void 0;return function(e){clearTimeout(t),window.requestAnimationFrame(function(){t=setTimeout(e,0)})}}(),oe=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Vt(this,t),Zt.supported&&(rt(),this.selector=e,this.settings=Jt({},ne,n),this.callbacks={wait:n.wait,beforeShown:n.beforeShown||new Function,shown:n.shown||new Function,beforeHidden:n.beforeHidden||new Function,hidden:n.hidden||new Function},At.call(this,Ot(e)))}return _t(t,[{key:"getPopperElement",value:function(t){try{return st(te,function(e){return e.el===t}).popper}catch(t){console.error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(t){try{return st(te,function(e){return e.popper===t}).el}catch(t){console.error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"getReference",value:function(t){return st(te,function(e){return e.el===t})||st(te,function(e){return e.popper===t})}},{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeShown.call(t);var r=st(te,function(e){return e.popper===t}),i=t.querySelector(ee.tooltip),o=t.querySelector(ee.circle),a=r.el,s=r.settings,u=s.appendTo,p=s.sticky,l=s.interactive,c=s.followCursor,f=s.flipDuration;gt([t,i,o],0),!u.contains(t)&&yt(r),t.style.visibility="visible",t.setAttribute("aria-hidden","false"),ie(function(){wt(t)&&(!c&&r.popperInstance.update(),gt([i,o],n),!c&&gt([t],f),l&&a.classList.add("active"),p&&Et(r),mt(i,o),vt([i,o],function(t){t.contains("tippy-notransition")&&t.remove("tippy-notransition"),t.remove("leave"),t.add("enter")}),bt(r,n,function(){wt(t)&&!r.onShownFired&&(l&&t.focus(),i.classList.add("tippy-notransition"),r.onShownFired=!0,e.callbacks.shown.call(t))}))})}},{key:"hide",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(t);var r=st(te,function(e){return e.popper===t}),i=t.querySelector(ee.tooltip),o=t.querySelector(ee.circle),a=(t.querySelector(ee.content),r.el),s=r.settings,u=s.appendTo,p=(s.sticky,s.interactive),l=(s.followCursor,s.html),c=s.trigger;r.onShownFired=!1,p&&a.classList.remove("active"),t.style.visibility="hidden",t.setAttribute("aria-hidden","true"),n===ne.hideDuration?n=parseInt(i.style[it("transitionDuration")]):gt([i,o],n),vt([i,o],function(t){t.contains("tippy-tooltip")&&t.remove("tippy-notransition"),t.remove("enter"),t.add("leave")}),l&&-1!==c.indexOf("click")&&dt(a)&&a.focus(),bt(r,n,function(){!wt(t)&&u.contains(t)&&(r.popperInstance.disableEventListeners(),u.removeChild(t),e.callbacks.hidden.call(t))})}},{key:"destroy",value:function(t){var e=st(te,function(e){return e.popper===t}),n=e.el,r=e.popperInstance,i=e.listeners;wt(t)&&this.hide(t,0),i.forEach(function(t){return n.removeEventListener(t.event,t.handler)}),n.setAttribute("title",n.getAttribute("data-original-title")),n.removeAttribute("data-original-title"),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),r&&r.destroy(),te.splice(te.map(function(t){return t.popper}).indexOf(t),1)}},{key:"update",value:function(t){var e=st(te,function(e){return e.popper===t
}),n=t.querySelector(ee.content),r=e.el,i=e.settings.html;i?n.innerHTML=i instanceof Element?i.innerHTML:document.getElementById(i.replace("#","")).innerHTML:(n.innerHTML=r.getAttribute("title")||r.getAttribute("data-original-title"),ft(r))}}]),t}();return Ct.defaultSettings=ne,Ct});

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):t.Tippy=e(t.Popper)}(this,function(t){"use strict";function e(){e.done||(e.done=!0,C.supported=!!n("transform"),C.supported&&(document.addEventListener("click",function(t){var e=r(t.target,I.el),n=r(t.target,I.popper);if(n){if(o(O,function(t){return t.popper===n}).settings.interactive)return}if(e){var i=o(O,function(t){return t.el===e}),a=i.popper,s=i.settings,l=s.hideOnClick,u=s.multiple,c=s.trigger;if(!0!==l||C.touch||clearTimeout(a.getAttribute("data-delay")),!u&&C.touch||!u&&-1!==c.indexOf("click"))return w(i);if(!0!==l||-1!==c.indexOf("click"))return}!r(t.target,I.controller)&&document.querySelector(I.popper)&&w()}),C.supportsTouch?document.addEventListener("touchstart",function t(){C.touch=!0,C.iOS&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}):(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&(C.touch=!0),M=Object.freeze({html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:document.body,zIndex:9999,popperOptions:{}}),q=Object.keys(M)))}function n(t){for(var e=[!1,"webkit"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var r=e[i],o=r?""+r+n:t;if(void 0!==window.document.body.style[o])return o}return null}function i(t){return t.replace(/-.+/,"")}function r(t,e){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}}),t.closest(e)}function o(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function a(e){var n=e.el,r=e.popper,o=e.settings,a=o.position,s=o.popperOptions,l=o.offset,u=o.distance,c=r.querySelector(I.tooltip),p=S({placement:a},s||{},{modifiers:S({},s?s.modifiers:{},{flip:S({padding:u+5},s&&s.modifiers?s.modifiers.flip:{}),offset:S({offset:l},s&&s.modifiers?s.modifiers.offset:{})}),onUpdate:function(){c.style.top="",c.style.bottom="",c.style.left="",c.style.right="",c.style[i(r.getAttribute("x-placement"))]=-(u-M.distance)+"px"}});return new t(n,r,p)}function s(t,e,n){var r=n.position,o=n.distance,a=n.arrow,s=n.animateFill,l=n.inertia,u=n.animation,c=n.arrowSize,p=n.size,d=n.theme,f=n.html,m=n.zIndex,h=document.createElement("div");h.setAttribute("class","tippy-popper"),h.setAttribute("role","tooltip"),h.setAttribute("aria-hidden","true"),h.setAttribute("id","tippy-tooltip-"+t),h.style.zIndex=m;var v=document.createElement("div");if(v.setAttribute("class","tippy-tooltip tippy-tooltip--"+p+" "+d+"-theme leave"),v.setAttribute("data-animation",u),a){var y=document.createElement("div");y.setAttribute("class","arrow-"+c),y.setAttribute("x-arrow",""),v.appendChild(y)}if(s){v.setAttribute("data-animatefill","");var b=document.createElement("div");b.setAttribute("class","leave"),b.setAttribute("x-circle",""),v.appendChild(b)}l&&v.setAttribute("data-inertia","");var g=document.createElement("div");if(g.setAttribute("class","tippy-tooltip-content"),f){var w=void 0;f instanceof Element?(g.appendChild(f),w=f.id||"tippy-html-template"):(g.innerHTML=document.getElementById(f.replace("#","")).innerHTML,w=f),h.classList.add("html-template"),h.setAttribute("tabindex","0"),v.setAttribute("data-template-id",w)}else g.innerHTML=e;return v.style[i(r)]=-(o-M.distance)+"px",v.appendChild(g),h.appendChild(v),h}function l(t,e,n){var i=[];return"manual"===t?i:(e.addEventListener(t,n.handleTrigger),i.push({event:t,handler:n.handleTrigger}),"mouseenter"===t&&(e.addEventListener("mouseleave",n.handleMouseleave),i.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===t&&(e.addEventListener("blur",n.handleBlur),i.push({event:"blur",handler:n.handleBlur})),i)}function u(t){O.push(t)}function c(t){var e=t.getAttribute("title");t.setAttribute("data-original-title",e||"html"),t.removeAttribute("title")}function p(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function d(t){var e=this,r=o(O,function(t){return t.el===e}),a=r.popper,s=i(a.getAttribute("x-placement")),l=Math.round(a.offsetWidth/2),u=Math.round(a.offsetHeight/2),c=document.documentElement.offsetWidth||document.body.offsetWidth,p=t.pageX,d=t.pageY,f=void 0,m=void 0;"top"===s?(f=p-l,m=d-2.5*u):"left"===s?(f=p-2*l-15,m=d-u):"right"===s?(f=p+u,m=d-u):"bottom"===s&&(f=p-l,m=d+u/1.5),"top"!==s&&"bottom"!==s||(p+5+l>c?f=c-5-2*l:p-5-l<0&&(f=5)),a.style[n("transform")]="translate3d("+f+"px, "+m+"px, 0)"}function f(t,e){e?window.getComputedStyle(e)[n("transform")]:window.getComputedStyle(t).opacity}function m(t,e){t.forEach(function(t){t&&e(t.classList)})}function h(t,e){var i=e;t.forEach(function(t){t&&(i=e,t.hasAttribute("x-circle")&&(i=Math.round(i/1.2)),t.style[n("transitionDuration")]=i+"ms")})}function v(t,e,n){var i=t.popper.querySelector(I.tooltip),r=!1,o=function t(e){e.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",t),i.removeEventListener("transitionend",t),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(t.transitionendTimeout),t.transitionendTimeout=setTimeout(function(){!r&&n()},e)}function y(t,e){return t.style.visibility===e}function b(t){var e=t.el,n=(t.popper,t.settings),i=n.appendTo,r=n.followCursor;i.appendChild(t.popper),t.popperInstance?(t.popperInstance.update(),!r&&t.popperInstance.enableEventListeners()):(t.popperInstance=a(t),r&&!C.touch&&(e.addEventListener("mousemove",d),t.popperInstance.disableEventListeners()))}function g(t){var e=t.popper,i=t.popperInstance,r=t.settings.stickyDuration,o=function(){return e.style[n("transitionDuration")]=r+"ms"},a=function(){return e.style[n("transitionDuration")]=""};D(function t(){i&&i.scheduleUpdate(),o();var n="visible"===e.style.visibility;window.requestAnimationFrame?n?window.requestAnimationFrame(t):a():n?setTimeout(t,20):a()})}function w(t){O.forEach(function(e){var n=e.popper,i=e.tippyInstance,r=e.settings,o=r.appendTo,a=r.hideOnClick,s=r.hideDuration,l=r.trigger;if(o.contains(n)){var u=!0===a||-1!==l.indexOf("focus"),c=!t||n!==t.popper;u&&c&&i.hide(n,s)}})}function E(t){return t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t))}function A(t,e,n){if(!e.getAttribute("x-placement"))return!1;var r=t.clientX,o=t.clientY,a=n.interactiveBorder,s=n.distance,l=e.getBoundingClientRect(),u=i(e.getAttribute("x-placement")),c=a+s,p=l.top-o>a,d=o-l.bottom>a,f=l.left-r>a,m=r-l.right>a;return"top"===u?p=l.top-o>c:"bottom"===u?d=o-l.bottom>c:"left"===u?f=l.left-r>c:"right"===u&&(m=r-l.right>c),p||d||f||m}function T(t,e){return new H(t,e)}t="default"in t?t.default:t;var k=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},L=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),S=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},x="undefined"!=typeof window,C={};x&&(C.supportsTouch="ontouchstart"in window,C.iOS=/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream,C.touch=!1);var O=[],I={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"},M=void 0,q=void 0,F=1,D=function(){var t=void 0;return function(e){clearTimeout(t),window.requestAnimationFrame?window.requestAnimationFrame(function(){t=setTimeout(e,0)}):t=setTimeout(e,0)}}(),H=function(){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(k(this,t),e(),C.supported){this.selector=n,this.settings=Object.freeze(S({},M,i)),this.callbacks={wait:i.wait,beforeShown:i.beforeShown||new Function,shown:i.shown||new Function,beforeHidden:i.beforeHidden||new Function,hidden:i.hidden||new Function};var r=E(n);this._createTooltips(r)}}return L(t,[{key:"_applyIndividualSettings",value:function(t){var e=this,n={};return q.forEach(function(i){var r=t.getAttribute("data-"+i.toLowerCase())||e.settings[i];"false"===r&&(r=!1),"true"===r&&(r=!0),isNaN(parseFloat(r))||(r=parseFloat(r)),n[i]=r}),n.arrow&&(n.animateFill=!1),S({},this.settings,n)}},{key:"_getEventListenerHandlers",value:function(t,e,n){var i=this,o=(n.position,n.delay),a=n.hideDelay,s=n.hideDuration,l=n.duration,u=n.interactive,c=(n.interactiveBorder,n.distance,n.hideOnClick),p=n.trigger,d=function(){clearTimeout(e.getAttribute("data-delay")),clearTimeout(e.getAttribute("data-hidedelay"))},f=function(){if(d(),"visible"!==e.style.visibility)if(o){var t=setTimeout(function(){return i.show(e,l)},o);e.setAttribute("data-delay",t)}else i.show(e,l)},m=function(t){return i.callbacks.wait?i.callbacks.wait.call(e,f,t):f()},h=function(){if(d(),a){var t=setTimeout(function(){return i.hide(e,s)},a);e.setAttribute("data-hidedelay",t)}else i.hide(e,s)};return{handleTrigger:function(t){var n="click"===t.type,i="visible"===e.style.visibility,r="persistent"!==c;n&&i&&r?h():m(t)},handleMouseleave:function(i){if(u){var o=function i(o){var a=function(){document.removeEventListener("mousemove",i),h()},s=r(o.target,I.el),l=r(o.target,I.popper)===e,u=s===t,c=-1!==p.indexOf("click");if(s&&s!==t)return a();l||u||c||A(o,e,n)&&a()};return document.addEventListener("mousemove",o)}h()},handleBlur:function(t){!C.touch&&t.relatedTarget&&(r(t.relatedTarget,I.popper)||h())}}}},{key:"_createTooltips",value:function(t){var e=this;t.forEach(function(t){var n=e._applyIndividualSettings(t),i=n.html,r=n.trigger,o=t.getAttribute("title");if(o||i){var a=F;t.setAttribute("data-tooltipped",""),t.setAttribute("aria-describedby","tippy-tooltip-"+a),c(t);var p=s(a,o,n),d=e._getEventListenerHandlers(t,p,n),f=[];r.trim().split(" ").forEach(function(e){return f=f.concat(l(e,t,d))}),u({id:a,el:t,popper:p,settings:n,listeners:f,tippyInstance:e}),F++}})}},{key:"getPopperElement",value:function(t){try{return o(O,function(e){return e.el===t}).popper}catch(t){console.error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(t){try{return o(O,function(e){return e.popper===t}).el}catch(t){console.error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"getReference",value:function(t){return o(O,function(e){return e.el===t})||o(O,function(e){return e.popper===t})}},{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeShown.call(t);var i=o(O,function(e){return e.popper===t}),r=t.querySelector(I.tooltip),a=t.querySelector(I.circle),s=i.el,l=i.settings,u=l.appendTo,c=l.sticky,p=l.interactive,d=l.followCursor,w=l.flipDuration;h([t,r,a],0),!u.contains(t)&&b(i),t.style.visibility="visible",t.setAttribute("aria-hidden","false"),D(function(){y(t,"visible")&&(!d&&i.popperInstance.update(),h([r,a],n),!d&&h([t],w),p&&s.classList.add("active"),c&&g(i),f(r,a),m([r,a],function(t){t.contains("tippy-notransition")&&t.remove("tippy-notransition"),t.remove("leave"),t.add("enter")}),v(i,n,function(){y(t,"visible")&&!i.onShownFired&&(p&&t.focus(),r.classList.add("tippy-notransition"),i.onShownFired=!0,e.callbacks.shown.call(t))}))})}},{key:"hide",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(t);var r=o(O,function(e){return e.popper===t}),a=t.querySelector(I.tooltip),s=t.querySelector(I.circle),l=(t.querySelector(I.content),r.el),u=r.settings,c=u.appendTo,d=(u.sticky,u.interactive),f=(u.followCursor,u.html),b=u.trigger;r.onShownFired=!1,d&&l.classList.remove("active"),t.style.visibility="hidden",t.setAttribute("aria-hidden","true"),i===M.hideDuration?i=parseInt(a.style[n("transitionDuration")]):h([a,s],i),m([a,s],function(t){t.contains("tippy-tooltip")&&t.remove("tippy-notransition"),t.remove("enter"),t.add("leave")}),f&&-1!==b.indexOf("click")&&p(l)&&l.focus(),v(r,i,function(){y(t,"hidden")&&c.contains(t)&&(r.popperInstance.disableEventListeners(),c.removeChild(t),e.callbacks.hidden.call(t))})}},{key:"destroy",value:function(t){var e=o(O,function(e){return e.popper===t}),n=e.el,i=e.popperInstance,r=e.listeners;y(t,"hidden")||this.hide(t,0),r.forEach(function(t){return n.removeEventListener(t.event,t.handler)}),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),O.splice(O.map(function(t){return t.popper}).indexOf(t),1)}},{key:"update",value:function(t){var e=o(O,function(e){return e.popper===t}),n=t.querySelector(I.content),i=e.el,r=e.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.getAttribute("title")||i.getAttribute("data-original-title"),c(i))}}]),t}();return T});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):t.Tippy=e(t.Popper)}(this,function(t){"use strict";function e(){e.done||(e.done=!0,document.addEventListener("click",function(t){if(!(t.target instanceof Element))return w();var e=r(t.target,D.el),n=r(t.target,D.popper);if(n){if(o(q,function(t){return t.popper===n}).settings.interactive)return}if(e){var i=o(q,function(t){return t.el===e}),a=i.popper,u=i.settings,s=u.hideOnClick,c=u.multiple,l=u.trigger;if(!0!==s||I.touch||clearTimeout(a.getAttribute("data-delay")),!c&&I.touch||!c&&-1!==l.indexOf("click"))return w(i);if(!0!==s||-1!==l.indexOf("click"))return}!r(t.target,D.controller)&&document.querySelector(D.popper)&&w()}),I.supportsTouch?document.addEventListener("touchstart",function t(){I.touch=!0,I.iOS&&document.body.classList.add("tippy-touch"),document.removeEventListener("touchstart",t)}):(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&(I.touch=!0),F.appendTo=document.body)}function n(t){for(var e=[!1,"webkit"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i<e.length;i++){var r=e[i],o=r?""+r+n:t;if(void 0!==window.document.body.style[o])return o}return null}function i(t){return t.replace(/-.+/,"")}function r(t,e){return Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){for(var e=this;e;){if(e.matches(t))return e;e=e.parentElement}}),t.closest(e)}function o(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function a(t){var e={view:window,bubbles:!0,cancelable:!0},n=window.MouseEvent?new MouseEvent("click",e):new Event("click",e);t.dispatchEvent(n)}function u(e){var n=e.el,r=e.popper,o=e.settings,a=o.position,u=o.popperOptions,s=o.offset,c=o.distance,l=r.querySelector(D.tooltip),p=M({placement:a},u||{},{modifiers:M({},u?u.modifiers:{},{flip:M({padding:c+5},u&&u.modifiers?u.modifiers.flip:{}),offset:M({offset:s},u&&u.modifiers?u.modifiers.offset:{})}),onUpdate:function(){l.style.top="",l.style.bottom="",l.style.left="",l.style.right="",l.style[i(r.getAttribute("x-placement"))]=-(c-F.distance)+"px"}});return new t(n,r,p)}function s(t,e,n){var r=n.position,o=n.distance,a=n.arrow,u=n.animateFill,s=n.inertia,c=n.animation,l=n.arrowSize,p=n.size,d=n.theme,f=n.html,h=n.zIndex,m=document.createElement("div");m.setAttribute("class","tippy-popper"),m.setAttribute("role","tooltip"),m.setAttribute("aria-hidden","true"),m.setAttribute("id","tippy-tooltip-"+t),m.style.zIndex=h;var v=document.createElement("div");if(v.setAttribute("class","tippy-tooltip tippy-tooltip--"+p+" "+d+"-theme leave"),v.setAttribute("data-animation",c),a){var y=document.createElement("div");y.setAttribute("class","arrow-"+l),y.setAttribute("x-arrow",""),v.appendChild(y)}if(u){v.setAttribute("data-animatefill","");var b=document.createElement("div");b.setAttribute("class","leave"),b.setAttribute("x-circle",""),v.appendChild(b)}s&&v.setAttribute("data-inertia","");var g=document.createElement("div");if(g.setAttribute("class","tippy-tooltip-content"),f){var w=void 0;f instanceof Element?(g.appendChild(f),w=f.id||"tippy-html-template"):(g.innerHTML=document.getElementById(f.replace("#","")).innerHTML,w=f),m.classList.add("html-template"),m.setAttribute("tabindex","0"),v.setAttribute("data-template-id",w)}else g.innerHTML=e;return v.style[i(r)]=-(o-F.distance)+"px",v.appendChild(g),m.appendChild(v),m}function c(t,e,n,i){var r=[];return"manual"===t?r:(e.addEventListener(t,n.handleTrigger),r.push({event:t,handler:n.handleTrigger}),"mouseenter"===t&&(I.supportsTouch&&i&&(e.addEventListener("touchstart",n.handleTrigger),r.push({event:"touchstart",handler:n.handleTrigger}),e.addEventListener("touchend",n.handleMouseleave),r.push({event:"touchend",handler:n.handleMouseleave})),e.addEventListener("mouseleave",n.handleMouseleave),r.push({event:"mouseleave",handler:n.handleMouseleave})),"focus"===t&&(e.addEventListener("blur",n.handleBlur),r.push({event:"blur",handler:n.handleBlur})),r)}function l(t){var e=t.getAttribute("title");t.setAttribute("data-original-title",e||"html"),t.removeAttribute("title")}function p(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function d(t){var e=this,r=o(q,function(t){return t.el===e}),a=r.popper,u=i(a.getAttribute("x-placement")),s=Math.round(a.offsetWidth/2),c=Math.round(a.offsetHeight/2),l=document.documentElement.offsetWidth||document.body.offsetWidth,p=t.pageX,d=t.pageY,f=void 0,h=void 0;switch(u){case"top":f=p-s,h=d-2.5*c;break;case"left":f=p-2*s-15,h=d-c;break;case"right":f=p+c,h=d-c;break;case"bottom":f=p-s,h=d+c/1.5}var m=p+5+s>l,v=p-5-s<0;"top"!==u&&"bottom"!==u||(m&&(f=l-5-2*s),v&&(f=5)),a.style[n("transform")]="translate3d("+f+"px, "+h+"px, 0)"}function f(t,e){e?window.getComputedStyle(e)[n("transform")]:window.getComputedStyle(t).opacity}function h(t,e){t.forEach(function(t){t&&e(t.classList)})}function m(t,e){var i=e;t.forEach(function(t){t&&(i=e,t.hasAttribute("x-circle")&&(i=Math.round(i/1.2)),t.style[n("transitionDuration")]=i+"ms")})}function v(t,e,n){var i=t.popper.querySelector(D.tooltip),r=!1,o=function t(e){e.target===i&&(r=!0,i.removeEventListener("webkitTransitionEnd",t),i.removeEventListener("transitionend",t),n())};i.addEventListener("webkitTransitionEnd",o),i.addEventListener("transitionend",o),clearTimeout(t.transitionendTimeout),t.transitionendTimeout=setTimeout(function(){!r&&n()},e)}function y(t){return"visible"===t.style.visibility}function b(t){var e=t.el,n=(t.popper,t.listeners,t.settings),i=n.appendTo,r=n.followCursor;i.appendChild(t.popper),t.popperInstance?(t.popperInstance.update(),!r&&t.popperInstance.enableEventListeners()):(t.popperInstance=u(t),r&&!I.touch&&(e.addEventListener("mousemove",d),t.popperInstance.disableEventListeners()))}function g(t){var e=t.popper,i=t.popperInstance,r=t.settings.stickyDuration,o=function(){return e.style[n("transitionDuration")]=r+"ms"},a=function(){return e.style[n("transitionDuration")]=""};P(function t(){i&&i.scheduleUpdate(),o(),y(e)?window.requestAnimationFrame(t):a()})}function w(t){q.forEach(function(e){var n=e.popper,i=e.tippyInstance,r=e.settings,o=r.appendTo,a=r.hideOnClick,u=r.hideDuration,s=r.trigger;if(o.contains(n)){var c=!0===a||-1!==s.indexOf("focus"),l=!t||n!==t.popper;c&&l&&i.hide(n,u)}})}function E(t){return t instanceof Element?[t]:[].slice.call(document.querySelectorAll(t))}function A(t,e,n){if(!e.getAttribute("x-placement"))return!1;var r=t.clientX,o=t.clientY,a=n.interactiveBorder,u=n.distance,s=e.getBoundingClientRect(),c=i(e.getAttribute("x-placement")),l=a+u,p={top:s.top-o>a,bottom:o-s.bottom>a,left:s.left-r>a,right:r-s.right>a};switch(c){case"top":p.top=s.top-o>l;break;case"bottom":p.bottom=o-s.bottom>l;break;case"left":p.left=s.left-r>l;break;case"right":p.right=r-s.right>l}return p.top||p.bottom||p.left||p.right}function T(t,e){var n=B.reduce(function(n,i){var r=t.getAttribute("data-"+i.toLowerCase())||e[i];return"false"===r&&(r=!1),"true"===r&&(r=!0),isNaN(parseFloat(r))||(r=parseFloat(r)),n[i]=r,n},{});return n.arrow&&(n.animateFill=!1),M({},e,n)}function k(t,e,n){var i=this,o=(n.position,n.delay),u=n.hideDelay,s=n.hideDuration,c=n.duration,l=n.interactive,p=(n.interactiveBorder,n.distance,n.hideOnClick),d=n.trigger,f=n.touchHold,h=function(){clearTimeout(e.getAttribute("data-delay")),clearTimeout(e.getAttribute("data-hidedelay"))},m=function(){if(h(),!y(e))if(o){var t=setTimeout(function(){return i.show(e,c)},o);e.setAttribute("data-delay",t)}else i.show(e,c)},v=function(t){return i.callbacks.wait?i.callbacks.wait.call(e,m,t):m()},b=function(){if(h(),u){var t=setTimeout(function(){return i.hide(e,s)},u);e.setAttribute("data-hidedelay",t)}else i.hide(e,s)};return{handleTrigger:function(n){if("mouseenter"===n.type&&I.supportsTouch&&I.touch){if(f)return;if(I.iOS){var i=function(){return a(t)};"A"===t.nodeName?setTimeout(i,300):i()}}var r="click"===n.type,o="persistent"!==p;r&&y(e)&&o?b():v(n)},handleMouseleave:function(i){if(!("mouseleave"===i.type&&I.supportsTouch&&I.touch&&f)){if(l){var o=function i(o){var a=function(){document.removeEventListener("mousemove",i),b()},u=r(o.target,D.el),s=r(o.target,D.popper)===e,c=u===t,l=-1!==d.indexOf("click");if(u&&u!==t)return a();s||c||l||A(o,e,n)&&a()};return document.addEventListener("mousemove",o)}b()}},handleBlur:function(t){!I.touch&&t.relatedTarget&&(r(t.relatedTarget,D.popper)||b())}}}function L(t){var e=this;t.forEach(function(t){var n=T(t,e.settings),i=n.html,r=n.trigger,o=n.touchHold,a=t.getAttribute("title");if(a||i){var u=H;t.setAttribute("data-tooltipped",""),t.setAttribute("aria-describedby","tippy-tooltip-"+u),l(t);var p=s(u,a,n),d=k.call(e,t,p,n),f=[];r.trim().split(" ").forEach(function(e){return f=f.concat(c(e,t,d,o))}),q.push({id:u,el:t,popper:p,settings:n,listeners:f,tippyInstance:e}),H++}})}function S(t,e){return new z(t,e)}t="default"in t?t.default:t;var x=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},C=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),M=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},O="undefined"!=typeof window,I={};O&&(I.supported=!!window.requestAnimationFrame,I.supportsTouch="ontouchstart"in window,I.iOS=/iPhone|iPad|iPod/.test(navigator.userAgent)&&!window.MSStream,I.touch=!1);var H=1,q=[],D={popper:".tippy-popper",tooltip:".tippy-tooltip",content:".tippy-tooltip-content",circle:"[x-circle]",arrow:"[x-arrow]",el:"[data-tooltipped]",controller:"[data-tippy-controller]"},F={html:!1,position:"top",animation:"shift",animateFill:!0,arrow:!1,arrowSize:"regular",delay:0,hideDelay:0,trigger:"mouseenter focus",duration:375,hideDuration:375,interactive:!1,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,flipDuration:300,sticky:!1,stickyDuration:200,appendTo:null,zIndex:9999,touchHold:!1,popperOptions:{}},B=I.supported&&Object.keys(F),P=function(){var t=void 0;return function(e){clearTimeout(t),window.requestAnimationFrame(function(){t=setTimeout(e,0)})}}(),z=function(){function t(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,t),I.supported&&(e(),this.selector=n,this.settings=M({},F,i),this.callbacks={wait:i.wait,beforeShown:i.beforeShown||new Function,shown:i.shown||new Function,beforeHidden:i.beforeHidden||new Function,hidden:i.hidden||new Function},L.call(this,E(n)))}return C(t,[{key:"getPopperElement",value:function(t){try{return o(q,function(e){return e.el===t}).popper}catch(t){console.error("[Tippy error]: Element does not exist in any Tippy instances")}}},{key:"getTooltippedElement",value:function(t){try{return o(q,function(e){return e.popper===t}).el}catch(t){console.error("[Tippy error]: Popper does not exist in any Tippy instances")}}},{key:"getReference",value:function(t){return o(q,function(e){return e.el===t})||o(q,function(e){return e.popper===t})}},{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeShown.call(t);var i=o(q,function(e){return e.popper===t}),r=t.querySelector(D.tooltip),a=t.querySelector(D.circle),u=i.el,s=i.settings,c=s.appendTo,l=s.sticky,p=s.interactive,d=s.followCursor,w=s.flipDuration;m([t,r,a],0),!c.contains(t)&&b(i),t.style.visibility="visible",t.setAttribute("aria-hidden","false"),P(function(){y(t)&&(!d&&i.popperInstance.update(),m([r,a],n),!d&&m([t],w),p&&u.classList.add("active"),l&&g(i),f(r,a),h([r,a],function(t){t.contains("tippy-notransition")&&t.remove("tippy-notransition"),t.remove("leave"),t.add("enter")}),v(i,n,function(){y(t)&&!i.onShownFired&&(p&&t.focus(),r.classList.add("tippy-notransition"),i.onShownFired=!0,e.callbacks.shown.call(t))}))})}},{key:"hide",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.settings.duration;this.callbacks.beforeHidden.call(t);var r=o(q,function(e){return e.popper===t}),a=t.querySelector(D.tooltip),u=t.querySelector(D.circle),s=(t.querySelector(D.content),r.el),c=r.settings,l=c.appendTo,d=(c.sticky,c.interactive),f=(c.followCursor,c.html),b=c.trigger;r.onShownFired=!1,d&&s.classList.remove("active"),t.style.visibility="hidden",t.setAttribute("aria-hidden","true"),i===F.hideDuration?i=parseInt(a.style[n("transitionDuration")]):m([a,u],i),h([a,u],function(t){t.contains("tippy-tooltip")&&t.remove("tippy-notransition"),t.remove("enter"),t.add("leave")}),f&&-1!==b.indexOf("click")&&p(s)&&s.focus(),v(r,i,function(){!y(t)&&l.contains(t)&&(r.popperInstance.disableEventListeners(),l.removeChild(t),e.callbacks.hidden.call(t))})}},{key:"destroy",value:function(t){var e=o(q,function(e){return e.popper===t}),n=e.el,i=e.popperInstance,r=e.listeners;y(t)&&this.hide(t,0),r.forEach(function(t){return n.removeEventListener(t.event,t.handler)}),n.setAttribute("title",n.getAttribute("data-original-title")),n.removeAttribute("data-original-title"),n.removeAttribute("data-tooltipped"),n.removeAttribute("aria-describedby"),i&&i.destroy(),q.splice(q.map(function(t){return t.popper}).indexOf(t),1)}},{key:"update",value:function(t){var e=o(q,function(e){return e.popper===t}),n=t.querySelector(D.content),i=e.el,r=e.settings.html;r?n.innerHTML=r instanceof Element?r.innerHTML:document.getElementById(r.replace("#","")).innerHTML:(n.innerHTML=i.getAttribute("title")||i.getAttribute("data-original-title"),l(i))}}]),t}();return S.defaultSettings=F,S});
{
"name": "tippy.js",
"version": "0.16.3",
"description": "Pure JS Tooltip Library",
"version": "0.17.0",
"description": "Vanilla JS Tooltip Library",
"main": "dist/tippy.js",

@@ -6,0 +6,0 @@ "scripts": {

import Popper from 'popper.js'
/**!
* @file tippy.js | Pure JS Tooltip Library
* @version 0.16.3
* @file tippy.js | Vanilla JS Tooltip Library
* @version 0.17.0
* @license MIT

@@ -14,2 +14,3 @@ */

if (IS_BROWSER) {
BROWSER.supported = !!window.requestAnimationFrame
BROWSER.supportsTouch = 'ontouchstart' in window

@@ -20,2 +21,4 @@ BROWSER.iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream

let idCounter = 1
const STORE = []

@@ -33,6 +36,35 @@

let defaultSettings,
defaultSettingsKeys,
idCounter = 1
const DEFAULT_SETTINGS = {
html: false,
position: 'top',
animation: 'shift',
animateFill: true,
arrow: false,
arrowSize: 'regular',
delay: 0,
hideDelay: 0,
trigger: 'mouseenter focus',
duration: 375,
hideDuration: 375,
interactive: false,
interactiveBorder: 2,
theme: 'dark',
size: 'regular',
distance: 10,
offset: 0,
hideOnClick: true,
multiple: false,
followCursor: false,
inertia: false,
flipDuration: 300,
sticky: false,
stickyDuration: 200,
appendTo: null,
zIndex: 9999,
touchHold: false,
popperOptions: {}
}
const DEFAULT_SETTINGS_KEYS = BROWSER.supported && Object.keys(DEFAULT_SETTINGS)
/**

@@ -46,10 +78,10 @@ * To run a single time, once DOM is presumed to be ready

// prefix will return either `transform`, `webkitTransform` or null
BROWSER.supported = !!prefix('transform')
if (!BROWSER.supported) return
// Handle clicks anywhere on the document
document.addEventListener('click', event => {
// Simulated events dispatched on the document
if (!(event.target instanceof Element)) {
return hideAllPoppers()
}
const el = closest(event.target, SELECTORS.el)

@@ -108,33 +140,5 @@ const popper = closest(event.target, SELECTORS.popper)

defaultSettings = Object.freeze({
html: false,
position: 'top',
animation: 'shift',
animateFill: true,
arrow: false,
arrowSize: 'regular',
delay: 0,
hideDelay: 0,
trigger: 'mouseenter focus',
duration: 375,
hideDuration: 375,
interactive: false,
interactiveBorder: 2,
theme: 'dark',
size: 'regular',
distance: 10,
offset: 0,
hideOnClick: true,
multiple: false,
followCursor: false,
inertia: false,
flipDuration: 300,
sticky: false,
stickyDuration: 200,
appendTo: document.body,
zIndex: 9999,
popperOptions: {}
})
defaultSettingsKeys = Object.keys(defaultSettings)
// If the script is in <head>, document.body is null, so it's set in the
// init function
DEFAULT_SETTINGS.appendTo = document.body
}

@@ -145,3 +149,3 @@

* Pushes execution of a function to end of execution queue, doing so
* just before repaint if possible
* just before the next repaint
* @return {Function}

@@ -156,9 +160,5 @@ * @param {Function} fn

if (window.requestAnimationFrame) {
window.requestAnimationFrame(() => {
currentTimeoutQueue = setTimeout(fn, 0)
})
} else {
window.requestAnimationFrame(() => {
currentTimeoutQueue = setTimeout(fn, 0)
}
})
}

@@ -244,2 +244,19 @@ })()

/**
* Simulates a click event
* @param {Element} el
*/
function simulateClick(el) {
const settings = {
'view': window,
'bubbles': true,
'cancelable': true
}
const event = window.MouseEvent ? new MouseEvent('click', settings)
: new Event('click', settings)
el.dispatchEvent(event)
}
/**
* Creates a new popper instance

@@ -283,3 +300,3 @@ * @param {Object} ref

tooltip.style.right = ''
tooltip.style[getCorePlacement(popper.getAttribute('x-placement'))] = -(distance - defaultSettings.distance) + 'px'
tooltip.style[getCorePlacement(popper.getAttribute('x-placement'))] = -(distance - DEFAULT_SETTINGS.distance) + 'px'
}

@@ -372,3 +389,3 @@ }

// Init distance. Further updates are made in the popper instance's `onUpdate()` method
tooltip.style[getCorePlacement(position)] = -(distance - defaultSettings.distance) + 'px'
tooltip.style[getCorePlacement(position)] = -(distance - DEFAULT_SETTINGS.distance) + 'px'

@@ -388,3 +405,3 @@ tooltip.appendChild(content)

*/
function createTrigger(event, el, handlers) {
function createTrigger(event, el, handlers, touchHold) {
const listeners = []

@@ -403,2 +420,16 @@

if (event === 'mouseenter') {
if (BROWSER.supportsTouch && touchHold) {
el.addEventListener('touchstart', handlers.handleTrigger)
listeners.push({
event: 'touchstart',
handler: handlers.handleTrigger
})
el.addEventListener('touchend', handlers.handleMouseleave)
listeners.push({
event: 'touchend',
handler: handlers.handleMouseleave
})
}
el.addEventListener('mouseleave', handlers.handleMouseleave)

@@ -410,2 +441,3 @@ listeners.push({

}
if (event === 'focus') {

@@ -423,11 +455,2 @@ el.addEventListener('blur', handlers.handleBlur)

/**
* Adds each reference (tooltipped element, popper and its settings/listeners etc)
* into global storage
* @param {Object} ref - current ref in the forEach loop to be pushed
*/
function pushIntoStorage(ref) {
STORE.push(ref)
}
/**
* Removes the title from the tooltipped element

@@ -460,3 +483,3 @@ * @param {Element} el

* Mousemove event listener callback method for follow cursor setting
* @param {Event} e
* @param {MouseEvent} e
*/

@@ -477,23 +500,31 @@ function followCursorHandler(e) {

if (position === 'top') {
x = pageX - halfPopperWidth
y = pageY - 2.5 * halfPopperHeight
} else if (position === 'left') {
x = pageX - ( 2 * halfPopperWidth ) - 15
y = pageY - halfPopperHeight
} else if (position === 'right') {
x = pageX + halfPopperHeight
y = pageY - halfPopperHeight
} else if (position === 'bottom') {
x = pageX - halfPopperWidth
y = pageY + halfPopperHeight/1.5
switch (position) {
case 'top':
x = pageX - halfPopperWidth
y = pageY - 2.5 * halfPopperHeight
break
case 'left':
x = pageX - ( 2 * halfPopperWidth ) - 15
y = pageY - halfPopperHeight
break
case 'right':
x = pageX + halfPopperHeight
y = pageY - halfPopperHeight
break
case 'bottom':
x = pageX - halfPopperWidth
y = pageY + halfPopperHeight/1.5
break
}
const isRightOverflowing = pageX + viewportPadding + halfPopperWidth > pageWidth
const isLeftOverflowing = pageX - viewportPadding - halfPopperWidth < 0
// Prevent left/right overflow
if (position === 'top' || position === 'bottom') {
if (pageX + viewportPadding + halfPopperWidth > pageWidth) {
// Right overflow
if (isRightOverflowing) {
x = pageWidth - viewportPadding - ( 2 * halfPopperWidth)
} else if (pageX - viewportPadding - halfPopperWidth < 0) {
// Left overflow
}
if (isLeftOverflowing) {
x = viewportPadding

@@ -585,8 +616,8 @@ }

/**
* Determines if a popper is currently visible
* @param {Element} popper
* @param {String} type 'show'/'hide'
* @return {Boolean}
*/
function isExpectedState(popper, type) {
return popper.style.visibility === type
function isVisible(popper) {
return popper.style.visibility === 'visible'
}

@@ -604,2 +635,3 @@

popper,
listeners,
settings: {

@@ -654,11 +686,4 @@ appendTo,

const isVisible = popper.style.visibility === 'visible'
if (window.requestAnimationFrame) {
isVisible ? window.requestAnimationFrame(updatePosition)
: removeTransitionDuration()
} else {
isVisible ? setTimeout(updatePosition, 20)
: removeTransitionDuration()
}
isVisible(popper) ? window.requestAnimationFrame(updatePosition)
: removeTransitionDuration()
}

@@ -732,232 +757,258 @@

let exceedsTop = rect.top - y > interactiveBorder
let exceedsBottom = y - rect.bottom > interactiveBorder
let exceedsLeft = rect.left - x > interactiveBorder
let exceedsRight = x - rect.right > interactiveBorder
const exceeds = {
top: rect.top - y > interactiveBorder,
bottom: y - rect.bottom > interactiveBorder,
left: rect.left - x > interactiveBorder,
right: x - rect.right > interactiveBorder
}
if (corePosition === 'top') {
exceedsTop = rect.top - y > borderWithDistance
} else if (corePosition === 'bottom') {
exceedsBottom = y - rect.bottom > borderWithDistance
} else if (corePosition === 'left') {
exceedsLeft = rect.left - x > borderWithDistance
} else if (corePosition === 'right') {
exceedsRight = x - rect.right > borderWithDistance
switch (corePosition) {
case 'top':
exceeds.top = rect.top - y > borderWithDistance
break
case 'bottom':
exceeds.bottom = y - rect.bottom > borderWithDistance
break
case 'left':
exceeds.left = rect.left - x > borderWithDistance
break
case 'right':
exceeds.right = x - rect.right > borderWithDistance
break
}
return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight
return exceeds.top || exceeds.bottom || exceeds.left || exceeds.right
}
/**
* Private methods are prefixed with an underscore _
* @param {String|Element} selector
* @param {Object} settings (optional) - the object of settings to be applied to the instance
* Returns an object of settings to override global settings
* @param {Element} el - the tooltipped element
* @return {Object} - individual settings
*/
class Tippy {
constructor(selector, settings = {}) {
function applyIndividualSettings(el, instanceSettings) {
// DOM is presumably mostly ready (for document.body) by instantiation time
init()
const settings = DEFAULT_SETTINGS_KEYS.reduce((acc, key) => {
let val = el.getAttribute(`data-${ key.toLowerCase() }`) || instanceSettings[key]
// Use default browser tooltip on unsupported browsers
if (!BROWSER.supported) return
// Convert strings to booleans
if (val === 'false') val = false
if (val === 'true') val = true
this.selector = selector
this.settings = Object.freeze(Object.assign({}, defaultSettings, settings))
this.callbacks = {
wait: settings.wait,
beforeShown: settings.beforeShown || new Function,
shown: settings.shown || new Function,
beforeHidden: settings.beforeHidden || new Function,
hidden: settings.hidden || new Function
}
// Convert number strings to true numbers
if (!isNaN(parseFloat(val))) val = parseFloat(val)
const els = getSelectorElementsArray(selector)
this._createTooltips(els)
}
acc[key] = val
/**
* Returns an object of settings to override global settings
* @param {Element} el - the tooltipped element
* @return {Object} - individual settings
*/
_applyIndividualSettings(el) {
return acc
}, {})
const settings = {}
// animateFill is disabled if an arrow is true
if (settings.arrow) settings.animateFill = false
defaultSettingsKeys.forEach(key => {
let val = el.getAttribute(`data-${ key.toLowerCase() }`) || this.settings[key]
return Object.assign({}, instanceSettings, settings)
}
// Convert strings to booleans
if (val === 'false') val = false
if (val === 'true') val = true
/**
* Returns relevant listener callbacks for each ref
* @param {Element} el
* @param {Element} popper
* @param {Object} settings
* @return {Object} - relevant listener callback methods
*/
function getEventListenerHandlers(el, popper, settings) {
// Convert number strings to true numbers
if (!isNaN(parseFloat(val))) val = parseFloat(val)
const {
position,
delay,
hideDelay,
hideDuration,
duration,
interactive,
interactiveBorder,
distance,
hideOnClick,
trigger,
touchHold
} = settings
settings[key] = val
})
const clearTimeouts = () => {
clearTimeout(popper.getAttribute('data-delay'))
clearTimeout(popper.getAttribute('data-hidedelay'))
}
// animateFill is disabled if an arrow is true
if (settings.arrow) {
settings.animateFill = false
const _show = () => {
clearTimeouts()
// Not hidden. For clicking when it also has a `focus` event listener
if (isVisible(popper)) return
if (delay) {
const timeout = setTimeout(() => this.show(popper, duration), delay)
popper.setAttribute('data-delay', timeout)
} else {
this.show(popper, duration)
}
return Object.assign({}, this.settings, settings)
}
/**
* Returns relevant listener callbacks for each ref
* @param {Element} el
* @param {Element} popper
* @param {Object} settings
* @return {Object} - relevant listener callback methods
*/
_getEventListenerHandlers(el, popper, settings) {
const show = event =>
this.callbacks.wait ? this.callbacks.wait.call(popper, _show, event) : _show()
const {
position,
delay,
hideDelay,
hideDuration,
duration,
interactive,
interactiveBorder,
distance,
hideOnClick,
trigger
} = settings
const hide = () => {
clearTimeouts()
const clearTimeouts = () => {
clearTimeout(popper.getAttribute('data-delay'))
clearTimeout(popper.getAttribute('data-hidedelay'))
if (hideDelay) {
const timeout = setTimeout(() => this.hide(popper, hideDuration), hideDelay)
popper.setAttribute('data-hidedelay', timeout)
} else {
this.hide(popper, hideDuration)
}
}
const _show = () => {
clearTimeouts()
const handleTrigger = event => {
// Already visible. For clicking when it also has a `focus` event listener
if (popper.style.visibility === 'visible') return
if (event.type === 'mouseenter' && BROWSER.supportsTouch && BROWSER.touch) {
if (delay) {
const timeout = setTimeout(() => this.show(popper, duration), delay)
popper.setAttribute('data-delay', timeout)
} else {
this.show(popper, duration)
// Don't fire 'mouseenter', use the 'touchstart'
if (touchHold) return
if (BROWSER.iOS) {
// Prevents the need to double click buttons/anchor links on iOS
const fireClick = () => simulateClick(el)
// For anchor links, use a 300ms delay
el.nodeName === 'A' ? setTimeout(fireClick, 300)
: fireClick()
}
}
const show = event =>
this.callbacks.wait ? this.callbacks.wait.call(popper, _show, event) : _show()
// Toggle show/hide when clicking click-triggered tooltips
const isClick = event.type === 'click'
const isNotPersistent = hideOnClick !== 'persistent'
const hide = () => {
clearTimeouts()
isClick && isVisible(popper) && isNotPersistent ? hide() : show(event)
}
if (hideDelay) {
const timeout = setTimeout(() => this.hide(popper, hideDuration), hideDelay)
popper.setAttribute('data-hidedelay', timeout)
} else {
this.hide(popper, hideDuration)
}
}
const handleMouseleave = event => {
const handleTrigger = event => {
// Toggle show/hide when clicking click-triggered tooltips
const isClick = event.type === 'click'
const isVisible = popper.style.visibility === 'visible'
const isNotPersistent = hideOnClick !== 'persistent'
isClick && isVisible && isNotPersistent ? hide() : show(event)
// Don't fire 'mouseleave', use the 'touchend'
if (event.type === 'mouseleave' && BROWSER.supportsTouch &&
BROWSER.touch && touchHold) {
return
}
const handleMouseleave = event => {
if (interactive) {
// Temporarily handle mousemove to check if the mouse left somewhere
// other than its popper
const handleMousemove = event => {
const triggerHide = () => {
document.removeEventListener('mousemove', handleMousemove)
hide()
}
if (interactive) {
// Temporarily handle mousemove to check if the mouse left somewhere
// other than its popper
const handleMousemove = event => {
const triggerHide = () => {
document.removeEventListener('mousemove', handleMousemove)
hide()
}
const closestTooltippedEl = closest(event.target, SELECTORS.el)
const closestTooltippedEl = closest(event.target, SELECTORS.el)
const isOverPopper = closest(event.target, SELECTORS.popper) === popper
const isOverEl = closestTooltippedEl === el
const isClickTriggered = trigger.indexOf('click') !== -1
const isOverOtherTooltippedEl = closestTooltippedEl && closestTooltippedEl !== el
const isOverPopper = closest(event.target, SELECTORS.popper) === popper
const isOverEl = closestTooltippedEl === el
const isClickTriggered = trigger.indexOf('click') !== -1
const isOverOtherTooltippedEl = closestTooltippedEl && closestTooltippedEl !== el
if (isOverOtherTooltippedEl) {
return triggerHide()
}
if (isOverOtherTooltippedEl) {
return triggerHide()
}
if (isOverPopper || isOverEl || isClickTriggered) return
if (isOverPopper || isOverEl || isClickTriggered) return
if (cursorIsOutsideInteractiveBorder(event, popper, settings)) {
triggerHide()
}
if (cursorIsOutsideInteractiveBorder(event, popper, settings)) {
triggerHide()
}
return document.addEventListener('mousemove', handleMousemove)
}
// If it's not interactive, just hide it
hide()
return document.addEventListener('mousemove', handleMousemove)
}
const handleBlur = event => {
// Only hide if not a touch user and has a focus 'relatedtarget', of which is not
// a popper element
if (BROWSER.touch || !event.relatedTarget) return
if (closest(event.relatedTarget, SELECTORS.popper)) return
// If it's not interactive, just hide it
hide()
}
hide()
}
const handleBlur = event => {
// Only hide if not a touch user and has a focus 'relatedtarget', of which is not
// a popper element
if (BROWSER.touch || !event.relatedTarget) return
if (closest(event.relatedTarget, SELECTORS.popper)) return
return {
handleTrigger,
handleMouseleave,
handleBlur
}
hide()
}
/**
* Creates tooltips for all elements that match the instance's selector
* @param {Array} els - Elements
*/
_createTooltips(els) {
return {
handleTrigger,
handleMouseleave,
handleBlur
}
}
els.forEach(el => {
const settings = this._applyIndividualSettings(el)
/**
* Creates tooltips for all elements that match the instance's selector
* @param {Array} els - Elements
*/
function createTooltips(els) {
const { html, trigger } = settings
els.forEach(el => {
const settings = applyIndividualSettings(el, this.settings)
const title = el.getAttribute('title')
if (!title && !html) return
const { html, trigger, touchHold } = settings
const id = idCounter
el.setAttribute('data-tooltipped', '')
el.setAttribute('aria-describedby', `tippy-tooltip-${id}`)
const title = el.getAttribute('title')
if (!title && !html) return
removeTitle(el)
const id = idCounter
el.setAttribute('data-tooltipped', '')
el.setAttribute('aria-describedby', `tippy-tooltip-${id}`)
const popper = createPopperElement(id, title, settings)
const handlers = this._getEventListenerHandlers(el, popper, settings)
let listeners = []
removeTitle(el)
trigger.trim().split(' ').forEach(
event => listeners = listeners.concat(createTrigger(event, el, handlers))
)
const popper = createPopperElement(id, title, settings)
const handlers = getEventListenerHandlers.call(this, el, popper, settings)
let listeners = []
pushIntoStorage({
id,
el,
popper,
settings,
listeners,
tippyInstance: this
})
trigger.trim().split(' ').forEach(event =>
listeners = listeners.concat(createTrigger(event, el, handlers, touchHold))
)
idCounter++
STORE.push({
id,
el,
popper,
settings,
listeners,
tippyInstance: this
})
idCounter++
})
}
/**
* Private methods are prefixed with an underscore _
* @param {String|Element} selector
* @param {Object} settings (optional) - the object of settings to be applied to the instance
*/
class Tippy {
constructor(selector, settings = {}) {
// Use default browser tooltip on unsupported browsers
if (!BROWSER.supported) return
// DOM is presumably mostly ready (for document.body) by instantiation time
init()
this.selector = selector
this.settings = Object.assign({}, DEFAULT_SETTINGS, settings)
this.callbacks = {
wait: settings.wait,
beforeShown: settings.beforeShown || new Function,
shown: settings.shown || new Function,
beforeHidden: settings.beforeHidden || new Function,
hidden: settings.hidden || new Function
}
createTooltips.call(this, getSelectorElementsArray(selector))
}

@@ -1034,4 +1085,5 @@

const onceUpdated = () => {
if (!isExpectedState(popper, 'visible')) return
// Wait for popper to update position and alter x-placement
queueExecution(() => {
if (!isVisible(popper)) return

@@ -1063,3 +1115,3 @@ // Sometimes the arrow will not be in the correct position,

onTransitionEnd(ref, duration, () => {
if (!isExpectedState(popper, 'visible') || ref.onShownFired) return
if (!isVisible(popper) || ref.onShownFired) return

@@ -1077,6 +1129,3 @@ // Focus interactive tooltips only

})
}
// Wait for popper to update position and alter x-placement
queueExecution(onceUpdated)
})
}

@@ -1117,3 +1166,3 @@

// Use same duration as show if it's the default
if (duration === defaultSettings.hideDuration) {
if (duration === DEFAULT_SETTINGS.hideDuration) {
duration = parseInt(tooltip.style[prefix('transitionDuration')])

@@ -1139,3 +1188,3 @@ } else {

onTransitionEnd(ref, duration, () => {
if (!isExpectedState(popper, 'hidden') || !appendTo.contains(popper)) return
if (isVisible(popper) || !appendTo.contains(popper)) return

@@ -1159,3 +1208,3 @@ ref.popperInstance.disableEventListeners()

// Ensure the popper is hidden
if (!isExpectedState(popper, 'hidden')) {
if (isVisible(popper)) {
this.hide(popper, 0)

@@ -1167,2 +1216,6 @@ }

// Restore original title
el.setAttribute('title', el.getAttribute('data-original-title'))
el.removeAttribute('data-original-title')
el.removeAttribute('data-tooltipped')

@@ -1197,4 +1250,8 @@ el.removeAttribute('aria-describedby')

export default function factory(selector, settings) {
function tippy(selector, settings) {
return new Tippy(selector, settings)
}
tippy.defaultSettings = DEFAULT_SETTINGS
export default tippy

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc