react-nested-popper
Version:
A react library based on popper.js that supports nested poppers and proper context binding.
2 lines • 366 kB
JavaScript
/*! For license information please see demo.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e=[(e,t,n)=>{"use strict";e.exports=n(103)},(e,t,n)=>{var r=n(16),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},(e,t,n)=>{var r=n(50),o=n(53);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},(e,t,n)=>{var r=n(5),o=n(34),i=n(35),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},(e,t,n)=>{var r=n(1).Symbol;e.exports=r},e=>{var t=Array.isArray;e.exports=t},(e,t,n)=>{var r=n(40),o=n(41),i=n(42),a=n(43),l=n(44);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},(e,t,n)=>{var r=n(17);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},(e,t,n)=>{var r=n(2)(Object,"create");e.exports=r},(e,t,n)=>{var r=n(62);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},(e,t,n)=>{var r=n(2)(n(1),"Map");e.exports=r},(e,t,n)=>{e=n.nmd(e);var r=n(1),o=n(87),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s},(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(this&&this[n]||n);else if(Array.isArray(n))e.push(o.apply(this,n));else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var a in n)r.call(n,a)&&n[a]&&e.push(this&&this[a]||a)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},(e,t,n)=>{"use strict";n.d(t,{Content:()=>nt,Popper:()=>ct,Stack:()=>Ue,Target:()=>m});var r=n(0),o=n(104),i=n.n(o);function a(e){return a="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},a(e)}var l=["children","className","_onClick","innerRef","_targetRef"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var h,y,v,m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(h,e);var t,n,o,i,a=(o=h,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(o);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function h(){return u(this,h),a.apply(this,arguments)}return t=h,(n=[{key:"setRef",value:function(e){var t=this.props,n=t.innerRef,r=t._targetRef;n&&n(e),r&&r(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.className,i=t._onClick,a=(t.innerRef,t._targetRef,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,l));return r.createElement("div",s({className:o,ref:function(t){return e.setRef(t)},onClick:i},a),n)}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Component);function g(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function b(e){return e instanceof g(e).Element||e instanceof Element}function w(e){return e instanceof g(e).HTMLElement||e instanceof HTMLElement}function x(e){return"undefined"!=typeof ShadowRoot&&(e instanceof g(e).ShadowRoot||e instanceof ShadowRoot)}v="react-nested-popper_Target",(y="className")in(h=m)?Object.defineProperty(h,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[y]=v,m.propTypes={className:i().string,innerRef:i().func,_onClick:i().func,_targetRef:i().func},m.defaultProps={className:"",innerRef:function(e){},_onClick:function(e){},_targetRef:function(e){}};var E=Math.max,_=Math.min,S=Math.round;function k(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function O(){return!/^((?!chrome|android).)*safari/i.test(k())}function C(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&w(e)&&(o=e.offsetWidth>0&&S(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&S(r.height)/e.offsetHeight||1);var a=(b(e)?g(e):window).visualViewport,l=!O()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/o,u=(r.top+(l&&a?a.offsetTop:0))/i,c=r.width/o,p=r.height/i;return{width:c,height:p,top:u,right:s+c,bottom:u+p,left:s,x:s,y:u}}function P(e){var t=g(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function T(e){return e?(e.nodeName||"").toLowerCase():null}function A(e){return((b(e)?e.ownerDocument:e.document)||window.document).documentElement}function j(e){return C(A(e)).left+P(e).scrollLeft}function N(e){return g(e).getComputedStyle(e)}function I(e){var t=N(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function R(e,t,n){void 0===n&&(n=!1);var r,o,i=w(t),a=w(t)&&function(e){var t=e.getBoundingClientRect(),n=S(t.width)/e.offsetWidth||1,r=S(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=A(t),s=C(e,a,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==T(t)||I(l))&&(u=(r=t)!==g(r)&&w(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:P(r)),w(t)?((c=C(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):l&&(c.x=j(l))),{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function D(e){var t=C(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function M(e){return"html"===T(e)?e:e.assignedSlot||e.parentNode||(x(e)?e.host:null)||A(e)}function z(e){return["html","body","#document"].indexOf(T(e))>=0?e.ownerDocument.body:w(e)&&I(e)?e:z(M(e))}function V(e,t){var n;void 0===t&&(t=[]);var r=z(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=g(r),a=o?[i].concat(i.visualViewport||[],I(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(V(M(a)))}function L(e){return["table","td","th"].indexOf(T(e))>=0}function U(e){return w(e)&&"fixed"!==N(e).position?e.offsetParent:null}function F(e){for(var t=g(e),n=U(e);n&&L(n)&&"static"===N(n).position;)n=U(n);return n&&("html"===T(n)||"body"===T(n)&&"static"===N(n).position)?t:n||function(e){var t=/firefox/i.test(k());if(/Trident/i.test(k())&&w(e)&&"fixed"===N(e).position)return null;var n=M(e);for(x(n)&&(n=n.host);w(n)&&["html","body"].indexOf(T(n))<0;){var r=N(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var B="top",W="bottom",H="right",$="left",K="auto",q=[B,W,H,$],G="start",Q="end",Y="viewport",X="popper",J=q.reduce((function(e,t){return e.concat([t+"-"+G,t+"-"+Q])}),[]),Z=[].concat(q,[K]).reduce((function(e,t){return e.concat([t,t+"-"+G,t+"-"+Q])}),[]),ee=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function te(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var ne={placement:"bottom",modifiers:[],strategy:"absolute"};function re(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function oe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?ne:o;return function(e,t,n){void 0===n&&(n=i);var o,a,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},ne,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],u=!1,c={state:l,setOptions:function(n){var o="function"==typeof n?n(l.options):n;p(),l.options=Object.assign({},i,l.options,o),l.scrollParents={reference:b(e)?V(e):e.contextElement?V(e.contextElement):[],popper:V(t)};var a,u,f=function(e){var t=te(e);return ee.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((a=[].concat(r,l.options.modifiers),u=a.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(u).map((function(e){return u[e]}))));return l.orderedModifiers=f.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:l,name:t,instance:c,options:r});s.push(i||function(){})}})),c.update()},forceUpdate:function(){if(!u){var e=l.elements,t=e.reference,n=e.popper;if(re(t,n)){l.rects={reference:R(t,F(n),"fixed"===l.options.strategy),popper:D(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var o=l.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,p=o.name;"function"==typeof i&&(l=i({state:l,options:s,name:p,instance:c})||l)}else l.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){c.forceUpdate(),e(l)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(o())}))}))),a}),destroy:function(){p(),u=!0}};if(!re(e,t))return c;function p(){s.forEach((function(e){return e()})),s=[]}return c.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var ie={passive:!0};function ae(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function se(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ue(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?ae(o):null,a=o?le(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case B:t={x:l,y:n.y-r.height};break;case W:t={x:l,y:n.y+n.height};break;case H:t={x:n.x+n.width,y:s};break;case $:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=i?se(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case G:t[u]=t[u]-(n[c]/2-r[c]/2);break;case Q:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ce={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pe(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,p=e.isFixed,f=a.x,d=void 0===f?0:f,h=a.y,y=void 0===h?0:h,v="function"==typeof c?c({x:d,y}):{x:d,y};d=v.x,y=v.y;var m=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),w=$,x=B,E=window;if(u){var _=F(n),k="clientHeight",O="clientWidth";_===g(n)&&"static"!==N(_=A(n)).position&&"absolute"===l&&(k="scrollHeight",O="scrollWidth"),(o===B||(o===$||o===H)&&i===Q)&&(x=W,y-=(p&&_===E&&E.visualViewport?E.visualViewport.height:_[k])-r.height,y*=s?1:-1),o!==$&&(o!==B&&o!==W||i!==Q)||(w=H,d-=(p&&_===E&&E.visualViewport?E.visualViewport.width:_[O])-r.width,d*=s?1:-1)}var C,P=Object.assign({position:l},u&&ce),T=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:S(t*r)/r||0,y:S(n*r)/r||0}}({x:d,y}):{x:d,y};return d=T.x,y=T.y,s?Object.assign({},P,((C={})[x]=b?"0":"",C[w]=m?"0":"",C.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+y+"px)":"translate3d("+d+"px, "+y+"px, 0)",C)):Object.assign({},P,((t={})[x]=b?y+"px":"",t[w]=m?d+"px":"",t.transform="",t))}const fe={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];w(o)&&T(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});w(r)&&T(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var de={left:"right",right:"left",bottom:"top",top:"bottom"};function he(e){return e.replace(/left|right|bottom|top/g,(function(e){return de[e]}))}var ye={start:"end",end:"start"};function ve(e){return e.replace(/start|end/g,(function(e){return ye[e]}))}function me(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ge(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function be(e,t,n){return t===Y?ge(function(e,t){var n=g(e),r=A(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;var u=O();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l+j(e),y:s}}(e,n)):b(t)?function(e,t){var n=C(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):ge(function(e){var t,n=A(e),r=P(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=E(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=E(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+j(e),s=-r.scrollTop;return"rtl"===N(o||n).direction&&(l+=E(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(A(e)))}function we(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function xe(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Ee(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,l=n.boundary,s=void 0===l?"clippingParents":l,u=n.rootBoundary,c=void 0===u?Y:u,p=n.elementContext,f=void 0===p?X:p,d=n.altBoundary,h=void 0!==d&&d,y=n.padding,v=void 0===y?0:y,m=we("number"!=typeof v?v:xe(v,q)),g=f===X?"reference":X,x=e.rects.popper,S=e.elements[h?g:f],k=function(e,t,n,r){var o="clippingParents"===t?function(e){var t=V(M(e)),n=["absolute","fixed"].indexOf(N(e).position)>=0&&w(e)?F(e):e;return b(n)?t.filter((function(e){return b(e)&&me(e,n)&&"body"!==T(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce((function(t,n){var o=be(e,n,r);return t.top=E(o.top,t.top),t.right=_(o.right,t.right),t.bottom=_(o.bottom,t.bottom),t.left=E(o.left,t.left),t}),be(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}(b(S)?S:S.contextElement||A(e.elements.popper),s,c,a),O=C(e.elements.reference),P=ue({reference:O,element:x,strategy:"absolute",placement:o}),j=ge(Object.assign({},x,P)),I=f===X?j:O,R={top:k.top-I.top+m.top,bottom:I.bottom-k.bottom+m.bottom,left:k.left-I.left+m.left,right:I.right-k.right+m.right},D=e.modifiersData.offset;if(f===X&&D){var z=D[o];Object.keys(R).forEach((function(e){var t=[H,W].indexOf(e)>=0?1:-1,n=[B,W].indexOf(e)>=0?"y":"x";R[e]+=z[n]*t}))}return R}function _e(e,t,n){return E(e,_(t,n))}const Se={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0!==a&&a,s=n.boundary,u=n.rootBoundary,c=n.altBoundary,p=n.padding,f=n.tether,d=void 0===f||f,h=n.tetherOffset,y=void 0===h?0:h,v=Ee(t,{boundary:s,rootBoundary:u,padding:p,altBoundary:c}),m=ae(t.placement),g=le(t.placement),b=!g,w=se(m),x="x"===w?"y":"x",S=t.modifiersData.popperOffsets,k=t.rects.reference,O=t.rects.popper,C="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,P="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,A={x:0,y:0};if(S){if(i){var j,N="y"===w?B:$,I="y"===w?W:H,R="y"===w?"height":"width",M=S[w],z=M+v[N],V=M-v[I],L=d?-O[R]/2:0,U=g===G?k[R]:O[R],K=g===G?-O[R]:-k[R],q=t.elements.arrow,Q=d&&q?D(q):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Y[N],J=Y[I],Z=_e(0,k[R],Q[R]),ee=b?k[R]/2-L-Z-X-P.mainAxis:U-Z-X-P.mainAxis,te=b?-k[R]/2+L+Z+J+P.mainAxis:K+Z+J+P.mainAxis,ne=t.elements.arrow&&F(t.elements.arrow),re=ne?"y"===w?ne.clientTop||0:ne.clientLeft||0:0,oe=null!=(j=null==T?void 0:T[w])?j:0,ie=M+te-oe,ue=_e(d?_(z,M+ee-oe-re):z,M,d?E(V,ie):V);S[w]=ue,A[w]=ue-M}if(l){var ce,pe="x"===w?B:$,fe="x"===w?W:H,de=S[x],he="y"===x?"height":"width",ye=de+v[pe],ve=de-v[fe],me=-1!==[B,$].indexOf(m),ge=null!=(ce=null==T?void 0:T[x])?ce:0,be=me?ye:de-k[he]-O[he]-ge+P.altAxis,we=me?de+k[he]+O[he]-ge-P.altAxis:ve,xe=d&&me?function(e,t,n){var r=_e(e,t,n);return r>n?n:r}(be,de,we):_e(d?be:ye,de,d?we:ve);S[x]=xe,A[x]=xe-de}t.modifiersData[r]=A}},requiresIfExists:["offset"]};function ke(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Oe(e){return[B,H,W,$].some((function(t){return e[t]>=0}))}var Ce=oe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,l=void 0===a||a,s=g(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,ie)})),l&&s.addEventListener("resize",n.update,ie),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,ie)})),l&&s.removeEventListener("resize",n.update,ie)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ue({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,l=n.roundOffsets,s=void 0===l||l,u={placement:ae(t.placement),variation:le(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,pe(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,pe(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},fe,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=Z.reduce((function(e,n){return e[n]=function(e,t,n){var r=ae(e),o=[$,B].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[$,H].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,i),e}),{}),l=a[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0===a||a,s=n.fallbackPlacements,u=n.padding,c=n.boundary,p=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,h=void 0===d||d,y=n.allowedAutoPlacements,v=t.options.placement,m=ae(v),g=s||(m!==v&&h?function(e){if(ae(e)===K)return[];var t=he(e);return[ve(e),t,ve(t)]}(v):[he(v)]),b=[v].concat(g).reduce((function(e,n){return e.concat(ae(n)===K?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,u=void 0===s?Z:s,c=le(r),p=c?l?J:J.filter((function(e){return le(e)===c})):q,f=p.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=p);var d=f.reduce((function(t,n){return t[n]=Ee(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[ae(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:c,rootBoundary:p,padding:u,flipVariations:h,allowedAutoPlacements:y}):n)}),[]),w=t.rects.reference,x=t.rects.popper,E=new Map,_=!0,S=b[0],k=0;k<b.length;k++){var O=b[k],C=ae(O),P=le(O)===G,T=[B,W].indexOf(C)>=0,A=T?"width":"height",j=Ee(t,{placement:O,boundary:c,rootBoundary:p,altBoundary:f,padding:u}),N=T?P?H:$:P?W:B;w[A]>x[A]&&(N=he(N));var I=he(N),R=[];if(i&&R.push(j[C]<=0),l&&R.push(j[N]<=0,j[I]<=0),R.every((function(e){return e}))){S=O,_=!1;break}E.set(O,R)}if(_)for(var D=function(e){var t=b.find((function(t){var n=E.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},M=h?3:1;M>0&&"break"!==D(M);M--);t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Se,{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=ae(n.placement),s=se(l),u=[$,H].indexOf(l)>=0?"height":"width";if(i&&a){var c=function(e,t){return we("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:xe(e,q))}(o.padding,n),p=D(i),f="y"===s?B:$,d="y"===s?W:H,h=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],y=a[s]-n.rects.reference[s],v=F(i),m=v?"y"===s?v.clientHeight||0:v.clientWidth||0:0,g=h/2-y/2,b=c[f],w=m-p[u]-c[d],x=m/2-p[u]/2+g,E=_e(b,x,w),_=s;n.modifiersData[r]=((t={})[_]=E,t.centerOffset=E-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&me(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Ee(t,{elementContext:"reference"}),l=Ee(t,{altBoundary:!0}),s=ke(a,r),u=ke(l,o,i),c=Oe(s),p=Oe(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}}]}),Pe=n(29),Te=n.n(Pe),Ae=n(36),je=n.n(Ae);function Ne(e){return function(e){if(Array.isArray(e))return Ie(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ie(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t,n){return t&&Re(e.prototype,t),n&&Re(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve={},Le=De((function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Me(this,e),ze(this,"debug",!1),ze(this,"pushing",{}),ze(this,"getStack",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"global",t=Ve[e];return t||(t=[],Ve[e]=t,n._log("new stack:",e),t)})),ze(this,"destroyStack",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0!==e){"string"==typeof e&&(e=[e]);for(var t=e.length-1;t>=0;t-=1){var r=e[t],o=n.getStack(r);if(o.length>0){if(n.pushing[r])return;for(var i=o.length-1;i>=0;i-=1){var a=o[i];a.componentWillDestroy&&!a.isDestroying&&a.componentWillDestroy()}n._log("destroy stack:",r);break}}}else Object.keys(Ve).forEach(n.destroyStack)})),ze(this,"_destroyLast",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";"string"==typeof t&&(t=[t]);for(var r=t.length-1;r>=0;r-=1){var o=t[r],i=n.getStack(o);if(i.length>0){if(n.pushing[o])return;var a=i[i.length-1];if(a.id!==e.id)return;n._log("_destroyLast: should destroy:",e.id,e.isDestroying),e.componentWillDestroy&&!e.isDestroying&&e.componentWillDestroy();break}}})),ze(this,"_push",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";"string"==typeof t&&(t=[t]),t.forEach((function(t){n.pushing[t]=!0,n.getStack(t).push(e),n._log("push:",t,e.id),n._clearPushing(t)}))})),ze(this,"_reflow",(function(e,t){var r=[];return Object.keys(t).forEach((function(o){var i=t[o],a=Ve[o].length-1===i;if(r.push(o),!a){var l,s=Ve[o].splice(i+1),u="_content"+s[0].id;(l=n.getStack(u)).push.apply(l,Ne(s));for(var c=s.length-1;c>=0;c-=1){var p=s[c];p.determinedStack=[u],p.onOutsideClick&&p.onOutsideClick(e)}}})),r})),ze(this,"_removeBy",(function(e){var t=e.id;Object.keys(Ve).forEach((function(r){var o=Ve[r],i=o.findIndex((function(e){return e.id===t}));i>-1&&(o.splice(i,1),n._log("removeBy:",r,e.id))}))})),ze(this,"_clearPushing",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"global";setTimeout((function(){n.pushing[e]&&delete n.pushing[e]}),250)})),ze(this,"_log",(function(){if(n.debug){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];(e=console).log.apply(e,["Stack:"].concat(r,[Ve]))}})),ze(this,"_getStackStore",(function(){return n.debug?Ve:null})),ze(this,"_getTargetParents",(function(e){if(!e)return null;var t={},n=!1;return Object.keys(Ve).forEach((function(r){for(var o=Ve[r],i=0;i<o.length;i+=1){var a=o[i];if(a.popperEl&&a.popperEl.contains(e)){n=!0,t[r]=i;break}}})),n?t:null})),t&&this.getStack(t),this.debug=r}));const Ue=new Le;var Fe=n(101);function Be(e){return Be="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},Be(e)}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}function $e(e,t){if(t&&("object"===Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ke(e)}function Ke(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}var Ge=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&He(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=qe(r);if(o){var n=qe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return $e(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Ke(t=i.call(this,e)),"portalEl",document.createElement("div")),t.props.innerRef(t.portalEl),t}return t=a,(n=[{key:"componentDidMount",value:function(){this.portalEl.className=this.props.className,this.portalRoot.appendChild(this.portalEl)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.portalEl)}},{key:"portalRoot",get:function(){return this.props.portalRoot||document.getElementsByTagName("body")[0]}},{key:"render",value:function(){return Fe.createPortal(this.props.children,this.portalEl)}}])&&We(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Component);function Qe(e){return Qe="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},Qe(e)}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xe(e,t)}function Je(e,t){if(t&&("object"===Qe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ze(e)}function Ze(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},et(e)}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ge.propTypes={className:i().string,innerRef:i().func,portalRoot:i().element},Ge.defaultProps={className:"",innerRef:function(e){},portalRoot:null};var nt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}(l,e);var t,n,o,i,a=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=et(o);if(i){var n=et(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Je(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),tt(Ze(t=a.call(this,e)),"popperEl",null),tt(Ze(t),"resizerEl",null),tt(Ze(t),"popperInstance",null),tt(Ze(t),"determinedStack",null),tt(Ze(t),"resizerEventAdded",!1),tt(Ze(t),"positionPoller",null),tt(Ze(t),"lastTargetPos",[0,0]),tt(Ze(t),"targetParents",null),tt(Ze(t),"isDestroying",!1),tt(Ze(t),"setPopperRef",(function(e){t.popperEl=e,t.props.innerRef&&t.props.innerRef(e)})),tt(Ze(t),"setResizerRef",(function(e){t.resizerEl=e})),tt(Ze(t),"onCheckPosition",(function(){if(t.props._targetRef){var e=t.lastTargetPos,n=e.left,r=e.top,o=t.props._targetRef.getBoundingClientRect(),i=o.left,a=o.top;0===n&&0===r&&(n=i,r=a),n===i&&r===a||t.targetParents&&t.popperInstance&&t.popperInstance.update(),t.lastTargetPos=o}})),tt(Ze(t),"onOutsideClick",(function(e){t.popperEl&&t.popperEl.contains(e.target)||t.props._onOutsideClick(Ze(t),e)})),tt(Ze(t),"onResize",(function(){t.popperInstance&&t.popperInstance.update()})),t.id=Te()(),t}return t=l,n=[{key:"componentDidMount",value:function(){this.props._show&&(this.initPopperInstance(),this.initResizer()),this.props._targetRef&&(this.targetParents=Ue._getTargetParents(this.props._targetRef))}},{key:"componentDidUpdate",value:function(e){this.props._show?this.popperInstance?je()(this.props.popperOptions,e.popperOptions)||(this.popperInstance.setOptions(this.props.popperOptions),this.forcePopperUpdate()):(this.initPopperInstance(),this.initResizer()):(this.destroyResizer(),this.destroyPopperInstance()),e._targetRef!==this.props._targetRef&&(this.targetParents=Ue._getTargetParents(this.props._targetRef))}},{key:"componentWillUnmount",value:function(){this.destroyResizer(),this.destroyPopperInstance()}},{key:"componentWillDestroy",value:function(){this.isDestroying=!0,this.props._onComponentWillDestroy()}},{key:"initPopperInstance",value:function(){if(this.popperEl&&this.props._targetRef&&!this.popperInstance){this.popperInstance=Ce(this.props._targetRef,this.popperEl,this.props.popperOptions);var e=this.props._stack;if("auto"===e){var t=Ue._getTargetParents(this.props._targetRef);e=t?Ue._reflow(this.props._targetRef,t):["_content"+this.id]}this.determinedStack=e,Ue._push(this,e),document.addEventListener("click",this.onOutsideClick,!0),this.forcePopperUpdate()}}},{key:"destroyPopperInstance",value:function(){this.popperInstance&&(document.removeEventListener("click",this.onOutsideClick,!0),this.popperInstance.destroy(),this.popperInstance=null,Ue._removeBy(this)),this.popperEl=null,this.isDestroying=!1}},{key:"forcePopperUpdate",value:function(){var e=this;setTimeout((function(){e.popperInstance&&e.popperInstance.update()}))}},{key:"initResizer",value:function(){this.resizerEl&&!this.resizerEventAdded&&(this.resizerEl.contentDocument?(null===this.resizerEventAdded&&this.resizerEl.removeEventListener("load",this.initResizer),this.props._targetRef&&(this.lastTargetPos=this.props._targetRef.getBoundingClientRect()),this.positionPoller=setInterval(this.onCheckPosition,50),this.resizerEl.contentDocument.defaultView.addEventListener("resize",this.onResize),this.resizerEventAdded=!0):(this.resizerEl.addEventListener("load",this.initResizer),this.resizerEventAdded=null))}},{key:"destroyResizer",value:function(){this.resizerEl&&this.resizerEl.contentDocument&&this.resizerEventAdded&&this.resizerEl.contentDocument.defaultView.removeEventListener("resize",this.onResize),this.positionPoller&&(clearInterval(this.positionPoller),this.positionPoller=null),this.resizerEventAdded=!1}},{key:"render",value:function(){if(!this.props._targetRef||!this.props._show)return null;var e=r.createElement("div",{className:this.props.className,ref:this.setPopperRef,onClick:this.props.onClick,style:{position:"relative"}},this.renderResizerIframe(),this.props.children,this.props.includeArrow&&r.createElement("div",{className:this.props.arrowClassName,"data-popper-arrow":!0}));return this.props._usePortal?r.createElement(Ge,{portalRoot:this.props._portalRoot,className:this.props._portalClassName},e):e}},{key:"renderResizerIframe",value:function(){return r.createElement("iframe",{src:"about:blank",ref:this.setResizerRef,"aria-hidden":!0,tabIndex:-1,frameBorder:0,title:"resizer",style:{display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1}})}}],n&&Ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Component);function rt(e){return rt="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},rt(e)}function ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}function at(e,t){if(t&&("object"===rt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return lt(e)}function lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tt(nt,"className","react-nested-popper_Content"),nt.propTypes={arrowClassName:i().string,className:i().string,includeArrow:i().bool,innerRef:i().func,onClick:i().func,popperOptions:i().object,_onComponentWillDestroy:i().func,_onOutsideClick:i().func,_portalClassName:i().string,_portalRoot:i().element,_stack:i().oneOfType([i().string,i().arrayOf(i().string)]),_show:i().bool,_targetRef:i().any,_usePortal:i().bool},nt.defaultProps={arrowClassName:"",className:"",includeArrow:!1,innerRef:function(e){},onClick:function(e){},popperOptions:{},_onComponentWillDestroy:function(){},_onOutsideClick:function(e,t){},_portalClassName:"",_portalRoot:null,_stack:"auto",_show:!1,_targetRef:null,_usePortal:!0};var ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&it(e,t)}(l,e);var t,n,o,i,a=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=st(o);if(i){var n=st(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return at(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),ut(lt(t=a.call(this,e)),"setTargetRef",(function(e){e&&e!==t.state.targetRef&&t.setState({targetRef:e})})),ut(lt(t),"closeContent",(function(){t.setState({show:!1})})),ut(lt(t),"onTargetClick",(function(e){t.isManaged?t.setState((function(e){return{show:!t.props.targetToggle||!e.show}})):t.props.onTargetClick&&t.props.onTargetClick(e)})),ut(lt(t),"onContentOutsideClick",(function(e,n){if(!t.state.targetRef||!t.state.targetRef.contains(n.target)){t.props.onOutsideClick&&t.props.onOutsideClick(e,n);var r="auto"===t.props.groupName?e.determinedStack:t.props.groupName;if(t.props.shouldCloseOnOutsideClick(n))switch(t.props.outsideClickType){case"group":Ue.destroyStack(r);break;case"all":Ue.destroyStack(!0);break;default:Ue._destroyLast(e,r)}}})),ut(lt(t),"onContentWillDestroy",(function(){t.isManaged?t.closeContent():t.props.onPopperWillClose&&t.props.onPopperWillClose()})),t.validChildren=t.checkChildren(e.children),t.isManaged=t.checkIsManaged(e),t.state={show:!!e.initiallyOpen,targetRef:null},t}return t=l,(n=[{key:"shouldComponentUpdate",value:function(e){return this.validChildren=this.checkChildren(e.children),this.isManaged=this.checkIsManaged(e),this.validChildren}},{key:"show",get:function(){return this.isManaged?this.state.show:this.props.show}},{key:"getTargetComponent",value:function(e){var t=null;return r.Children.forEach(e,(function(e){!t&&e.type&&e.type.className===m.className&&(t=e)})),t}},{key:"getContentComponent",value:function(e){var t=null;return r.Children.forEach(e,(function(e){!t&&e.type&&e.type.className===nt.className&&(t=e)})),t}},{key:"checkChildren",value:function(e){var t=this.getTargetComponent(e)&&this.getContentComponent(e);return t||console.error("Popper must contain one Target component and one Content component."),t}},{key:"checkIsManaged",value:function(e){return void 0===e.show||null===e.show}},{key:"modifyChildren",value:function(e){var t=this;return r.Children.map(e,(function(e){var n={};return e.type.className===m.className?n={_onClick:t.onTargetClick,_targetRef:t.setTargetRef}:e.type.className===nt.className&&(n={_onComponentWillDestroy:t.onContentWillDestroy,_onOutsideClick:t.onContentOutsideClick,_portalClassName:t.props.portalClassName,_portalRoot:t.props.portalRoot,_show:t.show,_stack:t.props.groupName,_targetRef:t.state.targetRef,_usePortal:t.props.usePortal}),r.cloneElement(e,n)}))}},{key:"render",value:function(){if(!this.validChildren)return null;var e=this.props.children;return r.createElement(r.Fragment,null,this.modifyChildren(this.getTargetComponent(e)),this.modifyChildren(this.getContentComponent(e)))}}])&&ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Component);ut(ct,"className","react-nested-popper_Popper"),ct.propTypes={groupName:i().oneOfType([i().string,i().arrayOf(i().string)]),initiallyOpen:i().bool,onOutsideClick:i().func,onPopperWillClose:i().func,onTargetClick:i().func,outsideClickType:i().oneOf(["default","group","all"]),portalClassName:i().string,portalRoot:i().element,shouldCloseOnOutsideClick:i().func,show:i().bool,targetToggle:i().bool,usePortal:i().bool},ct.defaultProps={groupName:"auto",initiallyOpen:!1,onOutsideClick:function(e){},onPopperWillClose:function(){},onTargetClick:function(e){},outsideClickType:"default",portalClassName:"",portalRoot:null,shouldCloseOnOutsideClick:function(e){return!1},show:null,targetToggle:!1,usePortal:!0}},e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,s=o(e),u=1;u<arguments.length;u++){for(var c in a=Object(arguments[u]))n.call(a,c)&&(s[c]=a[c]);if(t){l=t(a);for(var p=0;p<l.length;p++)r.call(a,l[p])&&(s[l[p]]=a[l[p]])}}return s}},(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},(e,t,n)=>{var r=n(3),o=n(19);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},(e,t,n)=>{var r=n(54),o=n(61),i=n(63),a=n(64),l=n(65);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},(e,t,n)=>{var r=n(66),o=n(69),i=n(70);e.exports=function(e,t,n,a,l,s){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var h=-1,y=!0,v=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(a)var b=u?a(g,m,h,t,e,s):a(m,g,h,e,t,s);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(m===e||l(m,e,n,a,s)))return v.push(t)}))){y=!1;break}}else if(m!==g&&!l(m,g,n,a,s)){y=!1;break}}return s.delete(e),s.delete(t),y}},(e,t,n)=>{var r=n(89),o=n(90),i=n(25),a=i&&i.isTypedArray,l=a?o(a):r;e.exports=l},e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},(e,t,n)=>{e=n.nmd(e);var r=n(16),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,l=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},(e,t)=>{"use strict";var n,r,o,i,a;if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,s=null,u=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(u,0),e}},c=Date.now();t.unstable_now=function(){return Date.now()-c},n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(u,0))},r=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},i=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,f=window.Date,d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var y=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var v=f.now();t.unstable_now=function(){return f.now()-v}}var m=!1,g=null,b=-1,w=5,x=0;i=function(){return t.unstable_now()>=x},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,_=E.port2;E.port1.onmessage=function(){if(null!==g){var e=t.unstable_now();x=e+w;try{g(!0,e)?_.postMessage(null):(m=!1,g=null)}catch(e){throw _.postMessage(null),e}}else m=!1},n=function(e){g=e,m||(m=!0,_.postMessage(null))},r=function(e,n){b=d((function(){e(t.unstable_now())}),n)},o=function(){h(b),b=-1}}function S(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<C(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function O(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],l=i+1,s=e[l];if(void 0!==a&&0>C(a,n))void 0!==s&&0>C(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>C(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],T=[],A=1,j=null,N=3,I=!1,R=!1,D=!1;function M(e){for(var t=k(T);null!==t;){if(null===t.callback)O(T);else{if(!(t.startTime<=e))break;O(T),t.sortIndex=t.expirationTime,S(P,t)}t=k(T)}}function z(e){if(D=!1,M(e),!R)if(null!==k(P))R=!0,n(V);else{var t=k(T);null!==t&&r(z,t.startTime-e)}}function V(e,n){R=!1,D&&(D=!1,o()),I=!0;var a=N;try{for(M(n),j=k(P);null!==j&&(!(j.expirationTime>n)||e&&!i());){var l=j.callback;if(null!==l){j.callback=null,N=j.priorityLevel;var s=l(j.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?j.callback=s:j===k(P)&&O(P),M(n)}else O(P);j=k(P)}if(null!==j)var u=!0;else{var c=k(T);null!==c&&r(z,c.startTime-n),u=!1}return u}finally{j=null,N=a,I=!1}}function L(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_con