(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 e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,r=o.getComputedStyle(e,null);return t?r[t]:r}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function r(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),n=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(n+s+p)?e:r(o(e))}function n(e){return 11===e?we:10===e?Ee:we||Ee}function p(e){if(!e)return document.documentElement;for(var o=n(10)?document.body:null,r=e.offsetParent||null;r===o&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var i=r&&r.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(r.nodeName)&&'static'===t(r,'position')?p(r):r:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function a(e){return null===e.parentNode?e:a(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=o?e:t,i=o?t:e,n=document.createRange();n.setStart(r,0),n.setEnd(i,0);var l=n.commonAncestorContainer;if(e!==l&&t!==l||r.contains(i))return s(l)?l:p(l);var c=a(e);return c.host?d(c.host,t):d(e,a(t).host)}function l(e){var t=1=o.clientWidth&&r>=o.clientHeight}),l=0n&&(a=ee(o,window.innerWidth-n)),s&&d>n&&(d=ee(r,window.innerHeight-n));var l=X.reference.getBoundingClientRect(),c=X.props.followCursor,f='horizontal'===c,m='vertical'===c;X.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:f?l.top:d,bottom:f?l.bottom:d,left:m?l.left:a,right:m?l.right:a}},clientWidth:0,clientHeight:0},X.popperInstance.scheduleUpdate()}}function n(e){var t=ot(e.target,X.props.target);t&&!t._tippy&&($(t,ne({},X.props,{target:'',showOnInit:!0})),p(e))}function p(e){if(A(),!X.state.isVisible){if(X.props.target)return n(e);if(M=!0,X.props.wait)return X.props.wait(X,e);v()&&document.addEventListener('mousemove',i);var t=Ve(X.props.delay,0,pe.delay);t?W=setTimeout(function(){S()},t):S()}}function s(){if(A(),!X.state.isVisible)return a();M=!1;var e=Ve(X.props.delay,1,pe.delay);e?B=setTimeout(function(){X.state.isVisible&&P()},e):P()}function a(){document.removeEventListener('mousemove',i),R=null}function d(){document.body.removeEventListener('mouseleave',s),document.removeEventListener('mousemove',z)}function l(e){!X.state.isEnabled||b(e)||(!X.state.isVisible&&(H=e),'click'===e.type&&!1!==X.props.hideOnClick&&X.state.isVisible?s():p(e))}function c(e){var t=rt(e.target,function(e){return e._tippy}),o=ot(e.target,De.POPPER)===X.popper,r=t===X.reference;o||r||ut(gt(X.popper),X.popper.getBoundingClientRect(),e,X.props)&&(d(),s())}function f(e){return b(e)?void 0:X.props.interactive?(document.body.addEventListener('mouseleave',s),void document.addEventListener('mousemove',z)):void s()}function m(e){if(e.target===X.reference){if(X.props.interactive){if(!e.relatedTarget)return;if(ot(e.relatedTarget,De.POPPER))return}s()}}function h(e){ot(e.target,X.props.target)&&p(e)}function u(e){ot(e.target,X.props.target)&&s()}function b(e){var t=-1d[e]&&!t.escapeWithReference&&(r=ee(c[o],d[e]-('right'===e?c.width:c.height))),Le({},o,r)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';c=Ce({},c,f[t](e))}),e.offsets.popper=c,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,r=t.reference,i=e.placement.split('-')[0],n=te,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',a=p?'left':'top',d=p?'width':'height';return o[s]n(r[s])&&(e.offsets.popper[a]=n(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var r;if(!q(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.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 n=e.placement.split('-')[0],p=e.offsets,s=p.popper,a=p.reference,d=-1!==['left','right'].indexOf(n),l=d?'height':'width',c=d?'Top':'Left',f=c.toLowerCase(),m=d?'left':'top',h=d?'bottom':'right',b=C(i)[l];a[h]-bs[h]&&(e.offsets.popper[f]+=a[f]+b-s[h]),e.offsets.popper=u(e.offsets.popper);var g=a[f]+a[l]/2-b/2,y=t(e.instance.popper),v=parseFloat(y['margin'+c],10),w=parseFloat(y['border'+c+'Width'],10),E=g-e.offsets.popper[f]-v-w;return E=re(ee(s[l]-b,E),0),e.arrowElement=i,e.offsets.arrow=(r={},Le(r,f,oe(E)),Le(r,m,''),r),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(I(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=E(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split('-')[0],i=T(r),n=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case Se.FLIP:p=[r,i];break;case Se.CLOCKWISE:p=j(r);break;case Se.COUNTERCLOCKWISE:p=j(r,!0);break;default:p=t.behavior;}return p.forEach(function(s,a){if(r!==s||p.length===a+1)return e;r=e.placement.split('-')[0],i=T(r);var d=e.offsets.popper,l=e.offsets.reference,c=te,f='left'===r&&c(d.right)>c(l.left)||'right'===r&&c(d.left)c(l.top)||'bottom'===r&&c(d.top)c(o.right),u=c(d.top)c(o.bottom),g='left'===r&&m||'right'===r&&h||'top'===r&&u||'bottom'===r&&b,y=-1!==['top','bottom'].indexOf(r),v=!!t.flipVariations&&(y&&'start'===n&&m||y&&'end'===n&&h||!y&&'start'===n&&u||!y&&'end'===n&&b);(f||g||v)&&(e.flipped=!0,(f||g)&&(r=p[a+1]),v&&(n=X(n)),e.placement=r+(n?'-'+n:''),e.offsets.popper=Ce({},e.offsets.popper,A(e.instance.popper,e.offsets.reference,e.placement)),e=P(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],r=e.offsets,i=r.popper,n=r.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=n[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=u(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!q(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=k(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.rightwindow.devicePixelRatio||!Te),f='bottom'===o?'top':'bottom',m='right'===r?'left':'right',h=N('transform'),u=void 0,g=void 0;if(g='bottom'==f?'HTML'===a.nodeName?-a.clientHeight+c.bottom:-d.height+c.bottom:c.top,u='right'==m?'HTML'===a.nodeName?-a.clientWidth+c.right:-d.width+c.right:c.left,s&&h)l[h]='translate3d('+u+'px, '+g+'px, 0)',l[f]=0,l[m]=0,l.willChange='transform';else{var y='bottom'==f?-1:1,v='right'==m?-1:1;l[f]=g*y,l[m]=u*v,l.willChange=f+', '+m}var w={"x-placement":e.placement};return e.attributes=Ce({},w,e.attributes),e.styles=Ce({},l,e.styles),e.arrowStyles=Ce({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return z(e.instance.popper,e.styles),V(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&z(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,r,i){var n=L(i,t,e,o.positionFixed),p=O(o.placement,n,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),z(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}};var De={POPPER:'.tippy-popper',TOOLTIP:'.tippy-tooltip',CONTENT:'.tippy-content',BACKDROP:'.tippy-backdrop',ARROW:'.tippy-arrow',ROUND_ARROW:'.tippy-roundarrow'},Ie={x:!0},Ne=function(e){return[].slice.call(e)},He=function(e,t){t.content instanceof Element?(Ue(e,''),e.appendChild(t.content)):e[t.allowHTML?'innerHTML':'textContent']=t.content},Re=function(e){return!(e instanceof Element)||tt.call(e,'a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]')&&!e.hasAttribute('disabled')},We=function(e,t){e.filter(Boolean).forEach(function(e){e.style.transitionDuration=t+'ms'})},Be=function(e){var t=function(t){return e.querySelector(t)};return{tooltip:t(De.TOOLTIP),backdrop:t(De.BACKDROP),content:t(De.CONTENT),arrow:t(De.ARROW)||t(De.ROUND_ARROW)}},Me=function(e){return'[object Object]'==={}.toString.call(e)},_e=function(){return document.createElement('div')},Ue=function(e,t){e[Ie.x&&'innerHTML']=t instanceof Element?t[Ie.x&&'innerHTML']:t},Fe=function(e){if(e instanceof Element||Me(e))return[e];if(e instanceof NodeList)return Ne(e);if(Array.isArray(e))return e;try{return Ne(document.querySelectorAll(e))}catch(t){return[]}},ze=function(e){return!isNaN(e)&&!isNaN(parseFloat(e))},Ve=function(e,t,o){if(Array.isArray(e)){var r=e[t];return null==r?o:r}return e},Ye=function(e){var t=_e();return'round'===e?(t.className='tippy-roundarrow',Ue(t,'')):t.className='tippy-arrow',t},qe=function(){var e=_e();return e.className='tippy-backdrop',e.setAttribute('data-state','hidden'),e},Xe=function(e,t){e.setAttribute('tabindex','-1'),t.setAttribute('data-interactive','')},je=function(e,t){e.removeAttribute('tabindex'),t.removeAttribute('data-interactive')},Ke=function(e){e.setAttribute('data-inertia','')},Ge=function(e){e.removeAttribute('data-inertia')},Qe=function(e,t){var o=_e();o.className='tippy-popper',o.setAttribute('role','tooltip'),o.id='tippy-'+e,o.style.zIndex=t.zIndex;var r=_e();r.className='tippy-tooltip',r.style.maxWidth=t.maxWidth+('number'==typeof t.maxWidth?'px':''),r.setAttribute('data-size',t.size),r.setAttribute('data-animation',t.animation),r.setAttribute('data-state','hidden'),t.theme.split(' ').forEach(function(e){r.classList.add(e+'-theme')});var i=_e();return i.className='tippy-content',i.setAttribute('data-state','hidden'),t.interactive&&Xe(o,r),t.arrow&&r.appendChild(Ye(t.arrowType)),t.animateFill&&(r.appendChild(qe()),r.setAttribute('data-animatefill','')),t.inertia&&r.setAttribute('data-inertia',''),He(i,t),r.appendChild(i),o.appendChild(r),o.addEventListener('focusout',function(t){t.relatedTarget&&o._tippy&&!rt(t.relatedTarget,function(e){return e===o})&&t.relatedTarget!==o._tippy.reference&&o._tippy.props.shouldPopperHideOnBlur(t)&&o._tippy.hide()}),o},Ze=function(e,t,o){var r=Be(e),i=r.tooltip,n=r.content,p=r.backdrop,s=r.arrow;e.style.zIndex=o.zIndex,i.setAttribute('data-size',o.size),i.setAttribute('data-animation',o.animation),i.style.maxWidth=o.maxWidth+('number'==typeof o.maxWidth?'px':''),t.content!==o.content&&He(n,o),!t.animateFill&&o.animateFill?(i.appendChild(qe()),i.setAttribute('data-animatefill','')):t.animateFill&&!o.animateFill&&(i.removeChild(p),i.removeAttribute('data-animatefill')),!t.arrow&&o.arrow?i.appendChild(Ye(o.arrowType)):t.arrow&&!o.arrow&&i.removeChild(s),t.arrow&&o.arrow&&t.arrowType!==o.arrowType&&i.replaceChild(Ye(o.arrowType),s),!t.interactive&&o.interactive?Xe(e,i):t.interactive&&!o.interactive&&je(e,i),!t.inertia&&o.inertia?Ke(i):t.inertia&&!o.inertia&&Ge(i),t.theme!==o.theme&&(t.theme.split(' ').forEach(function(e){i.classList.remove(e+'-theme')}),o.theme.split(' ').forEach(function(e){i.classList.add(e+'-theme')}))},$e=function(e){Ne(document.querySelectorAll(De.POPPER)).forEach(function(t){var o=t._tippy;o&&!0===o.props.hideOnClick&&(!e||t!==e.popper)&&o.hide()})},Je=function(e){return Object.keys(pe).reduce(function(t,o){var r=(e.getAttribute('data-tippy-'+o)||'').trim();return r?(t[o]='content'===o?r:'true'===r||'false'!==r&&(ze(r)?+r:'['===r[0]||'{'===r[0]?JSON.parse(r):r),t):t},{})},et=function(e){var t={isVirtual:!0,attributes:e.attributes||{},setAttribute:function(t,o){e.attributes[t]=o},getAttribute:function(t){return e.attributes[t]},removeAttribute:function(t){delete e.attributes[t]},hasAttribute:function(t){return t in e.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(t){e.classList.classNames[t]=!0},remove:function(t){delete e.classList.classNames[t]},contains:function(t){return t in e.classList.classNames}}};for(var o in t)e[o]=t[o];return e},tt=function(){if(de){var t=Element.prototype;return t.matches||t.matchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector}}(),ot=function(e,t){return(Element.prototype.closest||function(e){for(var t=this;t;){if(tt.call(t,e))return t;t=t.parentElement}}).call(e,t)},rt=function(e,t){for(;e;){if(t(e))return e;e=e.parentElement}},it=function(e){var t=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;e.focus(),scroll(t,o)},nt=function(e){void e.offsetHeight},pt=function(e,t){return(t?e:{X:'Y',Y:'X'}[e])||''},st=function(e,t,o,r){var i=t[0],n=t[1];if(!i&&!n)return'';var p={scale:function(){return n?o?i+', '+n:n+', '+i:''+i}(),translate:function(){return n?o?r?i+'px, '+-n+'px':i+'px, '+n+'px':r?-n+'px, '+i+'px':n+'px, '+i+'px':r?-i+'px':i+'px'}()};return p[e]},at=function(e,t){var o=e.match(new RegExp(t+'([XY])'));return o?o[1]:''},dt=function(e,t){var o=e.match(t);return o?o[1].split(',').map(parseFloat):[]},lt={translate:/translateX?Y?\(([^)]+)\)/,scale:/scaleX?Y?\(([^)]+)\)/},ct=function(e,t){var o=gt(ot(e,De.POPPER)),r='top'===o||'bottom'===o,i='right'===o||'bottom'===o,n={translate:{axis:at(t,'translate'),numbers:dt(t,lt.translate)},scale:{axis:at(t,'scale'),numbers:dt(t,lt.scale)}},p=t.replace(lt.translate,'translate'+pt(n.translate.axis,r)+'('+st('translate',n.translate.numbers,r,i)+')').replace(lt.scale,'scale'+pt(n.scale.axis,r)+'('+st('scale',n.scale.numbers,r,i)+')');e.style['undefined'==typeof document.body.style.transform?'webkitTransform':'transform']=p},ft=function(e,t){e.filter(Boolean).forEach(function(e){e.setAttribute('data-state',t)})},mt=function(e,t){var o=e.popper,r=e.options,i=r.onCreate,n=r.onUpdate;r.onCreate=r.onUpdate=function(){nt(o),t(),n(),r.onCreate=i,r.onUpdate=n}},ht=function(e){setTimeout(e,1)},ut=function(e,t,o,r){if(!e)return!0;var i=o.clientX,n=o.clientY,p=r.interactiveBorder,s=r.distance,a=t.top-n>('top'===e?p+s:p),d=n-t.bottom>('bottom'===e?p+s:p),l=t.left-i>('left'===e?p+s:p),c=i-t.right>('right'===e?p+s:p);return a||d||l||c},bt=function(e,t){return-(e-t)+'px'},gt=function(e){var t=e.getAttribute('x-placement');return t?t.split('-')[0]:''},yt=function(e,t){var o=ne({},t,t.performance?{}:Je(e));return o.arrow&&(o.animateFill=!1),'function'==typeof o.appendTo&&(o.appendTo=t.appendTo(e)),'function'==typeof o.content&&(o.content=t.content(e)),o},vt=function(e,t,o){e[t+'EventListener']('transitionend',o)},wt=function(e,t){var o;return function(){var r=this,i=arguments;clearTimeout(o),o=setTimeout(function(){return e.apply(r,i)},t)}},Et=function(e,t){for(var o in e||{})if(!(o in t))throw Error('[tippy]: `'+o+'` is not a valid option')},xt=function(e,t){return{}.hasOwnProperty.call(e,t)},Ot=!1,Lt=function(){Ot||(Ot=!0,me&&document.body.classList.add('tippy-iOS'),window.performance&&document.addEventListener('mousemove',Tt))},Ct=0,Tt=function e(){var t=performance.now();20>t-Ct&&(Ot=!1,document.removeEventListener('mousemove',e),!me&&document.body.classList.remove('tippy-iOS')),Ct=t},At=function(e){var t=e.target;if(!(t instanceof Element))return $e();var o=ot(t,De.POPPER);if(!(o&&o._tippy&&o._tippy.props.interactive)){var r=rt(t,function(e){return e._tippy&&e._tippy.reference===e});if(r){var i=r._tippy,n=-1