Socket
Socket
Sign inDemoInstall

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 5.0.0-alpha.1 to 5.0.0-alpha.2

animations/shift-away.css

147

addons/cjs/tippy-addons.js
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -11,2 +11,3 @@ * MIT License

var __chunk_1 = require('../../cjs/tippy.chunk.js');
var __chunk_2 = require('../../cjs/tippy.chunk2.js');
require('popper.js');

@@ -17,3 +18,2 @@

* for child elements (`target` CSS selector).
* Port of v4's `target` prop to a separate function.
*/

@@ -28,5 +28,9 @@ function delegate(targets, props) {

var target = props.target;
delete props.target;
var instanceOrInstances = __chunk_1.tippy(targets, props);
delete props.target; // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var tippyConstructor = delegate.tippy || __chunk_2.tippy;
var returnValue = tippyConstructor(targets, props);
function onTrigger(event) {

@@ -37,4 +41,4 @@ if (event.target) {

if (targetNode) {
var instance = __chunk_1.tippy(targetNode, __chunk_1._extends({}, props, {
showOnInit: true
var instance = tippyConstructor(targetNode, __chunk_1._extends({}, props, {
showOnCreate: true
}));

@@ -49,4 +53,7 @@

function on(element, eventType, listener) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
function on(element, eventType, listener, options) {
if (options === void 0) {
options = false;
}
element.addEventListener(eventType, listener, options);

@@ -99,4 +106,6 @@ listeners.push({

instance.destroy = function () {
var shouldDestroyChildInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
instance.destroy = function (shouldDestroyChildInstances) {
if (shouldDestroyChildInstances === void 0) {
shouldDestroyChildInstances = true;
}

@@ -120,13 +129,5 @@ if (shouldDestroyChildInstances) {

if (instanceOrInstances) {
if (Array.isArray(instanceOrInstances)) {
var instances = instanceOrInstances;
instances.forEach(applyMutations);
} else {
var instance = instanceOrInstances;
applyMutations(instance);
}
}
return instanceOrInstances;
var instances = [].concat(returnValue);
instances.forEach(applyMutations);
return returnValue;
}

@@ -138,6 +139,8 @@

*/
function createSingleton(tippyInstances) {
var optionalProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
delay: 0
};
function createSingleton(tippyInstances, optionalProps) {
if (optionalProps === void 0) {
optionalProps = {
delay: 0
};
}

@@ -156,15 +159,20 @@ if (process.env.NODE_ENV !== "production") {

tippyInstances.forEach(function (instance) {
instance.__singleton__ = true;
Object.defineProperty(instance, '__singleton__', {
value: true,
enumerable: false,
configurable: true
});
});
}
} // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var singletonInstance = __chunk_1.tippy(document.createElement('div'));
var delay = optionalProps.delay;
var tippyConstructor = createSingleton.tippy || __chunk_2.tippy;
var singletonInstance = tippyConstructor(document.createElement('div'));
var _optionalProps = optionalProps,
delay = _optionalProps.delay;
var showTimeout;
var hideTimeout;
var _onTrigger;
var _onUntrigger;
function clearTimeouts() {

@@ -176,13 +184,17 @@ clearTimeout(showTimeout);

tippyInstances.forEach(function (instance) {
// To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
instance.__originalProps__ = {
delay: instance.props.delay,
onTrigger: instance.props.onTrigger,
onUntrigger: instance.props.onUntrigger // To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
};
instance.popper.style.opacity = '0';
_onTrigger = instance.props.onTrigger;
_onUntrigger = instance.props.onUntrigger;
var originalClearDelayTimeouts = instance.clearDelayTimeouts;
instance.__originalClearDelayTimeouts__ = instance.clearDelayTimeouts;
instance.clearDelayTimeouts = function () {
originalClearDelayTimeouts();
instance.__originalClearDelayTimeouts__();
clearTimeouts();

@@ -193,4 +205,4 @@ };

delay: 0,
onTrigger: function onTrigger(instance, event) {
_onTrigger(instance, event);
onTrigger: function onTrigger(_, event) {
__chunk_1.preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);

@@ -217,23 +229,26 @@ var props = __chunk_1._extends({}, instance.props);

singletonInstance.show();
}, __chunk_1.getValue(delay, 0, __chunk_1.tippy.defaultProps.delay));
}, __chunk_1.getValue(delay, 0, __chunk_2.tippy.defaultProps.delay));
}
},
onUntrigger: function onUntrigger(instance, event) {
_onUntrigger(instance, event);
onUntrigger: function onUntrigger(_, event) {
__chunk_1.preserveInvocation(instance.__originalProps__.onUntrigger, instance.props.onUntrigger, [instance, event]);
clearTimeouts();
hideTimeout = setTimeout(function () {
singletonInstance.hide();
}, __chunk_1.getValue(delay, 1, __chunk_1.tippy.defaultProps.delay));
}, __chunk_1.getValue(delay, 1, __chunk_2.tippy.defaultProps.delay));
}
}); // Ensure the lifecycles functions are updateable
}); // Ensure the lifecycle functions can be updated
var originalSetProps = instance.setProps;
instance.__originalSetProps__ = instance.setProps;
instance.setProps = function (partialProps) {
// `delay` can't be updated
delete partialProps.delay;
originalSetProps(partialProps);
_onTrigger = partialProps.onTrigger || _onTrigger;
_onUntrigger = partialProps.onUntrigger || _onUntrigger;
if (partialProps.onTrigger) {
instance.__originalProps__.onTrigger = partialProps.onTrigger;
}
if (partialProps.onUntrigger) {
instance.__originalProps__.onUntrigger = partialProps.onUntrigger;
}
instance.__originalSetProps__(__chunk_1.removeProperties(partialProps, ['delay', 'onTrigger', 'onUntrigger']));
};

@@ -250,13 +265,15 @@ });

singletonInstance.destroy = function () {
var shouldDestroyPassedInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
singletonInstance.destroy = function (shouldDestroyPassedInstances) {
if (shouldDestroyPassedInstances === void 0) {
shouldDestroyPassedInstances = true;
}
tippyInstances.forEach(function (instance) {
// Reset the original lifecycle hooks to prevent stack overflow if
// calling again.
// Note: users must always destroy the singleton instance before calling
// `createSingleton()` again on the same instances.
instance.setProps({
onTrigger: _onTrigger,
onUntrigger: _onUntrigger
});
// Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;
instance.setProps = instance.__originalSetProps__;
instance.setProps(instance.__originalProps__);
delete instance.__originalClearDelayTimeouts__;
delete instance.__originalProps__;
delete instance.__originalSetProps__;

@@ -263,0 +280,0 @@ if (process.env.NODE_ENV !== "production") {

/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks
* MIT License
*/
import { c as throwErrorWhen, a as tippy, d as _extends, e as hasOwnProperty, f as getValue } from '../../esm/tippy.chunk.js';
import { J as throwErrorWhen, _ as _extends, q as hasOwnProperty, p as preserveInvocation, j as getValue, K as removeProperties } from '../../esm/tippy.chunk.js';
import { t as tippy } from '../../esm/tippy.chunk2.js';
import 'popper.js';

@@ -12,3 +13,2 @@

* for child elements (`target` CSS selector).
* Port of v4's `target` prop to a separate function.
*/

@@ -23,5 +23,9 @@ function delegate(targets, props) {

var target = props.target;
delete props.target;
var instanceOrInstances = tippy(targets, props);
delete props.target; // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var tippyConstructor = delegate.tippy || tippy;
var returnValue = tippyConstructor(targets, props);
function onTrigger(event) {

@@ -32,4 +36,4 @@ if (event.target) {

if (targetNode) {
var instance = tippy(targetNode, _extends({}, props, {
showOnInit: true
var instance = tippyConstructor(targetNode, _extends({}, props, {
showOnCreate: true
}));

@@ -44,4 +48,7 @@

function on(element, eventType, listener) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
function on(element, eventType, listener, options) {
if (options === void 0) {
options = false;
}
element.addEventListener(eventType, listener, options);

@@ -94,4 +101,6 @@ listeners.push({

instance.destroy = function () {
var shouldDestroyChildInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
instance.destroy = function (shouldDestroyChildInstances) {
if (shouldDestroyChildInstances === void 0) {
shouldDestroyChildInstances = true;
}

@@ -115,13 +124,5 @@ if (shouldDestroyChildInstances) {

if (instanceOrInstances) {
if (Array.isArray(instanceOrInstances)) {
var instances = instanceOrInstances;
instances.forEach(applyMutations);
} else {
var instance = instanceOrInstances;
applyMutations(instance);
}
}
return instanceOrInstances;
var instances = [].concat(returnValue);
instances.forEach(applyMutations);
return returnValue;
}

@@ -133,6 +134,8 @@

*/
function createSingleton(tippyInstances) {
var optionalProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
delay: 0
};
function createSingleton(tippyInstances, optionalProps) {
if (optionalProps === void 0) {
optionalProps = {
delay: 0
};
}

@@ -151,15 +154,20 @@ if (process.env.NODE_ENV !== "production") {

tippyInstances.forEach(function (instance) {
instance.__singleton__ = true;
Object.defineProperty(instance, '__singleton__', {
value: true,
enumerable: false,
configurable: true
});
});
}
} // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var singletonInstance = tippy(document.createElement('div'));
var delay = optionalProps.delay;
var tippyConstructor = createSingleton.tippy || tippy;
var singletonInstance = tippyConstructor(document.createElement('div'));
var _optionalProps = optionalProps,
delay = _optionalProps.delay;
var showTimeout;
var hideTimeout;
var _onTrigger;
var _onUntrigger;
function clearTimeouts() {

@@ -171,13 +179,17 @@ clearTimeout(showTimeout);

tippyInstances.forEach(function (instance) {
// To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
instance.__originalProps__ = {
delay: instance.props.delay,
onTrigger: instance.props.onTrigger,
onUntrigger: instance.props.onUntrigger // To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
};
instance.popper.style.opacity = '0';
_onTrigger = instance.props.onTrigger;
_onUntrigger = instance.props.onUntrigger;
var originalClearDelayTimeouts = instance.clearDelayTimeouts;
instance.__originalClearDelayTimeouts__ = instance.clearDelayTimeouts;
instance.clearDelayTimeouts = function () {
originalClearDelayTimeouts();
instance.__originalClearDelayTimeouts__();
clearTimeouts();

@@ -188,4 +200,4 @@ };

delay: 0,
onTrigger: function onTrigger(instance, event) {
_onTrigger(instance, event);
onTrigger: function onTrigger(_, event) {
preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);

@@ -215,5 +227,4 @@ var props = _extends({}, instance.props);

},
onUntrigger: function onUntrigger(instance, event) {
_onUntrigger(instance, event);
onUntrigger: function onUntrigger(_, event) {
preserveInvocation(instance.__originalProps__.onUntrigger, instance.props.onUntrigger, [instance, event]);
clearTimeouts();

@@ -224,12 +235,16 @@ hideTimeout = setTimeout(function () {

}
}); // Ensure the lifecycles functions are updateable
}); // Ensure the lifecycle functions can be updated
var originalSetProps = instance.setProps;
instance.__originalSetProps__ = instance.setProps;
instance.setProps = function (partialProps) {
// `delay` can't be updated
delete partialProps.delay;
originalSetProps(partialProps);
_onTrigger = partialProps.onTrigger || _onTrigger;
_onUntrigger = partialProps.onUntrigger || _onUntrigger;
if (partialProps.onTrigger) {
instance.__originalProps__.onTrigger = partialProps.onTrigger;
}
if (partialProps.onUntrigger) {
instance.__originalProps__.onUntrigger = partialProps.onUntrigger;
}
instance.__originalSetProps__(removeProperties(partialProps, ['delay', 'onTrigger', 'onUntrigger']));
};

@@ -246,13 +261,15 @@ });

singletonInstance.destroy = function () {
var shouldDestroyPassedInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
singletonInstance.destroy = function (shouldDestroyPassedInstances) {
if (shouldDestroyPassedInstances === void 0) {
shouldDestroyPassedInstances = true;
}
tippyInstances.forEach(function (instance) {
// Reset the original lifecycle hooks to prevent stack overflow if
// calling again.
// Note: users must always destroy the singleton instance before calling
// `createSingleton()` again on the same instances.
instance.setProps({
onTrigger: _onTrigger,
onUntrigger: _onUntrigger
});
// Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;
instance.setProps = instance.__originalSetProps__;
instance.setProps(instance.__originalProps__);
delete instance.__originalClearDelayTimeouts__;
delete instance.__originalProps__;
delete instance.__originalSetProps__;

@@ -259,0 +276,0 @@ if (process.env.NODE_ENV !== "production") {

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

var __tippyAddons__ = (function (exports, tippy$1) {
(function (tippy$1) {
'use strict';

@@ -24,6 +24,2 @@

/**
* Ponyfill for Array.from - converts iterable values to an array
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

@@ -35,4 +31,2 @@ var ua = isBrowser ? navigator.userAgent : '';

// Passive event listener config
/**

@@ -57,4 +51,25 @@ * Safe .hasOwnProperty check, for prototype-less objects

}
/**
* Preserves the original function invocation when another function replaces it
*/
function preserveInvocation(originalFn, currentFn, args) {
if (originalFn && originalFn !== currentFn) {
originalFn.apply(null, args);
}
}
/**
* Deletes properties from an object (pure)
*/
function removeProperties(partialProps, keys) {
var clone = _extends({}, partialProps);
keys.forEach(function (key) {
delete clone[key];
});
return clone;
}
/**
* Helpful wrapper around thrown errors

@@ -65,3 +80,3 @@ */

if (condition) {
throw new Error("[tippy.js ERROR] ".concat(message));
throw new Error("[tippy.js ERROR] " + message);
}

@@ -73,3 +88,2 @@ }

* for child elements (`target` CSS selector).
* Port of v4's `target` prop to a separate function.
*/

@@ -84,5 +98,9 @@ function delegate(targets, props) {

var target = props.target;
delete props.target;
var instanceOrInstances = tippy$1(targets, props);
delete props.target; // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var tippyConstructor = delegate.tippy || tippy$1;
var returnValue = tippyConstructor(targets, props);
function onTrigger(event) {

@@ -93,4 +111,4 @@ if (event.target) {

if (targetNode) {
var instance = tippy$1(targetNode, _extends({}, props, {
showOnInit: true
var instance = tippyConstructor(targetNode, _extends({}, props, {
showOnCreate: true
}));

@@ -105,4 +123,7 @@

function on(element, eventType, listener) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
function on(element, eventType, listener, options) {
if (options === void 0) {
options = false;
}
element.addEventListener(eventType, listener, options);

@@ -155,4 +176,6 @@ listeners.push({

instance.destroy = function () {
var shouldDestroyChildInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
instance.destroy = function (shouldDestroyChildInstances) {
if (shouldDestroyChildInstances === void 0) {
shouldDestroyChildInstances = true;
}

@@ -176,13 +199,5 @@ if (shouldDestroyChildInstances) {

if (instanceOrInstances) {
if (Array.isArray(instanceOrInstances)) {
var instances = instanceOrInstances;
instances.forEach(applyMutations);
} else {
var instance = instanceOrInstances;
applyMutations(instance);
}
}
return instanceOrInstances;
var instances = [].concat(returnValue);
instances.forEach(applyMutations);
return returnValue;
}

@@ -194,6 +209,8 @@

*/
function createSingleton(tippyInstances) {
var optionalProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
delay: 0
};
function createSingleton(tippyInstances, optionalProps) {
if (optionalProps === void 0) {
optionalProps = {
delay: 0
};
}

@@ -212,15 +229,20 @@ {

tippyInstances.forEach(function (instance) {
instance.__singleton__ = true;
Object.defineProperty(instance, '__singleton__', {
value: true,
enumerable: false,
configurable: true
});
});
}
} // The user needs to specify their own enhanced tippy function to use extra
// props
// @ts-ignore
var singletonInstance = tippy$1(document.createElement('div'));
var delay = optionalProps.delay;
var tippyConstructor = createSingleton.tippy || tippy$1;
var singletonInstance = tippyConstructor(document.createElement('div'));
var _optionalProps = optionalProps,
delay = _optionalProps.delay;
var showTimeout;
var hideTimeout;
var _onTrigger;
var _onUntrigger;
function clearTimeouts() {

@@ -232,13 +254,17 @@ clearTimeout(showTimeout);

tippyInstances.forEach(function (instance) {
// To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
instance.__originalProps__ = {
delay: instance.props.delay,
onTrigger: instance.props.onTrigger,
onUntrigger: instance.props.onUntrigger // To prevent bugs with `hideOnClick`, we need to let the original tippy
// instance also go through its lifecycle (i.e. be mounted to the DOM as
// well). To prevent it from being seen/overlayed over the singleton
// tippy, we can set its opacity to 0
};
instance.popper.style.opacity = '0';
_onTrigger = instance.props.onTrigger;
_onUntrigger = instance.props.onUntrigger;
var originalClearDelayTimeouts = instance.clearDelayTimeouts;
instance.__originalClearDelayTimeouts__ = instance.clearDelayTimeouts;
instance.clearDelayTimeouts = function () {
originalClearDelayTimeouts();
instance.__originalClearDelayTimeouts__();
clearTimeouts();

@@ -249,4 +275,4 @@ };

delay: 0,
onTrigger: function onTrigger(instance, event) {
_onTrigger(instance, event);
onTrigger: function onTrigger(_, event) {
preserveInvocation(instance.__originalProps__.onTrigger, instance.props.onTrigger, [instance, event]);

@@ -276,5 +302,4 @@ var props = _extends({}, instance.props);

},
onUntrigger: function onUntrigger(instance, event) {
_onUntrigger(instance, event);
onUntrigger: function onUntrigger(_, event) {
preserveInvocation(instance.__originalProps__.onUntrigger, instance.props.onUntrigger, [instance, event]);
clearTimeouts();

@@ -285,12 +310,16 @@ hideTimeout = setTimeout(function () {

}
}); // Ensure the lifecycles functions are updateable
}); // Ensure the lifecycle functions can be updated
var originalSetProps = instance.setProps;
instance.__originalSetProps__ = instance.setProps;
instance.setProps = function (partialProps) {
// `delay` can't be updated
delete partialProps.delay;
originalSetProps(partialProps);
_onTrigger = partialProps.onTrigger || _onTrigger;
_onUntrigger = partialProps.onUntrigger || _onUntrigger;
if (partialProps.onTrigger) {
instance.__originalProps__.onTrigger = partialProps.onTrigger;
}
if (partialProps.onUntrigger) {
instance.__originalProps__.onUntrigger = partialProps.onUntrigger;
}
instance.__originalSetProps__(removeProperties(partialProps, ['delay', 'onTrigger', 'onUntrigger']));
};

@@ -307,13 +336,15 @@ });

singletonInstance.destroy = function () {
var shouldDestroyPassedInstances = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
singletonInstance.destroy = function (shouldDestroyPassedInstances) {
if (shouldDestroyPassedInstances === void 0) {
shouldDestroyPassedInstances = true;
}
tippyInstances.forEach(function (instance) {
// Reset the original lifecycle hooks to prevent stack overflow if
// calling again.
// Note: users must always destroy the singleton instance before calling
// `createSingleton()` again on the same instances.
instance.setProps({
onTrigger: _onTrigger,
onUntrigger: _onUntrigger
});
// Restore the instances to their original state
instance.clearDelayTimeouts = instance.__originalClearDelayTimeouts__;
instance.setProps = instance.__originalSetProps__;
instance.setProps(instance.__originalProps__);
delete instance.__originalClearDelayTimeouts__;
delete instance.__originalProps__;
delete instance.__originalSetProps__;

@@ -343,8 +374,3 @@ {

exports.createSingleton = createSingleton;
exports.delegate = delegate;
return exports;
}({}, tippy));
}(tippy));
//# sourceMappingURL=tippy-addons.js.map

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

var __tippyAddons__=function(e,t){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window&&"undefined"!=typeof document,o=n?navigator.userAgent:"";/MSIE |Trident\//.test(o),/UCBrowser\//.test(o),n&&/iPhone|iPad|iPod/.test(navigator.platform);function i(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?r:n}return e}function a(e,n){var o=[],i=[],a=n.target;delete n.target;var s=t(e,n);function c(e){if(e.target){var o=e.target.closest(a);if(o){var s=t(o,r({},n,{showOnInit:!0}));s&&(i=i.concat(s))}}}function u(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.addEventListener(t,r,n),o.push({element:e,eventType:t,listener:r,options:n})}function f(e){var t=e.destroy;e.destroy=function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&i.forEach(function(e){e.destroy()}),i=[],function(e){e.forEach(function(e){var t=e.element,r=e.eventType,n=e.listener,o=e.options;t.removeEventListener(r,n,o)}),e=[]}(o),t()},function(e){var t=e.reference;e.props.trigger.trim().split(" ").forEach(function(e){switch(e){case"mouseenter":u(t,"mouseover",c);break;case"focus":u(t,"focusin",c);break;case"click":u(t,"click",c)}})}(e),e.setProps({trigger:"manual"})}s&&(Array.isArray(s)?s.forEach(f):f(s));return s}function s(e){var n,o,a,s,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{delay:0},u=t(document.createElement("div")),f=c.delay;function p(){clearTimeout(n),clearTimeout(o)}e.forEach(function(e){e.popper.style.opacity="0",a=e.props.onTrigger,s=e.props.onUntrigger;var c=e.clearDelayTimeouts;e.clearDelayTimeouts=function(){c(),p()},e.setProps({delay:0,onTrigger:function(e,o){a(e,o);var s=r({},e.props);delete s.delay,u.setProps(s),u.reference.getBoundingClientRect=function(){return e.reference.getBoundingClientRect()},p(),!u.state.isVisible&&u.state.isMounted?u.show(void 0,!1):n=setTimeout(function(){u.show()},i(f,0,t.defaultProps.delay))},onUntrigger:function(e,r){s(e,r),p(),o=setTimeout(function(){u.hide()},i(f,1,t.defaultProps.delay))}});var l=e.setProps;e.setProps=function(e){delete e.delay,l(e),a=e.onTrigger||a,s=e.onUntrigger||s}});var l=u.setProps;u.setProps=function(e){f=void 0!==e.delay?e.delay:f,l(e)};var d=u.destroy;return u.destroy=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.forEach(function(e){e.setProps({onTrigger:a,onUntrigger:s}),t&&e.destroy()}),d()},u}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-addons.");return tippy.delegate=a,tippy.createSingleton=s,e.createSingleton=s,e.delegate=a,e}({},tippy);
!function(e){"use strict";function r(){return(r=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof window&&"undefined"!=typeof document,o=t?navigator.userAgent:"";/MSIE |Trident\//.test(o),/UCBrowser\//.test(o),t&&/iPhone|iPad|iPod/.test(navigator.platform);function n(e,r,t){if(Array.isArray(e)){var o=e[r];return null==o?t:o}return e}function i(e,r,t){e&&e!==r&&e.apply(null,t)}if("function"!=typeof tippy)throw new Error("[tippy.js ERROR] `tippy` is not a global function. Make sure you have included the tippy script before tippy-addons.");tippy.delegate=function t(o,n){var i=[],a=[],s=n.target;delete n.target;var l=t.tippy||e,p=l(o,n);function c(e){if(e.target){var t=e.target.closest(s);if(t){var o=l(t,r({},n,{showOnCreate:!0}));o&&(a=a.concat(o))}}}function u(e,r,t,o){void 0===o&&(o=!1),e.addEventListener(r,t,o),i.push({element:e,eventType:r,listener:t,options:o})}return[].concat(p).forEach(function(e){var r=e.destroy;e.destroy=function(e){void 0===e&&(e=!0),e&&a.forEach(function(e){e.destroy()}),a=[],function(e){e.forEach(function(e){var r=e.element,t=e.eventType,o=e.listener,n=e.options;r.removeEventListener(t,o,n)}),e=[]}(i),r()},function(e){var r=e.reference;e.props.trigger.trim().split(" ").forEach(function(e){switch(e){case"mouseenter":u(r,"mouseover",c);break;case"focus":u(r,"focusin",c);break;case"click":u(r,"click",c)}})}(e),e.setProps({trigger:"manual"})}),p},tippy.createSingleton=function t(o,a){void 0===a&&(a={delay:0});var s,l,p=(t.tippy||e)(document.createElement("div")),c=a.delay;function u(){clearTimeout(s),clearTimeout(l)}o.forEach(function(t){t.__originalProps__={delay:t.props.delay,onTrigger:t.props.onTrigger,onUntrigger:t.props.onUntrigger},t.popper.style.opacity="0",t.__originalClearDelayTimeouts__=t.clearDelayTimeouts,t.clearDelayTimeouts=function(){t.__originalClearDelayTimeouts__(),u()},t.setProps({delay:0,onTrigger:function(o,a){i(t.__originalProps__.onTrigger,t.props.onTrigger,[t,a]);var l=r({},t.props);delete l.delay,p.setProps(l),p.reference.getBoundingClientRect=function(){return t.reference.getBoundingClientRect()},u(),!p.state.isVisible&&p.state.isMounted?p.show(void 0,!1):s=setTimeout(function(){p.show()},n(c,0,e.defaultProps.delay))},onUntrigger:function(r,o){i(t.__originalProps__.onUntrigger,t.props.onUntrigger,[t,o]),u(),l=setTimeout(function(){p.hide()},n(c,1,e.defaultProps.delay))}}),t.__originalSetProps__=t.setProps,t.setProps=function(e){e.onTrigger&&(t.__originalProps__.onTrigger=e.onTrigger),e.onUntrigger&&(t.__originalProps__.onUntrigger=e.onUntrigger),t.__originalSetProps__(function(e,t){var o=r({},e);return t.forEach(function(e){delete o[e]}),o}(e,["delay","onTrigger","onUntrigger"]))}});var g=p.setProps;p.setProps=function(e){c=void 0!==e.delay?e.delay:c,g(e)};var f=p.destroy;return p.destroy=function(e){void 0===e&&(e=!0),o.forEach(function(r){r.clearDelayTimeouts=r.__originalClearDelayTimeouts__,r.setProps=r.__originalSetProps__,r.setProps(r.__originalProps__),delete r.__originalClearDelayTimeouts__,delete r.__originalProps__,delete r.__originalSetProps__,e&&r.destroy()}),f()},p}}(tippy);
//# sourceMappingURL=tippy-addons.min.js.map
{
"name": "tippy-addons",
"private": true,
"main": "./cjs/tippy-addons.js",
"module": "./esm/tippy-addons.js",
"unpkg": "./iife/tippy-addons.min.js",
"main": "cjs/tippy-addons.js",
"module": "esm/tippy-addons.js",
"unpkg": "iife/tippy-addons.min.js",
"types": "index.d.ts",
"sideEffects": false
}
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -8,6 +8,9 @@ * MIT License

Object.defineProperty(exports, '__esModule', { value: true });
var __chunk_1 = require('./tippy.chunk.js');
var __chunk_2 = require('./tippy.chunk2.js');
require('popper.js');
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-tooltip[data-animation=shift-away][data-placement^=top][data-state=hidden]{transform:translateY(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=bottom][data-state=hidden]{transform:translateY(-10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=left][data-state=hidden]{transform:translateX(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=right][data-state=hidden]{transform:translateX(-10px)}.tippy-tooltip[data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;text-align:center;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-backdrop{transform-origin:0 25%;border-radius:40% 40% 0 0}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-55%)}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%,-45%)}.tippy-tooltip[data-placement^=top] .tippy-svgArrow{transform-origin:50% 0;margin:0 3px;bottom:-7px;bottom:-6.5px}.tippy-tooltip[data-placement^=top] .tippy-svgArrow svg{transform:rotate(180deg)}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop{transform-origin:0 -50%;border-radius:0 0 30% 30%}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-45%)}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%)}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow{transform-origin:50% 7px;margin:0 3px;top:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow svg{transform:rotate(0)}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-backdrop{transform-origin:50% 0;border-radius:50% 0 0 50%}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-75%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-svgArrow{transform-origin:33.33333333% 50%;margin:3px 0;right:-12px}.tippy-tooltip[data-placement^=left] .tippy-svgArrow svg{transform:rotate(90deg)}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-backdrop{transform-origin:-50% 0;border-radius:0 50% 50% 0}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-25%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-svgArrow{transform-origin:66.66666666% 50%;margin:3px 0;left:-12px}.tippy-tooltip[data-placement^=right] .tippy-svgArrow svg{transform:rotate(-90deg)}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-svgArrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid}.tippy-arrow,.tippy-svgArrow{position:absolute}.tippy-arrow[data-state=hidden],.tippy-svgArrow[data-state=hidden]{opacity:0}.tippy-svgArrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-svgArrow svg{position:absolute;left:0}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop[data-state=hidden]{opacity:0}.tippy-backdrop:after{content:\"\";float:left;padding-top:100%}.tippy-content{padding:.3125rem .5625rem}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -24,6 +27,6 @@ /**

var head = document.head;
var firstChild = head.firstChild;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstChild) {
head.insertBefore(style, firstChild);
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {

@@ -37,3 +40,3 @@ head.appendChild(style);

module.exports = __chunk_1.tippy;
exports.default = __chunk_2.tippy;
//# sourceMappingURL=tippy.bundle.js.map
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -8,6 +8,2 @@ * MIT License

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var Popper = _interopDefault(require('popper.js'));
function _extends() {

@@ -31,4 +27,2 @@ _extends = Object.assign || function (target) {

var version = "5.0.0-alpha.1";
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

@@ -42,4 +36,4 @@ var ua = isBrowser ? navigator.userAgent : '';

allowHTML: true,
animateFill: true,
animation: 'shift-away',
animateFill: false,
animation: 'fade',
appendTo: function appendTo() {

@@ -49,4 +43,3 @@ return document.body;

aria: 'describedby',
arrow: false,
arrowType: 'sharp',
arrow: true,
boundary: 'scrollParent',

@@ -60,3 +53,2 @@ content: '',

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -83,8 +75,6 @@ ignoreAttributes: false,

role: 'tooltip',
showOnInit: false,
size: 'regular',
showOnCreate: false,
sticky: false,
theme: 'tippy-dark',
theme: '',
touch: true,
touchHold: false,
trigger: 'mouseenter focus',

@@ -95,4 +85,8 @@ triggerTarget: null,

zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**
* If the set() method encounters one of these, the popperInstance must be
* If the setProps() method encounters one of these, the popperInstance must be
* recreated

@@ -102,33 +96,9 @@ */

};
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
// Passive event listener config
var PASSIVE = {
passive: true // Popper `preventOverflow` padding
passive: true
};
var PADDING = 4; // Classes
var PREVENT_OVERFLOW_PADDING = 5;
var ROUND_ARROW_INNER_HTML = '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>';
var IOS_CLASS = "tippy-iOS";

@@ -140,11 +110,10 @@ var POPPER_CLASS = "tippy-popper";

var ARROW_CLASS = "tippy-arrow";
var SVG_ARROW_CLASS = "tippy-svgArrow"; // Selectors
var SVG_ARROW_CLASS = "tippy-svg-arrow";
var POPPER_SELECTOR = "." + POPPER_CLASS;
var TOOLTIP_SELECTOR = "." + TOOLTIP_CLASS;
var CONTENT_SELECTOR = "." + CONTENT_CLASS;
var BACKDROP_SELECTOR = "." + BACKDROP_CLASS;
var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var POPPER_SELECTOR = ".".concat(POPPER_CLASS);
var TOOLTIP_SELECTOR = ".".concat(TOOLTIP_CLASS);
var CONTENT_SELECTOR = ".".concat(CONTENT_CLASS);
var BACKDROP_SELECTOR = ".".concat(BACKDROP_CLASS);
var ARROW_SELECTOR = ".".concat(ARROW_CLASS);
var SVG_ARROW_SELECTOR = ".".concat(SVG_ARROW_CLASS);
var currentInput = {

@@ -217,3 +186,5 @@ isTouch: false

function bindGlobalEventListeners() {
document.addEventListener('touchstart', onDocumentTouchStart, PASSIVE);
document.addEventListener('touchstart', onDocumentTouchStart, _extends({}, PASSIVE, {
capture: true
}));
window.addEventListener('blur', onWindowBlur);

@@ -228,4 +199,4 @@ }

function getDataAttributeProps(reference) {
return keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-".concat(key)) || '').trim();
var props = keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();

@@ -248,2 +219,3 @@ if (!valueAsString) {

}, {});
return props;
}

@@ -309,9 +281,2 @@

/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Determines if the value is a real element

@@ -361,3 +326,3 @@ */

if (el) {
el.style.transitionDuration = "".concat(value, "ms");
el.style.transitionDuration = value + "ms";
}

@@ -387,2 +352,6 @@ });

if (out.animateFill) {
out.arrow = false;
}
if (out.arrow || isUCBrowser) {

@@ -414,4 +383,70 @@ out.animateFill = false;

}
/**
* Returns offsets for virtual reference when using a cursor point
*/
function getVirtualOffsets(_ref, isVerticalPlacement) {
var popper = _ref.popper,
currentPlacement = _ref.state.currentPlacement;
var isShift = !!currentPlacement.split('-')[1];
var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
var halfSize = size / 2;
return {
size: size,
x: isVerticalPlacement ? isShift ? size : halfSize : 0,
y: isVerticalPlacement ? 0 : isShift ? size : halfSize
};
}
/**
* Preserves the original function invocation when another function replaces it
*/
function preserveInvocation(originalFn, currentFn, args) {
if (originalFn && originalFn !== currentFn) {
originalFn.apply(null, args);
}
}
/**
* Deletes properties from an object (pure)
*/
function removeProperties(partialProps, keys) {
var clone = _extends({}, partialProps);
keys.forEach(function (key) {
delete clone[key];
});
return clone;
}
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Sets the innerHTML of an element

@@ -466,19 +501,18 @@ */

function createArrowElement(arrowType) {
var arrow = div();
function createArrowElement(arrow) {
var arrowElement = div();
if (arrowType !== 'sharp') {
arrow.className = SVG_ARROW_CLASS; // Use the built-in round SVG shape
if (arrow === true) {
arrowElement.className = ARROW_CLASS;
} else {
arrowElement.className = SVG_ARROW_CLASS;
if (arrowType === 'round') {
setInnerHTML(arrow, '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>');
if (isRealElement(arrow)) {
arrowElement.appendChild(arrow);
} else {
// Assume they're specifying their own SVG shape
setInnerHTML(arrow, arrowType);
setInnerHTML(arrowElement, arrow === 'round' ? ROUND_ARROW_INNER_HTML : arrow);
}
} else {
arrow.className = ARROW_CLASS;
}
return arrow;
return arrowElement;
}

@@ -537,3 +571,5 @@ /**

theme.split(' ').forEach(function (name) {
tooltip.classList[action](name + '-theme');
if (name) {
tooltip.classList[action](name + "-theme");
}
});

@@ -548,5 +584,8 @@ }

popper.className = POPPER_CLASS;
popper.style.position = 'absolute';
popper.style.top = '0';
popper.style.left = '0';
var tooltip = div();
tooltip.className = TOOLTIP_CLASS;
tooltip.id = "tippy-".concat(id);
tooltip.id = "tippy-" + id;
tooltip.setAttribute('data-state', 'hidden');

@@ -565,3 +604,3 @@ tooltip.setAttribute('tabindex', '-1');

tooltip.setAttribute('data-arrow', '');
tooltip.appendChild(createArrowElement(props.arrowType));
tooltip.appendChild(createArrowElement(props.arrow));
}

@@ -596,3 +635,2 @@

popper.style.zIndex = '' + nextProps.zIndex;
tooltip.setAttribute('data-size', nextProps.size);
tooltip.setAttribute('data-animation', nextProps.animation);

@@ -622,12 +660,13 @@ tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');

if (!prevProps.arrow && nextProps.arrow) {
tooltip.appendChild(createArrowElement(nextProps.arrowType));
// false to true
tooltip.appendChild(createArrowElement(nextProps.arrow));
tooltip.setAttribute('data-arrow', '');
} else if (prevProps.arrow && !nextProps.arrow) {
// true to false
tooltip.removeChild(arrow);
tooltip.removeAttribute('data-arrow');
} // arrowType
if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {
tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);
} else if (prevProps.arrow !== nextProps.arrow) {
// true to 'round' or vice-versa
tooltip.removeChild(arrow);
tooltip.appendChild(createArrowElement(nextProps.arrow));
} // interactive

@@ -686,3 +725,3 @@

/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] ".concat(message));
console.warn("[tippy.js WARNING] " + message);
}

@@ -696,3 +735,3 @@ }

if (condition) {
throw new Error("[tippy.js ERROR] ".concat(message));
throw new Error("[tippy.js ERROR] " + message);
}

@@ -704,17 +743,26 @@ }

function validateProps() {
var partialProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetprop = prop === 'target';
var didPassA11yprop = prop === 'a11y';
var didPassOtherUnknownprop = !hasOwnProperty(defaultProps, prop) && prop !== 'target' && prop !== 'a11y';
var didPassOldThemeName = prop === 'theme' && includes(['dark', 'light', 'light-border', 'translucent'], value);
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
warnWhen(didPassTargetprop, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yprop, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassOtherUnknownprop, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassOldThemeName, 'The default theme `' + value + '` in v5 must include the prefix `tippy`, i.e. ' + '"tippy-' + value + '" instead of "' + value + '".');
warnWhen(didPassGoogleTheme, 'The default theme `google` was renamed to ' + '`tippy-material` in v5.');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');

@@ -733,968 +781,63 @@ });

}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor
var mouseMoveListeners = [];
/**
* Creates and returns a Tippy object. We're using a closure pattern instead of
* a class so that the exposed object API is clean without private members
* prefixed with `_`.
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function createTippy(reference, collectionProps) {
var props = evaluateProps(reference, collectionProps); // If the reference shouldn't have multiple tippys, return null early
if (!props.multiple && reference._tippy) {
return null;
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
/* ======================= 🔒 Private members 🔒 ======================= */
var lastTriggerEventType;
var lastMouseMoveEvent;
var showTimeout;
var hideTimeout;
var animationFrame;
var isScheduledToShow = false;
var currentPlacement = props.placement;
var hasMountCallbackRun = false;
var didHideDueToDocumentMouseDown = false;
var currentMountCallback;
var currentTransitionEndListener;
var listeners = [];
var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
var currentComputedPadding;
/* ======================= 🔑 Public members 🔑 ======================= */
var id = idCounter++;
var popper = createPopperElement(id, props);
var popperChildren = getChildren(popper);
var popperInstance = null; // These two elements are static
var tooltip = popperChildren.tooltip,
content = popperChildren.content;
var state = {
// Is the instance currently enabled?
isEnabled: true,
// Is the tippy currently showing and not transitioning out?
isVisible: false,
// Has the instance been destroyed?
isDestroyed: false,
// Is the tippy currently mounted to the DOM?
isMounted: false,
// Has the tippy finished transitioning in?
isShown: false
};
var instance = {
// properties
id: id,
reference: reference,
popper: popper,
popperChildren: popperChildren,
popperInstance: popperInstance,
props: props,
state: state,
// methods
clearDelayTimeouts: clearDelayTimeouts,
setProps: setProps,
setContent: setContent,
show: show,
hide: hide,
enable: enable,
disable: disable,
destroy: destroy
};
if (process.env.NODE_ENV !== "production") {
Object.defineProperty(instance, 'set', {
value: function value() {
warnWhen(true, '`set()` was renamed to `setProps()` in v5.');
},
enumerable: false
});
}
/* ==================== Initial instance mutations =================== */
reference._tippy = instance;
popper._tippy = instance;
addTriggersToEventListenersTarget();
if (!props.lazy) {
createPopperInstance();
}
if (props.showOnInit) {
scheduleShow();
} // Prevent a tippy with a delay from hiding if the cursor left then returned
// before it started hiding
popper.addEventListener('mouseenter', function () {
if (instance.props.interactive && instance.state.isVisible && lastTriggerEventType === 'mouseenter') {
instance.clearDelayTimeouts();
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
popper.addEventListener('mouseleave', function () {
if (instance.props.interactive && lastTriggerEventType === 'mouseenter') {
document.addEventListener('mousemove', debouncedOnMouseMove);
}
});
props.onCreate(instance);
return instance;
/* ======================= 🔒 Private methods 🔒 ======================= */
function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(currentPlacement));
}
function getIsInFollowCursorMode() {
return instance.props.followCursor && lastTriggerEventType !== 'focus';
}
function getTransitionableElements() {
return [tooltip, content, instance.popperChildren.backdrop];
}
function removeFollowCursorListener() {
document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);
}
function cleanupInteractiveMouseListeners() {
document.body.removeEventListener('mouseleave', scheduleHide);
document.removeEventListener('mousemove', debouncedOnMouseMove);
mouseMoveListeners = mouseMoveListeners.filter(function (listener) {
return listener !== debouncedOnMouseMove;
});
}
function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}
function onDocumentMouseDown(event) {
// Clicked on interactive popper
if (instance.props.interactive && popper.contains(event.target)) {
return;
} // Clicked on the event listeners target
if (getEventListenersTarget().contains(event.target)) {
if (currentInput.isTouch) {
return;
}
if (instance.state.isVisible && includes(instance.props.trigger, 'click')) {
return;
}
}
if (instance.props.hideOnClick === true) {
instance.clearDelayTimeouts();
instance.hide(); // `mousedown` event is fired right before `focus`. This lets a tippy with
// `focus` trigger know that it should not show
didHideDueToDocumentMouseDown = true;
setTimeout(function () {
didHideDueToDocumentMouseDown = false;
}); // The listener gets added in `scheduleShow()`, but this may be hiding it
// before it shows, and hide()'s early bail-out behavior can prevent it
// from being cleaned up
if (!instance.state.isMounted) {
removeDocumentMouseDownListener();
}
}
}
function addDocumentMouseDownListener() {
document.addEventListener('mousedown', onDocumentMouseDown, true);
}
function removeDocumentMouseDownListener() {
document.removeEventListener('mousedown', onDocumentMouseDown, true);
}
function makeSticky() {
setTransitionDuration([popper], isIE ? 0 : instance.props.updateDuration);
function updatePosition() {
instance.popperInstance.scheduleUpdate();
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
setTransitionDuration([popper], 0);
}
}
updatePosition();
}
function onTransitionedOut(duration, callback) {
onTransitionEnd(duration, function () {
if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
callback();
}
});
}
function onTransitionedIn(duration, callback) {
onTransitionEnd(duration, callback);
}
function onTransitionEnd(duration, callback) {
/**
* Listener added as the `transitionend` handler
*/
function listener(event) {
if (event.target === tooltip) {
updateTransitionEndListener(tooltip, 'remove', listener);
callback();
}
} // Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if (duration === 0) {
return callback();
}
updateTransitionEndListener(tooltip, 'remove', currentTransitionEndListener);
updateTransitionEndListener(tooltip, 'add', listener);
currentTransitionEndListener = listener;
}
function on(eventType, handler) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
getEventListenersTarget().addEventListener(eventType, handler, options);
listeners.push({
eventType: eventType,
handler: handler,
options: options
});
}
function addTriggersToEventListenersTarget() {
if (instance.props.touchHold) {
on('touchstart', onTrigger, PASSIVE);
on('touchend', onMouseLeave, PASSIVE);
} // `click` for keyboard. Mouse uses `mousedown` (onDocumentMouseDown)
if (!includes(instance.props.trigger, 'click')) {
on('click', function () {
if (!currentInput.isTouch && instance.props.hideOnClick === true) {
instance.hide();
}
});
}
instance.props.trigger.trim().split(' ').forEach(function (eventType) {
if (eventType === 'manual') {
return;
}
on(eventType, onTrigger);
switch (eventType) {
case 'mouseenter':
on('mouseleave', onMouseLeave);
break;
case 'focus':
on(isIE ? 'focusout' : 'blur', onBlur);
break;
}
});
}
function removeTriggersFromEventListenersTarget() {
listeners.forEach(function (_ref) {
var eventType = _ref.eventType,
handler = _ref.handler,
options = _ref.options;
getEventListenersTarget().removeEventListener(eventType, handler, options);
});
listeners = [];
}
function positionVirtualReferenceNearCursor(event) {
var _lastMouseMoveEvent = lastMouseMoveEvent = event,
x = _lastMouseMoveEvent.clientX,
y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called
if (!currentComputedPadding) {
return;
} // If the instance is interactive, avoid updating the position unless it's
// over the reference element
var isCursorOverReference = closestCallback(event.target, function (el) {
return el === reference;
});
var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var isHorizontal = followCursor === 'horizontal';
var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing
var fakeSize = 100;
var halfFakeSize = fakeSize / 2;
var isVerticalPlacement = getIsVerticalPlacement();
var verticalIncrease = isVerticalPlacement ? 0 : halfFakeSize;
var horizontalIncrease = isVerticalPlacement ? halfFakeSize : 0;
if (isCursorOverReference || !instance.props.interactive) {
instance.popperInstance.reference = {
// These `clientWidth` values don't get used by Popper.js if they are 0
clientWidth: 0,
clientHeight: 0,
getBoundingClientRect: function getBoundingClientRect() {
return {
width: isVerticalPlacement ? fakeSize : 0,
height: isVerticalPlacement ? 0 : fakeSize,
top: (isHorizontal ? rect.top : y) - verticalIncrease,
bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
left: (isVertical ? rect.left : x) - horizontalIncrease,
right: (isVertical ? rect.right : x) + horizontalIncrease
};
}
};
instance.popperInstance.scheduleUpdate();
}
if (currentInput.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeFollowCursorListener();
}
}
function onTrigger(event) {
if (didHideDueToDocumentMouseDown || !instance.state.isEnabled || isEventListenerStopped(event)) {
return;
}
if (!instance.state.isVisible) {
lastTriggerEventType = event.type;
if (event instanceof MouseEvent) {
lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
mouseMoveListeners.forEach(function (listener) {
return listener(event);
});
}
} // Toggle show/hide when clicking click-triggered tooltips
if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {
scheduleHide(event);
} else {
scheduleShow(event);
}
}
function onMouseMove(event) {
var isCursorOverReferenceOrPopper = closestCallback(event.target, function (el) {
return el === reference || el === popper;
});
if (isCursorOverReferenceOrPopper) {
return;
}
if (isCursorOutsideInteractiveBorder(getBasePlacement(currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
cleanupInteractiveMouseListeners();
scheduleHide(event);
}
}
function onMouseLeave(event) {
if (isEventListenerStopped(event)) {
return;
}
if (instance.props.interactive) {
document.body.addEventListener('mouseleave', scheduleHide);
document.addEventListener('mousemove', debouncedOnMouseMove);
mouseMoveListeners.push(debouncedOnMouseMove);
return;
}
scheduleHide(event);
}
function onBlur(event) {
if (event.target !== getEventListenersTarget()) {
return;
} // If focus was moved to within the popper
if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
return;
}
scheduleHide(event);
}
function isEventListenerStopped(event) {
var supportsTouch = 'ontouchstart' in window;
var isTouchEvent = includes(event.type, 'touch');
var touchHold = instance.props.touchHold;
return supportsTouch && currentInput.isTouch && touchHold && !isTouchEvent || currentInput.isTouch && !touchHold && isTouchEvent;
}
function createPopperInstance() {
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
function applyMutations(data) {
var previousPlacement = currentPlacement;
currentPlacement = data.placement;
if (instance.props.flip && !instance.props.flipOnUpdate) {
if (data.flipped) {
instance.popperInstance.options.placement = data.placement;
}
setFlipModifierEnabled(instance.popperInstance.modifiers, false);
} // Apply Popper's `x-*` attributes to the tooltip with `data-*`
tooltip.setAttribute('data-placement', currentPlacement);
if (data.attributes['x-out-of-boundaries'] !== false) {
tooltip.setAttribute('data-out-of-boundaries', '');
} else {
tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
var BasePlacement = getBasePlacement(currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = "".concat((getIsOppositePlacement() ? 1 : -1) * instance.props.distance, "px");
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = _extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[BasePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[BasePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
currentComputedPadding = computedPadding; // The `distance` offset needs to be re-considered by Popper.js if the
// placement changed
if (currentPlacement !== previousPlacement) {
instance.popperInstance.update();
}
}
var config = _extends({
eventsEnabled: false,
placement: instance.props.placement
}, popperOptions, {
modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {
preventOverflow: _extends({
boundariesElement: instance.props.boundary,
padding: PADDING
}, preventOverflowModifier),
arrow: _extends({
element: arrow,
enabled: !!arrow
}, getModifier(popperOptions, 'arrow')),
flip: _extends({
enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + PADDING,
behavior: instance.props.flipBehavior
}, getModifier(popperOptions, 'flip')),
offset: _extends({
offset: instance.props.offset
}, getModifier(popperOptions, 'offset'))
}),
onCreate: function onCreate(data) {
applyMutations(data);
runMountCallback();
if (popperOptions && popperOptions.onCreate) {
popperOptions.onCreate(data);
}
},
onUpdate: function onUpdate(data) {
applyMutations(data);
runMountCallback();
if (popperOptions && popperOptions.onUpdate) {
popperOptions.onUpdate(data);
}
}
});
instance.popperInstance = new Popper(reference, popper, config);
}
function runMountCallback() {
if (!hasMountCallbackRun && currentMountCallback) {
hasMountCallbackRun = true;
reflow(popper);
currentMountCallback();
}
}
function mount() {
hasMountCallbackRun = false;
var isInFollowCursorMode = getIsInFollowCursorMode();
if (!instance.popperInstance) {
createPopperInstance();
if (!isInFollowCursorMode) {
instance.popperInstance.enableEventListeners();
}
} else {
if (!isInFollowCursorMode) {
instance.popperInstance.scheduleUpdate();
instance.popperInstance.enableEventListeners();
}
setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);
} // If the instance previously had followCursor behavior, it will be
// positioned incorrectly if triggered by `focus` afterwards.
// Update the reference back to the real DOM element
instance.popperInstance.reference = reference;
if (isInFollowCursorMode && lastMouseMoveEvent) {
// TODO: If the tippy also has `updateDuration`, it transitions from
// the initial placement to the cursor point
requestAnimationFrame(function () {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
});
}
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]);
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
instance.props.onMount(instance);
instance.state.isMounted = true;
}
}
function scheduleShow(event) {
instance.clearDelayTimeouts();
if (event) {
instance.props.onTrigger(instance, event);
}
if (instance.state.isVisible) {
return;
}
isScheduledToShow = true;
if (instance.props.wait) {
return instance.props.wait(instance, event);
} // If the tooltip has a delay, we need to be listening to the mousemove as
// soon as the trigger event is fired, so that it's in the correct position
// upon mount.
// Edge case: if the tooltip is still mounted, but then scheduleShow() is
// called, it causes a jump.
if (getIsInFollowCursorMode() && !instance.state.isMounted) {
if (!instance.popperInstance) {
createPopperInstance();
}
document.addEventListener('mousemove', positionVirtualReferenceNearCursor);
}
addDocumentMouseDownListener();
var delay = getValue(instance.props.delay, 0, defaultProps.delay);
if (delay) {
showTimeout = setTimeout(function () {
instance.show();
}, delay);
} else {
instance.show();
}
}
function scheduleHide(event) {
instance.clearDelayTimeouts();
instance.props.onUntrigger(instance, event);
if (!instance.state.isVisible) {
return removeFollowCursorListener();
}
isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);
if (delay) {
hideTimeout = setTimeout(function () {
if (instance.state.isVisible) {
instance.hide();
}
}, delay);
} else {
// Fixes a `transitionend` problem when it fires 1 frame too
// late sometimes, we don't want hide() to be called.
animationFrame = requestAnimationFrame(function () {
instance.hide();
});
}
}
/* ======================= 🔑 Public methods 🔑 ======================= */
function enable() {
instance.state.isEnabled = true;
}
function disable() {
instance.state.isEnabled = false;
}
function clearDelayTimeouts() {
clearTimeout(showTimeout);
clearTimeout(hideTimeout);
cancelAnimationFrame(animationFrame);
}
function setProps(partialProps) {
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}
if (instance.state.isDestroyed) {
return;
}
if (process.env.NODE_ENV !== "production") {
validateProps(partialProps);
}
removeTriggersFromEventListenersTarget();
var prevProps = instance.props;
var nextProps = evaluateProps(reference, _extends({}, instance.props, partialProps, {
ignoreAttributes: true
}));
nextProps.ignoreAttributes = hasOwnProperty(partialProps, 'ignoreAttributes') ? partialProps.ignoreAttributes || false : prevProps.ignoreAttributes;
instance.props = nextProps;
addTriggersToEventListenersTarget();
cleanupInteractiveMouseListeners();
debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
updatePopperElement(popper, prevProps, nextProps, instance.state.isVisible);
instance.popperChildren = getChildren(popper);
if (instance.popperInstance) {
if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {
return hasOwnProperty(partialProps, prop) && partialProps[prop] !== prevProps[prop];
})) {
instance.popperInstance.destroy();
createPopperInstance();
if (instance.state.isVisible) {
instance.popperInstance.enableEventListeners();
}
if (instance.props.followCursor && lastMouseMoveEvent) {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
}
} else {
instance.popperInstance.update();
}
}
}
function setContent(content) {
instance.setProps({
content: content
});
}
function show() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, defaultProps.duration[1]);
var shouldPreventPopperTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out
var isAlreadyVisible = instance.state.isVisible;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
return;
} // Standardize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.
// Using a wrapper element (i.e. <span>) is recommended.
if (getEventListenersTarget().hasAttribute('disabled')) {
return;
}
if (instance.props.onShow(instance) === false) {
return;
}
addDocumentMouseDownListener();
popper.style.visibility = 'visible';
instance.state.isVisible = true; // Prevent a transition of the popper from its previous position and of the
// elements at a different placement.
var transitionableElements = getTransitionableElements();
setTransitionDuration(shouldPreventPopperTransition ? transitionableElements.concat(popper) : transitionableElements, 0);
currentMountCallback = function currentMountCallback() {
if (!instance.state.isVisible) {
return;
} // Double update will apply correct mutations
if (!getIsInFollowCursorMode()) {
instance.popperInstance.update();
}
if (instance.popperChildren.backdrop) {
instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';
}
if (instance.props.sticky) {
makeSticky();
}
setTransitionDuration([popper], instance.props.updateDuration);
setTransitionDuration(transitionableElements, duration);
setVisibilityState(transitionableElements, 'visible');
onTransitionedIn(duration, function () {
if (instance.props.aria) {
getEventListenersTarget().setAttribute("aria-".concat(instance.props.aria), tooltip.id);
}
instance.props.onShown(instance);
instance.state.isShown = true;
});
};
mount();
}
function hide() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, defaultProps.duration[1]);
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`hide()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out
// We're checking `isMounted` instead if `isVisible` so that `destroy()`'s
// instance.hide(0) call is not ignored (to unmount the tippy instantly)
var isAlreadyHidden = !instance.state.isMounted;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
if (isAlreadyHidden || isDestroyed || isDisabled) {
return;
}
if (instance.props.onHide(instance) === false) {
return;
}
removeDocumentMouseDownListener();
popper.style.visibility = 'hidden';
instance.state.isVisible = false;
instance.state.isShown = false;
var transitionableElements = getTransitionableElements();
setTransitionDuration(transitionableElements, duration);
setVisibilityState(transitionableElements, 'hidden');
onTransitionedOut(duration, function () {
if (!isScheduledToShow) {
removeFollowCursorListener();
}
if (instance.props.aria) {
getEventListenersTarget().removeAttribute("aria-".concat(instance.props.aria));
}
instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);
instance.props.onHidden(instance);
instance.state.isMounted = false;
});
}
function destroy() {
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`destroy()` was called on an already-destroyed ' + 'instance. This is a no-op but indicates a potential memory leak.');
}
if (instance.state.isDestroyed) {
return;
} // `destroy()`'s `hide()` call should not be ignored
instance.enable();
instance.hide(0);
removeTriggersFromEventListenersTarget();
delete reference._tippy;
if (instance.popperInstance) {
instance.popperInstance.destroy();
}
instance.state.isDestroyed = true;
}
}
/**
* Exported module
*/
function tippy(targets, optionalProps) {
if (process.env.NODE_ENV !== "production") {
validateTargets(targets);
validateProps(optionalProps);
}
bindGlobalEventListeners();
var props = _extends({}, defaultProps, optionalProps);
var elements = getArrayOfElements(targets);
if (process.env.NODE_ENV !== "production") {
var isSingleContentElement = isRealElement(props.content);
var isMoreThanOneReferenceElement = elements.length > 1;
warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, '`tippy()` was passed a targets argument that will create more than ' + 'one tippy instance, but only a single element was supplied as the ' + '`content` prop. This means the content will only be appended to the ' + 'last tippy element of the list. Instead, use a function that ' + 'returns a cloned version of the element instead, or pass the ' + '.innerHTML of the element.');
}
var instances = elements.reduce(function (acc, reference) {
var instance = reference && createTippy(reference, props);
if (instance) {
acc.push(instance);
}
return acc;
}, []);
return isRealElement(targets) ? instances[0] : instances;
}
tippy.version = version;
tippy.defaultProps = defaultProps;
tippy.currentInput = currentInput;
/**
* Mutates the defaultProps object by setting the props specified
*/
tippy.setDefaultProps = function (partialProps) {
Object.keys(partialProps).forEach(function (key) {
// @ts-ignore
defaultProps[key] = partialProps[key];
});
};
/**
* Hides all visible poppers on the document
*/
tippy.hideAll = function () {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
excludedReferenceOrInstance = _ref.exclude,
duration = _ref.duration;
arrayFrom(document.querySelectorAll(POPPER_SELECTOR)).forEach(function (popper) {
var instance = popper._tippy;
if (instance) {
var isExcluded = false;
if (excludedReferenceOrInstance) {
isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : popper === excludedReferenceOrInstance.popper;
}
if (!isExcluded) {
instance.hide(duration);
}
}
});
};
if (process.env.NODE_ENV !== "production") {
Object.defineProperty(tippy, 'group', {
value: function value() {
warnWhen(true, '`tippy.group()` was removed in v5 and replaced with ' + '`createSingleton()`. Read more here: ' + 'https://atomiks.github.io/tippyjs/addons#singleton');
},
enumerable: false
});
Object.defineProperty(tippy, 'setDefaults', {
value: function value() {
warnWhen(true, '`tippy.setDefaults()` was renamed to `tippy.setDefaultProps()` in v5.');
},
enumerable: false
});
Object.defineProperty(tippy, 'defaults', {
get: function get() {
warnWhen(true, 'The `tippy.defaults` property was renamed to `tippy.defaultProps` ' + 'in v5.');
return undefined;
},
enumerable: false
});
}
/**
* Auto-init tooltips for elements with a `data-tippy="..."` attribute
*/
function autoInit() {
arrayFrom(document.querySelectorAll('[data-tippy]')).forEach(function (el) {
var content = el.getAttribute('data-tippy');
if (content) {
tippy(el, {
content: content
});
}
});
}
if (isBrowser) {
setTimeout(autoInit);
}
exports.PASSIVE = PASSIVE;
exports.POPPER_INSTANCE_DEPENDENCIES = POPPER_INSTANCE_DEPENDENCIES;
exports.POPPER_SELECTOR = POPPER_SELECTOR;
exports.PREVENT_OVERFLOW_PADDING = PREVENT_OVERFLOW_PADDING;
exports._extends = _extends;
exports.arrayFrom = arrayFrom;
exports.bindGlobalEventListeners = bindGlobalEventListeners;
exports.closestCallback = closestCallback;
exports.createPopperElement = createPopperElement;
exports.currentInput = currentInput;
exports.debounce = debounce;
exports.defaultProps = defaultProps;
exports.evaluateProps = evaluateProps;
exports.getArrayOfElements = getArrayOfElements;
exports.getBasePlacement = getBasePlacement;
exports.getChildren = getChildren;
exports.getModifier = getModifier;
exports.getValue = getValue;
exports.getVirtualOffsets = getVirtualOffsets;
exports.hasOwnProperty = hasOwnProperty;
exports.includes = includes;
exports.invokeWithArgsOrReturn = invokeWithArgsOrReturn;
exports.isBrowser = isBrowser;
exports.isCursorOutsideInteractiveBorder = isCursorOutsideInteractiveBorder;
exports.isIE = isIE;
exports.isRealElement = isRealElement;
exports.isReferenceElement = isReferenceElement;
exports.preserveInvocation = preserveInvocation;
exports.reflow = reflow;
exports.removeProperties = removeProperties;
exports.setFlipModifierEnabled = setFlipModifierEnabled;
exports.setTransitionDuration = setTransitionDuration;
exports.setVisibilityState = setVisibilityState;
exports.throwErrorWhen = throwErrorWhen;
exports.tippy = tippy;
exports.updatePopperElement = updatePopperElement;
exports.updateTransitionEndListener = updateTransitionEndListener;
exports.validateExtraPropsFunctionality = validateExtraPropsFunctionality;
exports.validateProps = validateProps;
exports.validateTargets = validateTargets;
exports.warnWhen = warnWhen;
//# sourceMappingURL=tippy.chunk.js.map
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -8,3 +8,6 @@ * MIT License

var __chunk_1 = require('./tippy.chunk.js');
Object.defineProperty(exports, '__esModule', { value: true });
require('./tippy.chunk.js');
var __chunk_2 = require('./tippy.chunk2.js');
require('popper.js');

@@ -14,3 +17,3 @@

module.exports = __chunk_1.tippy;
exports.default = __chunk_2.tippy;
//# sourceMappingURL=tippy.js.map
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks
* MIT License
*/
import { b as isBrowser, a as tippy } from './tippy.chunk.js';
import { I as isBrowser } from './tippy.chunk.js';
import { t as tippy } from './tippy.chunk2.js';
import 'popper.js';
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-tooltip[data-animation=shift-away][data-placement^=top][data-state=hidden]{transform:translateY(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=bottom][data-state=hidden]{transform:translateY(-10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=left][data-state=hidden]{transform:translateX(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=right][data-state=hidden]{transform:translateX(-10px)}.tippy-tooltip[data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;text-align:center;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-backdrop{transform-origin:0 25%;border-radius:40% 40% 0 0}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-55%)}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%,-45%)}.tippy-tooltip[data-placement^=top] .tippy-svgArrow{transform-origin:50% 0;margin:0 3px;bottom:-7px;bottom:-6.5px}.tippy-tooltip[data-placement^=top] .tippy-svgArrow svg{transform:rotate(180deg)}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop{transform-origin:0 -50%;border-radius:0 0 30% 30%}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-45%)}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%)}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow{transform-origin:50% 7px;margin:0 3px;top:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow svg{transform:rotate(0)}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-backdrop{transform-origin:50% 0;border-radius:50% 0 0 50%}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-75%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-svgArrow{transform-origin:33.33333333% 50%;margin:3px 0;right:-12px}.tippy-tooltip[data-placement^=left] .tippy-svgArrow svg{transform:rotate(90deg)}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-backdrop{transform-origin:-50% 0;border-radius:0 50% 50% 0}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-25%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-svgArrow{transform-origin:66.66666666% 50%;margin:3px 0;left:-12px}.tippy-tooltip[data-placement^=right] .tippy-svgArrow svg{transform:rotate(-90deg)}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-svgArrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid}.tippy-arrow,.tippy-svgArrow{position:absolute}.tippy-arrow[data-state=hidden],.tippy-svgArrow[data-state=hidden]{opacity:0}.tippy-svgArrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-svgArrow svg{position:absolute;left:0}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop[data-state=hidden]{opacity:0}.tippy-backdrop:after{content:\"\";float:left;padding-top:100%}.tippy-content{padding:.3125rem .5625rem}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -21,6 +22,6 @@ /**

var head = document.head;
var firstChild = head.firstChild;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstChild) {
head.insertBefore(style, firstChild);
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {

@@ -27,0 +28,0 @@ head.appendChild(style);

/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks
* MIT License
*/
import Popper from 'popper.js';
function _extends() {

@@ -26,4 +24,2 @@ _extends = Object.assign || function (target) {

var version = "5.0.0-alpha.1";
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

@@ -37,4 +33,4 @@ var ua = isBrowser ? navigator.userAgent : '';

allowHTML: true,
animateFill: true,
animation: 'shift-away',
animateFill: false,
animation: 'fade',
appendTo: function appendTo() {

@@ -44,4 +40,3 @@ return document.body;

aria: 'describedby',
arrow: false,
arrowType: 'sharp',
arrow: true,
boundary: 'scrollParent',

@@ -55,3 +50,2 @@ content: '',

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -78,8 +72,6 @@ ignoreAttributes: false,

role: 'tooltip',
showOnInit: false,
size: 'regular',
showOnCreate: false,
sticky: false,
theme: 'tippy-dark',
theme: '',
touch: true,
touchHold: false,
trigger: 'mouseenter focus',

@@ -90,4 +82,8 @@ triggerTarget: null,

zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**
* If the set() method encounters one of these, the popperInstance must be
* If the setProps() method encounters one of these, the popperInstance must be
* recreated

@@ -97,33 +93,9 @@ */

};
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
// Passive event listener config
var PASSIVE = {
passive: true // Popper `preventOverflow` padding
passive: true
};
var PADDING = 4; // Classes
var PREVENT_OVERFLOW_PADDING = 5;
var ROUND_ARROW_INNER_HTML = '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>';
var IOS_CLASS = "tippy-iOS";

@@ -135,11 +107,10 @@ var POPPER_CLASS = "tippy-popper";

var ARROW_CLASS = "tippy-arrow";
var SVG_ARROW_CLASS = "tippy-svgArrow"; // Selectors
var SVG_ARROW_CLASS = "tippy-svg-arrow";
var POPPER_SELECTOR = "." + POPPER_CLASS;
var TOOLTIP_SELECTOR = "." + TOOLTIP_CLASS;
var CONTENT_SELECTOR = "." + CONTENT_CLASS;
var BACKDROP_SELECTOR = "." + BACKDROP_CLASS;
var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var POPPER_SELECTOR = ".".concat(POPPER_CLASS);
var TOOLTIP_SELECTOR = ".".concat(TOOLTIP_CLASS);
var CONTENT_SELECTOR = ".".concat(CONTENT_CLASS);
var BACKDROP_SELECTOR = ".".concat(BACKDROP_CLASS);
var ARROW_SELECTOR = ".".concat(ARROW_CLASS);
var SVG_ARROW_SELECTOR = ".".concat(SVG_ARROW_CLASS);
var currentInput = {

@@ -212,3 +183,5 @@ isTouch: false

function bindGlobalEventListeners() {
document.addEventListener('touchstart', onDocumentTouchStart, PASSIVE);
document.addEventListener('touchstart', onDocumentTouchStart, _extends({}, PASSIVE, {
capture: true
}));
window.addEventListener('blur', onWindowBlur);

@@ -223,4 +196,4 @@ }

function getDataAttributeProps(reference) {
return keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-".concat(key)) || '').trim();
var props = keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();

@@ -243,2 +216,3 @@ if (!valueAsString) {

}, {});
return props;
}

@@ -304,9 +278,2 @@

/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Determines if the value is a real element

@@ -356,3 +323,3 @@ */

if (el) {
el.style.transitionDuration = "".concat(value, "ms");
el.style.transitionDuration = value + "ms";
}

@@ -382,2 +349,6 @@ });

if (out.animateFill) {
out.arrow = false;
}
if (out.arrow || isUCBrowser) {

@@ -409,4 +380,70 @@ out.animateFill = false;

}
/**
* Returns offsets for virtual reference when using a cursor point
*/
function getVirtualOffsets(_ref, isVerticalPlacement) {
var popper = _ref.popper,
currentPlacement = _ref.state.currentPlacement;
var isShift = !!currentPlacement.split('-')[1];
var size = isVerticalPlacement ? popper.offsetWidth : popper.offsetHeight;
var halfSize = size / 2;
return {
size: size,
x: isVerticalPlacement ? isShift ? size : halfSize : 0,
y: isVerticalPlacement ? 0 : isShift ? size : halfSize
};
}
/**
* Preserves the original function invocation when another function replaces it
*/
function preserveInvocation(originalFn, currentFn, args) {
if (originalFn && originalFn !== currentFn) {
originalFn.apply(null, args);
}
}
/**
* Deletes properties from an object (pure)
*/
function removeProperties(partialProps, keys) {
var clone = _extends({}, partialProps);
keys.forEach(function (key) {
delete clone[key];
});
return clone;
}
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Sets the innerHTML of an element

@@ -461,19 +498,18 @@ */

function createArrowElement(arrowType) {
var arrow = div();
function createArrowElement(arrow) {
var arrowElement = div();
if (arrowType !== 'sharp') {
arrow.className = SVG_ARROW_CLASS; // Use the built-in round SVG shape
if (arrow === true) {
arrowElement.className = ARROW_CLASS;
} else {
arrowElement.className = SVG_ARROW_CLASS;
if (arrowType === 'round') {
setInnerHTML(arrow, '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>');
if (isRealElement(arrow)) {
arrowElement.appendChild(arrow);
} else {
// Assume they're specifying their own SVG shape
setInnerHTML(arrow, arrowType);
setInnerHTML(arrowElement, arrow === 'round' ? ROUND_ARROW_INNER_HTML : arrow);
}
} else {
arrow.className = ARROW_CLASS;
}
return arrow;
return arrowElement;
}

@@ -532,3 +568,5 @@ /**

theme.split(' ').forEach(function (name) {
tooltip.classList[action](name + '-theme');
if (name) {
tooltip.classList[action](name + "-theme");
}
});

@@ -543,5 +581,8 @@ }

popper.className = POPPER_CLASS;
popper.style.position = 'absolute';
popper.style.top = '0';
popper.style.left = '0';
var tooltip = div();
tooltip.className = TOOLTIP_CLASS;
tooltip.id = "tippy-".concat(id);
tooltip.id = "tippy-" + id;
tooltip.setAttribute('data-state', 'hidden');

@@ -560,3 +601,3 @@ tooltip.setAttribute('tabindex', '-1');

tooltip.setAttribute('data-arrow', '');
tooltip.appendChild(createArrowElement(props.arrowType));
tooltip.appendChild(createArrowElement(props.arrow));
}

@@ -591,3 +632,2 @@

popper.style.zIndex = '' + nextProps.zIndex;
tooltip.setAttribute('data-size', nextProps.size);
tooltip.setAttribute('data-animation', nextProps.animation);

@@ -617,12 +657,13 @@ tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');

if (!prevProps.arrow && nextProps.arrow) {
tooltip.appendChild(createArrowElement(nextProps.arrowType));
// false to true
tooltip.appendChild(createArrowElement(nextProps.arrow));
tooltip.setAttribute('data-arrow', '');
} else if (prevProps.arrow && !nextProps.arrow) {
// true to false
tooltip.removeChild(arrow);
tooltip.removeAttribute('data-arrow');
} // arrowType
if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {
tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);
} else if (prevProps.arrow !== nextProps.arrow) {
// true to 'round' or vice-versa
tooltip.removeChild(arrow);
tooltip.appendChild(createArrowElement(nextProps.arrow));
} // interactive

@@ -681,3 +722,3 @@

/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] ".concat(message));
console.warn("[tippy.js WARNING] " + message);
}

@@ -691,3 +732,3 @@ }

if (condition) {
throw new Error("[tippy.js ERROR] ".concat(message));
throw new Error("[tippy.js ERROR] " + message);
}

@@ -699,17 +740,26 @@ }

function validateProps() {
var partialProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetprop = prop === 'target';
var didPassA11yprop = prop === 'a11y';
var didPassOtherUnknownprop = !hasOwnProperty(defaultProps, prop) && prop !== 'target' && prop !== 'a11y';
var didPassOldThemeName = prop === 'theme' && includes(['dark', 'light', 'light-border', 'translucent'], value);
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
warnWhen(didPassTargetprop, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yprop, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassOtherUnknownprop, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassOldThemeName, 'The default theme `' + value + '` in v5 must include the prefix `tippy`, i.e. ' + '"tippy-' + value + '" instead of "' + value + '".');
warnWhen(didPassGoogleTheme, 'The default theme `google` was renamed to ' + '`tippy-material` in v5.');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');

@@ -728,963 +778,24 @@ });

}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor
var mouseMoveListeners = [];
/**
* Creates and returns a Tippy object. We're using a closure pattern instead of
* a class so that the exposed object API is clean without private members
* prefixed with `_`.
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function createTippy(reference, collectionProps) {
var props = evaluateProps(reference, collectionProps); // If the reference shouldn't have multiple tippys, return null early
if (!props.multiple && reference._tippy) {
return null;
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
/* ======================= 🔒 Private members 🔒 ======================= */
var lastTriggerEventType;
var lastMouseMoveEvent;
var showTimeout;
var hideTimeout;
var animationFrame;
var isScheduledToShow = false;
var currentPlacement = props.placement;
var hasMountCallbackRun = false;
var didHideDueToDocumentMouseDown = false;
var currentMountCallback;
var currentTransitionEndListener;
var listeners = [];
var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
var currentComputedPadding;
/* ======================= 🔑 Public members 🔑 ======================= */
var id = idCounter++;
var popper = createPopperElement(id, props);
var popperChildren = getChildren(popper);
var popperInstance = null; // These two elements are static
var tooltip = popperChildren.tooltip,
content = popperChildren.content;
var state = {
// Is the instance currently enabled?
isEnabled: true,
// Is the tippy currently showing and not transitioning out?
isVisible: false,
// Has the instance been destroyed?
isDestroyed: false,
// Is the tippy currently mounted to the DOM?
isMounted: false,
// Has the tippy finished transitioning in?
isShown: false
};
var instance = {
// properties
id: id,
reference: reference,
popper: popper,
popperChildren: popperChildren,
popperInstance: popperInstance,
props: props,
state: state,
// methods
clearDelayTimeouts: clearDelayTimeouts,
setProps: setProps,
setContent: setContent,
show: show,
hide: hide,
enable: enable,
disable: disable,
destroy: destroy
};
if (process.env.NODE_ENV !== "production") {
Object.defineProperty(instance, 'set', {
value: function value() {
warnWhen(true, '`set()` was renamed to `setProps()` in v5.');
},
enumerable: false
});
}
/* ==================== Initial instance mutations =================== */
reference._tippy = instance;
popper._tippy = instance;
addTriggersToEventListenersTarget();
if (!props.lazy) {
createPopperInstance();
}
if (props.showOnInit) {
scheduleShow();
} // Prevent a tippy with a delay from hiding if the cursor left then returned
// before it started hiding
popper.addEventListener('mouseenter', function () {
if (instance.props.interactive && instance.state.isVisible && lastTriggerEventType === 'mouseenter') {
instance.clearDelayTimeouts();
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
popper.addEventListener('mouseleave', function () {
if (instance.props.interactive && lastTriggerEventType === 'mouseenter') {
document.addEventListener('mousemove', debouncedOnMouseMove);
}
});
props.onCreate(instance);
return instance;
/* ======================= 🔒 Private methods 🔒 ======================= */
function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(currentPlacement));
}
function getIsInFollowCursorMode() {
return instance.props.followCursor && lastTriggerEventType !== 'focus';
}
function getTransitionableElements() {
return [tooltip, content, instance.popperChildren.backdrop];
}
function removeFollowCursorListener() {
document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);
}
function cleanupInteractiveMouseListeners() {
document.body.removeEventListener('mouseleave', scheduleHide);
document.removeEventListener('mousemove', debouncedOnMouseMove);
mouseMoveListeners = mouseMoveListeners.filter(function (listener) {
return listener !== debouncedOnMouseMove;
});
}
function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}
function onDocumentMouseDown(event) {
// Clicked on interactive popper
if (instance.props.interactive && popper.contains(event.target)) {
return;
} // Clicked on the event listeners target
if (getEventListenersTarget().contains(event.target)) {
if (currentInput.isTouch) {
return;
}
if (instance.state.isVisible && includes(instance.props.trigger, 'click')) {
return;
}
}
if (instance.props.hideOnClick === true) {
instance.clearDelayTimeouts();
instance.hide(); // `mousedown` event is fired right before `focus`. This lets a tippy with
// `focus` trigger know that it should not show
didHideDueToDocumentMouseDown = true;
setTimeout(function () {
didHideDueToDocumentMouseDown = false;
}); // The listener gets added in `scheduleShow()`, but this may be hiding it
// before it shows, and hide()'s early bail-out behavior can prevent it
// from being cleaned up
if (!instance.state.isMounted) {
removeDocumentMouseDownListener();
}
}
}
function addDocumentMouseDownListener() {
document.addEventListener('mousedown', onDocumentMouseDown, true);
}
function removeDocumentMouseDownListener() {
document.removeEventListener('mousedown', onDocumentMouseDown, true);
}
function makeSticky() {
setTransitionDuration([popper], isIE ? 0 : instance.props.updateDuration);
function updatePosition() {
instance.popperInstance.scheduleUpdate();
if (instance.state.isMounted) {
requestAnimationFrame(updatePosition);
} else {
setTransitionDuration([popper], 0);
}
}
updatePosition();
}
function onTransitionedOut(duration, callback) {
onTransitionEnd(duration, function () {
if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
callback();
}
});
}
function onTransitionedIn(duration, callback) {
onTransitionEnd(duration, callback);
}
function onTransitionEnd(duration, callback) {
/**
* Listener added as the `transitionend` handler
*/
function listener(event) {
if (event.target === tooltip) {
updateTransitionEndListener(tooltip, 'remove', listener);
callback();
}
} // Make callback synchronous if duration is 0
// `transitionend` won't fire otherwise
if (duration === 0) {
return callback();
}
updateTransitionEndListener(tooltip, 'remove', currentTransitionEndListener);
updateTransitionEndListener(tooltip, 'add', listener);
currentTransitionEndListener = listener;
}
function on(eventType, handler) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
getEventListenersTarget().addEventListener(eventType, handler, options);
listeners.push({
eventType: eventType,
handler: handler,
options: options
});
}
function addTriggersToEventListenersTarget() {
if (instance.props.touchHold) {
on('touchstart', onTrigger, PASSIVE);
on('touchend', onMouseLeave, PASSIVE);
} // `click` for keyboard. Mouse uses `mousedown` (onDocumentMouseDown)
if (!includes(instance.props.trigger, 'click')) {
on('click', function () {
if (!currentInput.isTouch && instance.props.hideOnClick === true) {
instance.hide();
}
});
}
instance.props.trigger.trim().split(' ').forEach(function (eventType) {
if (eventType === 'manual') {
return;
}
on(eventType, onTrigger);
switch (eventType) {
case 'mouseenter':
on('mouseleave', onMouseLeave);
break;
case 'focus':
on(isIE ? 'focusout' : 'blur', onBlur);
break;
}
});
}
function removeTriggersFromEventListenersTarget() {
listeners.forEach(function (_ref) {
var eventType = _ref.eventType,
handler = _ref.handler,
options = _ref.options;
getEventListenersTarget().removeEventListener(eventType, handler, options);
});
listeners = [];
}
function positionVirtualReferenceNearCursor(event) {
var _lastMouseMoveEvent = lastMouseMoveEvent = event,
x = _lastMouseMoveEvent.clientX,
y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called
if (!currentComputedPadding) {
return;
} // If the instance is interactive, avoid updating the position unless it's
// over the reference element
var isCursorOverReference = closestCallback(event.target, function (el) {
return el === reference;
});
var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var isHorizontal = followCursor === 'horizontal';
var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing
var fakeSize = 100;
var halfFakeSize = fakeSize / 2;
var isVerticalPlacement = getIsVerticalPlacement();
var verticalIncrease = isVerticalPlacement ? 0 : halfFakeSize;
var horizontalIncrease = isVerticalPlacement ? halfFakeSize : 0;
if (isCursorOverReference || !instance.props.interactive) {
instance.popperInstance.reference = {
// These `clientWidth` values don't get used by Popper.js if they are 0
clientWidth: 0,
clientHeight: 0,
getBoundingClientRect: function getBoundingClientRect() {
return {
width: isVerticalPlacement ? fakeSize : 0,
height: isVerticalPlacement ? 0 : fakeSize,
top: (isHorizontal ? rect.top : y) - verticalIncrease,
bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
left: (isVertical ? rect.left : x) - horizontalIncrease,
right: (isVertical ? rect.right : x) + horizontalIncrease
};
}
};
instance.popperInstance.scheduleUpdate();
}
if (currentInput.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeFollowCursorListener();
}
}
function onTrigger(event) {
if (didHideDueToDocumentMouseDown || !instance.state.isEnabled || isEventListenerStopped(event)) {
return;
}
if (!instance.state.isVisible) {
lastTriggerEventType = event.type;
if (event instanceof MouseEvent) {
lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
mouseMoveListeners.forEach(function (listener) {
return listener(event);
});
}
} // Toggle show/hide when clicking click-triggered tooltips
if (event.type === 'click' && instance.props.hideOnClick !== false && instance.state.isVisible) {
scheduleHide(event);
} else {
scheduleShow(event);
}
}
function onMouseMove(event) {
var isCursorOverReferenceOrPopper = closestCallback(event.target, function (el) {
return el === reference || el === popper;
});
if (isCursorOverReferenceOrPopper) {
return;
}
if (isCursorOutsideInteractiveBorder(getBasePlacement(currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
cleanupInteractiveMouseListeners();
scheduleHide(event);
}
}
function onMouseLeave(event) {
if (isEventListenerStopped(event)) {
return;
}
if (instance.props.interactive) {
document.body.addEventListener('mouseleave', scheduleHide);
document.addEventListener('mousemove', debouncedOnMouseMove);
mouseMoveListeners.push(debouncedOnMouseMove);
return;
}
scheduleHide(event);
}
function onBlur(event) {
if (event.target !== getEventListenersTarget()) {
return;
} // If focus was moved to within the popper
if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
return;
}
scheduleHide(event);
}
function isEventListenerStopped(event) {
var supportsTouch = 'ontouchstart' in window;
var isTouchEvent = includes(event.type, 'touch');
var touchHold = instance.props.touchHold;
return supportsTouch && currentInput.isTouch && touchHold && !isTouchEvent || currentInput.isTouch && !touchHold && isTouchEvent;
}
function createPopperInstance() {
var popperOptions = instance.props.popperOptions;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
function applyMutations(data) {
var previousPlacement = currentPlacement;
currentPlacement = data.placement;
if (instance.props.flip && !instance.props.flipOnUpdate) {
if (data.flipped) {
instance.popperInstance.options.placement = data.placement;
}
setFlipModifierEnabled(instance.popperInstance.modifiers, false);
} // Apply Popper's `x-*` attributes to the tooltip with `data-*`
tooltip.setAttribute('data-placement', currentPlacement);
if (data.attributes['x-out-of-boundaries'] !== false) {
tooltip.setAttribute('data-out-of-boundaries', '');
} else {
tooltip.removeAttribute('data-out-of-boundaries');
} // Apply the `distance` prop
var BasePlacement = getBasePlacement(currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = "".concat((getIsOppositePlacement() ? 1 : -1) * instance.props.distance, "px");
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
var isPaddingNumber = typeof padding === 'number';
var computedPadding = _extends({
top: isPaddingNumber ? padding : padding.top,
bottom: isPaddingNumber ? padding : padding.bottom,
left: isPaddingNumber ? padding : padding.left,
right: isPaddingNumber ? padding : padding.right
}, !isPaddingNumber && padding);
computedPadding[BasePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[BasePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
currentComputedPadding = computedPadding; // The `distance` offset needs to be re-considered by Popper.js if the
// placement changed
if (currentPlacement !== previousPlacement) {
instance.popperInstance.update();
}
}
var config = _extends({
eventsEnabled: false,
placement: instance.props.placement
}, popperOptions, {
modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {
preventOverflow: _extends({
boundariesElement: instance.props.boundary,
padding: PADDING
}, preventOverflowModifier),
arrow: _extends({
element: arrow,
enabled: !!arrow
}, getModifier(popperOptions, 'arrow')),
flip: _extends({
enabled: instance.props.flip,
// The tooltip is offset by 10px from the popper in CSS,
// we need to account for its distance
padding: instance.props.distance + PADDING,
behavior: instance.props.flipBehavior
}, getModifier(popperOptions, 'flip')),
offset: _extends({
offset: instance.props.offset
}, getModifier(popperOptions, 'offset'))
}),
onCreate: function onCreate(data) {
applyMutations(data);
runMountCallback();
if (popperOptions && popperOptions.onCreate) {
popperOptions.onCreate(data);
}
},
onUpdate: function onUpdate(data) {
applyMutations(data);
runMountCallback();
if (popperOptions && popperOptions.onUpdate) {
popperOptions.onUpdate(data);
}
}
});
instance.popperInstance = new Popper(reference, popper, config);
}
function runMountCallback() {
if (!hasMountCallbackRun && currentMountCallback) {
hasMountCallbackRun = true;
reflow(popper);
currentMountCallback();
}
}
function mount() {
hasMountCallbackRun = false;
var isInFollowCursorMode = getIsInFollowCursorMode();
if (!instance.popperInstance) {
createPopperInstance();
if (!isInFollowCursorMode) {
instance.popperInstance.enableEventListeners();
}
} else {
if (!isInFollowCursorMode) {
instance.popperInstance.scheduleUpdate();
instance.popperInstance.enableEventListeners();
}
setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);
} // If the instance previously had followCursor behavior, it will be
// positioned incorrectly if triggered by `focus` afterwards.
// Update the reference back to the real DOM element
instance.popperInstance.reference = reference;
if (isInFollowCursorMode && lastMouseMoveEvent) {
// TODO: If the tippy also has `updateDuration`, it transitions from
// the initial placement to the cursor point
requestAnimationFrame(function () {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
});
}
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]);
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
instance.props.onMount(instance);
instance.state.isMounted = true;
}
}
function scheduleShow(event) {
instance.clearDelayTimeouts();
if (event) {
instance.props.onTrigger(instance, event);
}
if (instance.state.isVisible) {
return;
}
isScheduledToShow = true;
if (instance.props.wait) {
return instance.props.wait(instance, event);
} // If the tooltip has a delay, we need to be listening to the mousemove as
// soon as the trigger event is fired, so that it's in the correct position
// upon mount.
// Edge case: if the tooltip is still mounted, but then scheduleShow() is
// called, it causes a jump.
if (getIsInFollowCursorMode() && !instance.state.isMounted) {
if (!instance.popperInstance) {
createPopperInstance();
}
document.addEventListener('mousemove', positionVirtualReferenceNearCursor);
}
addDocumentMouseDownListener();
var delay = getValue(instance.props.delay, 0, defaultProps.delay);
if (delay) {
showTimeout = setTimeout(function () {
instance.show();
}, delay);
} else {
instance.show();
}
}
function scheduleHide(event) {
instance.clearDelayTimeouts();
instance.props.onUntrigger(instance, event);
if (!instance.state.isVisible) {
return removeFollowCursorListener();
}
isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);
if (delay) {
hideTimeout = setTimeout(function () {
if (instance.state.isVisible) {
instance.hide();
}
}, delay);
} else {
// Fixes a `transitionend` problem when it fires 1 frame too
// late sometimes, we don't want hide() to be called.
animationFrame = requestAnimationFrame(function () {
instance.hide();
});
}
}
/* ======================= 🔑 Public methods 🔑 ======================= */
function enable() {
instance.state.isEnabled = true;
}
function disable() {
instance.state.isEnabled = false;
}
function clearDelayTimeouts() {
clearTimeout(showTimeout);
clearTimeout(hideTimeout);
cancelAnimationFrame(animationFrame);
}
function setProps(partialProps) {
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`set()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
}
if (instance.state.isDestroyed) {
return;
}
if (process.env.NODE_ENV !== "production") {
validateProps(partialProps);
}
removeTriggersFromEventListenersTarget();
var prevProps = instance.props;
var nextProps = evaluateProps(reference, _extends({}, instance.props, partialProps, {
ignoreAttributes: true
}));
nextProps.ignoreAttributes = hasOwnProperty(partialProps, 'ignoreAttributes') ? partialProps.ignoreAttributes || false : prevProps.ignoreAttributes;
instance.props = nextProps;
addTriggersToEventListenersTarget();
cleanupInteractiveMouseListeners();
debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
updatePopperElement(popper, prevProps, nextProps, instance.state.isVisible);
instance.popperChildren = getChildren(popper);
if (instance.popperInstance) {
if (POPPER_INSTANCE_DEPENDENCIES.some(function (prop) {
return hasOwnProperty(partialProps, prop) && partialProps[prop] !== prevProps[prop];
})) {
instance.popperInstance.destroy();
createPopperInstance();
if (instance.state.isVisible) {
instance.popperInstance.enableEventListeners();
}
if (instance.props.followCursor && lastMouseMoveEvent) {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
}
} else {
instance.popperInstance.update();
}
}
}
function setContent(content) {
instance.setProps({
content: content
});
}
function show() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, defaultProps.duration[1]);
var shouldPreventPopperTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out
var isAlreadyVisible = instance.state.isVisible;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
return;
} // Standardize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.
// Using a wrapper element (i.e. <span>) is recommended.
if (getEventListenersTarget().hasAttribute('disabled')) {
return;
}
if (instance.props.onShow(instance) === false) {
return;
}
addDocumentMouseDownListener();
popper.style.visibility = 'visible';
instance.state.isVisible = true; // Prevent a transition of the popper from its previous position and of the
// elements at a different placement.
var transitionableElements = getTransitionableElements();
setTransitionDuration(shouldPreventPopperTransition ? transitionableElements.concat(popper) : transitionableElements, 0);
currentMountCallback = function currentMountCallback() {
if (!instance.state.isVisible) {
return;
} // Double update will apply correct mutations
if (!getIsInFollowCursorMode()) {
instance.popperInstance.update();
}
if (instance.popperChildren.backdrop) {
instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';
}
if (instance.props.sticky) {
makeSticky();
}
setTransitionDuration([popper], instance.props.updateDuration);
setTransitionDuration(transitionableElements, duration);
setVisibilityState(transitionableElements, 'visible');
onTransitionedIn(duration, function () {
if (instance.props.aria) {
getEventListenersTarget().setAttribute("aria-".concat(instance.props.aria), tooltip.id);
}
instance.props.onShown(instance);
instance.state.isShown = true;
});
};
mount();
}
function hide() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, defaultProps.duration[1]);
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`hide()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');
} // Early bail-out
// We're checking `isMounted` instead if `isVisible` so that `destroy()`'s
// instance.hide(0) call is not ignored (to unmount the tippy instantly)
var isAlreadyHidden = !instance.state.isMounted;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
if (isAlreadyHidden || isDestroyed || isDisabled) {
return;
}
if (instance.props.onHide(instance) === false) {
return;
}
removeDocumentMouseDownListener();
popper.style.visibility = 'hidden';
instance.state.isVisible = false;
instance.state.isShown = false;
var transitionableElements = getTransitionableElements();
setTransitionDuration(transitionableElements, duration);
setVisibilityState(transitionableElements, 'hidden');
onTransitionedOut(duration, function () {
if (!isScheduledToShow) {
removeFollowCursorListener();
}
if (instance.props.aria) {
getEventListenersTarget().removeAttribute("aria-".concat(instance.props.aria));
}
instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = instance.props.placement;
popper.parentNode.removeChild(popper);
instance.props.onHidden(instance);
instance.state.isMounted = false;
});
}
function destroy() {
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, '`destroy()` was called on an already-destroyed ' + 'instance. This is a no-op but indicates a potential memory leak.');
}
if (instance.state.isDestroyed) {
return;
} // `destroy()`'s `hide()` call should not be ignored
instance.enable();
instance.hide(0);
removeTriggersFromEventListenersTarget();
delete reference._tippy;
if (instance.popperInstance) {
instance.popperInstance.destroy();
}
instance.state.isDestroyed = true;
}
}
/**
* Exported module
*/
function tippy(targets, optionalProps) {
if (process.env.NODE_ENV !== "production") {
validateTargets(targets);
validateProps(optionalProps);
}
bindGlobalEventListeners();
var props = _extends({}, defaultProps, optionalProps);
var elements = getArrayOfElements(targets);
if (process.env.NODE_ENV !== "production") {
var isSingleContentElement = isRealElement(props.content);
var isMoreThanOneReferenceElement = elements.length > 1;
warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, '`tippy()` was passed a targets argument that will create more than ' + 'one tippy instance, but only a single element was supplied as the ' + '`content` prop. This means the content will only be appended to the ' + 'last tippy element of the list. Instead, use a function that ' + 'returns a cloned version of the element instead, or pass the ' + '.innerHTML of the element.');
}
var instances = elements.reduce(function (acc, reference) {
var instance = reference && createTippy(reference, props);
if (instance) {
acc.push(instance);
}
return acc;
}, []);
return isRealElement(targets) ? instances[0] : instances;
}
tippy.version = version;
tippy.defaultProps = defaultProps;
tippy.currentInput = currentInput;
/**
* Mutates the defaultProps object by setting the props specified
*/
tippy.setDefaultProps = function (partialProps) {
Object.keys(partialProps).forEach(function (key) {
// @ts-ignore
defaultProps[key] = partialProps[key];
});
};
/**
* Hides all visible poppers on the document
*/
tippy.hideAll = function () {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
excludedReferenceOrInstance = _ref.exclude,
duration = _ref.duration;
arrayFrom(document.querySelectorAll(POPPER_SELECTOR)).forEach(function (popper) {
var instance = popper._tippy;
if (instance) {
var isExcluded = false;
if (excludedReferenceOrInstance) {
isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : popper === excludedReferenceOrInstance.popper;
}
if (!isExcluded) {
instance.hide(duration);
}
}
});
};
if (process.env.NODE_ENV !== "production") {
Object.defineProperty(tippy, 'group', {
value: function value() {
warnWhen(true, '`tippy.group()` was removed in v5 and replaced with ' + '`createSingleton()`. Read more here: ' + 'https://atomiks.github.io/tippyjs/addons#singleton');
},
enumerable: false
});
Object.defineProperty(tippy, 'setDefaults', {
value: function value() {
warnWhen(true, '`tippy.setDefaults()` was renamed to `tippy.setDefaultProps()` in v5.');
},
enumerable: false
});
Object.defineProperty(tippy, 'defaults', {
get: function get() {
warnWhen(true, 'The `tippy.defaults` property was renamed to `tippy.defaultProps` ' + 'in v5.');
return undefined;
},
enumerable: false
});
}
/**
* Auto-init tooltips for elements with a `data-tippy="..."` attribute
*/
function autoInit() {
arrayFrom(document.querySelectorAll('[data-tippy]')).forEach(function (el) {
var content = el.getAttribute('data-tippy');
if (content) {
tippy(el, {
content: content
});
}
});
}
if (isBrowser) {
setTimeout(autoInit);
}
export { tippy as a, isBrowser as b, throwErrorWhen as c, _extends as d, hasOwnProperty as e, getValue as f };
export { invokeWithArgsOrReturn as A, validateTargets as B, bindGlobalEventListeners as C, getArrayOfElements as D, isRealElement as E, arrayFrom as F, POPPER_SELECTOR as G, isReferenceElement as H, isBrowser as I, throwErrorWhen as J, removeProperties as K, getVirtualOffsets as L, PREVENT_OVERFLOW_PADDING as P, _extends as _, closestCallback as a, isCursorOutsideInteractiveBorder as b, createPopperElement as c, debounce as d, evaluateProps as e, getBasePlacement as f, getChildren as g, getModifier as h, includes as i, getValue as j, defaultProps as k, PASSIVE as l, currentInput as m, isIE as n, validateExtraPropsFunctionality as o, preserveInvocation as p, hasOwnProperty as q, reflow as r, setFlipModifierEnabled as s, POPPER_INSTANCE_DEPENDENCIES as t, updatePopperElement as u, validateProps as v, warnWhen as w, setTransitionDuration as x, setVisibilityState as y, updateTransitionEndListener as z };
//# sourceMappingURL=tippy.chunk.js.map
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks
* MIT License
*/
import { a as tippy } from './tippy.chunk.js';
import './tippy.chunk.js';
import { t as tippy } from './tippy.chunk2.js';
import 'popper.js';

@@ -8,0 +9,0 @@

/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -11,3 +11,3 @@ * MIT License

var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-tooltip[data-animation=shift-away][data-placement^=top][data-state=hidden]{transform:translateY(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=bottom][data-state=hidden]{transform:translateY(-10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=left][data-state=hidden]{transform:translateX(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=right][data-state=hidden]{transform:translateX(-10px)}.tippy-tooltip[data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;text-align:center;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-backdrop{transform-origin:0 25%;border-radius:40% 40% 0 0}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-55%)}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%,-45%)}.tippy-tooltip[data-placement^=top] .tippy-svgArrow{transform-origin:50% 0;margin:0 3px;bottom:-7px;bottom:-6.5px}.tippy-tooltip[data-placement^=top] .tippy-svgArrow svg{transform:rotate(180deg)}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop{transform-origin:0 -50%;border-radius:0 0 30% 30%}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-45%)}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%)}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow{transform-origin:50% 7px;margin:0 3px;top:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow svg{transform:rotate(0)}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-backdrop{transform-origin:50% 0;border-radius:50% 0 0 50%}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-75%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-svgArrow{transform-origin:33.33333333% 50%;margin:3px 0;right:-12px}.tippy-tooltip[data-placement^=left] .tippy-svgArrow svg{transform:rotate(90deg)}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-backdrop{transform-origin:-50% 0;border-radius:0 50% 50% 0}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-25%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-svgArrow{transform-origin:66.66666666% 50%;margin:3px 0;left:-12px}.tippy-tooltip[data-placement^=right] .tippy-svgArrow svg{transform:rotate(-90deg)}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-svgArrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid}.tippy-arrow,.tippy-svgArrow{position:absolute}.tippy-arrow[data-state=hidden],.tippy-svgArrow[data-state=hidden]{opacity:0}.tippy-svgArrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-svgArrow svg{position:absolute;left:0}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop[data-state=hidden]{opacity:0}.tippy-backdrop:after{content:\"\";float:left;padding-top:100%}.tippy-content{padding:.3125rem .5625rem}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}";
var css = ".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}";

@@ -32,3 +32,3 @@ function _extends() {

var version = "5.0.0-alpha.1";
var version = "5.0.0-alpha.2";

@@ -43,4 +43,4 @@ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

allowHTML: true,
animateFill: true,
animation: 'shift-away',
animateFill: false,
animation: 'fade',
appendTo: function appendTo() {

@@ -50,4 +50,3 @@ return document.body;

aria: 'describedby',
arrow: false,
arrowType: 'sharp',
arrow: true,
boundary: 'scrollParent',

@@ -61,3 +60,2 @@ content: '',

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -84,8 +82,6 @@ ignoreAttributes: false,

role: 'tooltip',
showOnInit: false,
size: 'regular',
showOnCreate: false,
sticky: false,
theme: 'tippy-dark',
theme: '',
touch: true,
touchHold: false,
trigger: 'mouseenter focus',

@@ -96,4 +92,8 @@ triggerTarget: null,

zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**
* If the set() method encounters one of these, the popperInstance must be
* If the setProps() method encounters one of these, the popperInstance must be
* recreated

@@ -103,33 +103,9 @@ */

};
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
// Passive event listener config
var PASSIVE = {
passive: true // Popper `preventOverflow` padding
passive: true
};
var PADDING = 4; // Classes
var PREVENT_OVERFLOW_PADDING = 5;
var ROUND_ARROW_INNER_HTML = '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>';
var IOS_CLASS = "tippy-iOS";

@@ -141,11 +117,10 @@ var POPPER_CLASS = "tippy-popper";

var ARROW_CLASS = "tippy-arrow";
var SVG_ARROW_CLASS = "tippy-svgArrow"; // Selectors
var SVG_ARROW_CLASS = "tippy-svg-arrow";
var POPPER_SELECTOR = "." + POPPER_CLASS;
var TOOLTIP_SELECTOR = "." + TOOLTIP_CLASS;
var CONTENT_SELECTOR = "." + CONTENT_CLASS;
var BACKDROP_SELECTOR = "." + BACKDROP_CLASS;
var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var POPPER_SELECTOR = ".".concat(POPPER_CLASS);
var TOOLTIP_SELECTOR = ".".concat(TOOLTIP_CLASS);
var CONTENT_SELECTOR = ".".concat(CONTENT_CLASS);
var BACKDROP_SELECTOR = ".".concat(BACKDROP_CLASS);
var ARROW_SELECTOR = ".".concat(ARROW_CLASS);
var SVG_ARROW_SELECTOR = ".".concat(SVG_ARROW_CLASS);
var currentInput = {

@@ -218,3 +193,5 @@ isTouch: false

function bindGlobalEventListeners() {
document.addEventListener('touchstart', onDocumentTouchStart, PASSIVE);
document.addEventListener('touchstart', onDocumentTouchStart, _extends({}, PASSIVE, {
capture: true
}));
window.addEventListener('blur', onWindowBlur);

@@ -229,4 +206,4 @@ }

function getDataAttributeProps(reference) {
return keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-".concat(key)) || '').trim();
var props = keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();

@@ -249,2 +226,3 @@ if (!valueAsString) {

}, {});
return props;
}

@@ -310,9 +288,2 @@

/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Determines if the value is a real element

@@ -362,3 +333,3 @@ */

if (el) {
el.style.transitionDuration = "".concat(value, "ms");
el.style.transitionDuration = value + "ms";
}

@@ -388,2 +359,6 @@ });

if (out.animateFill) {
out.arrow = false;
}
if (out.arrow || isUCBrowser) {

@@ -415,4 +390,42 @@ out.animateFill = false;

}
/**
* Preserves the original function invocation when another function replaces it
*/
function preserveInvocation(originalFn, currentFn, args) {
if (originalFn && originalFn !== currentFn) {
originalFn.apply(null, args);
}
}
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Sets the innerHTML of an element

@@ -467,19 +480,18 @@ */

function createArrowElement(arrowType) {
var arrow = div();
function createArrowElement(arrow) {
var arrowElement = div();
if (arrowType !== 'sharp') {
arrow.className = SVG_ARROW_CLASS; // Use the built-in round SVG shape
if (arrow === true) {
arrowElement.className = ARROW_CLASS;
} else {
arrowElement.className = SVG_ARROW_CLASS;
if (arrowType === 'round') {
setInnerHTML(arrow, '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>');
if (isRealElement(arrow)) {
arrowElement.appendChild(arrow);
} else {
// Assume they're specifying their own SVG shape
setInnerHTML(arrow, arrowType);
setInnerHTML(arrowElement, arrow === 'round' ? ROUND_ARROW_INNER_HTML : arrow);
}
} else {
arrow.className = ARROW_CLASS;
}
return arrow;
return arrowElement;
}

@@ -538,3 +550,5 @@ /**

theme.split(' ').forEach(function (name) {
tooltip.classList[action](name + '-theme');
if (name) {
tooltip.classList[action](name + "-theme");
}
});

@@ -549,5 +563,8 @@ }

popper.className = POPPER_CLASS;
popper.style.position = 'absolute';
popper.style.top = '0';
popper.style.left = '0';
var tooltip = div();
tooltip.className = TOOLTIP_CLASS;
tooltip.id = "tippy-".concat(id);
tooltip.id = "tippy-" + id;
tooltip.setAttribute('data-state', 'hidden');

@@ -566,3 +583,3 @@ tooltip.setAttribute('tabindex', '-1');

tooltip.setAttribute('data-arrow', '');
tooltip.appendChild(createArrowElement(props.arrowType));
tooltip.appendChild(createArrowElement(props.arrow));
}

@@ -597,3 +614,2 @@

popper.style.zIndex = '' + nextProps.zIndex;
tooltip.setAttribute('data-size', nextProps.size);
tooltip.setAttribute('data-animation', nextProps.animation);

@@ -623,12 +639,13 @@ tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');

if (!prevProps.arrow && nextProps.arrow) {
tooltip.appendChild(createArrowElement(nextProps.arrowType));
// false to true
tooltip.appendChild(createArrowElement(nextProps.arrow));
tooltip.setAttribute('data-arrow', '');
} else if (prevProps.arrow && !nextProps.arrow) {
// true to false
tooltip.removeChild(arrow);
tooltip.removeAttribute('data-arrow');
} // arrowType
if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {
tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);
} else if (prevProps.arrow !== nextProps.arrow) {
// true to 'round' or vice-versa
tooltip.removeChild(arrow);
tooltip.appendChild(createArrowElement(nextProps.arrow));
} // interactive

@@ -687,3 +704,3 @@

/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] ".concat(message));
console.warn("[tippy.js WARNING] " + message);
}

@@ -697,3 +714,3 @@ }

if (condition) {
throw new Error("[tippy.js ERROR] ".concat(message));
throw new Error("[tippy.js ERROR] " + message);
}

@@ -705,17 +722,26 @@ }

function validateProps() {
var partialProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetprop = prop === 'target';
var didPassA11yprop = prop === 'a11y';
var didPassOtherUnknownprop = !hasOwnProperty(defaultProps, prop) && prop !== 'target' && prop !== 'a11y';
var didPassOldThemeName = prop === 'theme' && includes(['dark', 'light', 'light-border', 'translucent'], value);
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
warnWhen(didPassTargetprop, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yprop, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassOtherUnknownprop, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassOldThemeName, 'The default theme `' + value + '` in v5 must include the prefix `tippy`, i.e. ' + '"tippy-' + value + '" instead of "' + value + '".');
warnWhen(didPassGoogleTheme, 'The default theme `google` was renamed to ' + '`tippy-material` in v5.');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');

@@ -734,3 +760,23 @@ });

}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor

@@ -755,10 +801,9 @@

var lastTriggerEventType;
var lastMouseMoveEvent;
var showTimeout;
var hideTimeout;
var animationFrame;
var isScheduledToShow = false;
var currentPlacement = props.placement;
var scheduleHideAnimationFrame;
var isBeingDestroyed = false;
var hasMountCallbackRun = false;
var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -768,3 +813,2 @@ var currentTransitionEndListener;

var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
var currentComputedPadding;
/* ======================= 🔑 Public members 🔑 ======================= */

@@ -780,2 +824,6 @@

var state = {
// The current real placement (`data-placement` attribute)
currentPlacement: props.placement,
// Does the instance have a pending timeout for show()?
isScheduledToShow: false,
// Is the instance currently enabled?

@@ -819,2 +867,6 @@ isEnabled: true,

});
Object.defineProperty(instance, '__extraProps__', {
value: {},
enumerable: false
});
}

@@ -832,3 +884,3 @@ /* ==================== Initial instance mutations =================== */

if (props.showOnInit) {
if (props.showOnCreate) {
scheduleShow();

@@ -854,13 +906,18 @@ } // Prevent a tippy with a delay from hiding if the cursor left then returned

function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(currentPlacement));
return includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(currentPlacement));
return includes(['bottom', 'right'], getBasePlacement(instance.state.currentPlacement));
}
function getIsInFollowCursorMode() {
return instance.props.followCursor && lastTriggerEventType !== 'focus';
function getNormalizedTouchSettings() {
var touch = instance.props.touch;
return Array.isArray(touch) ? touch : [touch, 0];
}
function getIsCustomTouchBehavior() {
return getNormalizedTouchSettings()[0] === 'hold';
}
function getTransitionableElements() {

@@ -870,4 +927,4 @@ return [tooltip, content, instance.popperChildren.backdrop];

function removeFollowCursorListener() {
document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);
function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}

@@ -883,6 +940,2 @@

function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}
function onDocumentMouseDown(event) {

@@ -981,4 +1034,7 @@ // Clicked on interactive popper

function on(eventType, handler) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
function on(eventType, handler, options) {
if (options === void 0) {
options = false;
}
getEventListenersTarget().addEventListener(eventType, handler, options);

@@ -993,3 +1049,3 @@ listeners.push({

function addTriggersToEventListenersTarget() {
if (instance.props.touchHold) {
if (getIsCustomTouchBehavior()) {
on('touchstart', onTrigger, PASSIVE);

@@ -1037,52 +1093,2 @@ on('touchend', onMouseLeave, PASSIVE);

function positionVirtualReferenceNearCursor(event) {
var _lastMouseMoveEvent = lastMouseMoveEvent = event,
x = _lastMouseMoveEvent.clientX,
y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called
if (!currentComputedPadding) {
return;
} // If the instance is interactive, avoid updating the position unless it's
// over the reference element
var isCursorOverReference = closestCallback(event.target, function (el) {
return el === reference;
});
var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var isHorizontal = followCursor === 'horizontal';
var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing
var fakeSize = 100;
var halfFakeSize = fakeSize / 2;
var isVerticalPlacement = getIsVerticalPlacement();
var verticalIncrease = isVerticalPlacement ? 0 : halfFakeSize;
var horizontalIncrease = isVerticalPlacement ? halfFakeSize : 0;
if (isCursorOverReference || !instance.props.interactive) {
instance.popperInstance.reference = {
// These `clientWidth` values don't get used by Popper.js if they are 0
clientWidth: 0,
clientHeight: 0,
getBoundingClientRect: function getBoundingClientRect() {
return {
width: isVerticalPlacement ? fakeSize : 0,
height: isVerticalPlacement ? 0 : fakeSize,
top: (isHorizontal ? rect.top : y) - verticalIncrease,
bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
left: (isVertical ? rect.left : x) - horizontalIncrease,
right: (isVertical ? rect.right : x) + horizontalIncrease
};
}
};
instance.popperInstance.scheduleUpdate();
}
if (currentInput.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeFollowCursorListener();
}
}
function onTrigger(event) {

@@ -1097,7 +1103,6 @@ if (didHideDueToDocumentMouseDown || !instance.state.isEnabled || isEventListenerStopped(event)) {

if (event instanceof MouseEvent) {
lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands
// If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
mouseMoveListeners.forEach(function (listener) {

@@ -1113,3 +1118,15 @@ return listener(event);

} else {
scheduleShow(event);
var _getNormalizedTouchSe = getNormalizedTouchSettings(),
value = _getNormalizedTouchSe[0],
duration = _getNormalizedTouchSe[1];
if (currentInput.isTouch && value === 'hold' && duration) {
// We can hijack the show timeout here, it will be cleared by
// `scheduleHide()` when necessary
showTimeout = setTimeout(function () {
scheduleShow(event);
}, duration);
} else {
scheduleShow(event);
}
}

@@ -1127,3 +1144,3 @@ }

if (isCursorOutsideInteractiveBorder(getBasePlacement(currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
if (isCursorOutsideInteractiveBorder(getBasePlacement(instance.state.currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
cleanupInteractiveMouseListeners();

@@ -1165,14 +1182,19 @@ scheduleHide(event);

var isTouchEvent = includes(event.type, 'touch');
var touchHold = instance.props.touchHold;
return supportsTouch && currentInput.isTouch && touchHold && !isTouchEvent || currentInput.isTouch && !touchHold && isTouchEvent;
var isCustomTouch = getIsCustomTouchBehavior();
return supportsTouch && currentInput.isTouch && isCustomTouch && !isTouchEvent || currentInput.isTouch && !isCustomTouch && isTouchEvent;
}
function createPopperInstance() {
var popperOptions = instance.props.popperOptions;
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {
var previousPlacement = currentPlacement;
currentPlacement = data.placement;
instance.state.currentPlacement = data.placement;

@@ -1185,7 +1207,6 @@ if (instance.props.flip && !instance.props.flipOnUpdate) {

setFlipModifierEnabled(instance.popperInstance.modifiers, false);
} // Apply Popper's `x-*` attributes to the tooltip with `data-*`
}
tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', currentPlacement);
if (data.attributes['x-out-of-boundaries'] !== false) {

@@ -1198,8 +1219,8 @@ tooltip.setAttribute('data-out-of-boundaries', '');

var BasePlacement = getBasePlacement(currentPlacement);
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = "".concat((getIsOppositePlacement() ? 1 : -1) * instance.props.distance, "px");
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';

@@ -1214,12 +1235,6 @@

computedPadding[BasePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[BasePlacement] || 0) + instance.props.distance;
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
currentComputedPadding = computedPadding; // The `distance` offset needs to be re-considered by Popper.js if the
// placement changed
if (currentPlacement !== previousPlacement) {
instance.popperInstance.update();
}
}

@@ -1229,3 +1244,3 @@

eventsEnabled: false,
placement: instance.props.placement
placement: normalizedPlacement
}, popperOptions, {

@@ -1235,3 +1250,3 @@ modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {

boundariesElement: instance.props.boundary,
padding: PADDING
padding: PREVENT_OVERFLOW_PADDING
}, preventOverflowModifier),

@@ -1246,3 +1261,3 @@ arrow: _extends({

// we need to account for its distance
padding: instance.props.distance + PADDING,
padding: instance.props.distance + PREVENT_OVERFLOW_PADDING,
behavior: instance.props.flipBehavior

@@ -1256,15 +1271,9 @@ }, getModifier(popperOptions, 'flip')),

applyMutations(data);
preserveInvocation(popperOptions && popperOptions.onCreate, config.onCreate, [data]);
runMountCallback();
if (popperOptions && popperOptions.onCreate) {
popperOptions.onCreate(data);
}
},
onUpdate: function onUpdate(data) {
applyMutations(data);
preserveInvocation(popperOptions && popperOptions.onUpdate, config.onUpdate, [data]);
runMountCallback();
if (popperOptions && popperOptions.onUpdate) {
popperOptions.onUpdate(data);
}
}

@@ -1285,41 +1294,23 @@ });

function mount() {
// The mounting callback (`currentMountCallback`) is only run due to a
// popperInstance update/create
hasMountCallbackRun = false;
var isInFollowCursorMode = getIsInFollowCursorMode();
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]); // The popper element needs to exist on the DOM before its position can be
// updated as Popper.js needs to read its dimensions
if (!instance.popperInstance) {
createPopperInstance();
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
}
if (!isInFollowCursorMode) {
instance.popperInstance.enableEventListeners();
}
} else {
if (!isInFollowCursorMode) {
instance.popperInstance.scheduleUpdate();
instance.popperInstance.enableEventListeners();
}
if (instance.popperInstance) {
setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);
} // If the instance previously had followCursor behavior, it will be
// positioned incorrectly if triggered by `focus` afterwards.
// Update the reference back to the real DOM element
instance.popperInstance.enableEventListeners(); // Mounting callback invoked in `onUpdate`
instance.popperInstance.reference = reference;
if (isInFollowCursorMode && lastMouseMoveEvent) {
// TODO: If the tippy also has `updateDuration`, it transitions from
// the initial placement to the cursor point
requestAnimationFrame(function () {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
});
instance.popperInstance.scheduleUpdate();
} else {
// Mounting callback invoked in `onCreate`
createPopperInstance();
instance.popperInstance.enableEventListeners();
}
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]);
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
instance.props.onMount(instance);
instance.state.isMounted = true;
}
}

@@ -1329,3 +1320,8 @@

instance.clearDelayTimeouts();
instance.state.isScheduledToShow = true;
if (!instance.popperInstance) {
createPopperInstance();
}
if (event) {

@@ -1335,23 +1331,4 @@ instance.props.onTrigger(instance, event);

if (instance.state.isVisible) {
return;
}
isScheduledToShow = true;
if (instance.props.wait) {
return instance.props.wait(instance, event);
} // If the tooltip has a delay, we need to be listening to the mousemove as
// soon as the trigger event is fired, so that it's in the correct position
// upon mount.
// Edge case: if the tooltip is still mounted, but then scheduleShow() is
// called, it causes a jump.
if (getIsInFollowCursorMode() && !instance.state.isMounted) {
if (!instance.popperInstance) {
createPopperInstance();
}
document.addEventListener('mousemove', positionVirtualReferenceNearCursor);
}

@@ -1376,6 +1353,7 @@

if (!instance.state.isVisible) {
return removeFollowCursorListener();
removeDocumentMouseDownListener();
return;
}
isScheduledToShow = false;
instance.state.isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);

@@ -1392,3 +1370,3 @@

// late sometimes, we don't want hide() to be called.
animationFrame = requestAnimationFrame(function () {
scheduleHideAnimationFrame = requestAnimationFrame(function () {
instance.hide();

@@ -1412,3 +1390,3 @@ });

clearTimeout(hideTimeout);
cancelAnimationFrame(animationFrame);
cancelAnimationFrame(scheduleHideAnimationFrame);
}

@@ -1427,2 +1405,3 @@

validateProps(partialProps);
validateExtraPropsFunctionality(instance, partialProps);
}

@@ -1453,6 +1432,2 @@

}
if (instance.props.followCursor && lastMouseMoveEvent) {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
}
} else {

@@ -1470,6 +1445,11 @@ instance.popperInstance.update();

function show() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, defaultProps.duration[1]);
var shouldPreventPopperTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
function show(duration, shouldPreventPopperTransition) {
if (duration === void 0) {
duration = getValue(instance.props.duration, 0, defaultProps.duration[1]);
}
if (shouldPreventPopperTransition === void 0) {
shouldPreventPopperTransition = true;
}
{

@@ -1487,3 +1467,3 @@ warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');

return;
} // Standardize `disabled` behavior across browsers.
} // Normalize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.

@@ -1515,9 +1495,9 @@ // Using a wrapper element (i.e. <span>) is recommended.

if (!getIsInFollowCursorMode()) {
instance.popperInstance.update();
}
instance.popperInstance.update();
instance.props.onMount(instance);
instance.state.isMounted = true; // The content should fade in after the backdrop has mostly filled the
// tooltip element. `clip-path` is the other alternative but is not well-
// supported and is buggy on some devices.
if (instance.popperChildren.backdrop) {
instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';
}
content.style.transitionDelay = instance.popperChildren.backdrop ? Math.round(duration / 12) + "ms" : '';

@@ -1533,3 +1513,3 @@ if (instance.props.sticky) {

if (instance.props.aria) {
getEventListenersTarget().setAttribute("aria-".concat(instance.props.aria), tooltip.id);
getEventListenersTarget().setAttribute("aria-" + instance.props.aria, tooltip.id);
}

@@ -1545,4 +1525,6 @@

function hide() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, defaultProps.duration[1]);
function hide(duration) {
if (duration === void 0) {
duration = getValue(instance.props.duration, 1, defaultProps.duration[1]);
}

@@ -1552,9 +1534,7 @@ {

} // Early bail-out
// We're checking `isMounted` instead if `isVisible` so that `destroy()`'s
// instance.hide(0) call is not ignored (to unmount the tippy instantly)
var isAlreadyHidden = !instance.state.isMounted;
var isAlreadyHidden = !instance.state.isVisible && !isBeingDestroyed;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
var isDisabled = !instance.state.isEnabled && !isBeingDestroyed;

@@ -1565,3 +1545,3 @@ if (isAlreadyHidden || isDestroyed || isDisabled) {

if (instance.props.onHide(instance) === false) {
if (instance.props.onHide(instance) === false && !isBeingDestroyed) {
return;

@@ -1578,12 +1558,8 @@ }

onTransitionedOut(duration, function () {
if (!isScheduledToShow) {
removeFollowCursorListener();
}
if (instance.props.aria) {
getEventListenersTarget().removeAttribute("aria-".concat(instance.props.aria));
getEventListenersTarget().removeAttribute("aria-" + instance.props.aria);
}
instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = instance.props.placement;
instance.popperInstance.options.placement = normalizedPlacement;
popper.parentNode.removeChild(popper);

@@ -1602,6 +1578,5 @@ instance.props.onHidden(instance);

return;
} // `destroy()`'s `hide()` call should not be ignored
}
instance.enable();
isBeingDestroyed = true;
instance.hide(0);

@@ -1615,2 +1590,3 @@ removeTriggersFromEventListenersTarget();

isBeingDestroyed = false;
instance.state.isDestroyed = true;

@@ -1645,2 +1621,6 @@ }

if (instance) {
{
validateExtraPropsFunctionality(instance, optionalProps);
}
acc.push(instance);

@@ -1662,2 +1642,6 @@ }

tippy.setDefaultProps = function (partialProps) {
{
validateProps(partialProps);
}
Object.keys(partialProps).forEach(function (key) {

@@ -1673,4 +1657,4 @@ // @ts-ignore

tippy.hideAll = function () {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
tippy.hideAll = function (_temp) {
var _ref = _temp === void 0 ? {} : _temp,
excludedReferenceOrInstance = _ref.exclude,

@@ -1748,6 +1732,6 @@ duration = _ref.duration;

var head = document.head;
var firstChild = head.firstChild;
var firstStyleOrLinkTag = head.querySelector('style,link');
if (firstChild) {
head.insertBefore(style, firstChild);
if (firstStyleOrLinkTag) {
head.insertBefore(style, firstStyleOrLinkTag);
} else {

@@ -1754,0 +1738,0 @@ head.appendChild(style);

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

var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}var i="undefined"!=typeof window&&"undefined"!=typeof document,n=i?navigator.userAgent:"",o=/MSIE |Trident\//.test(n),r=/UCBrowser\//.test(n),a=i&&/iPhone|iPad|iPod/.test(navigator.platform),p={allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,theme:"tippy-dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},s=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"];function c(t){return[].slice.call(t)}function d(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var l={passive:!0},u=4,f="tippy-iOS",m="tippy-popper",y="tippy-tooltip",v="tippy-content",b="tippy-backdrop",h="tippy-arrow",g="tippy-svgArrow",w=".".concat(m),A=".".concat(y),x=".".concat(v),T=".".concat(b),E=".".concat(h),k=".".concat(g),C={isTouch:!1},I=0;function L(){C.isTouch||(C.isTouch=!0,a&&document.body.classList.add(f),window.performance&&document.addEventListener("mousemove",O))}function O(){var t=performance.now();t-I<20&&(C.isTouch=!1,document.removeEventListener("mousemove",O),a||document.body.classList.remove(f)),I=t}function D(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var z=Object.keys(p);function S(t,e){return{}.hasOwnProperty.call(t,e)}function M(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?i:n}return t}function V(t,e){return t&&t.modifiers&&t.modifiers[e]}function H(t,e){return t.indexOf(e)>-1}function N(t){return t instanceof Element}function P(t,e){return"function"==typeof t?t.apply(null,e):t}function U(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function q(){return document.createElement("div")}function B(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function F(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function _(t,i){var n=e({},i,{content:P(i.content,[t])},i.ignoreAttributes?{}:function(t){return z.reduce(function(e,i){var n=(t.getAttribute("data-tippy-".concat(i))||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e},{})}(t));return(n.arrow||r)&&(n.animateFill=!1),n}function W(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout(function(){t(n)},e)};var i}function j(t,e){t.innerHTML=N(e)?e.innerHTML:e}function X(t,e){if(N(e.content))j(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function Y(t){return{tooltip:t.querySelector(A),backdrop:t.querySelector(T),content:t.querySelector(x),arrow:t.querySelector(E)||t.querySelector(k)}}function R(t){t.setAttribute("data-inertia","")}function J(t){var e=q();return"sharp"!==t?(e.className=g,j(e,"round"===t?'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>':t)):e.className=h,e}function G(t){var e=q();return e.className=b,e.setAttribute("data-state",t?"visible":"hidden"),e}function K(t){t.setAttribute("data-interactive","")}function Q(t,e,i){var n=r&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](n,i)}function Z(t){return t.split("-")[0]}function $(t,e,i){i.split(" ").forEach(function(i){t.classList[e](i+"-theme")})}function tt(t,e){var i=q();i.className=m;var n=q();n.className=y,n.id="tippy-".concat(t),n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1"),$(n,"add",e.theme);var o=q();return o.className=v,o.setAttribute("data-state","hidden"),e.interactive&&K(n),e.arrow&&(n.setAttribute("data-arrow",""),n.appendChild(J(e.arrowType))),e.animateFill&&(n.appendChild(G(!1)),n.setAttribute("data-animatefill","")),e.inertia&&R(n),X(o,e),n.appendChild(o),i.appendChild(n),et(i,e,e,!1),i}function et(t,e,i,n){var o=Y(t),r=o.tooltip,a=o.content,p=o.backdrop,s=o.arrow;t.style.zIndex=""+i.zIndex,r.setAttribute("data-size",i.size),r.setAttribute("data-animation",i.animation),r.style.maxWidth=i.maxWidth+("number"==typeof i.maxWidth?"px":""),i.role?r.setAttribute("role",i.role):r.removeAttribute("role"),e.content!==i.content&&X(a,i),!e.animateFill&&i.animateFill?(r.appendChild(G(n)),r.setAttribute("data-animatefill","")):e.animateFill&&!i.animateFill&&(r.removeChild(p),r.removeAttribute("data-animatefill")),!e.arrow&&i.arrow?(r.appendChild(J(i.arrowType)),r.setAttribute("data-arrow","")):e.arrow&&!i.arrow&&(r.removeChild(s),r.removeAttribute("data-arrow")),e.arrow&&i.arrow&&e.arrowType!==i.arrowType&&r.replaceChild(J(i.arrowType),s),!e.interactive&&i.interactive?K(r):e.interactive&&!i.interactive&&function(t){t.removeAttribute("data-interactive")}(r),!e.inertia&&i.inertia?R(r):e.inertia&&!i.inertia&&function(t){t.removeAttribute("data-inertia")}(r),e.theme!==i.theme&&($(r,"remove",e.theme),$(r,"add",i.theme))}var it=1,nt=[];function ot(i,n){var r,a,c,f,m,y=_(i,n);if(!y.multiple&&i._tippy)return null;var v,b,h,g=!1,w=y.placement,A=!1,x=!1,T=[],E=W(dt,y.interactiveDebounce),k=it++,I=tt(k,y),L=Y(I),O=L.tooltip,D=L.content,z={id:k,reference:i,popper:I,popperChildren:L,popperInstance:null,props:y,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:function(){clearTimeout(c),clearTimeout(f),cancelAnimationFrame(m)},setProps:function(t){if(z.state.isDestroyed)return;pt();var n=z.props,o=_(i,e({},z.props,t,{ignoreAttributes:!0}));o.ignoreAttributes=S(t,"ignoreAttributes")?t.ignoreAttributes||!1:n.ignoreAttributes,z.props=o,at(),R(),E=W(dt,o.interactiveDebounce),et(I,n,o,z.state.isVisible),z.popperChildren=Y(I),z.popperInstance&&(s.some(function(e){return S(t,e)&&t[e]!==n[e]})?(z.popperInstance.destroy(),mt(),z.state.isVisible&&z.popperInstance.enableEventListeners(),z.props.followCursor&&a&&st(a)):z.popperInstance.update())},setContent:function(t){z.setProps({content:t})},show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M(z.props.duration,0,p.duration[1]),e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=z.state.isVisible,r=z.state.isDestroyed,s=!z.state.isEnabled,c=C.isTouch&&!z.props.touch;if(n||r||s||c)return;if(J().hasAttribute("disabled"))return;if(!1===z.props.onShow(z))return;K(),I.style.visibility="visible",z.state.isVisible=!0;var d=j();B(e?d.concat(I):d,0),v=function(){z.state.isVisible&&(q()||z.popperInstance.update(),z.popperChildren.backdrop&&(z.popperChildren.content.style.transitionDelay=Math.round(t/12)+"ms"),z.props.sticky&&function(){B([I],o?0:z.props.updateDuration),function t(){z.popperInstance.scheduleUpdate();z.state.isMounted?requestAnimationFrame(t):B([I],0)}()}(),B([I],z.props.updateDuration),B(d,t),F(d,"visible"),function(t,e){ot(t,e)}(t,function(){z.props.aria&&J().setAttribute("aria-".concat(z.props.aria),O.id),z.props.onShown(z),z.state.isShown=!0}))},function(){A=!1;var t=q();z.popperInstance?(t||(z.popperInstance.scheduleUpdate(),z.popperInstance.enableEventListeners()),U(z.popperInstance.modifiers,z.props.flip)):(mt(),t||z.popperInstance.enableEventListeners());z.popperInstance.reference=i,t&&a&&requestAnimationFrame(function(){st(a)});var e=z.props.appendTo,n="parent"===e?i.parentNode:P(e,[i]);n.contains(I)||(n.appendChild(I),z.props.onMount(z),z.state.isMounted=!0)}()},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M(z.props.duration,1,p.duration[1]),e=!z.state.isMounted,i=z.state.isDestroyed,n=!z.state.isEnabled;if(e||i||n)return;if(!1===z.props.onHide(z))return;$(),I.style.visibility="hidden",z.state.isVisible=!1,z.state.isShown=!1;var o=j();B(o,t),F(o,"hidden"),function(t,e){ot(t,function(){!z.state.isVisible&&I.parentNode&&I.parentNode.contains(I)&&e()})}(t,function(){g||X(),z.props.aria&&J().removeAttribute("aria-".concat(z.props.aria)),z.popperInstance.disableEventListeners(),z.popperInstance.options.placement=z.props.placement,I.parentNode.removeChild(I),z.props.onHidden(z),z.state.isMounted=!1})},enable:function(){z.state.isEnabled=!0},disable:function(){z.state.isEnabled=!1},destroy:function(){if(z.state.isDestroyed)return;z.enable(),z.hide(0),pt(),delete i._tippy,z.popperInstance&&z.popperInstance.destroy();z.state.isDestroyed=!0}};return i._tippy=z,I._tippy=z,at(),y.lazy||mt(),y.showOnInit&&vt(),I.addEventListener("mouseenter",function(){z.props.interactive&&z.state.isVisible&&"mouseenter"===r&&z.clearDelayTimeouts()}),I.addEventListener("mouseleave",function(){z.props.interactive&&"mouseenter"===r&&document.addEventListener("mousemove",E)}),y.onCreate(z),z;function N(){return H(["top","bottom"],Z(w))}function q(){return z.props.followCursor&&"focus"!==r}function j(){return[O,D,z.popperChildren.backdrop]}function X(){document.removeEventListener("mousemove",st)}function R(){document.body.removeEventListener("mouseleave",bt),document.removeEventListener("mousemove",E),nt=nt.filter(function(t){return t!==E})}function J(){return z.props.triggerTarget||i}function G(t){if(!z.props.interactive||!I.contains(t.target)){if(J().contains(t.target)){if(C.isTouch)return;if(z.state.isVisible&&H(z.props.trigger,"click"))return}!0===z.props.hideOnClick&&(z.clearDelayTimeouts(),z.hide(),x=!0,setTimeout(function(){x=!1}),z.state.isMounted||$())}}function K(){document.addEventListener("mousedown",G,!0)}function $(){document.removeEventListener("mousedown",G,!0)}function ot(t,e){function i(t){t.target===O&&(Q(O,"remove",i),e())}if(0===t)return e();Q(O,"remove",b),Q(O,"add",i),b=i}function rt(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];J().addEventListener(t,e,i),T.push({eventType:t,handler:e,options:i})}function at(){z.props.touchHold&&(rt("touchstart",ct,l),rt("touchend",lt,l)),H(z.props.trigger,"click")||rt("click",function(){C.isTouch||!0!==z.props.hideOnClick||z.hide()}),z.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(rt(t,ct),t){case"mouseenter":rt("mouseleave",lt);break;case"focus":rt(o?"focusout":"blur",ut)}})}function pt(){T.forEach(function(t){var e=t.eventType,i=t.handler,n=t.options;J().removeEventListener(e,i,n)}),T=[]}function st(t){var e=a=t,n=e.clientX,o=e.clientY;if(h){var r=d(t.target,function(t){return t===i}),p=i.getBoundingClientRect(),s=z.props.followCursor,c="horizontal"===s,l="vertical"===s,u=N(),f=u?0:50,m=u?50:0;!r&&z.props.interactive||(z.popperInstance.reference={clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:u?100:0,height:u?0:100,top:(c?p.top:o)-f,bottom:(c?p.bottom:o)+f,left:(l?p.left:n)-m,right:(l?p.right:n)+m}}},z.popperInstance.scheduleUpdate()),(C.isTouch||"initial"===s&&z.state.isVisible)&&X()}}function ct(t){x||!z.state.isEnabled||ft(t)||(z.state.isVisible||(r=t.type,t instanceof MouseEvent&&(a=t,nt.forEach(function(e){return e(t)}))),"click"===t.type&&!1!==z.props.hideOnClick&&z.state.isVisible?bt(t):vt(t))}function dt(t){d(t.target,function(t){return t===i||t===I})||function(t,e,i,n){if(!t)return!0;var o=i.clientX,r=i.clientY,a=n.interactiveBorder,p=n.distance,s=e.top-r>("top"===t?a+p:a),c=r-e.bottom>("bottom"===t?a+p:a),d=e.left-o>("left"===t?a+p:a),l=o-e.right>("right"===t?a+p:a);return s||c||d||l}(Z(w),I.getBoundingClientRect(),t,z.props)&&(R(),bt(t))}function lt(t){if(!ft(t))return z.props.interactive?(document.body.addEventListener("mouseleave",bt),document.addEventListener("mousemove",E),void nt.push(E)):void bt(t)}function ut(t){t.target===J()&&(z.props.interactive&&t.relatedTarget&&I.contains(t.relatedTarget)||bt(t))}function ft(t){var e="ontouchstart"in window,i=H(t.type,"touch"),n=z.props.touchHold;return e&&C.isTouch&&n&&!i||C.isTouch&&!n&&i}function mt(){var n=z.props.popperOptions,o=z.popperChildren.arrow,r=V(n,"preventOverflow");function a(t){var i=w;w=t.placement,z.props.flip&&!z.props.flipOnUpdate&&(t.flipped&&(z.popperInstance.options.placement=t.placement),U(z.popperInstance.modifiers,!1)),O.setAttribute("data-placement",w),!1!==t.attributes["x-out-of-boundaries"]?O.setAttribute("data-out-of-boundaries",""):O.removeAttribute("data-out-of-boundaries");var n=Z(w),o=O.style;o.top="0",o.left="0",o[N()?"top":"left"]="".concat((H(["bottom","right"],Z(w))?1:-1)*z.props.distance,"px");var a=r&&void 0!==r.padding?r.padding:u,p="number"==typeof a,s=e({top:p?a:a.top,bottom:p?a:a.bottom,left:p?a:a.left,right:p?a:a.right},!p&&a);s[n]=p?a+z.props.distance:(a[n]||0)+z.props.distance,z.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=s,h=s,w!==i&&z.popperInstance.update()}var p=e({eventsEnabled:!1,placement:z.props.placement},n,{modifiers:e({},n?n.modifiers:{},{preventOverflow:e({boundariesElement:z.props.boundary,padding:u},r),arrow:e({element:o,enabled:!!o},V(n,"arrow")),flip:e({enabled:z.props.flip,padding:z.props.distance+u,behavior:z.props.flipBehavior},V(n,"flip")),offset:e({offset:z.props.offset},V(n,"offset"))}),onCreate:function(t){a(t),yt(),n&&n.onCreate&&n.onCreate(t)},onUpdate:function(t){a(t),yt(),n&&n.onUpdate&&n.onUpdate(t)}});z.popperInstance=new t(i,I,p)}function yt(){!A&&v&&(A=!0,function(t){t.offsetHeight}(I),v())}function vt(t){if(z.clearDelayTimeouts(),t&&z.props.onTrigger(z,t),!z.state.isVisible){if(g=!0,z.props.wait)return z.props.wait(z,t);q()&&!z.state.isMounted&&(z.popperInstance||mt(),document.addEventListener("mousemove",st)),K();var e=M(z.props.delay,0,p.delay);e?c=setTimeout(function(){z.show()},e):z.show()}}function bt(t){if(z.clearDelayTimeouts(),z.props.onUntrigger(z,t),!z.state.isVisible)return X();g=!1;var e=M(z.props.delay,1,p.delay);e?f=setTimeout(function(){z.state.isVisible&&z.hide()},e):m=requestAnimationFrame(function(){z.hide()})}}function rt(t,i){document.addEventListener("touchstart",L,l),window.addEventListener("blur",D);var n=e({},p,i),o=function(t){if(N(t))return[t];if(t instanceof NodeList)return c(t);if(Array.isArray(t))return t;try{return c(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var i=e&&ot(e,n);return i&&t.push(i),t},[]);return N(t)?o[0]:o}return rt.version="5.0.0-alpha.1",rt.defaultProps=p,rt.currentInput=C,rt.setDefaultProps=function(t){Object.keys(t).forEach(function(e){p[e]=t[e]})},rt.hideAll=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.exclude,i=t.duration;c(document.querySelectorAll(w)).forEach(function(t){var n,o=t._tippy;if(o){var r=!1;e&&(r=(n=e)&&n._tippy&&!n.classList.contains(m)?o.reference===e:t===e.popper),r||o.hide(i)}})},i&&setTimeout(function(){c(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&rt(t,{content:e})})}),function(t){if(i){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,o=n.firstChild;o?n.insertBefore(e,o):n.appendChild(e)}}('.tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-tooltip[data-animation=shift-away][data-placement^=top][data-state=hidden]{transform:translateY(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=bottom][data-state=hidden]{transform:translateY(-10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=left][data-state=hidden]{transform:translateX(10px)}.tippy-tooltip[data-animation=shift-away][data-placement^=right][data-state=hidden]{transform:translateX(-10px)}.tippy-tooltip[data-animation=shift-away][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;text-align:center;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-backdrop{transform-origin:0 25%;border-radius:40% 40% 0 0}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-55%)}.tippy-tooltip[data-placement^=top] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%,-45%)}.tippy-tooltip[data-placement^=top] .tippy-svgArrow{transform-origin:50% 0;margin:0 3px;bottom:-7px;bottom:-6.5px}.tippy-tooltip[data-placement^=top] .tippy-svgArrow svg{transform:rotate(180deg)}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop{transform-origin:0 -50%;border-radius:0 0 30% 30%}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-45%)}.tippy-tooltip[data-placement^=bottom] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-50%)}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow{transform-origin:50% 7px;margin:0 3px;top:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-svgArrow svg{transform:rotate(0)}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-backdrop{transform-origin:50% 0;border-radius:50% 0 0 50%}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-75%,-50%)}.tippy-tooltip[data-placement^=left] .tippy-svgArrow{transform-origin:33.33333333% 50%;margin:3px 0;right:-12px}.tippy-tooltip[data-placement^=left] .tippy-svgArrow svg{transform:rotate(90deg)}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-backdrop{transform-origin:-50% 0;border-radius:0 50% 50% 0}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=visible]{transform:scale(1) translate(-50%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-backdrop[data-state=hidden]{transform:scale(.2) translate(-25%,-50%)}.tippy-tooltip[data-placement^=right] .tippy-svgArrow{transform-origin:66.66666666% 50%;margin:3px 0;left:-12px}.tippy-tooltip[data-placement^=right] .tippy-svgArrow svg{transform:rotate(-90deg)}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] .tippy-svgArrow path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid}.tippy-arrow,.tippy-svgArrow{position:absolute}.tippy-arrow[data-state=hidden],.tippy-svgArrow[data-state=hidden]{opacity:0}.tippy-svgArrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-svgArrow svg{position:absolute;left:0}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop[data-state=hidden]{opacity:0}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-content{padding:.3125rem .5625rem}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}'),rt}(Popper);
var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=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}).apply(this,arguments)}var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),p={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},s=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",h="tippy-backdrop",b="tippy-arrow",y="tippy-svg-arrow",w="."+f,g="."+m,A="."+v,E="."+h,T="."+b,x="."+y,C={isTouch:!1},L=0;function I(){C.isTouch||(C.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",O))}function O(){var t=performance.now();t-L<20&&(C.isTouch=!1,document.removeEventListener("mousemove",O),a||document.body.classList.remove(l)),L=t}function S(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var k=Object.keys(p);function D(t,e){return{}.hasOwnProperty.call(t,e)}function P(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function M(t,e){return t&&t.modifiers&&t.modifiers[e]}function V(t){return t instanceof Element}function N(t,e){return"function"==typeof t?t.apply(null,e):t}function q(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function F(){return document.createElement("div")}function H(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function U(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function z(t,n){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t){return k.reduce(function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function B(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function _(t,e,n){t&&t!==e&&t.apply(null,n)}function j(t){return[].slice.call(t)}function W(t,e){return t.indexOf(e)>-1}function J(t,e){t.innerHTML=V(e)?e.innerHTML:e}function R(t,e){if(V(e.content))J(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(g),backdrop:t.querySelector(E),content:t.querySelector(A),arrow:t.querySelector(T)||t.querySelector(x)}}function Y(t){t.setAttribute("data-inertia","")}function G(t){var e=F();return!0===t?e.className=b:(e.className=y,V(t)?e.appendChild(t):J(e,"round"===t?d:t)),e}function K(t){var e=F();return e.className=h,e.setAttribute("data-state",t?"visible":"hidden"),e}function Q(t){t.setAttribute("data-interactive","")}function Z(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function $(t){return t.split("-")[0]}function tt(t,e,n){n.split(" ").forEach(function(n){n&&t.classList[e](n+"-theme")})}function et(t,e){var n=F();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=F();i.className=m,i.id="tippy-"+t,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),tt(i,"add",e.theme);var r=F();return r.className=v,r.setAttribute("data-state","hidden"),e.interactive&&Q(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(e.arrow))),e.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),R(r,e),i.appendChild(r),n.appendChild(i),nt(n,e,e,!1),n}function nt(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,p=r.backdrop,s=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&R(a,n),!e.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(p),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(s),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(s),o.appendChild(G(n.arrow))),!e.interactive&&n.interactive?Q(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(tt(o,"remove",e.theme),tt(o,"add",n.theme))}var it=1,rt=[];function ot(n,i){var o,a,d,l,f=z(n,i);if(!f.multiple&&n._tippy)return null;var m,v,h,b=!1,y=!1,w=!1,g=[],A=B(pt,f.interactiveDebounce),E=it++,T=et(E,f),x=X(T),L=x.tooltip,I=x.content,O={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},S={id:E,reference:n,popper:T,popperChildren:x,popperInstance:null,props:f,state:O,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(t){if(S.state.isDestroyed)return;ot();var i=S.props,r=z(n,e({},S.props,t,{ignoreAttributes:!0}));r.ignoreAttributes=D(t,"ignoreAttributes")?t.ignoreAttributes||!1:i.ignoreAttributes,S.props=r,tt(),J(),A=B(pt,r.interactiveDebounce),nt(T,i,r,S.state.isVisible),S.popperChildren=X(T),S.popperInstance&&(s.some(function(e){return D(t,e)&&t[e]!==i[e]})?(S.popperInstance.destroy(),dt(),S.state.isVisible&&S.popperInstance.enableEventListeners()):S.popperInstance.update())},setContent:function(t){S.setProps({content:t})},show:function(t,e){void 0===t&&(t=P(S.props.duration,0,p.duration[1]));void 0===e&&(e=!0);var i=S.state.isVisible,o=S.state.isDestroyed,a=!S.state.isEnabled,s=C.isTouch&&!S.props.touch;if(i||o||a||s)return;if(j().hasAttribute("disabled"))return;if(!1===S.props.onShow(S))return;Y(),T.style.visibility="visible",S.state.isVisible=!0;var u=F();H(e?u.concat(T):u,0),v=function(){S.state.isVisible&&(S.popperInstance.update(),S.props.onMount(S),S.state.isMounted=!0,I.style.transitionDelay=S.popperChildren.backdrop?Math.round(t/12)+"ms":"",S.props.sticky&&function(){H([T],r?0:S.props.updateDuration),function t(){S.popperInstance.scheduleUpdate();S.state.isMounted?requestAnimationFrame(t):H([T],0)}()}(),H([T],S.props.updateDuration),H(u,t),U(u,"visible"),function(t,e){K(t,e)}(t,function(){S.props.aria&&j().setAttribute("aria-"+S.props.aria,L.id),S.props.onShown(S),S.state.isShown=!0}))},function(){y=!1;var t=S.props.appendTo,e="parent"===t?n.parentNode:N(t,[n]);e.contains(T)||e.appendChild(T);S.popperInstance?(q(S.popperInstance.modifiers,S.props.flip),S.popperInstance.enableEventListeners(),S.popperInstance.scheduleUpdate()):(dt(),S.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=P(S.props.duration,1,p.duration[1]));var e=!S.state.isVisible&&!b,n=S.state.isDestroyed,i=!S.state.isEnabled&&!b;if(e||n||i)return;if(!1===S.props.onHide(S)&&!b)return;G(),T.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1;var r=F();H(r,t),U(r,"hidden"),function(t,e){K(t,function(){!S.state.isVisible&&T.parentNode&&T.parentNode.contains(T)&&e()})}(t,function(){S.props.aria&&j().removeAttribute("aria-"+S.props.aria),S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=m,T.parentNode.removeChild(T),S.props.onHidden(S),S.state.isMounted=!1})},enable:function(){S.state.isEnabled=!0},disable:function(){S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;b=!0,S.hide(0),ot(),delete n._tippy,S.popperInstance&&S.popperInstance.destroy();b=!1,S.state.isDestroyed=!0}};return n._tippy=S,T._tippy=S,tt(),f.lazy||dt(),f.showOnCreate&&ft(),T.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&"mouseenter"===o&&S.clearDelayTimeouts()}),T.addEventListener("mouseleave",function(){S.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",A)}),f.onCreate(S),S;function k(){var t=S.props.touch;return Array.isArray(t)?t:[t,0]}function V(){return"hold"===k()[0]}function F(){return[L,I,S.popperChildren.backdrop]}function j(){return S.props.triggerTarget||n}function J(){document.body.removeEventListener("mouseleave",mt),document.removeEventListener("mousemove",A),rt=rt.filter(function(t){return t!==A})}function R(t){if(!S.props.interactive||!T.contains(t.target)){if(j().contains(t.target)){if(C.isTouch)return;if(S.state.isVisible&&W(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),w=!0,setTimeout(function(){w=!1}),S.state.isMounted||G())}}function Y(){document.addEventListener("mousedown",R,!0)}function G(){document.removeEventListener("mousedown",R,!0)}function K(t,e){function n(t){t.target===L&&(Z(L,"remove",n),e())}if(0===t)return e();Z(L,"remove",h),Z(L,"add",n),h=n}function Q(t,e,n){void 0===n&&(n=!1),j().addEventListener(t,e,n),g.push({eventType:t,handler:e,options:n})}function tt(){V()&&(Q("touchstart",at,u),Q("touchend",st,u)),W(S.props.trigger,"click")||Q("click",function(){C.isTouch||!0!==S.props.hideOnClick||S.hide()}),S.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(Q(t,at),t){case"mouseenter":Q("mouseleave",st);break;case"focus":Q(r?"focusout":"blur",ut)}})}function ot(){g.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;j().removeEventListener(e,n,i)}),g=[]}function at(t){if(!w&&S.state.isEnabled&&!ct(t))if(S.state.isVisible||(o=t.type,t instanceof MouseEvent&&rt.forEach(function(e){return e(t)})),"click"===t.type&&!1!==S.props.hideOnClick&&S.state.isVisible)mt(t);else{var e=k(),n=e[0],i=e[1];C.isTouch&&"hold"===n&&i?a=setTimeout(function(){ft(t)},i):ft(t)}}function pt(t){(function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null})(t.target,function(t){return t===n||t===T})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,p=i.distance,s=e.top-o>("top"===t?a+p:a),u=o-e.bottom>("bottom"===t?a+p:a),c=e.left-r>("left"===t?a+p:a),d=r-e.right>("right"===t?a+p:a);return s||u||c||d}($(S.state.currentPlacement),T.getBoundingClientRect(),t,S.props)&&(J(),mt(t))}function st(t){if(!ct(t))return S.props.interactive?(document.body.addEventListener("mouseleave",mt),document.addEventListener("mousemove",A),void rt.push(A)):void mt(t)}function ut(t){t.target===j()&&(S.props.interactive&&t.relatedTarget&&T.contains(t.relatedTarget)||mt(t))}function ct(t){var e="ontouchstart"in window,n=W(t.type,"touch"),i=V();return e&&C.isTouch&&i&&!n||C.isTouch&&!i&&n}function dt(){var i=S.props,r=i.popperOptions,o=i.placement,a=S.popperChildren.arrow,p=M(r,"preventOverflow"),s=S.state.currentPlacement.split("-")[1];function u(t){S.state.currentPlacement=t.placement,S.props.flip&&!S.props.flipOnUpdate&&(t.flipped&&(S.popperInstance.options.placement=t.placement),q(S.popperInstance.modifiers,!1)),L.setAttribute("data-placement",S.state.currentPlacement),!1!==t.attributes["x-out-of-boundaries"]?L.setAttribute("data-out-of-boundaries",""):L.removeAttribute("data-out-of-boundaries");var n=$(S.state.currentPlacement),i=L.style;i.top="0",i.left="0",i[W(["top","bottom"],$(S.state.currentPlacement))?"top":"left"]=(W(["bottom","right"],$(S.state.currentPlacement))?1:-1)*S.props.distance+"px";var r=p&&void 0!==p.padding?p.padding:c,o="number"==typeof r,a=e({top:o?r:r.top,bottom:o?r:r.bottom,left:o?r:r.left,right:o?r:r.right},!o&&r);a[n]=o?r+S.props.distance:(r[n]||0)+S.props.distance,S.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a}var d=e({eventsEnabled:!1,placement:m=S.props.followCursor&&s?o.replace(s,"start"===s?"end":"start"):o},r,{modifiers:e({},r?r.modifiers:{},{preventOverflow:e({boundariesElement:S.props.boundary,padding:c},p),arrow:e({element:a,enabled:!!a},M(r,"arrow")),flip:e({enabled:S.props.flip,padding:S.props.distance+c,behavior:S.props.flipBehavior},M(r,"flip")),offset:e({offset:S.props.offset},M(r,"offset"))}),onCreate:function(t){u(t),_(r&&r.onCreate,d.onCreate,[t]),lt()},onUpdate:function(t){u(t),_(r&&r.onUpdate,d.onUpdate,[t]),lt()}});S.popperInstance=new t(n,T,d)}function lt(){!y&&v&&(y=!0,function(t){t.offsetHeight}(T),v())}function ft(t){if(S.clearDelayTimeouts(),S.state.isScheduledToShow=!0,S.popperInstance||dt(),t&&S.props.onTrigger(S,t),S.props.wait)return S.props.wait(S,t);Y();var e=P(S.props.delay,0,p.delay);e?a=setTimeout(function(){S.show()},e):S.show()}function mt(t){if(S.clearDelayTimeouts(),S.props.onUntrigger(S,t),S.state.isVisible){S.state.isScheduledToShow=!1;var e=P(S.props.delay,1,p.delay);e?d=setTimeout(function(){S.state.isVisible&&S.hide()},e):l=requestAnimationFrame(function(){S.hide()})}else G()}}function at(t,n){document.addEventListener("touchstart",I,e({},u,{capture:!0})),window.addEventListener("blur",S);var i=e({},p,n),r=function(t){if(V(t))return[t];if(t instanceof NodeList)return j(t);if(Array.isArray(t))return t;try{return j(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&ot(e,i);return n&&t.push(n),t},[]);return V(t)?r[0]:r}return at.version="5.0.0-alpha.2",at.defaultProps=p,at.currentInput=C,at.setDefaultProps=function(t){Object.keys(t).forEach(function(e){p[e]=t[e]})},at.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,i=e.duration;j(document.querySelectorAll(w)).forEach(function(t){var e,r=t._tippy;if(r){var o=!1;n&&(o=(e=n)&&e._tippy&&!e.classList.contains(f)?r.reference===n:t===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&at(t,{content:e})})}),function(t){if(n){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var i=document.head,r=i.querySelector("style,link");r?i.insertBefore(e,r):i.appendChild(e)}}(".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100% - 8px);transition-timing-function:cubic-bezier(.165,.84,.44,1)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;line-height:1.4;background-color:#333;overflow:hidden;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top] .tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom] .tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left] .tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right] .tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-arrow]{overflow:visible}.tippy-tooltip[data-animatefill]{background-color:transparent!important}.tippy-tooltip[data-interactive]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow{border-color:transparent;border-style:solid;position:absolute}.tippy-arrow[data-state=hidden]{opacity:0}.tippy-content{padding:.3125rem .5625rem}"),at}(Popper);
//# sourceMappingURL=tippy.bundle.min.js.map
/**!
* tippy.js v5.0.0-alpha.1
* tippy.js v5.0.0-alpha.2
* (c) 2017-2019 atomiks

@@ -29,3 +29,3 @@ * MIT License

var version = "5.0.0-alpha.1";
var version = "5.0.0-alpha.2";

@@ -40,4 +40,4 @@ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';

allowHTML: true,
animateFill: true,
animation: 'shift-away',
animateFill: false,
animation: 'fade',
appendTo: function appendTo() {

@@ -47,4 +47,3 @@ return document.body;

aria: 'describedby',
arrow: false,
arrowType: 'sharp',
arrow: true,
boundary: 'scrollParent',

@@ -58,3 +57,2 @@ content: '',

flipOnUpdate: false,
followCursor: false,
hideOnClick: true,

@@ -81,8 +79,6 @@ ignoreAttributes: false,

role: 'tooltip',
showOnInit: false,
size: 'regular',
showOnCreate: false,
sticky: false,
theme: 'tippy-dark',
theme: '',
touch: true,
touchHold: false,
trigger: 'mouseenter focus',

@@ -93,4 +89,8 @@ triggerTarget: null,

zIndex: 9999
};
var extraProps = {
followCursor: false,
inlinePositioning: false
/**
* If the set() method encounters one of these, the popperInstance must be
* If the setProps() method encounters one of these, the popperInstance must be
* recreated

@@ -100,33 +100,9 @@ */

};
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'arrowType', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
var POPPER_INSTANCE_DEPENDENCIES = ['arrow', 'boundary', 'distance', 'flip', 'flipBehavior', 'flipOnUpdate', 'offset', 'placement', 'popperOptions'];
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
// Passive event listener config
var PASSIVE = {
passive: true // Popper `preventOverflow` padding
passive: true
};
var PADDING = 4; // Classes
var PREVENT_OVERFLOW_PADDING = 5;
var ROUND_ARROW_INNER_HTML = '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>';
var IOS_CLASS = "tippy-iOS";

@@ -138,11 +114,10 @@ var POPPER_CLASS = "tippy-popper";

var ARROW_CLASS = "tippy-arrow";
var SVG_ARROW_CLASS = "tippy-svgArrow"; // Selectors
var SVG_ARROW_CLASS = "tippy-svg-arrow";
var POPPER_SELECTOR = "." + POPPER_CLASS;
var TOOLTIP_SELECTOR = "." + TOOLTIP_CLASS;
var CONTENT_SELECTOR = "." + CONTENT_CLASS;
var BACKDROP_SELECTOR = "." + BACKDROP_CLASS;
var ARROW_SELECTOR = "." + ARROW_CLASS;
var SVG_ARROW_SELECTOR = "." + SVG_ARROW_CLASS;
var POPPER_SELECTOR = ".".concat(POPPER_CLASS);
var TOOLTIP_SELECTOR = ".".concat(TOOLTIP_CLASS);
var CONTENT_SELECTOR = ".".concat(CONTENT_CLASS);
var BACKDROP_SELECTOR = ".".concat(BACKDROP_CLASS);
var ARROW_SELECTOR = ".".concat(ARROW_CLASS);
var SVG_ARROW_SELECTOR = ".".concat(SVG_ARROW_CLASS);
var currentInput = {

@@ -215,3 +190,5 @@ isTouch: false

function bindGlobalEventListeners() {
document.addEventListener('touchstart', onDocumentTouchStart, PASSIVE);
document.addEventListener('touchstart', onDocumentTouchStart, _extends({}, PASSIVE, {
capture: true
}));
window.addEventListener('blur', onWindowBlur);

@@ -226,4 +203,4 @@ }

function getDataAttributeProps(reference) {
return keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-".concat(key)) || '').trim();
var props = keys.reduce(function (acc, key) {
var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();

@@ -246,2 +223,3 @@ if (!valueAsString) {

}, {});
return props;
}

@@ -307,9 +285,2 @@

/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Determines if the value is a real element

@@ -359,3 +330,3 @@ */

if (el) {
el.style.transitionDuration = "".concat(value, "ms");
el.style.transitionDuration = value + "ms";
}

@@ -385,2 +356,6 @@ });

if (out.animateFill) {
out.arrow = false;
}
if (out.arrow || isUCBrowser) {

@@ -412,4 +387,42 @@ out.animateFill = false;

}
/**
* Preserves the original function invocation when another function replaces it
*/
function preserveInvocation(originalFn, currentFn, args) {
if (originalFn && originalFn !== currentFn) {
originalFn.apply(null, args);
}
}
/**
* Ponyfill for Array.from - converts iterable values to an array
*/
function arrayFrom(value) {
return [].slice.call(value);
}
/**
* Works like Element.prototype.closest, but uses a callback instead
*/
function closestCallback(element, callback) {
while (element) {
if (callback(element)) {
return element;
}
element = element.parentElement;
}
return null;
}
/**
* Determines if an array or string includes a value
*/
function includes(a, b) {
return a.indexOf(b) > -1;
}
/**
* Sets the innerHTML of an element

@@ -464,19 +477,18 @@ */

function createArrowElement(arrowType) {
var arrow = div();
function createArrowElement(arrow) {
var arrowElement = div();
if (arrowType !== 'sharp') {
arrow.className = SVG_ARROW_CLASS; // Use the built-in round SVG shape
if (arrow === true) {
arrowElement.className = ARROW_CLASS;
} else {
arrowElement.className = SVG_ARROW_CLASS;
if (arrowType === 'round') {
setInnerHTML(arrow, '<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>');
if (isRealElement(arrow)) {
arrowElement.appendChild(arrow);
} else {
// Assume they're specifying their own SVG shape
setInnerHTML(arrow, arrowType);
setInnerHTML(arrowElement, arrow === 'round' ? ROUND_ARROW_INNER_HTML : arrow);
}
} else {
arrow.className = ARROW_CLASS;
}
return arrow;
return arrowElement;
}

@@ -535,3 +547,5 @@ /**

theme.split(' ').forEach(function (name) {
tooltip.classList[action](name + '-theme');
if (name) {
tooltip.classList[action](name + "-theme");
}
});

@@ -546,5 +560,8 @@ }

popper.className = POPPER_CLASS;
popper.style.position = 'absolute';
popper.style.top = '0';
popper.style.left = '0';
var tooltip = div();
tooltip.className = TOOLTIP_CLASS;
tooltip.id = "tippy-".concat(id);
tooltip.id = "tippy-" + id;
tooltip.setAttribute('data-state', 'hidden');

@@ -563,3 +580,3 @@ tooltip.setAttribute('tabindex', '-1');

tooltip.setAttribute('data-arrow', '');
tooltip.appendChild(createArrowElement(props.arrowType));
tooltip.appendChild(createArrowElement(props.arrow));
}

@@ -594,3 +611,2 @@

popper.style.zIndex = '' + nextProps.zIndex;
tooltip.setAttribute('data-size', nextProps.size);
tooltip.setAttribute('data-animation', nextProps.animation);

@@ -620,12 +636,13 @@ tooltip.style.maxWidth = nextProps.maxWidth + (typeof nextProps.maxWidth === 'number' ? 'px' : '');

if (!prevProps.arrow && nextProps.arrow) {
tooltip.appendChild(createArrowElement(nextProps.arrowType));
// false to true
tooltip.appendChild(createArrowElement(nextProps.arrow));
tooltip.setAttribute('data-arrow', '');
} else if (prevProps.arrow && !nextProps.arrow) {
// true to false
tooltip.removeChild(arrow);
tooltip.removeAttribute('data-arrow');
} // arrowType
if (prevProps.arrow && nextProps.arrow && prevProps.arrowType !== nextProps.arrowType) {
tooltip.replaceChild(createArrowElement(nextProps.arrowType), arrow);
} else if (prevProps.arrow !== nextProps.arrow) {
// true to 'round' or vice-versa
tooltip.removeChild(arrow);
tooltip.appendChild(createArrowElement(nextProps.arrow));
} // interactive

@@ -684,3 +701,3 @@

/* eslint-disable-next-line no-console */
console.warn("[tippy.js WARNING] ".concat(message));
console.warn("[tippy.js WARNING] " + message);
}

@@ -694,3 +711,3 @@ }

if (condition) {
throw new Error("[tippy.js ERROR] ".concat(message));
throw new Error("[tippy.js ERROR] " + message);
}

@@ -702,17 +719,26 @@ }

function validateProps() {
var partialProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
function validateProps(partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
Object.keys(partialProps).forEach(function (prop) {
var value = partialProps[prop];
var didPassTargetprop = prop === 'target';
var didPassA11yprop = prop === 'a11y';
var didPassOtherUnknownprop = !hasOwnProperty(defaultProps, prop) && prop !== 'target' && prop !== 'a11y';
var didPassOldThemeName = prop === 'theme' && includes(['dark', 'light', 'light-border', 'translucent'], value);
var didPassTargetProp = prop === 'target';
var didPassA11yProp = prop === 'a11y';
var didPassShowOnInitProp = prop === 'showOnInit';
var didPassArrowTypeProp = prop === 'arrowType';
var didPassTouchHoldProp = prop === 'touchHold';
var didPassSizeProp = prop === 'size';
var didPassGoogleTheme = prop === 'theme' && value === 'google';
var didSpecifyPlacementInPopperOptions = prop === 'popperOptions' && value && hasOwnProperty(value, 'placement');
warnWhen(didPassTargetprop, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yprop, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassOtherUnknownprop, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassOldThemeName, 'The default theme `' + value + '` in v5 must include the prefix `tippy`, i.e. ' + '"tippy-' + value + '" instead of "' + value + '".');
warnWhen(didPassGoogleTheme, 'The default theme `google` was renamed to ' + '`tippy-material` in v5.');
var didPassOtherUnknownProp = !hasOwnProperty(defaultProps, prop) && !didPassTargetProp && !didPassA11yProp && !didPassShowOnInitProp && !includes(Object.keys(extraProps), prop);
warnWhen(didPassTargetProp, 'The `target` prop was removed in v5 and ' + 'replaced with the `delegate()` method. Read more here: ' + 'https//atomiks.github.io/tippyjs/addons#event-delegation');
warnWhen(didPassA11yProp, 'The `a11y` prop was removed in v5. Make ' + 'sure the element you are giving a tippy to is natively ' + 'focusable, such as <button> or <input>, not <div> or <span>.');
warnWhen(didPassShowOnInitProp, 'The `showOnInit` prop was renamed to `showOnCreate` in v5.');
warnWhen(didPassArrowTypeProp, 'The `arrowType` prop was removed in v5 ' + 'in favor of overloading the `arrow` prop. Specify ' + '`arrow: "' + value + '"` instead.');
warnWhen(didPassTouchHoldProp, 'The `touchHold` prop was removed in v5 in favor of overloading the ' + '`touch` prop. Specify `touch: "hold"` instead.');
warnWhen(didPassSizeProp, 'The `size` prop was removed in v5. Instead, use a theme that ' + 'specifies `font-size` and `padding` CSS properties.');
warnWhen(didPassOtherUnknownProp, '`' + prop + '` is not a valid prop. You ' + 'may have spelled it incorrectly. View all of the valid props ' + 'here: https://atomiks.github.io/tippyjs/all-props/');
warnWhen(didPassGoogleTheme, 'The included theme `google` was renamed to `material` in v5.');
warnWhen(didSpecifyPlacementInPopperOptions, 'Specifying `placement` in `popperOptions` is not supported. Use the ' + 'base-level `placement` prop instead.');

@@ -731,3 +757,23 @@ });

}
/**
* Ensures the instance has been configured with the extra prop's functionality
* if the user is specifying it as a prop
*/
function validateExtraPropsFunctionality(instance, partialProps) {
if (partialProps === void 0) {
partialProps = {};
}
var extraProps = ['followCursor', 'inlinePositioning'];
extraProps.forEach(function (prop) {
if (hasOwnProperty(partialProps, prop) && !instance.__extraProps__[prop]) {
var didPassFollowCursor = prop === 'followCursor';
var didPassOtherExtraProp = !didPassFollowCursor;
warnWhen(didPassFollowCursor, 'The `followCursor` prop was specified, but the instance has not ' + 'been configured with followCursor functionality. In v5, ' + '`followCursor` was moved to `extra-props`. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
warnWhen(didPassOtherExtraProp, 'The `' + prop + '` prop was specified, but the instance has not been configured ' + 'with ' + prop + ' functionality. View details: ' + 'https://atomiks.github.io/tippyjs/extra-props/');
}
});
}
var idCounter = 1; // Workaround for IE11's lack of new MouseEvent constructor

@@ -752,10 +798,9 @@

var lastTriggerEventType;
var lastMouseMoveEvent;
var showTimeout;
var hideTimeout;
var animationFrame;
var isScheduledToShow = false;
var currentPlacement = props.placement;
var scheduleHideAnimationFrame;
var isBeingDestroyed = false;
var hasMountCallbackRun = false;
var didHideDueToDocumentMouseDown = false;
var normalizedPlacement;
var currentMountCallback;

@@ -765,3 +810,2 @@ var currentTransitionEndListener;

var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
var currentComputedPadding;
/* ======================= 🔑 Public members 🔑 ======================= */

@@ -777,2 +821,6 @@

var state = {
// The current real placement (`data-placement` attribute)
currentPlacement: props.placement,
// Does the instance have a pending timeout for show()?
isScheduledToShow: false,
// Is the instance currently enabled?

@@ -816,2 +864,6 @@ isEnabled: true,

});
Object.defineProperty(instance, '__extraProps__', {
value: {},
enumerable: false
});
}

@@ -829,3 +881,3 @@ /* ==================== Initial instance mutations =================== */

if (props.showOnInit) {
if (props.showOnCreate) {
scheduleShow();

@@ -851,13 +903,18 @@ } // Prevent a tippy with a delay from hiding if the cursor left then returned

function getIsVerticalPlacement() {
return includes(['top', 'bottom'], getBasePlacement(currentPlacement));
return includes(['top', 'bottom'], getBasePlacement(instance.state.currentPlacement));
}
function getIsOppositePlacement() {
return includes(['bottom', 'right'], getBasePlacement(currentPlacement));
return includes(['bottom', 'right'], getBasePlacement(instance.state.currentPlacement));
}
function getIsInFollowCursorMode() {
return instance.props.followCursor && lastTriggerEventType !== 'focus';
function getNormalizedTouchSettings() {
var touch = instance.props.touch;
return Array.isArray(touch) ? touch : [touch, 0];
}
function getIsCustomTouchBehavior() {
return getNormalizedTouchSettings()[0] === 'hold';
}
function getTransitionableElements() {

@@ -867,4 +924,4 @@ return [tooltip, content, instance.popperChildren.backdrop];

function removeFollowCursorListener() {
document.removeEventListener('mousemove', positionVirtualReferenceNearCursor);
function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}

@@ -880,6 +937,2 @@

function getEventListenersTarget() {
return instance.props.triggerTarget || reference;
}
function onDocumentMouseDown(event) {

@@ -978,4 +1031,7 @@ // Clicked on interactive popper

function on(eventType, handler) {
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
function on(eventType, handler, options) {
if (options === void 0) {
options = false;
}
getEventListenersTarget().addEventListener(eventType, handler, options);

@@ -990,3 +1046,3 @@ listeners.push({

function addTriggersToEventListenersTarget() {
if (instance.props.touchHold) {
if (getIsCustomTouchBehavior()) {
on('touchstart', onTrigger, PASSIVE);

@@ -1034,52 +1090,2 @@ on('touchend', onMouseLeave, PASSIVE);

function positionVirtualReferenceNearCursor(event) {
var _lastMouseMoveEvent = lastMouseMoveEvent = event,
x = _lastMouseMoveEvent.clientX,
y = _lastMouseMoveEvent.clientY; // Gets set once popperInstance `onCreate` has been called
if (!currentComputedPadding) {
return;
} // If the instance is interactive, avoid updating the position unless it's
// over the reference element
var isCursorOverReference = closestCallback(event.target, function (el) {
return el === reference;
});
var rect = reference.getBoundingClientRect();
var followCursor = instance.props.followCursor;
var isHorizontal = followCursor === 'horizontal';
var isVertical = followCursor === 'vertical'; // The virtual reference needs some size to prevent itself from overflowing
var fakeSize = 100;
var halfFakeSize = fakeSize / 2;
var isVerticalPlacement = getIsVerticalPlacement();
var verticalIncrease = isVerticalPlacement ? 0 : halfFakeSize;
var horizontalIncrease = isVerticalPlacement ? halfFakeSize : 0;
if (isCursorOverReference || !instance.props.interactive) {
instance.popperInstance.reference = {
// These `clientWidth` values don't get used by Popper.js if they are 0
clientWidth: 0,
clientHeight: 0,
getBoundingClientRect: function getBoundingClientRect() {
return {
width: isVerticalPlacement ? fakeSize : 0,
height: isVerticalPlacement ? 0 : fakeSize,
top: (isHorizontal ? rect.top : y) - verticalIncrease,
bottom: (isHorizontal ? rect.bottom : y) + verticalIncrease,
left: (isVertical ? rect.left : x) - horizontalIncrease,
right: (isVertical ? rect.right : x) + horizontalIncrease
};
}
};
instance.popperInstance.scheduleUpdate();
}
if (currentInput.isTouch || followCursor === 'initial' && instance.state.isVisible) {
removeFollowCursorListener();
}
}
function onTrigger(event) {

@@ -1094,7 +1100,6 @@ if (didHideDueToDocumentMouseDown || !instance.state.isEnabled || isEventListenerStopped(event)) {

if (event instanceof MouseEvent) {
lastMouseMoveEvent = event; // If scrolling, `mouseenter` events can be fired if the cursor lands
// If scrolling, `mouseenter` events can be fired if the cursor lands
// over a new target, but `mousemove` events don't get fired. This
// causes interactive tooltips to get stuck open until the cursor is
// moved
mouseMoveListeners.forEach(function (listener) {

@@ -1110,3 +1115,15 @@ return listener(event);

} else {
scheduleShow(event);
var _getNormalizedTouchSe = getNormalizedTouchSettings(),
value = _getNormalizedTouchSe[0],
duration = _getNormalizedTouchSe[1];
if (currentInput.isTouch && value === 'hold' && duration) {
// We can hijack the show timeout here, it will be cleared by
// `scheduleHide()` when necessary
showTimeout = setTimeout(function () {
scheduleShow(event);
}, duration);
} else {
scheduleShow(event);
}
}

@@ -1124,3 +1141,3 @@ }

if (isCursorOutsideInteractiveBorder(getBasePlacement(currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
if (isCursorOutsideInteractiveBorder(getBasePlacement(instance.state.currentPlacement), popper.getBoundingClientRect(), event, instance.props)) {
cleanupInteractiveMouseListeners();

@@ -1162,14 +1179,19 @@ scheduleHide(event);

var isTouchEvent = includes(event.type, 'touch');
var touchHold = instance.props.touchHold;
return supportsTouch && currentInput.isTouch && touchHold && !isTouchEvent || currentInput.isTouch && !touchHold && isTouchEvent;
var isCustomTouch = getIsCustomTouchBehavior();
return supportsTouch && currentInput.isTouch && isCustomTouch && !isTouchEvent || currentInput.isTouch && !isCustomTouch && isTouchEvent;
}
function createPopperInstance() {
var popperOptions = instance.props.popperOptions;
var _instance$props = instance.props,
popperOptions = _instance$props.popperOptions,
placement = _instance$props.placement;
var arrow = instance.popperChildren.arrow;
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow');
var preventOverflowModifier = getModifier(popperOptions, 'preventOverflow'); // Due to the virtual offsets normalization when using `followCursor`, we
// need to use the opposite placement
var shift = instance.state.currentPlacement.split('-')[1];
normalizedPlacement = instance.props.followCursor && shift ? placement.replace(shift, shift === 'start' ? 'end' : 'start') : placement;
function applyMutations(data) {
var previousPlacement = currentPlacement;
currentPlacement = data.placement;
instance.state.currentPlacement = data.placement;

@@ -1182,7 +1204,6 @@ if (instance.props.flip && !instance.props.flipOnUpdate) {

setFlipModifierEnabled(instance.popperInstance.modifiers, false);
} // Apply Popper's `x-*` attributes to the tooltip with `data-*`
}
tooltip.setAttribute('data-placement', instance.state.currentPlacement);
tooltip.setAttribute('data-placement', currentPlacement);
if (data.attributes['x-out-of-boundaries'] !== false) {

@@ -1195,8 +1216,8 @@ tooltip.setAttribute('data-out-of-boundaries', '');

var BasePlacement = getBasePlacement(currentPlacement);
var basePlacement = getBasePlacement(instance.state.currentPlacement);
var tooltipStyles = tooltip.style;
tooltipStyles.top = '0';
tooltipStyles.left = '0';
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = "".concat((getIsOppositePlacement() ? 1 : -1) * instance.props.distance, "px");
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PADDING;
tooltipStyles[getIsVerticalPlacement() ? 'top' : 'left'] = (getIsOppositePlacement() ? 1 : -1) * instance.props.distance + "px";
var padding = preventOverflowModifier && preventOverflowModifier.padding !== undefined ? preventOverflowModifier.padding : PREVENT_OVERFLOW_PADDING;
var isPaddingNumber = typeof padding === 'number';

@@ -1211,12 +1232,6 @@

computedPadding[BasePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[BasePlacement] || 0) + instance.props.distance;
computedPadding[basePlacement] = isPaddingNumber ? padding + instance.props.distance : (padding[basePlacement] || 0) + instance.props.distance;
instance.popperInstance.modifiers.filter(function (m) {
return m.name === 'preventOverflow';
})[0].padding = computedPadding;
currentComputedPadding = computedPadding; // The `distance` offset needs to be re-considered by Popper.js if the
// placement changed
if (currentPlacement !== previousPlacement) {
instance.popperInstance.update();
}
}

@@ -1226,3 +1241,3 @@

eventsEnabled: false,
placement: instance.props.placement
placement: normalizedPlacement
}, popperOptions, {

@@ -1232,3 +1247,3 @@ modifiers: _extends({}, popperOptions ? popperOptions.modifiers : {}, {

boundariesElement: instance.props.boundary,
padding: PADDING
padding: PREVENT_OVERFLOW_PADDING
}, preventOverflowModifier),

@@ -1243,3 +1258,3 @@ arrow: _extends({

// we need to account for its distance
padding: instance.props.distance + PADDING,
padding: instance.props.distance + PREVENT_OVERFLOW_PADDING,
behavior: instance.props.flipBehavior

@@ -1253,15 +1268,9 @@ }, getModifier(popperOptions, 'flip')),

applyMutations(data);
preserveInvocation(popperOptions && popperOptions.onCreate, config.onCreate, [data]);
runMountCallback();
if (popperOptions && popperOptions.onCreate) {
popperOptions.onCreate(data);
}
},
onUpdate: function onUpdate(data) {
applyMutations(data);
preserveInvocation(popperOptions && popperOptions.onUpdate, config.onUpdate, [data]);
runMountCallback();
if (popperOptions && popperOptions.onUpdate) {
popperOptions.onUpdate(data);
}
}

@@ -1282,41 +1291,23 @@ });

function mount() {
// The mounting callback (`currentMountCallback`) is only run due to a
// popperInstance update/create
hasMountCallbackRun = false;
var isInFollowCursorMode = getIsInFollowCursorMode();
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]); // The popper element needs to exist on the DOM before its position can be
// updated as Popper.js needs to read its dimensions
if (!instance.popperInstance) {
createPopperInstance();
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
}
if (!isInFollowCursorMode) {
instance.popperInstance.enableEventListeners();
}
} else {
if (!isInFollowCursorMode) {
instance.popperInstance.scheduleUpdate();
instance.popperInstance.enableEventListeners();
}
if (instance.popperInstance) {
setFlipModifierEnabled(instance.popperInstance.modifiers, instance.props.flip);
} // If the instance previously had followCursor behavior, it will be
// positioned incorrectly if triggered by `focus` afterwards.
// Update the reference back to the real DOM element
instance.popperInstance.enableEventListeners(); // Mounting callback invoked in `onUpdate`
instance.popperInstance.reference = reference;
if (isInFollowCursorMode && lastMouseMoveEvent) {
// TODO: If the tippy also has `updateDuration`, it transitions from
// the initial placement to the cursor point
requestAnimationFrame(function () {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
});
instance.popperInstance.scheduleUpdate();
} else {
// Mounting callback invoked in `onCreate`
createPopperInstance();
instance.popperInstance.enableEventListeners();
}
var appendTo = instance.props.appendTo;
var parentNode = appendTo === 'parent' ? reference.parentNode : invokeWithArgsOrReturn(appendTo, [reference]);
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
instance.props.onMount(instance);
instance.state.isMounted = true;
}
}

@@ -1326,3 +1317,8 @@

instance.clearDelayTimeouts();
instance.state.isScheduledToShow = true;
if (!instance.popperInstance) {
createPopperInstance();
}
if (event) {

@@ -1332,23 +1328,4 @@ instance.props.onTrigger(instance, event);

if (instance.state.isVisible) {
return;
}
isScheduledToShow = true;
if (instance.props.wait) {
return instance.props.wait(instance, event);
} // If the tooltip has a delay, we need to be listening to the mousemove as
// soon as the trigger event is fired, so that it's in the correct position
// upon mount.
// Edge case: if the tooltip is still mounted, but then scheduleShow() is
// called, it causes a jump.
if (getIsInFollowCursorMode() && !instance.state.isMounted) {
if (!instance.popperInstance) {
createPopperInstance();
}
document.addEventListener('mousemove', positionVirtualReferenceNearCursor);
}

@@ -1373,6 +1350,7 @@

if (!instance.state.isVisible) {
return removeFollowCursorListener();
removeDocumentMouseDownListener();
return;
}
isScheduledToShow = false;
instance.state.isScheduledToShow = false;
var delay = getValue(instance.props.delay, 1, defaultProps.delay);

@@ -1389,3 +1367,3 @@

// late sometimes, we don't want hide() to be called.
animationFrame = requestAnimationFrame(function () {
scheduleHideAnimationFrame = requestAnimationFrame(function () {
instance.hide();

@@ -1409,3 +1387,3 @@ });

clearTimeout(hideTimeout);
cancelAnimationFrame(animationFrame);
cancelAnimationFrame(scheduleHideAnimationFrame);
}

@@ -1424,2 +1402,3 @@

validateProps(partialProps);
validateExtraPropsFunctionality(instance, partialProps);
}

@@ -1450,6 +1429,2 @@

}
if (instance.props.followCursor && lastMouseMoveEvent) {
positionVirtualReferenceNearCursor(lastMouseMoveEvent);
}
} else {

@@ -1467,6 +1442,11 @@ instance.popperInstance.update();

function show() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 0, defaultProps.duration[1]);
var shouldPreventPopperTransition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
function show(duration, shouldPreventPopperTransition) {
if (duration === void 0) {
duration = getValue(instance.props.duration, 0, defaultProps.duration[1]);
}
if (shouldPreventPopperTransition === void 0) {
shouldPreventPopperTransition = true;
}
{

@@ -1484,3 +1464,3 @@ warnWhen(instance.state.isDestroyed, '`show()` was called on a destroyed instance. ' + 'This is a no-op but indicates a potential memory leak.');

return;
} // Standardize `disabled` behavior across browsers.
} // Normalize `disabled` behavior across browsers.
// Firefox allows events on disabled elements, but Chrome doesn't.

@@ -1512,9 +1492,9 @@ // Using a wrapper element (i.e. <span>) is recommended.

if (!getIsInFollowCursorMode()) {
instance.popperInstance.update();
}
instance.popperInstance.update();
instance.props.onMount(instance);
instance.state.isMounted = true; // The content should fade in after the backdrop has mostly filled the
// tooltip element. `clip-path` is the other alternative but is not well-
// supported and is buggy on some devices.
if (instance.popperChildren.backdrop) {
instance.popperChildren.content.style.transitionDelay = Math.round(duration / 12) + 'ms';
}
content.style.transitionDelay = instance.popperChildren.backdrop ? Math.round(duration / 12) + "ms" : '';

@@ -1530,3 +1510,3 @@ if (instance.props.sticky) {

if (instance.props.aria) {
getEventListenersTarget().setAttribute("aria-".concat(instance.props.aria), tooltip.id);
getEventListenersTarget().setAttribute("aria-" + instance.props.aria, tooltip.id);
}

@@ -1542,4 +1522,6 @@

function hide() {
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getValue(instance.props.duration, 1, defaultProps.duration[1]);
function hide(duration) {
if (duration === void 0) {
duration = getValue(instance.props.duration, 1, defaultProps.duration[1]);
}

@@ -1549,9 +1531,7 @@ {

} // Early bail-out
// We're checking `isMounted` instead if `isVisible` so that `destroy()`'s
// instance.hide(0) call is not ignored (to unmount the tippy instantly)
var isAlreadyHidden = !instance.state.isMounted;
var isAlreadyHidden = !instance.state.isVisible && !isBeingDestroyed;
var isDestroyed = instance.state.isDestroyed;
var isDisabled = !instance.state.isEnabled;
var isDisabled = !instance.state.isEnabled && !isBeingDestroyed;

@@ -1562,3 +1542,3 @@ if (isAlreadyHidden || isDestroyed || isDisabled) {

if (instance.props.onHide(instance) === false) {
if (instance.props.onHide(instance) === false && !isBeingDestroyed) {
return;

@@ -1575,12 +1555,8 @@ }

onTransitionedOut(duration, function () {
if (!isScheduledToShow) {
removeFollowCursorListener();
}
if (instance.props.aria) {
getEventListenersTarget().removeAttribute("aria-".concat(instance.props.aria));
getEventListenersTarget().removeAttribute("aria-" + instance.props.aria);
}
instance.popperInstance.disableEventListeners();
instance.popperInstance.options.placement = instance.props.placement;
instance.popperInstance.options.placement = normalizedPlacement;
popper.parentNode.removeChild(popper);

@@ -1599,6 +1575,5 @@ instance.props.onHidden(instance);

return;
} // `destroy()`'s `hide()` call should not be ignored
}
instance.enable();
isBeingDestroyed = true;
instance.hide(0);

@@ -1612,2 +1587,3 @@ removeTriggersFromEventListenersTarget();

isBeingDestroyed = false;
instance.state.isDestroyed = true;

@@ -1642,2 +1618,6 @@ }

if (instance) {
{
validateExtraPropsFunctionality(instance, optionalProps);
}
acc.push(instance);

@@ -1659,2 +1639,6 @@ }

tippy.setDefaultProps = function (partialProps) {
{
validateProps(partialProps);
}
Object.keys(partialProps).forEach(function (key) {

@@ -1670,4 +1654,4 @@ // @ts-ignore

tippy.hideAll = function () {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
tippy.hideAll = function (_temp) {
var _ref = _temp === void 0 ? {} : _temp,
excludedReferenceOrInstance = _ref.exclude,

@@ -1674,0 +1658,0 @@ duration = _ref.duration;

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

var tippy=function(t){"use strict";function e(){return(e=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}).apply(this,arguments)}t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),s={allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,theme:"tippy-dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},p=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"];function u(t){return[].slice.call(t)}function c(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var d={passive:!0},l=4,f="tippy-iOS",m="tippy-popper",v="tippy-tooltip",h="tippy-content",b="tippy-backdrop",y="tippy-arrow",w="tippy-svgArrow",g=".".concat(m),A=".".concat(v),T=".".concat(h),E=".".concat(b),C=".".concat(y),I=".".concat(w),L={isTouch:!1},O=0;function k(){L.isTouch||(L.isTouch=!0,a&&document.body.classList.add(f),window.performance&&document.addEventListener("mousemove",D))}function D(){var t=performance.now();t-O<20&&(L.isTouch=!1,document.removeEventListener("mousemove",D),a||document.body.classList.remove(f)),O=t}function M(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var S=Object.keys(s);function V(t,e){return{}.hasOwnProperty.call(t,e)}function x(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function H(t,e){return t&&t.modifiers&&t.modifiers[e]}function N(t,e){return t.indexOf(e)>-1}function P(t){return t instanceof Element}function U(t,e){return"function"==typeof t?t.apply(null,e):t}function q(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function F(){return document.createElement("div")}function z(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function B(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function _(t,n){var i=e({},n,{content:U(n.content,[t])},n.ignoreAttributes?{}:function(t){return S.reduce(function(e,n){var i=(t.getAttribute("data-tippy-".concat(n))||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return(i.arrow||o)&&(i.animateFill=!1),i}function W(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function j(t,e){t.innerHTML=P(e)?e.innerHTML:e}function R(t,e){if(P(e.content))j(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(A),backdrop:t.querySelector(E),content:t.querySelector(T),arrow:t.querySelector(C)||t.querySelector(I)}}function Y(t){t.setAttribute("data-inertia","")}function J(t){var e=F();return"sharp"!==t?(e.className=w,j(e,"round"===t?'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>':t)):e.className=y,e}function G(t){var e=F();return e.className=b,e.setAttribute("data-state",t?"visible":"hidden"),e}function K(t){t.setAttribute("data-interactive","")}function Q(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function Z(t){return t.split("-")[0]}function $(t,e,n){n.split(" ").forEach(function(n){t.classList[e](n+"-theme")})}function tt(t,e){var n=F();n.className=m;var i=F();i.className=v,i.id="tippy-".concat(t),i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),$(i,"add",e.theme);var r=F();return r.className=h,r.setAttribute("data-state","hidden"),e.interactive&&K(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(J(e.arrowType))),e.animateFill&&(i.appendChild(G(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),R(r,e),i.appendChild(r),n.appendChild(i),et(n,e,e,!1),n}function et(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,s=r.backdrop,p=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-size",n.size),o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&R(a,n),!e.animateFill&&n.animateFill?(o.appendChild(G(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(J(n.arrowType)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow&&(o.removeChild(p),o.removeAttribute("data-arrow")),e.arrow&&n.arrow&&e.arrowType!==n.arrowType&&o.replaceChild(J(n.arrowType),p),!e.interactive&&n.interactive?K(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&($(o,"remove",e.theme),$(o,"add",n.theme))}var nt=1,it=[];function rt(n,i){var o,a,u,f,m,v=_(n,i);if(!v.multiple&&n._tippy)return null;var h,b,y,w=!1,g=v.placement,A=!1,T=!1,E=[],C=W(ct,v.interactiveDebounce),I=nt++,O=tt(I,v),k=X(O),D=k.tooltip,M=k.content,S={id:I,reference:n,popper:O,popperChildren:k,popperInstance:null,props:v,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:function(){clearTimeout(u),clearTimeout(f),cancelAnimationFrame(m)},setProps:function(t){if(S.state.isDestroyed)return;st();var i=S.props,r=_(n,e({},S.props,t,{ignoreAttributes:!0}));r.ignoreAttributes=V(t,"ignoreAttributes")?t.ignoreAttributes||!1:i.ignoreAttributes,S.props=r,at(),Y(),C=W(ct,r.interactiveDebounce),et(O,i,r,S.state.isVisible),S.popperChildren=X(O),S.popperInstance&&(p.some(function(e){return V(t,e)&&t[e]!==i[e]})?(S.popperInstance.destroy(),mt(),S.state.isVisible&&S.popperInstance.enableEventListeners(),S.props.followCursor&&a&&pt(a)):S.popperInstance.update())},setContent:function(t){S.setProps({content:t})},show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x(S.props.duration,0,s.duration[1]),e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=S.state.isVisible,o=S.state.isDestroyed,p=!S.state.isEnabled,u=L.isTouch&&!S.props.touch;if(i||o||p||u)return;if(J().hasAttribute("disabled"))return;if(!1===S.props.onShow(S))return;K(),O.style.visibility="visible",S.state.isVisible=!0;var c=j();z(e?c.concat(O):c,0),h=function(){S.state.isVisible&&(F()||S.popperInstance.update(),S.popperChildren.backdrop&&(S.popperChildren.content.style.transitionDelay=Math.round(t/12)+"ms"),S.props.sticky&&function(){z([O],r?0:S.props.updateDuration),function t(){S.popperInstance.scheduleUpdate();S.state.isMounted?requestAnimationFrame(t):z([O],0)}()}(),z([O],S.props.updateDuration),z(c,t),B(c,"visible"),function(t,e){rt(t,e)}(t,function(){S.props.aria&&J().setAttribute("aria-".concat(S.props.aria),D.id),S.props.onShown(S),S.state.isShown=!0}))},function(){A=!1;var t=F();S.popperInstance?(t||(S.popperInstance.scheduleUpdate(),S.popperInstance.enableEventListeners()),q(S.popperInstance.modifiers,S.props.flip)):(mt(),t||S.popperInstance.enableEventListeners());S.popperInstance.reference=n,t&&a&&requestAnimationFrame(function(){pt(a)});var e=S.props.appendTo,i="parent"===e?n.parentNode:U(e,[n]);i.contains(O)||(i.appendChild(O),S.props.onMount(S),S.state.isMounted=!0)}()},hide:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x(S.props.duration,1,s.duration[1]),e=!S.state.isMounted,n=S.state.isDestroyed,i=!S.state.isEnabled;if(e||n||i)return;if(!1===S.props.onHide(S))return;$(),O.style.visibility="hidden",S.state.isVisible=!1,S.state.isShown=!1;var r=j();z(r,t),B(r,"hidden"),function(t,e){rt(t,function(){!S.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&e()})}(t,function(){w||R(),S.props.aria&&J().removeAttribute("aria-".concat(S.props.aria)),S.popperInstance.disableEventListeners(),S.popperInstance.options.placement=S.props.placement,O.parentNode.removeChild(O),S.props.onHidden(S),S.state.isMounted=!1})},enable:function(){S.state.isEnabled=!0},disable:function(){S.state.isEnabled=!1},destroy:function(){if(S.state.isDestroyed)return;S.enable(),S.hide(0),st(),delete n._tippy,S.popperInstance&&S.popperInstance.destroy();S.state.isDestroyed=!0}};return n._tippy=S,O._tippy=S,at(),v.lazy||mt(),v.showOnInit&&ht(),O.addEventListener("mouseenter",function(){S.props.interactive&&S.state.isVisible&&"mouseenter"===o&&S.clearDelayTimeouts()}),O.addEventListener("mouseleave",function(){S.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",C)}),v.onCreate(S),S;function P(){return N(["top","bottom"],Z(g))}function F(){return S.props.followCursor&&"focus"!==o}function j(){return[D,M,S.popperChildren.backdrop]}function R(){document.removeEventListener("mousemove",pt)}function Y(){document.body.removeEventListener("mouseleave",bt),document.removeEventListener("mousemove",C),it=it.filter(function(t){return t!==C})}function J(){return S.props.triggerTarget||n}function G(t){if(!S.props.interactive||!O.contains(t.target)){if(J().contains(t.target)){if(L.isTouch)return;if(S.state.isVisible&&N(S.props.trigger,"click"))return}!0===S.props.hideOnClick&&(S.clearDelayTimeouts(),S.hide(),T=!0,setTimeout(function(){T=!1}),S.state.isMounted||$())}}function K(){document.addEventListener("mousedown",G,!0)}function $(){document.removeEventListener("mousedown",G,!0)}function rt(t,e){function n(t){t.target===D&&(Q(D,"remove",n),e())}if(0===t)return e();Q(D,"remove",b),Q(D,"add",n),b=n}function ot(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];J().addEventListener(t,e,n),E.push({eventType:t,handler:e,options:n})}function at(){S.props.touchHold&&(ot("touchstart",ut,d),ot("touchend",dt,d)),N(S.props.trigger,"click")||ot("click",function(){L.isTouch||!0!==S.props.hideOnClick||S.hide()}),S.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(ot(t,ut),t){case"mouseenter":ot("mouseleave",dt);break;case"focus":ot(r?"focusout":"blur",lt)}})}function st(){E.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;J().removeEventListener(e,n,i)}),E=[]}function pt(t){var e=a=t,i=e.clientX,r=e.clientY;if(y){var o=c(t.target,function(t){return t===n}),s=n.getBoundingClientRect(),p=S.props.followCursor,u="horizontal"===p,d="vertical"===p,l=P(),f=l?0:50,m=l?50:0;!o&&S.props.interactive||(S.popperInstance.reference={clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:l?100:0,height:l?0:100,top:(u?s.top:r)-f,bottom:(u?s.bottom:r)+f,left:(d?s.left:i)-m,right:(d?s.right:i)+m}}},S.popperInstance.scheduleUpdate()),(L.isTouch||"initial"===p&&S.state.isVisible)&&R()}}function ut(t){T||!S.state.isEnabled||ft(t)||(S.state.isVisible||(o=t.type,t instanceof MouseEvent&&(a=t,it.forEach(function(e){return e(t)}))),"click"===t.type&&!1!==S.props.hideOnClick&&S.state.isVisible?bt(t):ht(t))}function ct(t){c(t.target,function(t){return t===n||t===O})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,s=i.distance,p=e.top-o>("top"===t?a+s:a),u=o-e.bottom>("bottom"===t?a+s:a),c=e.left-r>("left"===t?a+s:a),d=r-e.right>("right"===t?a+s:a);return p||u||c||d}(Z(g),O.getBoundingClientRect(),t,S.props)&&(Y(),bt(t))}function dt(t){if(!ft(t))return S.props.interactive?(document.body.addEventListener("mouseleave",bt),document.addEventListener("mousemove",C),void it.push(C)):void bt(t)}function lt(t){t.target===J()&&(S.props.interactive&&t.relatedTarget&&O.contains(t.relatedTarget)||bt(t))}function ft(t){var e="ontouchstart"in window,n=N(t.type,"touch"),i=S.props.touchHold;return e&&L.isTouch&&i&&!n||L.isTouch&&!i&&n}function mt(){var i=S.props.popperOptions,r=S.popperChildren.arrow,o=H(i,"preventOverflow");function a(t){var n=g;g=t.placement,S.props.flip&&!S.props.flipOnUpdate&&(t.flipped&&(S.popperInstance.options.placement=t.placement),q(S.popperInstance.modifiers,!1)),D.setAttribute("data-placement",g),!1!==t.attributes["x-out-of-boundaries"]?D.setAttribute("data-out-of-boundaries",""):D.removeAttribute("data-out-of-boundaries");var i=Z(g),r=D.style;r.top="0",r.left="0",r[P()?"top":"left"]="".concat((N(["bottom","right"],Z(g))?1:-1)*S.props.distance,"px");var a=o&&void 0!==o.padding?o.padding:l,s="number"==typeof a,p=e({top:s?a:a.top,bottom:s?a:a.bottom,left:s?a:a.left,right:s?a:a.right},!s&&a);p[i]=s?a+S.props.distance:(a[i]||0)+S.props.distance,S.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=p,y=p,g!==n&&S.popperInstance.update()}var s=e({eventsEnabled:!1,placement:S.props.placement},i,{modifiers:e({},i?i.modifiers:{},{preventOverflow:e({boundariesElement:S.props.boundary,padding:l},o),arrow:e({element:r,enabled:!!r},H(i,"arrow")),flip:e({enabled:S.props.flip,padding:S.props.distance+l,behavior:S.props.flipBehavior},H(i,"flip")),offset:e({offset:S.props.offset},H(i,"offset"))}),onCreate:function(t){a(t),vt(),i&&i.onCreate&&i.onCreate(t)},onUpdate:function(t){a(t),vt(),i&&i.onUpdate&&i.onUpdate(t)}});S.popperInstance=new t(n,O,s)}function vt(){!A&&h&&(A=!0,function(t){t.offsetHeight}(O),h())}function ht(t){if(S.clearDelayTimeouts(),t&&S.props.onTrigger(S,t),!S.state.isVisible){if(w=!0,S.props.wait)return S.props.wait(S,t);F()&&!S.state.isMounted&&(S.popperInstance||mt(),document.addEventListener("mousemove",pt)),K();var e=x(S.props.delay,0,s.delay);e?u=setTimeout(function(){S.show()},e):S.show()}}function bt(t){if(S.clearDelayTimeouts(),S.props.onUntrigger(S,t),!S.state.isVisible)return R();w=!1;var e=x(S.props.delay,1,s.delay);e?f=setTimeout(function(){S.state.isVisible&&S.hide()},e):m=requestAnimationFrame(function(){S.hide()})}}function ot(t,n){document.addEventListener("touchstart",k,d),window.addEventListener("blur",M);var i=e({},s,n),r=function(t){if(P(t))return[t];if(t instanceof NodeList)return u(t);if(Array.isArray(t))return t;try{return u(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&rt(e,i);return n&&t.push(n),t},[]);return P(t)?r[0]:r}return ot.version="5.0.0-alpha.1",ot.defaultProps=s,ot.currentInput=L,ot.setDefaultProps=function(t){Object.keys(t).forEach(function(e){s[e]=t[e]})},ot.hideAll=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.exclude,n=t.duration;u(document.querySelectorAll(g)).forEach(function(t){var i,r=t._tippy;if(r){var o=!1;e&&(o=(i=e)&&i._tippy&&!i.classList.contains(m)?r.reference===e:t===e.popper),o||r.hide(n)}})},n&&setTimeout(function(){u(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&ot(t,{content:e})})}),ot}(Popper);
var tippy=function(t){"use strict";function e(){return(e=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}).apply(this,arguments)}t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window&&"undefined"!=typeof document,i=n?navigator.userAgent:"",r=/MSIE |Trident\//.test(i),o=/UCBrowser\//.test(i),a=n&&/iPhone|iPad|iPod/.test(navigator.platform),s={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onCreate:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},p=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],u={passive:!0},c=5,d='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',l="tippy-iOS",f="tippy-popper",m="tippy-tooltip",v="tippy-content",h="tippy-backdrop",b="tippy-arrow",y="tippy-svg-arrow",w="."+f,g="."+m,A="."+v,T="."+h,E="."+b,C="."+y,L={isTouch:!1},I=0;function O(){L.isTouch||(L.isTouch=!0,a&&document.body.classList.add(l),window.performance&&document.addEventListener("mousemove",S))}function S(){var t=performance.now();t-I<20&&(L.isTouch=!1,document.removeEventListener("mousemove",S),a||document.body.classList.remove(l)),I=t}function k(){var t=document.activeElement,e=t._tippy;t&&t.blur&&e&&!e.state.isVisible&&t.blur()}var D=Object.keys(s);function P(t,e){return{}.hasOwnProperty.call(t,e)}function x(t,e,n){if(Array.isArray(t)){var i=t[e];return null==i?n:i}return t}function M(t,e){return t&&t.modifiers&&t.modifiers[e]}function V(t){return t instanceof Element}function N(t,e){return"function"==typeof t?t.apply(null,e):t}function F(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function H(){return document.createElement("div")}function U(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function q(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function B(t,n){var i=e({},n,{content:N(n.content,[t])},n.ignoreAttributes?{}:function(t){return D.reduce(function(e,n){var i=(t.getAttribute("data-tippy-"+n)||"").trim();if(!i)return e;if("content"===n)e[n]=i;else try{e[n]=JSON.parse(i)}catch(t){e[n]=i}return e},{})}(t));return i.animateFill&&(i.arrow=!1),(i.arrow||o)&&(i.animateFill=!1),i}function _(t,e){return 0===e?t:function(i){clearTimeout(n),n=setTimeout(function(){t(i)},e)};var n}function z(t,e,n){t&&t!==e&&t.apply(null,n)}function j(t){return[].slice.call(t)}function W(t,e){return t.indexOf(e)>-1}function J(t,e){t.innerHTML=V(e)?e.innerHTML:e}function R(t,e){if(V(e.content))J(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function X(t){return{tooltip:t.querySelector(g),backdrop:t.querySelector(T),content:t.querySelector(A),arrow:t.querySelector(E)||t.querySelector(C)}}function Y(t){t.setAttribute("data-inertia","")}function G(t){var e=H();return!0===t?e.className=b:(e.className=y,V(t)?e.appendChild(t):J(e,"round"===t?d:t)),e}function K(t){var e=H();return e.className=h,e.setAttribute("data-state",t?"visible":"hidden"),e}function Q(t){t.setAttribute("data-interactive","")}function Z(t,e,n){var i=o&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](i,n)}function $(t){return t.split("-")[0]}function tt(t,e,n){n.split(" ").forEach(function(n){n&&t.classList[e](n+"-theme")})}function et(t,e){var n=H();n.className=f,n.style.position="absolute",n.style.top="0",n.style.left="0";var i=H();i.className=m,i.id="tippy-"+t,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1"),tt(i,"add",e.theme);var r=H();return r.className=v,r.setAttribute("data-state","hidden"),e.interactive&&Q(i),e.arrow&&(i.setAttribute("data-arrow",""),i.appendChild(G(e.arrow))),e.animateFill&&(i.appendChild(K(!1)),i.setAttribute("data-animatefill","")),e.inertia&&Y(i),R(r,e),i.appendChild(r),n.appendChild(i),nt(n,e,e,!1),n}function nt(t,e,n,i){var r=X(t),o=r.tooltip,a=r.content,s=r.backdrop,p=r.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth=n.maxWidth+("number"==typeof n.maxWidth?"px":""),n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&R(a,n),!e.animateFill&&n.animateFill?(o.appendChild(K(i)),o.setAttribute("data-animatefill","")):e.animateFill&&!n.animateFill&&(o.removeChild(s),o.removeAttribute("data-animatefill")),!e.arrow&&n.arrow?(o.appendChild(G(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(p),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(p),o.appendChild(G(n.arrow))),!e.interactive&&n.interactive?Q(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?Y(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(tt(o,"remove",e.theme),tt(o,"add",n.theme))}var it=1,rt=[];function ot(n,i){var o,a,d,l,f=B(n,i);if(!f.multiple&&n._tippy)return null;var m,v,h,b=!1,y=!1,w=!1,g=[],A=_(st,f.interactiveDebounce),T=it++,E=et(T,f),C=X(E),I=C.tooltip,O=C.content,S={currentPlacement:f.placement,isScheduledToShow:!1,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},k={id:T,reference:n,popper:E,popperChildren:C,popperInstance:null,props:f,state:S,clearDelayTimeouts:function(){clearTimeout(a),clearTimeout(d),cancelAnimationFrame(l)},setProps:function(t){if(k.state.isDestroyed)return;ot();var i=k.props,r=B(n,e({},k.props,t,{ignoreAttributes:!0}));r.ignoreAttributes=P(t,"ignoreAttributes")?t.ignoreAttributes||!1:i.ignoreAttributes,k.props=r,tt(),J(),A=_(st,r.interactiveDebounce),nt(E,i,r,k.state.isVisible),k.popperChildren=X(E),k.popperInstance&&(p.some(function(e){return P(t,e)&&t[e]!==i[e]})?(k.popperInstance.destroy(),dt(),k.state.isVisible&&k.popperInstance.enableEventListeners()):k.popperInstance.update())},setContent:function(t){k.setProps({content:t})},show:function(t,e){void 0===t&&(t=x(k.props.duration,0,s.duration[1]));void 0===e&&(e=!0);var i=k.state.isVisible,o=k.state.isDestroyed,a=!k.state.isEnabled,p=L.isTouch&&!k.props.touch;if(i||o||a||p)return;if(j().hasAttribute("disabled"))return;if(!1===k.props.onShow(k))return;Y(),E.style.visibility="visible",k.state.isVisible=!0;var u=H();U(e?u.concat(E):u,0),v=function(){k.state.isVisible&&(k.popperInstance.update(),k.props.onMount(k),k.state.isMounted=!0,O.style.transitionDelay=k.popperChildren.backdrop?Math.round(t/12)+"ms":"",k.props.sticky&&function(){U([E],r?0:k.props.updateDuration),function t(){k.popperInstance.scheduleUpdate();k.state.isMounted?requestAnimationFrame(t):U([E],0)}()}(),U([E],k.props.updateDuration),U(u,t),q(u,"visible"),function(t,e){K(t,e)}(t,function(){k.props.aria&&j().setAttribute("aria-"+k.props.aria,I.id),k.props.onShown(k),k.state.isShown=!0}))},function(){y=!1;var t=k.props.appendTo,e="parent"===t?n.parentNode:N(t,[n]);e.contains(E)||e.appendChild(E);k.popperInstance?(F(k.popperInstance.modifiers,k.props.flip),k.popperInstance.enableEventListeners(),k.popperInstance.scheduleUpdate()):(dt(),k.popperInstance.enableEventListeners())}()},hide:function(t){void 0===t&&(t=x(k.props.duration,1,s.duration[1]));var e=!k.state.isVisible&&!b,n=k.state.isDestroyed,i=!k.state.isEnabled&&!b;if(e||n||i)return;if(!1===k.props.onHide(k)&&!b)return;G(),E.style.visibility="hidden",k.state.isVisible=!1,k.state.isShown=!1;var r=H();U(r,t),q(r,"hidden"),function(t,e){K(t,function(){!k.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&e()})}(t,function(){k.props.aria&&j().removeAttribute("aria-"+k.props.aria),k.popperInstance.disableEventListeners(),k.popperInstance.options.placement=m,E.parentNode.removeChild(E),k.props.onHidden(k),k.state.isMounted=!1})},enable:function(){k.state.isEnabled=!0},disable:function(){k.state.isEnabled=!1},destroy:function(){if(k.state.isDestroyed)return;b=!0,k.hide(0),ot(),delete n._tippy,k.popperInstance&&k.popperInstance.destroy();b=!1,k.state.isDestroyed=!0}};return n._tippy=k,E._tippy=k,tt(),f.lazy||dt(),f.showOnCreate&&ft(),E.addEventListener("mouseenter",function(){k.props.interactive&&k.state.isVisible&&"mouseenter"===o&&k.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){k.props.interactive&&"mouseenter"===o&&document.addEventListener("mousemove",A)}),f.onCreate(k),k;function D(){var t=k.props.touch;return Array.isArray(t)?t:[t,0]}function V(){return"hold"===D()[0]}function H(){return[I,O,k.popperChildren.backdrop]}function j(){return k.props.triggerTarget||n}function J(){document.body.removeEventListener("mouseleave",mt),document.removeEventListener("mousemove",A),rt=rt.filter(function(t){return t!==A})}function R(t){if(!k.props.interactive||!E.contains(t.target)){if(j().contains(t.target)){if(L.isTouch)return;if(k.state.isVisible&&W(k.props.trigger,"click"))return}!0===k.props.hideOnClick&&(k.clearDelayTimeouts(),k.hide(),w=!0,setTimeout(function(){w=!1}),k.state.isMounted||G())}}function Y(){document.addEventListener("mousedown",R,!0)}function G(){document.removeEventListener("mousedown",R,!0)}function K(t,e){function n(t){t.target===I&&(Z(I,"remove",n),e())}if(0===t)return e();Z(I,"remove",h),Z(I,"add",n),h=n}function Q(t,e,n){void 0===n&&(n=!1),j().addEventListener(t,e,n),g.push({eventType:t,handler:e,options:n})}function tt(){V()&&(Q("touchstart",at,u),Q("touchend",pt,u)),W(k.props.trigger,"click")||Q("click",function(){L.isTouch||!0!==k.props.hideOnClick||k.hide()}),k.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)switch(Q(t,at),t){case"mouseenter":Q("mouseleave",pt);break;case"focus":Q(r?"focusout":"blur",ut)}})}function ot(){g.forEach(function(t){var e=t.eventType,n=t.handler,i=t.options;j().removeEventListener(e,n,i)}),g=[]}function at(t){if(!w&&k.state.isEnabled&&!ct(t))if(k.state.isVisible||(o=t.type,t instanceof MouseEvent&&rt.forEach(function(e){return e(t)})),"click"===t.type&&!1!==k.props.hideOnClick&&k.state.isVisible)mt(t);else{var e=D(),n=e[0],i=e[1];L.isTouch&&"hold"===n&&i?a=setTimeout(function(){ft(t)},i):ft(t)}}function st(t){(function(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null})(t.target,function(t){return t===n||t===E})||function(t,e,n,i){if(!t)return!0;var r=n.clientX,o=n.clientY,a=i.interactiveBorder,s=i.distance,p=e.top-o>("top"===t?a+s:a),u=o-e.bottom>("bottom"===t?a+s:a),c=e.left-r>("left"===t?a+s:a),d=r-e.right>("right"===t?a+s:a);return p||u||c||d}($(k.state.currentPlacement),E.getBoundingClientRect(),t,k.props)&&(J(),mt(t))}function pt(t){if(!ct(t))return k.props.interactive?(document.body.addEventListener("mouseleave",mt),document.addEventListener("mousemove",A),void rt.push(A)):void mt(t)}function ut(t){t.target===j()&&(k.props.interactive&&t.relatedTarget&&E.contains(t.relatedTarget)||mt(t))}function ct(t){var e="ontouchstart"in window,n=W(t.type,"touch"),i=V();return e&&L.isTouch&&i&&!n||L.isTouch&&!i&&n}function dt(){var i=k.props,r=i.popperOptions,o=i.placement,a=k.popperChildren.arrow,s=M(r,"preventOverflow"),p=k.state.currentPlacement.split("-")[1];function u(t){k.state.currentPlacement=t.placement,k.props.flip&&!k.props.flipOnUpdate&&(t.flipped&&(k.popperInstance.options.placement=t.placement),F(k.popperInstance.modifiers,!1)),I.setAttribute("data-placement",k.state.currentPlacement),!1!==t.attributes["x-out-of-boundaries"]?I.setAttribute("data-out-of-boundaries",""):I.removeAttribute("data-out-of-boundaries");var n=$(k.state.currentPlacement),i=I.style;i.top="0",i.left="0",i[W(["top","bottom"],$(k.state.currentPlacement))?"top":"left"]=(W(["bottom","right"],$(k.state.currentPlacement))?1:-1)*k.props.distance+"px";var r=s&&void 0!==s.padding?s.padding:c,o="number"==typeof r,a=e({top:o?r:r.top,bottom:o?r:r.bottom,left:o?r:r.left,right:o?r:r.right},!o&&r);a[n]=o?r+k.props.distance:(r[n]||0)+k.props.distance,k.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a}var d=e({eventsEnabled:!1,placement:m=k.props.followCursor&&p?o.replace(p,"start"===p?"end":"start"):o},r,{modifiers:e({},r?r.modifiers:{},{preventOverflow:e({boundariesElement:k.props.boundary,padding:c},s),arrow:e({element:a,enabled:!!a},M(r,"arrow")),flip:e({enabled:k.props.flip,padding:k.props.distance+c,behavior:k.props.flipBehavior},M(r,"flip")),offset:e({offset:k.props.offset},M(r,"offset"))}),onCreate:function(t){u(t),z(r&&r.onCreate,d.onCreate,[t]),lt()},onUpdate:function(t){u(t),z(r&&r.onUpdate,d.onUpdate,[t]),lt()}});k.popperInstance=new t(n,E,d)}function lt(){!y&&v&&(y=!0,function(t){t.offsetHeight}(E),v())}function ft(t){if(k.clearDelayTimeouts(),k.state.isScheduledToShow=!0,k.popperInstance||dt(),t&&k.props.onTrigger(k,t),k.props.wait)return k.props.wait(k,t);Y();var e=x(k.props.delay,0,s.delay);e?a=setTimeout(function(){k.show()},e):k.show()}function mt(t){if(k.clearDelayTimeouts(),k.props.onUntrigger(k,t),k.state.isVisible){k.state.isScheduledToShow=!1;var e=x(k.props.delay,1,s.delay);e?d=setTimeout(function(){k.state.isVisible&&k.hide()},e):l=requestAnimationFrame(function(){k.hide()})}else G()}}function at(t,n){document.addEventListener("touchstart",O,e({},u,{capture:!0})),window.addEventListener("blur",k);var i=e({},s,n),r=function(t){if(V(t))return[t];if(t instanceof NodeList)return j(t);if(Array.isArray(t))return t;try{return j(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var n=e&&ot(e,i);return n&&t.push(n),t},[]);return V(t)?r[0]:r}return at.version="5.0.0-alpha.2",at.defaultProps=s,at.currentInput=L,at.setDefaultProps=function(t){Object.keys(t).forEach(function(e){s[e]=t[e]})},at.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,i=e.duration;j(document.querySelectorAll(w)).forEach(function(t){var e,r=t._tippy;if(r){var o=!1;n&&(o=(e=n)&&e._tippy&&!e.classList.contains(f)?r.reference===n:t===n.popper),o||r.hide(i)}})},n&&setTimeout(function(){j(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&at(t,{content:e})})}),at}(Popper);
//# sourceMappingURL=tippy.min.js.map

@@ -31,7 +31,6 @@ import Popper, { ReferenceObject } from 'popper.js'

animateFill: boolean
animation: 'fade' | 'shift-away' | string
animation: string
appendTo: 'parent' | Element | ((ref: Element) => Element)
aria: 'describedby' | 'labelledby' | null
arrow: boolean
arrowType: 'sharp' | 'round' | string
arrow: boolean | string | SVGElement
boundary: 'scrollParent' | 'window' | 'viewport' | HTMLElement

@@ -45,6 +44,7 @@ content: Content

flipOnUpdate: boolean
followCursor: boolean | 'vertical' | 'horizontal' | 'initial'
followCursor: boolean | 'horizontal' | 'vertical' | 'initial'
hideOnClick: boolean | 'toggle'
ignoreAttributes: boolean
inertia: boolean
inlinePositioning: boolean | 'cursor'
interactive: boolean

@@ -68,8 +68,6 @@ interactiveBorder: number

role: string
showOnInit: boolean
size: 'small' | 'regular' | 'large'
showOnCreate: boolean
sticky: boolean
theme: string
touch: boolean
touchHold: boolean
touch: boolean | 'hold' | ['hold', number]
trigger: string

@@ -83,2 +81,3 @@ triggerTarget: Element | null

export interface Instance {
__extraProps__?: any
clearDelayTimeouts(): void

@@ -99,2 +98,4 @@ destroy(): void

state: {
currentPlacement: Placement
isScheduledToShow: boolean
isEnabled: boolean

@@ -108,2 +109,6 @@ isVisible: boolean

export interface Singleton extends Instance {
instances: Instance[]
}
export interface PopperChildren {

@@ -121,5 +126,19 @@ tooltip: HTMLDivElement

export type TippyCallWrapper = (
targets: Targets,
optionalProps?: Partial<Props>,
) => Instance | Instance[]
export interface EnhancedTippy extends Tippy {
currentInput: { isTouch: boolean }
defaultProps: Props
version: string
}
export type PropHOF = (tippy: Tippy) => EnhancedTippy
export interface Tippy {
(targets: Targets, props?: Partial<Props>): Instance | Instance[]
readonly defaults: Props
readonly currentInput: { isTouch: boolean }
readonly defaultProps: Props
readonly version: string

@@ -126,0 +145,0 @@ hideAll(options?: HideAllOptions): void

{
"name": "tippy.js",
"version": "5.0.0-alpha.1",
"version": "5.0.0-alpha.2",
"description": "Highly customizable tooltip and popover library",
"main": "./cjs/tippy.bundle.js",
"module": "./esm/tippy.bundle.js",
"unpkg": "./iife/tippy.bundle.min.js",
"main": "cjs/tippy.bundle.js",
"module": "esm/tippy.bundle.js",
"unpkg": "iife/tippy.bundle.min.js",
"types": "index.d.ts",
"sideEffects": [
"./cjs/tippy.bundle.js",
"./cjs/tippy.bundle.min.js",
"./esm/tippy.bundle.js",
"./esm/tippy.bundle.min.js",
"*.css"
"cjs/*.js",
"esm/*.js",
"iife/*.js",
"./**/*.css"
],

@@ -37,5 +36,8 @@ "author": "atomiks",

"addons/",
"extra-props/",
"animations/",
"themes/",
"tippy.css",
"backdrop.css",
"svg-arrow.css",
"index.d.ts"

@@ -52,2 +54,4 @@ ],

"dev:animations": "parcel demo/animations/index.html -d .devserver --open",
"dev:addons": "parcel demo/addons/index.html -d .devserver --open",
"dev:extra-props": "parcel demo/extra-props/index.html -d .devserver --open",
"build": "node rollup.pre-build && rollup --config && bundlesize",

@@ -57,3 +61,3 @@ "test": "jest --coverage --silent",

"lint": "eslint --report-unused-disable-directives . --ext .ts,.js",
"clean": "rimraf addons/{cjs,esm,iife} cjs iife esm themes animations coverage .devserver .cache ./tippy.css ./index.d.ts",
"clean": "rimraf addons/{cjs,esm,iife} extra-props/{cjs,esm,iife} cjs iife esm themes animations coverage .devserver .cache ./{tippy,backdrop,svg-arrow}.css ./index.d.ts",
"prepare": "npm run clean && npm run build"

@@ -74,12 +78,20 @@ },

{
"path": "./iife/tippy.bundle.min.js",
"path": "iife/tippy.bundle.min.js",
"maxSize": "7 kB"
},
{
"path": "./iife/tippy.min.js",
"path": "iife/tippy.min.js",
"maxSize": "5.75 kB"
},
{
"path": "./tippy.css",
"maxSize": "1.25 kB"
"path": "addons/iife/tippy-addons.min.js",
"maxSize": "5 kB"
},
{
"path": "extra-props/iife/tippy-extra-props.min.js",
"maxSize": "5 kB"
},
{
"path": "tippy.css",
"maxSize": "1 kB"
}

@@ -104,4 +116,5 @@ ],

"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-object-rest-spread": "^7.3.1",
"@babel/plugin-transform-template-literals": "^7.4.4",
"@babel/preset-env": "^7.3.1",

@@ -115,17 +128,17 @@ "@babel/preset-typescript": "^7.3.3",

"babel-plugin-dev-expression": "^0.2.1",
"bundlesize": "^0.17.0",
"bundlesize": "^0.17.2",
"colorette": "^1.0.7",
"cssnano": "^4.1.10",
"eslint": "^5.12.0",
"eslint-config-prettier": "^4.1.0",
"eslint-config-prettier": "^4.3.0",
"husky": "^1.3.1",
"jest": "^24.0.0",
"lint-staged": "^8.1.1",
"lint-staged": "^8.1.7",
"node-sass": "^4.10.0",
"parcel-bundler": "^1.12.3",
"postcss": "^7.0.14",
"prettier": "^1.16.1",
"prettier": "^1.17.1",
"promise": "^8.0.3",
"rimraf": "^2.6.3",
"rollup": "^1.9.0",
"rollup": "^1.13.1",
"rollup-plugin-babel": "^4.3.2",

@@ -135,7 +148,7 @@ "rollup-plugin-commonjs": "^9.2.0",

"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-terser": "^4.0.3",
"typescript": "^3.3.3333"
"typescript": "^3.5.1"
},

@@ -142,0 +155,0 @@ "dependencies": {

@@ -41,3 +41,3 @@ <div align="center">

<script src="https://unpkg.com/popper.js@1"></script>
<script src="https://unpkg.com/tippy.js@4"></script>
<script src="https://unpkg.com/tippy.js@5"></script>
```

@@ -50,3 +50,3 @@

// Uses latest popper.js (unminified code)
import tippy from 'https://unpkg.com/tippy.js@4?module'
import tippy from 'https://unpkg.com/tippy.js@5?module'
</script>

@@ -53,0 +53,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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