!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactBigCalendar={})}(this,(function(e){"use strict";function t(e){return e.children}function n(e){return n="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},n(e)}function r(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function o(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}function u(e,t){if(null==e)return{};var n,r,o=l(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2?n-2:0),o=2;ot})),Ye=ut((function(e,t){return e>=t})),qe=ut((function(e,t){return e=t&&o.getHours()-n.getHours()2&&void 0!==arguments[2]?arguments[2]:"day",r=e,o=[];Ke(r,t,n);)o.push(r),r=Ie(r,1,n);return o}function mt(e,t){return null==t&&null==e?null:(null==t&&(t=new Date),null==e&&(e=new Date),e=We(e,"day"),e=tt(e,tt(t)),e=et(e,et(t)),e=Ze(e,Ze(t)),Je(e,Je(t)))}function gt(e){return 0===tt(e)&&0===et(e)&&0===Ze(e)&&0===Je(e)}function yt(e,t,n){return n&&"milliseconds"!==n?Math.round(Math.abs(+We(e,n)/ct[n]-+We(t,n)/ct[n])):Math.abs(+e-+t)}var bt=be.oneOfType([be.string,be.func]);function wt(e,t,n,r,o){var a="function"==typeof r?r(n,o,e):t.call(e,n,r,o);return de(null==a||"string"==typeof a,"`localizer format(..)` must return a string, null, or undefined"),a}function kt(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function Et(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function St(e,t){return yt(e,t,"minutes")+Et(e,t)}function Dt(e){var t=We(e,"day");return yt(t,e,"minutes")+Et(t,e)}function _t(e,t){return qe(e,t,"day")}function xt(e,t,n){return Ve(e,t,"minutes")?Ye(t,n,"minutes"):$e(t,n,"minutes")}function Ot(e,t){return function(e,t,n,r){return"day"===n&&(n="date"),Math.abs(st[n](e,void 0,r)-st[n](t,void 0,r))}(e,t,"day")}function Mt(e){var t=e.evtA,n=t.start,r=t.end,o=t.allDay,a=e.evtB,i=a.start,l=a.end,u=a.allDay,s=+We(n,"day")-+We(i,"day"),c=Ot(n,r),f=Ot(i,l);return s||f-c||!!u-!!o||+n-+i||+r-+l}function Ct(e){var t=e.event,n=t.start,r=t.end,o=e.range,a=o.start,i=o.end,l=We(n,"day"),u=Ke(l,i,"day"),s=Be(l,r,"minutes")?$e(r,a,"minutes"):Ye(r,a,"minutes");return u&&s}function Tt(e,t){return Ve(e,t,"day")}function Pt(e,t){return gt(e)&>(t)}var Rt=f((function e(t){var n=this;s(this,e),de("function"==typeof t.format,"date localizer `format(..)` must be a function"),de("function"==typeof t.firstOfWeek,"date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||bt,this.formats=t.formats,this.format=function(){for(var e=arguments.length,r=new Array(e),o=0;o1)return n.map((function(n){return ce.createElement("button",{type:"button",key:n,className:D({"rbc-active":r===n}),onClick:t.view.bind(null,n)},e[n])}))}}])}(ce.Component);function Lt(e,t){e&&e.apply(null,[].concat(t))}var At={date:"Date",time:"Time",event:"Event",allDay:"All Day",week:"Week",work_week:"Work Week",day:"Day",month:"Month",previous:"Back",next:"Next",yesterday:"Yesterday",tomorrow:"Tomorrow",today:"Today",agenda:"Agenda",noEventsInRange:"There are no events in this range.",showMore:function(e){return"+".concat(e," more")}};function jt(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Ft(e){return function(e){if(Array.isArray(e))return b(e)}(e)||jt(e)||w(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.")}()}var It=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r-1&&e%1==0&&e<=9007199254740991},sn=ln,cn=un;var fn=function(e){return null!=e&&cn(e.length)&&!sn(e)},dn=/^(?:0|[1-9]\d*)$/;var pn=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&dn.test(e))&&e>-1&&e%1==0&&e{t.current=e}),[e]),t}(e);return O.useCallback((function(...e){return t.current&&t.current(...e)}),[t])}function br(){return O.useState(null)}function wr(e){const t=function(){const e=O.useRef(!0),t=O.useRef((()=>e.current));return O.useEffect((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}();return[e[0],O.useCallback((n=>{if(t())return e[1](n)}),[t,e[1]])]}var kr="top",Er="bottom",Sr="right",Dr="left",_r="auto",xr=[kr,Er,Sr,Dr],Or="start",Mr="end",Cr="clippingParents",Tr="viewport",Pr="popper",Rr="reference",Nr=xr.reduce((function(e,t){return e.concat([t+"-"+Or,t+"-"+Mr])}),[]),zr=[].concat(xr,[_r]).reduce((function(e,t){return e.concat([t,t+"-"+Or,t+"-"+Mr])}),[]),Lr=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ar(e){return e.split("-")[0]}function jr(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Fr(e){return e instanceof jr(e).Element||e instanceof Element}function Ir(e){return e instanceof jr(e).HTMLElement||e instanceof HTMLElement}function Ur(e){return"undefined"!=typeof ShadowRoot&&(e instanceof jr(e).ShadowRoot||e instanceof ShadowRoot)}var Wr=Math.max,Hr=Math.min,Vr=Math.round;function Br(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function $r(){return!/^((?!chrome|android).)*safari/i.test(Br())}function Yr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Ir(e)&&(o=e.offsetWidth>0&&Vr(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Vr(r.height)/e.offsetHeight||1);var i=(Fr(e)?jr(e):window).visualViewport,l=!$r()&&n,u=(r.left+(l&&i?i.offsetLeft:0))/o,s=(r.top+(l&&i?i.offsetTop:0))/a,c=r.width/o,f=r.height/a;return{width:c,height:f,top:s,right:u+c,bottom:s+f,left:u,x:u,y:s}}function qr(e){var t=Yr(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 Kr(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ur(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Qr(e){return e?(e.nodeName||"").toLowerCase():null}function Gr(e){return jr(e).getComputedStyle(e)}function Xr(e){return["table","td","th"].indexOf(Qr(e))>=0}function Jr(e){return((Fr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Zr(e){return"html"===Qr(e)?e:e.assignedSlot||e.parentNode||(Ur(e)?e.host:null)||Jr(e)}function eo(e){return Ir(e)&&"fixed"!==Gr(e).position?e.offsetParent:null}function to(e){for(var t=jr(e),n=eo(e);n&&Xr(n)&&"static"===Gr(n).position;)n=eo(n);return n&&("html"===Qr(n)||"body"===Qr(n)&&"static"===Gr(n).position)?t:n||function(e){var t=/firefox/i.test(Br());if(/Trident/i.test(Br())&&Ir(e)&&"fixed"===Gr(e).position)return null;var n=Zr(e);for(Ur(n)&&(n=n.host);Ir(n)&&["html","body"].indexOf(Qr(n))<0;){var r=Gr(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}function no(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ro(e,t,n){return Wr(e,Hr(t,n))}function oo(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ao(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var io={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Ar(n.placement),u=no(l),s=[Dr,Sr].indexOf(l)>=0?"height":"width";if(a&&i){var c=function(e,t){return oo("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ao(e,xr))}(o.padding,n),f=qr(a),d="y"===u?kr:Dr,p="y"===u?Er:Sr,v=n.rects.reference[s]+n.rects.reference[u]-i[u]-n.rects.popper[s],h=i[u]-n.rects.reference[u],m=to(a),g=m?"y"===u?m.clientHeight||0:m.clientWidth||0:0,y=v/2-h/2,b=c[d],w=g-f[s]-c[p],k=g/2-f[s]/2+y,E=ro(b,k,w),S=u;n.modifiersData[r]=((t={})[S]=E,t.centerOffset=E-k,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)))&&Kr(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function lo(e){return e.split("-")[1]}var uo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function so(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,u=e.gpuAcceleration,s=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=i.x,p=void 0===d?0:d,v=i.y,h=void 0===v?0:v,m="function"==typeof c?c({x:p,y:h}):{x:p,y:h};p=m.x,h=m.y;var g=i.hasOwnProperty("x"),y=i.hasOwnProperty("y"),b=Dr,w=kr,k=window;if(s){var E=to(n),S="clientHeight",D="clientWidth";if(E===jr(n)&&"static"!==Gr(E=Jr(n)).position&&"absolute"===l&&(S="scrollHeight",D="scrollWidth"),o===kr||(o===Dr||o===Sr)&&a===Mr)w=Er,h-=(f&&E===k&&k.visualViewport?k.visualViewport.height:E[S])-r.height,h*=u?1:-1;if(o===Dr||(o===kr||o===Er)&&a===Mr)b=Sr,p-=(f&&E===k&&k.visualViewport?k.visualViewport.width:E[D])-r.width,p*=u?1:-1}var _,x=Object.assign({position:l},s&&uo),O=!0===c?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Vr(n*o)/o||0,y:Vr(r*o)/o||0}}({x:p,y:h},jr(n)):{x:p,y:h};return p=O.x,h=O.y,u?Object.assign({},x,((_={})[w]=y?"0":"",_[b]=g?"0":"",_.transform=(k.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",_)):Object.assign({},x,((t={})[w]=y?h+"px":"",t[b]=g?p+"px":"",t.transform="",t))}var co={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,l=n.roundOffsets,u=void 0===l||l,s={placement:Ar(t.placement),variation:lo(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,so(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,so(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},fo={passive:!0};var po={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,l=void 0===i||i,u=jr(t.elements.popper),s=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&s.forEach((function(e){e.addEventListener("scroll",n.update,fo)})),l&&u.addEventListener("resize",n.update,fo),function(){a&&s.forEach((function(e){e.removeEventListener("scroll",n.update,fo)})),l&&u.removeEventListener("resize",n.update,fo)}},data:{}},vo={left:"right",right:"left",bottom:"top",top:"bottom"};function ho(e){return e.replace(/left|right|bottom|top/g,(function(e){return vo[e]}))}var mo={start:"end",end:"start"};function go(e){return e.replace(/start|end/g,(function(e){return mo[e]}))}function yo(e){var t=jr(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bo(e){return Yr(Jr(e)).left+yo(e).scrollLeft}function wo(e){var t=Gr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function ko(e){return["html","body","#document"].indexOf(Qr(e))>=0?e.ownerDocument.body:Ir(e)&&wo(e)?e:ko(Zr(e))}function Eo(e,t){var n;void 0===t&&(t=[]);var r=ko(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=jr(r),i=o?[a].concat(a.visualViewport||[],wo(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Eo(Zr(i)))}function So(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Do(e,t,n){return t===Tr?So(function(e,t){var n=jr(e),r=Jr(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,u=0;if(o){a=o.width,i=o.height;var s=$r();(s||!s&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:a,height:i,x:l+bo(e),y:u}}(e,n)):Fr(t)?function(e,t){var n=Yr(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):So(function(e){var t,n=Jr(e),r=yo(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=Wr(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Wr(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+bo(e),u=-r.scrollTop;return"rtl"===Gr(o||n).direction&&(l+=Wr(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:u}}(Jr(e)))}function _o(e,t,n,r){var o="clippingParents"===t?function(e){var t=Eo(Zr(e)),n=["absolute","fixed"].indexOf(Gr(e).position)>=0&&Ir(e)?to(e):e;return Fr(n)?t.filter((function(e){return Fr(e)&&Kr(e,n)&&"body"!==Qr(e)})):[]}(e):[].concat(t),a=[].concat(o,[n]),i=a[0],l=a.reduce((function(t,n){var o=Do(e,n,r);return t.top=Wr(o.top,t.top),t.right=Hr(o.right,t.right),t.bottom=Hr(o.bottom,t.bottom),t.left=Wr(o.left,t.left),t}),Do(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function xo(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?Ar(o):null,i=o?lo(o):null,l=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(a){case kr:t={x:l,y:n.y-r.height};break;case Er:t={x:l,y:n.y+n.height};break;case Sr:t={x:n.x+n.width,y:u};break;case Dr:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=a?no(a):null;if(null!=s){var c="y"===s?"height":"width";switch(i){case Or:t[s]=t[s]-(n[c]/2-r[c]/2);break;case Mr:t[s]=t[s]+(n[c]/2-r[c]/2)}}return t}function Oo(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,i=void 0===a?e.strategy:a,l=n.boundary,u=void 0===l?Cr:l,s=n.rootBoundary,c=void 0===s?Tr:s,f=n.elementContext,d=void 0===f?Pr:f,p=n.altBoundary,v=void 0!==p&&p,h=n.padding,m=void 0===h?0:h,g=oo("number"!=typeof m?m:ao(m,xr)),y=d===Pr?Rr:Pr,b=e.rects.popper,w=e.elements[v?y:d],k=_o(Fr(w)?w:w.contextElement||Jr(e.elements.popper),u,c,i),E=Yr(e.elements.reference),S=xo({reference:E,element:b,strategy:"absolute",placement:o}),D=So(Object.assign({},b,S)),_=d===Pr?D:E,x={top:k.top-_.top+g.top,bottom:_.bottom-k.bottom+g.bottom,left:k.left-_.left+g.left,right:_.right-k.right+g.right},O=e.modifiersData.offset;if(d===Pr&&O){var M=O[o];Object.keys(x).forEach((function(e){var t=[Sr,Er].indexOf(e)>=0?1:-1,n=[kr,Er].indexOf(e)>=0?"y":"x";x[e]+=M[n]*t}))}return x}function Mo(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?zr:u,c=lo(r),f=c?l?Nr:Nr.filter((function(e){return lo(e)===c})):xr,d=f.filter((function(e){return s.indexOf(e)>=0}));0===d.length&&(d=f);var p=d.reduce((function(t,n){return t[n]=Oo(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[Ar(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}var Co={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,a=void 0===o||o,i=n.altAxis,l=void 0===i||i,u=n.fallbackPlacements,s=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,v=void 0===p||p,h=n.allowedAutoPlacements,m=t.options.placement,g=Ar(m),y=u||(g===m||!v?[ho(m)]:function(e){if(Ar(e)===_r)return[];var t=ho(e);return[go(e),t,go(t)]}(m)),b=[m].concat(y).reduce((function(e,n){return e.concat(Ar(n)===_r?Mo(t,{placement:n,boundary:c,rootBoundary:f,padding:s,flipVariations:v,allowedAutoPlacements:h}):n)}),[]),w=t.rects.reference,k=t.rects.popper,E=new Map,S=!0,D=b[0],_=0;_=0,T=C?"width":"height",P=Oo(t,{placement:x,boundary:c,rootBoundary:f,altBoundary:d,padding:s}),R=C?M?Sr:Dr:M?Er:kr;w[T]>k[T]&&(R=ho(R));var N=ho(R),z=[];if(a&&z.push(P[O]<=0),l&&z.push(P[R]<=0,P[N]<=0),z.every((function(e){return e}))){D=x,S=!1;break}E.set(x,z)}if(S)for(var L=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 D=t,"break"},A=v?3:1;A>0;A--){if("break"===L(A))break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function To(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 Po(e){return[kr,Sr,Er,Dr].some((function(t){return e[t]>=0}))}var Ro={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=zr.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ar(e),o=[Dr,kr].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[Dr,Sr].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,a),e}),{}),l=i[t.placement],u=l.x,s=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=i}};var No={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0!==i&&i,u=n.boundary,s=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,p=void 0===d||d,v=n.tetherOffset,h=void 0===v?0:v,m=Oo(t,{boundary:u,rootBoundary:s,padding:f,altBoundary:c}),g=Ar(t.placement),y=lo(t.placement),b=!y,w=no(g),k="x"===w?"y":"x",E=t.modifiersData.popperOffsets,S=t.rects.reference,D=t.rects.popper,_="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,x="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(E){if(a){var C,T="y"===w?kr:Dr,P="y"===w?Er:Sr,R="y"===w?"height":"width",N=E[w],z=N+m[T],L=N-m[P],A=p?-D[R]/2:0,j=y===Or?S[R]:D[R],F=y===Or?-D[R]:-S[R],I=t.elements.arrow,U=p&&I?qr(I):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=W[T],V=W[P],B=ro(0,S[R],U[R]),$=b?S[R]/2-A-B-H-x.mainAxis:j-B-H-x.mainAxis,Y=b?-S[R]/2+A+B+V+x.mainAxis:F+B+V+x.mainAxis,q=t.elements.arrow&&to(t.elements.arrow),K=q?"y"===w?q.clientTop||0:q.clientLeft||0:0,Q=null!=(C=null==O?void 0:O[w])?C:0,G=N+Y-Q,X=ro(p?Hr(z,N+$-Q-K):z,N,p?Wr(L,G):L);E[w]=X,M[w]=X-N}if(l){var J,Z="x"===w?kr:Dr,ee="x"===w?Er:Sr,te=E[k],ne="y"===k?"height":"width",re=te+m[Z],oe=te-m[ee],ae=-1!==[kr,Dr].indexOf(g),ie=null!=(J=null==O?void 0:O[k])?J:0,le=ae?re:te-S[ne]-D[ne]-ie+x.altAxis,ue=ae?te+S[ne]+D[ne]-ie-x.altAxis:oe,se=p&&ae?function(e,t,n){var r=ro(e,t,n);return r>n?n:r}(le,te,ue):ro(p?le:re,te,p?ue:oe);E[k]=se,M[k]=se-te}t.modifiersData[r]=M}},requiresIfExists:["offset"]};function zo(e,t,n){void 0===n&&(n=!1);var r,o,a=Ir(t),i=Ir(t)&&function(e){var t=e.getBoundingClientRect(),n=Vr(t.width)/e.offsetWidth||1,r=Vr(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=Jr(t),u=Yr(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!n)&&(("body"!==Qr(t)||wo(l))&&(s=(r=t)!==jr(r)&&Ir(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:yo(r)),Ir(t)?((c=Yr(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):l&&(c.x=bo(l))),{x:u.left+s.scrollLeft-c.x,y:u.top+s.scrollTop-c.y,width:u.width,height:u.height}}function Lo(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 Ao={placement:"bottom",modifiers:[],strategy:"absolute"};function jo(){for(var e=arguments.length,t=new Array(e),n=0;n=y},o=function(){},e.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0D(i,n))void 0!==u&&0>D(u,i)?(e[r]=u,e[l]=n,r=l):(e[r]=i,e[a]=n,r=a);else{if(!(void 0!==u&&0>D(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function D(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var _=[],x=[],O=1,M=null,C=3,T=!1,P=!1,R=!1;function N(e){for(var t=E(x);null!==t;){if(null===t.callback)S(x);else{if(!(t.startTime<=e))break;S(x),t.sortIndex=t.expirationTime,k(_,t)}t=E(x)}}function z(e){if(R=!1,N(e),!P)if(null!==E(_))P=!0,t(L);else{var r=E(x);null!==r&&n(z,r.startTime-e)}}function L(t,o){P=!1,R&&(R=!1,r()),T=!0;var a=C;try{for(N(o),M=E(_);null!==M&&(!(M.expirationTime>o)||t&&!e.unstable_shouldYield());){var i=M.callback;if("function"==typeof i){M.callback=null,C=M.priorityLevel;var l=i(M.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?M.callback=l:M===E(_)&&S(_),N(o)}else S(_);M=E(_)}if(null!==M)var u=!0;else{var s=E(x);null!==s&&n(z,s.startTime-o),u=!1}return u}finally{M=null,C=a,T=!1}}var A=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){P||T||(P=!0,t(L))},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_getFirstCallbackNode=function(){return E(_)},e.unstable_next=function(e){switch(C){case 1:case 2:case 3:var t=3;break;default:t=C}var n=C;C=t;try{return e()}finally{C=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=A,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=C;C=e;try{return t()}finally{C=n}},e.unstable_scheduleCallback=function(o,a,i){var l=e.unstable_now();switch("object"==typeof i&&null!==i?i="number"==typeof(i=i.delay)&&0l?(o.sortIndex=i,k(x,o),null===E(_)&&o===E(x)&&(R?r():R=!0,n(z,i-l))):(o.sortIndex=u,k(_,o),P||T||(P=!0,t(L))),o},e.unstable_wrapCallback=function(e){var t=C;return function(){var n=C;C=t;try{return e.apply(this,arguments)}finally{C=n}}}}(Qo),function(e){e.exports=Qo}(Ko); /** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Go=O,Xo=N,Jo=qo;function Zo(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n