var _Mathfloor=Math.floor,_Mathmin=Math.min,_Mathround=Math.round,_Mathmax=Math.max;(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function o(Te){return''!==Te&&!isNaN(parseFloat(Te))&&isFinite(Te)}function r(Te,Ne){Object.keys(Ne).forEach(function(We){var De='';-1!==['width','height','top','right','bottom','left'].indexOf(We)&&o(Ne[We])&&(De='px'),Te.style[We]=Ne[We]+De})}function s(Te){return Te&&'[object Function]'==={}.toString.call(Te)}function p(Te,Ne){if(1!==Te.nodeType)return[];var We=window.getComputedStyle(Te,null);return Ne?We[Ne]:We}function d(Te){return'HTML'===Te.nodeName?Te:Te.parentNode||Te.host}function f(Te){if(!Te||-1!==['HTML','BODY','#document'].indexOf(Te.nodeName))return window.document.body;var Ne=p(Te),We=Ne.overflow,De=Ne.overflowX,He=Ne.overflowY;return /(auto|scroll)/.test(We+He+De)?Te:f(d(Te))}function l(Te){var Ne=Te.nodeName;return'BODY'!==Ne&&('HTML'===Ne||Te.firstElementChild.offsetParent===Te)}function m(Te){return null===Te.parentNode?Te:m(Te.parentNode)}function c(Te){var Ne=Te&&Te.offsetParent,We=Ne&&Ne.nodeName;return We&&'BODY'!==We&&'HTML'!==We?Ne:window.document.documentElement}function h(Te,Ne){if(!Te||!Te.nodeType||!Ne||!Ne.nodeType)return window.document.documentElement;var We=Te.compareDocumentPosition(Ne)&Node.DOCUMENT_POSITION_FOLLOWING,De=We?Te:Ne,He=We?Ne:Te,Pe=document.createRange();Pe.setStart(De,0),Pe.setEnd(He,0);var ke=Pe.commonAncestorContainer;if(Te!==ke&&Ne!==ke||De.contains(He))return l(ke)?ke:c(ke);var Be=m(Te);return Be.host?h(Be.host,Ne):h(Te,m(Ne).host)}function u(Te){var Ne=1De[Me]&&!Ne.escapeWithReference&&(Ae=_Mathmin(Pe[Ie],De[Me]-('right'===Me?Pe.width:Pe.height))),be({},Ie,Ae)}};return He.forEach(function(Be){var Me=-1===['left','top'].indexOf(Be)?'secondary':'primary';Pe=ye({},Pe,ke[Me](Be))}),Te.offsets.popper=Pe,Te},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(Te){var Ne=w(Te.offsets.popper),We=Te.offsets.reference,De=Te.placement.split('-')[0],He=_Mathfloor,Pe=-1!==['top','bottom'].indexOf(De),ke=Pe?'right':'bottom',Be=Pe?'left':'top',Me=Pe?'width':'height';return Ne[ke]He(We[ke])&&(Te.offsets.popper[Be]=He(We[ke])),Te}},arrow:{order:500,enabled:!0,fn:function(Te,Ne){if(!G(Te.instance.modifiers,'arrow','keepTogether'))return Te;var We=Ne.element;if('string'==typeof We){if(We=Te.instance.popper.querySelector(We),!We)return Te;}else if(!Te.instance.popper.contains(We))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),Te;var De=Te.placement.split('-')[0],He=w(Te.offsets.popper),Pe=Te.offsets.reference,ke=-1!==['left','right'].indexOf(De),Be=ke?'height':'width',Me=ke?'top':'left',Ie=ke?'left':'top',Ae=ke?'bottom':'right',Ue=D(We)[Be];Pe[Ae]-UeHe[Ae]&&(Te.offsets.popper[Me]+=Pe[Me]+Ue-He[Ae]);var Ye=Pe[Me]+Pe[Be]/2-Ue/2,Re=Ye-w(Te.offsets.popper)[Me];return Re=_Mathmax(_Mathmin(He[Be]-Ue,Re),0),Te.arrowElement=We,Te.offsets.arrow={},Te.offsets.arrow[Me]=Re,Te.offsets.arrow[Ie]='',Te},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(Te,Ne){if(A(Te.instance.modifiers,'inner'))return Te;if(Te.flipped&&Te.placement===Te.originalPlacement)return Te;var We=T(Te.instance.popper,Te.instance.reference,Ne.padding,Ne.boundariesElement),De=Te.placement.split('-')[0],He=H(De),Pe=Te.placement.split('-')[1]||'',ke=[];switch(Ne.behavior){case Oe.FLIP:ke=[De,He];break;case Oe.CLOCKWISE:ke=Z(De);break;case Oe.COUNTERCLOCKWISE:ke=Z(De,!0);break;default:ke=Ne.behavior;}return ke.forEach(function(Be,Me){if(De!==Be||ke.length===Me+1)return Te;De=Te.placement.split('-')[0],He=H(De);var Ie=w(Te.offsets.popper),Ae=Te.offsets.reference,Ue=_Mathfloor,Ye='left'===De&&Ue(Ie.right)>Ue(Ae.left)||'right'===De&&Ue(Ie.left)Ue(Ae.top)||'bottom'===De&&Ue(Ie.top)Ue(We.right),je=Ue(Ie.top)Ue(We.bottom),Ke='left'===De&&Re||'right'===De&&Fe||'top'===De&&je||'bottom'===De&&qe,ze=-1!==['top','bottom'].indexOf(De),_e=!!Ne.flipVariations&&(ze&&'start'===Pe&&Re||ze&&'end'===Pe&&Fe||!ze&&'start'===Pe&&je||!ze&&'end'===Pe&&qe);(Ye||Ke||_e)&&(Te.flipped=!0,(Ye||Ke)&&(De=ke[Me+1]),_e&&(Pe=Q(Pe)),Te.placement=De+(Pe?'-'+Pe:''),Te.offsets.popper=P(Te.instance.popper,Te.offsets.reference,Te.placement),Te=M(Te.instance.modifiers,Te,'flip'))}),Te},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(Te){var Ne=Te.placement,We=Ne.split('-')[0],De=w(Te.offsets.popper),He=w(Te.offsets.reference),Pe=-1!==['left','right'].indexOf(We),ke=-1===['top','left'].indexOf(We);return De[Pe?'left':'top']=He[Ne]-(ke?De[Pe?'width':'height']:0),Te.placement=H(Ne),Te.offsets.popper=w(De),Te}},hide:{order:800,enabled:!0,fn:function(Te){if(!G(Te.instance.modifiers,'hide','preventOverflow'))return Te;var Ne=Te.offsets.reference,We=k(Te.instance.modifiers,function(De){return'preventOverflow'===De.name}).boundaries;if(Ne.bottomWe.right||Ne.top>We.bottom||Ne.right