diff --git a/dist/v-tooltip.esm.js b/dist/v-tooltip.esm.js index b0c0b9b4..18c2bfdd 100644 --- a/dist/v-tooltip.esm.js +++ b/dist/v-tooltip.esm.js @@ -1,6 +1,6 @@ /**! * @fileOverview Kickass library to create and place poppers near their reference elements. - * @version 1.12.6 + * @version 1.12.9 * @license * Copyright (c) 2016 Federico Zivolo and contributors * @@ -22,7 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'; +var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; var timeoutDuration = 0; for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { @@ -39,7 +39,7 @@ function microtaskDebounce(fn) { return; } called = true; - Promise.resolve().then(function () { + window.Promise.resolve().then(function () { called = false; fn(); }); @@ -96,7 +96,7 @@ function getStyleComputedProperty(element, property) { return []; } // NOTE: 1 DOM access here - var css = window.getComputedStyle(element, null); + var css = getComputedStyle(element, null); return property ? css[property] : css; } @@ -124,7 +124,7 @@ function getParentNode(element) { function getScrollParent(element) { // Return body, `getScroll` will take care to get the correct `scrollTop` from it if (!element) { - return window.document.body; + return document.body; } switch (element.nodeName) { @@ -166,7 +166,7 @@ function getOffsetParent(element) { return element.ownerDocument.documentElement; } - return window.document.documentElement; + return document.documentElement; } // .offsetParent will return the closest TD or TABLE in case @@ -213,7 +213,7 @@ function getRoot(node) { function findCommonOffsetParent(element1, element2) { // This check is needed to avoid errors in case one of the elements isn't defined for any reason if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { - return window.document.documentElement; + return document.documentElement; } // Here we make sure to give as "start" the element that comes first in the DOM @@ -305,7 +305,7 @@ function getBordersSize(styles, axis) { var sideA = axis === 'x' ? 'Left' : 'Top'; var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; - return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0]; + return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); } /** @@ -328,9 +328,9 @@ function getSize(axis, body, html, computedStyle) { } function getWindowSizes() { - var body = window.document.body; - var html = window.document.documentElement; - var computedStyle = isIE10$1() && window.getComputedStyle(html); + var body = document.body; + var html = document.documentElement; + var computedStyle = isIE10$1() && getComputedStyle(html); return { height: getSize('Height', body, html, computedStyle), @@ -473,8 +473,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { var scrollParent = getScrollParent(children); var styles = getStyleComputedProperty(parent); - var borderTopWidth = +styles.borderTopWidth.split('px')[0]; - var borderLeftWidth = +styles.borderLeftWidth.split('px')[0]; + var borderTopWidth = parseFloat(styles.borderTopWidth, 10); + var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); var offsets = getClientRect({ top: childrenRect.top - parentRect.top - borderTopWidth, @@ -490,8 +490,8 @@ function getOffsetRectRelativeToArbitraryNode(children, parent) { // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if (!isIE10 && isHTML) { - var marginTop = +styles.marginTop.split('px')[0]; - var marginLeft = +styles.marginLeft.split('px')[0]; + var marginTop = parseFloat(styles.marginTop, 10); + var marginLeft = parseFloat(styles.marginLeft, 10); offsets.top -= borderTopWidth - marginTop; offsets.bottom -= borderTopWidth - marginTop; @@ -570,7 +570,7 @@ function getBoundaries(popper, reference, padding, boundariesElement) { // Handle other cases based on DOM element used as boundaries var boundariesNode = void 0; if (boundariesElement === 'scrollParent') { - boundariesNode = getScrollParent(getParentNode(popper)); + boundariesNode = getScrollParent(getParentNode(reference)); if (boundariesNode.nodeName === 'BODY') { boundariesNode = popper.ownerDocument.documentElement; } @@ -696,7 +696,7 @@ function getReferenceOffsets(state, popper, reference) { * @returns {Object} object containing width and height properties */ function getOuterSizes(element) { - var styles = window.getComputedStyle(element); + var styles = getComputedStyle(element); var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); var result = { @@ -913,7 +913,7 @@ function getSupportedPropertyName(property) { for (var i = 0; i < prefixes.length - 1; i++) { var prefix = prefixes[i]; var toCheck = prefix ? '' + prefix + upperProp : property; - if (typeof window.document.body.style[toCheck] !== 'undefined') { + if (typeof document.body.style[toCheck] !== 'undefined') { return toCheck; } } @@ -1032,7 +1032,7 @@ function removeEventListeners(reference, state) { */ function disableEventListeners() { if (this.state.eventsEnabled) { - window.cancelAnimationFrame(this.scheduleUpdate); + cancelAnimationFrame(this.scheduleUpdate); this.state = removeEventListeners(this.reference, this.state); } } @@ -1272,6 +1272,8 @@ function isModifierRequired(modifiers, requestingName, requestedName) { * @returns {Object} The data object, properly modified */ function arrow(data, options) { + var _data$offsets$arrow; + // arrow depends on keepTogether in order to work if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { return data; @@ -1323,22 +1325,23 @@ function arrow(data, options) { if (reference[side] + arrowElementSize > popper[opSide]) { data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; } + data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available - var popperMarginSide = getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', ''); - var sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide; + var css = getStyleComputedProperty(data.instance.popper); + var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); + var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); + var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; - data.offsets.arrow = {}; - data.offsets.arrow[side] = Math.round(sideValue); - data.offsets.arrow[altSide] = ''; // make sure to unset any eventual altSide value from the DOM node + data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); return data; } @@ -2492,6 +2495,20 @@ function removeClasses(el, classes) { } } +var supportsPassive = false; + +if (typeof window !== 'undefined') { + supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get() { + supportsPassive = true; + } + }); + window.addEventListener('test', null, opts); + } catch (e) {} +} + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { @@ -2502,118 +2519,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol -var asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -}(); @@ -3280,7 +3186,9 @@ if (typeof document !== 'undefined') { for (var i = 0; i < openTooltips.length; i++) { openTooltips[i]._onDocumentTouch(event); } - }); + }, supportsPassive ? { + passive: true + } : false); } /** @@ -3747,6 +3655,7 @@ var Popover = { render: function render() { this.$_isDisposed = false; this.$_mounted = false; this.$_events = []; + this.$_preventOpen = false; }, mounted: function mounted() { var popoverNode = this.$refs.popover; @@ -3952,7 +3861,7 @@ var Popover = { render: function render() { return; } evt.usedByTooltip = true; - _this5.$_scheduleShow(evt); + !_this5.$_preventOpen && _this5.$_scheduleShow(evt); }; _this5.$_events.push({ event: event, func: func }); reference.addEventListener(event, func); @@ -4044,7 +3953,9 @@ var Popover = { render: function render() { $_addGlobalEvents: function $_addGlobalEvents() { if (this.autoHide) { if (isIOS) { - document.addEventListener('touchstart', this.$_handleWindowClick); + document.addEventListener('touchstart', this.$_handleWindowTouchstart, supportsPassive ? { + passive: true + } : false); } else { window.addEventListener('click', this.$_handleWindowClick); } @@ -4052,7 +3963,7 @@ var Popover = { render: function render() { }, $_removeGlobalEvents: function $_removeGlobalEvents() { if (isIOS) { - document.removeEventListener('touchstart', this.$_handleWindowClick); + document.removeEventListener('touchstart', this.$_handleWindowTouchstart); } else { window.removeEventListener('click', this.$_handleWindowClick); } @@ -4074,13 +3985,33 @@ var Popover = { render: function render() { } }, $_handleWindowClick: function $_handleWindowClick(evt) { + var touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var popoverNode = this.$refs.popover; if (evt.closePopover || !popoverNode.contains(evt.target)) { this.$_scheduleHide(evt); this.$emit('auto-hide'); + + if (touch) { + this.$_preventOpen = true; + document.addEventListener('touchend', this.$_handleWindowTouchend, supportsPassive ? { + passive: true + } : false); + } } }, + $_handleWindowTouchstart: function $_handleWindowTouchstart(evt) { + this.$_handleWindowClick(evt, true); + }, + $_handleWindowTouchend: function $_handleWindowTouchend(evt) { + var _this8 = this; + + document.removeEventListener('touchend', this.$_handleWindowTouchend); + setTimeout(function () { + _this8.$_preventOpen = false; + }, 300); + }, $_handleResize: function $_handleResize() { if (this.isOpen && this.popperInstance) { this.popperInstance.update(); diff --git a/dist/v-tooltip.min.js b/dist/v-tooltip.min.js index 5695c36a..76919613 100644 --- a/dist/v-tooltip.min.js +++ b/dist/v-tooltip.min.js @@ -1 +1 @@ -var VTooltip=function(e){"use strict";function t(e){return e&&"[object Function]"==={}.toString.call(e)}function n(e,t){if(1!==e.nodeType)return[];var n=window.getComputedStyle(e,null);return t?n[t]:n}function o(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function r(e){if(!e)return window.document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=n(e),i=t.overflow,s=t.overflowX,a=t.overflowY;return/(auto|scroll)/.test(i+a+s)?e:r(o(e))}function i(e){var t=e&&e.offsetParent,o=t&&t.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===n(t,"position")?i(t):t:e?e.ownerDocument.documentElement:window.document.documentElement}function s(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||i(e.firstElementChild)===e)}function a(e){return null!==e.parentNode?a(e.parentNode):e}function u(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return window.document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?e:t,r=n?t:e,f=document.createRange();f.setStart(o,0),f.setEnd(r,0);var c=f.commonAncestorContainer;if(e!==c&&t!==c||o.contains(r))return s(c)?c:i(c);var p=a(e);return p.host?u(p.host,t):u(e,a(t).host)}function f(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var o=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||o)[t]}return e[t]}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=f(t,"top"),r=f(t,"left"),i=n?-1:1;return e.top+=o*i,e.bottom+=o*i,e.left+=r*i,e.right+=r*i,e}function p(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return+e["border"+n+"Width"].split("px")[0]+ +e["border"+o+"Width"].split("px")[0]}function l(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],le()?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function d(){var e=window.document.body,t=window.document.documentElement,n=le()&&window.getComputedStyle(t);return{height:l("Height",e,t,n),width:l("Width",e,t,n)}}function h(e){return me({},e,{right:e.left+e.width,bottom:e.top+e.height})}function v(e){var t={};if(le())try{t=e.getBoundingClientRect();var o=f(e,"top"),r=f(e,"left");t.top+=o,t.left+=r,t.bottom+=o,t.right+=r}catch(e){}else t=e.getBoundingClientRect();var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?d():{},a=s.width||e.clientWidth||i.right-i.left,u=s.height||e.clientHeight||i.bottom-i.top,c=e.offsetWidth-a,l=e.offsetHeight-u;if(c||l){var v=n(e);c-=p(v,"x"),l-=p(v,"y"),i.width-=c,i.height-=l}return h(i)}function m(e,t){var o=le(),i="HTML"===t.nodeName,s=v(e),a=v(t),u=r(e),f=n(t),p=+f.borderTopWidth.split("px")[0],l=+f.borderLeftWidth.split("px")[0],d=h({top:s.top-a.top-p,left:s.left-a.left-l,width:s.width,height:s.height});if(d.marginTop=0,d.marginLeft=0,!o&&i){var m=+f.marginTop.split("px")[0],b=+f.marginLeft.split("px")[0];d.top-=p-m,d.bottom-=p-m,d.left-=l-b,d.right-=l-b,d.marginTop=m,d.marginLeft=b}return(o?t.contains(u):t===u&&"BODY"!==u.nodeName)&&(d=c(d,t)),d}function b(e){var t=e.ownerDocument.documentElement,n=m(e,t),o=Math.max(t.clientWidth,window.innerWidth||0),r=Math.max(t.clientHeight,window.innerHeight||0),i=f(t),s=f(t,"left");return h({top:i-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:o,height:r})}function g(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===n(e,"position")||g(o(e)))}function y(e,t,n,i){var s={top:0,left:0},a=u(e,t);if("viewport"===i)s=b(a);else{var f=void 0;"scrollParent"===i?"BODY"===(f=r(o(e))).nodeName&&(f=e.ownerDocument.documentElement):f="window"===i?e.ownerDocument.documentElement:i;var c=m(f,a);if("HTML"!==f.nodeName||g(a))s=c;else{var p=d(),l=p.height,h=p.width;s.top+=c.top-c.marginTop,s.bottom=l+c.top,s.left+=c.left-c.marginLeft,s.right=h+c.left}}return s.left+=n,s.top+=n,s.right-=n,s.bottom-=n,s}function _(e){return e.width*e.height}function w(e,t,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=y(n,o,i,r),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},u=Object.keys(a).map(function(e){return me({key:e},a[e],{area:_(a[e])})}).sort(function(e,t){return t.area-e.area}),f=u.filter(function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight}),c=f.length>0?f[0].key:u[0].key,p=e.split("-")[1];return c+(p?"-"+p:"")}function O(e,t,n){return m(n,u(t,n))}function E(e){var t=window.getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function T(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function $(e,t,n){n=n.split("-")[0];var o=E(e),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),s=i?"top":"left",a=i?"left":"top",u=i?"height":"width",f=i?"width":"height";return r[s]=t[s]+t[u]/2-o[u]/2,r[a]=n===a?t[a]-o[f]:t[T(a)],r}function x(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function j(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var o=x(e,function(e){return e[t]===n});return e.indexOf(o)}function C(e,n,o){return(void 0===o?e:e.slice(0,j(e,"name",o))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=e.function||e.fn;e.enabled&&t(o)&&(n.offsets.popper=h(n.offsets.popper),n.offsets.reference=h(n.offsets.reference),n=o(n,e))}),n}function L(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=O(this.state,this.popper,this.reference),e.placement=w(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=$(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=C(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function N(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function k(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=ge.indexOf(e),o=ge.slice(n+1).concat(ge.slice(0,n));return t?o.reverse():o}function U(e,t,n,o){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],s=r[2];if(!i)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=o}return h(a)[t]/100*i}if("vh"===s||"vw"===s){return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i}return i}function q(e,t,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(x(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,f=-1!==a?[s.slice(0,a).concat([s[a].split(u)[0]]),[s[a].split(u)[1]].concat(s.slice(a+1))]:[s];return(f=f.map(function(e,o){var r=(1===o?!i:i)?"height":"width",s=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return U(e,r,t,n)})})).forEach(function(e,t){e.forEach(function(n,o){B(n)&&(r[t]+=n*("-"===e[o-1]?-1:1))})}),r}function G(e){return"string"==typeof e&&(e=e.split(" ")),e}function Y(e,t){var n=G(t),o=void 0;o=o instanceof SVGAnimatedString?Array.from(o):G(e.className),n.forEach(function(e){-1===o.indexOf(e)&&o.push(e)}),e instanceof SVGElement?e.setAttribute("class",o.join(" ")):e.className=o.join(" ")}function K(e,t){var n=G(t),o=void 0;o=o instanceof SVGAnimatedString?Array.from(o):G(e.className),n.forEach(function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1)}),e instanceof SVGElement?e.setAttribute("class",o.join(" ")):e.className=o.join(" ")}function X(e){var t={placement:void 0!==e.placement?e.placement:Ae.options.defaultPlacement,delay:void 0!==e.delay?e.delay:Ae.options.defaultDelay,template:void 0!==e.template?e.template:Ae.options.defaultTemplate,trigger:void 0!==e.trigger?e.trigger:Ae.options.defaultTrigger,offset:void 0!==e.offset?e.offset:Ae.options.defaultOffset,container:void 0!==e.container?e.container:Ae.options.defaultContainer,boundariesElement:void 0!==e.boundariesElement?e.boundariesElement:Ae.options.defaultBoundariesElement,popperOptions:$e({},void 0!==e.popperOptions?e.popperOptions:Ae.options.defaultPopperOptions)};if(t.offset){var n=Oe(t.offset),o=t.offset;("number"===n||"string"===n&&-1===o.indexOf(","))&&(o="0, "+o),t.popperOptions.modifiers||(t.popperOptions.modifiers={}),t.popperOptions.modifiers.offset={offset:o}}return t}function J(e,t){for(var n=e.placement,o=0;o0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}function oe(){oe.init||(oe.init=!0,Ie=-1!==ne())}function re(e){var t=Ae.options.popover[e];return void 0===t?Ae.options[e]:t}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!ie.installed){ie.installed=!0;var n={};ze(n,Se,t),Ae.options=n,e.directive("tooltip",Ae),e.component("v-popover",Be)}}for(var se="undefined"!=typeof window&&void 0!==window.document,ae=["Edge","Trident","Firefox"],ue=0,fe=0;fe=0){ue=1;break}var ce=se&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ue))}},pe=void 0,le=function(){return void 0===pe&&(pe=-1!==navigator.appVersion.indexOf("MSIE 10")),pe},de=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},he=function(){function e(e,t){for(var n=0;no[e]&&!t.escapeWithReference&&(r=Math.min(s[n],o[e]-("right"===e?s.width:s.height))),ve({},n,r)}};return r.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";s=me({},s,a[t](e))}),e.offsets.popper=s,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,r=e.placement.split("-")[0],i=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",u=s?"left":"top",f=s?"width":"height";return n[a]i(o[a])&&(e.offsets.popper[u]=i(o[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){if(!R(e.instance.modifiers,"arrow","keepTogether"))return e;var o=t.element;if("string"==typeof o){if(!(o=e.instance.popper.querySelector(o)))return e}else if(!e.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],i=e.offsets,s=i.popper,a=i.reference,u=-1!==["left","right"].indexOf(r),f=u?"height":"width",c=u?"Top":"Left",p=c.toLowerCase(),l=u?"left":"top",d=u?"bottom":"right",v=E(o)[f];a[d]-vs[d]&&(e.offsets.popper[p]+=a[p]+v-s[d]);var m=a[p]+a[f]/2-v/2,b=n(e.instance.popper,"margin"+c).replace("px",""),g=m-h(e.offsets.popper)[p]-b;return g=Math.max(Math.min(s[f]-v,g),0),e.arrowElement=o,e.offsets.arrow={},e.offsets.arrow[p]=Math.round(g),e.offsets.arrow[l]="",e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(N(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split("-")[0],r=T(o),i=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case ye.FLIP:s=[o,r];break;case ye.CLOCKWISE:s=V(o);break;case ye.COUNTERCLOCKWISE:s=V(o,!0);break;default:s=t.behavior}return s.forEach(function(a,u){if(o!==a||s.length===u+1)return e;o=e.placement.split("-")[0],r=T(o);var f=e.offsets.popper,c=e.offsets.reference,p=Math.floor,l="left"===o&&p(f.right)>p(c.left)||"right"===o&&p(f.left)p(c.top)||"bottom"===o&&p(f.top)p(n.right),v=p(f.top)p(n.bottom),b="left"===o&&d||"right"===o&&h||"top"===o&&v||"bottom"===o&&m,g=-1!==["top","bottom"].indexOf(o),y=!!t.flipVariations&&(g&&"start"===i&&d||g&&"end"===i&&h||!g&&"start"===i&&v||!g&&"end"===i&&m);(l||b||y)&&(e.flipped=!0,(l||b)&&(o=s[u+1]),y&&(i=F(i)),e.placement=o+(i?"-"+i:""),e.offsets.popper=me({},e.offsets.popper,$(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,r=o.popper,i=o.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=i[n]-(a?r[s?"width":"height"]:0),e.placement=T(t),e.offsets.popper=h(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!R(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=x(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};de(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ce(this.update.bind(this)),this.options=me({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n&&n.jquery?n[0]:n,this.popper=o&&o.jquery?o[0]:o,this.options.modifiers={},Object.keys(me({},e.Defaults.modifiers,i.modifiers)).forEach(function(t){r.options.modifiers[t]=me({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return me({name:e},r.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&t(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return he(e,[{key:"update",value:function(){return L.call(this)}},{key:"destroy",value:function(){return S.call(this)}},{key:"enableEventListeners",value:function(){return P.call(this)}},{key:"disableEventListeners",value:function(){return M.call(this)}}]),e}();we.Utils=("undefined"!=typeof window?window:global).PopperUtils,we.placements=be,we.Defaults=_e;var Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee=(function(){function e(e){this.value=e}function t(t){function n(r,i){try{var s=t[r](i),a=s.value;a instanceof e?Promise.resolve(a.value).then(function(e){n("next",e)},function(e){n("throw",e)}):o(s.done?"return":"normal",s.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?n(r.key,r.arg):i=null}var r,i;this._invoke=function(e,t){return new Promise(function(o,s){var a={key:e,arg:t,resolve:o,reject:s,next:null};i?i=i.next=a:(r=i=a,n(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),Te=function(){function e(e,t){for(var n=0;n
',trigger:"hover focus",offset:0},je=[],Ce=function(){function e(t,n){Ee(this,e),Le.call(this),n=$e({},xe,n),t.jquery&&(t=t[0]),this.reference=t,this.options=n,this._isOpen=!1,this._init()}return Te(e,[{key:"setClasses",value:function(e){this._classes=e}},{key:"setContent",value:function(e){if(this.options.title=e,this._tooltipNode){var t=this._tooltipNode.querySelector(this.innerSelector);t&&(t.innerHTML=e||"",this.popperInstance.update())}}},{key:"setOptions",value:function(e){var t=!1,n=e&&e.classes||Ae.options.defaultClass;this._classes!==n&&(this.setClasses(n),t=!0),e=X(e);var o=!1,r=!1;this.options.offset===e.offset&&this.options.placement===e.placement||(o=!0),(this.options.template!==e.template||this.options.trigger!==e.trigger||this.options.container!==e.container||t)&&(r=!0);for(var i in e)this.options[i]=e[i];if(this._tooltipNode)if(r){var s=this._isOpen;this.dispose(),this._init(),s&&this.show()}else o&&this.popperInstance.update()}},{key:"_init",value:function(){var e="string"==typeof this.options.trigger?this.options.trigger.split(" ").filter(function(e){return-1!==["click","hover","focus"].indexOf(e)}):[];this._isDisposed=!1,this._enableDocumentTouch=-1===e.indexOf("manual"),this._setEventListeners(this.reference,e,this.options)}},{key:"_create",value:function(e,t,n,o){var r=window.document.createElement("div");r.innerHTML=t.trim();var i=r.childNodes[0];i.id="tooltip_"+Math.random().toString(36).substr(2,10),i.setAttribute("aria-hidden","true");var s=r.querySelector(this.innerSelector);if(1===n.nodeType)o&&s.appendChild(n);else if("function"==typeof n){var a=n.call(e);o?s.innerHTML=a:s.innerText=a}else o?s.innerHTML=n:s.innerText=n;return Ae.options.autoHide&&-1!==this.options.trigger.indexOf("hover")&&(i.addEventListener("mouseenter",this.hide),i.addEventListener("click",this.hide)),i}},{key:"_show",value:function(e,t){if(!t||"string"!=typeof t.container||document.querySelector(t.container)){clearTimeout(this._disposeTimer),delete(t=Object.assign({},t)).offset;var n=!0;this._tooltipNode&&(Y(this._tooltipNode,this._classes),n=!1);var o=this._ensureShown(e,t);return n&&this._tooltipNode&&Y(this._tooltipNode,this._classes),o}}},{key:"_ensureShown",value:function(e,t){var n=this;if(this._isOpen)return this;if(this._isOpen=!0,je.push(this),this._tooltipNode)return this._tooltipNode.style.display="",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.enableEventListeners(),this.popperInstance.update(),this;var o=e.getAttribute("title")||t.title;if(!o)return this;var r=this._create(e,t.template,o,t.html);e.setAttribute("aria-describedby",r.id);var i=this._findContainer(t.container,e);this._append(r,i);var s=$e({},t.popperOptions,{placement:t.placement});return s.modifiers=$e({},s.modifiers,{arrow:{element:this.arrowSelector}}),t.boundariesElement&&(s.modifiers.preventOverflow={boundariesElement:t.boundariesElement}),this.popperInstance=new we(e,r,s),this._tooltipNode=r,requestAnimationFrame(function(){!n._isDisposed&&n.popperInstance?(n.popperInstance.update(),requestAnimationFrame(function(){n._isDisposed?n.dispose():n._isOpen&&r.setAttribute("aria-hidden","false")})):n.dispose()}),this}},{key:"_noLongerOpen",value:function(){var e=je.indexOf(this);-1!==e&&je.splice(e,1)}},{key:"_hide",value:function(){var e=this;if(!this._isOpen)return this;this._isOpen=!1,this._noLongerOpen(),this._tooltipNode.style.display="none",this._tooltipNode.setAttribute("aria-hidden","true"),this.popperInstance.disableEventListeners(),clearTimeout(this._disposeTimer);var t=Ae.options.disposeTimeout;return null!==t&&(this._disposeTimer=setTimeout(function(){e._tooltipNode&&(e._tooltipNode.removeEventListener("mouseenter",e.hide),e._tooltipNode.removeEventListener("click",e.hide),e._tooltipNode.parentNode.removeChild(e._tooltipNode),e._tooltipNode=null)},t)),this}},{key:"_dispose",value:function(){var e=this;return this._isDisposed=!0,this._events.forEach(function(t){var n=t.func,o=t.event;e.reference.removeEventListener(o,n)}),this._events=[],this._tooltipNode?(this._hide(),this._tooltipNode.removeEventListener("mouseenter",this.hide),this._tooltipNode.removeEventListener("click",this.hide),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)):this._noLongerOpen(),this}},{key:"_findContainer",value:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}},{key:"_append",value:function(e,t){t.appendChild(e)}},{key:"_setEventListeners",value:function(e,t,n){var o=this,r=[],i=[];t.forEach(function(e){switch(e){case"hover":r.push("mouseenter"),i.push("mouseleave");break;case"focus":r.push("focus"),i.push("blur");break;case"click":r.push("click"),i.push("click")}}),r.forEach(function(t){var r=function(t){!0!==o._isOpen&&(t.usedByTooltip=!0,o._scheduleShow(e,n.delay,n,t))};o._events.push({event:t,func:r}),e.addEventListener(t,r)}),i.forEach(function(t){var r=function(t){!0!==t.usedByTooltip&&o._scheduleHide(e,n.delay,n,t)};o._events.push({event:t,func:r}),e.addEventListener(t,r)})}},{key:"_onDocumentTouch",value:function(e){this._enableDocumentTouch&&this._scheduleHide(this.reference,this.options.delay,this.options,e)}},{key:"_scheduleShow",value:function(e,t,n){var o=this,r=t&&t.show||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout(function(){return o._show(e,n)},r)}},{key:"_scheduleHide",value:function(e,t,n,o){var r=this,i=t&&t.hide||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout(function(){!1!==r._isOpen&&document.body.contains(r._tooltipNode)&&("mouseleave"===o.type&&r._setTooltipNodeEvent(o,e,t,n)||r._hide(e,n))},i)}}]),e}(),Le=function(){var e=this;this.show=function(){e._show(e.reference,e.options)},this.hide=function(){e._hide()},this.dispose=function(){e._dispose()},this.toggle=function(){return e._isOpen?e.hide():e.show()},this.arrowSelector=".tooltip-arrow, .tooltip__arrow",this.innerSelector=".tooltip-inner, .tooltip__inner",this._events=[],this._setTooltipNodeEvent=function(t,n,o,r){var i=t.relatedreference||t.toElement;return!!e._tooltipNode.contains(i)&&(e._tooltipNode.addEventListener(t.type,function o(i){var s=i.relatedreference||i.toElement;e._tooltipNode.removeEventListener(t.type,o),n.contains(s)||e._scheduleHide(n,r.delay,r,i)}),!0)}};"undefined"!=typeof document&&document.addEventListener("touchstart",function(e){for(var t=0;t
',defaultDelay:0,defaultTrigger:"hover focus",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},autoHide:!0,disposeTimeout:5e3,popover:{defaultPlacement:"bottom",defaultClass:"vue-popover-theme",defaultDelay:0,defaultTrigger:"click",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultAutoHide:!0,defaultHandleResize:!0}},Ae={options:Se,bind:te,update:te,unbind:function(e){ee(e)}},Ie=void 0,De={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{notify:function(){this.$emit("notify")},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.notify),this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||this.notify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!Ie&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.notify),delete this._resizeObject.onload)}},mounted:function(){var e=this;oe(),this.$nextTick(function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight});var t=document.createElement("object");this._resizeObject=t,t.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),t.setAttribute("aria-hidden","true"),t.onload=this.addResizeHandlers,t.type="text/html",Ie&&this.$el.appendChild(t),t.data="about:blank",Ie||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}},Pe={version:"0.4.3",install:function(e){e.component("resize-observer",De)}},He=null;"undefined"!=typeof window?He=window.Vue:"undefined"!=typeof global&&(He=global.Vue),He&&He.use(Pe);var Me=!1;"undefined"!=typeof window&&"undefined"!=typeof navigator&&(Me=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var Be={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-popover",class:e.cssClass},[n("span",{ref:"trigger",staticClass:"trigger",staticStyle:{display:"inline-block"},attrs:{"aria-describedby":e.popoverId}},[e._t("default")],2),e._v(" "),n("div",{ref:"popover",staticClass:"tooltip popover",class:[e.cssClass,e.popoverClass],style:{display:e.isOpen?"":"none"},attrs:{id:e.popoverId,"aria-hidden":e.isOpen?"false":"true"}},[n("div",{staticClass:"wrapper"},[n("div",{ref:"arrow",staticClass:"tooltip-arrow popover-arrow"}),e._v(" "),n("div",{ref:"inner",staticClass:"tooltip-inner popover-inner",staticStyle:{position:"relative"}},[n("div",[e._t("popover")],2),e._v(" "),e.handleResize?n("ResizeObserver",{on:{notify:e.$_handleResize}}):e._e()],1)])])])},staticRenderFns:[],name:"VPopover",components:{ResizeObserver:De},props:{open:{type:Boolean,default:!1},placement:{type:String,default:function(){return re("defaultPlacement")}},delay:{type:[String,Number,Object],default:function(){return re("defaultDelay")}},offset:{type:[String,Number],default:function(){return re("defaultOffset")}},trigger:{type:String,default:function(){return re("defaultTrigger")}},container:{type:[String,Object,Element],default:function(){return re("defaultContainer")}},boundariesElement:{type:Element,default:function(){return re("defaultBoundariesElement")}},popperOptions:{type:Object,default:function(){return re("defaultPopperOptions")}},popoverClass:{type:[String,Array],default:function(){return re("defaultClass")}},autoHide:{type:Boolean,default:function(){return Ae.options.popover.defaultAutoHide}},handleResize:{type:Boolean,default:function(){return Ae.options.popover.defaultHandleResize}}},data:function(){return{isOpen:!1,id:Math.random().toString(36).substr(2,10)}},computed:{cssClass:function(){return{open:this.isOpen}},popoverId:function(){return"popover_"+this.id}},watch:{open:function(e){e?this.show():this.hide()},container:function(e){if(this.isOpen&&this.popperInstance){var t=this.$refs.popover,n=this.$_findContainer(this.container,reference);if(!n)return void console.warn("No container for popover",this);n.appendChild(t),this.popperInstance.update()}},trigger:function(e){this.$_removeEventListeners(),this.$_addEventListeners()},offset:function(e){var t=this;this.$_updatePopper(function(){if(e){var n=t.$_getOffset();t.popperInstance.options.modifiers.offset={offset:n}}else t.popperInstance.options.modifiers.offset=void 0})},placement:function(e){var t=this;this.$_updatePopper(function(){t.popperInstance.options.placement=e})},boundariesElement:"$_restartPopper",popperOptions:{handler:"$_restartPopper",deep:!0}},created:function(){this.$_isDisposed=!1,this.$_mounted=!1,this.$_events=[]},mounted:function(){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e),this.$_init(),this.open&&this.show()},beforeDestroy:function(){this.dispose()},methods:{show:function(){var e=this,t=this.$refs.trigger,n=this.$refs.popover;if(clearTimeout(this.$_disposeTimer),!this.isOpen){if(this.popperInstance&&(this.isOpen=!0,this.popperInstance.enableEventListeners(),this.popperInstance.update(),this.$_addGlobalEvents()),!this.$_mounted){var o=this.$_findContainer(this.container,t);if(!o)return void console.warn("No container for popover",this);o.appendChild(n),this.$_mounted=!0}if(!this.popperInstance){var r=$e({},this.popperOptions,{placement:this.placement});if(r.modifiers=$e({},r.modifiers,{arrow:{element:this.$refs.arrow}}),this.offset){var i=this.$_getOffset();r.modifiers.offset={offset:i}}this.boundariesElement&&(r.modifiers.preventOverflow={boundariesElement:this.boundariesElement}),this.popperInstance=new we(t,n,r),requestAnimationFrame(function(){!e.$_isDisposed&&e.popperInstance?(e.popperInstance.update(),requestAnimationFrame(function(){e.$_isDisposed?e.dispose():(e.isOpen=!0,e.$_addGlobalEvents())})):e.dispose()})}this.$emit("update:open",!0),this.$emit("show")}},hide:function(){var e=this;if(this.isOpen){this.isOpen=!1,this.popperInstance.disableEventListeners(),this.$_removeGlobalEvents(),clearTimeout(this.$_disposeTimer);var t=Ae.options.popover.disposeTimeout||Ae.options.disposeTimeout;null!==t&&(this.$_disposeTimer=setTimeout(function(){var t=e.$refs.popover;t&&(t.parentNode&&t.parentNode.removeChild(t),e.$_mounted=!1)},t)),this.$emit("update:open",!1),this.$emit("hide")}},dispose:function(){if(this.$_isDisposed=!0,this.$_removeEventListeners(),this.$_removeGlobalEvents(),this.popperInstance&&(this.hide(),this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy)){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e)}this.$_mounted=!1,this.$emit("dispose")},$_init:function(){-1===this.trigger.indexOf("manual")&&this.$_addEventListeners()},$_findContainer:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e},$_getOffset:function(){var e=Oe(this.offset),t=this.offset;return("number"===e||"string"===e&&-1===t.indexOf(","))&&(t="0, "+t),t},$_addEventListeners:function(){var e=this,t=this.$refs.trigger,n=[],o=[];("string"==typeof this.trigger?this.trigger.split(" ").filter(function(e){return-1!==["click","hover","focus"].indexOf(e)}):[]).forEach(function(e){switch(e){case"hover":n.push("mouseenter"),o.push("mouseleave");break;case"focus":n.push("focus"),o.push("blur");break;case"click":n.push("click"),o.push("click")}}),n.forEach(function(n){var o=function(t){e.isOpen||(t.usedByTooltip=!0,e.$_scheduleShow(t))};e.$_events.push({event:n,func:o}),t.addEventListener(n,o)}),o.forEach(function(n){var o=function(t){t.usedByTooltip||e.$_scheduleHide(t)};e.$_events.push({event:n,func:o}),t.addEventListener(n,o)})},$_scheduleShow:function(e){var t=parseInt(this.delay&&this.delay.show||this.delay||0);clearTimeout(this.$_scheduleTimer),this.$_scheduleTimer=setTimeout(this.show.bind(this),t)},$_scheduleHide:function(e){var t=this,n=parseInt(this.delay&&this.delay.hide||this.delay||0);clearTimeout(this.$_scheduleTimer),this.$_scheduleTimer=setTimeout(function(){t.isOpen&&("mouseleave"===e.type&&t.$_setTooltipNodeEvent(e)||t.hide())},n)},$_setTooltipNodeEvent:function(e){var t=this,n=this.$refs.trigger,o=this.$refs.popover,r=e.relatedreference||e.toElement;return!!o.contains(r)&&(o.addEventListener(e.type,function r(i){var s=i.relatedreference||i.toElement;o.removeEventListener(e.type,r),n.contains(s)||t.$_scheduleHide(i)}),!0)},$_removeEventListeners:function(){var e=this.$refs.trigger;this.$_events.forEach(function(t){var n=t.func,o=t.event;e.removeEventListener(o,n)}),this.$_events=[]},$_addGlobalEvents:function(){this.autoHide&&(Me?document.addEventListener("touchstart",this.$_handleWindowClick):window.addEventListener("click",this.$_handleWindowClick))},$_removeGlobalEvents:function(){Me?document.removeEventListener("touchstart",this.$_handleWindowClick):window.removeEventListener("click",this.$_handleWindowClick)},$_updatePopper:function(e){this.isOpen&&this.popperInstance&&(e(),this.popperInstance.update())},$_restartPopper:function(){if(this.popperInstance){var e=this.isOpen;this.dispose(),this.$_init(),e&&this.show()}},$_handleWindowClick:function(e){var t=this.$refs.popover;!e.closePopover&&t.contains(e.target)||(this.$_scheduleHide(e),this.$emit("auto-hide"))},$_handleResize:function(){this.isOpen&&this.popperInstance&&(this.popperInstance.update(),this.$emit("resize"))}}},We="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ze=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e,t){function n(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function r(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function i(e,t){for(var n=-1,o=e?e.length:0;++n-1&&e%1==0&&e-1&&e%1==0&&e<=me}function ue(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function fe(e){return!!e&&"object"==typeof e}function ce(e){if(!fe(e)||ct.call(e)!=Te||c(e))return!1;var t=vt(e);if(null===t)return!0;var n=ut.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&at.call(n)==ft}function pe(e){return z(e,de(e))}function le(e){return re(e)?g(e):j(e)}function de(e){return re(e)?g(e,!0):C(e)}var he=200,ve="__lodash_hash_undefined__",me=9007199254740991,be="[object Arguments]",ge="[object Boolean]",ye="[object Date]",_e="[object Function]",we="[object GeneratorFunction]",Oe="[object Map]",Ee="[object Number]",Te="[object Object]",$e="[object RegExp]",xe="[object Set]",je="[object String]",Ce="[object Symbol]",Le="[object WeakMap]",Ne="[object ArrayBuffer]",ke="[object DataView]",Se="[object Float32Array]",Ae="[object Float64Array]",Ie="[object Int8Array]",De="[object Int16Array]",Pe="[object Int32Array]",He="[object Uint8Array]",Me="[object Uint8ClampedArray]",Be="[object Uint16Array]",ze="[object Uint32Array]",Re=/\w*$/,Fe=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Ue={};Ue[Se]=Ue[Ae]=Ue[Ie]=Ue[De]=Ue[Pe]=Ue[He]=Ue[Me]=Ue[Be]=Ue[ze]=!0,Ue[be]=Ue["[object Array]"]=Ue[Ne]=Ue[ge]=Ue[ke]=Ue[ye]=Ue["[object Error]"]=Ue[_e]=Ue[Oe]=Ue[Ee]=Ue[Te]=Ue[$e]=Ue[xe]=Ue[je]=Ue[Le]=!1;var qe={};qe[be]=qe["[object Array]"]=qe[Ne]=qe[ke]=qe[ge]=qe[ye]=qe[Se]=qe[Ae]=qe[Ie]=qe[De]=qe[Pe]=qe[Oe]=qe[Ee]=qe[Te]=qe[$e]=qe[xe]=qe[je]=qe[Ce]=qe[He]=qe[Me]=qe[Be]=qe[ze]=!0,qe["[object Error]"]=qe[_e]=qe[Le]=!1;var Ge="object"==typeof We&&We&&We.Object===Object&&We,Ye="object"==typeof self&&self&&self.Object===Object&&self,Ke=Ge||Ye||Function("return this")(),Xe=t&&!t.nodeType&&t,Je=Xe&&!0&&e&&!e.nodeType&&e,Qe=Je&&Je.exports===Xe,Ze=Qe&&Ge.process,et=function(){try{return Ze&&Ze.binding("util")}catch(e){}}(),tt=et&&et.isTypedArray,nt=Array.prototype,ot=Function.prototype,rt=Object.prototype,it=Ke["__core-js_shared__"],st=function(){var e=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),at=ot.toString,ut=rt.hasOwnProperty,ft=at.call(Object),ct=rt.toString,pt=RegExp("^"+at.call(ut).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lt=Qe?Ke.Buffer:void 0,dt=Ke.Symbol,ht=Ke.Uint8Array,vt=l(Object.getPrototypeOf,Object),mt=Object.create,bt=rt.propertyIsEnumerable,gt=nt.splice,yt=Object.getOwnPropertySymbols,_t=lt?lt.isBuffer:void 0,wt=l(Object.keys,Object),Ot=Math.max,Et=U(Ke,"DataView"),Tt=U(Ke,"Map"),$t=U(Ke,"Promise"),xt=U(Ke,"Set"),jt=U(Ke,"WeakMap"),Ct=U(Object,"create"),Lt=te(Et),Nt=te(Tt),kt=te($t),St=te(xt),At=te(jt),It=dt?dt.prototype:void 0,Dt=It?It.valueOf:void 0;h.prototype.clear=function(){this.__data__=Ct?Ct(null):{}},h.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},h.prototype.get=function(e){var t=this.__data__;if(Ct){var n=t[e];return n===ve?void 0:n}return ut.call(t,e)?t[e]:void 0},h.prototype.has=function(e){var t=this.__data__;return Ct?void 0!==t[e]:ut.call(t,e)},h.prototype.set=function(e,t){return this.__data__[e]=Ct&&void 0===t?ve:t,this},v.prototype.clear=function(){this.__data__=[]},v.prototype.delete=function(e){var t=this.__data__,n=w(t,e);return!(n<0||(n==t.length-1?t.pop():gt.call(t,n,1),0))},v.prototype.get=function(e){var t=this.__data__,n=w(t,e);return n<0?void 0:t[n][1]},v.prototype.has=function(e){return w(this.__data__,e)>-1},v.prototype.set=function(e,t){var n=this.__data__,o=w(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},m.prototype.clear=function(){this.__data__={hash:new h,map:new(Tt||v),string:new h}},m.prototype.delete=function(e){return V(this,e).delete(e)},m.prototype.get=function(e){return V(this,e).get(e)},m.prototype.has=function(e){return V(this,e).has(e)},m.prototype.set=function(e,t){return V(this,e).set(e,t),this},b.prototype.clear=function(){this.__data__=new v},b.prototype.delete=function(e){return this.__data__.delete(e)},b.prototype.get=function(e){return this.__data__.get(e)},b.prototype.has=function(e){return this.__data__.has(e)},b.prototype.set=function(e,t){var n=this.__data__;if(n instanceof v){var o=n.__data__;if(!Tt||o.length1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,s&&X(n[0],n[1],s)&&(i=r<3?void 0:i,r=1),t=Object(t);++o1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var o=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||o)[t]}return e[t]}function f(e,t){var n="x"===t?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+o+"Width"],10)}function c(e,t,n,o){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],J()?n["offset"+e]+o["margin"+("Height"===e?"Top":"Left")]+o["margin"+("Height"===e?"Bottom":"Right")]:0)}function p(){var e=document.body,t=document.documentElement,n=J()&&getComputedStyle(t);return{height:c("Height",e,t,n),width:c("Width",e,t,n)}}function l(e){return te({},e,{right:e.left+e.width,bottom:e.top+e.height})}function d(e){var t={};if(J())try{t=e.getBoundingClientRect();var o=u(e,"top"),i=u(e,"left");t.top+=o,t.left+=i,t.bottom+=o,t.right+=i}catch(e){}else t=e.getBoundingClientRect();var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s="HTML"===e.nodeName?p():{},a=s.width||e.clientWidth||r.right-r.left,c=s.height||e.clientHeight||r.bottom-r.top,d=e.offsetWidth-a,h=e.offsetHeight-c;if(d||h){var v=n(e);d-=f(v,"x"),h-=f(v,"y"),r.width-=d,r.height-=h}return l(r)}function h(e,t){var o=J(),r="HTML"===t.nodeName,s=d(e),a=d(t),f=i(e),c=n(t),p=parseFloat(c.borderTopWidth,10),h=parseFloat(c.borderLeftWidth,10),v=l({top:s.top-a.top-p,left:s.left-a.left-h,width:s.width,height:s.height});if(v.marginTop=0,v.marginLeft=0,!o&&r){var m=parseFloat(c.marginTop,10),g=parseFloat(c.marginLeft,10);v.top-=p-m,v.bottom-=p-m,v.left-=h-g,v.right-=h-g,v.marginTop=m,v.marginLeft=g}return(o?t.contains(f):t===f&&"BODY"!==f.nodeName)&&(v=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=u(t,"top"),i=u(t,"left"),r=n?-1:1;return e.top+=o*r,e.bottom+=o*r,e.left+=i*r,e.right+=i*r,e}(v,t)),v}function v(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===n(e,"position")||v(o(e)))}function m(e,t,n,r){var s={top:0,left:0},f=a(e,t);if("viewport"===r)s=function(e){var t=e.ownerDocument.documentElement,n=h(e,t),o=Math.max(t.clientWidth,window.innerWidth||0),i=Math.max(t.clientHeight,window.innerHeight||0),r=u(t),s=u(t,"left");return l({top:r-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:o,height:i})}(f);else{var c=void 0;"scrollParent"===r?"BODY"===(c=i(o(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===r?e.ownerDocument.documentElement:r;var d=h(c,f);if("HTML"!==c.nodeName||v(f))s=d;else{var m=p(),g=m.height,b=m.width;s.top+=d.top-d.marginTop,s.bottom=g+d.top,s.left+=d.left-d.marginLeft,s.right=b+d.left}}return s.left+=n,s.top+=n,s.right-=n,s.bottom-=n,s}function g(e,t,n,o,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=m(n,o,r,i),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},u=Object.keys(a).map(function(e){return te({key:e},a[e],{area:function(e){return e.width*e.height}(a[e])})}).sort(function(e,t){return t.area-e.area}),f=u.filter(function(e){var t=e.width,o=e.height;return t>=n.clientWidth&&o>=n.clientHeight}),c=f.length>0?f[0].key:u[0].key,p=e.split("-")[1];return c+(p?"-"+p:"")}function b(e,t,n){return h(n,a(t,n))}function y(e){var t=getComputedStyle(e),n=parseFloat(t.marginTop)+parseFloat(t.marginBottom),o=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+o,height:e.offsetHeight+n}}function _(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function w(e,t,n){n=n.split("-")[0];var o=y(e),i={width:o.width,height:o.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",u=r?"height":"width",f=r?"width":"height";return i[s]=t[s]+t[u]/2-o[u]/2,i[a]=n===a?t[a]-o[f]:t[_(a)],i}function O(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function E(e,n,o){return(void 0===o?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var o=O(e,function(e){return e[t]===n});return e.indexOf(o)}(e,"name",o))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=e.function||e.fn;e.enabled&&t(o)&&(n.offsets.popper=l(n.offsets.popper),n.offsets.reference=l(n.offsets.reference),n=o(n,e))}),n}function T(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function $(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=oe.indexOf(e),o=oe.slice(n+1).concat(oe.slice(0,n));return t?o.reverse():o}function I(e,t,n,o){var i=[0,0],r=-1!==["right","left"].indexOf(o),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(O(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,f=-1!==a?[s.slice(0,a).concat([s[a].split(u)[0]]),[s[a].split(u)[1]].concat(s.slice(a+1))]:[s];return(f=f.map(function(e,o){var i=(1===o?!r:r)?"height":"width",s=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,o){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],s=i[2];if(!r)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=o}return l(a)[t]/100*r}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r;return r}(e,i,t,n)})})).forEach(function(e,t){e.forEach(function(n,o){x(n)&&(i[t]+=n*("-"===e[o-1]?-1:1))})}),i}function D(e){return"string"==typeof e&&(e=e.split(" ")),e}function P(e,t){var n=D(t),o=void 0;o=o instanceof SVGAnimatedString?Array.from(o):D(e.className),n.forEach(function(e){-1===o.indexOf(e)&&o.push(e)}),e instanceof SVGElement?e.setAttribute("class",o.join(" ")):e.className=o.join(" ")}function H(e){var t={placement:void 0!==e.placement?e.placement:_e.options.defaultPlacement,delay:void 0!==e.delay?e.delay:_e.options.defaultDelay,template:void 0!==e.template?e.template:_e.options.defaultTemplate,trigger:void 0!==e.trigger?e.trigger:_e.options.defaultTrigger,offset:void 0!==e.offset?e.offset:_e.options.defaultOffset,container:void 0!==e.container?e.container:_e.options.defaultContainer,boundariesElement:void 0!==e.boundariesElement?e.boundariesElement:_e.options.defaultBoundariesElement,popperOptions:le({},void 0!==e.popperOptions?e.popperOptions:_e.options.defaultPopperOptions)};if(t.offset){var n=fe(t.offset),o=t.offset;("number"===n||"string"===n&&-1===o.indexOf(","))&&(o="0, "+o),t.popperOptions.modifiers||(t.popperOptions.modifiers={}),t.popperOptions.modifiers.offset={offset:o}}return t}function M(e,t){for(var n=e.placement,o=0;o0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}())}function R(e){var t=_e.options.popover[e];return void 0===t?_e.options[e]:t}function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!V.installed){V.installed=!0;var n={};Ce(n,ye,t),_e.options=n,e.directive("tooltip",_e),e.component("v-popover",je)}}for(var U="undefined"!=typeof window&&"undefined"!=typeof document,q=["Edge","Trident","Firefox"],G=0,Y=0;Y=0){G=1;break}var K=U&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},G))}},X=void 0,J=function(){return void 0===X&&(X=-1!==navigator.appVersion.indexOf("MSIE 10")),X},Q=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Z=function(){function e(e,t){for(var n=0;no[e]&&!t.escapeWithReference&&(i=Math.min(s[n],o[e]-("right"===e?s.width:s.height))),ee({},n,i)}};return i.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";s=te({},s,a[t](e))}),e.offsets.popper=s,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,o=t.reference,i=e.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(i),a=s?"right":"bottom",u=s?"left":"top",f=s?"width":"height";return n[a]r(o[a])&&(e.offsets.popper[u]=r(o[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var o;if(!S(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],s=e.offsets,a=s.popper,u=s.reference,f=-1!==["left","right"].indexOf(r),c=f?"height":"width",p=f?"Top":"Left",d=p.toLowerCase(),h=f?"left":"top",v=f?"bottom":"right",m=y(i)[c];u[v]-ma[v]&&(e.offsets.popper[d]+=u[d]+m-a[v]),e.offsets.popper=l(e.offsets.popper);var g=u[d]+u[c]/2-m/2,b=n(e.instance.popper),_=parseFloat(b["margin"+p],10),w=parseFloat(b["border"+p+"Width"],10),O=g-e.offsets.popper[d]-_-w;return O=Math.max(Math.min(a[c]-m,O),0),e.arrowElement=i,e.offsets.arrow=(o={},ee(o,d,Math.round(O)),ee(o,h,""),o),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(T(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=m(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),o=e.placement.split("-")[0],i=_(o),r=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case ie.FLIP:s=[o,i];break;case ie.CLOCKWISE:s=A(o);break;case ie.COUNTERCLOCKWISE:s=A(o,!0);break;default:s=t.behavior}return s.forEach(function(a,u){if(o!==a||s.length===u+1)return e;o=e.placement.split("-")[0],i=_(o);var f=e.offsets.popper,c=e.offsets.reference,p=Math.floor,l="left"===o&&p(f.right)>p(c.left)||"right"===o&&p(f.left)p(c.top)||"bottom"===o&&p(f.top)p(n.right),v=p(f.top)p(n.bottom),g="left"===o&&d||"right"===o&&h||"top"===o&&v||"bottom"===o&&m,b=-1!==["top","bottom"].indexOf(o),y=!!t.flipVariations&&(b&&"start"===r&&d||b&&"end"===r&&h||!b&&"start"===r&&v||!b&&"end"===r&&m);(l||g||y)&&(e.flipped=!0,(l||g)&&(o=s[u+1]),y&&(r=function(e){return"end"===e?"start":"start"===e?"end":e}(r)),e.placement=o+(r?"-"+r:""),e.offsets.popper=te({},e.offsets.popper,w(e.instance.popper,e.offsets.reference,e.placement)),e=E(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],o=e.offsets,i=o.popper,r=o.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return i[s?"left":"top"]=r[n]-(a?i[s?"width":"height"]:0),e.placement=_(t),e.offsets.popper=l(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!S(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=O(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottomn.right||t.top>n.bottom||t.right2&&void 0!==arguments[2]?arguments[2]:{};Q(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=K(this.update.bind(this)),this.options=te({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=n&&n.jquery?n[0]:n,this.popper=o&&o.jquery?o[0]:o,this.options.modifiers={},Object.keys(te({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){i.options.modifiers[t]=te({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return te({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&t(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return Z(e,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=b(this.state,this.popper,this.reference),e.placement=g(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=w(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position="absolute",e=E(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,T(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.left="",this.popper.style.position="",this.popper.style.top="",this.popper.style[$("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return C.call(this)}},{key:"disableEventListeners",value:function(){return N.call(this)}}]),e}();se.Utils=("undefined"!=typeof window?window:global).PopperUtils,se.placements=ne,se.Defaults=re;var ae=!1;if("undefined"!=typeof window){ae=!1;try{var ue=Object.defineProperty({},"passive",{get:function(){ae=!0}});window.addEventListener("test",null,ue)}catch(e){}}var fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},pe=function(){function e(e,t){for(var n=0;n
',trigger:"hover focus",offset:0},he=[],ve=function(){function e(t,n){ce(this,e),me.call(this),n=le({},de,n),t.jquery&&(t=t[0]),this.reference=t,this.options=n,this._isOpen=!1,this._init()}return pe(e,[{key:"setClasses",value:function(e){this._classes=e}},{key:"setContent",value:function(e){if(this.options.title=e,this._tooltipNode){var t=this._tooltipNode.querySelector(this.innerSelector);t&&(t.innerHTML=e||"",this.popperInstance.update())}}},{key:"setOptions",value:function(e){var t=!1,n=e&&e.classes||_e.options.defaultClass;this._classes!==n&&(this.setClasses(n),t=!0),e=H(e);var o=!1,i=!1;this.options.offset===e.offset&&this.options.placement===e.placement||(o=!0),(this.options.template!==e.template||this.options.trigger!==e.trigger||this.options.container!==e.container||t)&&(i=!0);for(var r in e)this.options[r]=e[r];if(this._tooltipNode)if(i){var s=this._isOpen;this.dispose(),this._init(),s&&this.show()}else o&&this.popperInstance.update()}},{key:"_init",value:function(){var e="string"==typeof this.options.trigger?this.options.trigger.split(" ").filter(function(e){return-1!==["click","hover","focus"].indexOf(e)}):[];this._isDisposed=!1,this._enableDocumentTouch=-1===e.indexOf("manual"),this._setEventListeners(this.reference,e,this.options)}},{key:"_create",value:function(e,t,n,o){var i=window.document.createElement("div");i.innerHTML=t.trim();var r=i.childNodes[0];r.id="tooltip_"+Math.random().toString(36).substr(2,10),r.setAttribute("aria-hidden","true");var s=i.querySelector(this.innerSelector);if(1===n.nodeType)o&&s.appendChild(n);else if("function"==typeof n){var a=n.call(e);o?s.innerHTML=a:s.innerText=a}else o?s.innerHTML=n:s.innerText=n;return _e.options.autoHide&&-1!==this.options.trigger.indexOf("hover")&&(r.addEventListener("mouseenter",this.hide),r.addEventListener("click",this.hide)),r}},{key:"_show",value:function(e,t){if(t&&"string"==typeof t.container){if(!document.querySelector(t.container))return}clearTimeout(this._disposeTimer),delete(t=Object.assign({},t)).offset;var n=!0;this._tooltipNode&&(P(this._tooltipNode,this._classes),n=!1);var o=this._ensureShown(e,t);return n&&this._tooltipNode&&P(this._tooltipNode,this._classes),o}},{key:"_ensureShown",value:function(e,t){var n=this;if(this._isOpen)return this;if(this._isOpen=!0,he.push(this),this._tooltipNode)return this._tooltipNode.style.display="",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.enableEventListeners(),this.popperInstance.update(),this;var o=e.getAttribute("title")||t.title;if(!o)return this;var i=this._create(e,t.template,o,t.html);e.setAttribute("aria-describedby",i.id);var r=this._findContainer(t.container,e);this._append(i,r);var s=le({},t.popperOptions,{placement:t.placement});return s.modifiers=le({},s.modifiers,{arrow:{element:this.arrowSelector}}),t.boundariesElement&&(s.modifiers.preventOverflow={boundariesElement:t.boundariesElement}),this.popperInstance=new se(e,i,s),this._tooltipNode=i,requestAnimationFrame(function(){!n._isDisposed&&n.popperInstance?(n.popperInstance.update(),requestAnimationFrame(function(){n._isDisposed?n.dispose():n._isOpen&&i.setAttribute("aria-hidden","false")})):n.dispose()}),this}},{key:"_noLongerOpen",value:function(){var e=he.indexOf(this);-1!==e&&he.splice(e,1)}},{key:"_hide",value:function(){var e=this;if(!this._isOpen)return this;this._isOpen=!1,this._noLongerOpen(),this._tooltipNode.style.display="none",this._tooltipNode.setAttribute("aria-hidden","true"),this.popperInstance.disableEventListeners(),clearTimeout(this._disposeTimer);var t=_e.options.disposeTimeout;return null!==t&&(this._disposeTimer=setTimeout(function(){e._tooltipNode&&(e._tooltipNode.removeEventListener("mouseenter",e.hide),e._tooltipNode.removeEventListener("click",e.hide),e._tooltipNode.parentNode.removeChild(e._tooltipNode),e._tooltipNode=null)},t)),this}},{key:"_dispose",value:function(){var e=this;return this._isDisposed=!0,this._events.forEach(function(t){var n=t.func,o=t.event;e.reference.removeEventListener(o,n)}),this._events=[],this._tooltipNode?(this._hide(),this._tooltipNode.removeEventListener("mouseenter",this.hide),this._tooltipNode.removeEventListener("click",this.hide),this.popperInstance.destroy(),this.popperInstance.options.removeOnDestroy||(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)):this._noLongerOpen(),this}},{key:"_findContainer",value:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e}},{key:"_append",value:function(e,t){t.appendChild(e)}},{key:"_setEventListeners",value:function(e,t,n){var o=this,i=[],r=[];t.forEach(function(e){switch(e){case"hover":i.push("mouseenter"),r.push("mouseleave");break;case"focus":i.push("focus"),r.push("blur");break;case"click":i.push("click"),r.push("click")}}),i.forEach(function(t){var i=function(t){!0!==o._isOpen&&(t.usedByTooltip=!0,o._scheduleShow(e,n.delay,n,t))};o._events.push({event:t,func:i}),e.addEventListener(t,i)}),r.forEach(function(t){var i=function(t){!0!==t.usedByTooltip&&o._scheduleHide(e,n.delay,n,t)};o._events.push({event:t,func:i}),e.addEventListener(t,i)})}},{key:"_onDocumentTouch",value:function(e){this._enableDocumentTouch&&this._scheduleHide(this.reference,this.options.delay,this.options,e)}},{key:"_scheduleShow",value:function(e,t,n){var o=this,i=t&&t.show||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout(function(){return o._show(e,n)},i)}},{key:"_scheduleHide",value:function(e,t,n,o){var i=this,r=t&&t.hide||t||0;clearTimeout(this._scheduleTimer),this._scheduleTimer=window.setTimeout(function(){if(!1!==i._isOpen&&document.body.contains(i._tooltipNode)){if("mouseleave"===o.type){if(i._setTooltipNodeEvent(o,e,t,n))return}i._hide(e,n)}},r)}}]),e}(),me=function(){var e=this;this.show=function(){e._show(e.reference,e.options)},this.hide=function(){e._hide()},this.dispose=function(){e._dispose()},this.toggle=function(){return e._isOpen?e.hide():e.show()},this.arrowSelector=".tooltip-arrow, .tooltip__arrow",this.innerSelector=".tooltip-inner, .tooltip__inner",this._events=[],this._setTooltipNodeEvent=function(t,n,o,i){var r=t.relatedreference||t.toElement,s=function o(r){var s=r.relatedreference||r.toElement;e._tooltipNode.removeEventListener(t.type,o),n.contains(s)||e._scheduleHide(n,i.delay,i,r)};return!!e._tooltipNode.contains(r)&&(e._tooltipNode.addEventListener(t.type,s),!0)}};"undefined"!=typeof document&&document.addEventListener("touchstart",function(e){for(var t=0;t
',defaultDelay:0,defaultTrigger:"hover focus",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},autoHide:!0,disposeTimeout:5e3,popover:{defaultPlacement:"bottom",defaultClass:"vue-popover-theme",defaultDelay:0,defaultTrigger:"click",defaultOffset:0,defaultContainer:"body",defaultBoundariesElement:void 0,defaultPopperOptions:{},defaultAutoHide:!0,defaultHandleResize:!0}},_e={options:ye,bind:F,update:F,unbind:function(e){B(e)}},we=void 0,Oe={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{notify:function(){this.$emit("notify")},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.notify),this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||this.notify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!we&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.notify),delete this._resizeObject.onload)}},mounted:function(){var e=this;z(),this.$nextTick(function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight});var t=document.createElement("object");this._resizeObject=t,t.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),t.setAttribute("aria-hidden","true"),t.onload=this.addResizeHandlers,t.type="text/html",we&&this.$el.appendChild(t),t.data="about:blank",we||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}},Ee={version:"0.4.3",install:function(e){e.component("resize-observer",Oe)}},Te=null;"undefined"!=typeof window?Te=window.Vue:"undefined"!=typeof global&&(Te=global.Vue),Te&&Te.use(Ee);var $e=!1;"undefined"!=typeof window&&"undefined"!=typeof navigator&&($e=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var je={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-popover",class:e.cssClass},[n("span",{ref:"trigger",staticClass:"trigger",staticStyle:{display:"inline-block"},attrs:{"aria-describedby":e.popoverId}},[e._t("default")],2),e._v(" "),n("div",{ref:"popover",staticClass:"tooltip popover",class:[e.cssClass,e.popoverClass],style:{display:e.isOpen?"":"none"},attrs:{id:e.popoverId,"aria-hidden":e.isOpen?"false":"true"}},[n("div",{staticClass:"wrapper"},[n("div",{ref:"arrow",staticClass:"tooltip-arrow popover-arrow"}),e._v(" "),n("div",{ref:"inner",staticClass:"tooltip-inner popover-inner",staticStyle:{position:"relative"}},[n("div",[e._t("popover")],2),e._v(" "),e.handleResize?n("ResizeObserver",{on:{notify:e.$_handleResize}}):e._e()],1)])])])},staticRenderFns:[],name:"VPopover",components:{ResizeObserver:Oe},props:{open:{type:Boolean,default:!1},placement:{type:String,default:function(){return R("defaultPlacement")}},delay:{type:[String,Number,Object],default:function(){return R("defaultDelay")}},offset:{type:[String,Number],default:function(){return R("defaultOffset")}},trigger:{type:String,default:function(){return R("defaultTrigger")}},container:{type:[String,Object,Element],default:function(){return R("defaultContainer")}},boundariesElement:{type:Element,default:function(){return R("defaultBoundariesElement")}},popperOptions:{type:Object,default:function(){return R("defaultPopperOptions")}},popoverClass:{type:[String,Array],default:function(){return R("defaultClass")}},autoHide:{type:Boolean,default:function(){return _e.options.popover.defaultAutoHide}},handleResize:{type:Boolean,default:function(){return _e.options.popover.defaultHandleResize}}},data:function(){return{isOpen:!1,id:Math.random().toString(36).substr(2,10)}},computed:{cssClass:function(){return{open:this.isOpen}},popoverId:function(){return"popover_"+this.id}},watch:{open:function(e){e?this.show():this.hide()},container:function(e){if(this.isOpen&&this.popperInstance){var t=this.$refs.popover,n=this.$_findContainer(this.container,reference);if(!n)return void console.warn("No container for popover",this);n.appendChild(t),this.popperInstance.update()}},trigger:function(e){this.$_removeEventListeners(),this.$_addEventListeners()},offset:function(e){var t=this;this.$_updatePopper(function(){if(e){var n=t.$_getOffset();t.popperInstance.options.modifiers.offset={offset:n}}else t.popperInstance.options.modifiers.offset=void 0})},placement:function(e){var t=this;this.$_updatePopper(function(){t.popperInstance.options.placement=e})},boundariesElement:"$_restartPopper",popperOptions:{handler:"$_restartPopper",deep:!0}},created:function(){this.$_isDisposed=!1,this.$_mounted=!1,this.$_events=[],this.$_preventOpen=!1},mounted:function(){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e),this.$_init(),this.open&&this.show()},beforeDestroy:function(){this.dispose()},methods:{show:function(){var e=this,t=this.$refs.trigger,n=this.$refs.popover;if(clearTimeout(this.$_disposeTimer),!this.isOpen){if(this.popperInstance&&(this.isOpen=!0,this.popperInstance.enableEventListeners(),this.popperInstance.update(),this.$_addGlobalEvents()),!this.$_mounted){var o=this.$_findContainer(this.container,t);if(!o)return void console.warn("No container for popover",this);o.appendChild(n),this.$_mounted=!0}if(!this.popperInstance){var i=le({},this.popperOptions,{placement:this.placement});if(i.modifiers=le({},i.modifiers,{arrow:{element:this.$refs.arrow}}),this.offset){var r=this.$_getOffset();i.modifiers.offset={offset:r}}this.boundariesElement&&(i.modifiers.preventOverflow={boundariesElement:this.boundariesElement}),this.popperInstance=new se(t,n,i),requestAnimationFrame(function(){!e.$_isDisposed&&e.popperInstance?(e.popperInstance.update(),requestAnimationFrame(function(){e.$_isDisposed?e.dispose():(e.isOpen=!0,e.$_addGlobalEvents())})):e.dispose()})}this.$emit("update:open",!0),this.$emit("show")}},hide:function(){var e=this;if(this.isOpen){this.isOpen=!1,this.popperInstance.disableEventListeners(),this.$_removeGlobalEvents(),clearTimeout(this.$_disposeTimer);var t=_e.options.popover.disposeTimeout||_e.options.disposeTimeout;null!==t&&(this.$_disposeTimer=setTimeout(function(){var t=e.$refs.popover;t&&(t.parentNode&&t.parentNode.removeChild(t),e.$_mounted=!1)},t)),this.$emit("update:open",!1),this.$emit("hide")}},dispose:function(){if(this.$_isDisposed=!0,this.$_removeEventListeners(),this.$_removeGlobalEvents(),this.popperInstance&&(this.hide(),this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy)){var e=this.$refs.popover;e.parentNode&&e.parentNode.removeChild(e)}this.$_mounted=!1,this.$emit("dispose")},$_init:function(){-1===this.trigger.indexOf("manual")&&this.$_addEventListeners()},$_findContainer:function(e,t){return"string"==typeof e?e=window.document.querySelector(e):!1===e&&(e=t.parentNode),e},$_getOffset:function(){var e=fe(this.offset),t=this.offset;return("number"===e||"string"===e&&-1===t.indexOf(","))&&(t="0, "+t),t},$_addEventListeners:function(){var e=this,t=this.$refs.trigger,n=[],o=[];("string"==typeof this.trigger?this.trigger.split(" ").filter(function(e){return-1!==["click","hover","focus"].indexOf(e)}):[]).forEach(function(e){switch(e){case"hover":n.push("mouseenter"),o.push("mouseleave");break;case"focus":n.push("focus"),o.push("blur");break;case"click":n.push("click"),o.push("click")}}),n.forEach(function(n){var o=function(t){e.isOpen||(t.usedByTooltip=!0,!e.$_preventOpen&&e.$_scheduleShow(t))};e.$_events.push({event:n,func:o}),t.addEventListener(n,o)}),o.forEach(function(n){var o=function(t){t.usedByTooltip||e.$_scheduleHide(t)};e.$_events.push({event:n,func:o}),t.addEventListener(n,o)})},$_scheduleShow:function(e){var t=parseInt(this.delay&&this.delay.show||this.delay||0);clearTimeout(this.$_scheduleTimer),this.$_scheduleTimer=setTimeout(this.show.bind(this),t)},$_scheduleHide:function(e){var t=this,n=parseInt(this.delay&&this.delay.hide||this.delay||0);clearTimeout(this.$_scheduleTimer),this.$_scheduleTimer=setTimeout(function(){if(t.isOpen){if("mouseleave"===e.type){if(t.$_setTooltipNodeEvent(e))return}t.hide()}},n)},$_setTooltipNodeEvent:function(e){var t=this,n=this.$refs.trigger,o=this.$refs.popover,i=e.relatedreference||e.toElement,r=function i(r){var s=r.relatedreference||r.toElement;o.removeEventListener(e.type,i),n.contains(s)||t.$_scheduleHide(r)};return!!o.contains(i)&&(o.addEventListener(e.type,r),!0)},$_removeEventListeners:function(){var e=this.$refs.trigger;this.$_events.forEach(function(t){var n=t.func,o=t.event;e.removeEventListener(o,n)}),this.$_events=[]},$_addGlobalEvents:function(){this.autoHide&&($e?document.addEventListener("touchstart",this.$_handleWindowTouchstart,!!ae&&{passive:!0}):window.addEventListener("click",this.$_handleWindowClick))},$_removeGlobalEvents:function(){$e?document.removeEventListener("touchstart",this.$_handleWindowTouchstart):window.removeEventListener("click",this.$_handleWindowClick)},$_updatePopper:function(e){this.isOpen&&this.popperInstance&&(e(),this.popperInstance.update())},$_restartPopper:function(){if(this.popperInstance){var e=this.isOpen;this.dispose(),this.$_init(),e&&this.show()}},$_handleWindowClick:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.$refs.popover;!e.closePopover&&n.contains(e.target)||(this.$_scheduleHide(e),this.$emit("auto-hide"),t&&(this.$_preventOpen=!0,document.addEventListener("touchend",this.$_handleWindowTouchend,!!ae&&{passive:!0})))},$_handleWindowTouchstart:function(e){this.$_handleWindowClick(e,!0)},$_handleWindowTouchend:function(e){var t=this;document.removeEventListener("touchend",this.$_handleWindowTouchend),setTimeout(function(){t.$_preventOpen=!1},300)},$_handleResize:function(){this.isOpen&&this.popperInstance&&(this.popperInstance.update(),this.$emit("resize"))}}},Le="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Ce=function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e,t){function n(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function i(e,t){for(var n=-1,o=e?e.length:0;++n-1&&e%1==0&&e-1&&e%1==0&&e<=F}function P(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return!!e&&"object"==typeof e}function M(e){return S(e)?h(e):function(e){if(!C(e))return qe(e);var t=[];for(var n in Object(e))Ae.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var W=200,B="__lodash_hash_undefined__",F=9007199254740991,z="[object Arguments]",R="[object Boolean]",V="[object Date]",U="[object Function]",q="[object GeneratorFunction]",G="[object Map]",Y="[object Number]",K="[object Object]",X="[object RegExp]",J="[object Set]",Q="[object String]",Z="[object Symbol]",ee="[object WeakMap]",te="[object ArrayBuffer]",ne="[object DataView]",oe="[object Float32Array]",ie="[object Float64Array]",re="[object Int8Array]",se="[object Int16Array]",ae="[object Int32Array]",ue="[object Uint8Array]",fe="[object Uint8ClampedArray]",ce="[object Uint16Array]",pe="[object Uint32Array]",le=/\w*$/,de=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ve={};ve[oe]=ve[ie]=ve[re]=ve[se]=ve[ae]=ve[ue]=ve[fe]=ve[ce]=ve[pe]=!0,ve[z]=ve["[object Array]"]=ve[te]=ve[R]=ve[ne]=ve[V]=ve["[object Error]"]=ve[U]=ve[G]=ve[Y]=ve[K]=ve[X]=ve[J]=ve[Q]=ve[ee]=!1;var me={};me[z]=me["[object Array]"]=me[te]=me[ne]=me[R]=me[V]=me[oe]=me[ie]=me[re]=me[se]=me[ae]=me[G]=me[Y]=me[K]=me[X]=me[J]=me[Q]=me[Z]=me[ue]=me[fe]=me[ce]=me[pe]=!0,me["[object Error]"]=me[U]=me[ee]=!1;var ge="object"==typeof Le&&Le&&Le.Object===Object&&Le,be="object"==typeof self&&self&&self.Object===Object&&self,ye=ge||be||Function("return this")(),_e=t&&!t.nodeType&&t,we=_e&&!0&&e&&!e.nodeType&&e,Oe=we&&we.exports===_e,Ee=Oe&&ge.process,Te=function(){try{return Ee&&Ee.binding("util")}catch(e){}}(),$e=Te&&Te.isTypedArray,je=Array.prototype,Ce=Function.prototype,Ne=Object.prototype,xe=ye["__core-js_shared__"],ke=function(){var e=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Se=Ce.toString,Ae=Ne.hasOwnProperty,Ie=Se.call(Object),De=Ne.toString,Pe=RegExp("^"+Se.call(Ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=Oe?ye.Buffer:void 0,Me=ye.Symbol,We=ye.Uint8Array,Be=u(Object.getPrototypeOf,Object),Fe=Object.create,ze=Ne.propertyIsEnumerable,Re=je.splice,Ve=Object.getOwnPropertySymbols,Ue=He?He.isBuffer:void 0,qe=u(Object.keys,Object),Ge=Math.max,Ye=j(ye,"DataView"),Ke=j(ye,"Map"),Xe=j(ye,"Promise"),Je=j(ye,"Set"),Qe=j(ye,"WeakMap"),Ze=j(Object,"create"),et=N(Ye),tt=N(Ke),nt=N(Xe),ot=N(Je),it=N(Qe),rt=Me?Me.prototype:void 0,st=rt?rt.valueOf:void 0;c.prototype.clear=function(){this.__data__=Ze?Ze(null):{}},c.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},c.prototype.get=function(e){var t=this.__data__;if(Ze){var n=t[e];return n===B?void 0:n}return Ae.call(t,e)?t[e]:void 0},c.prototype.has=function(e){var t=this.__data__;return Ze?void 0!==t[e]:Ae.call(t,e)},c.prototype.set=function(e,t){return this.__data__[e]=Ze&&void 0===t?B:t,this},p.prototype.clear=function(){this.__data__=[]},p.prototype.delete=function(e){var t=this.__data__,n=g(t,e);return!(n<0||(n==t.length-1?t.pop():Re.call(t,n,1),0))},p.prototype.get=function(e){var t=this.__data__,n=g(t,e);return n<0?void 0:t[n][1]},p.prototype.has=function(e){return g(this.__data__,e)>-1},p.prototype.set=function(e,t){var n=this.__data__,o=g(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},l.prototype.clear=function(){this.__data__={hash:new c,map:new(Ke||p),string:new c}},l.prototype.delete=function(e){return $(this,e).delete(e)},l.prototype.get=function(e){return $(this,e).get(e)},l.prototype.has=function(e){return $(this,e).has(e)},l.prototype.set=function(e,t){return $(this,e).set(e,t),this},d.prototype.clear=function(){this.__data__=new p},d.prototype.delete=function(e){return this.__data__.delete(e)},d.prototype.get=function(e){return this.__data__.get(e)},d.prototype.has=function(e){return this.__data__.has(e)},d.prototype.set=function(e,t){var n=this.__data__;if(n instanceof p){var o=n.__data__;if(!Ke||o.length1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(i--,r):void 0,s&&function(e,t,n){if(!P(n))return!1;var o=typeof t;return!!("number"==o?S(n)&&L(t,n.length):"string"==o&&t in n)&&x(n[t],e)}(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),t=Object(t);++o popper[opSide]) { data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; } + data.offsets.popper = getClientRect(data.offsets.popper); // compute center of the popper var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available - var popperMarginSide = getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', ''); - var sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide; + var css = getStyleComputedProperty(data.instance.popper); + var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); + var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); + var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; // prevent arrowElement from being placed not contiguously to its popper sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); data.arrowElement = arrowElement; - data.offsets.arrow = {}; - data.offsets.arrow[side] = Math.round(sideValue); - data.offsets.arrow[altSide] = ''; // make sure to unset any eventual altSide value from the DOM node + data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); return data; } @@ -2498,6 +2501,20 @@ function removeClasses(el, classes) { } } +var supportsPassive = false; + +if (typeof window !== 'undefined') { + supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get() { + supportsPassive = true; + } + }); + window.addEventListener('test', null, opts); + } catch (e) {} +} + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { @@ -2508,118 +2525,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol -var asyncGenerator = function () { - function AwaitValue(value) { - this.value = value; - } - - function AsyncGenerator(gen) { - var front, back; - - function send(key, arg) { - return new Promise(function (resolve, reject) { - var request = { - key: key, - arg: arg, - resolve: resolve, - reject: reject, - next: null - }; - - if (back) { - back = back.next = request; - } else { - front = back = request; - resume(key, arg); - } - }); - } - - function resume(key, arg) { - try { - var result = gen[key](arg); - var value = result.value; - - if (value instanceof AwaitValue) { - Promise.resolve(value.value).then(function (arg) { - resume("next", arg); - }, function (arg) { - resume("throw", arg); - }); - } else { - settle(result.done ? "return" : "normal", result.value); - } - } catch (err) { - settle("throw", err); - } - } - - function settle(type, value) { - switch (type) { - case "return": - front.resolve({ - value: value, - done: true - }); - break; - - case "throw": - front.reject(value); - break; - - default: - front.resolve({ - value: value, - done: false - }); - break; - } - - front = front.next; - - if (front) { - resume(front.key, front.arg); - } else { - back = null; - } - } - - this._invoke = send; - - if (typeof gen.return !== "function") { - this.return = undefined; - } - } - - if (typeof Symbol === "function" && Symbol.asyncIterator) { - AsyncGenerator.prototype[Symbol.asyncIterator] = function () { - return this; - }; - } - - AsyncGenerator.prototype.next = function (arg) { - return this._invoke("next", arg); - }; - - AsyncGenerator.prototype.throw = function (arg) { - return this._invoke("throw", arg); - }; - AsyncGenerator.prototype.return = function (arg) { - return this._invoke("return", arg); - }; - - return { - wrap: function (fn) { - return function () { - return new AsyncGenerator(fn.apply(this, arguments)); - }; - }, - await: function (value) { - return new AwaitValue(value); - } - }; -}(); @@ -3286,7 +3192,9 @@ if (typeof document !== 'undefined') { for (var i = 0; i < openTooltips.length; i++) { openTooltips[i]._onDocumentTouch(event); } - }); + }, supportsPassive ? { + passive: true + } : false); } /** @@ -3753,6 +3661,7 @@ var Popover = { render: function render() { this.$_isDisposed = false; this.$_mounted = false; this.$_events = []; + this.$_preventOpen = false; }, mounted: function mounted() { var popoverNode = this.$refs.popover; @@ -3958,7 +3867,7 @@ var Popover = { render: function render() { return; } evt.usedByTooltip = true; - _this5.$_scheduleShow(evt); + !_this5.$_preventOpen && _this5.$_scheduleShow(evt); }; _this5.$_events.push({ event: event, func: func }); reference.addEventListener(event, func); @@ -4050,7 +3959,9 @@ var Popover = { render: function render() { $_addGlobalEvents: function $_addGlobalEvents() { if (this.autoHide) { if (isIOS) { - document.addEventListener('touchstart', this.$_handleWindowClick); + document.addEventListener('touchstart', this.$_handleWindowTouchstart, supportsPassive ? { + passive: true + } : false); } else { window.addEventListener('click', this.$_handleWindowClick); } @@ -4058,7 +3969,7 @@ var Popover = { render: function render() { }, $_removeGlobalEvents: function $_removeGlobalEvents() { if (isIOS) { - document.removeEventListener('touchstart', this.$_handleWindowClick); + document.removeEventListener('touchstart', this.$_handleWindowTouchstart); } else { window.removeEventListener('click', this.$_handleWindowClick); } @@ -4080,13 +3991,33 @@ var Popover = { render: function render() { } }, $_handleWindowClick: function $_handleWindowClick(evt) { + var touch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var popoverNode = this.$refs.popover; if (evt.closePopover || !popoverNode.contains(evt.target)) { this.$_scheduleHide(evt); this.$emit('auto-hide'); + + if (touch) { + this.$_preventOpen = true; + document.addEventListener('touchend', this.$_handleWindowTouchend, supportsPassive ? { + passive: true + } : false); + } } }, + $_handleWindowTouchstart: function $_handleWindowTouchstart(evt) { + this.$_handleWindowClick(evt, true); + }, + $_handleWindowTouchend: function $_handleWindowTouchend(evt) { + var _this8 = this; + + document.removeEventListener('touchend', this.$_handleWindowTouchend); + setTimeout(function () { + _this8.$_preventOpen = false; + }, 300); + }, $_handleResize: function $_handleResize() { if (this.isOpen && this.popperInstance) { this.popperInstance.update(); diff --git a/package.json b/package.json index cc8f844c..be9721db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "v-tooltip", - "version": "2.0.0-rc.22", + "version": "2.0.0-rc.23", "description": "Easy tooltips with Vue 2.x", "main": "dist/v-tooltip.umd.js", "module": "dist/v-tooltip.esm.js",