ZwiiCMS/core/vendor/tippy/tippy.min.js
2018-04-02 08:29:19 +02:00

2 lines
37 KiB
JavaScript
Executable File

(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.tippy=t()})(this,function(){'use strict';function t(e){return'[object Object]'===Object.prototype.toString.call(e)}function o(e){return[].slice.call(e)}function r(e){if(e instanceof Element||t(e))return[e];if(e instanceof NodeList)return o(e);if(Array.isArray(e))return e;try{return o(document.querySelectorAll(e))}catch(e){return[]}}function n(e){for(var t=[!1,'webkit'],o=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],n=i?''+i+o:e;if('undefined'!=typeof document.body.style[n])return n}return null}function a(e,t,o){var i=o.arrow,r=o.arrowType,a=o.arrowTransform,s=o.animateFill,p=o.inertia,l=o.animation,d=o.size,c=o.theme,f=o.html,m=o.zIndex,u=o.interactive,h=o.maxWidth,g=document.createElement('div');g.setAttribute('class','tippy-popper'),g.setAttribute('role','tooltip'),g.setAttribute('id','tippy-'+e),g.style.zIndex=m,g.style.maxWidth=h;var b=document.createElement('div');if(b.setAttribute('class','tippy-tooltip'),b.setAttribute('data-size',d),b.setAttribute('data-animation',l),b.setAttribute('data-state','hidden'),c.split(' ').forEach(function(e){b.classList.add(e+'-theme')}),i){var y=document.createElement('div');y.style[n('transform')]=a,'round'===r?(y.classList.add('tippy-roundarrow'),y.innerHTML='<svg viewBox="0 0 24 8" xmlns="http://www.w3.org/2000/svg"><path d="M1 8s4.577-.019 7.253-4.218c2.357-3.698 5.175-3.721 7.508 0C18.404 7.997 23 8 23 8H1z"/></svg>'):y.classList.add('tippy-arrow'),b.appendChild(y)}if(s){b.setAttribute('data-animatefill','');var v=document.createElement('div');v.setAttribute('data-state','hidden'),v.classList.add('tippy-backdrop'),b.appendChild(v)}p&&b.setAttribute('data-inertia',''),u&&b.setAttribute('data-interactive','');var w=document.createElement('div');if(w.setAttribute('class','tippy-content'),f){var E;f instanceof Element?(w.appendChild(f),E='#'+f.id||'tippy-html-template'):(w.innerHTML=document.querySelector(f).innerHTML,E=f),g.setAttribute('data-html',''),u&&g.setAttribute('tabindex','-1'),b.setAttribute('data-template-id',E)}else w.innerHTML=t;return b.appendChild(w),g.appendChild(b),g}function s(e,t,o,i){var r=o.handleTrigger,n=o.handleMouseLeave,a=o.handleBlur,s=o.handleDelegateShow,p=o.handleDelegateHide,l=[];if('manual'===e)return l;var d=function(e,o){t.addEventListener(e,o),l.push({event:e,handler:o})};return i.target?(Ue.supportsTouch&&i.touchHold&&(d('touchstart',s),d('touchend',p)),'mouseenter'===e&&(d('mouseover',s),d('mouseout',p)),'focus'===e&&(d('focusin',s),d('focusout',p)),'click'===e&&d('click',s)):(d(e,r),Ue.supportsTouch&&i.touchHold&&(d('touchstart',r),d('touchend',n)),'mouseenter'===e&&d('mouseleave',n),'focus'===e&&d(Be?'focusout':'blur',a)),l}function p(e,t){var o=Fe.reduce(function(o,i){var r=e.getAttribute('data-tippy-'+i.toLowerCase())||t[i];return'false'===r&&(r=!1),'true'===r&&(r=!0),isFinite(r)&&!isNaN(parseFloat(r))&&(r=parseFloat(r)),'target'!==i&&'string'==typeof r&&'['===r.trim().charAt(0)&&(r=JSON.parse(r)),o[i]=r,o},{});return Xe({},t,o)}function l(e,t){return t.arrow&&(t.animateFill=!1),t.appendTo&&'function'==typeof t.appendTo&&(t.appendTo=t.appendTo()),'function'==typeof t.html&&(t.html=t.html(e)),t}function d(e){return{tooltip:e.querySelector(qe.TOOLTIP),backdrop:e.querySelector(qe.BACKDROP),content:e.querySelector(qe.CONTENT)}}function c(e){var t=e.getAttribute('title');t&&e.setAttribute('data-original-title',t),e.removeAttribute('title')}function f(e){return e&&'[object Function]'==={}.toString.call(e)}function m(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function u(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function h(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var t=m(e),o=t.overflow,i=t.overflowX,r=t.overflowY;return /(auto|scroll)/.test(o+r+i)?e:h(u(e))}function g(e){var t=e&&e.offsetParent,o=t&&t.nodeName;return o&&'BODY'!==o&&'HTML'!==o?-1!==['TD','TABLE'].indexOf(t.nodeName)&&'static'===m(t,'position')?g(t):t:e?e.ownerDocument.documentElement:document.documentElement}function b(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||g(e.firstElementChild)===e)}function y(e){return null===e.parentNode?e:y(e.parentNode)}function v(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,r=o?t:e,n=document.createRange();n.setStart(i,0),n.setEnd(r,0);var a=n.commonAncestorContainer;if(e!==a&&t!==a||i.contains(r))return b(a)?a:g(a);var s=y(e);return s.host?v(s.host,t):v(e,y(t).host)}function w(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var r=e.ownerDocument.documentElement,n=e.ownerDocument.scrollingElement||r;return n[o]}return e[o]}function E(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=w(t,'top'),r=w(t,'left'),n=o?-1:1;return e.top+=i*n,e.bottom+=i*n,e.left+=r*n,e.right+=r*n,e}function T(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+i+'Width'],10)}function L(e,t,o,i){return Me(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],$e()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function O(){var e=document.body,t=document.documentElement,o=$e()&&getComputedStyle(t);return{height:L('Height',e,t,o),width:L('Width',e,t,o)}}function x(e){return it({},e,{right:e.left+e.width,bottom:e.top+e.height})}function A(e){var t={};if($e())try{t=e.getBoundingClientRect();var o=w(e,'top'),i=w(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},n='HTML'===e.nodeName?O():{},a=n.width||e.clientWidth||r.right-r.left,s=n.height||e.clientHeight||r.bottom-r.top,p=e.offsetWidth-a,l=e.offsetHeight-s;if(p||l){var d=m(e);p-=T(d,'x'),l-=T(d,'y'),r.width-=p,r.height-=l}return x(r)}function k(e,t){var o=$e(),i='HTML'===t.nodeName,r=A(e),n=A(t),a=h(e),s=m(t),p=parseFloat(s.borderTopWidth,10),l=parseFloat(s.borderLeftWidth,10),d=x({top:r.top-n.top-p,left:r.left-n.left-l,width:r.width,height:r.height});if(d.marginTop=0,d.marginLeft=0,!o&&i){var c=parseFloat(s.marginTop,10),f=parseFloat(s.marginLeft,10);d.top-=p-c,d.bottom-=p-c,d.left-=l-f,d.right-=l-f,d.marginTop=c,d.marginLeft=f}return(o?t.contains(a):t===a&&'BODY'!==a.nodeName)&&(d=E(d,t)),d}function C(e){var t=e.ownerDocument.documentElement,o=k(e,t),i=Me(t.clientWidth,window.innerWidth||0),r=Me(t.clientHeight,window.innerHeight||0),n=w(t),a=w(t,'left'),s={top:n-o.top+o.marginTop,left:a-o.left+o.marginLeft,width:i,height:r};return x(s)}function S(e){var t=e.nodeName;return'BODY'===t||'HTML'===t?!1:'fixed'===m(e,'position')||S(u(e))}function P(e,t,o,i){var r={top:0,left:0},n=v(e,t);if('viewport'===i)r=C(n);else{var a;'scrollParent'===i?(a=h(u(t)),'BODY'===a.nodeName&&(a=e.ownerDocument.documentElement)):'window'===i?a=e.ownerDocument.documentElement:a=i;var s=k(a,n);if('HTML'===a.nodeName&&!S(n)){var p=O(),l=p.height,d=p.width;r.top+=s.top-s.marginTop,r.bottom=l+s.top,r.left+=s.left-s.marginLeft,r.right=d+s.left}else r=s}return r.left+=o,r.top+=o,r.right-=o,r.bottom-=o,r}function D(e){var t=e.width,o=e.height;return t*o}function I(e,t,o,i,r){var n=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var a=P(o,i,n,r),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},p=Object.keys(s).map(function(e){return it({key:e},s[e],{area:D(s[e])})}).sort(function(e,t){return t.area-e.area}),l=p.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),d=0<l.length?l[0].key:p[0].key,c=e.split('-')[1];return d+(c?'-'+c:'')}function _(e,t,o){var i=v(t,o);return k(o,i)}function N(e){var t=getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),r={width:e.offsetWidth+i,height:e.offsetHeight+o};return r}function H(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 R(e,t,o){o=o.split('-')[0];var i=N(e),r={width:i.width,height:i.height},n=-1!==['right','left'].indexOf(o),a=n?'top':'left',s=n?'left':'top',p=n?'height':'width',l=n?'width':'height';return r[a]=t[a]+t[p]/2-i[p]/2,r[s]=o===s?t[s]-i[l]:t[H(s)],r}function M(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function W(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=M(e,function(e){return e[t]===o});return e.indexOf(i)}function B(e,t,o){var i=void 0===o?e:e.slice(0,W(e,'name',o));return i.forEach(function(e){e['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var o=e['function']||e.fn;e.enabled&&f(o)&&(t.offsets.popper=x(t.offsets.popper),t.offsets.reference=x(t.offsets.reference),t=o(t,e))}),t}function U(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=_(this.state,this.popper,this.reference),e.placement=I(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=R(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=B(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function q(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function Y(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length-1;r++){var i=t[r],n=i?''+i+o:e;if('undefined'!=typeof document.body.style[n])return n}return null}function F(){return this.state.isDestroyed=!0,q(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[Y('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function z(e){var t=e.ownerDocument;return t?t.defaultView:window}function j(e,t,o,i){var r='BODY'===e.nodeName,n=r?e.ownerDocument.defaultView:e;n.addEventListener(t,o,{passive:!0}),r||j(h(n.parentNode),t,o,i),i.push(n)}function X(e,t,o,i){o.updateBound=i,z(e).addEventListener('resize',o.updateBound,{passive:!0});var r=h(e);return j(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function K(){this.state.eventsEnabled||(this.state=X(this.reference,this.options,this.state,this.scheduleUpdate))}function V(e,t){return z(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function G(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=V(this.reference,this.state))}function J(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Q(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&J(t[o])&&(i='px'),e.style[o]=t[o]+i})}function Z(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function $(e,t,o){var i=M(e,function(e){var o=e.name;return o===t}),r=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!r){var n='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+n+' modifier in order to work, be sure to include it before '+n+'!')}return r}function ee(e){return'end'===e?'start':'start'===e?'end':e}function te(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=nt.indexOf(e),i=nt.slice(o+1).concat(nt.slice(0,o));return t?i.reverse():i}function oe(e,t,o,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),n=+r[1],a=r[2];if(!n)return e;if(0===a.indexOf('%')){var s;switch(a){case'%p':s=o;break;case'%':case'%r':default:s=i;}var p=x(s);return p[t]/100*n}if('vh'===a||'vw'===a){var l;return l='vh'===a?Me(document.documentElement.clientHeight,window.innerHeight||0):Me(document.documentElement.clientWidth,window.innerWidth||0),l/100*n}return n}function ie(e,t,o,i){var r=[0,0],n=-1!==['right','left'].indexOf(i),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(M(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var p=/\s*,\s*|\s+/,l=-1===s?[a]:[a.slice(0,s).concat([a[s].split(p)[0]]),[a[s].split(p)[1],a.slice(s+1)]];return l=l.map(function(e,i){var r=(1===i?!n:n)?'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 oe(e,r,t,o)})}),l.forEach(function(e,t){e.forEach(function(o,i){J(o)&&(r[t]+=o*('-'===e[i-1]?-1:1))})}),r}function re(e){var t=e.style;t[n('transform')]=null,t.top=null,t.left=null}function ne(e){void e.offsetHeight}function ae(e,t,o){var i=e.popper,r=e.options,n=r.onCreate,a=r.onUpdate;r.onCreate=r.onUpdate=function(){ne(i),t&&t(),a(),r.onCreate=n,r.onUpdate=a},o||e.scheduleUpdate()}function se(e){return e.getAttribute('x-placement').replace(/-.+/,'')}function pe(e,t,o){if(!t.getAttribute('x-placement'))return!0;var i=e.clientX,r=e.clientY,n=o.interactiveBorder,a=o.distance,s=t.getBoundingClientRect(),p=se(t),l=n+a,d={top:s.top-r>n,bottom:r-s.bottom>n,left:s.left-i>n,right:i-s.right>n};return'top'===p?d.top=s.top-r>l:'bottom'===p?d.bottom=r-s.bottom>l:'left'===p?d.left=s.left-i>l:'right'===p?d.right=i-s.right>l:void 0,d.top||d.bottom||d.left||d.right}function le(e,t,o,i){if(!t.length)return'';var r={scale:function(){return 1===t.length?''+t[0]:o?t[0]+', '+t[1]:t[1]+', '+t[0]}(),translate:function(){return 1===t.length?i?-t[0]+'px':t[0]+'px':o?i?t[0]+'px, '+-t[1]+'px':t[0]+'px, '+t[1]+'px':i?-t[1]+'px, '+t[0]+'px':t[1]+'px, '+t[0]+'px'}()};return r[e]}function de(e,t){if(!e)return'';return t?e:{X:'Y',Y:'X'}[e]}function ce(e,t,o){var i=se(e),r='top'===i||'bottom'===i,a='right'===i||'bottom'===i,s=function(e){var t=o.match(e);return t?t[1]:''},p=function(e){var t=o.match(e);return t?t[1].split(',').map(parseFloat):[]},l={translate:/translateX?Y?\(([^)]+)\)/,scale:/scaleX?Y?\(([^)]+)\)/},d={translate:{axis:s(/translate([XY])/),numbers:p(l.translate)},scale:{axis:s(/scale([XY])/),numbers:p(l.scale)}},c=o.replace(l.translate,'translate'+de(d.translate.axis,r)+'('+le('translate',d.translate.numbers,r,a)+')').replace(l.scale,'scale'+de(d.scale.axis,r)+'('+le('scale',d.scale.numbers,r,a)+')');t.style[n('transform')]=c}function fe(e){return-(e-Ye.distance)+'px'}function me(e){requestAnimationFrame(function(){setTimeout(e,1)})}function ue(t,o){var i=Element.prototype.closest||function(t){for(var o=this;o;){if(e.call(o,t))return o;o=o.parentElement}};return i.call(t,o)}function he(e,t){return Array.isArray(e)?e[t]:e}function ge(e,t){e.forEach(function(e){e&&e.setAttribute('data-state',t)})}function be(e,t){e.forEach(function(e){e&&(e.style[n('transitionDuration')]=t+'ms')})}function ye(e){var t=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;e.focus(),scroll(t,o)}function ve(e){var t=ue(e.target,this.options.target);if(t&&!t._tippy){var o=t.getAttribute('title')||this.title;o&&(t.setAttribute('title',o),_e(t,Xe({},this.options,{target:null})),we.call(t._tippy,e))}}function we(e){var t=this;if(xe.call(this),!this.state.visible){if(this.options.target)return void ve.call(this,e);if(this._(dt).isPreparingToShow=!0,this.options.wait)return void this.options.wait.call(this.popper,this.show.bind(this),e);this.options.followCursor&&!Ue.usingTouch&&(!this._(dt).followCursorListener&&Ae.call(this),document.addEventListener('mousemove',this._(dt).followCursorListener));var o=Array.isArray(this.options.delay)?this.options.delay[0]:this.options.delay;o?this._(dt).showTimeout=setTimeout(function(){t.show()},o):this.show()}}function Ee(){var e=this;if(xe.call(this),!!this.state.visible){this._(dt).isPreparingToShow=!1;var t=Array.isArray(this.options.delay)?this.options.delay[1]:this.options.delay;t?this._(dt).hideTimeout=setTimeout(function(){e.state.visible&&e.hide()},t):this.hide()}}function Te(){var e=this;return{handleTrigger:function(t){if(e.state.enabled){var o=Ue.supportsTouch&&Ue.usingTouch&&-1<['mouseenter','mouseover','focus'].indexOf(t.type);o&&e.options.touchHold||(e._(dt).lastTriggerEvent=t,'click'===t.type&&'persistent'!==e.options.hideOnClick&&e.state.visible?Ee.call(e):we.call(e,t),o&&Ue.iOS&&e.reference.click&&e.reference.click())}},handleMouseLeave:function(t){if(!(-1<['mouseleave','mouseout'].indexOf(t.type)&&Ue.supportsTouch&&Ue.usingTouch&&e.options.touchHold)){if(e.options.interactive){var o=Ee.bind(e),i=function t(i){var r=ue(i.target,qe.REFERENCE),n=ue(i.target,qe.POPPER)===e.popper,a=r===e.reference;n||a||pe(i,e.popper,e.options)&&(document.body.removeEventListener('mouseleave',o),document.removeEventListener('mousemove',t),Ee.call(e))};return document.body.addEventListener('mouseleave',o),void document.addEventListener('mousemove',i)}Ee.call(e)}},handleBlur:function(t){t.target!==e.reference||!t.relatedTarget||Ue.usingTouch||ue(t.relatedTarget,qe.POPPER)||Ee.call(e)},handleDelegateShow:function(t){ue(t.target,e.options.target)&&we.call(e,t)},handleDelegateHide:function(t){ue(t.target,e.options.target)&&Ee.call(e)}}}function Le(){var e=this,t=this.popper,o=this.reference,i=this.options,r=d(t),n=r.tooltip,a=i.popperOptions,s='round'===i.arrowType?qe.ROUND_ARROW:qe.ARROW,p=n.querySelector(s),l=Xe({placement:i.placement},a||{},{modifiers:Xe({},a?a.modifiers:{},{arrow:Xe({element:s},a&&a.modifiers?a.modifiers.arrow:{}),flip:Xe({enabled:i.flip,padding:i.distance+5,behavior:i.flipBehavior},a&&a.modifiers?a.modifiers.flip:{}),offset:Xe({offset:i.offset},a&&a.modifiers?a.modifiers.offset:{})}),onCreate:function(){n.style[se(t)]=fe(i.distance),p&&i.arrowTransform&&ce(t,p,i.arrowTransform)},onUpdate:function(){var e=n.style;e.top='',e.bottom='',e.left='',e.right='',e[se(t)]=fe(i.distance),p&&i.arrowTransform&&ce(t,p,i.arrowTransform)}});return Ce.call(this,{target:t,callback:function(){e.popperInstance.update()},options:{childList:!0,subtree:!0,characterData:!0}}),new st(o,t,l)}function Oe(e){var t=this.options;this.popperInstance?(re(this.popper),this.popperInstance.scheduleUpdate(),t.livePlacement&&(!t.followCursor||Ue.usingTouch)&&this.popperInstance.enableEventListeners()):(this.popperInstance=Le.call(this),!t.livePlacement&&this.popperInstance.disableEventListeners()),ae(this.popperInstance,e,!0),t.appendTo.contains(this.popper)||t.appendTo.appendChild(this.popper)}function xe(){var e=this._(dt),t=e.showTimeout,o=e.hideTimeout;clearTimeout(t),clearTimeout(o)}function Ae(){var e=this;this._(dt).followCursorListener=function(t){if(!(e._(dt).lastTriggerEvent&&'focus'===e._(dt).lastTriggerEvent.type)){e._(dt).lastMouseMoveEvent=t;var o=document.documentElement.offsetWidth||document.body.offsetWidth,i=Ne(e.popper.offsetWidth/2),r=Ne(e.popper.offsetHeight/2),a=e.options.offset,s=t.pageX,p=t.pageY,l=5,d=e.options.placement.replace(/-.+/,'');e.popper.getAttribute('x-placement')&&(d=se(e.popper));var c,f;'top'===d?(c=s-i+a,f=p-2*r):'bottom'===d?(c=s-i+a,f=p+10):'left'===d?(c=s-2*i,f=p-r+a):'right'===d?(c=s+5,f=p-r+a):void 0;('top'===d||'bottom'===d)&&(s+l+i+a>o&&(c=o-l-2*i),0>s-l-i+a&&(c=l)),e.popper.style[n('transform')]='translate3d('+c+'px, '+f+'px, 0)'}}}function ke(){var e=this,t=function(){e.popper.style[n('transitionDuration')]=e.options.updateDuration+'ms'},o=function(){e.popper.style[n('transitionDuration')]=''};me(function i(){e.popperInstance&&e.popperInstance.scheduleUpdate(),t(),e.state.visible?requestAnimationFrame(i):o()})}function Ce(e){var t=e.target,o=e.callback,i=e.options;if(window.MutationObserver){var r=new MutationObserver(o);r.observe(t,i),this._(dt).mutationObservers.push(r)}}function Se(e,t){if(!e)return t();var o=d(this.popper),i=o.tooltip,r=function(e,t){t&&i[e+'EventListener']('ontransitionend'in window?'transitionend':'webkitTransitionEnd',t)},n=function o(n){n.target===i&&(r('remove',o),t())};r('remove',this._(dt).transitionendListener),r('add',n),this._(dt).transitionendListener=n}function Pe(e,t){return e.reduce(function(e,o){var i=mt,r=l(o,t.performance?t:p(o,t)),n=o.getAttribute('title');if(!n&&!r.target&&!r.html&&!r.dynamicTitle)return e;o.setAttribute(r.target?'data-tippy-delegate':'data-tippy',''),c(o);var f=a(i,n,r),m=new ft({id:i,reference:o,popper:f,options:r,title:n,popperInstance:null});r.createPopperInstanceOnInit&&(m.popperInstance=Le.call(m),m.popperInstance.disableEventListeners());var u=Te.call(m);return m.listeners=r.trigger.trim().split(' ').reduce(function(e,t){return e.concat(s(t,o,u,r))},[]),r.dynamicTitle&&Ce.call(m,{target:o,callback:function(){var e=d(f),t=e.content,i=o.getAttribute('title');i&&(t.innerHTML=m.title=i,c(o))},options:{attributes:!0}}),o._tippy=m,f._tippy=m,f._reference=o,e.push(m),mt++,e},[])}function De(e){var t=o(document.querySelectorAll(qe.POPPER));t.forEach(function(t){var o=t._tippy,i=o.options;(!0===i.hideOnClick||-1<i.trigger.indexOf('focus'))&&(!e||t!==e.popper)&&o.hide()})}function Ie(){var t=function(){Ue.usingTouch||(Ue.usingTouch=!0,Ue.iOS&&document.body.classList.add('tippy-touch'),Ue.dynamicInputDetection&&window.performance&&document.addEventListener('mousemove',i),Ue.onUserInputChange('touch'))},i=function(){var e;return function(){var t=performance.now();20>t-e&&(Ue.usingTouch=!1,document.removeEventListener('mousemove',i),!Ue.iOS&&document.body.classList.remove('tippy-touch'),Ue.onUserInputChange('mouse')),e=t}}();document.addEventListener('click',function(e){if(!(e.target instanceof Element))return De();var t=ue(e.target,qe.REFERENCE),o=ue(e.target,qe.POPPER);if(!(o&&o._reference._tippy.options.interactive)){if(t){var i=t._tippy.options;if(!i.multiple&&Ue.usingTouch||!i.multiple&&-1<i.trigger.indexOf('click'))return De(t._tippy);if(!0!==i.hideOnClick||-1<i.trigger.indexOf('click'))return}De()}}),document.addEventListener('touchstart',t),window.addEventListener('blur',function(){var t=document,o=t.activeElement;o&&o.blur&&e.call(o,qe.REFERENCE)&&o.blur()}),window.addEventListener('resize',function(){o(document.querySelectorAll(qe.POPPER)).forEach(function(e){var t=e._tippy;t.options.livePlacement||t.popperInstance.scheduleUpdate()})}),!Ue.supportsTouch&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)&&document.addEventListener('pointerdown',t)}function _e(e,o){return Ue.supported&&!ut&&(Ie(),ut=!0),t(e)&&(e.refObj=!0,e.attributes=e.attributes||{},e.setAttribute=function(t,o){e.attributes[t]=o},e.getAttribute=function(t){return e.attributes[t]},e.removeAttribute=function(t){delete e.attributes[t]},e.addEventListener=function(){},e.removeEventListener=function(){},e.classList={classNames:{},add:function(t){return e.classList.classNames[t]=!0},remove:function(t){return delete e.classList.classNames[t],!0},contains:function(t){return!!e.classList.classNames[t]}}),o=Xe({},Ye,o),{selector:e,options:o,tooltips:Ue.supported?Pe(r(e),o):[],destroyAll:function(){this.tooltips.forEach(function(e){return e.destroy()}),this.tooltips=[]}}}var Ne=Math.round,He=Math.min,Re=Math.floor,Me=Math.max,We='undefined'!=typeof window,Be=We&&/MSIE |Trident\//.test(navigator.userAgent),Ue={};We&&(Ue.supported='requestAnimationFrame'in window,Ue.supportsTouch='ontouchstart'in window,Ue.usingTouch=!1,Ue.dynamicInputDetection=!0,Ue.iOS=/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,Ue.onUserInputChange=function(){});for(var qe={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-content',BACKDROP:'.tippy-backdrop',ARROW:'.tippy-arrow',ROUND_ARROW:'.tippy-roundarrow',REFERENCE:'[data-tippy]'},Ye={placement:'top',livePlacement:!0,trigger:'mouseenter focus',animation:'shift-away',html:!1,animateFill:!0,arrow:!1,delay:0,duration:[350,300],interactive:!1,interactiveBorder:2,theme:'dark',size:'regular',distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,updateDuration:350,sticky:!1,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,flip:!0,flipBehavior:'flip',arrowType:'sharp',arrowTransform:'',maxWidth:'',target:null,popperOptions:{},createPopperInstanceOnInit:!1,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}},Fe=Ue.supported&&Object.keys(Ye),ze=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},je=function(){function e(e,t){for(var o,r=0;r<t.length;r++)o=t[r],o.enumerable=o.enumerable||!1,o.configurable=!0,('value'in o)&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),Xe=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ke='undefined'!=typeof window&&'undefined'!=typeof document,Ve=['Edge','Trident','Firefox'],Ge=0,Je=0;Je<Ve.length;Je+=1)if(Ke&&0<=navigator.userAgent.indexOf(Ve[Je])){Ge=1;break}var i,Qe=Ke&&window.Promise,Ze=Qe?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()},Ge))}},$e=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},et=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},tt=function(){function e(e,t){for(var o,r=0;r<t.length;r++)o=t[r],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),ot=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},it=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rt=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],nt=rt.slice(3),at={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},st=function(){function e(t,o){var i=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};et(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=Ze(this.update.bind(this)),this.options=it({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=o&&o.jquery?o[0]:o,this.options.modifiers={},Object.keys(it({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){i.options.modifiers[t]=it({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return it({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&f(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var n=this.options.eventsEnabled;n&&this.enableEventListeners(),this.state.eventsEnabled=n}return tt(e,[{key:'update',value:function(){return U.call(this)}},{key:'destroy',value:function(){return F.call(this)}},{key:'enableEventListeners',value:function(){return K.call(this)}},{key:'disableEventListeners',value:function(){return G.call(this)}}]),e}();st.Utils=('undefined'==typeof window?global:window).PopperUtils,st.placements=rt,st.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var r=e.offsets,n=r.reference,a=r.popper,s=-1!==['bottom','top'].indexOf(o),p=s?'left':'top',l=s?'width':'height',d={start:ot({},p,n[p]),end:ot({},p,n[p]+n[l]-a[l])};e.offsets.popper=it({},a,d[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var o,i=t.offset,r=e.placement,n=e.offsets,a=n.popper,s=n.reference,p=r.split('-')[0];return o=J(+i)?[+i,0]:ie(i,a,s,p),'left'===p?(a.top+=o[0],a.left-=o[1]):'right'===p?(a.top+=o[0],a.left+=o[1]):'top'===p?(a.left+=o[0],a.top-=o[1]):'bottom'===p&&(a.left+=o[0],a.top+=o[1]),e.popper=a,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||g(e.instance.popper);e.instance.reference===o&&(o=g(o));var i=P(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var r=t.priority,n=e.offsets.popper,a={primary:function(e){var o=n[e];return n[e]<i[e]&&!t.escapeWithReference&&(o=Me(n[e],i[e])),ot({},e,o)},secondary:function(e){var o='right'===e?'left':'top',r=n[o];return n[e]>i[e]&&!t.escapeWithReference&&(r=He(n[o],i[e]-('right'===e?n.width:n.height))),ot({},o,r)}};return r.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';n=it({},n,a[t](e))}),e.offsets.popper=n,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,r=e.placement.split('-')[0],n=Re,a=-1!==['top','bottom'].indexOf(r),s=a?'right':'bottom',p=a?'left':'top',l=a?'width':'height';return o[s]<n(i[p])&&(e.offsets.popper[p]=n(i[p])-o[l]),o[p]>n(i[s])&&(e.offsets.popper[p]=n(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var o;if(!$(e.instance.modifiers,'arrow','keepTogether'))return e;var i=t.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!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],n=e.offsets,a=n.popper,s=n.reference,p=-1!==['left','right'].indexOf(r),l=p?'height':'width',d=p?'Top':'Left',c=d.toLowerCase(),f=p?'left':'top',u=p?'bottom':'right',h=N(i)[l];s[u]-h<a[c]&&(e.offsets.popper[c]-=a[c]-(s[u]-h)),s[c]+h>a[u]&&(e.offsets.popper[c]+=s[c]+h-a[u]),e.offsets.popper=x(e.offsets.popper);var g=s[c]+s[l]/2-h/2,b=m(e.instance.popper),y=parseFloat(b['margin'+d],10),v=parseFloat(b['border'+d+'Width'],10),w=g-e.offsets.popper[c]-y-v;return w=Me(He(a[l]-h,w),0),e.arrowElement=i,e.offsets.arrow=(o={},ot(o,c,Ne(w)),ot(o,f,''),o),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(q(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=P(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],r=H(i),n=e.placement.split('-')[1]||'',a=[];switch(t.behavior){case at.FLIP:a=[i,r];break;case at.CLOCKWISE:a=te(i);break;case at.COUNTERCLOCKWISE:a=te(i,!0);break;default:a=t.behavior;}return a.forEach(function(s,p){if(i!==s||a.length===p+1)return e;i=e.placement.split('-')[0],r=H(i);var l=e.offsets.popper,d=e.offsets.reference,c=Re,f='left'===i&&c(l.right)>c(d.left)||'right'===i&&c(l.left)<c(d.right)||'top'===i&&c(l.bottom)>c(d.top)||'bottom'===i&&c(l.top)<c(d.bottom),m=c(l.left)<c(o.left),u=c(l.right)>c(o.right),h=c(l.top)<c(o.top),g=c(l.bottom)>c(o.bottom),b='left'===i&&m||'right'===i&&u||'top'===i&&h||'bottom'===i&&g,y=-1!==['top','bottom'].indexOf(i),v=!!t.flipVariations&&(y&&'start'===n&&m||y&&'end'===n&&u||!y&&'start'===n&&h||!y&&'end'===n&&g);(f||b||v)&&(e.flipped=!0,(f||b)&&(i=a[p+1]),v&&(n=ee(n)),e.placement=i+(n?'-'+n:''),e.offsets.popper=it({},e.offsets.popper,R(e.instance.popper,e.offsets.reference,e.placement)),e=B(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,r=i.popper,n=i.reference,a=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return r[a?'left':'top']=n[o]-(s?r[a?'width':'height']:0),e.placement=H(t),e.offsets.popper=x(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!$(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=M(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,r=e.offsets.popper,n=M(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==n&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var a,s,p=void 0===n?t.gpuAcceleration:n,l=g(e.instance.popper),d=A(l),c={position:r.position},f={left:Re(r.left),top:Re(r.top),bottom:Re(r.bottom),right:Re(r.right)},m='bottom'===o?'top':'bottom',u='right'===i?'left':'right',h=Y('transform');if(s='bottom'==m?-d.height+f.bottom:f.top,a='right'==u?-d.width+f.right:f.left,p&&h)c[h]='translate3d('+a+'px, '+s+'px, 0)',c[m]=0,c[u]=0,c.willChange='transform';else{var b='bottom'==m?-1:1,y='right'==u?-1:1;c[m]=s*b,c[u]=a*y,c.willChange=m+', '+u}var v={"x-placement":e.placement};return e.attributes=it({},v,e.attributes),e.styles=it({},c,e.styles),e.arrowStyles=it({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return Q(e.instance.popper,e.styles),Z(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Q(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,i,r){var n=_(r,t,e),a=I(o.placement,n,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',a),Q(t,{position:'absolute'}),o},gpuAcceleration:void 0}}};var pt={};if(We){var lt=Element.prototype;pt=lt.matches||lt.matchesSelector||lt.webkitMatchesSelector||lt.mozMatchesSelector||lt.msMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),o=t.length;0<=--o&&t.item(o)!==this;);return-1<o}}var e=pt,dt={},ct=function(e){return function(t){return t===dt&&e}},ft=function(){function e(t){for(var o in ze(this,e),t)this[o]=t[o];this.state={destroyed:!1,visible:!1,enabled:!0},this._=ct({mutationObservers:[]})}return je(e,[{key:'enable',value:function(){this.state.enabled=!0}},{key:'disable',value:function(){this.state.enabled=!1}},{key:'show',value:function(e){var t=this;if(!this.state.destroyed&&this.state.enabled){var o=this.popper,i=this.reference,r=this.options,a=d(o),s=a.tooltip,p=a.backdrop,l=a.content;return r.dynamicTitle&&!i.getAttribute('data-original-title')?void 0:i.refObj||document.documentElement.contains(i)?void(r.onShow.call(o,this),e=he(void 0===e?r.duration:e,0),be([o,s,p],0),o.style.visibility='visible',this.state.visible=!0,Oe.call(this,function(){if(t.state.visible){if((!r.followCursor||Ue.usingTouch)&&t.popperInstance.scheduleUpdate(),r.followCursor&&!Ue.usingTouch){t.popperInstance.disableEventListeners();var a=Array.isArray(r.delay)?r.delay[0]:r.delay;t._(dt).lastTriggerEvent&&t._(dt).followCursorListener(a&&t._(dt).lastMouseMoveEvent?t._(dt).lastMouseMoveEvent:t._(dt).lastTriggerEvent)}be([s,p,p?l:null],e),p&&getComputedStyle(p)[n('transform')],r.interactive&&i.classList.add('tippy-active'),r.sticky&&ke.call(t),ge([s,p],'visible'),Se.call(t,e,function(){r.updateDuration||s.classList.add('tippy-notransition'),r.interactive&&ye(o),i.setAttribute('aria-describedby','tippy-'+t.id),r.onShown.call(o,t)})}})):void this.destroy()}}},{key:'hide',value:function(e){var t=this;if(!this.state.destroyed&&this.state.enabled){var o=this.popper,i=this.reference,r=this.options,n=d(o),a=n.tooltip,s=n.backdrop,p=n.content;r.onHide.call(o,this),e=he(void 0===e?r.duration:e,1),r.updateDuration||a.classList.remove('tippy-notransition'),r.interactive&&i.classList.remove('tippy-active'),o.style.visibility='hidden',this.state.visible=!1,be([a,s,s?p:null],e),ge([a,s],'hidden'),r.interactive&&-1<r.trigger.indexOf('click')&&ye(i),me(function(){Se.call(t,e,function(){t.state.visible||!r.appendTo.contains(o)||(!t._(dt).isPreparingToShow&&(document.removeEventListener('mousemove',t._(dt).followCursorListener),t._(dt).lastMouseMoveEvent=null),i.removeAttribute('aria-describedby'),t.popperInstance.disableEventListeners(),r.appendTo.removeChild(o),r.onHidden.call(o,t))})})}}},{key:'destroy',value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:!0;if(!this.state.destroyed){this.state.visible&&this.hide(0),this.listeners.forEach(function(t){e.reference.removeEventListener(t.event,t.handler)}),this.reference.setAttribute('title',this.reference.getAttribute('data-original-title')),delete this.reference._tippy;['data-original-title','data-tippy','data-tippy-delegate'].forEach(function(t){e.reference.removeAttribute(t)}),this.options.target&&t&&o(this.reference.querySelectorAll(this.options.target)).forEach(function(e){return e._tippy&&e._tippy.destroy()}),this.popperInstance&&this.popperInstance.destroy(),this._(dt).mutationObservers.forEach(function(e){e.disconnect()}),this.state.destroyed=!0}}}]),e}(),mt=1,ut=!1;return _e.browser=Ue,_e.defaults=Ye,_e});