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(Ne){return''!==Ne&&!isNaN(parseFloat(Ne))&&isFinite(Ne)}function r(Ne,We){Object.keys(We).forEach(function(Pe){var De='';-1!==['width','height','top','right','bottom','left'].indexOf(Pe)&&o(We[Pe])&&(De='px'),Ne.style[Pe]=We[Pe]+De})}function p(Ne){return Ne&&'[object Function]'==={}.toString.call(Ne)}function s(Ne,We){if(1!==Ne.nodeType)return[];var Pe=window.getComputedStyle(Ne,null);return We?Pe[We]:Pe}function d(Ne){return'HTML'===Ne.nodeName?Ne:Ne.parentNode||Ne.host}function f(Ne){if(!Ne||-1!==['HTML','BODY','#document'].indexOf(Ne.nodeName))return window.document.body;var We=s(Ne),Pe=We.overflow,De=We.overflowX,He=We.overflowY;return /(auto|scroll)/.test(Pe+He+De)?Ne:f(d(Ne))}function l(Ne){var We=Ne.nodeName;return'BODY'!==We&&('HTML'===We||Ne.firstElementChild.offsetParent===Ne)}function m(Ne){return null===Ne.parentNode?Ne:m(Ne.parentNode)}function h(Ne){var We=Ne&&Ne.offsetParent,Pe=We&&We.nodeName;return Pe&&'BODY'!==Pe&&'HTML'!==Pe?We:window.document.documentElement}function c(Ne,We){if(!Ne||!Ne.nodeType||!We||!We.nodeType)return window.document.documentElement;var Pe=Ne.compareDocumentPosition(We)&Node.DOCUMENT_POSITION_FOLLOWING,De=Pe?Ne:We,He=Pe?We:Ne,Be=document.createRange();Be.setStart(De,0),Be.setEnd(He,0);var Me=Be.commonAncestorContainer;if(Ne!==Me&&We!==Me||De.contains(He))return l(Me)?Me:h(Me);var Ie=m(Ne);return Ie.host?c(Ie.host,We):c(Ne,m(We).host)}function u(Ne){var We=1=Pe.clientWidth&&qe>=Pe.clientHeight}),Ue=0De[Ae]&&!We.escapeWithReference&&(Ue=_Mathmin(Be[Re],De[Ae]-('right'===Ae?Be.width:Be.height))),ve({},Re,Ue)}};return He.forEach(function(Ie){var Ae=-1===['left','top'].indexOf(Ie)?'secondary':'primary';Be=xe({},Be,Me[Ae](Ie))}),Ne.offsets.popper=Be,Ne},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(Ne){var We=O(Ne.offsets.popper),Pe=Ne.offsets.reference,De=Ne.placement.split('-')[0],He=_Mathfloor,Be=-1!==['top','bottom'].indexOf(De),Me=Be?'right':'bottom',Ie=Be?'left':'top',Ae=Be?'width':'height';return We[Me]He(Pe[Me])&&(Ne.offsets.popper[Ie]=He(Pe[Me])),Ne}},arrow:{order:500,enabled:!0,fn:function(Ne,We){if(!Q(Ne.instance.modifiers,'arrow','keepTogether'))return Ne;var Pe=We.element;if('string'==typeof Pe){if(Pe=Ne.instance.popper.querySelector(Pe),!Pe)return Ne;}else if(!Ne.instance.popper.contains(Pe))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),Ne;var De=Ne.placement.split('-')[0],He=O(Ne.offsets.popper),Be=Ne.offsets.reference,Me=-1!==['left','right'].indexOf(De),Ie=Me?'height':'width',Ae=Me?'top':'left',Re=Me?'left':'top',Ue=Me?'bottom':'right',Ye=D(Pe)[Ie];Be[Ue]-YeHe[Ue]&&(Ne.offsets.popper[Ae]+=Be[Ae]+Ye-He[Ue]);var Fe=Be[Ae]+Be[Ie]/2-Ye/2,je=Fe-O(Ne.offsets.popper)[Ae];return je=_Mathmax(_Mathmin(He[Ie]-Ye,je),0),Ne.arrowElement=Pe,Ne.offsets.arrow={},Ne.offsets.arrow[Ae]=_Mathfloor(je),Ne.offsets.arrow[Re]='',Ne},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(Ne,We){if(U(Ne.instance.modifiers,'inner'))return Ne;if(Ne.flipped&&Ne.placement===Ne.originalPlacement)return Ne;var Pe=k(Ne.instance.popper,Ne.instance.reference,We.padding,We.boundariesElement),De=Ne.placement.split('-')[0],He=H(De),Be=Ne.placement.split('-')[1]||'',Me=[];switch(We.behavior){case Se.FLIP:Me=[De,He];break;case Se.CLOCKWISE:Me=J(De);break;case Se.COUNTERCLOCKWISE:Me=J(De,!0);break;default:Me=We.behavior;}return Me.forEach(function(Ie,Ae){if(De!==Ie||Me.length===Ae+1)return Ne;De=Ne.placement.split('-')[0],He=H(De);var Re=O(Ne.offsets.popper),Ue=Ne.offsets.reference,Ye=_Mathfloor,Fe='left'===De&&Ye(Re.right)>Ye(Ue.left)||'right'===De&&Ye(Re.left)Ye(Ue.top)||'bottom'===De&&Ye(Re.top)Ye(Pe.right),Ke=Ye(Re.top)Ye(Pe.bottom),_e='left'===De&&je||'right'===De&&qe||'top'===De&&Ke||'bottom'===De&&ze,Ve=-1!==['top','bottom'].indexOf(De),Ge=!!We.flipVariations&&(Ve&&'start'===Be&&je||Ve&&'end'===Be&&qe||!Ve&&'start'===Be&&Ke||!Ve&&'end'===Be&&ze);(Fe||_e||Ge)&&(Ne.flipped=!0,(Fe||_e)&&(De=Me[Ae+1]),Ge&&(Be=$(Be)),Ne.placement=De+(Be?'-'+Be:''),Ne.offsets.popper=xe({},Ne.offsets.popper,B(Ne.instance.popper,Ne.offsets.reference,Ne.placement)),Ne=A(Ne.instance.modifiers,Ne,'flip'))}),Ne},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(Ne){var We=Ne.placement,Pe=We.split('-')[0],De=O(Ne.offsets.popper),He=O(Ne.offsets.reference),Be=-1!==['left','right'].indexOf(Pe),Me=-1===['top','left'].indexOf(Pe);return De[Be?'left':'top']=He[We]-(Me?De[Be?'width':'height']:0),Ne.placement=H(We),Ne.offsets.popper=O(De),Ne}},hide:{order:800,enabled:!0,fn:function(Ne){if(!Q(Ne.instance.modifiers,'hide','preventOverflow'))return Ne;var We=Ne.offsets.reference,Pe=M(Ne.instance.modifiers,function(De){return'preventOverflow'===De.name}).boundaries;if(We.bottomPe.right||We.top>Pe.bottom||We.right