P||-1===I&&e2&&void 0!==arguments[2]&&arguments[2]&&o,l=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),-1===l.indexOf(e)&&(l.push(e),i&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(s){if(o)i=!0;else{o=!0;var u=[n,t];if(t=u[0],(n=u[1]).length=0,r=t.length)for(var c=0;c1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zg||Yg(),n.schedule(e,t,r)},e}),{}),qg=Ug.reduce((function(e,t){return e[t]=Wg[t].cancel,e}),{}),Gg=Ug.reduce((function(e,t){return e[t]=function(){return Wg[t].process(Bg)},e}),{}),Qg=function(e){return Wg[e].process(Bg)},$g=function e(t){zg=!1,Bg.delta=Fg?Dg:Math.max(Math.min(t-Bg.timestamp,40),1),Bg.timestamp=t,Vg=!0,Ug.forEach(Qg),Vg=!1,zg&&(Fg=!1,Ng(e))},Yg=function(){zg=!0,Fg=!0,Vg||Ng($g)},Kg=function(){return Bg},Xg=Hg;function Jg(e,t){-1===e.indexOf(t)&&e.push(t)}function Zg(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var em=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Jg(this.subscriptions,e),function(){return Zg(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;oh&&m,_=Array.isArray(g)?g:[g],S=_.reduce(i,{});!1===y&&(S={});var k=v.prevResolvedValues,C=void 0===k?{}:k,E=Ad(Ad({},C),S),T=function(e){x=!0,f.delete(e),v.needsAnimating[e]=!0};for(var R in E){var O=S[R],P=C[R];p.hasOwnProperty(R)||(O!==P?xp(O)&&xp(P)?!vh(O,P)||w?T(R):v.protectedKeys[R]=!0:void 0!==O?T(R):f.add(R):void 0!==O&&f.has(R)?T(R):v.protectedKeys[R]=!0)}v.prevProp=g,v.prevResolvedValues=S,v.isActive&&(p=Ad(Ad({},p),S)),o&&e.blockInitialAnimation&&(x=!1),x&&!b&&d.push.apply(d,Fd([],Nd(_.map((function(e){return{animation:e,options:Ad({type:r},a)}}))),!1))},g=0;g=3;if(t||n){var o=e.point,i=Kg().timestamp;r.history.push(Ad(Ad({},o),{timestamp:i}));var a=r.handlers,l=a.onStart,s=a.onMove;t||(l&&l(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),s&&s(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Rm(t,r.transformPagePoint),jp(e)&&0===e.buttons?r.handlePointerUp(e,t):Xg.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=Pm(Rm(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(Mp(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=Rm(Fp(e),this.transformPagePoint),a=i.point,l=Kg().timestamp;this.history=[Ad(Ad({},a),{timestamp:l})];var s=t.onSessionStart;s&&s(e,Pm(i,this.history)),this.removeListeners=rh(Gp(window,"pointermove",this.handlePointerMove),Gp(window,"pointerup",this.handlePointerUp),Gp(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),qg.update(this.updatePoint)},e}();function Rm(e,t){return t?{point:t(e.point)}:e}function Om(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pm(e,t){var n=e.point;return{point:n,delta:Om(n,Am(t)),offset:Om(n,Im(t)),velocity:jm(t,.1)}}function Im(e){return e[0]}function Am(e){return e[e.length-1]}function jm(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Am(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Yv(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Mm(e){return e.max-e.min}function Dm(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),Em(e,t)t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==n.currentDirection&&(null===a||void 0===a||a(n.currentDirection)));n.updateAxis("x",t.point,s),n.updateAxis("y",t.point,s),n.visualElement.syncRender(),null===l||void 0===l||l(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null===o||void 0===o||o(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Rp.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&fy(e,r,this.currentDirection)){var o=this.getAxisMotionValue(e),i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){var r=t.min,o=t.max;return void 0!==r&&eo&&(e=n?Ih(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&tf(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Bm(e.x,r,i),y:Bm(e.y,n,o)}}(o.actual,n),this.elastic=function(e){return void 0===e&&(e=Wm),!1===e?e=0:!0===e&&(e=Wm),{x:Hm(e,"left","right"),y:Hm(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&$m((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!tf(t))return!1;var r=t.current;Wd(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=uy(e,n),o=t.scroll;return o&&(oy(r.x,o.x),oy(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:Um(e.x,t.x),y:Um(e.y,t.y)}}(o.layout.actual,i);if(n){var l=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!l,l&&(a=Ym(l))}return a},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,l=n.dragSnapToOrigin,s=n.onDragTransitionEnd,u=this.constraints||{},c=$m((function(n){var s;if(fy(n,r,t.currentDirection)){var c=null!==(s=null===u||void 0===u?void 0:u[n])&&void 0!==s?s:{};l&&(c={min:0,max:0});var d=i?200:1e6,f=i?40:1e7,p=Ad(Ad({type:"inertia",velocity:o?e[n]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.startAxisValueAnimation(n,p)}}));return Promise.all(c).then(s)},e.prototype.startAxisValueAnimation=function(e,t){return Ag(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;$m((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;$m((function(n){if(fy(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,l=i.max;o.set(e[n]-Ih(a,l,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(tf(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};$m((function(e){var n=t.getAxisMotionValue(e);if(n){var r=n.get();a[e]=function(e,t){var n=.5,r=Mm(e),o=Mm(t);return o>r?n=Ph(t.min,t.max-r,e.min):r>o&&(n=Ph(e.min,e.max-o,t.min)),gh(0,1,n)}({min:r,max:r},t.constraints[e])}}));var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),$m((function(e){if(fy(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,l=o.max;n.set(Ih(i,l,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;cy.set(this.visualElement,this);var n=Gp(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){tf(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=Ip(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&($m((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),i()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,l=e.dragConstraints,s=void 0!==l&&l,u=e.dragElastic,c=void 0===u?Wm:u,d=e.dragMomentum,f=void 0===d||d;return Ad(Ad({},e),{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:s,dragElastic:c,dragMomentum:f})},e}();function fy(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var py={pan:ph((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,a=e.visualElement,l=t||n||r||o,s=(0,i.useRef)(null),u=(0,i.useContext)(Qd).transformPagePoint,c={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){s.current=null,r&&r(e,t)}};(0,i.useEffect)((function(){null!==s.current&&s.current.updateHandlers(c)})),Qp(a,"pointerdown",l&&function(e){s.current=new Tm(e,c,{transformPagePoint:u})}),th((function(){return s.current&&s.current.end()}))})),drag:ph((function(e){var t=e.dragControls,n=e.visualElement,r=kd((function(){return new dy(n)}));(0,i.useEffect)((function(){return t&&t.subscribe(r)}),[r,t]),(0,i.useEffect)((function(){return r.addListeners()}),[r])}))},hy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var vy=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,l=e.render,s=e.readValueFromInstance,u=e.removeValueFromRenderState,c=e.sortNodePosition,d=e.scrapeMotionValuesFromProps;return function(e,t){var f=e.parent,p=e.props,h=e.presenceId,v=e.blockInitialAnimation,g=e.visualState,m=e.shouldReduceMotion;void 0===t&&(t={});var y,b,w=!1,x=g.latestValues,_=g.renderState,S=function(){var e=hy.map((function(){return new em})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){hy.forEach((function(r){var o,i="on"+r,a=e[i];null===(o=t[r])||void 0===o||o.call(t),a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+hy[t]]=function(t){return e.add(t)},n["notify"+hy[t]]=function(){for(var t=[],n=0;n=0?window.pageYOffset:null,u=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,l={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){l[e]=Ay[e](r,i)})),t.syncRender();var s=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Ey(r,l[n]),e[n]=Ay[n](s,i)})),e}(t,e,l);return i.length&&i.forEach((function(t){var n=Nd(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),null!==s&&window.scrollTo({top:s}),{target:u,transitionEnd:r}}return{target:t,transitionEnd:r}};var My=function(e,t,n,r){var o=function(e,t,n){var r,o=jd(t,[]),i=e.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};for(var a in n&&(n=Ad({},n)),e.forEachValue((function(e){var t=e.get();if(yy(t)){var n=xy(t,i);n&&e.set(n)}})),o){var l=o[a];if(yy(l)){var s=xy(l,i);s&&(o[a]=s,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=l)))}}return{target:o,transitionEnd:n}}(e,t,r);return function(e,t,n,r){return Cy(t)?jy(e,t,n,r):{target:t,transitionEnd:r}}(e,t=o.target,n,r=o.transitionEnd)};var Dy={treeType:"dom",readValueFromInstance:function(e,t){if(Cf(t)){var n=Sg(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(If(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return uy(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,l=jd(t,["transition","transitionEnd"]),s=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=dm(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(l,i||{},e);if(o&&(a&&(a=o(a)),l&&(l=o(l)),s&&(s=o(s))),r){!function(e,t,n){var r,o,i,a,l=Object.keys(t).filter((function(t){return!e.hasValue(t)})),s=l.length;if(s)for(var u=0;u5)return o;var s=Zh.createTransformer(e),u="number"!==typeof l[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;l[0+u]/=c,l[1+u]/=d;var f=Ih(c,d,.5);"number"===typeof l[2+u]&&(l[2+u]/=f),"number"===typeof l[3+u]&&(l[3+u]/=f);var p=s(l);if(i){var h=0;p=p.replace(By,(function(){var e=a[h];return h++,e}))}return p}},Wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Id(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,l=r.projection;e=Hy,Object.assign(wf,e),l&&((null===o||void 0===o?void 0:o.group)&&o.group.add(l),(null===i||void 0===i?void 0:i.register)&&a&&i.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",(function(){t.safeToRemove()})),l.setOptions(Ad(Ad({},l.options),{onExitComplete:function(){return t.safeToRemove()}}))),df.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,l=o.projection;return l?(l.isPresent=a,i||e.layoutDependency!==r||void 0===r?l.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?l.promote():l.relegate()||Xg.postRender((function(){var e;(null===(e=l.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null===n||void 0===n?void 0:n.group)&&n.group.remove(o),(null===r||void 0===r?void 0:r.deregister)&&r.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null===e||void 0===e||e()},t.prototype.render=function(){return null},t}(i.Component);var Hy={borderRadius:Ad(Ad({},Vy),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Vy,borderTopRightRadius:Vy,borderBottomLeftRadius:Vy,borderBottomRightRadius:Vy,boxShadow:Uy},qy={measureLayout:function(e){var t=Nd(Rd(),2),n=t[0],r=t[1],o=(0,i.useContext)(pf);return i.createElement(Wy,Ad({},e,{layoutGroup:o,switchLayoutGroup:(0,i.useContext)(hf),isPresent:n,safeToRemove:r}))}};var Gy=["TopLeft","TopRight","BottomLeft","BottomRight"],Qy=Gy.length,$y=function(e){return"string"===typeof e?parseFloat(e):e},Yy=function(e){return"number"===typeof e||Uf.test(e)};function Ky(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var Xy=Zy(0,.5,yv),Jy=Zy(.5,.95,pv);function Zy(e,t,n){return function(r){return rt?1:n(Ph(e,t,r))}}function eb(e,t){e.min=t.min,e.max=t.max}function tb(e,t){eb(e.x,t.x),eb(e.y,t.y)}function nb(e,t,n,r,o){return e=ey(e-=t,1/n,r),void 0!==o&&(e=ey(e,1/o,r)),e}function rb(e,t,n,r,o){var i=Nd(n,3),a=i[0],l=i[1],s=i[2];!function(e,t,n,r,o,i,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=e),void 0===a&&(a=e),Bf.test(t)&&(t=parseFloat(t),t=Ih(a.min,a.max,t/100)-a.min),"number"===typeof t){var l=Ih(i.min,i.max,r);e===i&&(l-=t),e.min=nb(e.min,t,n,l,o),e.max=nb(e.max,t,n,l,o)}}(e,t[a],t[l],t[s],t.scale,r,o)}var ob=["x","scaleX","originX"],ib=["y","scaleY","originY"];function ab(e,t,n,r){rb(e.x,t,ob,null===n||void 0===n?void 0:n.x,null===r||void 0===r?void 0:r.x),rb(e.y,t,ib,null===n||void 0===n?void 0:n.y,null===r||void 0===r?void 0:r.y)}function lb(e){return 0===e.translate&&1===e.scale}function sb(e){return lb(e.x)&&lb(e.y)}function ub(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var cb=function(){function e(){this.members=[]}return e.prototype.add=function(e){Jg(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(Zg(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),db="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function fb(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,l=n.rotateX,s=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),l&&(i+="rotateX(".concat(l,"deg) ")),s&&(i+="rotateY(".concat(s,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return(i+="scale(".concat(u,", ").concat(c,")"))===db?"none":i}var pb=function(e,t){return e.depth-t.depth},hb=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Jg(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){Zg(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(pb),this.isDirty=!1,this.children.forEach(e)},e}(),vb=1e3;function gb(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=null===n||void 0===n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(Sb),o.nodes.forEach(kb)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?Fd(Fd([],Nd(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var i=0;i=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function Ab(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function jb(e){Ab(e.x),Ab(e.y)}var Mb=gb({attachResizeListener:function(e,t){return Ip(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Db={current:void 0},Lb=gb({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Db.current){var e=new Mb(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Db.current=e}return Db.current},resetTransform:function(e,t){e.style.transform=null!==t&&void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),Nb=Ad(Ad(Ad(Ad({},_m),hh),py),qy),Fb=mf((function(e,t){return function(e,t,n,r,o){var i=t.forwardMotionProps,a=void 0!==i&&i,l=bf(e)?Op:Pp;return Ad(Ad({},l),{preloadedFeatures:n,useRender:fp(a),createVisualElement:r,projectionNodeConstructor:o,Component:e})}(e,t,Nb,Fy,Lb)}));var zb=new Set([].concat(yt(dr),["textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"])),Vb=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Bb(e){return Vb.has(e)||!zb.has(e)}function Ub(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}var Wb=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Hb=ke((function(e){return Wb.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),qb=Hb,Gb=function(e){return"theme"!==e},Qb=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?qb:Gb},$b=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},Yb=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;we(t,n,r);Le((function(){return xe(t,n,r)}));return null},Kb=function e(t,n){var r,o,a=t.__emotion_real===t,l=a&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=$b(t,n,a),u=s||Qb(l),c=!u("as");return function(){var d=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&f.push("label:"+r+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{0,f.push(d[0][0]);for(var p=d.length,h=1;h1?n-1:0),o=1;o` or ``");return e}lw.displayName="ToastComponent";var cw=n(77),dw=["styleConfig"];function fw(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.styleConfig,o=p(n,dw),a=function(){var e=ht(),t=uw();return f(f({},e),{},{theme:t})}(),l=a.theme,s=a.colorMode,u=e?xr(l,"components.".concat(e)):void 0,c=r||u,d=Pt({theme:l,colorMode:s},null!=(t=null==c?void 0:c.defaultProps)?t:{},Sr(function(e,t){var n={};return Object.keys(e).forEach((function(r){t.includes(r)||(n[r]=e[r])})),n}(o,["children"]))),h=(0,i.useRef)({});if(c){var v=function(e){return function(t){var n,r=t.variant,o=t.size,i=br(t.theme);return Pt({},Ct(null!=(n=e.baseStyle)?n:{},t),i(e,"sizes",o,t),i(e,"variants",r,t))}}(c),g=v(d);cw(h.current,g)||(h.current=g)}return h.current}function pw(e){return fw(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function hw(e){return fw(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}var vw=["as","viewBox","color","focusable","children","className","__css"],gw={path:(0,e.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,e.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,e.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,e.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},mw=sw((function(t,n){var r=t.as,o=t.viewBox,i=t.color,a=void 0===i?"currentColor":i,l=t.focusable,s=void 0!==l&&l,u=t.children,c=t.className,d=t.__css,h=p(t,vw),v=St("chakra-icon",c),g=pw("Icon",t),m={ref:n,focusable:s,className:v,__css:f(f({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},d),g)},y=null!=o?o:gw.viewBox;if(r&&"string"!==typeof r)return(0,e.jsx)(iw.svg,f(f({as:r},m),h));var b=null!=u?u:gw.path;return(0,e.jsx)(iw.svg,f(f(f({verticalAlign:"middle",viewBox:y},m),h),{},{children:b}))}));mw.displayName="Icon";function yw(t){return(0,e.jsx)(mw,f(f({viewBox:"0 0 24 24"},t),{},{children:(0,e.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})}))}var bw=["label","thickness","speed","emptyColor","className"],ww=Ze({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),xw=sw((function(t,n){var r=pw("Spinner",t),o=wr(t),i=o.label,a=void 0===i?"Loading...":i,l=o.thickness,s=void 0===l?"2px":l,u=o.speed,c=void 0===u?"0.45s":u,d=o.emptyColor,h=void 0===d?"transparent":d,v=o.className,g=p(o,bw),m=St("chakra-spinner",v),y=f({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:s,borderBottomColor:h,borderLeftColor:h,animation:"".concat(ww," ").concat(c," linear infinite")},r);return(0,e.jsx)(iw.div,f(f({ref:n,__css:y,className:m},g),{},{children:a&&(0,e.jsx)(iw.span,{srOnly:!0,children:a})}))}));xw.displayName="Spinner";var _w=lt(st({name:"AlertContext",hookName:"useAlertContext",providerName:""}),2),Sw=_w[0],kw=_w[1],Cw=lt(st({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),2),Ew=Cw[0],Tw=Cw[1],Rw={info:{icon:function(t){return(0,e.jsx)(mw,f(f({viewBox:"0 0 24 24"},t),{},{children:(0,e.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})}))},colorScheme:"blue"},warning:{icon:yw,colorScheme:"orange"},success:{icon:function(t){return(0,e.jsx)(mw,f(f({viewBox:"0 0 24 24"},t),{},{children:(0,e.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})}))},colorScheme:"green"},error:{icon:yw,colorScheme:"red"},loading:{icon:xw,colorScheme:"blue"}};var Ow=["status","addRole"],Pw=sw((function(t,n){var r,o=wr(t),i=o.status,a=void 0===i?"info":i,l=o.addRole,s=void 0===l||l,u=p(o,Ow),c=null!=(r=t.colorScheme)?r:function(e){return Rw[e].colorScheme}(a),d=hw("Alert",f(f({},t),{},{colorScheme:c})),h=f({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden"},d.container);return(0,e.jsx)(Sw,{value:{status:a},children:(0,e.jsx)(Ew,{value:d,children:(0,e.jsx)(iw.div,f(f({role:s?"alert":void 0,ref:n},u),{},{className:St("chakra-alert",t.className),__css:h}))})})}));function Iw(t){var n=kw().status,r=function(e){return Rw[e].icon}(n),o=Tw(),i="loading"===n?o.spinner:o.icon;return(0,e.jsx)(iw.span,f(f({display:"inherit"},t),{},{className:St("chakra-alert__icon",t.className),__css:i,children:t.children||(0,e.jsx)(r,{h:"100%",w:"100%"})}))}Pw.displayName="Alert",Iw.displayName="AlertIcon";var Aw=sw((function(t,n){var r=Tw();return(0,e.jsx)(iw.div,f(f({ref:n},t),{},{className:St("chakra-alert__title",t.className),__css:r.title}))}));Aw.displayName="AlertTitle";var jw=sw((function(t,n){var r=f({display:"inline"},Tw().description);return(0,e.jsx)(iw.div,f(f({ref:n},t),{},{className:St("chakra-alert__desc",t.className),__css:r}))}));jw.displayName="AlertDescription";var Mw=["children","isDisabled","__css"];function Dw(t){return(0,e.jsx)(mw,f(f({focusable:"false","aria-hidden":!0},t),{},{children:(0,e.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}))}var Lw=sw((function(t,n){var r=pw("CloseButton",t),o=wr(t),i=o.children,a=o.isDisabled,l=o.__css,s=p(o,Mw);return(0,e.jsx)(iw.button,f(f({type:"button","aria-label":"Close",ref:n,disabled:a,__css:f(f(f({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),r),l)},s),{},{children:i||(0,e.jsx)(Dw,{width:"1em",height:"1em"})}))}));Lw.displayName="CloseButton";var Nw=function(e){var t=e,n=new Set,r=function(e){t=e(t),n.forEach((function(e){return e()}))};return{getState:function(){return t},subscribe:function(t){return n.add(t),function(){r((function(){return e})),n.delete(t)}},removeToast:function(e,t){r((function(n){return f(f({},n),{},c({},t,n[t].filter((function(t){return t.id!=e}))))}))},notify:function(e,t){var n=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Fw+=1;var o=null!=(t=r.id)?t:Fw,i=null!=(n=r.position)?n:"bottom";return{id:o,message:e,position:i,duration:r.duration,onCloseComplete:r.onCloseComplete,onRequestRemove:function(){return Nw.removeToast(String(o),i)},status:r.status,requestClose:!1,containerStyle:r.containerStyle}}(e,t),o=n.position,i=n.id;return r((function(e){var t,r,i=o.includes("top")?[n].concat(yt(null!=(t=e[o])?t:[])):[].concat(yt(null!=(r=e[o])?r:[]),[n]);return f(f({},e),{},c({},o,i))})),i},update:function(e,t){e&&r((function(n){var r=f({},n),o=yd(r,e),i=o.position,a=o.index;return i&&-1!==a&&(r[i][a]=f(f(f({},r[i][a]),t),{},{message:Vw(t)})),r}))},closeAll:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).positions;r((function(t){return(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((function(e,n){return e[n]=t[n].map((function(e){return f(f({},e),{},{requestClose:!0})})),e}),f({},t))}))},close:function(e){r((function(t){var n=bd(t,e);return n?f(f({},t),{},c({},n,t[n].map((function(t){return t.id==e?f(f({},t),{},{requestClose:!0}):t})))):t}))},isActive:function(e){return Boolean(yd(Nw.getState(),e).position)}}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});var Fw=0;var zw=function(t){var n=t.status,r=t.variant,o=void 0===r?"solid":r,i=t.id,a=t.title,l=t.isClosable,s=t.onClose,u=t.description,c=t.icon,d=i?{root:"toast-".concat(i),title:"toast-".concat(i,"-title"),description:"toast-".concat(i,"-description")}:void 0;return(0,e.jsxs)(Pw,{addRole:!1,status:n,variant:o,id:null==d?void 0:d.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[(0,e.jsx)(Iw,{children:c}),(0,e.jsxs)(iw.div,{flex:"1",maxWidth:"100%",children:[a&&(0,e.jsx)(Aw,{id:null==d?void 0:d.title,children:a}),u&&(0,e.jsx)(jw,{id:null==d?void 0:d.description,display:"block",children:u})]}),l&&(0,e.jsx)(Lw,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function Vw(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.render,r=t.toastComponent,o=void 0===r?zw:r;return function(r){return"function"===typeof n?n(f(f({},r),t)):(0,e.jsx)(o,f(f({},r),t))}}function Bw(){var e=(0,i.useRef)(!1);return Kd((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var Uw=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,a=e.custom,l=e.presenceAffectsLayout,s=kd(Ww),u=Td(),c=(0,i.useMemo)((function(){return{id:u,initial:n,isPresent:r,custom:a,onExitComplete:function(e){var t,n;s.set(e,!0);try{for(var r=Ld(s.values()),i=r.next();!i.done;i=r.next()){if(!i.value)return}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}null===o||void 0===o||o()},register:function(e){return s.set(e,!1),function(){return s.delete(e)}}}}),l?void 0:[r]);return(0,i.useMemo)((function(){s.forEach((function(e,t){return s.set(t,!1)}))}),[r]),i.useEffect((function(){!r&&!s.size&&(null===o||void 0===o||o())}),[r]),i.createElement(Sd.Provider,{value:c},t)};function Ww(){return new Map}var Hw=function(e){return e.key||""};var qw=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,a=e.onExitComplete,l=e.exitBeforeEnter,s=e.presenceAffectsLayout,u=void 0===s||s,c=Nd(function(){var e=Bw(),t=Nd((0,i.useState)(0),2),n=t[0],r=t[1],o=(0,i.useCallback)((function(){e.current&&r(n+1)}),[n]);return[(0,i.useCallback)((function(){return Xg.postRender(o)}),[o]),n]}(),1),d=c[0],f=(0,i.useContext)(pf).forceRender;f&&(d=f);var p=Bw(),h=function(e){var t=[];return i.Children.forEach(e,(function(e){(0,i.isValidElement)(e)&&t.push(e)})),t}(t),v=h,g=new Set,m=(0,i.useRef)(v),y=(0,i.useRef)(new Map).current,b=(0,i.useRef)(!0);if(Kd((function(){b.current=!1,function(e,t){e.forEach((function(e){var n=Hw(e);t.set(n,e)}))}(h,y),m.current=v})),th((function(){b.current=!0,y.clear(),g.clear()})),b.current)return i.createElement(i.Fragment,null,v.map((function(e){return i.createElement(Uw,{key:Hw(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:u},e)})));v=Fd([],Nd(v),!1);for(var w=m.current.map(Hw),x=h.map(Hw),_=w.length,S=0;S<_;S++){var k=w[S];-1===x.indexOf(k)&&g.add(k)}return l&&g.size&&(v=[]),g.forEach((function(e){if(-1===x.indexOf(e)){var t=y.get(e);if(t){var r=w.indexOf(e);v.splice(r,0,i.createElement(Uw,{key:Hw(t),isPresent:!1,onExitComplete:function(){y.delete(e),g.delete(e);var t=m.current.findIndex((function(t){return t.key===e}));if(m.current.splice(t,1),!g.size){if(m.current=h,!1===p.current)return;d(),a&&a()}},custom:n,presenceAffectsLayout:u},t))}}})),v=v.map((function(e){var t=e.key;return g.has(t)?e:i.createElement(Uw,{key:Hw(e),isPresent:!0,presenceAffectsLayout:u},e)})),"production"!==zd&&l&&v.length>1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),i.createElement(i.Fragment,null,g.size?v:v.map((function(e){return(0,i.cloneElement)(e)})))},Gw=n(4164),Qw=["containerRef"],$w=lt(st({strict:!1,name:"PortalContext"}),2),Yw=$w[0],Kw=$w[1],Xw="chakra-portal",Jw=function(t){return(0,e.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:t.zIndex,top:0,left:0,right:0},children:t.children})},Zw=function(t){var n=t.appendToParentPortal,r=t.children,o=lt((0,i.useState)(null),2),a=o[0],l=o[1],s=(0,i.useRef)(null),u=lt((0,i.useState)({}),2)[1];(0,i.useEffect)((function(){return u({})}),[]);var c=Kw(),d=dt();Dr((function(){if(a){var e=a.ownerDocument,t=n&&null!=c?c:e.body;if(t){s.current=e.createElement("div"),s.current.className=Xw,t.appendChild(s.current),u({});var r=s.current;return function(){t.contains(r)&&t.removeChild(r)}}}}),[a]);var f=(null==d?void 0:d.zIndex)?(0,e.jsx)(Jw,{zIndex:null==d?void 0:d.zIndex,children:r}):r;return s.current?(0,Gw.createPortal)((0,e.jsx)(Yw,{value:s.current,children:f}),s.current):(0,e.jsx)("span",{ref:function(e){e&&l(e)}})},ex=function(t){var n=t.children,r=t.containerRef,o=t.appendToParentPortal,a=r.current,l=null!=a?a:"undefined"!==typeof window?document.body:void 0,s=(0,i.useMemo)((function(){var e=null==a?void 0:a.ownerDocument.createElement("div");return e&&(e.className=Xw),e}),[a]),u=lt((0,i.useState)({}),2)[1];return Dr((function(){return u({})}),[]),Dr((function(){if(s&&l)return l.appendChild(s),function(){l.removeChild(s)}}),[s,l]),l&&s?(0,Gw.createPortal)((0,e.jsx)(Yw,{value:o?s:null,children:n}),s):null};function tx(t){var n=f({appendToParentPortal:!0},t),r=n.containerRef,o=p(n,Qw);return r?(0,e.jsx)(ex,f({containerRef:r},o)):(0,e.jsx)(Zw,f({},o))}tx.className=Xw,tx.selector=".chakra-portal",tx.displayName="Portal";var nx=lt(st({name:"ToastOptionsContext",strict:!1}),2),rx=nx[0],ox=(nx[1],function(t){var n=(0,i.useSyncExternalStore)(Nw.subscribe,Nw.getState,Nw.getState),r=t.motionVariants,o=t.component,a=void 0===o?lw:o,l=t.portalProps,s=Object.keys(n).map((function(t){var o=n[t];return(0,e.jsx)("ul",{role:"region","aria-live":"polite",id:"chakra-toast-manager-".concat(t),style:wd(t),children:(0,e.jsx)(qw,{initial:!1,children:o.map((function(t){return(0,e.jsx)(a,f({motionVariants:r},t),t.id)}))})},t)}));return(0,e.jsx)(tx,f(f({},l),{},{children:s}))}),ix=["children","theme","toastOptions"],ax=function(t){return function(n){var r=n.children,o=n.theme,i=void 0===o?t:o,a=n.toastOptions,l=p(n,ix);return(0,e.jsxs)(Br,f(f({theme:i},l),{},{children:[(0,e.jsx)(rx,{value:null==a?void 0:a.defaultOptions,children:r}),(0,e.jsx)(ox,f({},a))]}))}},lx=ax(vd),sx=(ax(gd),"Invariant Violation"),ux=Object.setPrototypeOf,cx=void 0===ux?function(e,t){return e.__proto__=t,e}:ux,dx=function(e){function t(n){void 0===n&&(n=sx);var r=e.call(this,"number"===typeof n?sx+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=sx,cx(r,t.prototype),r}return Id(t,e),t}(Error);function fx(e,t){if(!e)throw new dx(t)}var px=["debug","log","warn","error","silent"],hx=px.indexOf("log");function vx(e){return function(){if(px.indexOf(e)>=hx)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=vx("debug"),e.log=vx("log"),e.warn=vx("warn"),e.error=vx("error")}(fx||(fx={}));function gx(e){try{return e()}catch(Ta){}}var mx=gx((function(){return globalThis}))||gx((function(){return window}))||gx((function(){return self}))||gx((function(){return global}))||gx((function(){return gx.constructor("return this")()})),yx="__",bx=[yx,yx].join("DEV");var wx=function(){try{return Boolean(__DEV__)}catch(Ta){return Object.defineProperty(mx,bx,{value:"production"!==gx((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),mx[bx]}}();function xx(e){try{return e()}catch(LC){}}var _x=xx((function(){return globalThis}))||xx((function(){return window}))||xx((function(){return self}))||xx((function(){return global}))||xx((function(){return xx.constructor("return this")()})),Sx=!1;function kx(){Sx&&(delete _x.process,Sx=!1)}function Cx(e,t){if(!Boolean(e))throw new Error(t)}!_x||xx((function(){return"production"}))||xx((function(){return process}))||(Object.defineProperty(_x,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),Sx=!0);var Ex=10,Tx=2;function Rx(e){return Ox(e,[])}function Ox(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";var n=[].concat(yt(t),[e]);if(function(e){return"function"===typeof e.toJSON}(e)){var r=e.toJSON();if(r!==e)return"string"===typeof r?r:Ox(r,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>Tx)return"[Array]";for(var n=Math.min(Ex,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items"));return"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.entries(e);if(0===n.length)return"{}";if(t.length>Tx)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";var r=n.map((function(e){var n=lt(e,2);return n[0]+": "+Ox(n[1],t)}));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var Px=function(e,t){return e instanceof t},Ix=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};fi(this,t),"string"===typeof e||Cx(!1,"Body must be a string. Received: ".concat(Rx(e),".")),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Cx(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Cx(!1,"column in locationOffset is 1-indexed and must be positive.")}return di(t,[{key:Symbol.toStringTag,get:function(){return"Source"}}]),t}();kx(),__DEV__?fx("boolean"===typeof wx,wx):fx("boolean"===typeof wx,39);var Ax="function"===typeof WeakMap&&"ReactNative"!==gx((function(){return navigator.product})),jx="function"===typeof WeakSet,Mx="function"===typeof Symbol&&"function"===typeof Symbol.for,Dx=Mx&&Symbol.asyncIterator,Lx="function"===typeof gx((function(){return window.document.createElement})),Nx=gx((function(){return navigator.userAgent.indexOf("jsdom")>=0}))||!1,Fx=Lx&&!Nx,zx=!1,Vx=a.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!zx&&r!==t()&&(zx=!0,__DEV__&&fx.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=i.useState({inst:{value:r,getSnapshot:t}}),a=o[0].inst,l=o[1];return Fx?i.useLayoutEffect((function(){Object.assign(a,{value:r,getSnapshot:t}),Bx(a)&&l({inst:a})}),[e,r,t]):Object.assign(a,{value:r,getSnapshot:t}),i.useEffect((function(){return Bx(a)&&l({inst:a}),e((function(){Bx(a)&&l({inst:a})}))}),[e]),r};function Bx(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(Oa){return!0}}var Ux=Object.prototype,Wx=Ux.toString,Hx=Ux.hasOwnProperty,qx=Function.prototype.toString,Gx=new Map;function Qx(e,t){try{return $x(e,t)}finally{Gx.clear()}}function $x(e,t){if(e===t)return!0;var n=Wx.call(e);if(n!==Wx.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Jx(e,t))return!0;var r=Yx(e),o=Yx(t),i=r.length;if(i!==o.length)return!1;for(var a=0;a=0&&e.indexOf(t,n)===n}(v,Xx)}return!1}function Yx(e){return Object.keys(e).filter(Kx,e)}function Kx(e){return void 0!==this[e]}var Xx="{ [native code] }";function Jx(e,t){var n=Gx.get(e);if(n){if(n.has(t))return!0}else Gx.set(e,n=new Set);return n.add(t),!1}function Zx(){for(var e=[],t=0;t0}var i_,a_,l_=function(e){var t="";(o_(e.graphQLErrors)||o_(e.clientErrors))&&(e.graphQLErrors||[]).concat(e.clientErrors||[]).forEach((function(e){var n=e?e.message:"Error message not found.";t+="".concat(n,"\n")}));return e.networkError&&(t+="".concat(e.networkError.message,"\n")),t=t.replace(/\n$/,"")},s_=function(e){function t(n){var r=n.graphQLErrors,o=n.clientErrors,i=n.networkError,a=n.errorMessage,l=n.extraInfo,s=e.call(this,a)||this;return s.name="ApolloError",s.graphQLErrors=r||[],s.clientErrors=o||[],s.networkError=i||null,s.message=a||l_(s),s.extraInfo=l,s.__proto__=t.prototype,s}return Id(t,e),t}(Error);function u_(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(i_||(i_={})),function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(a_||(a_={}));var c_=new Map;function d_(e){var t;switch(e){case a_.Query:t="Query";break;case a_.Mutation:t="Mutation";break;case a_.Subscription:t="Subscription"}return t}function f_(e,t){var n=function(e){var t,n,r=c_.get(e);if(r)return r;__DEV__?fx(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):fx(!!e&&!!e.kind,33);for(var o=[],i=[],a=[],l=[],s=0,u=e.definitions;s, or pass an ApolloClient instance in via options.'):fx(!!n,32),n}function h_(e){return null!==e&&"object"===typeof e}function v_(e){var t=new Set([e]);return t.forEach((function(e){h_(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){h_(e[n])&&t.add(e[n])}))})),e}function g_(e){return __DEV__&&v_(e),e}var m_=Object.prototype.hasOwnProperty;function y_(e,t){return void 0===t&&(t=Object.create(null)),function(e,t){var n=(0,i.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new w_(e,t,n.current));var r=n.current,o=(0,i.useState)(0),a=(o[0],o[1]);return r.forceUpdate=function(){a((function(e){return e+1}))},r}(p_(t.client),e).useQuery(t)}var b_,w_=function(){function e(e,t,n){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(jx?WeakSet:Set),this.ssrDisabledResult=g_({loading:!0,data:void 0,error:void 0,networkStatus:i_.loading}),this.skipStandbyResult=g_({loading:!1,data:void 0,error:void 0,networkStatus:i_.ready}),this.toQueryResultCache=new(Ax?WeakMap:Map),f_(t,a_.Query);var r=n&&n.result,o=r&&r.data;o&&(this.previousData=o)}return e.prototype.forceUpdate=function(){__DEV__&&fx.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(e){var t=this;return new Promise((function(n,r){var o=t.watchQueryOptions;t.asyncResolveFns.add(n),t.optionsToIgnoreOnce.add(o),e.addEventListener("abort",(function i(){t.asyncResolveFns.delete(n),t.optionsToIgnoreOnce.delete(o),e.removeEventListener("abort",i),r(e.reason)})),t.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,i.useContext)(n_()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=Vx((0,i.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&Qx(e.data,r.data)||t.setResult(r)},r=n.subscribe(e,(function o(i){var a=n.last;r.unsubscribe();try{n.resetLastResults(),r=n.subscribe(e,o)}finally{n.last=a}if(!m_.call(i,"graphQLErrors"))throw i;var l=t.result;(!l||l&&l.loading||!Qx(i,l.error))&&t.setResult({data:l&&l.data,error:i,loading:!1,networkStatus:i_.error})}));return function(){return r.unsubscribe()}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(r);var o=this.toQueryResult(r);return!o.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(o)})),this.asyncResolveFns.clear()),o},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(o)&&Qx(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.optionsToIgnoreOnce.delete(o),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push(Zx(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(e_)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,jd(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var i=o.fetchPolicy,a=void 0===i?this.getDefaultFetchPolicy():i,l=o.initialFetchPolicy,s=void 0===l?a:l;Object.assign(o,{initialFetchPolicy:s,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,i.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var n=this.toApolloError(e);Promise.resolve().then((function(){n?t.onError(n):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&fx.warn(e)}))}},e.prototype.toApolloError=function(e){return o_(e.errors)?new s_({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,jd(e,["data","partial"]));return this.toQueryResultCache.set(e,t=Ad(Ad(Ad({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&o_(e.errors)&&(t.error=new s_({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:i_.refetch}),this.observable.refetch())},e}();function x_(){x_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(O){u=function(e,t,n){return e[t]=n}}function c(e,t,n,o){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),l=new E(o||[]);return r(a,"_invoke",{value:_(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(O){return{type:"throw",arg:O}}}e.wrap=c;var f={};function p(){}function h(){}function v(){}var g={};u(g,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(T([])));y&&y!==t&&n.call(y,i)&&(g=y);var b=v.prototype=p.prototype=Object.create(g);function w(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(r,i,a,l){var u=d(e[r],e,i);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,l)}))}l(u.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function _(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=S(a,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,f;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function __(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(u){return void n(u)}l.done?t(s):Promise.resolve(s).then(r,o)}function S_(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){__(i,r,o,a,l,"next",e)}function l(e){__(i,r,o,a,l,"throw",e)}a(void 0)}))}}function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function M_(e,t,n,r){void 0===r&&(r={});var o=r,i=o.window,a=void 0===i?document.defaultView:i,l=o.v5Compat,s=void 0!==l&&l,u=a.history,c=b_.Pop,d=null,f=p();function p(){return(u.state||{idx:null}).idx}function h(){c=b_.Pop;var e=p(),t=null==e?null:e-f;f=e,d&&d({action:c,location:g.location,delta:t})}function v(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:A_(e);return R_(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==f&&(f=0,u.replaceState(k_({},u.state,{idx:f}),""));var g={get action(){return c},get location(){return e(a,u)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(E_,h),d=e,function(){a.removeEventListener(E_,h),d=null}},createHref:function(e){return t(a,e)},createURL:v,encodeLocation:function(e){var t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=b_.Push;var r=I_(g.location,e,t);n&&n(r,e);var o=P_(r,f=p()+1),i=g.createHref(r);try{u.pushState(o,"",i)}catch(l){a.location.assign(i)}s&&d&&d({action:c,location:g.location,delta:1})},replace:function(e,t){c=b_.Replace;var r=I_(g.location,e,t);n&&n(r,e);var o=P_(r,f=p()),i=g.createHref(r);u.replaceState(o,"",i),s&&d&&d({action:c,location:g.location,delta:0})},go:function(e){return u.go(e)}};return g}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(C_||(C_={}));var D_=new Set(["lazy","caseSensitive","path","id","index","children"]);function L_(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map((function(e,o){var i=[].concat(yt(n),[o]),a="string"===typeof e.id?e.id:i.join("-");if(R_(!0!==e.index||!e.children,"Cannot specify children on an index route"),R_(!r[a],'Found a route id collision on id "'+a+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var l=k_({},e,{hasErrorBoundary:t(e),id:a});return r[a]=l,l}var s=k_({},e,{id:a,hasErrorBoundary:t(e),children:void 0});return r[a]=s,e.children&&(s.children=L_(e.children,t,i,r)),s}))}function N_(e,t,n){void 0===n&&(n="/");var r=X_(("string"===typeof t?j_(t):t).pathname||"/",n);if(null==r)return null;var o=F_(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var i=null,a=0;null==i&&a0&&(R_(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),F_(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:Q_(l,e.index),routesMeta:s})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,i=gt(z_(e.path));try{for(i.s();!(r=i.n()).done;){var a=r.value;o(e,t,a)}}catch(l){i.e(l)}finally{i.f()}}else o(e,t)})),t}function z_(e){var t=e.split("/");if(0===t.length)return[];var n=bt(t),r=n[0],o=n.slice(1),i=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===o.length)return i?[a,""]:[a];var l=z_(o.join("/")),s=[];return s.push.apply(s,yt(l.map((function(e){return""===e?a:[a,e].join("/")})))),i&&s.push.apply(s,yt(l)),s.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var V_=/^:\w+$/,B_=3,U_=2,W_=1,H_=10,q_=-2,G_=function(e){return"*"===e};function Q_(e,t){var n=e.split("/"),r=n.length;return n.some(G_)&&(r+=q_),t&&(r+=U_),n.filter((function(e){return!G_(e)})).reduce((function(e,t){return e+(V_.test(t)?B_:""===t?W_:H_)}),r)}function $_(e,t){for(var n=e.routesMeta,r={},o="/",i=[],a=0;a and the router will parse it for you.'}function Z_(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function eS(e,t,n,r){var o;void 0===r&&(r=!1),"string"===typeof e?o=j_(e):(R_(!(o=k_({},e)).pathname||!o.pathname.includes("?"),J_("?","pathname","search",o)),R_(!o.pathname||!o.pathname.includes("#"),J_("#","pathname","hash",o)),R_(!o.search||!o.search.includes("#"),J_("#","search","hash",o)));var i,a=""===e||""===o.pathname,l=a?"/":o.pathname;if(r||null==l)i=n;else{var s=t.length-1;if(l.startsWith("..")){for(var u=l.split("/");".."===u[0];)u.shift(),s-=1;o.pathname=u.join("/")}i=s>=0?t[s]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?j_(e):e,r=n.pathname,o=n.search,i=void 0===o?"":o,a=n.hash,l=void 0===a?"":a,s=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:s,search:rS(i),hash:oS(l)}}(o,i),d=l&&"/"!==l&&l.endsWith("/"),f=(a||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!f||(c.pathname+="/"),c}var tS=function(e){return e.join("/").replace(/\/\/+/g,"/")},nS=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},rS=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},oS=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},iS=function(e){xt(n,e);var t=mi(n);function n(){return fi(this,n),t.apply(this,arguments)}return di(n)}(bi(Error)),aS=function(){function e(t,n){var r,o=this;fi(this,e),this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],R_(t&&"object"===typeof t&&!Array.isArray(t),"defer() only accepts plain objects"),this.abortPromise=new Promise((function(e,t){return r=t})),this.controller=new AbortController;var i=function(){return r(new iS("Deferred data aborted"))};this.unlistenAbortSignal=function(){return o.controller.signal.removeEventListener("abort",i)},this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((function(e,t){var n=lt(t,2),r=n[0],i=n[1];return Object.assign(e,c({},r,o.trackPromise(r,i)))}),{}),this.done&&this.unlistenAbortSignal(),this.init=n}return di(e,[{key:"trackPromise",value:function(e,t){var n=this;if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);var r=Promise.race([t,this.abortPromise]).then((function(t){return n.onSettle(r,e,null,t)}),(function(t){return n.onSettle(r,e,t)}));return r.catch((function(){})),Object.defineProperty(r,"_tracked",{get:function(){return!0}}),r}},{key:"onSettle",value:function(e,t,n,r){return this.controller.signal.aborted&&n instanceof iS?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:function(){return n}}),Promise.reject(n)):(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(e,"_error",{get:function(){return n}}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:function(){return r}}),this.emit(!1,t),r))}},{key:"emit",value:function(e,t){this.subscribers.forEach((function(n){return n(e,t)}))}},{key:"subscribe",value:function(e){var t=this;return this.subscribers.add(e),function(){return t.subscribers.delete(e)}}},{key:"cancel",value:function(){var e=this;this.controller.abort(),this.pendingKeysSet.forEach((function(t,n){return e.pendingKeysSet.delete(n)})),this.emit(!0)}},{key:"resolveData",value:function(){var e=S_(x_().mark((function e(t){var n,r,o=this;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,this.done){e.next=7;break}return r=function(){return o.cancel()},t.addEventListener("abort",r),e.next=6,new Promise((function(e){o.subscribe((function(n){t.removeEventListener("abort",r),(n||o.done)&&e(n)}))}));case 6:n=e.sent;case 7:return e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"done",get:function(){return 0===this.pendingKeysSet.size}},{key:"unwrappedData",get:function(){return R_(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((function(e,t){var n=lt(t,2),r=n[0],o=n[1];return Object.assign(e,c({},r,function(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}(o)))}),{})}},{key:"pendingKeys",get:function(){return Array.from(this.pendingKeysSet)}}]),e}();var lS=di((function e(t,n,r,o){fi(this,e),void 0===o&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}));function sS(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var uS=["post","put","patch","delete"],cS=new Set(uS),dS=["get"].concat(uS),fS=new Set(dS),pS=new Set([301,302,303,307,308]),hS=new Set([307,308]),vS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},gS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},mS={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},yS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bS="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,wS=!bS,xS=function(e){return Boolean(e.hasErrorBoundary)};function _S(e){R_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");var t,n=e.detectErrorBoundary||xS,r={},o=L_(e.routes,n,void 0,r),i=null,a=new Set,l=null,s=null,u=null,d=null!=e.hydrationData,f=N_(o,e.history.location,e.basename),p=null;if(null==f){var h=zS(404,{pathname:e.history.location.pathname}),v=FS(o);f=v.matches,p=c({},v.route.id,h)}var g,m,y=!f.some((function(e){return e.route.lazy}))&&(!f.some((function(e){return e.route.loader}))||null!=e.hydrationData),b={historyAction:e.history.action,location:e.history.location,matches:f,initialized:y,navigation:vS,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||p,fetchers:new Map,blockers:new Map},w=b_.Pop,x=!1,_=!1,S=!1,k=[],C=[],E=new Map,T=0,R=-1,O=new Map,P=new Set,I=new Map,A=new Map,j=new Map,M=!1;function D(e){b=k_({},b,e),a.forEach((function(e){return e(b)}))}function L(n,r){var i,a,l,s=null!=b.actionData&&null!=b.navigation.formMethod&&$S(b.navigation.formMethod)&&"loading"===b.navigation.state&&!0!==(null==(i=n.state)?void 0:i._isRedirect);l=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:s?b.actionData:null;var u,c=r.loaderData?LS(b.loaderData,r.loaderData,r.matches||[],r.errors):b.loaderData,d=gt(j);try{for(d.s();!(u=d.n()).done;){ie(lt(u.value,1)[0])}}catch(p){d.e(p)}finally{d.f()}var f=!0===x||null!=b.navigation.formMethod&&$S(b.navigation.formMethod)&&!0!==(null==(a=n.state)?void 0:a._isRedirect);t&&(o=t,t=void 0),D(k_({},r,{actionData:l,loaderData:c,historyAction:w,location:n,initialized:!0,navigation:vS,revalidation:"idle",restoreScrollPosition:ce(n,r.matches||b.matches),preventScrollReset:f,blockers:new Map(b.blockers)})),_||w===b_.Pop||(w===b_.Push?e.history.push(n,n.state):w===b_.Replace&&e.history.replace(n,n.state)),w=b_.Pop,x=!1,_=!1,S=!1,k=[],C=[]}function N(e,t){return F.apply(this,arguments)}function F(){return F=S_(x_().mark((function t(n,r){var o,i,a,l,s,u,c,d,f,p;return x_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("number"!==typeof n){t.next=3;break}return e.history.go(n),t.abrupt("return");case 3:if(o=SS(n,r),i=o.path,a=o.submission,l=o.error,s=b.location,u=k_({},u=I_(b.location,i,r&&r.state),e.history.encodeLocation(u)),c=r&&null!=r.replace?r.replace:void 0,d=b_.Push,!0===c?d=b_.Replace:!1===c||null!=a&&$S(a.formMethod)&&a.formAction===b.location.pathname+b.location.search&&(d=b_.Replace),f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,!(p=le({currentLocation:s,nextLocation:u,historyAction:d}))){t.next=15;break}return ae(p,{state:"blocked",location:u,proceed:function(){ae(p,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),N(n,r)},reset:function(){ie(p),D({blockers:new Map(b.blockers)})}}),t.abrupt("return");case 15:return t.next=17,z(d,u,{submission:a,pendingError:l,preventScrollReset:f,replace:r&&r.replace});case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)}))),F.apply(this,arguments)}function z(e,t,n){return V.apply(this,arguments)}function V(){return V=S_(x_().mark((function n(r,i,a){var l,s,u,d,f,p,h,v,g,y,S,k,C,E,T,R;return x_().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m&&m.abort(),m=null,w=r,_=!0===(a&&a.startUninterruptedRevalidation),ue(b.location,b.matches),x=!0===(a&&a.preventScrollReset),l=t||o,s=a&&a.overrideNavigation,u=N_(l,i,e.basename)){n.next=15;break}return d=zS(404,{pathname:i.pathname}),f=FS(l),p=f.matches,h=f.route,se(),L(i,{matches:p,loaderData:{},errors:c({},h.id,d)}),n.abrupt("return");case 15:if(!US(b.location,i)||a&&a.submission&&$S(a.submission.formMethod)){n.next=18;break}return L(i,{matches:u}),n.abrupt("return");case 18:if(m=new AbortController,v=AS(e.history,i,m.signal,a&&a.submission),!a||!a.pendingError){n.next=24;break}y=c({},NS(u).route.id,a.pendingError),n.next=35;break;case 24:if(!(a&&a.submission&&$S(a.submission.formMethod))){n.next=35;break}return n.next=27,B(v,i,a.submission,u,{replace:a.replace});case 27:if(!(S=n.sent).shortCircuited){n.next=30;break}return n.abrupt("return");case 30:g=S.pendingActionData,y=S.pendingActionError,k=k_({state:"loading",location:i},a.submission),s=k,v=new Request(v.url,{signal:v.signal});case 35:return n.next=37,W(v,i,u,s,a&&a.submission,a&&a.replace,g,y);case 37:if(C=n.sent,E=C.shortCircuited,T=C.loaderData,R=C.errors,!E){n.next=43;break}return n.abrupt("return");case 43:m=null,L(i,k_({matches:u},g?{actionData:g}:{},{loaderData:T,errors:R}));case 45:case"end":return n.stop()}}),n)}))),V.apply(this,arguments)}function B(e,t,n,r,o){return U.apply(this,arguments)}function U(){return U=S_(x_().mark((function e(t,o,i,a,l){var s,u,d,f;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(J(),D({navigation:k_({state:"submitting",location:o},i)}),(u=tk(a,o)).route.action||u.route.lazy){e.next=8;break}s={type:C_.error,error:zS(405,{method:t.method,pathname:o.pathname,routeId:u.route.id})},e.next=13;break;case 8:return e.next=10,PS("action",t,u,a,r,n,g.basename);case 10:if(s=e.sent,!t.signal.aborted){e.next=13;break}return e.abrupt("return",{shortCircuited:!0});case 13:if(!qS(s)){e.next=18;break}return d=l&&null!=l.replace?l.replace:s.location===b.location.pathname+b.location.search,e.next=17,$(b,s,{submission:i,replace:d});case 17:return e.abrupt("return",{shortCircuited:!0});case 18:if(!HS(s)){e.next=22;break}return f=NS(a,u.route.id),!0!==(l&&l.replace)&&(w=b_.Push),e.abrupt("return",{pendingActionData:{},pendingActionError:c({},f.route.id,s.error)});case 22:if(!WS(s)){e.next=24;break}throw zS(400,{type:"defer-action"});case 24:return e.abrupt("return",{pendingActionData:c({},u.route.id,s.data)});case 25:case"end":return e.stop()}}),e)}))),U.apply(this,arguments)}function W(e,t,n,r,o,i,a,l){return H.apply(this,arguments)}function H(){return H=S_(x_().mark((function n(r,i,a,l,s,u,c,d){var f,p,h,v,g,y,w,x,O,P,j,M,N,F,z,V,B,U;return x_().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((f=l)||(p=k_({state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s),f=p),h=s||(f.formMethod&&f.formAction&&f.formData&&f.formEncType?{formMethod:f.formMethod,formAction:f.formAction,formData:f.formData,formEncType:f.formEncType}:void 0),v=t||o,g=CS(e.history,b,a,h,i,S,k,C,I,v,e.basename,c,d),y=lt(g,2),w=y[0],x=y[1],se((function(e){return!(a&&a.some((function(t){return t.route.id===e})))||w&&w.some((function(t){return t.route.id===e}))})),0!==w.length||0!==x.length){n.next=9;break}return L(i,k_({matches:a,loaderData:{},errors:d||null},c?{actionData:c}:{})),n.abrupt("return",{shortCircuited:!0});case 9:return _||(x.forEach((function(e){var t=b.fetchers.get(e.key),n={state:"loading",data:t&&t.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(e.key,n)})),O=c||b.actionData,D(k_({navigation:f},O?0===Object.keys(O).length?{actionData:null}:{actionData:O}:{},x.length>0?{fetchers:new Map(b.fetchers)}:{}))),R=++T,x.forEach((function(e){return E.set(e.key,m)})),n.next=14,K(b.matches,a,w,x,r);case 14:if(P=n.sent,j=P.results,M=P.loaderResults,N=P.fetcherResults,!r.signal.aborted){n.next=20;break}return n.abrupt("return",{shortCircuited:!0});case 20:if(x.forEach((function(e){return E.delete(e.key)})),!(F=VS(j))){n.next=26;break}return n.next=25,$(b,F,{replace:u});case 25:return n.abrupt("return",{shortCircuited:!0});case 26:return z=DS(b,a,w,M,d,x,N,A),V=z.loaderData,B=z.errors,A.forEach((function(e,t){e.subscribe((function(n){(n||e.done)&&A.delete(t)}))})),re(),U=oe(R),n.abrupt("return",k_({loaderData:V,errors:B},U||x.length>0?{fetchers:new Map(b.fetchers)}:{}));case 31:case"end":return n.stop()}}),n)}))),H.apply(this,arguments)}function q(e){return b.fetchers.get(e)||gS}function G(){return G=S_(x_().mark((function i(a,l,s,u,d,f){var p,h,v,y,x,_,j,M,N,F,z,V,B,U,W,H,q,G,Q,Y,X,ee,te,ne,re,ie,ae;return x_().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(J(),I.delete(a),u.route.action||u.route.lazy){i.next=6;break}return p=zS(405,{method:f.formMethod,pathname:s,routeId:l}),Z(a,l,p),i.abrupt("return");case 6:return h=b.fetchers.get(a),v=k_({state:"submitting"},f,{data:h&&h.data," _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,v),D({fetchers:new Map(b.fetchers)}),y=new AbortController,x=AS(e.history,s,y.signal,f),E.set(a,y),i.next=15,PS("action",x,u,d,r,n,g.basename);case 15:if(_=i.sent,!x.signal.aborted){i.next=19;break}return E.get(a)===y&&E.delete(a),i.abrupt("return");case 19:if(!qS(_)){i.next=26;break}return E.delete(a),P.add(a),j=k_({state:"loading"},f,{data:void 0," _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,j),D({fetchers:new Map(b.fetchers)}),i.abrupt("return",$(b,_,{isFetchActionRedirect:!0}));case 26:if(!HS(_)){i.next=29;break}return Z(a,l,_.error),i.abrupt("return");case 29:if(!WS(_)){i.next=31;break}throw zS(400,{type:"defer-action"});case 31:return M=b.navigation.location||b.location,N=AS(e.history,M,y.signal),F=t||o,R_(z="idle"!==b.navigation.state?N_(F,b.navigation.location,e.basename):b.matches,"Didn't find any matches after fetcher action"),V=++T,O.set(a,V),B=k_({state:"loading",data:_.data},f,{" _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,B),U=CS(e.history,b,z,f,M,S,k,C,I,F,e.basename,c({},u.route.id,_.data),void 0),W=lt(U,2),H=W[0],(q=W[1]).filter((function(e){return e.key!==a})).forEach((function(e){var t=e.key,n=b.fetchers.get(t),r={state:"loading",data:n&&n.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(t,r),E.set(t,y)})),D({fetchers:new Map(b.fetchers)}),i.next=45,K(b.matches,z,H,q,N);case 45:if(G=i.sent,Q=G.results,Y=G.loaderResults,X=G.fetcherResults,!y.signal.aborted){i.next=51;break}return i.abrupt("return");case 51:if(O.delete(a),E.delete(a),q.forEach((function(e){return E.delete(e.key)})),!(ee=VS(Q))){i.next=57;break}return i.abrupt("return",$(b,ee));case 57:te=DS(b,b.matches,H,Y,void 0,q,X,A),ne=te.loaderData,re=te.errors,ie={state:"idle",data:_.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0},b.fetchers.set(a,ie),ae=oe(V),"loading"===b.navigation.state&&V>R?(R_(w,"Expected pending action"),m&&m.abort(),L(b.navigation.location,{matches:z,loaderData:ne,errors:re,fetchers:new Map(b.fetchers)})):(D(k_({errors:re,loaderData:LS(b.loaderData,ne,z,re)},ae?{fetchers:new Map(b.fetchers)}:{})),S=!1);case 62:case"end":return i.stop()}}),i)}))),G.apply(this,arguments)}function Q(){return Q=S_(x_().mark((function t(o,i,a,l,s,u){var d,f,p,h,v,m,y;return x_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d=b.fetchers.get(o),f=k_({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},u,{data:d&&d.data," _hasFetcherDoneAnything ":!0}),b.fetchers.set(o,f),D({fetchers:new Map(b.fetchers)}),p=new AbortController,h=AS(e.history,a,p.signal),E.set(o,p),t.next=9,PS("loader",h,l,s,r,n,g.basename);case 9:if(!WS(v=t.sent)){t.next=17;break}return t.next=13,XS(v,h.signal,!0);case 13:if(t.t0=t.sent,t.t0){t.next=16;break}t.t0=v;case 16:v=t.t0;case 17:if(E.get(o)===p&&E.delete(o),!h.signal.aborted){t.next=20;break}return t.abrupt("return");case 20:if(!qS(v)){t.next=24;break}return t.next=23,$(b,v);case 23:return t.abrupt("return");case 24:if(!HS(v)){t.next=29;break}return m=NS(b.matches,i),b.fetchers.delete(o),D({fetchers:new Map(b.fetchers),errors:c({},m.route.id,v.error)}),t.abrupt("return");case 29:R_(!WS(v),"Unhandled fetcher deferred data"),y={state:"idle",data:v.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0},b.fetchers.set(o,y),D({fetchers:new Map(b.fetchers)});case 33:case"end":return t.stop()}}),t)}))),Q.apply(this,arguments)}function $(e,t,n){return Y.apply(this,arguments)}function Y(){return Y=S_(x_().mark((function t(n,r,o){var i,a,l,s,u,c,d,f,p,h,v,g,y,b;return x_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=(a=void 0===o?{}:o).submission,s=a.replace,u=a.isFetchActionRedirect,r.revalidate&&(S=!0),R_(c=I_(n.location,r.location,k_({_isRedirect:!0},u?{_isFetchActionRedirect:!0}:{})),"Expected a location on the redirect navigation"),!yS.test(r.location)||!bS||"undefined"===typeof(null==(i=window)?void 0:i.location)){t.next=10;break}if(d=e.history.createURL(r.location),f=null==X_(d.pathname,e.basename||"/"),window.location.origin===d.origin&&!f){t.next=10;break}return s?window.location.replace(r.location):window.location.assign(r.location),t.abrupt("return");case 10:if(m=null,p=!0===s?b_.Replace:b_.Push,h=n.navigation,v=h.formMethod,g=h.formAction,y=h.formEncType,b=h.formData,!l&&v&&g&&b&&y&&(l={formMethod:v,formAction:g,formEncType:y,formData:b}),!(hS.has(r.status)&&l&&$S(l.formMethod))){t.next=19;break}return t.next=17,z(p,c,{submission:k_({},l,{formAction:r.location}),preventScrollReset:x});case 17:t.next=21;break;case 19:return t.next=21,z(p,c,{overrideNavigation:{state:"loading",location:c,formMethod:l?l.formMethod:void 0,formAction:l?l.formAction:void 0,formEncType:l?l.formEncType:void 0,formData:l?l.formData:void 0},preventScrollReset:x});case 21:case"end":return t.stop()}}),t)}))),Y.apply(this,arguments)}function K(e,t,n,r,o){return X.apply(this,arguments)}function X(){return X=S_(x_().mark((function t(o,i,a,l,s){var u,c,d;return x_().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([].concat(yt(a.map((function(e){return PS("loader",s,e,i,r,n,g.basename)}))),yt(l.map((function(t){return t.matches&&t.match?PS("loader",AS(e.history,t.path,s.signal),t.match,t.matches,r,n,g.basename):{type:C_.error,error:zS(404,{pathname:t.path})}})))));case 2:return u=t.sent,c=u.slice(0,a.length),d=u.slice(a.length),t.next=7,Promise.all([YS(o,a,c,s.signal,!1,b.loaderData),YS(o,l.map((function(e){return e.match})),d,s.signal,!0)]);case 7:return t.abrupt("return",{results:u,loaderResults:c,fetcherResults:d});case 8:case"end":return t.stop()}}),t)}))),X.apply(this,arguments)}function J(){var e;S=!0,(e=k).push.apply(e,yt(se())),I.forEach((function(e,t){E.has(t)&&(C.push(t),te(t))}))}function Z(e,t,n){var r=NS(b.matches,t);ee(e),D({errors:c({},r.route.id,n),fetchers:new Map(b.fetchers)})}function ee(e){E.has(e)&&te(e),I.delete(e),O.delete(e),P.delete(e),b.fetchers.delete(e)}function te(e){var t=E.get(e);R_(t,"Expected fetch controller: "+e),t.abort(),E.delete(e)}function ne(e){var t,n=gt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,o={state:"idle",data:q(r).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(r,o)}}catch(i){n.e(i)}finally{n.f()}}function re(){var e,t=[],n=gt(P);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=b.fetchers.get(r);R_(o,"Expected fetcher: "+r),"loading"===o.state&&(P.delete(r),t.push(r))}}catch(i){n.e(i)}finally{n.f()}ne(t)}function oe(e){var t,n=[],r=gt(O);try{for(r.s();!(t=r.n()).done;){var o=lt(t.value,2),i=o[0];if(o[1]0}function ie(e){b.blockers.delete(e),j.delete(e)}function ae(e,t){var n=b.blockers.get(e)||mS;R_("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state),b.blockers.set(e,t),D({blockers:new Map(b.blockers)})}function le(e){var t=e.currentLocation,n=e.nextLocation,r=e.historyAction;if(0!==j.size){j.size>1&&O_(!1,"A router only supports one blocker at a time");var o=Array.from(j.entries()),i=lt(o[o.length-1],2),a=i[0],l=i[1],s=b.blockers.get(a);if(!s||"proceeding"!==s.state)return l({currentLocation:t,nextLocation:n,historyAction:r})?a:void 0}}function se(e){var t=[];return A.forEach((function(n,r){e&&!e(r)||(n.cancel(),t.push(r),A.delete(r))})),t}function ue(e,t){if(l&&s&&u){var n=t.map((function(e){return ek(e,b.loaderData)})),r=s(e,n)||e.key;l[r]=u()}}function ce(e,t){if(l&&s&&u){var n=t.map((function(e){return ek(e,b.loaderData)})),r=s(e,n)||e.key,o=l[r];if("number"===typeof o)return o}return null}return g={get basename(){return e.basename},get state(){return b},get routes(){return o},initialize:function(){if(i=e.history.listen((function(t){var n=t.action,r=t.location,o=t.delta;if(!M){O_(0===j.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var i=le({currentLocation:b.location,nextLocation:r,historyAction:n});return i&&null!=o?(M=!0,e.history.go(-1*o),void ae(i,{state:"blocked",location:r,proceed:function(){ae(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(o)},reset:function(){ie(i),D({blockers:new Map(g.state.blockers)})}})):z(n,r)}M=!1})),b.initialized)return g;var t=b.matches.filter((function(e){return e.route.lazy}));if(0===t.length)return z(b_.Pop,b.location),g;var o=t.map((function(e){return RS(e.route,n,r)}));return Promise.all(o).then((function(){!b.matches.some((function(e){return e.route.loader}))||null!=e.hydrationData?D({initialized:!0}):z(b_.Pop,b.location)})),g},subscribe:function(e){return a.add(e),function(){return a.delete(e)}},enableScrollRestoration:function(e,t,n){if(l=e,u=t,s=n||function(e){return e.key},!d&&b.navigation===vS){d=!0;var r=ce(b.location,b.matches);null!=r&&D({restoreScrollPosition:r})}return function(){l=null,u=null,s=null}},navigate:N,fetch:function(n,r,i,a){if(wS)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");E.has(n)&&te(n);var l=N_(t||o,i,e.basename);if(l){var s=SS(i,a,!0),u=s.path,c=s.submission,d=tk(l,u);x=!0===(a&&a.preventScrollReset),c&&$S(c.formMethod)?function(e,t,n,r,o,i){G.apply(this,arguments)}(n,r,u,d,l,c):(I.set(n,{routeId:r,path:u}),function(e,t,n,r,o,i){Q.apply(this,arguments)}(n,r,u,d,l,c))}else Z(n,r,zS(404,{pathname:i}))},revalidate:function(){J(),D({revalidation:"loading"}),"submitting"!==b.navigation.state&&("idle"!==b.navigation.state?z(w||b.historyAction,b.navigation.location,{overrideNavigation:b.navigation}):z(b.historyAction,b.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:q,deleteFetcher:ee,dispose:function(){i&&i(),a.clear(),m&&m.abort(),b.fetchers.forEach((function(e,t){return ee(t)})),b.blockers.forEach((function(e,t){return ie(t)}))},getBlocker:function(e,t){var n=b.blockers.get(e)||mS;return j.get(e)!==t&&j.set(e,t),n},deleteBlocker:ie,_internalFetchControllers:E,_internalActiveDeferreds:A,_internalSetRoutes:function(e){t=e}},g}Symbol("deferred");function SS(e,t,n){void 0===n&&(n=!1);var r,o="string"===typeof e?e:A_(e);if(!t||!function(e){return null!=e&&"formData"in e}(t))return{path:o};if(t.formMethod&&!QS(t.formMethod))return{path:o,error:zS(405,{method:t.formMethod})};if(t.formData&&$S((r={formMethod:t.formMethod||"get",formAction:BS(o),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData}).formMethod))return{path:o,submission:r};var i=j_(o),a=jS(t.formData);return n&&i.search&&ZS(i.search)&&a.append("index",""),i.search="?"+a,{path:A_(i),submission:r}}function kS(e,t){var n=e;if(t){var r=e.findIndex((function(e){return e.route.id===t}));r>=0&&(n=e.slice(0,r))}return n}function CS(e,t,n,r,o,i,a,l,s,u,c,d,f){var p=f?Object.values(f)[0]:d?Object.values(d)[0]:void 0,h=e.createURL(t.location),v=e.createURL(o),g=i||h.toString()===v.toString()||h.search!==v.search,m=f?Object.keys(f)[0]:void 0,y=kS(n,m).filter((function(e,n){if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){var r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||a.some((function(t){return t===e.route.id})))return!0;var o=t.matches[n],i=e;return TS(e,k_({currentUrl:h,currentParams:o.params,nextUrl:v,nextParams:i.params},r,{actionResult:p,defaultShouldRevalidate:g||ES(o,i)}))})),b=[];return s.forEach((function(e,o){if(n.some((function(t){return t.route.id===e.routeId}))){var i=N_(u,e.path,c);if(i){var a=tk(i,e.path);if(l.includes(o))b.push(k_({key:o,matches:i,match:a},e));else TS(a,k_({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:p,defaultShouldRevalidate:g}))&&b.push(k_({key:o,matches:i,match:a},e))}else b.push(k_({key:o},e,{matches:null,match:null}))}})),[y,b]}function ES(e,t){var n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function TS(e,t){if(e.route.shouldRevalidate){var n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}function RS(e,t,n){return OS.apply(this,arguments)}function OS(){return OS=S_(x_().mark((function e(t,n,r){var o,i,a,l,s,u;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.lazy){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.lazy();case 4:if(o=e.sent,t.lazy){e.next=7;break}return e.abrupt("return");case 7:for(l in R_(i=r[t.id],"No route found in manifest"),a={},o)s=i[l],O_(!(u=void 0!==s&&"hasErrorBoundary"!==l),'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+l+'" will be ignored.'),u||D_.has(l)||(a[l]=o[l]);Object.assign(i,a),Object.assign(i,{hasErrorBoundary:n(k_({},i)),lazy:void 0});case 13:case"end":return e.stop()}}),e)}))),OS.apply(this,arguments)}function PS(e,t,n,r,o,i,a,l,s,u){return IS.apply(this,arguments)}function IS(){return IS=S_(x_().mark((function e(t,n,r,o,i,a,l,s,u,c){var d,f,p,h,v,g,m,y,b,w,x,_,S,k,C,E,T,R,O;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===l&&(l="/"),void 0===s&&(s=!1),void 0===u&&(u=!1),h=function(e){var t,o=new Promise((function(e,n){return t=n}));return p=function(){return t()},n.signal.addEventListener("abort",p),Promise.race([e({request:n,params:r.params,context:c}),o])},e.prev=4,v=r.route[t],!r.route.lazy){e.next=30;break}if(!v){e.next=14;break}return e.next=10,Promise.all([h(v),RS(r.route,a,i)]);case 10:g=e.sent,f=g[0],e.next=28;break;case 14:return e.next=16,RS(r.route,a,i);case 16:if(!(v=r.route[t])){e.next=23;break}return e.next=20,h(v);case 20:f=e.sent,e.next=28;break;case 23:if("action"!==t){e.next=27;break}throw zS(405,{method:n.method,pathname:new URL(n.url).pathname,routeId:r.route.id});case 27:return e.abrupt("return",{type:C_.data,data:void 0});case 28:e.next=34;break;case 30:return R_(v,"Could not find the "+t+' to run on the "'+r.route.id+'" route'),e.next=33,h(v);case 33:f=e.sent;case 34:R_(void 0!==f,"You defined "+("action"===t?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+t+"` function. Please return a value or `null`."),e.next=41;break;case 37:e.prev=37,e.t0=e.catch(4),d=C_.error,f=e.t0;case 41:return e.prev=41,p&&n.signal.removeEventListener("abort",p),e.finish(41);case 44:if(!GS(f)){e.next=69;break}if(m=f.status,!pS.has(m)){e.next=54;break}if(R_(y=f.headers.get("Location"),"Redirects returned/thrown from loaders/actions must have a Location header"),yS.test(y)?s||(S=new URL(n.url),k=y.startsWith("//")?new URL(S.protocol+y):new URL(y),C=null!=X_(k.pathname,l),k.origin===S.origin&&C&&(y=k.pathname+k.search+k.hash)):(b=o.slice(0,o.indexOf(r)+1),w=Z_(b).map((function(e){return e.pathnameBase})),R_(A_(x=eS(y,w,new URL(n.url).pathname)),"Unable to resolve redirect location: "+y),l&&(_=x.pathname,x.pathname="/"===_?l:tS([l,_])),y=A_(x)),!s){e.next=53;break}throw f.headers.set("Location",y),f;case 53:return e.abrupt("return",{type:C_.redirect,status:m,location:y,revalidate:null!==f.headers.get("X-Remix-Revalidate")});case 54:if(!u){e.next=56;break}throw{type:d||C_.data,response:f};case 56:if(!(T=f.headers.get("Content-Type"))||!/\bapplication\/json\b/.test(T)){e.next=63;break}return e.next=60,f.json();case 60:E=e.sent,e.next=66;break;case 63:return e.next=65,f.text();case 65:E=e.sent;case 66:if(d!==C_.error){e.next=68;break}return e.abrupt("return",{type:d,error:new lS(m,f.statusText,E),headers:f.headers});case 68:return e.abrupt("return",{type:C_.data,data:E,statusCode:f.status,headers:f.headers});case 69:if(d!==C_.error){e.next=71;break}return e.abrupt("return",{type:d,error:f});case 71:if(!(f instanceof aS)){e.next=73;break}return e.abrupt("return",{type:C_.deferred,deferredData:f,statusCode:null==(R=f.init)?void 0:R.status,headers:(null==(O=f.init)?void 0:O.headers)&&new Headers(f.init.headers)});case 73:return e.abrupt("return",{type:C_.data,data:f});case 74:case"end":return e.stop()}}),e,null,[[4,37,41,44]])}))),IS.apply(this,arguments)}function AS(e,t,n,r){var o=e.createURL(BS(t)).toString(),i={signal:n};if(r&&$S(r.formMethod)){var a=r.formMethod,l=r.formEncType,s=r.formData;i.method=a.toUpperCase(),i.body="application/x-www-form-urlencoded"===l?jS(s):s}return new Request(o,i)}function jS(e){var t,n=new URLSearchParams,r=gt(e.entries());try{for(r.s();!(t=r.n()).done;){var o=lt(t.value,2),i=o[0],a=o[1];n.append(i,a instanceof File?a.name:a)}}catch(l){r.e(l)}finally{r.f()}return n}function MS(e,t,n,r,o){var i,a={},l=null,s=!1,u={};return n.forEach((function(n,c){var d=t[c].route.id;if(R_(!qS(n),"Cannot handle redirect results in processLoaderData"),HS(n)){var f=NS(e,d),p=n.error;r&&(p=Object.values(r)[0],r=void 0),null==(l=l||{})[f.route.id]&&(l[f.route.id]=p),a[d]=void 0,s||(s=!0,i=sS(n.error)?n.error.status:500),n.headers&&(u[d]=n.headers)}else WS(n)?(o.set(d,n.deferredData),a[d]=n.deferredData.data):a[d]=n.data,null==n.statusCode||200===n.statusCode||s||(i=n.statusCode),n.headers&&(u[d]=n.headers)})),r&&(l=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:l,statusCode:i||200,loaderHeaders:u}}function DS(e,t,n,r,o,i,a,l){for(var s=MS(t,n,r,o,l),u=s.loaderData,d=s.errors,f=0;f=0;t--){var n=e[t];if(qS(n))return n}}function BS(e){return A_(k_({},"string"===typeof e?j_(e):e,{hash:""}))}function US(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function WS(e){return e.type===C_.deferred}function HS(e){return e.type===C_.error}function qS(e){return(e&&e.type)===C_.redirect}function GS(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function QS(e){return fS.has(e)}function $S(e){return cS.has(e)}function YS(e,t,n,r,o,i){return KS.apply(this,arguments)}function KS(){return KS=S_(x_().mark((function e(t,n,r,o,i,a){var l,s;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=x_().mark((function e(l){var s,u,c,d;return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r[l],u=n[l]){e.next=4;break}return e.abrupt("return","continue");case 4:if(c=t.find((function(e){return e.route.id===u.route.id})),d=null!=c&&!ES(c,u)&&void 0!==(a&&a[u.route.id]),!WS(s)||!i&&!d){e.next=9;break}return e.next=9,XS(s,o,i).then((function(e){e&&(r[l]=e||r[l])}));case 9:case"end":return e.stop()}}),e)})),s=0;case 2:if(!(s=0||R_(!1),r=r.slice(0,Math.min(r.length,a+1))}return r.reduceRight((function(e,a,l){var s=a.route.id?null==o?void 0:o[a.route.id]:null,u=null;n&&(u=a.route.ErrorBoundary?i.createElement(a.route.ErrorBoundary,null):a.route.errorElement?a.route.errorElement:i.createElement(_k,null));var c=t.concat(r.slice(0,l+1)),d=function(){var t=e;return s?t=u:a.route.Component?t=i.createElement(a.route.Component,null):a.route.element&&(t=a.route.element),i.createElement(Ek,{match:a,routeContext:{outlet:e,matches:c},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===l)?i.createElement(Ck,{location:n.location,component:u,error:s,children:d(),routeContext:{outlet:null,matches:c}}):d()}),null)}function Rk(e){var t=i.useContext(ck);return t||R_(!1),t}function Ok(e){var t=function(e){var t=i.useContext(hk);return t||R_(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||R_(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"}(Sk||(Sk={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(kk||(kk={}));var Pk;function Ik(e){var t=e.fallbackElement,n=e.router,r=i.useCallback((function(){return n.state}),[n]),o=sk(n.subscribe,r,r),a=i.useMemo((function(){return{createHref:n.createHref,encodeLocation:n.encodeLocation,go:function(e){return n.navigate(e)},push:function(e,t,r){return n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})},replace:function(e,t,r){return n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}}}),[n]),l=n.basename||"/",s=i.useMemo((function(){return{router:n,navigator:a,static:!1,basename:l}}),[n,a,l]);return i.createElement(i.Fragment,null,i.createElement(uk.Provider,{value:s},i.createElement(ck.Provider,{value:o},i.createElement(jk,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:a},n.state.initialized?i.createElement(Mk,null):t))),null)}function Ak(e){R_(!1)}function jk(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,o=void 0===r?null:r,a=e.location,l=e.navigationType,s=void 0===l?b_.Pop:l,u=e.navigator,c=e.static,d=void 0!==c&&c;mk()&&R_(!1);var f=n.replace(/^\/*/,"/"),p=i.useMemo((function(){return{basename:f,navigator:u,static:d}}),[f,u,d]);"string"===typeof a&&(a=j_(a));var h=a,v=h.pathname,g=void 0===v?"/":v,m=h.search,y=void 0===m?"":m,b=h.hash,w=void 0===b?"":b,x=h.state,_=void 0===x?null:x,S=h.key,k=void 0===S?"default":S,C=i.useMemo((function(){var e=X_(g,f);return null==e?null:{location:{pathname:e,search:y,hash:w,state:_,key:k},navigationType:s}}),[f,g,y,w,_,k,s]);return null==C?null:i.createElement(fk.Provider,{value:p},i.createElement(pk.Provider,{children:o,value:C}))}function Mk(e){var t=e.children,n=e.location,r=i.useContext(uk);return function(e,t){mk()||R_(!1);var n,r=i.useContext(fk).navigator,o=i.useContext(ck),a=i.useContext(hk).matches,l=a[a.length-1],s=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/"),c=(l&&l.route,yk());if(t){var d,f="string"===typeof t?j_(t):t;"/"===u||(null==(d=f.pathname)?void 0:d.startsWith(u))||R_(!1),n=f}else n=c;var p=n.pathname||"/",h=N_(e,{pathname:"/"===u?p:p.slice(u.length)||"/"}),v=Tk(h&&h.map((function(e){return Object.assign({},e,{params:Object.assign({},s,e.params),pathname:tS([u,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:tS([u,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),a,o||void 0);return t&&v?i.createElement(pk.Provider,{value:{location:gk({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:b_.Pop}},v):v}(r&&!t?r.router.routes:Lk(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Pk||(Pk={}));var Dk=new Promise((function(){}));i.Component;function Lk(e,t){void 0===t&&(t=[]);var n=[];return i.Children.forEach(e,(function(e,r){if(i.isValidElement(e))if(e.type!==i.Fragment){e.type!==Ak&&R_(!1),e.props.index&&e.props.children&&R_(!1);var o=[].concat(yt(t),[r]),a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Lk(e.props.children,o)),n.push(a)}else n.push.apply(n,Lk(e.props.children,t))})),n}function Nk(e){return Boolean(e.ErrorBoundary)||Boolean(e.errorElement)}function Fk(){return Fk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var Vk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Bk(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Fk({},t,{errors:Uk(t.errors)})),t}function Uk(e){if(!e)return null;for(var t={},n=0,r=Object.entries(e);n2?r-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=aC(e,["unmount","static"]),l=a.as,s=void 0===l?r:l,u=a.children,d=a.refName,f=void 0===d?"ref":d,h=p(a,Jk),v=void 0!==e.ref?c({},f,e.ref):{},g="function"==typeof u?u(n):u;"className"in h&&h.className&&"function"==typeof h.className&&(h.className=h.className(n));var m={};if(n){for(var y=!1,b=[],w=0,x=Object.entries(n);w0){if(!(0,i.isValidElement)(g)||Array.isArray(g)&&g.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(o,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(h).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));var C=$k(null==(t=g.props)?void 0:t.className,h.className),E=C?{className:C}:{};return(0,i.cloneElement)(g,Object.assign({},rC(g.props,iC(aC(h,["ref"]))),m,v,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var lC=(0,i.createContext)(null);lC.displayName="OpenClosedContext";var sC=function(e){return e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e}(sC||{});function uC(){return(0,i.useContext)(lC)}function cC(e){var t=e.value,n=e.children;return i.createElement(lC.Provider,{value:t},n)}var dC=Object.defineProperty,fC=function(e,t,n){return function(e,t,n){t in e?dC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!=typeof t?t+"":t,n),n},pC=new(function(){function e(){fi(this,e),fC(this,"current",this.detect()),fC(this,"handoffState","pending"),fC(this,"currentId",0)}return di(e,[{key:"set",value:function(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}},{key:"reset",value:function(){this.set(this.detect())}},{key:"nextId",value:function(){return++this.currentId}},{key:"isServer",get:function(){return"server"===this.current}},{key:"isClient",get:function(){return"client"===this.current}},{key:"detect",value:function(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}},{key:"handoff",value:function(){"pending"===this.handoffState&&(this.handoffState="complete")}},{key:"isHandoffComplete",get:function(){return"complete"===this.handoffState}}]),e}()),hC=function(e,t){pC.isServer?(0,i.useEffect)(e,t):(0,i.useLayoutEffect)(e,t)};function vC(){var e=(0,i.useRef)(!1);return hC((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function gC(e){var t=(0,i.useRef)(e);return hC((function(){t.current=e}),[e]),t}function mC(){var e=lt((0,i.useState)(pC.isHandoffComplete),2),t=e[0],n=e[1];return t&&!1===pC.isHandoffComplete&&n(!1),(0,i.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,i.useEffect)((function(){return pC.handoff()}),[]),t}var yC=function(e){var t=gC(e);return i.useCallback((function(){return t.current.apply(t,arguments)}),[t])},bC=Symbol();function wC(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(e,c({},bC,t))}function xC(){for(var e=arguments.length,t=new Array(e),n=0;n=0){var r,o=gt(e.splice(n,1));try{for(o.s();!(r=o.n()).done;){(0,r.value)()}}catch(i){o.e(i)}finally{o.f()}}}},dispose:function(){var t,n=gt(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}}};return t}function kC(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&(t=e.classList).add.apply(t,r)}function CC(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&(t=e.classList).remove.apply(t,r)}function EC(e,t,n,r){var o=n?"enter":"leave",i=SC(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");var l=Yk(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),s=Yk(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),u=Yk(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return CC.apply(void 0,[e].concat(yt(t.enter),yt(t.enterTo),yt(t.enterFrom),yt(t.leave),yt(t.leaveFrom),yt(t.leaveTo),yt(t.entered))),kC.apply(void 0,[e].concat(yt(l),yt(u))),i.nextFrame((function(){CC.apply(void 0,[e].concat(yt(u))),kC.apply(void 0,[e].concat(yt(s))),function(e,t){var n=SC();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=lt(t,1)[0];return void 0===n?0:n})),i=lt(o,2),a=i[0]+i[1];if(0!==a){n.group((function(n){n.setTimeout((function(){t(),n.dispose()}),a),n.addEventListener(e,"transitionrun",(function(e){e.target===e.currentTarget&&n.dispose()}))}));var l=n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t(),l())}))}else t();n.add((function(){return t()})),n.dispose}(e,(function(){return CC.apply(void 0,[e].concat(yt(l))),kC.apply(void 0,[e].concat(yt(t.entered))),a()}))})),i.dispose}function TC(){var e=lt((0,i.useState)(SC),1)[0];return(0,i.useEffect)((function(){return function(){return e.dispose()}}),[e]),e}function RC(e){var t=e.container,n=e.direction,r=e.classes,o=e.onStart,i=e.onStop,a=vC(),l=TC(),s=gC(n);hC((function(){var e=SC();l.add(e.dispose);var n=t.current;if(n&&"idle"!==s.current&&a.current)return e.dispose(),o.current(s.current),e.add(EC(n,r.current,"enter"===s.current,(function(){e.dispose(),i.current(s.current)}))),e.dispose}),[n])}function OC(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=lt((0,i.useState)(e),2),n=t[0],r=t[1],o=(0,i.useCallback)((function(e){return r((function(t){return t|e}))}),[n]),a=(0,i.useCallback)((function(e){return Boolean(n&e)}),[n]),l=(0,i.useCallback)((function(e){return r((function(t){return t&~e}))}),[r]),s=(0,i.useCallback)((function(e){return r((function(t){return t^e}))}),[r]);return{flags:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:s}}var PC=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],IC=["show","appear","unmount"];function AC(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(" ").filter((function(e){return e.trim().length>1}))}var jC=(0,i.createContext)(null);jC.displayName="TransitionContext";var MC=function(e){return e.Visible="visible",e.Hidden="hidden",e}(MC||{});var DC=(0,i.createContext)(null);function LC(e){return"children"in e?LC(e.children):e.current.filter((function(e){return null!==e.el.current})).filter((function(e){return"visible"===e.state})).length>0}function NC(e,t){var n=gC(e),r=(0,i.useRef)([]),o=vC(),a=TC(),l=yC((function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:eC.Hidden,l=r.current.findIndex((function(t){return t.el===e}));-1!==l&&(Yk(i,(c(t={},eC.Unmount,(function(){r.current.splice(l,1)})),c(t,eC.Hidden,(function(){r.current[l].state="hidden"})),t)),a.microTask((function(){var e;!LC(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),s=yC((function(e){var t=r.current.find((function(t){return t.el===e}));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),function(){return l(e,eC.Unmount)}})),u=(0,i.useRef)([]),d=(0,i.useRef)(Promise.resolve()),f=(0,i.useRef)({enter:[],leave:[],idle:[]}),p=yC((function(e,n,r){u.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((function(t){return lt(t,1)[0]!==e}))),null==t||t.chains.current[n].push([e,new Promise((function(e){u.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((function(e){Promise.all(f.current[n].map((function(e){var t=lt(e,2);t[0];return t[1]}))).then((function(){return e()}))}))]),"enter"===n?d.current=d.current.then((function(){return null==t?void 0:t.wait.current})).then((function(){return r(n)})):r(n)})),h=yC((function(e,t,n){Promise.all(f.current[t].splice(0).map((function(e){var t=lt(e,2);t[0];return t[1]}))).then((function(){var e;null==(e=u.current.shift())||e()})).then((function(){return n(t)}))}));return(0,i.useMemo)((function(){return{children:r,register:s,unregister:l,onStart:p,onStop:h,wait:d,chains:f}}),[s,l,r,p,h,f,d])}function FC(){}DC.displayName="NestingContext";var zC=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function VC(e){var t,n,r={},o=gt(zC);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:FC}}catch(a){o.e(a)}finally{o.f()}return r}var BC="div",UC=Zk.RenderStrategy;var WC,HC=oC((function(e,t){var n=e.show,r=e.appear,o=void 0!==r&&r,a=e.unmount,l=p(e,IC),s=(0,i.useRef)(null),u=xC(s,t);mC();var c=uC();if(void 0===n&&null!==c&&(n=(c&sC.Open)===sC.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");var d=lt((0,i.useState)(n?"visible":"hidden"),2),h=d[0],v=d[1],g=NC((function(){v("hidden")})),m=lt((0,i.useState)(!0),2),y=m[0],b=m[1],w=(0,i.useRef)([n]);hC((function(){!1!==y&&w.current[w.current.length-1]!==n&&(w.current.push(n),b(!1))}),[w,n]);var x=(0,i.useMemo)((function(){return{show:n,appear:o,initial:y}}),[n,o,y]);(0,i.useEffect)((function(){if(n)v("visible");else if(LC(g)){var e=s.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&v("hidden")}else v("hidden")}),[n,g]);var _={unmount:a};return i.createElement(DC.Provider,{value:g},i.createElement(jC.Provider,{value:x},tC({ourProps:f(f({},_),{},{as:i.Fragment,children:i.createElement(qC,f(f({ref:u},_),l))}),theirProps:{},defaultTag:i.Fragment,features:UC,visible:"visible"===h,name:"Transition"})))})),qC=oC((function(e,t){var n,r=e.beforeEnter,o=e.afterEnter,a=e.beforeLeave,l=e.afterLeave,s=e.enter,u=e.enterFrom,d=e.enterTo,h=e.entered,v=e.leave,g=e.leaveFrom,m=e.leaveTo,y=p(e,PC),b=(0,i.useRef)(null),w=xC(b,t),x=y.unmount?eC.Unmount:eC.Hidden,_=function(){var e=(0,i.useContext)(jC);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),S=_.show,k=_.appear,C=_.initial,E=lt((0,i.useState)(S?"visible":"hidden"),2),T=E[0],R=E[1],O=function(){var e=(0,i.useContext)(DC);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),P=O.register,I=O.unregister,A=(0,i.useRef)(null);(0,i.useEffect)((function(){return P(b)}),[P,b]),(0,i.useEffect)((function(){var e;if(x===eC.Hidden&&b.current)return S&&"visible"!==T?void R("visible"):Yk(T,(c(e={},"hidden",(function(){return I(b)})),c(e,"visible",(function(){return P(b)})),e))}),[T,b,P,I,S,x]);var j=gC({enter:AC(s),enterFrom:AC(u),enterTo:AC(d),entered:AC(h),leave:AC(v),leaveFrom:AC(g),leaveTo:AC(m)}),M=function(e){var t=(0,i.useRef)(VC(e));return(0,i.useEffect)((function(){t.current=VC(e)}),[e]),t}({beforeEnter:r,afterEnter:o,beforeLeave:a,afterLeave:l}),D=mC();(0,i.useEffect)((function(){if(D&&"visible"===T&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,T,D]);var L=C&&!k,N=!D||L||A.current===S?"idle":S?"enter":"leave",F=OC(0),z=yC((function(e){return Yk(e,{enter:function(){F.addFlag(sC.Opening),M.current.beforeEnter()},leave:function(){F.addFlag(sC.Closing),M.current.beforeLeave()},idle:function(){}})})),V=yC((function(e){return Yk(e,{enter:function(){F.removeFlag(sC.Opening),M.current.afterEnter()},leave:function(){F.removeFlag(sC.Closing),M.current.afterLeave()},idle:function(){}})})),B=NC((function(){R("hidden"),I(b)}),O);RC({container:b,classes:j,direction:N,onStart:gC((function(e){B.onStart(b,e,z)})),onStop:gC((function(e){B.onStop(b,e,V),"leave"===e&&!LC(B)&&(R("hidden"),I(b))}))}),(0,i.useEffect)((function(){L&&(x===eC.Hidden?A.current=null:A.current=S)}),[S,L,T]);var U=y,W={ref:w};return k&&S&&pC.isServer&&(U=f(f({},U),{},{className:$k.apply(void 0,[y.className].concat(yt(j.current.enter),yt(j.current.enterFrom)))})),i.createElement(DC.Provider,{value:B},i.createElement(cC,{value:Yk(T,(n={},c(n,"visible",sC.Open),c(n,"hidden",sC.Closed),n))|F.flags},tC({ourProps:W,theirProps:U,defaultTag:BC,features:UC,visible:"visible"===T,name:"Transition.Child"})))})),GC=oC((function(e,t){var n=null!==(0,i.useContext)(jC),r=null!==uC();return i.createElement(i.Fragment,null,!n&&r?i.createElement(HC,f({ref:t},e)):i.createElement(qC,f({ref:t},e)))})),QC=Object.assign(HC,{Child:GC,Root:HC}),$C=function(e){return e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e}($C||{});function YC(e){for(var t=e.parentElement,n=null;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;var r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;for(var t=e.previousElementSibling;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var KC=null!=(WC=i.useId)?WC:function(){var e=mC(),t=lt(i.useState(e?function(){return pC.nextId()}:null),2),n=t[0],r=t[1];return hC((function(){null===n&&r(pC.nextId())}),[n]),null!=n?""+n:void 0},XC=["features"],JC="div",ZC=function(e){return e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e}(ZC||{});var eE=oC((function(e,t){var n=e.features,r=void 0===n?1:n,o=p(e,XC);return tC({ourProps:{ref:t,"aria-hidden":2===(2&r)||void 0,style:f({position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},4===(4&r)&&2!==(2&r)&&{display:"none"})},theirProps:o,slot:{},defaultTag:JC,name:"Hidden"})}));function tE(e){return pC.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}var nE=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return"".concat(e,":not([tabindex='-1'])")})).join(","),rE=function(e){return e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e}(rE||{}),oE=function(e){return e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e}(oE||{}),iE=function(e){return e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e}(iE||{});function aE(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(nE)).sort((function(e,t){return Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))}))}var lE=function(e){return e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e}(lE||{});function sE(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(n=tE(e))?void 0:n.body)&&Yk(r,(c(t={},0,(function(){return e.matches(nE)})),c(t,1,(function(){for(var t=e;null!==t;){if(t.matches(nE))return!0;t=t.parentElement}return!1})),t))}function uE(e){null==e||e.focus({preventScroll:!0})}var cE=["textarea","input"].join(",");function dE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return e.slice().sort((function(e,n){var r=t(e),o=t(n);if(null===r||null===o)return 0;var i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function fE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.sorted,o=void 0===r||r,i=n.relativeTo,a=void 0===i?null:i,l=n.skipElements,s=void 0===l?[]:l,u=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,c=Array.isArray(e)?o?dE(e):e:aE(e);s.length>0&&c.length>1&&(c=c.filter((function(e){return!s.includes(e)}))),a=null!=a?a:u.activeElement;var d,f=function(){if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),p=function(){if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(a))-1;if(4&t)return Math.max(0,c.indexOf(a))+1;if(8&t)return c.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),h=32&t?{preventScroll:!0}:{},v=0,g=c.length;do{if(v>=g||v+g<=0)return 0;var m=p+v;if(16&t)m=(m+g)%g;else{if(m<0)return 3;if(m>=g)return 1}null==(d=c[m])||d.focus(h),v+=f}while(d!==u.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,cE))&&n}(d)&&d.select(),d.hasAttribute("tabindex")||d.setAttribute("tabindex","0"),2}var pE=function(e){return e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e}(pE||{});function hE(){var e=(0,i.useRef)(0);return function(e,t,n){var r=gC(t);(0,i.useEffect)((function(){function t(e){r.current(e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}("keydown",(function(t){"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}function vE(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0])||arguments[0],t=(0,i.useRef)(kE.slice());return mE((function(e,n){var r=lt(e,1)[0],o=lt(n,1)[0];!0===o&&!1===r&&_C((function(){t.current.splice(0)})),!1===o&&!0===r&&(t.current=kE.slice())}),[e,kE,t]),yC((function(){var e;return null!=(e=t.current.find((function(e){return null!=e&&e.isConnected})))?e:null}))}(t);mE((function(){t||(null==n?void 0:n.activeElement)===(null==n?void 0:n.body)&&uE(r())}),[t]);var o=(0,i.useRef)(!1);(0,i.useEffect)((function(){return o.current=!1,function(){o.current=!0,_C((function(){o.current&&uE(r())}))}}),[])}({ownerDocument:d},Boolean(16&s));var f=function(e,t){var n=e.ownerDocument,r=e.container,o=e.initialFocus,a=(0,i.useRef)(null),l=vC();return mE((function(){if(t){var e=r.current;e&&_C((function(){if(l.current){var t=null==n?void 0:n.activeElement;if(null!=o&&o.current){if((null==o?void 0:o.current)===t)return void(a.current=t)}else if(e.contains(t))return void(a.current=t);null!=o&&o.current?uE(o.current):fE(e,rE.First)===oE.Error&&console.warn("There are no focusable elements inside the "),a.current=null==n?void 0:n.activeElement}}))}}),[t]),a}({ownerDocument:d,container:n,initialFocus:o},Boolean(2&s));!function(e,t){var n=e.ownerDocument,r=e.container,o=e.containers,i=e.previousActiveElement,a=vC();gE(null==n?void 0:n.defaultView,"focus",(function(e){if(t&&a.current){var n=bE(o);r.current instanceof HTMLElement&&n.add(r.current);var l=i.current;if(l){var s=e.target;s&&s instanceof HTMLElement?EE(n,s)?(i.current=s,uE(s)):(e.preventDefault(),e.stopPropagation(),uE(l)):uE(i.current)}}}),!0)}({ownerDocument:d,container:n,containers:a,previousActiveElement:f},Boolean(8&s));var h=hE(),v=yC((function(e){var t=n.current;t&&function(){var n;Yk(h.current,(c(n={},pE.Forwards,(function(){fE(t,rE.First,{skipElements:[e.relatedTarget]})})),c(n,pE.Backwards,(function(){fE(t,rE.Last,{skipElements:[e.relatedTarget]})})),n))}()})),g=TC(),m=(0,i.useRef)(!1),y={ref:r,onKeyDown:function(e){"Tab"==e.key&&(m.current=!0,g.requestAnimationFrame((function(){m.current=!1})))},onBlur:function(e){var t,r=bE(a);n.current instanceof HTMLElement&&r.add(n.current);var o=e.relatedTarget;o instanceof HTMLElement&&"true"!==o.dataset.headlessuiFocusGuard&&(EE(r,o)||(m.current?fE(n.current,Yk(h.current,(c(t={},pE.Forwards,(function(){return rE.Next})),c(t,pE.Backwards,(function(){return rE.Previous})),t))|rE.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&uE(e.target)))}};return i.createElement(i.Fragment,null,Boolean(4&s)&&i.createElement(eE,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:ZC.Focusable}),tC({ourProps:y,theirProps:u,defaultTag:wE,name:"FocusTrap"}),Boolean(4&s)&&i.createElement(eE,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:ZC.Focusable}))})),SE=Object.assign(_E,{features:xE}),kE=[];if("undefined"!=typeof window&&"undefined"!=typeof document){var CE=function(e){e.target instanceof HTMLElement&&e.target!==document.body&&kE[0]!==e.target&&(kE.unshift(e.target),(kE=kE.filter((function(e){return null!=e&&e.isConnected}))).splice(10))};window.addEventListener("click",CE,{capture:!0}),window.addEventListener("mousedown",CE,{capture:!0}),window.addEventListener("focus",CE,{capture:!0}),document.body.addEventListener("click",CE,{capture:!0}),document.body.addEventListener("mousedown",CE,{capture:!0}),document.body.addEventListener("focus",CE,{capture:!0})}function EE(e,t){var n,r=gt(e);try{for(r.s();!(n=r.n()).done;){if(n.value.contains(t))return!0}}catch(o){r.e(o)}finally{r.f()}return!1}var TE=(0,i.createContext)(!1);function RE(e){return i.createElement(TE.Provider,{value:e.force},e.children)}var OE=["target"];function PE(e){var t=(0,i.useContext)(TE),n=(0,i.useContext)(jE),r=vE(e),o=(0,i.useState)((function(){if(!t&&null!==n||pC.isServer)return null;var e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;var o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)})),a=lt(o,2),l=a[0],s=a[1];return(0,i.useEffect)((function(){null!==l&&(null!=r&&r.body.contains(l)||null==r||r.body.appendChild(l))}),[l,r]),(0,i.useEffect)((function(){t||null!==n&&s(n.current)}),[n,s,t]),l}var IE=i.Fragment;var AE=i.Fragment,jE=(0,i.createContext)(null);var ME=oC((function(e,t){var n=e,r=(0,i.useRef)(null),o=xC(wC((function(e){r.current=e})),t),a=vE(r),l=PE(r),s=(0,i.useState)((function(){var e;return pC.isServer?null:null!=(e=null==a?void 0:a.createElement("div"))?e:null})),u=lt(s,1)[0],c=mC(),d=(0,i.useRef)(!1);return hC((function(){if(d.current=!1,l&&u)return l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u)),function(){d.current=!0,_C((function(){var e;d.current&&(!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))))}))}}),[l,u]),c&&l&&u?(0,Gw.createPortal)(tC({ourProps:{ref:o},theirProps:n,defaultTag:IE,name:"Portal"}),u):null})),DE=oC((function(e,t){var n=e.target,r=p(e,OE),o={ref:xC(t)};return i.createElement(jE.Provider,{value:n},tC({ourProps:o,theirProps:r,defaultTag:AE,name:"Popover.Group"}))})),LE=Object.assign(ME,{Group:DE}),NE=["id"],FE=(0,i.createContext)(null);function zE(){var e=(0,i.useContext)(FE);if(null===e){var t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,zE),t}return e}function VE(){var e=lt((0,i.useState)([]),2),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=yC((function(e){return n((function(t){return[].concat(yt(t),[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}})),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i.createElement(FE.Provider,{value:r},e.children)}}),[n])]}var BE="p";var UE=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-description-".concat(n):r,i=p(e,NE),a=zE(),l=xC(t);return hC((function(){return a.register(o)}),[o,a.register]),tC({ourProps:f(f({ref:l},a.props),{},{id:o}),theirProps:i,slot:a.slot||{},defaultTag:BE,name:a.name||"Description"})})),WE=Object.assign(UE,{}),HE=(0,i.createContext)((function(){}));HE.displayName="StackContext";var qE=function(e){return e[e.Add=0]="Add",e[e.Remove=1]="Remove",e}(qE||{});function GE(e){var t=e.children,n=e.onUpdate,r=e.type,o=e.element,a=e.enabled,l=(0,i.useContext)(HE),s=yC((function(){null==n||n.apply(void 0,arguments),l.apply(void 0,arguments)}));return hC((function(){var e=void 0===a||!0===a;return e&&s(0,r,o),function(){e&&s(1,r,o)}}),[s,r,o,a]),i.createElement(HE.Provider,{value:s},t)}function QE(e,t,n){var r=gC(t);(0,i.useEffect)((function(){function t(e){r.current(e)}return document.addEventListener(e,t,n),function(){return document.removeEventListener(e,t,n)}}),[e,n])}var $E="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},YE=i.useState,KE=i.useEffect,XE=i.useLayoutEffect,JE=i.useDebugValue;function ZE(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!$E(n,r)}catch(o){return!0}}"undefined"!=typeof window&&"undefined"!=typeof window.document&&window.document.createElement;var eT=function(e){return e.useSyncExternalStore}(a);function tT(){var e;return{before:function(t){var n,r=t.doc,o=r.documentElement;e=(null!=(n=r.defaultView)?n:window).innerWidth-o.clientWidth},after:function(t){var n=t.doc,r=t.d,o=n.documentElement,i=o.clientWidth-o.offsetWidth,a=e-i;r.style(o,"paddingRight","".concat(a,"px"))}}}function nT(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function rT(){return nT()?{before:function(){e=window.pageYOffset},after:function(t){var n=t.doc,r=t.d,o=t.meta;function i(e){return o.containers.flatMap((function(e){return e()})).some((function(t){return t.contains(e)}))}r.style(n.body,"marginTop","-".concat(e,"px")),window.scrollTo(0,0);var a=null;r.addEventListener(n,"click",(function(e){if(e.target instanceof HTMLElement)try{var t=e.target.closest("a");if(!t)return;var r=new URL(t.href).hash,o=n.querySelector(r);o&&!i(o)&&(a=o)}catch(l){}}),!0),r.addEventListener(n,"touchmove",(function(e){e.target instanceof HTMLElement&&!i(e.target)&&e.preventDefault()}),{passive:!1}),r.add((function(){window.scrollTo(0,window.pageYOffset+e),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)}))}}:{};var e}function oT(e){var t,n={},r=gt(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;Object.assign(n,o(n))}}catch(i){r.e(i)}finally{r.f()}return n}var iT=function(e,t){var n=e(),r=new Set;return{getSnapshot:function(){return n},subscribe:function(e){return r.add(e),function(){return r.delete(e)}},dispatch:function(e){for(var o,i=arguments.length,a=new Array(i>1?i-1:0),l=1;l0;return hC((function(){if(e&&t)return iT.dispatch("PUSH",e,n),function(){return iT.dispatch("POP",e,n)}}),[t,e]),i}iT.subscribe((function(){var e,t=iT.getSnapshot(),n=new Map,r=gt(t);try{for(r.s();!(e=r.n()).done;){var o=lt(e.value,1)[0];n.set(o,o.documentElement.style.overflow)}}catch(c){r.e(c)}finally{r.f()}var i,a=gt(t.values());try{for(a.s();!(i=a.n()).done;){var l=i.value,s="hidden"===n.get(l.doc),u=0!==l.count;(u&&!s||!u&&s)&&iT.dispatch(l.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",l),0===l.count&&iT.dispatch("TEARDOWN",l)}}catch(c){a.e(c)}finally{a.f()}}));var lT=new Map,sT=new Map;function uT(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];hC((function(){var n;if(t){var r="function"==typeof e?e():e.current;if(r){var o=null!=(n=sT.get(r))?n:0;return sT.set(r,o+1),0!==o||(lT.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(r){var t=null!=(e=sT.get(r))?e:1;if(1===t?sT.delete(r):sT.set(r,t-1),1===t){var n=lT.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,lT.delete(r))}}}}}}),[e,t])}var cT=["id","open","onClose","initialFocus","__demoMode"],dT=["id"],fT=["id"],pT=["id"],hT=["id"],vT=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(vT||{}),gT=function(e){return e[e.SetTitleId=0]="SetTitleId",e}(gT||{}),mT=c({},0,(function(e,t){return e.titleId===t.id?e:f(f({},e),{},{titleId:t.id})})),yT=(0,i.createContext)(null);function bT(e){var t=(0,i.useContext)(yT);if(null===t){var n=new Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,bT),n}return t}function wT(e,t){return Yk(t.type,mT,e,t)}yT.displayName="DialogContext";var xT="div",_T=Zk.RenderStrategy|Zk.Static;var ST="div";var kT="div";var CT="div";var ET="h2";var TT=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-dialog-".concat(n):r,a=e.open,l=e.onClose,s=e.initialFocus,u=e.__demoMode,d=void 0!==u&&u,f=p(e,cT),h=lt((0,i.useState)(0),2),v=h[0],g=h[1],m=uC();void 0===a&&null!==m&&(a=(m&sC.Open)===sC.Open);var y=(0,i.useRef)(null),b=xC(y,t),w=(0,i.useRef)(null),x=vE(y),_=e.hasOwnProperty("open")||null!==m,S=e.hasOwnProperty("onClose");if(!_&&!S)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!_)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!S)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof a)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(a));if("function"!=typeof l)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: ".concat(l));var k=a?0:1,C=lt((0,i.useReducer)(wT,{titleId:null,descriptionId:null,panelRef:(0,i.createRef)()}),2),E=C[0],T=C[1],R=yC((function(){return l(!1)})),O=yC((function(e){return T({type:0,id:e})})),P=!!mC()&&(!d&&0===k),I=v>1,A=null!==(0,i.useContext)(yT),j=I?"parent":"leaf",M=null!==m&&(m&sC.Closing)===sC.Closing,D=!A&&!M&&P,L=(0,i.useCallback)((function(){var e,t;return null!=(t=Array.from(null!=(e=null==x?void 0:x.querySelectorAll("body > *"))?e:[]).find((function(e){return"headlessui-portal-root"!==e.id&&(e.contains(w.current)&&e instanceof HTMLElement)})))?t:null}),[w]);uT(L,D);var N=!!I||P,F=(0,i.useCallback)((function(){var e,t;return null!=(t=Array.from(null!=(e=null==x?void 0:x.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((function(e){return e.contains(w.current)&&e instanceof HTMLElement})))?t:null}),[w]);uT(F,N);var z=yC((function(){var e,t;return[].concat(yt(Array.from(null!=(e=null==x?void 0:x.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))?e:[]).filter((function(e){return!(e===document.body||e===document.head||!(e instanceof HTMLElement)||e.contains(w.current)||E.panelRef.current&&e.contains(E.panelRef.current))}))),[null!=(t=E.panelRef.current)?t:y.current])}));!function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(0,i.useRef)(!1);function o(n,o){if(r.current&&!n.defaultPrevented){var i=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),a=o(n);if(null!==a&&a.getRootNode().contains(a)){var l,s=gt(i);try{for(s.s();!(l=s.n()).done;){var u=l.value;if(null!==u){var c=u instanceof HTMLElement?u:u.current;if(null!=c&&c.contains(a)||n.composed&&n.composedPath().includes(c))return}}}catch(d){s.e(d)}finally{s.f()}return!sE(a,lE.Loose)&&-1!==a.tabIndex&&n.preventDefault(),t(n,a)}}}(0,i.useEffect)((function(){requestAnimationFrame((function(){r.current=n}))}),[n]);var a=(0,i.useRef)(null);QE("mousedown",(function(e){var t,n;r.current&&(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),QE("click",(function(e){a.current&&(o(e,(function(){return a.current})),a.current=null)}),!0),QE("blur",(function(e){return o(e,(function(){return window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null}))}),!0)}((function(){return z()}),R,!(!P||I));var V=!(I||0!==k);gE(null==x?void 0:x.defaultView,"keydown",(function(e){V&&(e.defaultPrevented||e.key===$C.Escape&&(e.preventDefault(),e.stopPropagation(),R()))})),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return[document.body]};aT(e,t,(function(e){var t;return{containers:[].concat(yt(null!=(t=e.containers)?t:[]),[n])}}))}(x,!(M||0!==k||A),z),(0,i.useEffect)((function(){if(0===k&&y.current){var e=new ResizeObserver((function(e){var t,n=gt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value.target.getBoundingClientRect();0===r.x&&0===r.y&&0===r.width&&0===r.height&&R()}}catch(o){n.e(o)}finally{n.f()}}));return e.observe(y.current),function(){return e.disconnect()}}}),[k,y,R]);var B=lt(VE(),2),U=B[0],W=B[1],H=(0,i.useMemo)((function(){return[{dialogState:k,close:R,setTitleId:O},E]}),[k,E,R,O]),q=(0,i.useMemo)((function(){return{open:0===k}}),[k]),G={ref:b,id:o,role:"dialog","aria-modal":0===k||void 0,"aria-labelledby":E.titleId,"aria-describedby":U};return i.createElement(GE,{type:"Dialog",enabled:0===k,element:y,onUpdate:yC((function(e,t){var n;"Dialog"===t&&Yk(e,(c(n={},qE.Add,(function(){return g((function(e){return e+1}))})),c(n,qE.Remove,(function(){return g((function(e){return e-1}))})),n))}))},i.createElement(RE,{force:!0},i.createElement(LE,null,i.createElement(yT.Provider,{value:H},i.createElement(LE.Group,{target:y},i.createElement(RE,{force:!1},i.createElement(W,{slot:q,name:"Dialog.Description"},i.createElement(SE,{initialFocus:s,containers:z,features:P?Yk(j,{parent:SE.features.RestoreFocus,leaf:SE.features.All&~SE.features.FocusLock}):SE.features.None},tC({ourProps:G,theirProps:f,slot:q,defaultTag:xT,features:_T,visible:0===k,name:"Dialog"})))))))),i.createElement(eE,{features:ZC.Hidden,ref:w}))})),RT=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-dialog-backdrop-".concat(n):r,a=p(e,fT),l=lt(bT("Dialog.Backdrop"),2),s=l[0].dialogState,u=l[1],c=xC(t);(0,i.useEffect)((function(){if(null===u.panelRef.current)throw new Error("A component is being used, but a component is missing.")}),[u.panelRef]);var d=(0,i.useMemo)((function(){return{open:0===s}}),[s]);return i.createElement(RE,{force:!0},i.createElement(LE,null,tC({ourProps:{ref:c,id:o,"aria-hidden":!0},theirProps:a,slot:d,defaultTag:kT,name:"Dialog.Backdrop"})))})),OT=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-dialog-panel-".concat(n):r,a=p(e,pT),l=lt(bT("Dialog.Panel"),2),s=l[0].dialogState,u=xC(t,l[1].panelRef),c=(0,i.useMemo)((function(){return{open:0===s}}),[s]);return tC({ourProps:{ref:u,id:o,onClick:yC((function(e){e.stopPropagation()}))},theirProps:a,slot:c,defaultTag:CT,name:"Dialog.Panel"})})),PT=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-dialog-overlay-".concat(n):r,a=p(e,dT),l=lt(bT("Dialog.Overlay"),1)[0],s=l.dialogState,u=l.close;return tC({ourProps:{ref:xC(t),id:o,"aria-hidden":!0,onClick:yC((function(e){if(e.target===e.currentTarget){if(YC(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),u()}}))},theirProps:a,slot:(0,i.useMemo)((function(){return{open:0===s}}),[s]),defaultTag:ST,name:"Dialog.Overlay"})})),IT=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-dialog-title-".concat(n):r,a=p(e,hT),l=lt(bT("Dialog.Title"),1)[0],s=l.dialogState,u=l.setTitleId,c=xC(t);(0,i.useEffect)((function(){return u(o),function(){return u(null)}}),[o,u]);var d=(0,i.useMemo)((function(){return{open:0===s}}),[s]);return tC({ourProps:{ref:c,id:o},theirProps:a,slot:d,defaultTag:ET,name:"Dialog.Title"})})),AT=Object.assign(TT,{Backdrop:RT,Panel:OT,Overlay:PT,Title:IT,Description:WE}),jT=n(1242),MT=n(4350),DT=n(7995),LT=n(2297),NT=n(7907),FT=n(1423),zT=n.p+"static/media/eldrich.a80c74e8249d2461e174.png",VT=function(e){return e.Current="CURRENT",e.Upcoming="UPCOMING",e.Complete="COMPLETE",e}({}),BT=function(e){return e.quests="Quest history",e.documentation="Documentation",e.results="Quest outputs",e.createQuest="Create new quest",e}({}),UT=function(e){return e.Windows="Windows",e.Linux="Linux",e.MacOS="MacOS",e.BSD="BSD",e.Unknown="Unknown",e}({}),WT=function(e){return e[e.TaskRowLimit=8]="TaskRowLimit",e}({});function HT(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qT(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var GT=/\r\n|[\n\r]/g;function QT(e,t){var n,r=0,o=1,i=gt(e.body.matchAll(GT));try{for(i.s();!(n=i.n()).done;){var a=n.value;if("number"===typeof a.index||qT(!1),a.index>=t)break;r=a.index+a[0].length,o+=1}}catch(l){i.e(l)}finally{i.f()}return{line:o,column:t+1-r}}function $T(e){return YT(e.source,QT(e.source,e.start))}function YT(e,t){var n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,i=e.locationOffset.line-1,a=t.line+i,l=1===t.line?n:0,s=t.column+l,u="".concat(e.name,":").concat(a,":").concat(s,"\n"),c=r.split(/\r\n|[\n\r]/g),d=c[o];if(d.length>120){for(var f=Math.floor(s/80),p=s%80,h=[],v=0;v1?l-1:0),u=1;u0&&(e.extensions=this.extensions),e}}]),r}(bi(Error),Symbol.toStringTag);function JT(e){return void 0===e||0===e.length?void 0:e}function ZT(e,t,n){return new XT("Syntax Error: ".concat(n),{source:e,positions:[t]})}var eR,tR,nR,rR,oR=function(e){function t(e,n,r){fi(this,t),this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}return di(t,[{key:Symbol.toStringTag,get:function(){return"Location"}},{key:"toJSON",value:function(){return{start:this.start,end:this.end}}}]),t}(),iR=function(e){function t(e,n,r,o,i,a){fi(this,t),this.kind=e,this.start=n,this.end=r,this.line=o,this.column=i,this.value=a,this.prev=null,this.next=null}return di(t,[{key:Symbol.toStringTag,get:function(){return"Token"}},{key:"toJSON",value:function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}]),t}(),aR={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},lR=new Set(Object.keys(aR));function sR(e){var t=null===e||void 0===e?void 0:e.kind;return"string"===typeof t&&lR.has(t)}function uR(e){return 9===e||32===e}function cR(e){return e>=48&&e<=57}function dR(e){return e>=97&&e<=122||e>=65&&e<=90}function fR(e){return dR(e)||95===e}function pR(e){return dR(e)||cR(e)||95===e}function hR(e){for(var t,n=Number.MAX_SAFE_INTEGER,r=null,o=-1,i=0;i",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(rR||(rR={}));var gR=function(e){function t(e){fi(this,t);var n=new iR(rR.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}return di(t,[{key:Symbol.toStringTag,get:function(){return"Lexer"}},{key:"advance",value:function(){return this.lastToken=this.token,this.token=this.lookahead()}},{key:"lookahead",value:function(){var e=this.token;if(e.kind!==rR.EOF)do{if(e.next)e=e.next;else{var t=SR(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===rR.COMMENT);return e}}]),t}();function mR(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function yR(e,t){return bR(e.charCodeAt(t))&&wR(e.charCodeAt(t+1))}function bR(e){return e>=55296&&e<=56319}function wR(e){return e>=56320&&e<=57343}function xR(e,t){var n=e.source.body.codePointAt(t);if(void 0===n)return rR.EOF;if(n>=32&&n<=126){var r=String.fromCodePoint(n);return'"'===r?"'\"'":'"'.concat(r,'"')}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function _R(e,t,n,r,o){var i=e.line,a=1+n-e.lineStart;return new iR(t,n,r,i,a,o)}function SR(e,t){for(var n=e.source.body,r=n.length,o=t;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function AR(e,t){var n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw ZT(e.source,t,'Invalid character escape sequence: "'.concat(n.slice(t,t+2),'".'))}function jR(e,t){for(var n=e.source.body,r=n.length,o=e.lineStart,i=t+3,a=i,l="",s=[];i1&&void 0!==arguments[1]?arguments[1]:{};fi(this,e);var r=function(e){return Px(e,Ix)}(t)?t:new Ix(t);this._lexer=new gR(r),this._options=n,this._tokenCounter=0}return di(e,[{key:"parseName",value:function(){var e=this.expectToken(rR.NAME);return this.node(e,{kind:nR.NAME,value:e.value})}},{key:"parseDocument",value:function(){return this.node(this._lexer.token,{kind:nR.DOCUMENT,definitions:this.many(rR.SOF,this.parseDefinition,rR.EOF)})}},{key:"parseDefinition",value:function(){if(this.peek(rR.BRACE_L))return this.parseOperationDefinition();var e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===rR.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ZT(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}},{key:"parseOperationDefinition",value:function(){var e=this._lexer.token;if(this.peek(rR.BRACE_L))return this.node(e,{kind:nR.OPERATION_DEFINITION,operation:eR.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});var t,n=this.parseOperationType();return this.peek(rR.NAME)&&(t=this.parseName()),this.node(e,{kind:nR.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseOperationType",value:function(){var e=this.expectToken(rR.NAME);switch(e.value){case"query":return eR.QUERY;case"mutation":return eR.MUTATION;case"subscription":return eR.SUBSCRIPTION}throw this.unexpected(e)}},{key:"parseVariableDefinitions",value:function(){return this.optionalMany(rR.PAREN_L,this.parseVariableDefinition,rR.PAREN_R)}},{key:"parseVariableDefinition",value:function(){return this.node(this._lexer.token,{kind:nR.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(rR.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(rR.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}},{key:"parseVariable",value:function(){var e=this._lexer.token;return this.expectToken(rR.DOLLAR),this.node(e,{kind:nR.VARIABLE,name:this.parseName()})}},{key:"parseSelectionSet",value:function(){return this.node(this._lexer.token,{kind:nR.SELECTION_SET,selections:this.many(rR.BRACE_L,this.parseSelection,rR.BRACE_R)})}},{key:"parseSelection",value:function(){return this.peek(rR.SPREAD)?this.parseFragment():this.parseField()}},{key:"parseField",value:function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(rR.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:nR.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(rR.BRACE_L)?this.parseSelectionSet():void 0})}},{key:"parseArguments",value:function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(rR.PAREN_L,t,rR.PAREN_R)}},{key:"parseArgument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._lexer.token,n=this.parseName();return this.expectToken(rR.COLON),this.node(t,{kind:nR.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}},{key:"parseConstArgument",value:function(){return this.parseArgument(!0)}},{key:"parseFragment",value:function(){var e=this._lexer.token;this.expectToken(rR.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(rR.NAME)?this.node(e,{kind:nR.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:nR.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentDefinition",value:function(){var e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:nR.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:nR.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentName",value:function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}},{key:"parseValueLiteral",value:function(e){var t=this._lexer.token;switch(t.kind){case rR.BRACKET_L:return this.parseList(e);case rR.BRACE_L:return this.parseObject(e);case rR.INT:return this.advanceLexer(),this.node(t,{kind:nR.INT,value:t.value});case rR.FLOAT:return this.advanceLexer(),this.node(t,{kind:nR.FLOAT,value:t.value});case rR.STRING:case rR.BLOCK_STRING:return this.parseStringLiteral();case rR.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:nR.BOOLEAN,value:!0});case"false":return this.node(t,{kind:nR.BOOLEAN,value:!1});case"null":return this.node(t,{kind:nR.NULL});default:return this.node(t,{kind:nR.ENUM,value:t.value})}case rR.DOLLAR:if(e){if(this.expectToken(rR.DOLLAR),this._lexer.token.kind===rR.NAME){var n=this._lexer.token.value;throw ZT(this._lexer.source,t.start,'Unexpected variable "$'.concat(n,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}},{key:"parseConstValueLiteral",value:function(){return this.parseValueLiteral(!0)}},{key:"parseStringLiteral",value:function(){var e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:nR.STRING,value:e.value,block:e.kind===rR.BLOCK_STRING})}},{key:"parseList",value:function(e){var t=this;return this.node(this._lexer.token,{kind:nR.LIST,values:this.any(rR.BRACKET_L,(function(){return t.parseValueLiteral(e)}),rR.BRACKET_R)})}},{key:"parseObject",value:function(e){var t=this;return this.node(this._lexer.token,{kind:nR.OBJECT,fields:this.any(rR.BRACE_L,(function(){return t.parseObjectField(e)}),rR.BRACE_R)})}},{key:"parseObjectField",value:function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(rR.COLON),this.node(t,{kind:nR.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}},{key:"parseDirectives",value:function(e){for(var t=[];this.peek(rR.AT);)t.push(this.parseDirective(e));return t}},{key:"parseConstDirectives",value:function(){return this.parseDirectives(!0)}},{key:"parseDirective",value:function(e){var t=this._lexer.token;return this.expectToken(rR.AT),this.node(t,{kind:nR.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}},{key:"parseTypeReference",value:function(){var e,t=this._lexer.token;if(this.expectOptionalToken(rR.BRACKET_L)){var n=this.parseTypeReference();this.expectToken(rR.BRACKET_R),e=this.node(t,{kind:nR.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(rR.BANG)?this.node(t,{kind:nR.NON_NULL_TYPE,type:e}):e}},{key:"parseNamedType",value:function(){return this.node(this._lexer.token,{kind:nR.NAMED_TYPE,name:this.parseName()})}},{key:"peekDescription",value:function(){return this.peek(rR.STRING)||this.peek(rR.BLOCK_STRING)}},{key:"parseDescription",value:function(){if(this.peekDescription())return this.parseStringLiteral()}},{key:"parseSchemaDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseConstDirectives(),r=this.many(rR.BRACE_L,this.parseOperationTypeDefinition,rR.BRACE_R);return this.node(e,{kind:nR.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}},{key:"parseOperationTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(rR.COLON);var n=this.parseNamedType();return this.node(e,{kind:nR.OPERATION_TYPE_DEFINITION,operation:t,type:n})}},{key:"parseScalarTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:nR.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}},{key:"parseObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:nR.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}},{key:"parseImplementsInterfaces",value:function(){return this.expectOptionalKeyword("implements")?this.delimitedMany(rR.AMP,this.parseNamedType):[]}},{key:"parseFieldsDefinition",value:function(){return this.optionalMany(rR.BRACE_L,this.parseFieldDefinition,rR.BRACE_R)}},{key:"parseFieldDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(rR.COLON);var o=this.parseTypeReference(),i=this.parseConstDirectives();return this.node(e,{kind:nR.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:i})}},{key:"parseArgumentDefs",value:function(){return this.optionalMany(rR.PAREN_L,this.parseInputValueDef,rR.PAREN_R)}},{key:"parseInputValueDef",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(rR.COLON);var r,o=this.parseTypeReference();this.expectOptionalToken(rR.EQUALS)&&(r=this.parseConstValueLiteral());var i=this.parseConstDirectives();return this.node(e,{kind:nR.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:i})}},{key:"parseInterfaceTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:nR.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}},{key:"parseUnionTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:nR.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o})}},{key:"parseUnionMemberTypes",value:function(){return this.expectOptionalToken(rR.EQUALS)?this.delimitedMany(rR.PIPE,this.parseNamedType):[]}},{key:"parseEnumTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:nR.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o})}},{key:"parseEnumValuesDefinition",value:function(){return this.optionalMany(rR.BRACE_L,this.parseEnumValueDefinition,rR.BRACE_R)}},{key:"parseEnumValueDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:nR.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}},{key:"parseEnumValueName",value:function(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw ZT(this._lexer.source,this._lexer.token.start,"".concat(LR(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}},{key:"parseInputObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:nR.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o})}},{key:"parseInputFieldsDefinition",value:function(){return this.optionalMany(rR.BRACE_L,this.parseInputValueDef,rR.BRACE_R)}},{key:"parseTypeSystemExtension",value:function(){var e=this._lexer.lookahead();if(e.kind===rR.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}},{key:"parseSchemaExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseConstDirectives(),n=this.optionalMany(rR.BRACE_L,this.parseOperationTypeDefinition,rR.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:nR.SCHEMA_EXTENSION,directives:t,operationTypes:n})}},{key:"parseScalarTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:nR.SCALAR_TYPE_EXTENSION,name:t,directives:n})}},{key:"parseObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:nR.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}},{key:"parseInterfaceTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:nR.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}},{key:"parseUnionTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:nR.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}},{key:"parseEnumTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:nR.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}},{key:"parseInputObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:nR.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}},{key:"parseDirectiveDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(rR.AT);var n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return this.node(e,{kind:nR.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:i})}},{key:"parseDirectiveLocations",value:function(){return this.delimitedMany(rR.PIPE,this.parseDirectiveLocation)}},{key:"parseDirectiveLocation",value:function(){var e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(tR,t.value))return t;throw this.unexpected(e)}},{key:"node",value:function(e,t){return!0!==this._options.noLocation&&(t.loc=new oR(e,this._lexer.lastToken,this._lexer.source)),t}},{key:"peek",value:function(e){return this._lexer.token.kind===e}},{key:"expectToken",value:function(e){var t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw ZT(this._lexer.source,t.start,"Expected ".concat(NR(e),", found ").concat(LR(t),"."))}},{key:"expectOptionalToken",value:function(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}},{key:"expectKeyword",value:function(e){var t=this._lexer.token;if(t.kind!==rR.NAME||t.value!==e)throw ZT(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(LR(t),"."));this.advanceLexer()}},{key:"expectOptionalKeyword",value:function(e){var t=this._lexer.token;return t.kind===rR.NAME&&t.value===e&&(this.advanceLexer(),!0)}},{key:"unexpected",value:function(e){var t=null!==e&&void 0!==e?e:this._lexer.token;return ZT(this._lexer.source,t.start,"Unexpected ".concat(LR(t),"."))}},{key:"any",value:function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r}},{key:"optionalMany",value:function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]}},{key:"many",value:function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}},{key:"delimitedMany",value:function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}},{key:"advanceLexer",value:function(){var e=this._options.maxTokens,t=this._lexer.advance();if(void 0!==e&&t.kind!==rR.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw ZT(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}}]),e}();function LR(e){var t=e.value;return NR(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function NR(e){return function(e){return e===rR.BANG||e===rR.DOLLAR||e===rR.AMP||e===rR.PAREN_L||e===rR.PAREN_R||e===rR.SPREAD||e===rR.COLON||e===rR.EQUALS||e===rR.AT||e===rR.BRACKET_L||e===rR.BRACKET_R||e===rR.BRACE_L||e===rR.PIPE||e===rR.BRACE_R}(e)?'"'.concat(e,'"'):e}var FR=new Map,zR=new Map,VR=!0,BR=!1;function UR(e){return e.replace(/[\s,]+/g," ").trim()}function WR(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,o=UR((a=e.loc).source.body.substring(a.start,a.end)),i=zR.get(r);i&&!i.has(o)?VR&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):i||zR.set(r,i=new Set),i.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var a})),Ad(Ad({},e),{definitions:n})}function HR(e){var t=UR(e);if(!FR.has(t)){var n=function(e,t){return new DR(e,t).parseDocument()}(e,{experimentalFragmentVariables:BR,allowLegacyFragmentVariables:BR});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");FR.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"===typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(WR(n)))}return FR.get(t)}function qR(e){for(var t=[],n=1;n1?"s":"")+" required, but only "+t.length+" present")}function CO(e){kO(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===s(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function EO(e,t){kO(2,arguments);var n=CO(e),r=CO(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function TO(e){kO(1,arguments);var t=CO(e);return function(e){kO(1,arguments);var t=CO(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){kO(1,arguments);var t=CO(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()}function RO(e,t){kO(2,arguments);var n,r=CO(e),o=CO(t),i=EO(r,o),a=Math.abs(function(e,t){kO(2,arguments);var n=CO(e),r=CO(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,o));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var l=EO(r,o)===-i;TO(CO(e))&&1===a&&1===EO(e,o)&&(l=!1),n=i*(a-Number(l))}return 0===n?0:n}var OO={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},PO="trunc";function IO(e,t,n){kO(2,arguments);var r,o=function(e,t){return kO(2,arguments),CO(e).getTime()-CO(t).getTime()}(e,t)/1e3;return((r=null===n||void 0===n?void 0:n.roundingMethod)?OO[r]:OO[PO])(o)}var AO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jO=function(e,t,n){var r,o=AO[e];return r="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function MO(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var DO={date:MO({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:MO({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:MO({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},LO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},NO=function(e,t,n,r){return LO[e]};function FO(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!==n&&void 0!==n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var zO={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:FO({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:FO({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:FO({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:FO({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:FO({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},VO=zO;function BO(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,l=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(UO.matchPattern);if(!n)return null;var r=n[0],o=e.match(UO.parsePattern);if(!o)return null;var i=UO.valueCallback?UO.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:BO({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:BO({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:BO({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:BO({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:BO({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},HO={code:"en-US",formatDistance:jO,formatLong:DO,formatRelative:NO,localize:VO,match:WO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qO(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function GO(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var QO=1440,$O=2520,YO=43200,KO=86400;function XO(e,t,n){var r,o;kO(2,arguments);var i=SO(),a=null!==(r=null!==(o=null===n||void 0===n?void 0:n.locale)&&void 0!==o?o:i.locale)&&void 0!==r?r:HO;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=EO(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var s,u,c=qO(qO({},n),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:l});l>0?(s=CO(t),u=CO(e)):(s=CO(e),u=CO(t));var d,f=IO(u,s),p=(GO(u)-GO(s))/1e3,h=Math.round((f-p)/60);if(h<2)return null!==n&&void 0!==n&&n.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,c):f<10?a.formatDistance("lessThanXSeconds",10,c):f<20?a.formatDistance("lessThanXSeconds",20,c):f<40?a.formatDistance("halfAMinute",0,c):f<60?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",1,c):0===h?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",h,c);if(h<45)return a.formatDistance("xMinutes",h,c);if(h<90)return a.formatDistance("aboutXHours",1,c);if(h0&&e(a,o-1)}(s,a-1),l.reverse();return function e(t){return t.filter((function(e){return e.column.getIsVisible()})).map((function(t){var n=0,r=0,o=[0];return t.subHeaders&&t.subHeaders.length?(o=[],e(t.subHeaders).forEach((function(e){var t=e.colSpan,r=e.rowSpan;n+=t,o.push(r)}))):n=1,r+=Math.min.apply(Math,yt(o)),t.colSpan=n,t.rowSpan=r,{colSpan:n,rowSpan:r}}))}(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}var aP={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},lP={getDefaultColumnDef:function(){return aP},getInitialState:function(e){return f({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}},e)},getDefaultOptions:function(e){return{columnResizeMode:"onEnd",onColumnSizingChange:ZO("columnSizing",e),onColumnSizingInfoChange:ZO("columnSizingInfo",e)}},createColumn:function(e,t){return{getSize:function(){var n,r,o,i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:aP.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:aP.size),null!=(o=e.columnDef.maxSize)?o:aP.maxSize)},getStart:function(n){var r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex((function(t){return t.id===e.id}));if(o>0){var i=r[o-1];return i.getStart(n)+i.getSize()}return 0},resetSize:function(){t.setColumnSizing((function(t){var n=e.id;t[n];return p(t,[n].map(u))}))},getCanResize:function(){var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},getIsResizing:function(){return t.getState().columnSizingInfo.isResizingColumn===e.id}}},createHeader:function(e,t){return{getSize:function(){var t=0;return function e(n){var r;n.subHeaders.length?n.subHeaders.forEach(e):t+=null!=(r=n.column.getSize())?r:0}(e),t},getStart:function(){if(e.index>0){var t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:function(){var n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return function(o){if(n&&r&&(null==o.persist||o.persist(),!(uP(o)&&o.touches&&o.touches.length>1))){var i=e.getSize(),a=e?e.getLeafHeaders().map((function(e){return[e.column.id,e.column.getSize()]})):[[n.id,n.getSize()]],l=uP(o)?Math.round(o.touches[0].clientX):o.clientX,s={},u=function(e,n){"number"===typeof n&&(t.setColumnSizingInfo((function(e){var t,r,o=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(o/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((function(e){var t=lt(e,2),n=t[0],r=t[1];s[n]=Math.round(100*Math.max(r+r*i,0))/100})),f(f({},e),{},{deltaOffset:o,deltaPercentage:i})})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((function(e){return f(f({},e),s)})))},c=function(e){return u("move",e)},d=function(e){u("end",e),t.setColumnSizingInfo((function(e){return f(f({},e),{},{isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})}))},p={moveHandler:function(e){return c(e.clientX)},upHandler:function(e){document.removeEventListener("mousemove",p.moveHandler),document.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},h={moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1},upHandler:function(e){var t;document.removeEventListener("touchmove",h.moveHandler),document.removeEventListener("touchend",h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},v=!!function(){if("boolean"===typeof sP)return sP;var e=!1;try{var t={get passive(){return e=!0,!1}},n=function(){};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(r){e=!1}return sP=e}()&&{passive:!1};uP(o)?(document.addEventListener("touchmove",h.moveHandler,v),document.addEventListener("touchend",h.upHandler,v)):(document.addEventListener("mousemove",p.moveHandler,v),document.addEventListener("mouseup",p.upHandler,v)),t.setColumnSizingInfo((function(e){return f(f({},e),{},{startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id})}))}}}}},createTable:function(e){return{setColumnSizing:function(t){return null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t)},setColumnSizingInfo:function(t){return null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t)},resetColumnSizing:function(t){var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:function(t){var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:function(){var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getLeftTotalSize:function(){var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getCenterTotalSize:function(){var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getRightTotalSize:function(){var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0}}}},sP=null;function uP(e){return"touchstart"===e.type}var cP={getInitialState:function(e){return f({expanded:{}},e)},getDefaultOptions:function(e){return{onExpandedChange:ZO("expanded",e),paginateExpandedRows:!0}},createTable:function(e){var t=!1,n=!1;return{_autoResetExpanded:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((function(){e.resetExpanded(),n=!1}))}}else e._queue((function(){t=!0}))},setExpanded:function(t){return null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t)},toggleAllRowsExpanded:function(t){(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:function(t){var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},getCanSomeRowsExpand:function(){return e.getPrePaginationRowModel().flatRows.some((function(e){return e.getCanExpand()}))},getToggleAllRowsExpandedHandler:function(){return function(t){null==t.persist||t.persist(),e.toggleAllRowsExpanded()}},getIsSomeRowsExpanded:function(){var t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:function(){var t=e.getState().expanded;return"boolean"===typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((function(e){return!e.getIsExpanded()}))},getExpandedDepth:function(){var t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:function(){return e.getSortedRowModel()},getExpandedRowModel:function(){return!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel()}}},createRow:function(e,t){return{toggleExpanded:function(n){t.setExpanded((function(r){var o,i=!0===r||!(null==r||!r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((function(e){a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return f(f({},a),{},c({},e.id,!0));if(i&&!n){var l=a,s=e.id;l[s];return p(l,[s].map(u))}return r}))},getIsExpanded:function(){var n,r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},getCanExpand:function(){var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:function(){var t=e.getCanExpand();return function(){t&&e.toggleExpanded()}}}}},dP=function(e,t,n){var r,o,i,a=n.toLowerCase();return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())||null==(i=o.toLowerCase())?void 0:i.includes(a))};dP.autoRemove=function(e){return xP(e)};var fP=function(e,t,n){var r,o;return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.includes(n))};fP.autoRemove=function(e){return xP(e)};var pP=function(e,t,n){var r,o;return(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};pP.autoRemove=function(e){return xP(e)};var hP=function(e,t,n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};hP.autoRemove=function(e){return xP(e)||!(null!=e&&e.length)};var vP=function(e,t,n){return!n.some((function(n){var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}))};vP.autoRemove=function(e){return xP(e)||!(null!=e&&e.length)};var gP=function(e,t,n){return n.some((function(n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}))};gP.autoRemove=function(e){return xP(e)||!(null!=e&&e.length)};var mP=function(e,t,n){return e.getValue(t)===n};mP.autoRemove=function(e){return xP(e)};var yP=function(e,t,n){return e.getValue(t)==n};yP.autoRemove=function(e){return xP(e)};var bP=function(e,t,n){var r=lt(n,2),o=r[0],i=r[1],a=e.getValue(t);return a>=o&&a<=i};bP.resolveFilterValue=function(e){var t=lt(e,2),n=t[0],r=t[1],o="number"!==typeof n?parseFloat(n):n,i="number"!==typeof r?parseFloat(r):r,a=null===n||Number.isNaN(o)?-1/0:o,l=null===r||Number.isNaN(i)?1/0:i;if(a>l){var s=a;a=l,l=s}return[a,l]},bP.autoRemove=function(e){return xP(e)||xP(e[0])&&xP(e[1])};var wP={includesString:dP,includesStringSensitive:fP,equalsString:pP,arrIncludes:hP,arrIncludesAll:vP,arrIncludesSome:gP,equals:mP,weakEquals:yP,inNumberRange:bP};function xP(e){return void 0===e||null===e||""===e}var _P={getDefaultColumnDef:function(){return{filterFn:"auto"}},getInitialState:function(e){return f({columnFilters:[],globalFilter:void 0},e)},getDefaultOptions:function(e){return{onColumnFiltersChange:ZO("columnFilters",e),onGlobalFilterChange:ZO("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:function(t){var n,r,o=null==(n=e.getCoreRowModel().flatRows[0])||null==(r=n._getAllCellsByColumnId()[t.id])?void 0:r.getValue();return"string"===typeof o||"number"===typeof o}}},createColumn:function(e,t){return{getAutoFilterFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"===typeof r?wP.includesString:"number"===typeof r?wP.inNumberRange:"boolean"===typeof r||null!==r&&"object"===typeof r?wP.equals:Array.isArray(r)?wP.arrIncludes:wP.weakEquals},getFilterFn:function(){var n,r;return eP(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:wP[e.columnDef.filterFn]},getCanFilter:function(){var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:function(){var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:function(){return e.getFilterIndex()>-1},getFilterValue:function(){var n,r;return null==(n=t.getState().columnFilters)||null==(r=n.find((function(t){return t.id===e.id})))?void 0:r.value},getFilterIndex:function(){var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},setFilterValue:function(n){t.setColumnFilters((function(t){var r,o=e.getFilterFn(),i=null==t?void 0:t.find((function(t){return t.id===e.id})),a=JO(n,i?i.value:void 0);if(SP(o,a,e))return null!=(r=null==t?void 0:t.filter((function(t){return t.id!==e.id})))?r:[];var l,s={id:e.id,value:a};return i?null!=(l=null==t?void 0:t.map((function(t){return t.id===e.id?s:t})))?l:[]:null!=t&&t.length?[].concat(yt(t),[s]):[s]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:function(){return e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel()},_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:function(){return e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map},_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:function(){if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},createRow:function(e,t){return{columnFilters:{},columnFiltersMeta:{}}},createTable:function(e){return{getGlobalAutoFilterFn:function(){return wP.includesString},getGlobalFilterFn:function(){var t,n,r=e.options.globalFilterFn;return eP(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:wP[r]},setColumnFilters:function(t){var n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((function(e){var r;return null==(r=JO(t,e))?void 0:r.filter((function(e){var t=n.find((function(t){return t.id===e.id}));if(t&&SP(t.getFilterFn(),e.value,t))return!1;return!0}))}))},setGlobalFilter:function(t){null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:function(t){e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:function(t){var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},getPreFilteredRowModel:function(){return e.getCoreRowModel()},getFilteredRowModel:function(){return!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()},_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:function(){return e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:function(){return e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map},_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:function(){if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}}};function SP(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||"undefined"===typeof t||"string"===typeof t&&!t}var kP={sum:function(e,t,n){return n.reduce((function(t,n){var r=n.getValue(e);return t+("number"===typeof r?r:0)}),0)},min:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:function(e,t,n){var r,o;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o=o&&(++n,r+=o)})),n)return r/n},median:function(e,t){if(t.length){var n=t.map((function(t){return t.getValue(e)}));if(function(e){return Array.isArray(e)&&e.every((function(e){return"number"===typeof e}))}(n)){if(1===n.length)return n[0];var r=Math.floor(n.length/2),o=n.sort((function(e,t){return e-t}));return n.length%2!==0?o[r]:(o[r-1]+o[r])/2}}},unique:function(e,t){return Array.from(new Set(t.map((function(t){return t.getValue(e)}))).values())},uniqueCount:function(e,t){return new Set(t.map((function(t){return t.getValue(e)}))).size},count:function(e,t){return t.length}},CP={getDefaultColumnDef:function(){return{aggregatedCell:function(e){var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}},getInitialState:function(e){return f({grouping:[]},e)},getDefaultOptions:function(e){return{onGroupingChange:ZO("grouping",e),groupedColumnMode:"reorder"}},createColumn:function(e,t){return{toggleGrouping:function(){t.setGrouping((function(t){return null!=t&&t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(yt(null!=t?t:[]),[e.id])}))},getCanGroup:function(){var n,r,o,i;return null!=(n=null==(r=null!=(o=null==(i=e.columnDef.enableGrouping)||i)?o:t.options.enableGrouping)||r)?n:!!e.accessorFn},getIsGrouped:function(){var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:function(){var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:function(){var t=e.getCanGroup();return function(){t&&e.toggleGrouping()}},getAutoAggregationFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"===typeof r?kP.sum:"[object Date]"===Object.prototype.toString.call(r)?kP.extent:void 0},getAggregationFn:function(){var n,r;if(!e)throw new Error;return eP(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:kP[e.columnDef.aggregationFn]}}},createTable:function(e){return{setGrouping:function(t){return null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t)},resetGrouping:function(t){var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},getPreGroupedRowModel:function(){return e.getFilteredRowModel()},getGroupedRowModel:function(){return!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel()}}},createRow:function(e,t){return{getIsGrouped:function(){return!!e.groupingColumnId},getGroupingValue:function(n){if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];var r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},_groupingValuesCache:{}}},createCell:function(e,t,n,r){return{getIsGrouped:function(){return t.getIsGrouped()&&t.id===n.groupingColumnId},getIsPlaceholder:function(){return!e.getIsGrouped()&&t.getIsGrouped()},getIsAggregated:function(){var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}}};var EP={getInitialState:function(e){return f({columnOrder:[]},e)},getDefaultOptions:function(e){return{onColumnOrderChange:ZO("columnOrder",e)}},createTable:function(e){return{setColumnOrder:function(t){return null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t)},resetColumnOrder:function(t){var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:nP((function(){return[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]}),(function(e,t,n){return function(r){var o=[];if(null!=e&&e.length){for(var i=yt(e),a=yt(r),l=function(){var e=i.shift(),t=a.findIndex((function(t){return t.id===e}));t>-1&&o.push(a.splice(t,1)[0])};a.length&&i.length;)l();o=[].concat(yt(o),yt(a))}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;var r=e.filter((function(e){return!t.includes(e.id)}));if("remove"===n)return r;var o=t.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean);return[].concat(yt(o),yt(r))}(o,t,n)}}),{key:!1})}}},TP={getInitialState:function(e){return f(f({},e),{},{pagination:f(f({},{pageIndex:0,pageSize:10}),null==e?void 0:e.pagination)})},getDefaultOptions:function(e){return{onPaginationChange:ZO("pagination",e)}},createTable:function(e){var t=!1,n=!1;return{_autoResetPageIndex:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((function(){e.resetPageIndex(),n=!1}))}}else e._queue((function(){t=!0}))},setPagination:function(t){return null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((function(e){return JO(t,e)}))},resetPagination:function(t){var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:function(t){e.setPagination((function(n){var r=JO(t,n.pageIndex),o="undefined"===typeof e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),f(f({},n),{},{pageIndex:r})}))},resetPageIndex:function(t){var n,r,o;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:function(t){var n,r,o;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageSize)?n:10)},setPageSize:function(t){e.setPagination((function(e){var n=Math.max(1,JO(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return f(f({},e),{},{pageIndex:o,pageSize:n})}))},setPageCount:function(t){return e.setPagination((function(n){var r,o=JO(t,null!=(r=e.options.pageCount)?r:-1);return"number"===typeof o&&(o=Math.max(-1,o)),f(f({},n),{},{pageCount:o})}))},getPageOptions:nP((function(){return[e.getPageCount()]}),(function(e){var t=[];return e&&e>0&&(t=yt(new Array(e)).fill(null).map((function(e,t){return t}))),t}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:function(){return e.getState().pagination.pageIndex>0},getCanNextPage:function(){var t=e.getState().pagination.pageIndex,n=e.getPageCount();return-1===n||0!==n&&t0&&nt?1:-1}function LP(e){return"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"===typeof e?e:""}function NP(e,t){for(var n=e.split(MP).filter(Boolean),r=t.split(MP).filter(Boolean);n.length&&r.length;){var o=n.shift(),i=r.shift(),a=parseInt(o,10),l=parseInt(i,10),s=[a,l].sort();if(isNaN(s[0])){if(o>i)return 1;if(i>o)return-1}else{if(isNaN(s[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}}return n.length-r.length}var FP={alphanumeric:function(e,t,n){return NP(LP(e.getValue(n)).toLowerCase(),LP(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return NP(LP(e.getValue(n)),LP(t.getValue(n)))},text:function(e,t,n){return DP(LP(e.getValue(n)).toLowerCase(),LP(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return DP(LP(e.getValue(n)),LP(t.getValue(n)))},datetime:function(e,t,n){var r=e.getValue(n),o=t.getValue(n);return r>o?1:r1))return FP.alphanumeric}}catch(l){o.e(l)}finally{o.f()}return r?FP.text:FP.basic},getAutoSortDir:function(){var n=t.getFilteredRowModel().flatRows[0];return"string"===typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:function(){var n,r;if(!e)throw new Error;return eP(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:FP[e.columnDef.sortingFn]},toggleSorting:function(n,r){var o=e.getNextSortingOrder(),i="undefined"!==typeof n&&null!==n;t.setSorting((function(a){var l,s,u=null==a?void 0:a.find((function(t){return t.id===e.id})),c=null==a?void 0:a.findIndex((function(t){return t.id===e.id})),d=[],p=i?n:"desc"===o;("toggle"===(l=null!=a&&a.length&&e.getCanMultiSort()&&r?u?"toggle":"add":null!=a&&a.length&&c!==a.length-1?"replace":u?"toggle":"replace")&&(i||o||(l="remove")),"add"===l)?(d=[].concat(yt(a),[{id:e.id,desc:p}])).splice(0,d.length-(null!=(s=t.options.maxMultiSortColCount)?s:Number.MAX_SAFE_INTEGER)):d="toggle"===l?a.map((function(t){return t.id===e.id?f(f({},t),{},{desc:p}):t})):"remove"===l?a.filter((function(t){return t.id!==e.id})):[{id:e.id,desc:p}];return d}))},getFirstSortDir:function(){var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},getNextSortingOrder:function(n){var r,o,i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},getCanSort:function(){var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},getCanMultiSort:function(){var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:function(){var n,r=null==(n=t.getState().sorting)?void 0:n.find((function(t){return t.id===e.id}));return!!r&&(r.desc?"desc":"asc")},getSortIndex:function(){var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},clearSorting:function(){t.setSorting((function(t){return null!=t&&t.length?t.filter((function(t){return t.id!==e.id})):[]}))},getToggleSortingHandler:function(){var n=e.getCanSort();return function(r){n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}}},createTable:function(e){return{setSorting:function(t){return null==e.options.onSortingChange?void 0:e.options.onSortingChange(t)},resetSorting:function(t){var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},getPreSortedRowModel:function(){return e.getGroupedRowModel()},getSortedRowModel:function(){return!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel()}}}},VP={getInitialState:function(e){return f({columnVisibility:{}},e)},getDefaultOptions:function(e){return{onColumnVisibilityChange:ZO("columnVisibility",e)}},createColumn:function(e,t){return{toggleVisibility:function(n){e.getCanHide()&&t.setColumnVisibility((function(t){return f(f({},t),{},c({},e.id,null!=n?n:!e.getIsVisible()))}))},getIsVisible:function(){var n,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},getCanHide:function(){var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},getToggleVisibilityHandler:function(){return function(t){null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}}},createRow:function(e,t){return{_getAllVisibleCells:nP((function(){return[e.getAllCells(),t.getState().columnVisibility]}),(function(e){return e.filter((function(e){return e.column.getIsVisible()}))}),{key:"row._getAllVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:nP((function(){return[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]}),(function(e,t,n){return[].concat(yt(e),yt(t),yt(n))}),{key:!1,debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},createTable:function(e){var t=function(t,n){return nP((function(){return[n(),n().filter((function(e){return e.getIsVisible()})).map((function(e){return e.id})).join("_")]}),(function(e){return e.filter((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))}),{key:t,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return{getVisibleFlatColumns:t("getVisibleFlatColumns",(function(){return e.getAllFlatColumns()})),getVisibleLeafColumns:t("getVisibleLeafColumns",(function(){return e.getAllLeafColumns()})),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(function(){return e.getLeftLeafColumns()})),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(function(){return e.getRightLeafColumns()})),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(function(){return e.getCenterLeafColumns()})),setColumnVisibility:function(t){return null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t)},resetColumnVisibility:function(t){var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:function(t){var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((function(e,n){return f(f({},e),{},c({},n.id,t||!(null!=n.getCanHide&&n.getCanHide())))}),{}))},getIsAllColumnsVisible:function(){return!e.getAllLeafColumns().some((function(e){return!(null!=e.getIsVisible&&e.getIsVisible())}))},getIsSomeColumnsVisible:function(){return e.getAllLeafColumns().some((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))},getToggleAllColumnsVisibilityHandler:function(){return function(t){var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}}},BP=[oP,VP,EP,RP,_P,zP,CP,cP,TP,OP,lP];function UP(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");var n={_features:BP},r=n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))}),{}),o=f(f({},{}),null!=(t=e.initialState)?t:{});n._features.forEach((function(e){var t;o=null!=(t=null==e.getInitialState?void 0:e.getInitialState(o))?t:o}));var i=[],a=!1,l={_features:BP,options:f(f({},r),e),initialState:o,_queue:function(e){i.push(e),a||(a=!0,Promise.resolve().then((function(){for(;i.length;)i.shift()();a=!1})).catch((function(e){return setTimeout((function(){throw e}))})))},reset:function(){n.setState(n.initialState)},setOptions:function(e){var t=JO(e,n.options);n.options=function(e){return n.options.mergeOptions?n.options.mergeOptions(r,e):f(f({},r),e)}(t)},getState:function(){return n.options.state},setState:function(e){null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:function(e,t,r){var o;return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?o:"".concat(r?[r.id,t].join("."):t)},getCoreRowModel:function(){return n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()},getRowModel:function(){return n.getPaginationRowModel()},getRow:function(e){var t=n.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:nP((function(){return[n.options.defaultColumn]}),(function(e){var t;return e=null!=(t=e)?t:{},f(f({header:function(e){var t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:function(e){var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null}},n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())}),{})),e)}),{debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:function(){return n.options.columns},getAllColumns:nP((function(){return[n._getColumnDefs()]}),(function(e){return function e(t,r,o){return void 0===o&&(o=0),t.map((function(t){var i=function(e,t,n,r){var o,i,a,l=f(f({},e._getDefaultColumnDef()),t),s=l.accessorKey,u=null!=(o=null!=(i=l.id)?i:s?s.replace(".","_"):void 0)?o:"string"===typeof l.header?l.header:void 0;if(l.accessorFn?a=l.accessorFn:s&&(a=s.includes(".")?function(e){var t,n=e,r=gt(s.split("."));try{for(r.s();!(t=r.n()).done;){var o,i=t.value;n=null==(o=n)?void 0:o[i]}}catch(a){r.e(a)}finally{r.f()}return n}:function(e){return e[l.accessorKey]}),!u)throw new Error;var c={id:"".concat(String(u)),accessorFn:a,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:nP((function(){return[!0]}),(function(){var e;return[c].concat(yt(null==(e=c.columns)?void 0:e.flatMap((function(e){return e.getFlatColumns()}))))}),{key:"column.getFlatColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:nP((function(){return[e._getOrderColumnsFn()]}),(function(e){var t;if(null!=(t=c.columns)&&t.length){var n=c.columns.flatMap((function(e){return e.getLeafColumns()}));return e(n)}return[c]}),{key:"column.getLeafColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return c=e._features.reduce((function(t,n){return Object.assign(t,null==n.createColumn?void 0:n.createColumn(c,e))}),c)}(n,t,o,r),a=t;return i.columns=a.columns?e(a.columns,i,o+1):[],i}))}(e)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:nP((function(){return[n.getAllColumns()]}),(function(e){return e.flatMap((function(e){return e.getFlatColumns()}))}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:nP((function(){return[n.getAllFlatColumns()]}),(function(e){return e.reduce((function(e,t){return e[t.id]=t,e}),{})}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:nP((function(){return[n.getAllColumns(),n._getOrderColumnsFn()]}),(function(e,t){var n=e.flatMap((function(e){return e.getLeafColumns()}));return t(n)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:function(e){return n._getAllFlatColumnsById()[e]}};return Object.assign(n,l),n._features.forEach((function(e){return Object.assign(n,null==e.createTable?void 0:e.createTable(n))})),n}var WP=function(e,t,n,r,o,i,a){for(var l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:function(t){if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:function(t){if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:function(t){var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:function(){return tP(l.subRows,(function(e){return e.subRows}))},getParentRow:function(){return l.parentId?e.getRow(l.parentId):void 0},getParentRows:function(){for(var e=[],t=l;;){var n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:nP((function(){return[e.getAllLeafColumns()]}),(function(t){return t.map((function(t){return function(e,t,n,r){var o={id:"".concat(t.id,"_").concat(n.id),row:t,column:n,getValue:function(){return t.getValue(r)},renderValue:function(){var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:nP((function(){return[e,n,t,o]}),(function(e,t,n,r){return{table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}}),{key:!1,debug:function(){return e.options.debugAll}})};return e._features.forEach((function(r){Object.assign(o,null==r.createCell?void 0:r.createCell(o,n,t,e))}),{}),o}(e,l,t,t.id)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:nP((function(){return[l.getAllCells()]}),(function(e){return e.reduce((function(e,t){return e[t.column.id]=t,e}),{})}),{key:"row.getAllCellsByColumnId",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},s=0;snew Date(n.lastUpdated)&&(n.lastUpdated=t.lastModifiedAt),""!==t.output&&(n.outputCount+=1),n}),{finished:0,inprogress:0,queued:0,outputCount:0,lastUpdated:null});return f({id:e.id,name:e.name},t)}))).sort((function(e,t){return new Date(t.lastUpdated).getTime()-new Date(e.lastUpdated).getTime()})),i=bk(),a=new Date,l=[{id:"name",header:"Quest name",accessorFn:function(e){return e.name},footer:function(e){return e.column.id},sortingFn:"alphanumeric"},{id:"lastUpdated",header:"Last updated",accessorFn:function(e){return XO(new Date(e.lastUpdated),a)},footer:function(e){return e.column.id},sortingFn:function(e,t){var n,r,o=new Date(null===e||void 0===e||null===(n=e.original)||void 0===n?void 0:n.lastUpdated),i=new Date(null===t||void 0===t||null===(r=t.original)||void 0===r?void 0:r.lastUpdated);return oi?-1:0}},{id:"finished",header:"Finished Tasks",accessorFn:function(e){return e},cell:function(t){var n=t.row.original,r=n.finished,o=n.inprogress+n.queued+n.finished;return r0?(0,e.jsx)(KP,{quests:(null===o||void 0===o?void 0:o.quests)||[]}):(0,e.jsx)(cO,{label:"No quests found",type:uO.noData,details:"Get started by creating a new quest.",children:(0,e.jsx)(qk,{to:"/createQuest",children:(0,e.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",children:"Create new quest"})})})})]})},JP={data:void 0,isLoading:!1,error:void 0},ZP=(0,i.createContext)(JP),eI=function(t){var n=t.children,r=y_(qR(GP||(GP=HT(["\n query GetSearchFilters($groupTag: TagWhereInput, $serviceTag: TagWhereInput){\n groupTags:tags(where: $groupTag) {\n id\n name\n kind \n },\n serviceTags:tags(where: $serviceTag) { \n id\n name\n kind \n },\n beacons {\n id\n name\n principal\n lastSeenAt\n interval\n host{\n name\n primaryIP\n platform\n tags {\n id\n kind\n name\n } \n }\n },\n hosts{\n id\n name\n }\n }\n "]))),{variables:{groupTag:{kind:"group"},serviceTag:{kind:"service"}}}),o=r.loading,a=r.error,l=r.data,s=r.startPolling,u=r.stopPolling;return(0,i.useEffect)((function(){return s(6e4),function(){u()}}),[s,u]),(0,e.jsx)(ZP.Provider,{value:{data:l,isLoading:o,error:a},children:n})},tI=n(3457),nI=n.n(tI),rI=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===oI}(e)}(e)};var oI="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function iI(e,t){return!1!==t.clone&&t.isMergeableObject(e)?lI((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function aI(e,t,n){return e.concat(t).map((function(e){return iI(e,n)}))}function lI(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||aI,n.isMergeableObject=n.isMergeableObject||rI;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=iI(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=lI(e[o],t[o],n):r[o]=iI(t[o],n)})),r}(e,t,n):iI(t,n)}lI.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return lI(e,n,t)}),{})};var sI=lI,uI="object"==typeof global&&global&&global.Object===Object&&global,cI="object"==typeof self&&self&&self.Object===Object&&self,dI=uI||cI||Function("return this")(),fI=dI.Symbol,pI=Object.prototype,hI=pI.hasOwnProperty,vI=pI.toString,gI=fI?fI.toStringTag:void 0;var mI=function(e){var t=hI.call(e,gI),n=e[gI];try{e[gI]=void 0;var r=!0}catch(i){}var o=vI.call(e);return r&&(t?e[gI]=n:delete e[gI]),o},yI=Object.prototype.toString;var bI=function(e){return yI.call(e)},wI="[object Null]",xI="[object Undefined]",_I=fI?fI.toStringTag:void 0;var SI=function(e){return null==e?void 0===e?xI:wI:_I&&_I in Object(e)?mI(e):bI(e)};var kI=function(e,t){return function(n){return e(t(n))}},CI=kI(Object.getPrototypeOf,Object);var EI=function(e){return null!=e&&"object"==typeof e},TI="[object Object]",RI=Function.prototype,OI=Object.prototype,PI=RI.toString,II=OI.hasOwnProperty,AI=PI.call(Object);var jI=function(e){if(!EI(e)||SI(e)!=TI)return!1;var t=CI(e);if(null===t)return!0;var n=II.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&PI.call(n)==AI};var MI=function(){this.__data__=[],this.size=0};var DI=function(e,t){return e===t||e!==e&&t!==t};var LI=function(e,t){for(var n=e.length;n--;)if(DI(e[n][0],t))return n;return-1},NI=Array.prototype.splice;var FI=function(e){var t=this.__data__,n=LI(t,e);return!(n<0)&&(n==t.length-1?t.pop():NI.call(t,n,1),--this.size,!0)};var zI=function(e){var t=this.__data__,n=LI(t,e);return n<0?void 0:t[n][1]};var VI=function(e){return LI(this.__data__,e)>-1};var BI=function(e,t){var n=this.__data__,r=LI(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function UI(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=uj},dj={};dj["[object Float32Array]"]=dj["[object Float64Array]"]=dj["[object Int8Array]"]=dj["[object Int16Array]"]=dj["[object Int32Array]"]=dj["[object Uint8Array]"]=dj["[object Uint8ClampedArray]"]=dj["[object Uint16Array]"]=dj["[object Uint32Array]"]=!0,dj["[object Arguments]"]=dj["[object Array]"]=dj["[object ArrayBuffer]"]=dj["[object Boolean]"]=dj["[object DataView]"]=dj["[object Date]"]=dj["[object Error]"]=dj["[object Function]"]=dj["[object Map]"]=dj["[object Number]"]=dj["[object Object]"]=dj["[object RegExp]"]=dj["[object Set]"]=dj["[object String]"]=dj["[object WeakMap]"]=!1;var fj=function(e){return EI(e)&&cj(e.length)&&!!dj[SI(e)]};var pj=function(e){return function(t){return e(t)}},hj="object"==typeof exports&&exports&&!exports.nodeType&&exports,vj=hj&&"object"==typeof module&&module&&!module.nodeType&&module,gj=vj&&vj.exports===hj&&uI.process,mj=function(){try{var e=vj&&vj.require&&vj.require("util").types;return e||gj&&gj.binding&&gj.binding("util")}catch(t){}}(),yj=mj,bj=yj&&yj.isTypedArray,wj=bj?pj(bj):fj,xj=Object.prototype.hasOwnProperty;var _j=function(e,t){var n=ej(e),r=!n&&ZA(e),o=!n&&!r&&ij(e),i=!n&&!r&&!o&&wj(e),a=n||r||o||i,l=a?GA(e.length,String):[],s=l.length;for(var u in e)!t&&!xj.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||sj(u,s))||l.push(u);return l},Sj=Object.prototype;var kj=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Sj)},Cj=kI(Object.keys,Object),Ej=Object.prototype.hasOwnProperty;var Tj=function(e){if(!kj(e))return Cj(e);var t=[];for(var n in Object(e))Ej.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Rj=function(e){return null!=e&&cj(e.length)&&!ZI(e)};var Oj=function(e){return Rj(e)?_j(e):Tj(e)};var Pj=function(e,t){return e&&qA(t,Oj(t),e)};var Ij=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Aj=Object.prototype.hasOwnProperty;var jj=function(e){if(!$I(e))return Ij(e);var t=kj(e),n=[];for(var r in e)("constructor"!=r||!t&&Aj.call(e,r))&&n.push(r);return n};var Mj=function(e){return Rj(e)?_j(e,!0):jj(e)};var Dj=function(e,t){return e&&qA(t,Mj(t),e)},Lj="object"==typeof exports&&exports&&!exports.nodeType&&exports,Nj=Lj&&"object"==typeof module&&module&&!module.nodeType&&module,Fj=Nj&&Nj.exports===Lj?dI.Buffer:void 0,zj=Fj?Fj.allocUnsafe:void 0;var Vj=function(e,t){if(t)return e.slice();var n=e.length,r=zj?zj(n):new e.constructor(n);return e.copy(r),r};var Bj=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0||(o[n]=e[n]);return o}function HD(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qD=function(e){return Array.isArray(e)&&0===e.length},GD=function(e){return"function"===typeof e},QD=function(e){return null!==e&&"object"===typeof e},$D=function(e){return String(Math.floor(Number(e)))===e},YD=function(e){return"[object String]"===Object.prototype.toString.call(e)},KD=function(e){return 0===i.Children.count(e)},XD=function(e){return QD(e)&&GD(e.then)};function JD(e,t,n,r){void 0===r&&(r=0);for(var o=DD(t);e&&r=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)}function eL(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,i=Object.keys(e);o=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var a=i;JD(t,a.path)||(t=ZD(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),C=(0,i.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),E=(0,i.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return GD(b.current[e].validate)})),n=t.length>0?t.map((function(t){return C(t,JD(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=ZD(e,t[r],n)),e}),{})}))}),[C]),T=(0,i.useCallback)((function(e){return Promise.all([E(e),p.validationSchema?k(e):{},p.validate?S(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return sI.all([t,n,r],{arrayMerge:sL})}))}),[p.validate,p.validationSchema,E,S,k]),R=cL((function(e){return void 0===e&&(e=x.values),_({type:"SET_ISVALIDATING",payload:!0}),T(e).then((function(e){return y.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:e})),e}))}));(0,i.useEffect)((function(){l&&!0===y.current&&nI()(h.current,p.initialValues)&&R(h.current)}),[l,R]);var O=(0,i.useCallback)((function(e){var t=e&&e.values?e.values:h.current,n=e&&e.errors?e.errors:v.current?v.current:p.initialErrors||{},r=e&&e.touched?e.touched:g.current?g.current:p.initialTouched||{},o=e&&e.status?e.status:m.current?m.current:p.initialStatus;h.current=t,v.current=n,g.current=r,m.current=o;var i=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(p.onReset){var a=p.onReset(x.values,$);XD(a)?a.then(i):i()}else i()}),[p.initialErrors,p.initialStatus,p.initialTouched]);(0,i.useEffect)((function(){!0!==y.current||nI()(h.current,p.initialValues)||(c&&(h.current=p.initialValues,O()),l&&R(h.current))}),[c,p.initialValues,O,l,R]),(0,i.useEffect)((function(){c&&!0===y.current&&!nI()(v.current,p.initialErrors)&&(v.current=p.initialErrors||oL,_({type:"SET_ERRORS",payload:p.initialErrors||oL}))}),[c,p.initialErrors]),(0,i.useEffect)((function(){c&&!0===y.current&&!nI()(g.current,p.initialTouched)&&(g.current=p.initialTouched||iL,_({type:"SET_TOUCHED",payload:p.initialTouched||iL}))}),[c,p.initialTouched]),(0,i.useEffect)((function(){c&&!0===y.current&&!nI()(m.current,p.initialStatus)&&(m.current=p.initialStatus,_({type:"SET_STATUS",payload:p.initialStatus}))}),[c,p.initialStatus,p.initialTouched]);var P=cL((function(e){if(b.current[e]&&GD(b.current[e].validate)){var t=JD(x.values,e),n=b.current[e].validate(t);return XD(n)?(_({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),_({type:"SET_ISVALIDATING",payload:!1})}))):(_({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return p.validationSchema?(_({type:"SET_ISVALIDATING",payload:!0}),k(x.values,e).then((function(e){return e})).then((function(t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),_({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),I=(0,i.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),A=(0,i.useCallback)((function(e){delete b.current[e]}),[]),j=cL((function(e,t){return _({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?R(x.values):Promise.resolve()})),M=(0,i.useCallback)((function(e){_({type:"SET_ERRORS",payload:e})}),[]),D=cL((function(e,t){var r=GD(e)?e(x.values):e;return _({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?R(r):Promise.resolve()})),L=(0,i.useCallback)((function(e,t){_({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),N=cL((function(e,t,r){return _({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?R(ZD(x.values,e,t)):Promise.resolve()})),F=(0,i.useCallback)((function(e,t){var n,r=t,o=e;if(!YD(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,l=i.name,s=i.id,u=i.value,c=i.checked,d=(i.outerHTML,i.options),f=i.multiple;r=t||(l||s),o=/number|range/.test(a)?(n=parseFloat(u),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,o=(i=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!o)return r.concat(n);if(!o)return r;return r.slice(0,i).concat(r.slice(i+1))}(JD(x.values,r),c,u):d&&f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):u}r&&N(r,o)}),[N,x.values]),z=cL((function(e){if(YD(e))return function(t){return F(t,e)};F(e)})),V=cL((function(e,t,n){return void 0===t&&(t=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?R(x.values):Promise.resolve()})),B=(0,i.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||(r||o));V(i,!0)}),[V]),U=cL((function(e){if(YD(e))return function(t){return B(t,e)};B(e)})),W=(0,i.useCallback)((function(e){GD(e)?_({type:"SET_FORMIK_STATE",payload:e}):_({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),H=(0,i.useCallback)((function(e){_({type:"SET_STATUS",payload:e})}),[]),q=(0,i.useCallback)((function(e){_({type:"SET_ISSUBMITTING",payload:e})}),[]),G=cL((function(){return _({type:"SUBMIT_ATTEMPT"}),R().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Y()))return}catch(r){throw r}return Promise.resolve(n).then((function(e){return y.current&&_({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(y.current)throw _({type:"SUBMIT_FAILURE"}),e}))}if(y.current&&(_({type:"SUBMIT_FAILURE"}),t))throw e}))})),Q=cL((function(e){e&&e.preventDefault&&GD(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&GD(e.stopPropagation)&&e.stopPropagation(),G().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),$={resetForm:O,validateForm:R,validateField:P,setErrors:M,setFieldError:L,setFieldTouched:V,setFieldValue:N,setStatus:H,setSubmitting:q,setTouched:j,setValues:D,setFormikState:W,submitForm:G},Y=cL((function(){return d(x.values,$)})),K=cL((function(e){e&&e.preventDefault&&GD(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&GD(e.stopPropagation)&&e.stopPropagation(),O()})),X=(0,i.useCallback)((function(e){return{value:JD(x.values,e),error:JD(x.errors,e),touched:!!JD(x.touched,e),initialValue:JD(h.current,e),initialTouched:!!JD(g.current,e),initialError:JD(v.current,e)}}),[x.errors,x.touched,x.values]),J=(0,i.useCallback)((function(e){return{setValue:function(t,n){return N(e,t,n)},setTouched:function(t,n){return V(e,t,n)},setError:function(t){return L(e,t)}}}),[N,V,L]),Z=(0,i.useCallback)((function(e){var t=QD(e),n=t?e.name:e,r=JD(x.values,n),o={name:n,value:r,onChange:z,onBlur:U};if(t){var i=e.type,a=e.value,l=e.as,s=e.multiple;"checkbox"===i?void 0===a?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(a)),o.value=a):"radio"===i?(o.checked=r===a,o.value=a):"select"===l&&s&&(o.value=o.value||[],o.multiple=!0)}return o}),[U,z,x.values]),ee=(0,i.useMemo)((function(){return!nI()(h.current,x.values)}),[h.current,x.values]),te=(0,i.useMemo)((function(){return"undefined"!==typeof s?ee?x.errors&&0===Object.keys(x.errors).length:!1!==s&&GD(s)?s(p):s:x.errors&&0===Object.keys(x.errors).length}),[s,ee,x.errors,p]);return BD({},x,{initialValues:h.current,initialErrors:v.current,initialTouched:g.current,initialStatus:m.current,handleBlur:U,handleChange:z,handleReset:K,handleSubmit:Q,resetForm:O,setErrors:M,setFormikState:W,setFieldTouched:V,setFieldValue:N,setFieldError:L,setStatus:H,setSubmitting:q,setTouched:j,setValues:D,submitForm:G,validateForm:R,validateField:P,isValid:te,dirty:ee,unregisterField:A,registerField:I,getFieldProps:Z,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:o,validateOnChange:n,validateOnMount:l})}function lL(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||jI(e)?lL(e):""!==e?e:void 0})):jI(e[r])?t[r]=lL(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function sL(e,t,n){var r=e.slice();return t.forEach((function(t,o){if("undefined"===typeof r[o]){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?sI(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=sI(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var uL="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?i.useLayoutEffect:i.useEffect;function cL(e){var t=(0,i.useRef)(e);return uL((function(){t.current=e})),(0,i.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;re?t:e}),0);return Array.from(BD({},e,{length:t+1}))}return[]},gL=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var o=n.props,i=o.name;(0,o.formik.setFormikState)((function(n){var o="function"===typeof r?r:e,a="function"===typeof t?t:e,l=ZD(n.values,i,e(JD(n.values,i))),s=r?o(JD(n.errors,i)):void 0,u=t?a(JD(n.touched,i)):void 0;return qD(s)&&(s=void 0),qD(u)&&(u=void 0),BD({},n,{values:l,errors:r?ZD(n.errors,i,s):n.errors,touched:t?ZD(n.touched,i,u):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(vL(t),[VD(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return fL(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return dL(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return pL(n,e,t)}),(function(t){return pL(t,e,null)}),(function(t){return pL(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return hL(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(HD(n)),n.pop=n.pop.bind(HD(n)),n}UD(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!nI()(JD(e.formik.values,e.name),JD(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?vL(n):[];return t||(t=r[e]),GD(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,o=t.children,a=t.name,l=BD({},e,{form:WD(t.formik,["validate","validationSchema"]),name:a});return n?(0,i.createElement)(n,l):r?r(l):o?"function"===typeof o?o(l):KD(o)?null:i.Children.only(o):null},t}(i.Component);gL.defaultProps={validateOnChange:!0};i.Component,i.Component;var mL=n(2819);function yL(){for(var e=arguments.length,t=new Array(e),n=0;nt.step?VT.Complete:n===t.step?VT.Current:VT.Upcoming;return(0,e.jsx)("li",{className:yL(o!==r.length-1?"pb-10":"","relative"),children:i===VT.Complete?(0,e.jsxs)(e.Fragment,{children:[o!==r.length-1?(0,e.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-purple-700","aria-hidden":"true"}):null,(0,e.jsxs)("div",{className:"group relative flex items-start",children:[(0,e.jsx)("span",{className:"flex h-9 items-center",children:(0,e.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-purple-700 group-hover:bg-purple-800",children:(0,e.jsx)(mL,{className:"h-5 w-5 text-white","aria-hidden":"true"})})}),(0,e.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:t.name}),(0,e.jsx)("span",{className:"text-sm text-gray-500",children:t.description})]})]})]}):i===VT.Current?(0,e.jsxs)(e.Fragment,{children:[o!==r.length-1?(0,e.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-gray-300","aria-hidden":"true"}):null,(0,e.jsxs)("div",{className:"group relative flex items-start","aria-current":"step",children:[(0,e.jsx)("span",{className:"flex h-9 items-center","aria-hidden":"true",children:(0,e.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-purple-700 bg-white",children:(0,e.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-purple-700"})})}),(0,e.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-purple-700",children:t.name}),(0,e.jsx)("span",{className:"text-sm text-gray-500",children:t.description})]})]})]}):(0,e.jsxs)(e.Fragment,{children:[o!==r.length-1?(0,e.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-gray-300","aria-hidden":"true"}):null,(0,e.jsxs)("div",{className:"group relative flex items-start",children:[(0,e.jsx)("span",{className:"flex h-9 items-center","aria-hidden":"true",children:(0,e.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-gray-300 bg-white",children:(0,e.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-transparent"})})}),(0,e.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,e.jsx)("span",{className:"text-sm font-medium text-gray-500",children:t.name}),(0,e.jsx)("span",{className:"text-sm text-gray-500",children:t.description})]})]})]})},t.name)}))})})};var xL=function(){var e=lt((0,i.useState)(!1),2),t=e[0],n=e[1],r=bk(),o=function(e,t){var n=p_(null===t||void 0===t?void 0:t.client);f_(e,a_.Mutation);var r=(0,i.useState)({called:!1,loading:!1,client:n}),o=r[0],a=r[1],l=(0,i.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(l.current,{client:n,options:t,mutation:e});var s=(0,i.useCallback)((function(e){void 0===e&&(e={});var t=l.current,n=t.options,r=t.mutation,o=Ad(Ad({},n),{mutation:r}),i=e.client||l.current.client;l.current.result.loading||o.ignoreResults||!l.current.isMounted||a(l.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:i});var s=++l.current.mutationId,u=e_(o,e);return i.mutate(u).then((function(t){var n,r=t.data,o=t.errors,c=o&&o.length>0?new s_({graphQLErrors:o}):void 0;if(s===l.current.mutationId&&!u.ignoreResults){var d={called:!0,loading:!1,data:r,error:c,client:i};l.current.isMounted&&!Qx(l.current.result,d)&&a(l.current.result=d)}var f=e.onCompleted||(null===(n=l.current.options)||void 0===n?void 0:n.onCompleted);return null===f||void 0===f||f(t.data,u),t})).catch((function(t){var n;if(s===l.current.mutationId&&l.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:i};Qx(l.current.result,r)||a(l.current.result=r)}var o=e.onError||(null===(n=l.current.options)||void 0===n?void 0:n.onError);if(o)return o(t,u),{data:void 0,errors:t};throw t}))}),[]),u=(0,i.useCallback)((function(){l.current.isMounted&&a({called:!1,loading:!1,client:n})}),[]);return(0,i.useEffect)((function(){return l.current.isMounted=!0,function(){l.current.isMounted=!1}}),[]),[s,Ad({reset:u},o)]}(qR(bL||(bL=HT(["\n mutation CreateQuest ($IDs: [ID!]!, $input: CreateQuestInput!) {\n createQuest(beaconIDs: $IDs, input: $input) {\n id\n name\n tasks{\n id\n lastModifiedAt\n output\n execStartedAt\n execFinishedAt\n }\n tome{\n id\n name\n paramDefs\n }\n }\n }\n "]))),{onCompleted:function(e){var t;r("/results/".concat(null===e||void 0===e||null===(t=e.createQuest)||void 0===t?void 0:t.id))},onError:function(e){e&&n(!0)},refetchQueries:[yO,"GetQuests"]}),a=lt(o,2),l=a[0],s=a[1];return{submitQuest:function(e){var t,n,r={},o=gt(e.params);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=f(f({},c({},i.name,i.value)),r)}}catch(s){o.e(s)}finally{o.f()}var a={variables:{IDs:e.beacons,input:{name:null===e||void 0===e?void 0:e.name,tomeID:null===(t=e.tome)||void 0===t?void 0:t.id,parameters:JSON.stringify(r)}}};l(a)},loading:s.loading,error:t,reset:s.reset}};function _L(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function SL(e,t){if(kO(2,arguments),!t||"object"!==s(t))return new Date(NaN);var n=t.years?_L(t.years):0,r=t.months?_L(t.months):0,o=t.weeks?_L(t.weeks):0,i=t.days?_L(t.days):0,a=t.hours?_L(t.hours):0,l=t.minutes?_L(t.minutes):0,u=t.seconds?_L(t.seconds):0,c=CO(e),d=r||n?function(e,t){kO(2,arguments);var n=CO(e),r=_L(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}(c,r+12*n):c,f=i||o?function(e,t){kO(2,arguments);var n=CO(e),r=_L(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(d,i+7*o):d,p=1e3*(u+60*(l+60*a));return new Date(f.getTime()+p)}var kL=function(t){return(0,e.jsx)(iw.div,f(f({className:"chakra-stack__item"},t),{},{__css:f({display:"inline-block",flex:"0 0 auto",minWidth:0},t.__css)}))};kL.displayName="StackItem";Object.freeze(["base","sm","md","lg","xl","2xl"]);function CL(e,t){return Array.isArray(e)?e.map((function(e){return null===e?null:t(e)})):kt(e)?Object.keys(e).reduce((function(n,r){return n[r]=t(e[r]),n}),{}):null!=e?t(e):null}var EL="& > *:not(style) ~ *:not(style)";function TL(e){return i.Children.toArray(e).filter((function(e){return(0,i.isValidElement)(e)}))}var RL=["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"],OL=sw((function(t,n){var r=t.isInline,o=t.direction,a=t.align,l=t.justify,s=t.spacing,u=void 0===s?"0.5rem":s,d=t.wrap,h=t.children,v=t.divider,g=t.className,m=t.shouldWrapChildren,y=p(t,RL),b=r?"row":null!=o?o:"column",w=(0,i.useMemo)((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return c({flexDirection:n},EL,CL(n,(function(e){return r[e]})))}({direction:b,spacing:u})}),[b,u]),x=(0,i.useMemo)((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":CL(n,(function(e){return r[e]}))}}({spacing:u,direction:b})}),[u,b]),_=!!v,S=!m&&!_,k=(0,i.useMemo)((function(){var t=TL(h);return S?t:t.map((function(n,r){var o="undefined"!==typeof n.key?n.key:r,a=r+1===t.length,l=m?(0,e.jsx)(kL,{children:n},o):n;if(!_)return l;var s=(0,i.cloneElement)(v,{__css:x}),u=a?null:s;return(0,e.jsxs)(i.Fragment,{children:[l,u]},o)}))}),[v,x,_,S,m,h]),C=St("chakra-stack",g);return(0,e.jsx)(iw.div,f(f({ref:n,display:"flex",alignItems:a,justifyContent:l,flexDirection:w.flexDirection,flexWrap:d,className:C,__css:_?{}:c({},EL,w[EL])},y),{},{children:k}))}));function PL(){for(var e=arguments.length,t=new Array(e),n=0;n\" "}),2),DL=ML[0],LL=ML[1],NL=lt(st({strict:!1,name:"FormControlContext"}),2),FL=NL[0],zL=NL[1];var VL=sw((function(t,n){var r=hw("Form",t),o=function(e){var t=e.id,n=e.isRequired,r=e.isInvalid,o=e.isDisabled,a=e.isReadOnly,l=p(e,AL),s=(0,i.useId)(),u=t||"field-".concat(s),c="".concat(u,"-label"),d="".concat(u,"-feedback"),h="".concat(u,"-helptext"),v=lt((0,i.useState)(!1),2),g=v[0],m=v[1],y=lt((0,i.useState)(!1),2),b=y[0],w=y[1],x=lt((0,i.useState)(!1),2),_=x[0],S=x[1],k=(0,i.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({id:h},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:PL(e,(function(e){e&&w(!0)}))})}),[h]),C=(0,i.useCallback)((function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},n),{},{ref:i,"data-focus":Tt(_),"data-disabled":Tt(o),"data-invalid":Tt(r),"data-readonly":Tt(a),id:null!=(e=n.id)?e:c,htmlFor:null!=(t=n.htmlFor)?t:u})}),[u,o,_,r,a,c]),E=(0,i.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({id:d},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:PL(e,(function(e){e&&m(!0)})),"aria-live":"polite"})}),[d]),T=(0,i.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),l),{},{ref:e,role:"group"})}),[l]),R=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!a,isDisabled:!!o,isFocused:!!_,onFocus:function(){return S(!0)},onBlur:function(){return S(!1)},hasFeedbackText:g,setHasFeedbackText:m,hasHelpText:b,setHasHelpText:w,id:u,labelId:c,feedbackId:d,helpTextId:h,htmlProps:l,getHelpTextProps:k,getErrorMessageProps:E,getRootProps:T,getLabelProps:C,getRequiredIndicatorProps:R}}(wr(t)),a=o.getRootProps,l=(o.htmlProps,p(o,jL)),s=St("chakra-form-control",t.className);return(0,e.jsx)(FL,{value:l,children:(0,e.jsx)(DL,{value:r,children:(0,e.jsx)(iw.div,f(f({},a({},n)),{},{className:s,__css:r.container}))})})}));VL.displayName="FormControl";var BL=sw((function(t,n){var r=zL(),o=LL(),i=St("chakra-form__helper-text",t.className);return(0,e.jsx)(iw.div,f(f({},null==r?void 0:r.getHelpTextProps(t,n)),{},{__css:o.helperText,className:i}))}));BL.displayName="FormHelperText";var UL=["className","children","requiredIndicator","optionalIndicator"],WL=sw((function(t,n){var r,o=pw("FormLabel",t),i=wr(t),a=(i.className,i.children),l=i.requiredIndicator,s=void 0===l?(0,e.jsx)(HL,{}):l,u=i.optionalIndicator,c=void 0===u?null:u,d=p(i,UL),h=zL(),v=null!=(r=null==h?void 0:h.getLabelProps(d,n))?r:f({ref:n},d);return(0,e.jsxs)(iw.label,f(f({},v),{},{className:St("chakra-form__label",i.className),__css:f({display:"block",textAlign:"start"},o),children:[a,(null==h?void 0:h.isRequired)?s:c]}))}));WL.displayName="FormLabel";var HL=sw((function(t,n){var r=zL(),o=LL();if(!(null==r?void 0:r.isRequired))return null;var i=St("chakra-form__required-indicator",t.className);return(0,e.jsx)(iw.span,f(f({},null==r?void 0:r.getRequiredIndicatorProps(t,n)),{},{__css:o.requiredIndicator,className:i}))}));HL.displayName="RequiredIndicator";var qL=["className"],GL=sw((function(t,n){var r=pw("Heading",t),o=wr(t),i=(o.className,p(o,qL));return(0,e.jsx)(iw.h2,f(f({ref:n,className:St("chakra-heading",t.className)},i),{},{__css:r}))}));GL.displayName="Heading";var QL=["isDisabled","isInvalid","isReadOnly","isRequired"],$L=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function YL(e){var t=KL(e),n=t.isDisabled,r=t.isInvalid,o=t.isReadOnly,i=t.isRequired;return f(f({},p(t,QL)),{},{disabled:n,readOnly:o,required:i,"aria-invalid":Rt(r),"aria-required":Rt(i),"aria-readonly":Rt(o)})}function KL(e){var t,n,r,o=zL(),i=e.id,a=e.disabled,l=e.readOnly,s=e.required,u=e.isRequired,c=e.isInvalid,d=e.isReadOnly,h=e.isDisabled,v=e.onFocus,g=e.onBlur,m=p(e,$L),y=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==o?void 0:o.hasFeedbackText)&&(null==o?void 0:o.isInvalid)&&y.push(o.feedbackId),(null==o?void 0:o.hasHelpText)&&y.push(o.helpTextId),f(f({},m),{},{"aria-describedby":y.join(" ")||void 0,id:null!=i?i:null==o?void 0:o.id,isDisabled:null!=(t=null!=a?a:h)?t:null==o?void 0:o.isDisabled,isReadOnly:null!=(n=null!=l?l:d)?n:null==o?void 0:o.isReadOnly,isRequired:null!=(r=null!=s?s:u)?r:null==o?void 0:o.isRequired,isInvalid:null!=c?c:null==o?void 0:o.isInvalid,onFocus:Ot(null==o?void 0:o.onFocus,v),onBlur:Ot(null==o?void 0:o.onBlur,g)})}var XL={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},JL=!1,ZL=null,eN=!1,tN=!1,nN=new Set;function rN(e,t){nN.forEach((function(n){return n(e,t)}))}var oN="undefined"!==typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function iN(e){eN=!0,function(e){return!(e.metaKey||!oN&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(ZL="keyboard",rN("keyboard",e))}function aN(e){if(ZL="pointer","mousedown"===e.type||"pointerdown"===e.type){eN=!0;var t=e.composedPath?e.composedPath()[0]:e.target,n=!1;try{n=t.matches(":focus-visible")}catch(r){}if(n)return;rN("pointer",e)}}function lN(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(eN=!0,ZL="virtual")}function sN(e){e.target!==window&&e.target!==document&&(eN||tN||(ZL="virtual",rN("virtual",e)),eN=!1,tN=!1)}function uN(){eN=!1,tN=!0}function cN(){return"pointer"!==ZL}function dN(){if("undefined"!==typeof window&&!JL){var e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){eN=!0;for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=KL(e),n=t.isDisabled,r=t.isReadOnly,o=t.isRequired,a=t.isInvalid,l=t.id,s=t.onBlur,u=t.onFocus,c=t["aria-describedby"],d=e.defaultChecked,h=e.isChecked,v=e.isFocusable,g=e.onChange,m=e.isIndeterminate,y=e.name,b=e.value,w=e.tabIndex,x=void 0===w?void 0:w,_=e["aria-label"],S=e["aria-labelledby"],k=e["aria-invalid"],C=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(p(e,pN),["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),E=xd(g),T=xd(s),R=xd(u),O=lt((0,i.useState)(!1),2),P=O[0],I=O[1],A=lt((0,i.useState)(!1),2),j=A[0],M=A[1],D=lt((0,i.useState)(!1),2),L=D[0],N=D[1],F=lt((0,i.useState)(!1),2),z=F[0],V=F[1];(0,i.useEffect)((function(){return fN(I)}),[]);var B=(0,i.useRef)(null),U=lt((0,i.useState)(!0),2),W=U[0],H=U[1],q=lt((0,i.useState)(!!d),2),G=q[0],Q=q[1],$=void 0!==h,Y=$?h:G,K=(0,i.useCallback)((function(e){r||n?e.preventDefault():($||Q(Y?e.target.checked:!!m||e.target.checked),null==E||E(e))}),[r,n,Y,$,m,E]);Dr((function(){B.current&&(B.current.indeterminate=Boolean(m))}),[m]),_d((function(){n&&M(!1)}),[n,M]),Dr((function(){var e=B.current;(null==e?void 0:e.form)&&(e.form.onreset=function(){Q(!!d)})}),[]);var X=n&&!v,J=(0,i.useCallback)((function(e){" "===e.key&&V(!0)}),[V]),Z=(0,i.useCallback)((function(e){" "===e.key&&V(!1)}),[V]);Dr((function(){B.current&&(B.current.checked!==Y&&Q(B.current.checked))}),[B.current]);var ee=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,"data-active":Tt(z),"data-hover":Tt(L),"data-checked":Tt(Y),"data-focus":Tt(j),"data-focus-visible":Tt(j&&P),"data-indeterminate":Tt(m),"data-disabled":Tt(n),"data-invalid":Tt(a),"data-readonly":Tt(r),"aria-hidden":!0,onMouseDown:Ot(e.onMouseDown,(function(e){j&&e.preventDefault(),V(!0)})),onMouseUp:Ot(e.onMouseUp,(function(){return V(!1)})),onMouseEnter:Ot(e.onMouseEnter,(function(){return N(!0)})),onMouseLeave:Ot(e.onMouseLeave,(function(){return N(!1)}))})}),[z,Y,n,j,P,L,m,a,r]),te=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f(f({},C),e),{},{ref:PL(t,(function(e){e&&H("LABEL"===e.tagName)})),onClick:Ot(e.onClick,(function(){var e;W||(null==(e=B.current)||e.click(),requestAnimationFrame((function(){var e;null==(e=B.current)||e.focus()})))})),"data-disabled":Tt(n),"data-checked":Tt(Y),"data-invalid":Tt(a)})}),[C,n,Y,a,W]),ne=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:PL(B,t),type:"checkbox",name:y,value:b,id:l,tabIndex:x,onChange:Ot(e.onChange,K),onBlur:Ot(e.onBlur,T,(function(){return M(!1)})),onFocus:Ot(e.onFocus,R,(function(){return M(!0)})),onKeyDown:Ot(e.onKeyDown,J),onKeyUp:Ot(e.onKeyUp,Z),required:o,checked:Y,disabled:X,readOnly:r,"aria-label":_,"aria-labelledby":S,"aria-invalid":k?Boolean(k):a,"aria-describedby":c,"aria-disabled":n,style:XL})}),[y,b,l,K,T,R,J,Z,o,Y,X,r,_,S,k,a,c,n,x]),re=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:t,onMouseDown:Ot(e.onMouseDown,vN),onTouchStart:Ot(e.onTouchStart,vN),"data-disabled":Tt(n),"data-checked":Tt(Y),"data-invalid":Tt(a)})}),[Y,n,a]);return{state:{isInvalid:a,isFocused:j,isChecked:Y,isActive:z,isHovered:L,isIndeterminate:m,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:te,getCheckboxProps:ee,getInputProps:ne,getLabelProps:re,htmlProps:C}}function vN(e){e.preventDefault(),e.stopPropagation()}var gN=["spacing","children"],mN=sw((function(t,n){var r=hw("Switch",t),o=wr(t),a=o.spacing,l=void 0===a?"0.5rem":a,s=o.children,u=hN(p(o,gN)),c=u.state,d=u.getInputProps,h=u.getCheckboxProps,v=u.getRootProps,g=u.getLabelProps,m=(0,i.useMemo)((function(){return f({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0},r.container)}),[r.container]),y=(0,i.useMemo)((function(){return f({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},r.track)}),[r.track]),b=(0,i.useMemo)((function(){return f({userSelect:"none",marginStart:l},r.label)}),[l,r.label]);return(0,e.jsxs)(iw.label,f(f({},v()),{},{className:St("chakra-switch",t.className),__css:m,children:[(0,e.jsx)("input",f({className:"chakra-switch__input"},d({},n))),(0,e.jsx)(iw.span,f(f({},h()),{},{className:"chakra-switch__track",__css:y,children:(0,e.jsx)(iw.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":Tt(c.isChecked),"data-hover":Tt(c.isHovered)})})),s&&(0,e.jsx)(iw.span,f(f({className:"chakra-switch__label"},g()),{},{__css:b,children:s}))]}))}));mN.displayName="Switch";var yN=["size","centerContent"],bN=["size"],wN=iw("div");wN.displayName="Box";var xN=sw((function(t,n){var r=t.size,o=t.centerContent,i=void 0===o||o,a=p(t,yN),l=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,e.jsx)(wN,f({ref:n,boxSize:r,__css:f(f({},l),{},{flexShrink:0,flexGrow:0})},a))}));xN.displayName="Square";var _N=sw((function(t,n){var r=t.size,o=p(t,bN);return(0,e.jsx)(xN,f({size:r,ref:n,borderRadius:"9999px"},o))}));_N.displayName="Circle";var SN=lt(st({strict:!1,name:"ButtonGroupContext"}),2),kN=(SN[0],SN[1]),CN=["children","className"];function EN(t){var n=t.children,r=t.className,o=p(t,CN),a=(0,i.isValidElement)(n)?(0,i.cloneElement)(n,{"aria-hidden":!0,focusable:!1}):n,l=St("chakra-button__icon",r);return(0,e.jsx)(iw.span,f(f({display:"inline-flex",alignSelf:"center",flexShrink:0},o),{},{className:l,children:a}))}EN.displayName="ButtonIcon";var TN=["label","placement","spacing","children","className","__css"];function RN(t){var n=t.label,r=t.placement,o=t.spacing,a=void 0===o?"0.5rem":o,l=t.children,s=void 0===l?(0,e.jsx)(xw,{color:"currentColor",width:"1em",height:"1em"}):l,u=t.className,d=t.__css,h=p(t,TN),v=St("chakra-button__spinner",u),g="start"===r?"marginEnd":"marginStart",m=(0,i.useMemo)((function(){var e;return f((c(e={display:"flex",alignItems:"center",position:n?"relative":"absolute"},g,n?a:0),c(e,"fontSize","1em"),c(e,"lineHeight","normal"),e),d)}),[d,n,g,a]);return(0,e.jsx)(iw.div,f(f({className:v},h),{},{__css:m,children:s}))}RN.displayName="ButtonSpinner";var ON=["isDisabled","isLoading","isActive","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"],PN=sw((function(t,n){var r=kN(),o=pw("Button",f(f({},r),t)),a=wr(t),l=a.isDisabled,s=void 0===l?null==r?void 0:r.isDisabled:l,u=a.isLoading,c=a.isActive,d=a.children,h=a.leftIcon,v=a.rightIcon,g=a.loadingText,m=a.iconSpacing,y=void 0===m?"0.5rem":m,b=a.type,w=a.spinner,x=a.spinnerPlacement,_=void 0===x?"start":x,S=a.className,k=a.as,C=p(a,ON),E=(0,i.useMemo)((function(){var e=f(f({},null==o?void 0:o._focus),{},{zIndex:1});return f(f({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none"},o),!!r&&{_focus:e})}),[o,r]),T=function(e){var t=lt((0,i.useState)(!e),2),n=t[0],r=t[1],o=(0,i.useCallback)((function(e){e&&r("BUTTON"===e.tagName)}),[]);return{ref:o,type:n?"button":void 0}}(k),R=T.ref,O=T.type,P={rightIcon:v,leftIcon:h,iconSpacing:y,children:d};return(0,e.jsxs)(iw.button,f(f({ref:IL(n,R),as:k,type:null!=b?b:O,"data-active":Tt(c),"data-loading":Tt(u),__css:E,className:St("chakra-button",S)},C),{},{disabled:s||u,children:[u&&"start"===_&&(0,e.jsx)(RN,{className:"chakra-button__spinner--start",label:g,placement:"start",spacing:y,children:w}),u?g||(0,e.jsx)(iw.span,{opacity:0,children:(0,e.jsx)(IN,f({},P))}):(0,e.jsx)(IN,f({},P)),u&&"end"===_&&(0,e.jsx)(RN,{className:"chakra-button__spinner--end",label:g,placement:"end",spacing:y,children:w})]}))}));function IN(t){var n=t.leftIcon,r=t.rightIcon,o=t.children,i=t.iconSpacing;return(0,e.jsxs)(e.Fragment,{children:[n&&(0,e.jsx)(EN,{marginEnd:i,children:n}),o,r&&(0,e.jsx)(EN,{marginStart:i,children:r})]})}PN.displayName="Button";var AN=["className","align","decoration","casing"],jN=sw((function(t,n){var r=pw("Text",t),o=wr(t),i=(o.className,o.align,o.decoration,o.casing,p(o,AN)),a=Ub({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return(0,e.jsx)(iw.p,f(f(f({ref:n,className:St("chakra-text",t.className)},a),i),{},{__css:r}))}));jN.displayName="Text";var MN=n(3679),DN=n(5217);function LN(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function NN(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function FN(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function zN(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof e.getDerivedStateFromProps&&"function"!==typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,o=null;if("function"===typeof t.componentWillMount?n="componentWillMount":"function"===typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"===typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"===typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"===typeof t.componentWillUpdate?o="componentWillUpdate":"function"===typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==o){var i=e.displayName||e.name,a="function"===typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof e.getDerivedStateFromProps&&(t.componentWillMount=LN,t.componentWillReceiveProps=NN),"function"===typeof t.getSnapshotBeforeUpdate){if("function"!==typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=FN;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}function VN(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=0&&s===l&&u())}var WN=function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,o=t.estimatedCellSize;fi(this,e),c(this,"_cellSizeAndPositionData",{}),c(this,"_lastMeasuredIndex",-1),c(this,"_lastBatchedIndex",-1),c(this,"_cellCount",void 0),c(this,"_cellSizeGetter",void 0),c(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=o}return di(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(o));null===o?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:o},n+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var a,l=this.getSizeAndPositionOfCell(i),s=l.offset,u=s-r+l.size;switch(n){case"start":a=s;break;case"end":a=u;break;case"center":a=s-(r-l.size)/2;break;default:a=Math.max(u,Math.min(s,o))}var c=this.getTotalSize();return Math.max(0,Math.min(c-r,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,o=this._findNearestCell(n),i=this.getSizeAndPositionOfCell(o);n=i.offset+i.size;for(var a=o;nn&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}(),HN=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},qN=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?HN():n,o=p(t,["maxScrollSize"]);fi(this,e),c(this,"_cellSizeAndPositionManager",void 0),c(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new WN(o),this._maxScrollSize=r}return di(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(i*(o-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(r-t))}}]),e}();function GN(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,o=n.indices,i=Object.keys(o),a=!e||i.every((function(e){var t=o[e];return Array.isArray(t)?t.length>0:t>=0})),l=i.length!==Object.keys(t).length||i.some((function(e){var n=t[e],r=o[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=o,a&&l&&r(o)}}var QN=1;function $N(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,s=e.scrollOffset,u=e.scrollToAlignment,c=e.scrollToIndex,d=e.size,f=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,h=n.getCellCount(),v=c>=0&&c0&&(dn.getTotalSize()-d&&p(h-1)}var YN,KN,XN=!("undefined"===typeof window||!window.document||!window.document.createElement);function JN(e){if((!YN&&0!==YN||e)&&XN){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),YN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return YN}var ZN,eF,tF=(KN="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||KN.webkitRequestAnimationFrame||KN.mozRequestAnimationFrame||KN.oRequestAnimationFrame||KN.msRequestAnimationFrame||function(e){return KN.setTimeout(e,1e3/60)},nF=KN.cancelAnimationFrame||KN.webkitCancelAnimationFrame||KN.mozCancelAnimationFrame||KN.oCancelAnimationFrame||KN.msCancelAnimationFrame||function(e){KN.clearTimeout(e)},rF=tF,oF=nF,iF=function(e){return oF(e.id)},aF=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:rF((function o(){Date.now()-n>=t?e.call():r.id=rF(o)}))};return r};function lF(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 sF(e){for(var t=1;t0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return xt(t,e),di(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=sF({},this.props,{scrollToAlignment:n,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,s=i.height,u=i.width,c=this.state.instanceProps,d=c.scrollbarSize,f=c.rowSizeAndPositionManager.getTotalSize(),p=c.columnSizeAndPositionManager.getTotalSize(),h=Math.min(Math.max(0,p-u+d),n),v=Math.min(Math.max(0,f-s+d),o);if(this.state.scrollLeft!==h||this.state.scrollTop!==v){var g={isScrolling:!0,scrollDirectionHorizontal:h!==this.state.scrollLeft?h>this.state.scrollLeft?QN:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:v!==this.state.scrollTop?v>this.state.scrollTop?QN:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:uF};a||(g.scrollTop=v),l||(g.scrollLeft=h),g.needToResetStyleCache=!1,this.setState(g)}this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:v,totalColumnsWidth:p,totalRowsHeight:f})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,s=this.state.instanceProps;s.columnSizeAndPositionManager.resetCell(n),s.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===QN?n<=a:n>=a),this._recomputeScrollTopFlag=l>=0&&(this.state.scrollDirectionVertical===QN?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(sF({},o,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(sF({},o,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,s=e.width,u=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),u.scrollbarSizeMeasured||this.setState((function(e){var t=sF({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"===typeof o&&o>=0||"number"===typeof a&&a>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=r>0&&s>0;i>=0&&d&&this._updateScrollLeftForScrollToColumn(),l>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:u.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:u.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,s=r.rowCount,u=r.scrollToAlignment,c=r.scrollToColumn,d=r.scrollToRow,f=r.width,p=this.state,h=p.scrollLeft,v=p.scrollPositionChangeReason,g=p.scrollTop,m=p.instanceProps;this._handleInvalidatedGridSize();var y=a>0&&0===e.columnCount||s>0&&0===e.rowCount;v===cF&&(!i&&h>=0&&(h!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=h),!o&&g>=0&&(g!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=g));var b=(0===e.width||0===e.height)&&l>0&&f>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):$N({cellSizeAndPositionManager:m.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:h,scrollToAlignment:u,scrollToIndex:c,size:f,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):$N({cellSizeAndPositionManager:m.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:u,scrollToIndex:d,size:l,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),h!==t.scrollLeft||g!==t.scrollTop){var w=m.rowSizeAndPositionManager.getTotalSize(),x=m.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:g,totalColumnsWidth:x,totalRowsHeight:w})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&iF(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,o=e.className,a=e.containerProps,l=e.containerRole,s=e.containerStyle,u=e.height,c=e.id,d=e.noContentRenderer,f=e.role,p=e.style,h=e.tabIndex,v=e.width,g=this.state,m=g.instanceProps,y=g.needToResetStyleCache,b=this._isScrolling(),w={boxSizing:"border-box",direction:"ltr",height:n?"auto":u,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var x=m.columnSizeAndPositionManager.getTotalSize(),_=m.rowSizeAndPositionManager.getTotalSize(),S=_>u?m.scrollbarSize:0,k=x>v?m.scrollbarSize:0;k===this._horizontalScrollBarSize&&S===this._verticalScrollBarSize||(this._horizontalScrollBarSize=k,this._verticalScrollBarSize=S,this._scrollbarPresenceChanged=!0),w.overflowX=x+S<=v?"hidden":"auto",w.overflowY=_+k<=u?"hidden":"auto";var C=this._childrenToDisplay,E=0===C.length&&u>0&&v>0;return i.createElement("div",me({ref:this._setScrollingContainerRef},a,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:BN("ReactVirtualized__Grid",o),id:c,onScroll:this._onScroll,role:f,style:sF({},w,{},p),tabIndex:h}),C.length>0&&i.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:sF({width:t?"auto":x,height:_,maxWidth:x,maxHeight:_,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"},s)},C),E&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,s=e.overscanIndicesGetter,u=e.overscanRowCount,c=e.rowCount,d=e.width,f=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,h=t.scrollDirectionVertical,v=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,m=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&d>0){var b=v.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:m}),w=v.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:g}),x=v.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:m}),_=v.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:g});this._renderedColumnStartIndex=b.start,this._renderedColumnStopIndex=b.stop,this._renderedRowStartIndex=w.start,this._renderedRowStopIndex=w.stop;var S=s({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:p,startIndex:"number"===typeof b.start?b.start:0,stopIndex:"number"===typeof b.stop?b.stop:-1}),k=s({direction:"vertical",cellCount:c,overscanCellsCount:u,scrollDirection:h,startIndex:"number"===typeof w.start?w.start:0,stopIndex:"number"===typeof w.stop?w.stop:-1}),C=S.overscanStartIndex,E=S.overscanStopIndex,T=k.overscanStartIndex,R=k.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var O=T;O<=R;O++)if(!i.has(O,0)){C=0,E=o-1;break}if(!i.hasFixedWidth())for(var P=C;P<=E;P++)if(!i.has(0,P)){T=0,R=c-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:v.columnSizeAndPositionManager,columnStartIndex:C,columnStopIndex:E,deferredMeasurementCache:i,horizontalOffsetAdjustment:x,isScrolling:y,isScrollingOptOut:f,parent:this,rowSizeAndPositionManager:v.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:R,scrollLeft:m,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:_,visibleColumnIndices:b,visibleRowIndices:w}),this._columnStartIndex=C,this._columnStopIndex=E,this._rowStartIndex=T,this._rowStopIndex=R}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&iF(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=aF(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),UN({cellCount:a.prevColumnCount,cellSize:"number"===typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),UN({cellCount:a.prevRowCount,cellSize:"number"===typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,sF({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:cF};return"number"===typeof n&&n>=0&&(o.scrollDirectionHorizontal=n>t.scrollLeft?QN:-1,o.scrollLeft=n),"number"===typeof r&&r>=0&&(o.scrollDirectionVertical=r>t.scrollTop?QN:-1,o.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=t.scrollLeft,s=t.instanceProps;if(n>0){var u=n-1,c=i<0?u:Math.min(u,i),d=s.rowSizeAndPositionManager.getTotalSize(),f=s.scrollbarSizeMeasured&&d>r?s.scrollbarSize:0;return s.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-f,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=t.scrollTop,s=t.instanceProps;if(r>0){var u=r-1,c=i<0?u:Math.min(u,i),d=s.columnSizeAndPositionManager.getTotalSize(),f=s.scrollbarSizeMeasured&&d>a?s.scrollbarSize:0;return s.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n-f,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(i.PureComponent),c(ZN,"propTypes",null),eF);c(dF,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,s=e.isScrolling,u=e.isScrollingOptOut,c=e.parent,d=e.rowSizeAndPositionManager,f=e.rowStartIndex,p=e.rowStopIndex,h=e.styleCache,v=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,m=e.visibleRowIndices,y=[],b=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),w=!s&&!b,x=f;x<=p;x++)for(var _=d.getSizeAndPositionOfCell(x),S=o;S<=i;S++){var k=r.getSizeAndPositionOfCell(S),C=S>=g.start&&S<=g.stop&&x>=m.start&&x<=m.stop,E="".concat(x,"-").concat(S),T=void 0;w&&h[E]?T=h[E]:a&&!a.has(x,S)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:_.size,left:k.offset+l,position:"absolute",top:_.offset+v,width:k.size},h[E]=T);var R={columnIndex:S,isScrolling:s,isVisible:C,key:E,parent:c,rowIndex:x,style:T},O=void 0;!u&&!s||l||v?O=n(R):(t[E]||(t[E]=n(R)),O=t[E]),null!=O&&!1!==O&&y.push(O)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:JN,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return r===QN?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),zN(dF);var fF=dF,pF=1;function hF(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),r===pF?{overscanStartIndex:Math.max(0,o-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i+1)}}var vF,gF;function mF(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}var yF=(gF=vF=function(e){function t(){var e,n;fi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],o=t.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(t.createTextNode(n)),r.appendChild(o)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var u='';if(window.trustedTypes){var c=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return u}});t.__resizeTriggers__.innerHTML=c.createHTML("")}else t.__resizeTriggers__.innerHTML=u;t.appendChild(t.__resizeTriggers__),l(t),t.addEventListener("scroll",s,!0),d&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==g&&l(t)},t.__resizeTriggers__.addEventListener(d,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(o)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(d,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}function _F(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 SF(e){for(var t=1;t=0){var c=t.getScrollPositionForCell({align:o,cellIndex:i,height:r,scrollLeft:s,scrollTop:u,width:a});c.scrollLeft===s&&c.scrollTop===u||n._setScrollPosition(c)}})),c(vi(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,o=t.height,i=t.isScrollingChange,a=t.width,l=n._scrollbarSize,s=r.getTotalSize(),u=s.height,c=s.width,d=Math.max(0,Math.min(c-a+l,e.target.scrollLeft)),f=Math.max(0,Math.min(u-o+l,e.target.scrollTop));if(n.state.scrollLeft!==d||n.state.scrollTop!==f){var p=e.cancelable?PF.OBSERVED:PF.REQUESTED;n.state.isScrolling||i(!0),n.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:p,scrollTop:f})}n._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:f,totalWidth:c,totalHeight:u})}})),n._scrollbarSize=JN(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return xt(t,e),di(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,o=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=JN(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||o>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:o}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,l=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:o||0,totalHeight:a,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,o=n.scrollToAlignment,i=n.scrollToCell,a=n.width,l=this.state,s=l.scrollLeft,u=l.scrollPositionChangeReason,c=l.scrollTop;u===PF.REQUESTED&&(s>=0&&s!==t.scrollLeft&&s!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=s),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),r===e.height&&o===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,o=e.className,a=e.height,l=e.horizontalOverscanSize,s=e.id,u=e.noContentRenderer,c=e.style,d=e.verticalOverscanSize,f=e.width,p=this.state,h=p.isScrolling,v=p.scrollLeft,g=p.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var m=r.getTotalSize(),y=m.height,b=m.width,w=Math.max(0,v-l),x=Math.max(0,g-d),_=Math.min(b,v+f+l),S=Math.min(y,g+a+d),k=a>0&&f>0?r.cellRenderers({height:S-x,isScrolling:h,width:_-w,x:w,y:x}):[],C={boxSizing:"border-box",direction:"ltr",height:t?"auto":a,position:"relative",WebkitOverflowScrolling:"touch",width:f,willChange:"transform"},E=y>a?this._scrollbarSize:0,T=b>f?this._scrollbarSize:0;return C.overflowX=b+E<=f?"hidden":"auto",C.overflowY=y+T<=a?"hidden":"auto",i.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:BN("ReactVirtualized__Collection",o),id:s,onScroll:this._onScroll,role:"grid",style:OF({},C,{},c),tabIndex:0},n>0&&i.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:y,maxHeight:y,maxWidth:b,overflow:"hidden",pointerEvents:h?"none":"",width:b}},k),0===n&&u())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:PF.REQUESTED};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:PF.REQUESTED}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:PF.REQUESTED}}}]),t}(i.PureComponent);c(IF,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),IF.propTypes={},zN(IF);var AF=IF,jF=function(){function e(t){var n=t.height,r=t.width,o=t.x,i=t.y;fi(this,e),this.height=n,this.width=r,this.x=o,this.y=i,this._indexMap={},this._indices=[]}return di(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),MF=100,DF=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:MF;fi(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return di(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,o=e.y,i={};return this.getSections({height:t,width:n,x:r,y:o}).forEach((function(e){return e.getCellIndices().forEach((function(e){i[e]=e}))})),Object.keys(i).map((function(e){return i[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,o=e.y,i=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),l=Math.floor(o/this._sectionSize),s=Math.floor((o+t-1)/this._sectionSize),u=[],c=i;c<=a;c++)for(var d=l;d<=s;d++){var f="".concat(c,".").concat(d);this._sections[f]||(this._sections[f]=new jF({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:d*this._sectionSize})),u.push(this._sections[f])}return u}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function LF(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,o=e.cellSize,i=e.containerSize,a=e.currentOffset,l=r,s=l-i+o;switch(n){case"start":return l;case"end":return s;case"center":return l-(i-o)/2;default:return Math.max(s,Math.min(l,a))}}var NF=function(e){function t(e,n){var r;return fi(this,t),(r=gi(this,pi(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(vi(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(vi(r)),r}return xt(t,e),di(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=me({},this.props);return i.createElement(AF,me({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,o=[],i=new DF(r),a=0,l=0,s=0;s=0&&nn||o1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,o=this.props,i=o.isRowLoaded,a=o.minimumBatchSize,l=o.rowCount,s=o.threshold,u=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,o=e.startIndex,i=e.stopIndex,a=[],l=null,s=null,u=o;u<=i;u++){t({index:u})?null!==s&&(a.push({startIndex:l,stopIndex:s}),l=s=null):(s=u,null===l&&(l=u))}if(null!==s){for(var c=Math.min(Math.max(s,l+n-1),r-1),d=s+1;d<=c&&!t({index:d});d++)s=d;a.push({startIndex:l,stopIndex:s})}if(a.length)for(var f=a[0];f.stopIndex-f.startIndex+10;){var p=f.startIndex-1;if(t({index:p}))break;f.startIndex=p}return a}({isRowLoaded:i,minimumBatchSize:a,rowCount:l,startIndex:Math.max(0,e-s),stopIndex:Math.min(l-1,t+s)}),c=(n=[]).concat.apply(n,yt(u.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(u)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(i.PureComponent);c(FF,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),FF.propTypes={};var zF,VF,BF=(VF=zF=function(e){function t(){var e,n;fi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,o=e.width,a=BN("ReactVirtualized__List",t);return i.createElement(fF,me({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:a,columnWidth:o,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(i.PureComponent),c(zF,"propTypes",null),VF);c(BF,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:hF,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var UF={ge:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>=0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>=r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=t-1;t<=n;){var a=t+n>>>1;o(e[a],r)<0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]>>1;o(e[a],r)<=0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]<=r?(o=i,t=i+1):n=i-1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(;t<=n;){var i=t+n>>>1,a=o(e[i],r);if(0===a)return i;a<=0?t=i+1:n=i-1}return-1}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(;t<=n;){var o=t+n>>>1,i=e[o];if(i===r)return o;i<=r?t=o+1:n=o-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}},WF=0,HF=1;function qF(e,t,n,r,o){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=o,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var GF=qF.prototype;function QF(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function $F(e,t){var n=rz(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function YF(e,t){var n=e.intervals([]);n.push(t),$F(e,n)}function KF(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?WF:(n.splice(r,1),$F(e,n),HF)}function XF(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var o=n(e[r]);if(o)return o}}function ZF(e,t){for(var n=0;n>1],o=[],i=[],a=[];for(n=0;n3*(t+1)?YF(this,e):this.left.insert(e):this.left=rz([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?YF(this,e):this.right.insert(e):this.right=rz([e]);else{var n=UF.ge(this.leftPoints,e,tz),r=UF.ge(this.rightPoints,e,nz);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},GF.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?KF(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,HF):(i===HF&&(this.count-=1),i):WF;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?KF(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,HF):(i===HF&&(this.count-=1),i):WF;if(1===this.count)return this.leftPoints[0]===e?2:WF;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var o=this.left,i=this.right;n.count-=r.count,n.right=r.left,r.left=o,r.right=i}QF(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?QF(this,this.left):QF(this,this.right);return HF}for(o=UF.ge(this.leftPoints,e,tz);othis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return JF(this.rightPoints,e,t)}return ZF(this.leftPoints,t)},GF.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?JF(this.rightPoints,e,n):ZF(this.leftPoints,n)};var iz=oz.prototype;iz.insert=function(e){this.root?this.root.insert(e):this.root=new qF(e[0],null,null,[e],[e])},iz.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==WF}return!1},iz.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},iz.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(iz,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(iz,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var az,lz,sz=function(){function e(){var t;fi(this,e),c(this,"_columnSizeMap",{}),c(this,"_intervalTree",t&&0!==t.length?new oz(rz(t)):new oz(null)),c(this,"_leftMap",{})}return di(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=lt(e,3),o=t[0],i=(t[1],t[2]);return n(i,r._leftMap[i],o)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var o=this._columnSizeMap,i=o[t];o[t]=void 0===i?n+r:Math.max(i,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function uz(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 cz(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};fi(this,e),c(this,"_cellMeasurerCache",void 0),c(this,"_columnIndexOffset",void 0),c(this,"_rowIndexOffset",void 0),c(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),c(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,i=void 0===o?0:o,a=n.rowIndexOffset,l=void 0===a?0:a;this._cellMeasurerCache=r,this._columnIndexOffset=i,this._rowIndexOffset=l}return di(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function hz(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 vz(e){for(var t=1;t0?new pz({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:l}):o,r._deferredMeasurementCacheBottomRightGrid=a>0||l>0?new pz({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:l}):o,r._deferredMeasurementCacheTopRightGrid=a>0?new pz({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),r}return xt(t,e),di(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.fixedColumnCount,l=i.fixedRowCount,s=Math.max(0,n-a),u=Math.max(0,o-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:u}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:s,rowIndex:u}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:o}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:s,rowIndex:o}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),o=(e.scrollTop,e.scrollToRow),a=p(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,s=l.scrollLeft,u=l.scrollTop;return i.createElement("div",{style:this._containerOuterStyle},i.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(a),this._renderTopRightGrid(vz({},a,{onScroll:t,scrollLeft:s}))),i.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(vz({},a,{onScroll:t,scrollTop:u})),this._renderBottomRightGrid(vz({},a,{onScroll:t,onSectionRendered:n,scrollLeft:s,scrollToColumn:r,scrollToRow:o,scrollTop:u}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,o=0;o=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(i.PureComponent);c(mz,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),mz.propTypes={},zN(mz);var yz=function(e){function t(e,n){var r;return fi(this,t),(r=gi(this,pi(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(vi(r)),r}return xt(t,e),di(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,o=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,l=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:o,scrollLeft:i,scrollTop:a,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,o=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:o,scrollTop:i,scrollWidth:a})}}]),t}(i.PureComponent);yz.propTypes={};function bz(e){var t=e.className,n=e.columns,r=e.style;return i.createElement("div",{className:t,role:"row",style:r},n)}bz.propTypes=null;var wz={ASC:"ASC",DESC:"DESC"};function xz(e){var t=e.sortDirection,n=BN("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===wz.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===wz.DESC});return i.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===wz.ASC?i.createElement("path",{d:"M7 14l5-5 5 5z"}):i.createElement("path",{d:"M7 10l5 5 5-5z"}),i.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function _z(e){var t=e.dataKey,n=e.label,r=e.sortBy,o=e.sortDirection,a=r===t,l=[i.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return a&&l.push(i.createElement(xz,{key:"SortIndicator",sortDirection:o})),l}function Sz(e){var t=e.className,n=e.columns,r=e.index,o=e.key,a=e.onRowClick,l=e.onRowDoubleClick,s=e.onRowMouseOut,u=e.onRowMouseOver,c=e.onRowRightClick,d=e.rowData,f=e.style,p={"aria-rowindex":r+1};return(a||l||s||u||c)&&(p["aria-label"]="row",p.tabIndex=0,a&&(p.onClick=function(e){return a({event:e,index:r,rowData:d})}),l&&(p.onDoubleClick=function(e){return l({event:e,index:r,rowData:d})}),s&&(p.onMouseOut=function(e){return s({event:e,index:r,rowData:d})}),u&&(p.onMouseOver=function(e){return u({event:e,index:r,rowData:d})}),c&&(p.onContextMenu=function(e){return c({event:e,index:r,rowData:d})})),i.createElement("div",me({},p,{className:t,key:o,role:"row",style:f}),n)}xz.propTypes={},_z.propTypes=null,Sz.propTypes=null;var kz=function(e){function t(){return fi(this,t),gi(this,pi(t).apply(this,arguments))}return xt(t,e),t}(i.Component);function Cz(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 Ez(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=(0,Gw.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.disableHeader,a=t.gridClassName,l=t.gridStyle,s=t.headerHeight,u=t.headerRowRenderer,c=t.height,d=t.id,f=t.noRowsRenderer,p=t.rowClassName,h=t.rowStyle,v=t.scrollToIndex,g=t.style,m=t.width,y=this.state.scrollbarWidth,b=o?c:c-s,w="function"===typeof p?p({index:-1}):p,x="function"===typeof h?h({index:-1}):h;return this._cachedColumnStyles=[],i.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=Ez({overflow:"hidden"},r)})),i.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":i.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:BN("ReactVirtualized__Table",r),id:d,role:"grid",style:g},!o&&u({className:BN("ReactVirtualized__Table__headerRow",w),columns:this._getHeaderColumns(),style:Ez({height:s,overflow:"hidden",paddingRight:y,width:m},x)}),i.createElement(fF,me({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:BN("ReactVirtualized__Table__Grid",a),cellRenderer:this._createRow,columnWidth:m,columnCount:1,height:b,id:void 0,noContentRenderer:f,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:y,scrollToRow:v,style:Ez({},l,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,o=e.parent,a=e.rowData,l=e.rowIndex,s=this.props.onColumnClick,u=t.props,c=u.cellDataGetter,d=u.cellRenderer,f=u.className,p=u.columnData,h=u.dataKey,v=u.id,g=d({cellData:c({columnData:p,dataKey:h,rowData:a}),columnData:p,columnIndex:n,dataKey:h,isScrolling:r,parent:o,rowData:a,rowIndex:l}),m=this._cachedColumnStyles[n],y="string"===typeof g?g:null;return i.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:BN("ReactVirtualized__Table__rowColumn",f),key:"Row"+l+"-Col"+n,onClick:function(e){s&&s({columnData:p,dataKey:h,event:e})},role:"gridcell",style:m,title:y},g)}},{key:"_createHeader",value:function(e){var t,n,r,o,a,l=e.column,s=e.index,u=this.props,c=u.headerClassName,d=u.headerStyle,f=u.onHeaderClick,p=u.sort,h=u.sortBy,v=u.sortDirection,g=l.props,m=g.columnData,y=g.dataKey,b=g.defaultSortDirection,w=g.disableSort,x=g.headerRenderer,_=g.id,S=g.label,k=!w&&p,C=BN("ReactVirtualized__Table__headerColumn",c,l.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:k}),E=this._getFlexStyleForColumn(l,Ez({},d,{},l.props.headerStyle)),T=x({columnData:m,dataKey:y,disableSort:w,label:S,sortBy:h,sortDirection:v});if(k||f){var R=h!==y?b:v===wz.DESC?wz.ASC:wz.DESC,O=function(e){k&&p({defaultSortDirection:b,event:e,sortBy:y,sortDirection:R}),f&&f({columnData:m,dataKey:y,event:e})};a=l.props["aria-label"]||S||y,o="none",r=0,t=O,n=function(e){"Enter"!==e.key&&" "!==e.key||O(e)}}return h===y&&(o=v===wz.ASC?"ascending":"descending"),i.createElement("div",{"aria-label":a,"aria-sort":o,className:C,id:_,key:"Header-Col"+s,onClick:t,onKeyDown:n,role:"columnheader",style:E,tabIndex:r},T)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,o=e.key,a=e.parent,l=e.style,s=this.props,u=s.children,c=s.onRowClick,d=s.onRowDoubleClick,f=s.onRowRightClick,p=s.onRowMouseOver,h=s.onRowMouseOut,v=s.rowClassName,g=s.rowGetter,m=s.rowRenderer,y=s.rowStyle,b=this.state.scrollbarWidth,w="function"===typeof v?v({index:n}):v,x="function"===typeof y?y({index:n}):y,_=g({index:n}),S=i.Children.toArray(u).map((function(e,o){return t._createColumn({column:e,columnIndex:o,isScrolling:r,parent:a,rowData:_,rowIndex:n,scrollbarWidth:b})})),k=BN("ReactVirtualized__Table__row",w),C=Ez({},l,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:b},x);return m({className:k,columns:S,index:n,isScrolling:r,key:o,onRowClick:c,onRowDoubleClick:d,onRowRightClick:f,onRowMouseOver:p,onRowMouseOut:h,rowData:_,style:C})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=Ez({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:i.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,o=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:o})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(i.PureComponent);c(Tz,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:hF,overscanRowCount:10,rowRenderer:Sz,headerRowRenderer:bz,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),Tz.propTypes={};var Rz=[],Oz=null,Pz=null;function Iz(){Pz&&(Pz=null,document.body&&null!=Oz&&(document.body.style.pointerEvents=Oz),Oz=null)}function Az(){Iz(),Rz.forEach((function(e){return e.__resetIsScrolling()}))}function jz(e){e.currentTarget===window&&null==Oz&&document.body&&(Oz=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){Pz&&iF(Pz);var e=0;Rz.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),Pz=aF(Az,e)}(),Rz.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function Mz(e,t){Rz.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",jz),Rz.push(e)}function Dz(e,t){(Rz=Rz.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",jz),Pz&&(iF(Pz),Iz()))}var Lz,Nz,Fz=function(e){return e===window},zz=function(e){return e.getBoundingClientRect()};function Vz(e,t){if(e){if(Fz(e)){var n=window,r=n.innerHeight,o=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof o?o:0}}return zz(e)}return{height:t.serverHeight,width:t.serverWidth}}function Bz(e){return Fz(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function Uz(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}var Wz=function(){return"undefined"!==typeof window?window:void 0},Hz=(Nz=Lz=function(e){function t(){var e,n;fi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,o=n.width,i=this._child||Gw.findDOMNode(this);if(i instanceof Element&&e){var a=function(e,t){if(Fz(t)&&document.documentElement){var n=document.documentElement,r=zz(e),o=zz(n);return{top:r.top-o.top,left:r.left-o.left}}var i=Bz(t),a=zz(e),l=zz(t);return{top:a.top+i.top-l.top,left:a.left+i.left-l.left}}(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=Vz(e,this.props);r===l.height&&o===l.width||(this.setState({height:l.height,width:l.width}),t({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=xF(),this.updatePosition(e),e&&(Mz(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),Dz(this,r),Mz(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(Dz(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,o=t.scrollLeft,i=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:o,scrollTop:r,width:a})}}]),t}(i.PureComponent),c(Lz,"propTypes",null),Nz);c(Hz,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Wz(),serverHeight:0,serverWidth:0});var qz=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];Math.min,Math.max;var Gz=["top","right","bottom","left"];Gz.reduce((function(e,t){return e.concat(t,t+"-start",t+"-end")}),[]);function Qz(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $z(e){return Qz(e).getComputedStyle(e)}Math.min,Math.max;var Yz,Kz=Math.round;function Xz(e){var t=$z(e),n=parseFloat(t.width),r=parseFloat(t.height),o=e.offsetWidth,i=e.offsetHeight,a=Kz(n)!==o||Kz(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function Jz(e){return nV(e)?(e.nodeName||"").toLowerCase():""}function Zz(){if(Yz)return Yz;var e=navigator.userAgentData;return e&&Array.isArray(e.brands)?Yz=e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function eV(e){return e instanceof Qz(e).HTMLElement}function tV(e){return e instanceof Qz(e).Element}function nV(e){return e instanceof Qz(e).Node}function rV(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Qz(e).ShadowRoot||e instanceof ShadowRoot)}function oV(e){var t=$z(e),n=t.overflow,r=t.overflowX,o=t.overflowY,i=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(i)}function iV(){return/^((?!chrome|android).)*safari/i.test(Zz())}function aV(e){return["html","body","#document"].includes(Jz(e))}function lV(e){return tV(e)?e:e.contextElement}var sV={x:1,y:1};function uV(e){var t=lV(e);if(!eV(t))return sV;var n=t.getBoundingClientRect(),r=Xz(t),o=r.width,i=r.height,a=r.fallback,l=(a?Kz(n.width):n.width)/o,s=(a?Kz(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),s&&Number.isFinite(s)||(s=1),{x:l,y:s}}function cV(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);var a=e.getBoundingClientRect(),l=lV(e),s=sV;t&&(r?tV(r)&&(s=uV(r)):s=uV(e));var u=l?Qz(l):window,c=iV()&&n,d=(a.left+(c&&(null==(o=u.visualViewport)?void 0:o.offsetLeft)||0))/s.x,f=(a.top+(c&&(null==(i=u.visualViewport)?void 0:i.offsetTop)||0))/s.y,p=a.width/s.x,h=a.height/s.y;if(l)for(var v=Qz(l),g=r&&tV(r)?Qz(r):r,m=v.frameElement;m&&r&&g!==v;){var y=uV(m),b=m.getBoundingClientRect(),w=getComputedStyle(m);b.x+=(m.clientLeft+parseFloat(w.paddingLeft))*y.x,b.y+=(m.clientTop+parseFloat(w.paddingTop))*y.y,d*=y.x,f*=y.y,p*=y.x,h*=y.y,d+=b.x,f+=b.y,m=Qz(m).frameElement}return{width:p,height:h,top:f,right:d+p,bottom:f+h,left:d,x:d,y:f}}function dV(e){return((nV(e)?e.ownerDocument:e.document)||window.document).documentElement}function fV(e){if("html"===Jz(e))return e;var t=e.assignedSlot||e.parentNode||rV(e)&&e.host||dV(e);return rV(t)?t.host:t}function pV(e){var t=fV(e);return aV(t)?t.ownerDocument.body:eV(t)&&oV(t)?t:pV(t)}function hV(e,t){var n;void 0===t&&(t=[]);var r=pV(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Qz(r);return o?t.concat(i,i.visualViewport||[],oV(r)?r:[]):t.concat(r,hV(r))}var vV=i.useLayoutEffect,gV=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],mV=function(){};function yV(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function bV(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function kV(e){return SV(e)?window.pageYOffset:e.scrollTop}function CV(e,t){SV(e)?window.scrollTo(0,t):e.scrollTop=t}function EV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:mV,o=kV(e),i=t-o,a=10,l=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(l+=a,o,i,n);CV(e,s),ln.bottom?CV(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o1?t-1:0),r=1;r=h)return{placement:"bottom",maxHeight:t};if(k>=h&&!a)return i&&EV(s,C,T),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&_>=r)return i&&EV(s,C,T),{placement:"bottom",maxHeight:a?_-b:k-b};if("auto"===o||a){var R=t,O=a?x:S;return O>=r&&(R=Math.min(O-b-l,t)),{placement:"top",maxHeight:R}}if("bottom"===o)return i&&CV(s,C),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(S>=h&&!a)return i&&EV(s,E,T),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&x>=r){var P=t;return(!a&&S>=r||a&&x>=r)&&(P=a?x-w:S-w),i&&EV(s,E,T),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var NV=function(e){return"auto"===e?"bottom":e},FV=(0,i.createContext)(null),zV=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,a=e.menuPosition,l=e.menuShouldScrollIntoView,s=e.theme,u=((0,i.useContext)(FV)||{}).setPortalPlacement,c=(0,i.useRef)(null),d=lt((0,i.useState)(r),2),p=d[0],h=d[1],v=lt((0,i.useState)(null),2),g=v[0],m=v[1],y=s.spacing.controlHeight;return vV((function(){var e=c.current;if(e){var t="fixed"===a,i=LV({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:y});h(i.maxHeight),m(i.placement),null===u||void 0===u||u(i.placement)}}),[r,o,a,l,n,u,y]),t({ref:c,placerProps:f(f({},e),{},{placement:g||NV(o),maxHeight:p})})},VV=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return f({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},BV=VV,UV=VV,WV=function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};WV.defaultProps={children:"No options"};var HV=function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};HV.defaultProps={children:"Loading..."};var qV,GV=["size"];var QV={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},$V=function(e){var t=e.size,n=p(e,GV);return Ke("svg",me({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:QV},n))},YV=function(e){return Ke($V,me({size:20},e),Ke("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},KV=function(e){return Ke($V,me({size:20},e),Ke("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},XV=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return f({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},JV=XV,ZV=XV,eB=Ze(qV||(qV=HT(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),tB=function(e){var t=e.delay,n=e.offset;return Ke("span",{css:Je({animation:"".concat(eB," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},nB=function(e){var t=e.innerProps,n=e.isRtl;return Ke("div",me({},_V(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Ke(tB,{delay:0,offset:n}),Ke(tB,{delay:160,offset:!0}),Ke(tB,{delay:320,offset:!n}))};nB.defaultProps={size:4};var rB=["data"],oB=["innerRef","isDisabled","isHidden","inputClassName"],iB={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},aB={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":f({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},iB)},lB=function(e){return f({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},iB)},sB=function(e){var t=e.children,n=e.innerProps;return Ke("div",n,t)};var uB={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Ke(YV,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ke("div",me({ref:o},_V(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Ke(KV,null))},DownChevron:KV,CrossIcon:YV,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,s=e.label,u=e.theme,c=e.selectProps;return Ke("div",me({},_V(e,"group",{group:!0}),l),Ke(i,me({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),s),Ke("div",null,t))},GroupHeading:function(e){var t=xV(e);t.data;var n=p(t,rB);return Ke("div",me({},_V(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Ke("span",me({},t,_V(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=xV(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,s=p(r,oB);return Ke("div",me({},_V(e,"input",{"input-container":!0}),{"data-value":n||""}),Ke("input",me({className:t({input:!0},l),ref:o,style:lB(a),disabled:i},s)))},LoadingIndicator:nB,Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Ke("div",me({},_V(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Ke("div",me({},_V(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,a=e.menuPlacement,l=e.menuPosition,s=(0,i.useRef)(null),u=(0,i.useRef)(null),c=lt((0,i.useState)(NV(a)),2),d=c[0],p=c[1],h=(0,i.useMemo)((function(){return{setPortalPlacement:p}}),[]),v=lt((0,i.useState)(null),2),g=v[0],m=v[1],y=(0,i.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===l?0:window.pageYOffset,n=e[d]+t;n===(null===g||void 0===g?void 0:g.offset)&&e.left===(null===g||void 0===g?void 0:g.rect.left)&&e.width===(null===g||void 0===g?void 0:g.rect.width)||m({offset:n,rect:e})}}),[r,l,d,null===g||void 0===g?void 0:g.offset,null===g||void 0===g?void 0:g.rect.left,null===g||void 0===g?void 0:g.rect.width]);vV((function(){y()}),[y]);var b=(0,i.useCallback)((function(){"function"===typeof u.current&&(u.current(),u.current=null),r&&s.current&&(u.current=function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.ancestorScroll,a=void 0===i||i,l=o.ancestorResize,s=void 0===l||l,u=o.elementResize,c=void 0===u||u,d=o.animationFrame,f=void 0!==d&&d,p=a&&!f,h=p||s?[].concat(yt(tV(e)?hV(e):e.contextElement?hV(e.contextElement):[]),yt(hV(t))):[];h.forEach((function(e){p&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)}));var v,g=null;if(c){var m=!0;g=new ResizeObserver((function(){m||n(),m=!1})),tV(e)&&!f&&g.observe(e),tV(e)||!e.contextElement||f||g.observe(e.contextElement),g.observe(t)}var y=f?cV(e):null;return f&&function t(){var r=cV(e);!y||r.x===y.x&&r.y===y.y&&r.width===y.width&&r.height===y.height||n(),y=r,v=requestAnimationFrame(t)}(),n(),function(){var e;h.forEach((function(e){p&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)})),null==(e=g)||e.disconnect(),g=null,f&&cancelAnimationFrame(v)}}(r,s.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);vV((function(){b()}),[b]);var w=(0,i.useCallback)((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==l||!g)return null;var x=Ke("div",me({ref:w},_V(f(f({},e),{},{offset:g.offset,position:l,rect:g.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Ke(FV.Provider,{value:h},t?(0,Gw.createPortal)(x,t):x)},LoadingMessage:HV,NoOptionsMessage:WV,MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,s=n.Container,u=n.Label,c=n.Remove;return Ke(s,{data:r,innerProps:f(f({},_V(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ke(u,{data:r,innerProps:f({},_V(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Ke(c,{data:r,innerProps:f(f({},_V(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},MultiValueContainer:sB,MultiValueLabel:sB,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Ke("div",me({role:"button"},n),t||Ke(YV,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Ke("div",me({},_V(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Ke("div",me({},_V(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Ke("div",me({},_V(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Ke("div",me({},_V(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Ke("div",me({},_V(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},cB=function(e){return f(f({},uB),e.components)},dB=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function fB(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,s=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t){var c=l?" disabled":"",d="".concat(s?"selected":"focused").concat(c);return"option ".concat(i," ").concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},gB=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,l=e.selectValue,s=e.selectProps,u=e.id,c=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,h=s.isMulti,v=s.isOptionDisabled,g=s.isSearchable,m=s.menuIsOpen,y=s.options,b=s.screenReaderStatus,w=s.tabSelectsValue,x=s["aria-label"],_=s["aria-live"],S=(0,i.useMemo)((function(){return f(f({},vB),c||{})}),[c]),k=(0,i.useMemo)((function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,s=t.value,u=i||r||(e=s,Array.isArray(e)?null:e),c=u?d(u):"",p=o||a||void 0,h=p?p.map(d):[],g=f({isDisabled:u&&v(u,l),label:c,labels:h},t);n=S.onChange(g)}return n}),[t,S,v,l,d]),C=(0,i.useMemo)((function(){var e="",t=n||r,i=!!(n&&l&&l.includes(n));if(t&&S.onFocus){var a={focused:t,label:d(t),isDisabled:v(t,l),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:l};e=S.onFocus(a)}return e}),[n,r,d,v,S,o,l]),E=(0,i.useMemo)((function(){var e="";if(m&&y.length&&S.onFilter){var t=b({count:o.length});e=S.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,m,S,y,b]),T=(0,i.useMemo)((function(){var e="";if(S.guidance){var t=r?"value":m?"menu":"input";e=S.guidance({"aria-label":x,context:t,isDisabled:n&&v(n,l),isMulti:h,isSearchable:g,tabSelectsValue:w})}return e}),[x,n,r,h,v,g,m,S,l,w]),R="".concat(C," ").concat(E," ").concat(T),O=Ke(i.Fragment,null,Ke("span",{id:"aria-selection"},k),Ke("span",{id:"aria-context"},R)),P="initial-input-focus"===(null===t||void 0===t?void 0:t.action);return Ke(i.Fragment,null,Ke(hB,{id:u},P&&O),Ke(hB,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text"},a&&!P&&O))},mB=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],yB=new RegExp("["+mB.map((function(e){return e.letters})).join("")+"]","g"),bB={},wB=0;wB-1}},RB=["innerRef"];function OB(e){var t=e.innerRef,n=p(e,RB),r=DV(n,"onExited","in","enter","exit","appear");return Ke("input",me({ref:t},r,{css:Je({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var PB=function(e){e.preventDefault(),e.stopPropagation()};var IB=["boxSizing","height","overflow","paddingRight","position"],AB={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function jB(e){e.preventDefault()}function MB(e){e.stopPropagation()}function DB(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function LB(){return"ontouchstart"in window||navigator.maxTouchPoints}var NB=!("undefined"===typeof window||!window.document||!window.document.createElement),FB=0,zB={capture:!1,passive:!1};var VB=function(){return document.activeElement&&document.activeElement.blur()},BB={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function UB(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,l=(0,i.useRef)(!1),s=(0,i.useRef)(!1),u=(0,i.useRef)(0),c=(0,i.useRef)(null),d=(0,i.useCallback)((function(e,t){if(null!==c.current){var i=c.current,u=i.scrollTop,d=i.scrollHeight,f=i.clientHeight,p=c.current,h=t>0,v=d-f-u,g=!1;v>t&&l.current&&(r&&r(e),l.current=!1),h&&s.current&&(a&&a(e),s.current=!1),h&&t>v?(n&&!l.current&&n(e),p.scrollTop=d,g=!0,l.current=!0):!h&&-t>u&&(o&&!s.current&&o(e),p.scrollTop=0,g=!0,s.current=!0),g&&PB(e)}}),[n,r,o,a]),f=(0,i.useCallback)((function(e){d(e,e.deltaY)}),[d]),p=(0,i.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),h=(0,i.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;d(e,t)}),[d]),v=(0,i.useCallback)((function(e){if(e){var t=!!AV&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",h,t)}}),[h,p,f]),g=(0,i.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",h,!1))}),[h,p,f]);return(0,i.useEffect)((function(){if(t){var e=c.current;return v(e),function(){g(e)}}}),[t,v,g]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,i.useRef)({}),a=(0,i.useRef)(null),l=(0,i.useCallback)((function(e){if(NB){var t=document.body,n=t&&t.style;if(r&&IB.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&FB<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+i||0;Object.keys(AB).forEach((function(e){var t=AB[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&LB()&&(t.addEventListener("touchmove",jB,zB),e&&(e.addEventListener("touchstart",DB,zB),e.addEventListener("touchmove",MB,zB))),FB+=1}}),[r]),s=(0,i.useCallback)((function(e){if(NB){var t=document.body,n=t&&t.style;FB=Math.max(FB-1,0),r&&FB<1&&IB.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&LB()&&(t.removeEventListener("touchmove",jB,zB),e&&(e.removeEventListener("touchstart",DB,zB),e.removeEventListener("touchmove",MB,zB)))}}),[r]);return(0,i.useEffect)((function(){if(t){var e=a.current;return l(e),function(){s(e)}}}),[t,l,s]),function(e){a.current=e}}({isEnabled:n});return Ke(i.Fragment,null,n&&Ke("div",{onClick:VB,css:BB}),t((function(e){o(e),a(e)})))}var WB={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},HB=function(e){var t=e.name,n=e.onFocus;return Ke("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:WB,value:"",onChange:function(){}})},qB={clearIndicator:ZV,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return f({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:JV,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return f({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return f({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return f(f({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},aB),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return f({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:UV,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return f((c(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),c(n,"position","absolute"),c(n,"width","100%"),c(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return f({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return f({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return f({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return f({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:BV,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return f({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return f({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return f({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return f({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var GB={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},QB={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:RV(),captureMenuScroll:!RV(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:TB(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function $B(e,t,n,r){return{type:"option",data:t,isDisabled:eU(e,t,n),isSelected:tU(e,t,n),label:JB(e,t),value:ZB(e,t),index:r}}function YB(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return $B(e,n,t,r)})).filter((function(t){return XB(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=$B(e,n,t,r);return XB(e,i)?i:void 0})).filter(jV)}function KB(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,yt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function XB(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!rU(e)||!i)&&nU(e,{label:a,value:l,data:o},r)}var JB=function(e,t){return e.getOptionLabel(t)},ZB=function(e,t){return e.getOptionValue(t)};function eU(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function tU(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ZB(e,t);return n.some((function(t){return ZB(e,t)===r}))}function nU(e,t,n){return!e.filterOption||e.filterOption(t,n)}var rU=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},oU=1,iU=function(e){xt(n,e);var t=mi(n);function n(e){var r;if(fi(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,l=o&&r.isOptionSelected(e,a),s=r.isOptionDisabled(e,a);if(l){var u=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(s)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(yt(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=MV(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(MV(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=MV(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return rU(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,l=t.isClearable,s=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,v=p.focusedValue,g=p.selectValue;if(!s&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)r.removeValue(v);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):l&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++oU),r.state.selectValue=wV(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.buildFocusableOptions(),i=o.indexOf(r.state.selectValue[0]);r.state.focusedOption=o[i]}return r}return di(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&TV(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(TV(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var l=i.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(GB):f(f({},GB),this.props.theme):GB}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,l=this.props,s=l.isMulti,u=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:c,selectOption:i,selectProps:l,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return eU(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return tU(this.props,e,t)}},{key:"filterOption",value:function(e,t){return nU(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,l=e.form,s=e.menuIsOpen,u=e.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,h=d.ariaSelection,v=this.commonProps,g=r||this.getElementId("input"),m=f(f(f({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox"},s&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===h||void 0===h?void 0:h.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?i.createElement(c,me({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:l,type:"text",value:o},m)):i.createElement(OB,me({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:mV,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:l,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,f=c.isDisabled,p=c.isMulti,h=c.inputValue,v=c.placeholder,g=this.state,m=g.selectValue,y=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!d)return h?null:i.createElement(s,me({},u,{key:"placeholder",isDisabled:f,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),v);if(p)return m.map((function(t,l){var s=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return i.createElement(n,me({},u,{components:{Container:r,Label:o,Remove:a},isFocused:s,isDisabled:f,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var w=m[0];return i.createElement(l,me({},u,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.createElement(e,me({},t,{innerProps:l,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!e||!o)return null;return i.createElement(e,me({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.createElement(n,me({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.createElement(e,me({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,u=t.NoOptionsMessage,c=t.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,v=p.inputValue,g=p.isLoading,m=p.loadingMessage,y=p.minMenuHeight,b=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,_=p.menuPosition,S=p.menuPortalTarget,k=p.menuShouldBlockScroll,C=p.menuShouldScrollIntoView,E=p.noOptionsMessage,T=p.onMenuScrollToTop,R=p.onMenuScrollToBottom;if(!w)return null;var O,P=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,l=t.isSelected,s=t.label,u=t.value,p=f===o,h=a?void 0:function(){return e.onOptionHover(o)},v=a?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),m={id:g,onClick:v,onMouseMove:h,onMouseOver:h,tabIndex:-1};return i.createElement(c,me({},d,{innerProps:m,data:o,isDisabled:a,isSelected:l,key:g,label:s,type:r,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())O=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,l=t.index,s="".concat(e.getElementId("group"),"-").concat(l),u="".concat(s,"-heading");return i.createElement(n,me({},d,{key:s,data:o,options:a,Heading:r,headingProps:{id:u,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(g){var I=m({inputValue:v});if(null===I)return null;O=i.createElement(s,d,I)}else{var A=E({inputValue:v});if(null===A)return null;O=i.createElement(u,d,A)}var j={minMenuHeight:y,maxMenuHeight:b,menuPlacement:x,menuPosition:_,menuShouldScrollIntoView:C},M=i.createElement(zV,me({},d,j),(function(t){var n=t.ref,r=t.placerProps,l=r.placement,s=r.maxHeight;return i.createElement(o,me({},d,j,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:g,placement:l}),i.createElement(UB,{captureEnabled:h,onTopArrive:T,onBottomArrive:R,lockEnabled:k},(function(t){return i.createElement(a,me({},d,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:g,maxHeight:s,focusedOption:f}),O)})))}));return S||"fixed"===_?i.createElement(l,me({},d,{appendTo:S,controlElement:this.controlRef,menuPlacement:x,menuPosition:_}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,l=t.required,s=this.state.selectValue;if(a&&!r){if(l&&!this.hasValue())return i.createElement(HB,{name:a,onFocus:this.onValueInputFocus});if(o){if(n){var u=s.map((function(t){return e.getOptionValue(t)})).join(n);return i.createElement("input",{name:a,type:"hidden",value:u})}var c=s.length>0?s.map((function(t,n){return i.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):i.createElement("input",{name:a,type:"hidden",value:""});return i.createElement("div",null,c)}var d=s[0]?this.getOptionValue(s[0]):"";return i.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,l=t.selectValue,s=this.getFocusableOptions();return i.createElement(gB,me({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:l,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,l=a.className,s=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.createElement(r,me({},f,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),i.createElement(t,me({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),i.createElement(o,me({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),i.createElement(n,me({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,l=t.prevWasFocused,s=e.options,u=e.value,c=e.menuIsOpen,d=e.inputValue,p=e.isMulti,h=wV(u),v={};if(n&&(u!==n.value||s!==n.options||c!==n.menuIsOpen||d!==n.inputValue)){var g=c?function(e,t){return KB(YB(e,t))}(e,h):[],m=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,g);v={selectValue:h,focusedOption:y,focusedValue:m,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,x=a&&l;return a&&!x&&(w={value:MV(p,h,h[0]||null),options:h,action:"initial-input-focus"},x=!l),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(w=null),f(f(f({},v),b),{},{prevProps:e,ariaSelection:w,prevWasFocused:x})}}]),n}(i.Component);iU.defaultProps=QB;var aU,lU=(0,i.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,a=e.defaultValue,l=void 0===a?null:a,s=e.inputValue,u=e.menuIsOpen,c=e.onChange,d=e.onInputChange,h=e.onMenuClose,v=e.onMenuOpen,g=e.value,m=p(e,qz),y=lt((0,i.useState)(void 0!==s?s:n),2),b=y[0],w=y[1],x=lt((0,i.useState)(void 0!==u?u:o),2),_=x[0],S=x[1],k=lt((0,i.useState)(void 0!==g?g:l),2),C=k[0],E=k[1],T=(0,i.useCallback)((function(e,t){"function"===typeof c&&c(e,t),E(e)}),[c]),R=(0,i.useCallback)((function(e,t){var n;"function"===typeof d&&(n=d(e,t)),w(void 0!==n?n:e)}),[d]),O=(0,i.useCallback)((function(){"function"===typeof v&&v(),S(!0)}),[v]),P=(0,i.useCallback)((function(){"function"===typeof h&&h(),S(!1)}),[h]),I=void 0!==s?s:b,A=void 0!==u?u:_,j=void 0!==g?g:C;return f(f({},m),{},{inputValue:I,menuIsOpen:A,onChange:T,onInputChange:R,onMenuClose:P,onMenuOpen:O,value:j})}(e);return i.createElement(iU,me({ref:t},n))})),sU=lU,uU=function(t){var n=t.setFiltersSelected,r=t.beacons,o=t.groups,i=t.services,a=Object.values(UT);return(0,e.jsxs)("div",{children:[(0,e.jsx)(GL,{size:"sm",mb:2,children:" Filter by platform, service, group, and beacon"}),(0,e.jsx)(sU,{isSearchable:!0,isMulti:!0,options:function(e,t,n){return[{label:"Platform",options:a.map((function(e){return{name:e,value:e,label:e,kind:"platform"}}))},{label:"Service",options:n.map((function(e){return f(f({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Group",options:t.map((function(e){return f(f({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Beacon",options:e.map((function(e){return f(f({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:"beacon"})}))}]}(r,o,i),onChange:n,filterOption:TB({matchFrom:"any",stringify:function(e){return"".concat(e.label)}})})]})},cU=lt(vt({name:"".concat(aU="Card","StylesContext"),errorMessage:'useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<'.concat(aU,' />" ')}),2),dU=cU[0],fU=cU[1],pU=["className","children","direction","justify","align"],hU=sw((function(t,n){var r=wr(t),o=r.className,i=r.children,a=r.direction,l=void 0===a?"column":a,s=r.justify,u=r.align,c=p(r,pU),d=hw("Card",t);return(0,e.jsx)(iw.div,f(f({ref:n,className:St("chakra-card",o),__css:f({display:"flex",flexDirection:l,justifyContent:s,alignItems:u,position:"relative",minWidth:0,wordWrap:"break-word"},d.container)},c),{},{children:(0,e.jsx)(dU,{value:d,children:i})}))})),vU=["className"],gU=sw((function(t,n){var r=t.className,o=p(t,vU),i=fU();return(0,e.jsx)(iw.div,f({ref:n,className:St("chakra-card__body",r),__css:i.body},o))})),mU=lt(st({name:"CheckboxGroupContext",strict:!1}),2),yU=(mU[0],mU[1]),bU=["isIndeterminate","isChecked"];function wU(t){return(0,e.jsx)(iw.svg,f(f({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},t),{},{children:(0,e.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})}))}function xU(t){return(0,e.jsx)(iw.svg,f(f({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},t),{},{children:(0,e.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}))}function _U(t){var n=t.isIndeterminate,r=t.isChecked,o=p(t,bU),i=n?xU:wU;return r||n?(0,e.jsx)(iw.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,e.jsx)(i,f({},o))}):null}var SU=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],kU={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},CU={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},EU=Ze({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),TU=Ze({from:{opacity:0},to:{opacity:1}}),RU=Ze({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),OU=sw((function(t,n){var r=yU(),o=hw("Checkbox",f(f({},r),t)),a=wr(t),l=a.spacing,s=void 0===l?"0.5rem":l,u=a.className,c=a.children,d=a.iconColor,h=a.iconSize,v=a.icon,g=void 0===v?(0,e.jsx)(_U,{}):v,m=a.isChecked,y=a.isDisabled,b=void 0===y?null==r?void 0:r.isDisabled:y,w=a.onChange,x=a.inputProps,_=p(a,SU),S=m;(null==r?void 0:r.value)&&a.value&&(S=r.value.includes(a.value));var k=w;(null==r?void 0:r.onChange)&&a.value&&(k=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){if(!(t.beacon.indexOf(e.id)>-1))return!1;a=!0}if(t.service.length>0){if(!(i&&t.service.indexOf(null===i||void 0===i?void 0:i.id)>-1))return!1;a=!0}if(t.group.length>0){if(!(o&&t.group.indexOf(null===o||void 0===o?void 0:o.id)>-1))return!1;a=!0}if(t.platform.length>0){var l;if(!(t.platform.indexOf(null===e||void 0===e||null===(l=e.host)||void 0===l?void 0:l.platform)>-1))return!1;a=!0}return a}))}),[l]),p=(0,i.useCallback)((function(e,t){return c?e.filter((function(e){return t[null===e||void 0===e?void 0:e.id]})):e}),[c]);return(0,i.useEffect)((function(){var n=p(e,t);n=f(n),o(n)}),[e,t,l,c]),{filteredBeacons:r,setTypeFilters:s,viewOnlySelected:c,setViewOnlySelected:d}}(n,a),u=s.filteredBeacons,c=s.setTypeFilters,d=s.setViewOnlySelected,p=(0,i.useCallback)((function(e){l((function(t){var n=f({},t);return n[e]=!t[e],n}))}),[]),h=(0,i.useCallback)((function(){l((function(e){var t=f({},e);return u.map((function(e){t[e.id]=!0})),t}))}),[u]),v=(0,i.useCallback)((function(){l((function(e){var t=f({},e);return u.map((function(e){t[e.id]=!1})),t}))}),[u]);var g=function(){var e=0;for(var t in a)!0===a[t]&&(e+=1);return e}();return(0,e.jsx)("div",{className:"flex flex-col gap-4",children:(0,e.jsxs)(OL,{direction:"column",gap:"4",children:[(0,e.jsx)(kL,{children:(0,e.jsxs)("div",{className:"flex flex-row justify-between gap-8",children:[(0,e.jsx)("div",{className:" flex-1",children:(0,e.jsx)(uU,{setFiltersSelected:c,groups:r,services:o,beacons:n})}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)(WL,{htmlFor:"isSelected",children:(0,e.jsx)(GL,{size:"sm",children:"Filter by selected"})}),(0,e.jsx)(mN,{id:"isSelected",className:"pt-1",colorScheme:"purple",onChange:function(){return d((function(e){return!e}))}})]})]})}),(0,e.jsx)(kL,{children:(0,e.jsx)(wN,{p:2,className:"option-container",borderRadius:"md",children:(0,e.jsxs)(OL,{direction:"column",gap:2,width:"full",height:"full",children:[(0,e.jsxs)(kL,{children:[(0,e.jsx)(kL,{children:(0,e.jsxs)(PN,{leftIcon:(0,e.jsx)(MN,{className:"h-4 w-4"}),size:"sm",onClick:function(){return h()},children:["Select all (",u.length,")"]})}),(0,e.jsx)(kL,{children:(0,e.jsx)(PN,{leftIcon:(0,e.jsx)(DN,{className:" h-4 w-4"}),size:"sm",onClick:function(){return v()},children:"Clear selected"})})]}),0===u.length&&(0,e.jsx)(kL,{children:(0,e.jsxs)(jN,{fontSize:"sm",p:2,textAlign:"center",children:[u.length!==n.length&&"Try adjusting filter. ","No results found."]})}),(0,e.jsx)(kL,{className:"md-scroll-container",children:(0,e.jsx)(DU,{disableHeight:!0,children:function(t){var n=t.width;return(0,e.jsx)(MU,{cellRenderer:function(t){return function(t,n){var r=t.columnIndex,o=t.key,i=t.rowIndex,l=t.style,s=1*i+r;return(0,e.jsx)("div",{style:l,children:(0,e.jsx)(jU,{index:s,style:{width:n,height:100},beaconsToDisplay:u,toggleCheck:p,beaconsSelected:a})},o)}(t,n)},columnCount:1,columnWidth:n,height:100*u.length,rowCount:u.length,rowHeight:100,width:n})}})})]})})}),(0,e.jsx)(kL,{className:"flex flex-row items-end justify-end w-full",children:(0,e.jsxs)(GL,{size:"sm",mb:2,className:" self-end text-right",children:["Total beacons selected (",g,")"]})})]})})},NU=function(t){var n=t.setCurrStep,r=t.formik,o=lt((0,i.useState)({}),2),a=o[0],l=o[1],s=(0,i.useContext)(ZP),u=s.data,c=s.isLoading,d=(s.error,function(e){var t=new Date;return e.filter((function(e){return SL(new Date(e.lastSeenAt),{seconds:e.interval,minutes:1})>=t}))}((null===u||void 0===u?void 0:u.beacons)||[])),f=function(e){for(var t in e)if(!0===e[t])return!0;return!1}(a);return(0,e.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Select agent beacons"}),(0,e.jsx)("p",{className:"text-sm text-gray-700 italic",children:"Only active beacons are available for selection"})]}),c||void 0===u?(0,e.jsx)(cO,{type:uO.loading,label:"Loading beacons..."}):(0,e.jsx)(LU,{beacons:d,groups:(null===u||void 0===u?void 0:u.groupTags)||[],services:(null===u||void 0===u?void 0:u.serviceTags)||[],selectedBeacons:a,setSelectedBeacons:l}),(0,e.jsx)("div",{className:"flex flex-row gap-2",children:(0,e.jsx)("button",{className:"btn-primary",onClick:function(){return function(e){var t=[];for(var o in e)!0===e[o]&&t.push(o);r.setFieldValue("beacons",t),n(1)}(a)},disabled:!f,children:"Continue"})})]})},FU=["className","rows"];var zU=["h","minH","height","minHeight"],VU=sw((function(t,n){var r=pw("Textarea",t),o=wr(t),i=o.className,a=o.rows,l=YL(p(o,FU)),s=a?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(r,zU):r;return(0,e.jsx)(iw.textarea,f(f({ref:n,rows:a},l),{},{className:St("chakra-textarea",i),__css:s}))}));VU.displayName="Textarea";var BU=function(t){var n,r,o=t.index,i=t.formik,a=t.field;return(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{htmlFor:"command",className:"block text-base font-semibold text-gray-900",children:null===a||void 0===a?void 0:a.label}),(0,e.jsx)("div",{className:"mt-2",children:(0,e.jsx)(VU,{rows:4,name:null===a||void 0===a?void 0:a.name,id:null===a||void 0===a?void 0:a.name,className:"block w-full p-2 placeholder-gray-500 rounded-md border-0 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:py-1.5 sm:text-sm sm:leading-6",placeholder:(null===a||void 0===a?void 0:a.placeholder)||"Enter tome param",value:(null===i||void 0===i||null===(n=i.values)||void 0===n||null===(r=n.params[o])||void 0===r?void 0:r.value)||"",onChange:function(e){var t,n=null===i||void 0===i||null===(t=i.values)||void 0===t?void 0:t.params;n[o].value=e.target.value,i.setFieldValue("params",n)}})})]},null===a||void 0===a?void 0:a.name)},UU=["id","passive"],WU=(0,i.createContext)(null);function HU(){var e=(0,i.useContext)(WU);if(null===e){var t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,HU),t}return e}function qU(){var e=lt((0,i.useState)([]),2),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((function(){return function(e){var t=yC((function(e){return n((function(t){return[].concat(yt(t),[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}})),r=(0,i.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return i.createElement(WU.Provider,{value:r},e.children)}}),[n])]}var GU="label";var QU=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-label-".concat(n):r,i=e.passive,a=void 0!==i&&i,l=p(e,UU),s=HU(),u=xC(t);hC((function(){return s.register(o)}),[o,s.register]);var c=f(f({ref:u},s.props),{},{id:o});return a&&("onClick"in c&&(delete c.htmlFor,delete c.onClick),"onClick"in l&&delete l.onClick),tC({ourProps:c,theirProps:l,slot:s.slot||{},defaultTag:GU,name:s.name||"Label"})})),$U=Object.assign(QU,{});function YU(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,o=Object.entries(e);r is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,oW),n}return t}rW.displayName="RadioGroupDataContext";var iW=(0,i.createContext)(null);function aW(e){var t=(0,i.useContext)(iW);if(null===t){var n=new Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,aW),n}return t}function lW(e,t){return Yk(t.type,nW,e,t)}iW.displayName="RadioGroupActionsContext";var sW="div";var uW=function(e){return e[e.Empty=1]="Empty",e[e.Active=2]="Active",e}(uW||{}),cW="div";var dW=oC((function(e,t){var n=KC(),r=e.id,o=void 0===r?"headlessui-radiogroup-".concat(n):r,a=e.value,l=e.defaultValue,s=e.name,u=e.onChange,d=e.by,h=void 0===d?function(e,t){return e===t}:d,v=e.disabled,g=void 0!==v&&v,m=p(e,ZU),y=yC("string"==typeof h?function(e,t){var n=h;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:h),b=lt((0,i.useReducer)(lW,{options:[]}),2),w=b[0],x=b[1],_=w.options,S=lt(qU(),2),k=S[0],C=S[1],E=lt(VE(),2),T=E[0],R=E[1],O=(0,i.useRef)(null),P=xC(O,t),I=function(e,t,n){var r=lt((0,i.useState)(n),2),o=r[0],a=r[1],l=void 0!==e,s=(0,i.useRef)(l),u=(0,i.useRef)(!1),c=(0,i.useRef)(!1);return!l||s.current||u.current?!l&&s.current&&!c.current&&(c.current=!0,s.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,s.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:o,yC((function(e){return l||a(e),null==t?void 0:t(e)}))]}(a,u,l),A=lt(I,2),j=A[0],M=A[1],D=(0,i.useMemo)((function(){return _.find((function(e){return!e.propsRef.current.disabled}))}),[_]),L=(0,i.useMemo)((function(){return _.some((function(e){return y(e.propsRef.current.value,j)}))}),[_,j]),N=yC((function(e){var t;if(g||y(e,j))return!1;var n=null==(t=_.find((function(t){return y(t.propsRef.current.value,e)})))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==M||M(e),!0)}));!function(e){var t=e.container,n=e.accept,r=e.walk,o=e.enabled,a=void 0===o||o,l=(0,i.useRef)(n),s=(0,i.useRef)(r);(0,i.useEffect)((function(){l.current=n,s.current=r}),[n,r]),hC((function(){if(t&&a){var e=tE(t);if(e)for(var n=l.current,r=s.current,o=Object.assign((function(e){return n(e)}),{acceptNode:n}),i=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);i.nextNode();)r(i.currentNode)}}),[t,a,l,s])}({container:O.current,accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var F=yC((function(e){var t=O.current;if(t){var n=tE(t),r=_.filter((function(e){return!1===e.propsRef.current.disabled})).map((function(e){return e.element.current}));switch(e.key){case $C.Enter:!function(e){var t,n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){var r,o=gt(n.elements);try{for(o.s();!(r=o.n()).done;){var i=r.value;if("INPUT"===i.tagName&&"submit"===i.type||"BUTTON"===i.tagName&&"submit"===i.type||"INPUT"===i.nodeName&&"image"===i.type)return void i.click()}}catch(a){o.e(a)}finally{o.f()}}}(e.currentTarget);break;case $C.ArrowLeft:case $C.ArrowUp:if(e.preventDefault(),e.stopPropagation(),fE(r,rE.Previous|rE.WrapAround)===oE.Success){var o=_.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));o&&N(o.propsRef.current.value)}break;case $C.ArrowRight:case $C.ArrowDown:if(e.preventDefault(),e.stopPropagation(),fE(r,rE.Next|rE.WrapAround)===oE.Success){var i=_.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));i&&N(i.propsRef.current.value)}break;case $C.Space:e.preventDefault(),e.stopPropagation();var a=_.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));a&&N(a.propsRef.current.value)}}})),z=yC((function(e){return x(f({type:0},e)),function(){return x({type:1,id:e.id})}})),V=(0,i.useMemo)((function(){return f({value:j,firstOption:D,containsCheckedOption:L,disabled:g,compare:y},w)}),[j,D,L,g,y,w]),B=(0,i.useMemo)((function(){return{registerOption:z,change:N}}),[z,N]),U={ref:P,id:o,role:"radiogroup","aria-labelledby":k,"aria-describedby":T,onKeyDown:F},W=(0,i.useMemo)((function(){return{value:j}}),[j]),H=(0,i.useRef)(null),q=TC();return(0,i.useEffect)((function(){H.current&&void 0!==l&&q.addEventListener(H.current,"reset",(function(){N(l)}))}),[H,N]),i.createElement(R,{name:"RadioGroup.Description"},i.createElement(C,{name:"RadioGroup.Label"},i.createElement(iW.Provider,{value:B},i.createElement(rW.Provider,{value:V},null!=s&&null!=j&&YU(c({},s,j)).map((function(e,t){var n=lt(e,2),r=n[0],o=n[1];return i.createElement(eE,f({features:ZC.Hidden,ref:0===t?function(e){var t;H.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0},iC({key:r,as:"input",type:"radio",checked:null!=o,hidden:!0,readOnly:!0,name:r,value:o})))})),tC({ourProps:U,theirProps:m,slot:W,defaultTag:sW,name:"RadioGroup"})))))})),fW=oC((function(e,t){var n,r=KC(),o=e.id,a=void 0===o?"headlessui-radiogroup-option-".concat(r):o,l=e.value,s=e.disabled,u=void 0!==s&&s,c=p(e,eW),d=(0,i.useRef)(null),f=xC(d,t),h=lt(qU(),2),v=h[0],g=h[1],m=lt(VE(),2),y=m[0],b=m[1],w=OC(1),x=w.addFlag,_=w.removeFlag,S=w.hasFlag,k=gC({value:l,disabled:u}),C=oW("RadioGroup.Option"),E=aW("RadioGroup.Option");hC((function(){return E.registerOption({id:a,element:d,propsRef:k})}),[a,E,d,e]);var T=yC((function(e){var t;if(YC(e.currentTarget))return e.preventDefault();E.change(l)&&(x(2),null==(t=d.current)||t.focus())})),R=yC((function(e){if(YC(e.currentTarget))return e.preventDefault();x(2)})),O=yC((function(){return _(2)})),P=(null==(n=C.firstOption)?void 0:n.id)===a,I=C.disabled||u,A=C.compare(C.value,l),j={ref:f,id:a,role:"radio","aria-checked":A?"true":"false","aria-labelledby":v,"aria-describedby":y,"aria-disabled":!!I||void 0,tabIndex:I?-1:A||!C.containsCheckedOption&&P?0:-1,onClick:I?void 0:T,onFocus:I?void 0:R,onBlur:I?void 0:O},M=(0,i.useMemo)((function(){return{checked:A,disabled:I,active:S(2)}}),[A,I,S]);return i.createElement(b,{name:"RadioGroup.Description"},i.createElement(g,{name:"RadioGroup.Label"},tC({ourProps:j,theirProps:c,slot:M,defaultTag:cW,name:"RadioGroup.Option"})))})),pW=Object.assign(dW,{Option:fW,Label:$U,Description:WE});function hW(){for(var e=arguments.length,t=new Array(e),n=0;n0&&(null===p||void 0===p||null===(u=p.values)||void 0===u?void 0:u.params.map((function(t,n){return(0,e.jsx)(BU,{field:t,index:n,formik:p},t.name)}))),(0,e.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,e.jsx)("button",{className:"inline-flex items-center rounded-md bg-gray-50 py-3 px-4 text-sm font-semibold text-purple-600 shadow-sm hover:bg-purple-100",onClick:function(){return f(0)},children:"Back"}),(0,e.jsx)("button",{className:"btn-primary",onClick:function(e){e.preventDefault(),p.handleSubmit()},disabled:h,type:"submit",children:"Submit"})]})]})},SW=function(){var t=lt((0,i.useState)(0),2),n=t[0],r=t[1],o=xL(),a=o.submitQuest,l=(o.loading,o.error,o.reset,aL({initialValues:{name:"",tome:null,params:[],beacons:[]},onSubmit:function(e){return a(e)}}));return(0,e.jsx)("form",{id:"create-quest-form",className:"py-6",children:(0,e.jsxs)("div",{className:"grid grid-cols-12",children:[(0,e.jsx)("div",{className:" col-span-3",children:(0,e.jsx)(wL,{currStep:n,steps:[{name:"Select agent beacons",description:"Step 1",href:"#",step:0},{name:"Select a tome",description:"Step 2",href:"#",step:1}]})}),(0,e.jsx)("div",{className:"col-span-9",children:function(t){switch(t){case 0:return(0,e.jsx)(NU,{setCurrStep:r,formik:l});case 1:return(0,e.jsx)(_W,{setCurrStep:r,formik:l});default:return(0,e.jsx)("div",{children:"An error has occured"})}}(n)})]})})},kW=function(){var t,n=(0,i.useContext)(ZP),r=n.data,o=n.isLoading,a=n.error;return(0,e.jsxs)(mO,{currNavItem:BT.createQuest,children:[(0,e.jsx)("div",{className:"border-b border-gray-200 pb-6 sm:flex sm:items-center sm:justify-between",children:(0,e.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Create new quest"})}),o?(0,e.jsx)(cO,{type:uO.loading,label:"loading beacon info..."}):a?(0,e.jsx)(cO,{type:uO.error,label:"Error loading beacon info"}):null!==r&&void 0!==r&&r.beacons&&(null===r||void 0===r||null===(t=r.beacons)||void 0===t?void 0:t.length)>0?(0,e.jsx)(SW,{}):(0,e.jsx)(cO,{type:uO.noData,label:"No beacons found",details:"Get started by deploying an imix agent on your target system.",children:(0,e.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",onClick:function(){return window.open("https://docs.realm.pub/user-guide/getting-started#start-the-agent","_blank")},children:"See imix docs"})})]})},CW=n(7441),EW=n(9613),TW=n.n(EW);var RW=function(e){function t(e,r,s,u,f){for(var p,h,v,g,w,_=0,S=0,k=0,C=0,E=0,A=0,M=v=p=0,L=0,N=0,F=0,z=0,V=s.length,B=V-1,U="",W="",H="",q="";Lp)&&(z=(U=U.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var UW=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&BW(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=qW&&(qW=t+1),WW.set(e,t),HW.set(t,e)},YW="style["+FW+'][data-styled-version="5.3.11"]',KW=new RegExp("^"+FW+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),XW=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(FW))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(FW,"active"),r.setAttribute("data-styled-version","5.3.11");var a=ZW();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},tH=function(){function e(e){var t=this.element=eH(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+",")})),r+=""+l+s+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),lH=/(a)(d)/gi,sH=function(e){return String.fromCharCode(e+(e>25?39:97))};function uH(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=sH(t%52)+n;return(sH(t%52)+n).replace(lH,"$1-$2")}var cH=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},dH=function(e){return cH(5381,e)};function fH(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var l=n(i,"."+a,void 0,r);t.insertRules(r,a,l)}o.push(a),this.staticRulesId=a}else{for(var s=this.rules.length,u=cH(this.baseHash,n.hash),c="",d=0;d>>0);if(!t.hasNameForId(r,v)){var g=n(c,"."+v,void 0,r);t.insertRules(r,v,g)}o.push(v)}}return o.join(" ")},e}(),vH=/^\s*\/\/.*$/gm,gH=[":","[",".","#"];function mH(e){var t,n,r,o,i=void 0===e?MW:e,a=i.options,l=void 0===a?MW:a,s=i.plugins,u=void 0===s?jW:s,c=new RW(l),d=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,l,s,u,c,d){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),p=function(e,r,i){return 0===r&&-1!==gH.indexOf(i[n.length])||i.match(o)?e:"."+t};function h(e,i,a,l){void 0===l&&(l="&");var s=e.replace(vH,""),u=i&&a?a+" "+i+" { "+s+" }":s;return t=l,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(a||!i?"":i,u)}return c.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,p))},f,function(e){if(-2===e){var t=d;return d=[],t}}])),h.hash=u.length?u.reduce((function(e,t){return t.name||BW(15),cH(e,t.name)}),5381).toString():"",h}var yH=i.createContext(),bH=(yH.Consumer,i.createContext()),wH=(bH.Consumer,new aH),xH=mH();function _H(){return(0,i.useContext)(yH)||wH}function SH(){return(0,i.useContext)(bH)||xH}function kH(e){var t=(0,i.useState)(e.stylisPlugins),n=t[0],r=t[1],o=_H(),a=(0,i.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,i.useMemo)((function(){return mH({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,i.useEffect)((function(){TW()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),i.createElement(yH.Provider,{value:a},i.createElement(bH.Provider,{value:l},e.children))}var CH=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xH);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return BW(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=xH),this.name+e.hash},e}(),EH=/([A-Z])/,TH=/([A-Z])/g,RH=/^ms-/,OH=function(e){return"-"+e.toLowerCase()};function PH(e){return EH.test(e)?e.replace(TH,OH).replace(RH,"-ms-"):e}var IH=function(e){return null==e||!1===e||""===e};function AH(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,l=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,NH=/(^-|-$)/g;function FH(e){return e.replace(LH,"-").replace(NH,"")}var zH=function(e){return uH(dH(e)>>>0)};function VH(e){return"string"==typeof e&&!0}var BH=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},UH=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function WH(e,t,n){var r=e[n];BH(t)&&BH(r)?HH(r,t):e[n]=t}function HH(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(VH(e)?e:FH(LW(e)));return QH(e,PW({},o,{attrs:p,componentId:i}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?HH({},e.defaultProps,t):t}}),Object.defineProperty(v,"toString",{value:function(){return"."+v.styledComponentId}}),o&&Ye()(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var $H=function(e){return function e(t,n,r){if(void 0===r&&(r=MW),!(0,CW.isValidElementType)(n))return BW(1,String(n));var o=function(){return t(n,r,MH.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,PW({},r,{},o))},o.attrs=function(o){return e(t,n,PW({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(QH,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){$H[e]=$H(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=fH(e),aH.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(AH(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&aH.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=ZW();return""},this.getStyleTags=function(){return e.sealed?BW(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return BW(2);var n=((t={})[FW]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=ZW();return r&&(n.nonce=r),[i.createElement("style",PW({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new aH({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?BW(2):i.createElement(kH,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return BW(3)}}();var YH=function(e){var t=i.forwardRef((function(t,n){var r=(0,i.useContext)(qH),o=e.defaultProps,a=DH(t,r,o);return i.createElement(e,PW({},t,{theme:a,ref:n}))}));return Ye()(t,e),t.displayName="WithTheme("+LW(e)+")",t},KH=$H,XH=n(4687),JH=n.n(XH);function ZH(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e.reduce((function(e,t){return ZH({},e,n[t])}),t)}function tq(e){return e.join(" ")}function nq(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,l=e.key,s=t.properties,u=t.type,c=t.tagName,d=t.value;if("text"===u)return d;if(c){var f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return nq({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a),p=a&&s.className&&s.className.filter((function(e){return!n[e]})),h=p&&p.length?p:void 0,v=a?ZH({},s,{className:h&&tq(h)},{style:eq(s.className,Object.assign({},s.style,o),n)}):ZH({},s,{className:tq(s.className)}),g=f(t.children);return i.createElement(c,me({key:l},v),g)}}var rq=/\n/g;function oq(e){var t=e.codeString,n=e.codeStyle,r=e.containerProps,o=void 0===r?{}:r,a=e.numberProps,l=e.startingLineNumber;return o.style=o.style||{float:"left",paddingRight:"10px"},i.createElement("code",me({},o,{style:Object.assign({},n,o.style)}),function(e){var t=e.lines,n=e.startingLineNumber,r=e.numberProps,o=void 0===r?{}:r;return t.map((function(e,t){var r=t+n,a="function"===typeof o?o(r):o;return i.createElement("span",me({key:"line-".concat(t),className:"react-syntax-highlighter-line-number"},a),"".concat(r,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),numberProps:a,startingLineNumber:l}))}function iq(e){var t=e.children,n=e.lineNumber,r=e.lineProps,o=e.className,i=void 0===o?[]:o,a=("function"===typeof r?r(n):r)||{};return a.className=a.className?i.concat(a.className):i,{type:"element",tagName:"span",properties:a,children:t}}function aq(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r=0||(o[n]=e[n]);return o}function hq(e,t){return t||(t=e.slice(0)),e.raw=t,e}var vq="light";function gq(e){var t=e;return function(e){var n=function(e){return dq({mode:vq},null===e||void 0===e?void 0:e.theme)}(e);return t[n.mode]}}var mq=function(e){var t={theme:e};return{lineNumberColor:gq({light:"#383a42",dark:"#abb2bf"})(t),lineNumberBgColor:gq({light:"#fafafa",dark:"#282c34"})(t),backgroundColor:gq({light:"#fafafa",dark:"#282c34"})(t),textColor:gq({light:"#383a42",dark:"#abb2bf"})(t),substringColor:gq({light:"#e45649",dark:"#e06c75"})(t),keywordColor:gq({light:"#a626a4",dark:"#c678dd"})(t),attributeColor:gq({light:"#50a14f",dark:"#98c379"})(t),selectorAttributeColor:gq({light:"#e45649",dark:"#e06c75"})(t),docTagColor:gq({light:"#a626a4",dark:"#c678dd"})(t),nameColor:gq({light:"#e45649",dark:"#e06c75"})(t),builtInColor:gq({light:"#c18401",dark:"#e6c07b"})(t),literalColor:gq({light:"#0184bb",dark:"#56b6c2"})(t),bulletColor:gq({light:"#4078f2",dark:"#61aeee"})(t),codeColor:gq({light:"#383a42",dark:"#abb2bf"})(t),additionColor:gq({light:"#50a14f",dark:"#98c379"})(t),regexpColor:gq({light:"#50a14f",dark:"#98c379"})(t),symbolColor:gq({light:"#4078f2",dark:"#61aeee"})(t),variableColor:gq({light:"#986801",dark:"#d19a66"})(t),templateVariableColor:gq({light:"#986801",dark:"#d19a66"})(t),linkColor:gq({light:"#4078f2",dark:"#61aeee"})(t),selectorClassColor:gq({light:"#986801",dark:"#d19a66"})(t),typeColor:gq({light:"#986801",dark:"#d19a66"})(t),stringColor:gq({light:"#50a14f",dark:"#98c379"})(t),selectorIdColor:gq({light:"#4078f2",dark:"#61aeee"})(t),quoteColor:gq({light:"#a0a1a7",dark:"#5c6370"})(t),templateTagColor:gq({light:"#383a42",dark:"#abb2bf"})(t),deletionColor:gq({light:"#e45649",dark:"#e06c75"})(t),titleColor:gq({light:"#4078f2",dark:"#61aeee"})(t),sectionColor:gq({light:"#e45649",dark:"#e06c75"})(t),commentColor:gq({light:"#a0a1a7",dark:"#5c6370"})(t),metaKeywordColor:gq({light:"#383a42",dark:"#abb2bf"})(t),metaColor:gq({light:"#4078f2",dark:"#61aeee"})(t),functionColor:gq({light:"#383a42",dark:"#abb2bf"})(t),numberColor:gq({light:"#986801",dark:"#d19a66"})(t)}},yq="inherit",bq="inherit",wq={fontSize:bq,fontFamily:yq,lineHeight:20/12,padding:8},xq=function(e){return{fontSize:bq,lineHeight:20/14,color:e.lineNumberColor,backgroundColor:e.lineNumberBgColor,flexShrink:0,padding:8,textAlign:"right",userSelect:"none"}},_q=function(e){return{key:{color:e.keywordColor,fontWeight:"bolder"},keyword:{color:e.keywordColor,fontWeight:"bolder"},"attr-name":{color:e.attributeColor},selector:{color:e.selectorTagColor},comment:{color:e.commentColor,fontFamily:yq,fontStyle:"italic"},"block-comment":{color:e.commentColor,fontFamily:yq,fontStyle:"italic"},"function-name":{color:e.sectionColor},"class-name":{color:e.sectionColor},doctype:{color:e.docTagColor},substr:{color:e.substringColor},namespace:{color:e.nameColor},builtin:{color:e.builtInColor},entity:{color:e.literalColor},bullet:{color:e.bulletColor},code:{color:e.codeColor},addition:{color:e.additionColor},regex:{color:e.regexpColor},symbol:{color:e.symbolColor},variable:{color:e.variableColor},url:{color:e.linkColor},"selector-attr":{color:e.selectorAttributeColor},"selector-pseudo":{color:e.selectorPseudoColor},type:{color:e.typeColor},string:{color:e.stringColor},quote:{color:e.quoteColor},tag:{color:e.templateTagColor},deletion:{color:e.deletionColor},title:{color:e.titleColor},section:{color:e.sectionColor},"meta-keyword":{color:e.metaKeywordColor},meta:{color:e.metaColor},italic:{fontStyle:"italic"},bold:{fontWeight:"bolder"},function:{color:e.functionColor},number:{color:e.numberColor}}},Sq=function(e){return{fontSize:bq,fontFamily:yq,background:e.backgroundColor,color:e.textColor,borderRadius:3,display:"flex",lineHeight:20/14,overflowX:"auto",whiteSpace:"pre"}},kq=function(e){return dq({'pre[class*="language-"]':Sq(e)},_q(e))},Cq=function(e){return dq({'pre[class*="language-"]':dq({},Sq(e),{padding:"2px 4px",display:"inline",whiteSpace:"pre-wrap"})},_q(e))};function Eq(e){void 0===e&&(e={mode:"light"});var t=dq({},mq(e),e);return{lineNumberContainerStyle:xq(t),codeBlockStyle:kq(t),inlineCodeStyle:Cq(t),codeContainerStyle:wq}}var Tq=Object.freeze([{name:"PHP",alias:["php","php3","php4","php5"],value:"php"},{name:"Java",alias:["java"],value:"java"},{name:"CSharp",alias:["csharp","c#"],value:"cs"},{name:"Python",alias:["python","py"],value:"python"},{name:"JavaScript",alias:["javascript","js"],value:"javascript"},{name:"XML",alias:["xml"],value:"xml"},{name:"HTML",alias:["html","htm"],value:"html"},{name:"C++",alias:["c++","cpp","clike"],value:"cpp"},{name:"Ruby",alias:["ruby","rb","duby"],value:"ruby"},{name:"Objective-C",alias:["objective-c","objectivec","obj-c","objc"],value:"objectivec"},{name:"C",alias:["c"],value:"cpp"},{name:"Swift",alias:["swift"],value:"swift"},{name:"TeX",alias:["tex","latex"],value:"tex"},{name:"Shell",alias:["shell","bash","sh","ksh","zsh"],value:"shell"},{name:"Scala",alias:["scala"],value:"scala"},{name:"Go",alias:["go"],value:"go"},{name:"ActionScript",alias:["actionscript","actionscript3","as"],value:"actionscript"},{name:"ColdFusion",alias:["coldfusion"],value:"xml"},{name:"JavaFX",alias:["javafx","jfx"],value:"java"},{name:"VbNet",alias:["vbnet","vb.net"],value:"vbnet"},{name:"JSON",alias:["json"],value:"json"},{name:"MATLAB",alias:["matlab"],value:"matlab"},{name:"Groovy",alias:["groovy"],value:"groovy"},{name:"SQL",alias:["sql","postgresql","postgres","plpgsql","psql","postgresql-console","postgres-console","tsql","t-sql","mysql","sqlite"],value:"sql"},{name:"R",alias:["r"],value:"r"},{name:"Perl",alias:["perl","pl"],value:"perl"},{name:"Lua",alias:["lua"],value:"lua"},{name:"Delphi",alias:["delphi","pas","pascal","objectpascal"],value:"delphi"},{name:"XML",alias:["xml"],value:"xml"},{name:"TypeScript",alias:["typescript","ts","tsx"],value:"typescript"},{name:"CoffeeScript",alias:["coffeescript","coffee-script","coffee"],value:"coffeescript"},{name:"Haskell",alias:["haskell","hs"],value:"haskell"},{name:"Puppet",alias:["puppet"],value:"puppet"},{name:"Arduino",alias:["arduino"],value:"arduino"},{name:"Fortran",alias:["fortran"],value:"fortran"},{name:"Erlang",alias:["erlang","erl"],value:"erlang"},{name:"PowerShell",alias:["powershell","posh","ps1","psm1"],value:"powershell"},{name:"Haxe",alias:["haxe","hx","hxsl"],value:"haxe"},{name:"Elixir",alias:["elixir","ex","exs"],value:"elixir"},{name:"Verilog",alias:["verilog","v"],value:"verilog"},{name:"Rust",alias:["rust"],value:"rust"},{name:"VHDL",alias:["vhdl"],value:"vhdl"},{name:"Sass",alias:["sass"],value:"less"},{name:"OCaml",alias:["ocaml"],value:"ocaml"},{name:"Dart",alias:["dart"],value:"dart"},{name:"CSS",alias:["css"],value:"css"},{name:"reStructuredText",alias:["restructuredtext","rst","rest"],value:"rest"},{name:"ObjectPascal",alias:["objectpascal"],value:"delphi"},{name:"Kotlin",alias:["kotlin"],value:"kotlin"},{name:"D",alias:["d"],value:"d"},{name:"Octave",alias:["octave"],value:"matlab"},{name:"QML",alias:["qbs","qml"],value:"qml"},{name:"Prolog",alias:["prolog"],value:"prolog"},{name:"FoxPro",alias:["foxpro","vfp","clipper","xbase"],value:"vbnet"},{name:"Scheme",alias:["scheme","scm"],value:"scheme"},{name:"CUDA",alias:["cuda","cu"],value:"cpp"},{name:"Julia",alias:["julia","jl"],value:"julia"},{name:"Racket",alias:["racket","rkt"],value:"lisp"},{name:"Ada",alias:["ada","ada95","ada2005"],value:"ada"},{name:"Tcl",alias:["tcl"],value:"tcl"},{name:"Mathematica",alias:["mathematica","mma","nb"],value:"mathematica"},{name:"Autoit",alias:["autoit"],value:"autoit"},{name:"StandardML",alias:["standardmL","sml","standardml"],value:"sml"},{name:"Objective-J",alias:["objective-j","objectivej","obj-j","objj"],value:"objectivec"},{name:"Smalltalk",alias:["smalltalk","squeak","st"],value:"smalltalk"},{name:"Vala",alias:["vala","vapi"],value:"vala"},{name:"ABAP",alias:["abap"],value:"sql"},{name:"LiveScript",alias:["livescript","live-script"],value:"livescript"},{name:"XQuery",alias:["xquery","xqy","xq","xql","xqm"],value:"xquery"},{name:"PlainText",alias:["text","plaintext"],value:"text"},{name:"Yaml",alias:["yaml","yml"],value:"yaml"},{name:"GraphQL",alias:["graphql","gql"],value:"graphql"}]),Rq=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._isMounted=!1,t}fq(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0},n.componentWillUnmount=function(){this._isMounted=!1},n.getLineOpacity=function(e){if(!this.props.highlight)return 1;var t=this.props.highlight.split(",").map((function(e){if(e.indexOf("-")>0){var t=e.split("-").map(Number).sort(),n=t[0],r=t[1];return Array(r+1).fill(void 0).map((function(e,t){return t})).slice(n,r+1)}return Number(e)})).reduce((function(e,t){return e.concat(t)}),[]);return 0===t.length||t.includes(e)?1:.3},n.render=function(){var e=this,t=Eq(this.props.theme).inlineCodeStyle,n={language:function(e){if(!e)return"";var t=Tq.find((function(t){return t.name===e||t.alias.includes(e)}));return t?t.value:e||"text"}(this.props.language),PreTag:this.props.preTag,style:this.props.codeStyle||t,showLineNumbers:this.props.showLineNumbers,codeTagProps:this.props.codeTagProps};return i.createElement(cq,Object.assign({},n,{wrapLines:this.props.highlight.length>0,customStyle:this.props.customStyle,lineProps:function(t){return{style:dq({opacity:e.getLineOpacity(t)},e.props.lineNumberContainerStyle)}}}),this.props.text)},t}(i.PureComponent);Rq.defaultProps={theme:{},showLineNumbers:!1,lineNumberContainerStyle:{},codeTagProps:{},preTag:"span",highlight:"",customStyle:{}};var Oq="text",Pq=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._isMounted=!1,t.handleCopy=function(e){var t=e.nativeEvent.clipboardData;if(t){e.preventDefault();var n=window.getSelection();if(null===n)return;var r=n.toString(),o=""+r+"
";t.clearData(),t.setData("text/html",o),t.setData("text/plain",r)}},t}fq(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0},n.componentWillUnmount=function(){this._isMounted=!1},n.render=function(){var e,t,n,r,o=Eq(this.props.theme),a=o.lineNumberContainerStyle,l=o.codeBlockStyle,s=o.codeContainerStyle,u={language:this.props.language||Oq,codeStyle:dq({},l,null===(e=this.props)||void 0===e?void 0:e.codeBlockStyle),customStyle:null===(t=this.props)||void 0===t?void 0:t.customStyle,showLineNumbers:this.props.showLineNumbers,codeTagProps:{style:dq({},s,null===(n=this.props)||void 0===n?void 0:n.codeContainerStyle)},lineNumberContainerStyle:dq({},a,null===(r=this.props)||void 0===r?void 0:r.lineNumberContainerStyle),text:this.props.text.toString(),highlight:this.props.highlight};return i.createElement(Rq,Object.assign({},u))},t}(i.PureComponent);Pq.displayName="CodeBlock",Pq.defaultProps={showLineNumbers:!0,language:Oq,theme:{},highlight:"",lineNumberContainerStyle:{},customStyle:{},codeBlockStyle:{}};var Iq=function(e){var t=e.size,n=e.color,r=pq(e,["size","color"]);return i.createElement("svg",Object.assign({},r,{viewBox:"0 0 384 512",width:t,height:t,fill:n}),i.createElement("path",{d:"M280 240H168c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8zm0 96H168c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8zM112 232c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 48c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm144 408c0 4.4-3.6 8-8 8H56c-4.4 0-8-3.6-8-8V120c0-4.4 3.6-8 8-8h40v32c0 8.8 7.2 16 16 16h160c8.8 0 16-7.2 16-16v-32h40c4.4 0 8 3.6 8 8v336z"}))};Iq.displayName="ClipboardListIcon",Iq.defaultProps={size:"16pt",color:"currentcolor"};var Aq=function(e){var t=e.size,n=e.color,r=pq(e,["size","color"]);return i.createElement("svg",Object.assign({},r,{viewBox:"0 0 384 512",width:t,height:t,fill:n}),i.createElement("path",{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm121.2 231.8l-143 141.8c-4.7 4.7-12.3 4.6-17-.1l-82.6-83.3c-4.7-4.7-4.6-12.3.1-17L99.1 285c4.7-4.7 12.3-4.6 17 .1l46 46.4 106-105.2c4.7-4.7 12.3-4.6 17 .1l28.2 28.4c4.7 4.8 4.6 12.3-.1 17z"}))};function jq(e){var t=e.size,n=e.color,r=e.copied,o=pq(e,["size","color","copied"]);return r?i.createElement(Aq,Object.assign({},{color:n,size:t},o)):i.createElement(Iq,Object.assign({},{color:n,size:t},o))}Aq.displayName="ClipboardCheckIcon",Aq.defaultProps={size:"16pt",color:"currentcolor"};var Mq=function(){var e=(0,i.useState)(!1),t=e[0],n=e[1];return(0,i.useEffect)((function(){n(Boolean("undefined"!==typeof window&&window.document&&window.document.createElement))}),[]),{isBrowser:t,isServer:!t}},Dq=function(e){var t=document.createElement("div");return t.setAttribute("id",e),t},Lq=function(e){void 0===e&&(e=Math.random().toString(32).slice(2,10));var t="zeit-ui-"+e,n=Mq().isBrowser,r=(0,i.useState)(n?Dq(t):null),o=r[0],a=r[1];return(0,i.useEffect)((function(){var e=document.querySelector("#"+t),n=e||Dq(t);e||document.body.appendChild(n),a(n)}),[]),o},Nq={},Fq={onError:function(){return function(e,t){var n="[Zeit UI]"+(t?" ["+t+"]":" ")+": "+e;"undefined"!==typeof console&&(Nq[n]||(Nq[n]=!0,console.warn(n)))}("Failed to copy.","use-clipboard")}},zq=function(e){void 0===e&&(e=Fq);var t=Lq("clipboard"),n=(0,i.useCallback)((function(n){!function(t,n){if(t&&n){var r=window.getSelection();if(r){t.style.whiteSpace="pre",t.textContent=n;var o=window.document.createRange();r.removeAllRanges(),o.selectNode(t),r.addRange(o);try{window.document.execCommand("copy")}catch(i){e.onError&&e.onError()}r.removeAllRanges(),t&&(t.textContent="")}}}(t,n)}),[t]);return{copy:n}};function Vq(){var e=hq(["\n position: relative;\n background: ",";\n border-radius: 0.25rem;\n padding: ",";\n"]);return Vq=function(){return e},e}function Bq(){var e=hq(["\n position: absolute;\n top: 0.5em;\n right: 0.75em;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n background: ",";\n margin-top: 0.15rem;\n border-radius: 0.25rem;\n max-height: 2rem;\n max-width: 2rem;\n padding: 0.25rem;\n &:hover {\n opacity: ",";\n }\n &:focus {\n outline: none;\n opacity: 1;\n }\n .icon {\n width: 1rem;\n height: 1rem;\n }\n"]);return Bq=function(){return e},e}var Uq=KH.button(Bq(),(function(e){return e.theme.backgroundColor}),(function(e){return e.copied?1:.5})),Wq=KH.div(Vq(),(function(e){return e.theme.backgroundColor}),(function(e){return e.codeBlock?"0.25rem 0.5rem 0.25rem 0.25rem":"0.25rem"}));function Hq(e){var t=e.theme,n=e.text,r=e.codeBlock,o=void 0!==r&&r,a=e.customStyle,l=void 0===a?{}:a,s=pq(e,["theme","text","codeBlock","customStyle"]),u=(0,i.useState)(!1),c=u[0],d=u[1],f=zq().copy;return i.createElement(Wq,Object.assign({},{codeBlock:o},{style:l,theme:t}),o?i.createElement(Pq,Object.assign({text:n,theme:t},s)):i.createElement(Rq,Object.assign({text:n,theme:t},s)),i.createElement(Uq,Object.assign({type:"button",onClick:function(){f(n),d(!c)}},{theme:t,copied:c}),i.createElement(jq,{color:c?t.stringColor:t.textColor,copied:c,className:"icon",size:"16pt"})))}var qq=YH(Hq);function Gq(e){return i.createElement(qq,Object.assign({},e))}var Qq={lineNumberColor:"#4d4d4c",lineNumberBgColor:"white",backgroundColor:"white",textColor:"#4d4d4c",substringColor:"#4d4d4c",keywordColor:"#8959a8",attributeColor:"#eab700",selectorAttributeColor:"#8959a8",docTagColor:"#4d4d4c",nameColor:"#c82829",builtInColor:"#f5871f",literalColor:"#f5871f",bulletColor:"#718c00",codeColor:"#4d4d4c",additionColor:"#718c00",regexpColor:"#c82829",symbolColor:"#718c00",variableColor:"#c82829",templateVariableColor:"#c82829",linkColor:"#f5871f",selectorClassColor:"#c82829",typeColor:"#f5871f",stringColor:"#718c00",selectorIdColor:"#c82829",quoteColor:"#8e908c",templateTagColor:"#4d4d4c",deletionColor:"#c82829",titleColor:"#4271ae",sectionColor:"#4271ae",commentColor:"#8e908c",metaKeywordColor:"#4d4d4c",metaColor:"#f5871f",functionColor:"#4d4d4c",numberColor:"#f5871f"},$q=qP({displayName:"RepeatClockIcon",path:(0,e.jsxs)("g",{fill:"currentColor",children:[(0,e.jsx)("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),(0,e.jsx)("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})}),Yq=qP({displayName:"TimeIcon",path:(0,e.jsxs)("g",{fill:"currentColor",children:[(0,e.jsx)("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),(0,e.jsx)("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})}),Kq=n(1774),Xq=function(t){var n=t.task;return n.execFinishedAt?(0,e.jsx)("div",{children:(0,e.jsx)(xO,{fontSize:"0.8em",size:"large",colorScheme:"green",variant:"solid",children:(0,e.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,e.jsx)(Kq,{className:"w-5",color:"white"}),(0,e.jsx)("div",{children:"Finished"})]})})}):n.execStartedAt?(0,e.jsx)("div",{children:(0,e.jsx)(xO,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,e.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,e.jsx)($q,{w:4,h:4,color:"gray"}),(0,e.jsx)("div",{children:"In-Progress"})]})})}):(0,e.jsx)("div",{children:(0,e.jsx)(xO,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,e.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,e.jsx)(Yq,{w:4,h:4,color:"gray"}),(0,e.jsx)("div",{children:"Queued"})]})})})},Jq=function(t){var n,r,o,a,l,s,u,c=t.isOpen,d=t.setOpen,f=t.selectedTask,p=new Date((null===f||void 0===f?void 0:f.createdAt)||""),h=new Date((null===f||void 0===f?void 0:f.execFinishedAt)||""),v=new Date((null===f||void 0===f?void 0:f.execStartedAt)||""),g=null!==f&&void 0!==f&&null!==(n=f.quest)&&void 0!==n&&n.parameters?JSON.parse(null===f||void 0===f||null===(r=f.quest)||void 0===r?void 0:r.parameters):{},m=Object.keys(g);return(0,e.jsx)(QC.Root,{show:c,as:i.Fragment,children:(0,e.jsxs)(AT,{as:"div",className:"relative z-10",onClose:d,children:[(0,e.jsx)("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,e.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,e.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,e.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 ",children:(0,e.jsx)(QC.Child,{as:i.Fragment,enter:"transform transition ease-in-out duration-500 sm:duration-700",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:(0,e.jsx)(AT.Panel,{className:"pointer-events-auto w-screen max-w-xs md:max-w-md lg:max-w-4xl",children:(0,e.jsxs)("div",{className:"flex h-full flex-col overflow-y-scroll bg-white py-6 shadow-xl",children:[(0,e.jsx)("div",{className:"px-4 sm:px-6",children:(0,e.jsx)("div",{className:"flex w-full justify-end",children:(0,e.jsx)("div",{className:"ml-3 flex h-7 items-center",children:(0,e.jsxs)("button",{type:"button",className:"relative rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:function(){return d(!1)},children:[(0,e.jsx)("span",{className:"absolute -inset-2.5"}),(0,e.jsx)("span",{className:"sr-only",children:"Close panel"}),(0,e.jsx)(NT,{className:"h-6 w-6","aria-hidden":"true"})]})})})}),(0,e.jsxs)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6 flex flex-col gap-4",children:[(0,e.jsxs)("div",{className:"flex flex-row gap-4 items-center",children:[(0,e.jsx)("h2",{className:"text-3xl font-semibold text-gray-900",children:null===f||void 0===f||null===(o=f.quest)||void 0===o?void 0:o.name}),(0,e.jsx)(Xq,{task:f})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("h3",{className:"text-2xl",children:"Status"}),(0,e.jsxs)("div",{className:"flex flex-row gap-4 sm:gap-12 text-sm",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("span",{className:"font-semibold",children:"Created"}),(0,e.jsx)("span",{children:"".concat(p.toLocaleTimeString())}),(0,e.jsx)("span",{children:"on ".concat(p.toDateString())})]}),(null===f||void 0===f?void 0:f.execStartedAt)&&(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("span",{className:"font-semibold",children:"Started"}),(0,e.jsx)("span",{children:"".concat(v.toLocaleTimeString())}),(0,e.jsx)("span",{children:"on ".concat(v.toDateString())})]}),(null===f||void 0===f?void 0:f.execFinishedAt)&&(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("span",{className:"font-semibold",children:"Finished"}),(0,e.jsx)("span",{children:"".concat(h.toLocaleTimeString())}),(0,e.jsx)("span",{children:"on ".concat(h.toDateString())})]})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("h3",{className:"text-2xl text-gray-800",children:"Beacon"}),(0,e.jsx)(PU,{beaconData:null===f||void 0===f?void 0:f.beacon})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("h3",{className:"text-2xl text-gray-800",children:"Tome"}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h4",{className:"font-semibold text-gray-900",children:null===f||void 0===f||null===(a=f.quest)||void 0===a||null===(l=a.tome)||void 0===l?void 0:l.name}),(0,e.jsx)("p",{className:"text-sm",children:null===f||void 0===f||null===(s=f.quest)||void 0===s||null===(u=s.tome)||void 0===u?void 0:u.description})]}),m.length>0&&(0,e.jsx)("div",{className:"flex flex-row gap-8 flex-wrap text-sm",children:m.map((function(t){return(0,e.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,e.jsx)("div",{className:"font-semibold",children:t}),(0,e.jsx)("div",{children:g[t]})]},t)}))})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsx)("h3",{className:"text-2xl text-gray-800",children:"Output"}),(0,e.jsx)("div",{className:"bg-gray-200 rounded-md p-0.5",children:(0,e.jsx)(Gq,{text:null!==f&&void 0!==f&&f.output?null===f||void 0===f?void 0:f.output:"No output available",language:"",showLineNumbers:!1,theme:Qq,codeBlock:!0})})]})]})]})})})})})})]})})},Zq={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function eG(e,t,n,r){var o=xd(n);return(0,i.useEffect)((function(){var i="function"===typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),function(){i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),function(){var n="function"===typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}var tG=function(e,t){return{var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}},nG={arrowShadowColor:tG("--popper-arrow-shadow-color"),arrowSize:tG("--popper-arrow-size","8px"),arrowSizeHalf:tG("--popper-arrow-size-half"),arrowBg:tG("--popper-arrow-bg"),transformOrigin:tG("--popper-transform-origin"),arrowOffset:tG("--popper-arrow-offset")};var rG={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},oG={scroll:!0,resize:!0};var iG={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state;return function(){var e=t.elements.reference;t.elements.popper.style.width="".concat(e.offsetWidth,"px")}}},aG={name:"transformOrigin",enabled:!0,phase:"write",fn:function(e){var t=e.state;lG(t)},effect:function(e){var t=e.state;return function(){lG(t)}}},lG=function(e){var t;e.elements.popper.style.setProperty(nG.transformOrigin.var,(t=e.placement,rG[t]))},sG={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;uG(t)}},uG=function(e){var t;if(e.placement){var n=cG(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){var r,o;Object.assign(e.elements.arrow.style,(c(r={},n.property,n.value),c(r,"width",nG.arrowSize.varRef),c(r,"height",nG.arrowSize.varRef),c(r,"zIndex",-1),r));var i=(c(o={},nG.arrowSizeHalf.var,"calc(".concat(nG.arrowSize.varRef," / 2)")),c(o,nG.arrowOffset.var,"calc(".concat(nG.arrowSizeHalf.varRef," * -1)")),o);for(var a in i)e.elements.arrow.style.setProperty(a,i[a])}}},cG=function(e){return e.startsWith("top")?{property:"bottom",value:nG.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:nG.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:nG.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:nG.arrowOffset.varRef}:void 0},dG={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:function(e){var t=e.state;fG(t)},effect:function(e){var t=e.state;return function(){fG(t)}}},fG=function(e){if(e.elements.arrow){var t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(t){var n,r=(n=e.placement).includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0;r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:nG.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})}}},pG={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},hG={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function vG(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gG(e){return e instanceof vG(e).Element||e instanceof Element}function mG(e){return e instanceof vG(e).HTMLElement||e instanceof HTMLElement}function yG(e){return"undefined"!==typeof ShadowRoot&&(e instanceof vG(e).ShadowRoot||e instanceof ShadowRoot)}var bG=Math.max,wG=Math.min,xG=Math.round;function _G(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function SG(){return!/^((?!chrome|android).)*safari/i.test(_G())}function kG(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&mG(e)&&(o=e.offsetWidth>0&&xG(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&xG(r.height)/e.offsetHeight||1);var a=(gG(e)?vG(e):window).visualViewport,l=!SG()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/o,u=(r.top+(l&&a?a.offsetTop:0))/i,c=r.width/o,d=r.height/i;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s,x:s,y:u}}function CG(e){var t=vG(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function EG(e){return e?(e.nodeName||"").toLowerCase():null}function TG(e){return((gG(e)?e.ownerDocument:e.document)||window.document).documentElement}function RG(e){return kG(TG(e)).left+CG(e).scrollLeft}function OG(e){return vG(e).getComputedStyle(e)}function PG(e){var t=OG(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function IG(e,t,n){void 0===n&&(n=!1);var r=mG(t),o=mG(t)&&function(e){var t=e.getBoundingClientRect(),n=xG(t.width)/e.offsetWidth||1,r=xG(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=TG(t),a=kG(e,o,n),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(r||!r&&!n)&&(("body"!==EG(t)||PG(i))&&(l=function(e){return e!==vG(e)&&mG(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:CG(e);var t}(t)),mG(t)?((s=kG(t,!0)).x+=t.clientLeft,s.y+=t.clientTop):i&&(s.x=RG(i))),{x:a.left+l.scrollLeft-s.x,y:a.top+l.scrollTop-s.y,width:a.width,height:a.height}}function AG(e){var t=kG(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 jG(e){return"html"===EG(e)?e:e.assignedSlot||e.parentNode||(yG(e)?e.host:null)||TG(e)}function MG(e){return["html","body","#document"].indexOf(EG(e))>=0?e.ownerDocument.body:mG(e)&&PG(e)?e:MG(jG(e))}function DG(e,t){var n;void 0===t&&(t=[]);var r=MG(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=vG(r),a=o?[i].concat(i.visualViewport||[],PG(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(DG(jG(a)))}function LG(e){return["table","td","th"].indexOf(EG(e))>=0}function NG(e){return mG(e)&&"fixed"!==OG(e).position?e.offsetParent:null}function FG(e){for(var t=vG(e),n=NG(e);n&&LG(n)&&"static"===OG(n).position;)n=NG(n);return n&&("html"===EG(n)||"body"===EG(n)&&"static"===OG(n).position)?t:n||function(e){var t=/firefox/i.test(_G());if(/Trident/i.test(_G())&&mG(e)&&"fixed"===OG(e).position)return null;var n=jG(e);for(yG(n)&&(n=n.host);mG(n)&&["html","body"].indexOf(EG(n))<0;){var r=OG(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 zG="top",VG="bottom",BG="right",UG="left",WG="auto",HG=[zG,VG,BG,UG],qG="start",GG="end",QG="clippingParents",$G="viewport",YG="popper",KG="reference",XG=HG.reduce((function(e,t){return e.concat([t+"-"+qG,t+"-"+GG])}),[]),JG=[].concat(HG,[WG]).reduce((function(e,t){return e.concat([t,t+"-"+qG,t+"-"+GG])}),[]),ZG=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function eQ(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}function tQ(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var nQ={placement:"bottom",modifiers:[],strategy:"absolute"};function rQ(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function cQ(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?lQ(o):null,a=o?sQ(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case zG:t={x:l,y:n.y-r.height};break;case VG:t={x:l,y:n.y+n.height};break;case BG:t={x:n.x+n.width,y:s};break;case UG:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=i?uQ(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case qG:t[u]=t[u]-(n[c]/2-r[c]/2);break;case GG:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var dQ={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=cQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},fQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function pQ(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,d=e.isFixed,f=a.x,p=void 0===f?0:f,h=a.y,v=void 0===h?0:h,g="function"===typeof c?c({x:p,y:v}):{x:p,y:v};p=g.x,v=g.y;var m=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=UG,w=zG,x=window;if(u){var _=FG(n),S="clientHeight",k="clientWidth";if(_===vG(n)&&"static"!==OG(_=TG(n)).position&&"absolute"===l&&(S="scrollHeight",k="scrollWidth"),o===zG||(o===UG||o===BG)&&i===GG)w=VG,v-=(d&&_===x&&x.visualViewport?x.visualViewport.height:_[S])-r.height,v*=s?1:-1;if(o===UG||(o===zG||o===VG)&&i===GG)b=BG,p-=(d&&_===x&&x.visualViewport?x.visualViewport.width:_[k])-r.width,p*=s?1:-1}var C,E=Object.assign({position:l},u&&fQ),T=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:xG(t*r)/r||0,y:xG(n*r)/r||0}}({x:p,y:v}):{x:p,y:v};return p=T.x,v=T.y,s?Object.assign({},E,((C={})[w]=y?"0":"",C[b]=m?"0":"",C.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",C)):Object.assign({},E,((t={})[w]=y?v+"px":"",t[b]=m?p+"px":"",t.transform="",t))}var hQ={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:lQ(t.placement),variation:sQ(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,pQ(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,pQ(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:{}};var vQ={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];mG(o)&&EG(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}),{});mG(r)&&EG(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var gQ={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=JG.reduce((function(e,n){return e[n]=function(e,t,n){var r=lQ(e),o=[UG,zG].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,[UG,BG].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}},mQ={left:"right",right:"left",bottom:"top",top:"bottom"};function yQ(e){return e.replace(/left|right|bottom|top/g,(function(e){return mQ[e]}))}var bQ={start:"end",end:"start"};function wQ(e){return e.replace(/start|end/g,(function(e){return bQ[e]}))}function xQ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&yG(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function _Q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function SQ(e,t,n){return t===$G?_Q(function(e,t){var n=vG(e),r=TG(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;var u=SG();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l+RG(e),y:s}}(e,n)):gG(t)?function(e,t){var n=kG(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):_Q(function(e){var t,n=TG(e),r=CG(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=bG(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=bG(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+RG(e),s=-r.scrollTop;return"rtl"===OG(o||n).direction&&(l+=bG(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(TG(e)))}function kQ(e,t,n,r){var o="clippingParents"===t?function(e){var t=DG(jG(e)),n=["absolute","fixed"].indexOf(OG(e).position)>=0&&mG(e)?FG(e):e;return gG(n)?t.filter((function(e){return gG(e)&&xQ(e,n)&&"body"!==EG(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce((function(t,n){var o=SQ(e,n,r);return t.top=bG(o.top,t.top),t.right=wG(o.right,t.right),t.bottom=wG(o.bottom,t.bottom),t.left=bG(o.left,t.left),t}),SQ(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}function CQ(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function EQ(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function TQ(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?QG:l,u=n.rootBoundary,c=void 0===u?$G:u,d=n.elementContext,f=void 0===d?YG:d,p=n.altBoundary,h=void 0!==p&&p,v=n.padding,g=void 0===v?0:v,m=CQ("number"!==typeof g?g:EQ(g,HG)),y=f===YG?KG:YG,b=e.rects.popper,w=e.elements[h?y:f],x=kQ(gG(w)?w:w.contextElement||TG(e.elements.popper),s,c,a),_=kG(e.elements.reference),S=cQ({reference:_,element:b,strategy:"absolute",placement:o}),k=_Q(Object.assign({},b,S)),C=f===YG?k:_,E={top:x.top-C.top+m.top,bottom:C.bottom-x.bottom+m.bottom,left:x.left-C.left+m.left,right:C.right-x.right+m.right},T=e.modifiersData.offset;if(f===YG&&T){var R=T[o];Object.keys(E).forEach((function(e){var t=[BG,VG].indexOf(e)>=0?1:-1,n=[zG,VG].indexOf(e)>=0?"y":"x";E[e]+=R[n]*t}))}return E}var RQ={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,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,h=void 0===p||p,v=n.allowedAutoPlacements,g=t.options.placement,m=lQ(g),y=s||(m===g||!h?[yQ(g)]:function(e){if(lQ(e)===WG)return[];var t=yQ(e);return[wQ(e),t,wQ(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(lQ(n)===WG?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?JG:s,c=sQ(r),d=c?l?XG:XG.filter((function(e){return sQ(e)===c})):HG,f=d.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=d);var p=f.reduce((function(t,n){return t[n]=TQ(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[lQ(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:h,allowedAutoPlacements:v}):n)}),[]),w=t.rects.reference,x=t.rects.popper,_=new Map,S=!0,k=b[0],C=0;C=0,P=O?"width":"height",I=TQ(t,{placement:E,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),A=O?R?BG:UG:R?VG:zG;w[P]>x[P]&&(A=yQ(A));var j=yQ(A),M=[];if(i&&M.push(I[T]<=0),l&&M.push(I[A]<=0,I[j]<=0),M.every((function(e){return e}))){k=E,S=!1;break}_.set(E,M)}if(S)for(var D=function(e){var t=b.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},L=h?3:1;L>0;L--){if("break"===D(L))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function OQ(e,t,n){return bG(e,wG(t,n))}var PQ={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,d=n.padding,f=n.tether,p=void 0===f||f,h=n.tetherOffset,v=void 0===h?0:h,g=TQ(t,{boundary:s,rootBoundary:u,padding:d,altBoundary:c}),m=lQ(t.placement),y=sQ(t.placement),b=!y,w=uQ(m),x="x"===w?"y":"x",_=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,C="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,E="number"===typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(_){if(i){var O,P="y"===w?zG:UG,I="y"===w?VG:BG,A="y"===w?"height":"width",j=_[w],M=j+g[P],D=j-g[I],L=p?-k[A]/2:0,N=y===qG?S[A]:k[A],F=y===qG?-k[A]:-S[A],z=t.elements.arrow,V=p&&z?AG(z):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=B[P],W=B[I],H=OQ(0,S[A],V[A]),q=b?S[A]/2-L-H-U-E.mainAxis:N-H-U-E.mainAxis,G=b?-S[A]/2+L+H+W+E.mainAxis:F+H+W+E.mainAxis,Q=t.elements.arrow&&FG(t.elements.arrow),$=Q?"y"===w?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(O=null==T?void 0:T[w])?O:0,K=j+G-Y,X=OQ(p?wG(M,j+q-Y-$):M,j,p?bG(D,K):D);_[w]=X,R[w]=X-j}if(l){var J,Z="x"===w?zG:UG,ee="x"===w?VG:BG,te=_[x],ne="y"===x?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[zG,UG].indexOf(m),ae=null!=(J=null==T?void 0:T[x])?J:0,le=ie?re:te-S[ne]-k[ne]-ae+E.altAxis,se=ie?te+S[ne]+k[ne]-ae-E.altAxis:oe,ue=p&&ie?function(e,t,n){var r=OQ(e,t,n);return r>n?n:r}(le,te,se):OQ(p?le:re,te,p?se:oe);_[x]=ue,R[x]=ue-te}t.modifiersData[r]=R}},requiresIfExists:["offset"]},IQ=function(e,t){return CQ("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:EQ(e,HG))};var AQ={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=lQ(n.placement),s=uQ(l),u=[UG,BG].indexOf(l)>=0?"height":"width";if(i&&a){var c=IQ(o.padding,n),d=AG(i),f="y"===s?zG:UG,p="y"===s?VG:BG,h=n.rects.reference[u]+n.rects.reference[s]-a[s]-n.rects.popper[u],v=a[s]-n.rects.reference[s],g=FG(i),m=g?"y"===s?g.clientHeight||0:g.clientWidth||0:0,y=h/2-v/2,b=c[f],w=m-d[u]-c[p],x=m/2-d[u]/2+y,_=OQ(b,x,w),S=s;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-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)))&&xQ(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function jQ(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 MQ(e){return[zG,BG,VG,UG].some((function(t){return e[t]>=0}))}var DQ={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=TQ(t,{elementContext:"reference"}),l=TQ(t,{altBoundary:!0}),s=jQ(a,r),u=jQ(l,o,i),c=MQ(s),d=MQ(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},LQ=oQ({defaultModifiers:[aQ,dQ,hQ,vQ,gQ,RQ,PQ,AQ,DQ]}),NQ=["size","shadowColor","bg","style"];function FQ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,r=e.modifiers,o=e.placement,a=void 0===o?"bottom":o,l=e.strategy,s=void 0===l?"absolute":l,u=e.arrowPadding,c=void 0===u?8:u,d=e.eventListeners,h=void 0===d||d,v=e.offset,g=e.gutter,m=void 0===g?8:g,y=e.flip,b=void 0===y||y,w=e.boundary,x=void 0===w?"clippingParents":w,_=e.preventOverflow,S=void 0===_||_,k=e.matchWidth,C=e.direction,E=void 0===C?"ltr":C,T=(0,i.useRef)(null),R=(0,i.useRef)(null),O=(0,i.useRef)(null),P=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr",o=(null==(t=pG[e])?void 0:t[r])||e;return"ltr"===r?o:null!=(n=hG[e])?n:o}(a,E),I=(0,i.useRef)((function(){})),A=(0,i.useCallback)((function(){var e,t;n&&T.current&&R.current&&(null==(e=I.current)||e.call(I),O.current=LQ(T.current,R.current,{placement:P,modifiers:[dG,sG,aG,f(f({},iG),{},{enabled:!!k}),f({name:"eventListeners"},(t=h,"object"===typeof t?{enabled:!0,options:f(f({},oG),t)}:{enabled:t,options:oG})),{name:"arrow",options:{padding:c}},{name:"offset",options:{offset:null!=v?v:[0,m]}},{name:"flip",enabled:!!b,options:{padding:8}},{name:"preventOverflow",enabled:!!S,options:{boundary:x}}].concat(yt(null!=r?r:[])),strategy:s}),O.current.forceUpdate(),I.current=O.current.destroy)}),[P,n,r,k,h,c,v,m,b,S,x,s]);(0,i.useEffect)((function(){return function(){var e;T.current||R.current||(null==(e=O.current)||e.destroy(),O.current=null)}}),[]);var j=(0,i.useCallback)((function(e){T.current=e,A()}),[A]),M=(0,i.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:PL(j,e)})}),[j]),D=(0,i.useCallback)((function(e){R.current=e,A()}),[A]),L=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:PL(D,t),style:f(f({},e.style),{},{position:s,minWidth:k?void 0:"max-content",inset:"0 auto auto 0"})})}),[s,D,k]),N=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.size,e.shadowColor,e.bg,e.style;return f(f({},p(e,NQ)),{},{ref:t,"data-popper-arrow":"",style:zQ(e)})}),[]),F=(0,i.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,"data-popper-arrow-inner":""})}),[]);return{update:function(){var e;null==(e=O.current)||e.update()},forceUpdate:function(){var e;null==(e=O.current)||e.forceUpdate()},transformOrigin:nG.transformOrigin.varRef,referenceRef:j,popperRef:D,getPopperProps:L,getArrowProps:N,getArrowInnerProps:F,getReferenceProps:M}}function zQ(e){var t=e.size,n=e.shadowColor,r=e.bg,o=f(f({},e.style),{},{position:"absolute"});return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}var VQ=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","closeOnScroll","closeOnPointerDown","closeOnEsc","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"],BQ=function(e){var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},UQ=function(e){var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window};function WQ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.openDelay,n=void 0===t?0:t,r=e.closeDelay,o=void 0===r?0:r,a=e.closeOnClick,l=void 0===a||a,s=e.closeOnMouseDown,u=e.closeOnScroll,d=e.closeOnPointerDown,h=void 0===d?s:d,v=e.closeOnEsc,g=void 0===v||v,m=e.onOpen,y=e.onClose,b=e.placement,w=e.id,x=e.isOpen,_=e.defaultIsOpen,S=e.arrowSize,k=void 0===S?10:S,C=e.arrowShadowColor,E=e.arrowPadding,T=e.modifiers,R=e.isDisabled,O=e.gutter,P=e.offset,I=e.direction,A=p(e,VQ),j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,n=e.onOpen,r=e.isOpen,o=e.id,a=xd(n),l=xd(t),s=lt((0,i.useState)(e.defaultIsOpen||!1),2),u=s[0],c=s[1],d=void 0!==r?r:u,p=void 0!==r,h=(0,i.useId)(),v=null!=o?o:"disclosure-".concat(h),g=(0,i.useCallback)((function(){p||c(!1),null==l||l()}),[p,l]),m=(0,i.useCallback)((function(){p||c(!0),null==a||a()}),[p,a]),y=(0,i.useCallback)((function(){d?g():m()}),[d,m,g]);return{isOpen:d,onOpen:m,onClose:g,onToggle:y,isControlled:p,getButtonProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f(f({},e),{},{"aria-expanded":d,"aria-controls":v,onClick:function(t){var n;null==(n=e.onClick)||n.call(e,t),y()}})},getDisclosureProps:function(){return f(f({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{hidden:!d,id:v})}}}({isOpen:x,defaultIsOpen:_,onOpen:m,onClose:y}),M=j.isOpen,D=j.onOpen,L=j.onClose,N=FQ({enabled:M,placement:b,arrowPadding:E,modifiers:T,gutter:O,offset:P,direction:I}),F=N.referenceRef,z=N.getPopperProps,V=N.getArrowInnerProps,B=N.getArrowProps,U=(0,i.useId)(),W="tooltip-".concat(null!=w?w:U),H=(0,i.useRef)(null),q=(0,i.useRef)(),G=(0,i.useCallback)((function(){q.current&&(clearTimeout(q.current),q.current=void 0)}),[]),Q=(0,i.useRef)(),$=(0,i.useCallback)((function(){Q.current&&(clearTimeout(Q.current),Q.current=void 0)}),[]),Y=(0,i.useCallback)((function(){$(),L()}),[L,$]),K=function(e,t){return(0,i.useEffect)((function(){var n=BQ(e);return n.addEventListener(HQ,t),function(){return n.removeEventListener(HQ,t)}}),[t,e]),function(){var t=BQ(e),n=UQ(e);t.dispatchEvent(new n.CustomEvent(HQ))}}(H,Y),X=(0,i.useCallback)((function(){if(!R&&!q.current){K();var e=UQ(H);q.current=e.setTimeout(D,n)}}),[K,R,D,n]),J=(0,i.useCallback)((function(){G();var e=UQ(H);Q.current=e.setTimeout(Y,o)}),[o,Y,G]),Z=(0,i.useCallback)((function(){M&&l&&J()}),[l,J,M]),ee=(0,i.useCallback)((function(){M&&h&&J()}),[h,J,M]),te=(0,i.useCallback)((function(e){M&&"Escape"===e.key&&J()}),[M,J]);eG((function(){return BQ(H)}),"keydown",g?te:void 0),eG((function(){return BQ(H)}),"scroll",(function(){M&&u&&Y()})),(0,i.useEffect)((function(){R&&(G(),M&&L())}),[R,M,L,G]),(0,i.useEffect)((function(){return function(){G(),$()}}),[G,$]),eG((function(){return H.current}),"pointerleave",J);var ne=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return f(f({},e),{},{ref:PL(H,t,F),onPointerEnter:Ot(e.onPointerEnter,(function(e){"touch"!==e.pointerType&&X()})),onClick:Ot(e.onClick,Z),onPointerDown:Ot(e.onPointerDown,ee),onFocus:Ot(e.onFocus,X),onBlur:Ot(e.onBlur,J),"aria-describedby":M?W:void 0})}),[X,J,ee,M,W,Z,F]),re=(0,i.useCallback)((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return z(f(f({},t),{},{style:f(f({},t.style),{},(e={},c(e,nG.arrowSize.var,k?"".concat(k,"px"):void 0),c(e,nG.arrowShadowColor.var,C),e))}),n)}),[z,k,C]),oe=(0,i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=f(f({},e.style),{},{position:"relative",transformOrigin:nG.transformOrigin.varRef});return f(f(f({ref:t},A),e),{},{id:W,role:"tooltip",style:n})}),[A,W]);return{isOpen:M,show:X,hide:J,getTriggerProps:ne,getTooltipProps:oe,getTooltipPositionerProps:re,getArrowProps:B,getArrowInnerProps:V}}var HQ="chakra-ui:close-tooltip";var qQ=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor","motionProps"];var GQ=iw(Fb.div),QQ=sw((function(t,n){var r,o,a=pw("Tooltip",t),l=wr(t),s=uw(),u=l.children,c=l.label,d=l.shouldWrapChildren,h=l["aria-label"],v=l.hasArrow,g=l.bg,m=l.portalProps,y=l.background,b=l.backgroundColor,w=l.bgColor,x=l.motionProps,_=p(l,qQ),S=null!=(o=null!=(r=null!=y?y:b)?r:g)?o:w;if(S){a.bg=S;var k=function(e,t,n){var r,o,i;return null!=(i=null==(o=null==(r=e.__cssMap)?void 0:r["".concat(t,".").concat(n)])?void 0:o.varRef)?i:n}(s,"colors",S);a[nG.arrowBg.var]=k}var C,E=WQ(f(f({},_),{},{direction:s.direction}));if("string"===typeof u||d)C=(0,e.jsx)(iw.span,f(f({display:"inline-block",tabIndex:0},E.getTriggerProps()),{},{children:u}));else{var T=i.Children.only(u);C=(0,i.cloneElement)(T,E.getTriggerProps(T.props,T.ref))}var R=!!h,O=E.getTooltipProps({},n),P=R?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=gt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(O,["role","id"]):O,I=function(e,t){var n,r={},o=gt(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;i in e&&(r[i]=e[i])}}catch(a){o.e(a)}finally{o.f()}return r}(O,["role","id"]);return c?(0,e.jsxs)(e.Fragment,{children:[C,(0,e.jsx)(qw,{children:E.isOpen&&(0,e.jsx)(tx,f(f({},m),{},{children:(0,e.jsx)(iw.div,f(f({},E.getTooltipPositionerProps()),{},{__css:{zIndex:a.zIndex,pointerEvents:"none"},children:(0,e.jsxs)(GQ,f(f(f({variants:Zq,initial:"exit",animate:"enter",exit:"exit"},x),P),{},{__css:a,children:[c,R&&(0,e.jsx)(iw.span,f(f({srOnly:!0},I),{},{children:h})),v&&(0,e.jsx)(iw.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,e.jsx)(iw.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:a.bg}})})]}))}))}))})]}):(0,e.jsx)(e.Fragment,{children:u})}));QQ.displayName="Tooltip";var $Q=function(t){var n=t.tasks,r=t.onToggle,o=new Date,i=[{id:"name",header:"Quest details",accessorFn:function(e){var t;return null===e||void 0===e||null===(t=e.node)||void 0===t?void 0:t.quest},footer:function(e){return e.column.id},enableSorting:!1,cell:function(t){var n,r=t.getValue();return(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("div",{children:r.name}),(0,e.jsx)("div",{className:"text-sm flex flex-row gap-1 items-center text-gray-500",children:null===r||void 0===r||null===(n=r.tome)||void 0===n?void 0:n.name})]})}},{id:"beacon",header:"Beacon",accessorFn:function(e){var t;return null===e||void 0===e||null===(t=e.node)||void 0===t?void 0:t.beacon},footer:function(e){return e.column.id},minSize:window.innerWidth/8,enableSorting:!1,cell:function(t){var n=t.getValue();return(0,e.jsx)(PU,{beaconData:n})}},{id:"status",header:"Status",accessorFn:function(e){return null===e||void 0===e?void 0:e.node},maxSize:100,enableSorting:!1,cell:function(t){var n=t.getValue(),r=new Date(null===n||void 0===n?void 0:n.lastModifiedAt),i=(null===n||void 0===n?void 0:n.output.length)>0;return(0,e.jsx)(QQ,{label:(null===n||void 0===n?void 0:n.output.length)>500?"Click to see output":null===n||void 0===n?void 0:n.output,"aria-label":"Task output",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsxs)("div",{className:"flex flex-row gap-2 flex-wrap",children:[(0,e.jsx)(Xq,{task:n}),i&&(0,e.jsx)("div",{children:(0,e.jsx)(xO,{fontSize:"0.8em",size:"large",colorScheme:"purple",children:(0,e.jsx)("div",{className:"p-1",children:"Has Output"})})})]}),(0,e.jsxs)("div",{className:"text-sm text-gray-500 flex flex-row flex-wrap",children:["last updated ",XO(r,o)]})]})})},footer:function(e){return e.column.id}}];return(0,e.jsx)(YP,{data:n,columns:i,onRowClick:r})};function YQ(t){var n=t.totalCount,r=t.pageInfo,o=t.refetchTable,i=t.page,a=t.setPage,l=t.rowLimit;return(0,e.jsxs)("nav",{className:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6","aria-label":"Pagination",children:[(0,e.jsx)("div",{className:"hidden sm:block",children:(0,e.jsxs)("p",{className:"text-sm text-gray-800",children:["Page ",(0,e.jsx)("span",{className:"font-semibold",children:i})," of ",(0,e.jsx)("span",{className:"font-semibold",children:Math.ceil(n/l)})," ","(".concat(n," results)")]})}),(0,e.jsxs)("div",{className:"flex flex-1 justify-between sm:justify-end",children:[(0,e.jsx)("button",{disabled:!r.hasPreviousPage,onClick:function(){o&&r.hasPreviousPage&&(a((function(e){return e-1})),o(void 0,r.startCursor))},className:"relative inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,e.jsx)("button",{disabled:!r.hasNextPage,onClick:function(){o&&r.hasNextPage&&(a((function(e){return e+1})),o(r.endCursor,void 0))},className:"relative ml-3 inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})}var KQ=qP({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"}),XQ=["children","className"],JQ=lt(st({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"\" "}),2),ZQ=JQ[0],e$=JQ[1],t$=sw((function(t,n){var r=hw("Input",t),o=wr(t),a=o.children,l=o.className,s=p(o,XQ),u=St("chakra-input__group",l),c={},d=TL(a),h=r.field;d.forEach((function(e){var t,n;r&&(h&&"InputLeftElement"===e.type.id&&(c.paddingStart=null!=(t=h.height)?t:h.h),h&&"InputRightElement"===e.type.id&&(c.paddingEnd=null!=(n=h.height)?n:h.h),"InputRightAddon"===e.type.id&&(c.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(c.borderStartRadius=0))}));var v=d.map((function(e){var n,r,o=Ub({size:(null==(n=e.props)?void 0:n.size)||t.size,variant:(null==(r=e.props)?void 0:r.variant)||t.variant});return"Input"!==e.type.id?(0,i.cloneElement)(e,o):(0,i.cloneElement)(e,Object.assign(o,c,e.props))}));return(0,e.jsx)(iw.div,f(f({className:u,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"}},s),{},{children:(0,e.jsx)(ZQ,{value:r,children:v})}))}));t$.displayName="InputGroup";var n$=["placement"],r$=["className"],o$=["className"],i$=iw("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),a$=sw((function(t,n){var r,o,i,a=t.placement,l=void 0===a?"left":a,s=p(t,n$),u=e$(),d=u.field,h=f((c(r={},"left"===l?"insetStart":"insetEnd","0"),c(r,"width",null!=(o=null==d?void 0:d.height)?o:null==d?void 0:d.h),c(r,"height",null!=(i=null==d?void 0:d.height)?i:null==d?void 0:d.h),c(r,"fontSize",null==d?void 0:d.fontSize),r),u.element);return(0,e.jsx)(i$,f({ref:n,__css:h},s))}));a$.id="InputElement",a$.displayName="InputElement";var l$=sw((function(t,n){var r=t.className,o=p(t,r$),i=St("chakra-input__left-element",r);return(0,e.jsx)(a$,f({ref:n,placement:"left",className:i},o))}));l$.id="InputLeftElement",l$.displayName="InputLeftElement";var s$=sw((function(t,n){var r=t.className,o=p(t,o$),i=St("chakra-input__right-element",r);return(0,e.jsx)(a$,f({ref:n,placement:"right",className:i},o))}));s$.id="InputRightElement",s$.displayName="InputRightElement";var u$,c$,d$,f$=n(763),p$=function(t){var n=wk().questId?"Search by output":"Search by tome name, quest name, or output",r=t.setSearch,o=(0,i.useRef)((0,f$.debounce)(function(){var e=S_(x_().mark((function e(t){return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300)).current;function a(){return(a=S_(x_().mark((function e(t){return x_().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(t.target.value);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,i.useEffect)((function(){return function(){o.cancel()}}),[o]),(0,e.jsxs)("div",{className:"flex-1 gap-1",children:[(0,e.jsxs)(GL,{size:"sm",mb:2,children:[" ",n]}),(0,e.jsxs)(t$,{className:" border-gray-300",children:[(0,e.jsx)(l$,{pointerEvents:"none",children:(0,e.jsx)(KQ,{color:"gray.300"})}),(0,e.jsx)(mW,{type:"text",placeholder:n,onChange:function(e){return a.apply(this,arguments)}})]})]})},h$=function(t){var n=t.setSearch,r=t.setFiltersSelected,o=(0,i.useContext)(ZP),a=o.data,l=o.isLoading,s=o.error;return(0,e.jsx)("div",{children:!l&&!s&&a&&(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-4 bg-white rounded-lg shadow-lg mt-2",children:[(0,e.jsx)(p$,{setSearch:n}),(0,e.jsx)(uU,{beacons:(null===a||void 0===a?void 0:a.beacons)||[],groups:(null===a||void 0===a?void 0:a.groupTags)||[],services:(null===a||void 0===a?void 0:a.serviceTags)||[],setFiltersSelected:r})]})})},v$=qP({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),g$=function(){var t,n,r,o=wk().questId,i=y_(qR(u$||(u$=HT(["\n query GetQuests($where: QuestWhereInput) {\n quests(where: $where){\n id\n name\n }\n }"]))),{variables:{where:{id:o}}}),a=i.loading,l=i.data,s=i.error;return(0,e.jsx)("div",{className:"flex flex-row justify-between w-full",children:(0,e.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,e.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest outputs for"}),(null===l||void 0===l||null===(t=l.quests[0])||void 0===t?void 0:t.name)&&(0,e.jsx)(qk,{to:"/results",children:(0,e.jsx)(PN,{rightIcon:(0,e.jsx)(v$,{}),colorScheme:"purple",variant:"outline",size:"xs",children:null===l||void 0===l||null===(n=l.quests[0])||void 0===n?void 0:n.name})}),(s||!(null!==l&&void 0!==l&&null!==(r=l.quests[0])&&void 0!==r&&r.name)&&!a)&&(0,e.jsxs)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:["Id: ",o]})]})})},m$=function(){return wk().questId?(0,e.jsx)(g$,{}):(0,e.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest outputs"})},y$=function(e){return e.questIdQuery="ID_QUERY",e.questDetailsQuery="QUEST_DETAILS_QUERY",e}({}),b$=function(){var t,n,r,o,a=wk().questId,l=function(e,t){var n=lt((0,i.useState)(1),2),r=n[0],o=n[1],a=lt((0,i.useState)(""),2),l=a[0],s=a[1],u=lt((0,i.useState)([]),2),c=u[0],d=u[1],f=(0,i.useCallback)((function(n,r,o){var i=WT.TaskRowLimit,a={where:{and:[]},first:o?null:i,last:o?i:null,after:r||null,before:o||null,orderBy:[{direction:"DESC",field:"LAST_MODIFIED_AT"}]};switch(e){case y$.questIdQuery:var l=[{hasQuestWith:{id:t}}];n&&l.push({outputContains:n}),a.where.and=l;break;case y$.questDetailsQuery:default:var s=n||"";a.where.and=[{or:[{outputContains:s},{hasQuestWith:{nameContains:s}},{hasQuestWith:{hasTomeWith:{nameContains:s}}}]}]}return a}),[e,t]),p=(0,i.useCallback)((function(e,t){var n=t,r=e.reduce((function(e,t){return"beacon"===t.kind?e.beacon.push(t.name):"platform"===t.kind?e.platform.push(t.name):"service"===t.kind?e.service.push(t.name):"group"===t.kind&&e.group.push(t.name),e}),{beacon:[],service:[],group:[],platform:[]}),o=r.beacon,i=r.group,a=r.service,l=r.platform,s=r.hosts,u=void 0===s?[]:s;return o.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{nameIn:o}})),i.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"group"},{nameIn:i}]}}}})),a.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"service"},{nameIn:a}]}}}})),u.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{nameIn:u}}})),l.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{platformIn:l}}})),n}),[]),h=y_(bO,{variables:f(),notifyOnNetworkStatusChange:!0}),v=h.loading,g=h.error,m=h.data,y=h.refetch,b=(0,i.useCallback)((function(e,t){var n=f(l,e,t),r=p(c,n);y(r)}),[l,c,f,p,y]);return(0,i.useEffect)((function(){b()}),[b]),{data:m,loading:v,error:g,page:r,setPage:o,setSearch:function(e){o(1),s(e)},setFiltersSelected:function(e){o(1),d(e)},updateTaskList:b}}(a?y$.questIdQuery:y$.questDetailsQuery,a),s=l.data,u=l.loading,c=l.error,d=l.setSearch,f=l.setFiltersSelected,p=l.updateTaskList,h=l.page,v=l.setPage,g=lt((0,i.useState)(!1),2),m=g[0],y=g[1],b=lt((0,i.useState)(null),2),w=b[0],x=b[1];return(0,e.jsxs)(mO,{children:[(0,e.jsx)("div",{className:"border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between",children:(0,e.jsx)(m$,{})}),(0,e.jsx)(h$,{setSearch:d,setFiltersSelected:f}),u?(0,e.jsx)(cO,{type:uO.loading,label:"Loading quest tasks..."}):c?(0,e.jsx)(cO,{type:uO.error,label:"Error loading tasks..."}):(0,e.jsx)("div",{children:(null===s||void 0===s||null===(t=s.tasks)||void 0===t?void 0:t.edges.length)>0?(0,e.jsxs)("div",{className:"py-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1",children:[(0,e.jsx)($Q,{tasks:null===s||void 0===s||null===(n=s.tasks)||void 0===n?void 0:n.edges,onToggle:function(e){var t,n=null===e||void 0===e||null===(t=e.original)||void 0===t?void 0:t.node;x(n),y((function(e){return!e}))}}),(0,e.jsx)(YQ,{totalCount:null===s||void 0===s||null===(r=s.tasks)||void 0===r?void 0:r.totalCount,pageInfo:null===s||void 0===s||null===(o=s.tasks)||void 0===o?void 0:o.pageInfo,refetchTable:p,page:h,setPage:v,rowLimit:WT.TaskRowLimit})]}):(0,e.jsx)(cO,{label:"No data found",details:"Try creating a new quest or adjusting filters.",type:uO.noData,children:(0,e.jsx)(qk,{to:"/createQuest",children:(0,e.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",children:"Create new quest"})})})}),(0,e.jsx)(Jq,{isOpen:m,setOpen:y,selectedTask:w})]})},w$=(c$=[{path:"/",element:(0,e.jsx)(b$,{})},{path:"/quests",element:(0,e.jsx)(XP,{})},{path:"/results/:questId",element:(0,e.jsx)(b$,{})},{path:"/createQuest",element:(0,e.jsx)(kW,{})},{path:"/results",element:(0,e.jsx)(b$,{})}],_S({basename:null==d$?void 0:d$.basename,history:T_({window:null==d$?void 0:d$.window}),hydrationData:(null==d$?void 0:d$.hydrationData)||Bk(),routes:c$,detectErrorBoundary:Nk}).initialize()),x$=function(){return(0,e.jsx)(lx,{theme:vd,children:(0,e.jsx)(tO,{children:(0,e.jsx)(eI,{children:(0,e.jsx)(Ik,{router:w$})})})})},_$=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),r(e),o(e),i(e),a(e)}))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var S$=function(){return Object.create(null)},k$=Array.prototype,C$=k$.forEach,E$=k$.slice,T$=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=S$),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;tthis.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),F$=new M$,z$=Object.prototype.hasOwnProperty,V$=void 0===(L$=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:L$;function B$(e){var t=e.unsubscribe;"function"===typeof t&&(e.unsubscribe=void 0,t())}var U$=[],W$=100;function H$(e,t){if(!e)throw new Error(t||"assertion failure")}function q$(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var G$=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Y$(this))return Q$(this),this.value[0]},e.prototype.recompute=function(e){return H$(!this.recomputing,"already recomputing"),Q$(this),Y$(this)?function(e,t){nY(e),F$.withValue(e,$$,[e,t]),function(e,t){if("function"===typeof e.subscribe)try{B$(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(n){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,Y$(e))return;X$(e)}(e);return q$(e.value)}(this,e):q$(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,K$(this),B$(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),nY(this),J$(this,(function(t,n){t.setDirty(),rY(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=U$.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(V$(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),U$.push(this.deps),this.deps=null)},e.count=0,e}();function Q$(e){var t=F$.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Y$(e)?Z$(t,e):eY(t,e),t}function $$(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(n){e.value[1]=n}e.recomputing=!1}function Y$(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function K$(e){J$(e,Z$)}function X$(e){J$(e,eY)}function J$(e,t){var n=e.parents.size;if(n)for(var r=V$(e.parents),o=0;o0&&n===t.length&&e[n-1]===t[n-1]}(n,t.value)||e.setDirty(),tY(e,t),Y$(e)||X$(e)}function tY(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(U$.length0&&e.childValues.forEach((function(t,n){rY(e,n)})),e.forgetDeps(),H$(null===e.dirtyChildren)}function rY(e,t){t.parents.delete(e),e.childValues.delete(t),tY(e,t)}var oY={setDirty:!0,dispose:!0,forget:!0};function iY(e){var t=new Map,n=e&&e.subscribe;function r(e){var r=F$.getValue();if(r){var o=t.get(e);o||t.set(e,o=new Set),r.dependOn(o),"function"===typeof n&&(B$(o),o.unsubscribe=n(e))}}return r.dirty=function(e,n){var r=t.get(e);if(r){var o=n&&z$.call(oY,n)?n:"setDirty";V$(r).forEach((function(e){return e[o]()})),t.delete(e),B$(r)}},r}function aY(){var e=new T$("function"===typeof WeakMap);return function(){return e.lookupArray(arguments)}}aY();var lY=new Set;function sY(e,t){void 0===t&&(t=Object.create(null));var n=new N$(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=t.keyArgs,o=t.makeCacheKey||aY(),i=function(){var i=o.apply(null,r?r.apply(null,arguments):arguments);if(void 0===i)return e.apply(null,arguments);var a=n.get(i);a||(n.set(i,a=new G$(e)),a.subscribe=t.subscribe,a.forget=function(){return n.delete(i)});var l=a.recompute(Array.prototype.slice.call(arguments));return n.set(i,a),lY.add(n),F$.hasValue()||(lY.forEach((function(e){return e.clean()})),lY.clear()),l};function a(e){var t=n.get(e);t&&t.setDirty()}function l(e){var t=n.get(e);if(t)return t.peek()}function s(e){return n.delete(e)}return Object.defineProperty(i,"size",{get:function(){return n.map.size},configurable:!1,enumerable:!1}),i.dirtyKey=a,i.dirty=function(){a(o.apply(null,arguments))},i.peekKey=l,i.peek=function(){return l(o.apply(null,arguments))},i.forgetKey=s,i.forget=function(){return s(o.apply(null,arguments))},i.makeCacheKey=o,i.getKey=r?function(){return o.apply(null,r.apply(null,arguments))}:o,Object.freeze(i)}function uY(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new dx("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new dx(44);"FragmentDefinition"===e.kind&&r.push(e)})),"undefined"===typeof n&&(__DEV__?fx(1===r.length,"Found ".concat(r.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):fx(1===r.length,45),n=r[0].name.value),Ad(Ad({},e),{definitions:Fd([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions,!0)})}function cY(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function dY(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var n=e.name.value;if("function"===typeof t)return t(n);var r=t&&t[n];return __DEV__?fx(r,"No fragment named ".concat(n)):fx(r,46),r||null;default:return null}}var fY=function(){function e(){this.getFragmentDoc=sY(uY)}return e.prototype.batch=function(e){var t,n=this,r="string"===typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(n)}),r),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(Ad(Ad({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(Ad(Ad({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,n=e.data,r=jd(e,["id","data"]);return this.write(Object.assign(r,{dataId:t||"ROOT_QUERY",result:n}))},e.prototype.writeFragment=function(e){var t=e.id,n=e.data,r=e.fragment,o=e.fragmentName,i=jd(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(i,{query:this.getFragmentDoc(r,o),dataId:t,result:n}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var r=n.readQuery(e),o=t(r);return void 0===o||null===o?r:(n.writeQuery(Ad(Ad({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var r=n.readFragment(e),o=t(r);return void 0===o||null===o?r:(n.writeFragment(Ad(Ad({},e),{data:o})),o)}})},e}(),pY=function(e){function t(n,r,o,i){var a,l=e.call(this,n)||this;if(l.message=n,l.path=r,l.query=o,l.variables=i,Array.isArray(l.path)){l.missing=l.message;for(var s=l.path.length-1;s>=0;--s)l.missing=((a={})[l.path[s]]=l.missing,a)}else l.missing=l.path;return l.__proto__=t.prototype,l}return Id(t,e),t}(Error);function hY(e){return{__ref:String(e)}}function vY(e){return Boolean(e&&"object"===typeof e&&"string"===typeof e.__ref)}function gY(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var o={};n.fields.map((function(e){return gY(o,e.name,e.value,r)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(n)){var i=(r||{})[n.name.value];e[t.value]=i}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return gY(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw __DEV__?new dx('The inline argument "'.concat(t.value,'" of kind "').concat(n.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new dx(55);e[t.value]=null}}var mY=["connection","include","skip","client","rest","export"],yY=Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o={};return r.forEach((function(e){o[e]=t[e]})),"".concat(n.connection.key,"(").concat(bY(o),")")}return n.connection.key}var i=e;if(t){var a=bY(t);i+="(".concat(a,")")}return n&&Object.keys(n).forEach((function(e){-1===mY.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?i+="@".concat(e,"(").concat(bY(n[e]),")"):i+="@".concat(e))})),i}),{setStringify:function(e){var t=bY;return bY=e,t}}),bY=function(e){return JSON.stringify(e,wY)};function wY(e,t){return h_(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function xY(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,o=e.value;return gY(n,r,o,t)})),n}return null}function _Y(e){return e.alias?e.alias.value:e.name.value}function SY(e,t,n){if("string"===typeof e.__typename)return e.__typename;for(var r=0,o=t.selections;r2&&void 0!==arguments[2]?arguments[2]:aR,r=new Map,o=0,i=Object.values(nR);o=0;--a)t.definitions[a].kind===nR.OPERATION_DEFINITION&&++i;var l=FY(e),s=e.some((function(e){return e.remove})),u=function(e){return s&&e&&e.some(l)},c=new Map,d=!1,f={enter:function(e){if(u(e.directives))return d=!0,null}},p=EY(t,{Field:f,InlineFragment:f,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,n,r,i){var a=o(i);a&&a.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,n,r,i){if(u(e.directives))return d=!0,null;var a=o(i);a&&a.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,n,r){c.set(JSON.stringify(r),e)},leave:function(e,t,n,o){return e===c.get(JSON.stringify(o))?e:i>0&&e.selectionSet.selections.every((function(e){return e.kind===nR.FIELD&&"__typename"===e.name.value}))?(r(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(l(e))return d=!0,null}}});if(!d)return t;var h=function e(t){return t.transitiveVars||(t.transitiveVars=new Set(t.variables),t.removed||t.fragmentSpreads.forEach((function(n){e(r(n)).transitiveVars.forEach((function(e){t.transitiveVars.add(e)}))}))),t},v=new Set;p.definitions.forEach((function(e){e.kind===nR.OPERATION_DEFINITION?h(n(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){v.add(e)})):e.kind!==nR.FRAGMENT_DEFINITION||0!==i||r(e.name.value).removed||v.add(e.name.value)})),v.forEach((function(e){h(r(e)).fragmentSpreads.forEach((function(e){v.add(e)}))}));var g={enter:function(e){if(t=e.name.value,!v.has(t)||r(t).removed)return null;var t}};return NY(EY(p,{FragmentSpread:g,FragmentDefinition:g,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=h(n(e.name&&e.name.value)).transitiveVars;if(t.size1)for(var r=new $Y,o=1;o0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof vK?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach((function(r){JY.call(n,r)&&(Object.keys(e.findChildRefIds(r)).forEach(t.add,t),delete n[r])}));var r=Object.keys(n);if(r.length){for(var o=this;o instanceof vK;)o=o.parent;r.forEach((function(e){return o.delete(e)}))}return r},e.prototype.findChildRefIds=function(e){if(!JY.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var r=new Set([n]);r.forEach((function(e){vY(e)&&(t[e.__ref]=!0),h_(e)&&Object.keys(e).forEach((function(t){var n=e[t];h_(n)&&r.add(n)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),fK=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?iY():null,this.keyMaker=new T$(Ax)},e.prototype.depend=function(e,t){if(this.d){this.d(pK(e,t));var n=oK(t);n!==t&&this.d(pK(e,n)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(pK(e,t),"__exists"===t?"forget":"setDirty")},e}();function pK(e,t){return t+"#"+e}function hK(e,t){yK(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var n=t.policies,r=t.resultCaching,o=void 0===r||r,i=t.seed,a=e.call(this,n,new fK(o))||this;return a.stump=new gK(a),a.storageTrie=new T$(Ax),i&&a.replace(i),a}return Id(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(dK||(dK={}));var vK=function(e){function t(t,n,r,o){var i=e.call(this,n.policies,o)||this;return i.id=t,i.parent=n,i.replay=r,i.group=o,r(i),i}return Id(t,e),t.prototype.addLayer=function(e,n){return new t(e,this,n,this.group)},t.prototype.removeLayer=function(e){var t=this,n=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var r=t.data[e],o=n.lookup(e);o?r?r!==o&&Object.keys(r).forEach((function(n){Qx(r[n],o[n])||t.group.dirty(e,n)})):(t.group.dirty(e,"__exists"),Object.keys(o).forEach((function(n){t.group.dirty(e,n)}))):t.delete(e)})),n):n===this.parent?this:n.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return Ad(Ad({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return JY.call(this.data,t)?Ad(Ad({},n),e.prototype.findChildRefIds.call(this,t)):n},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(dK),gK=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new fK(t.group.caching,t.group))||this}return Id(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(vK);function mK(e,t,n){var r=e[n],o=t[n];return Qx(r,o)?r:o}function yK(e){return!!(e instanceof dK&&e.group.caching)}var bK,wK,xK=function(){function e(){this.known=new(jx?WeakSet:Set),this.pool=new T$(Ax),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return h_(e)&&this.known.has(e)},e.prototype.pass=function(e){if(h_(e)){var t=function(e){return h_(e)?r_(e)?e.slice(0):Ad({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(h_(e)){var n=this.passes.get(e);if(n)return n;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var r=e.map(this.admit,this);return(l=this.pool.lookupArray(r)).array||(this.known.add(l.array=r),__DEV__&&Object.freeze(r)),l.array;case null:case Object.prototype:if(this.known.has(e))return e;var o=Object.getPrototypeOf(e),i=[o],a=this.sortedKeys(e);i.push(a.json);var l,s=i.length;if(a.sorted.forEach((function(n){i.push(t.admit(e[n]))})),!(l=this.pool.lookupArray(i)).object){var u=l.object=Object.create(o);this.known.add(u),a.sorted.forEach((function(e,t){u[e]=i[s+t]})),__DEV__&&Object.freeze(u)}return l.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var r=JSON.stringify(t);(n.keys=this.keysByJSON.get(r))||this.keysByJSON.set(r,n.keys={sorted:t,json:r})}return n.keys},e}(),_K=Object.assign((function(e){if(h_(e)){void 0===bK&&SK();var t=bK.admit(e),n=wK.get(t);return void 0===n&&wK.set(t,n=JSON.stringify(t)),n}return JSON.stringify(e)}),{reset:SK});function SK(){bK=new xK,wK=new(Ax?WeakMap:Map)}function kK(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var CK=function(){function e(e){var t=this;this.knownResults=new(Ax?WeakMap:Map),this.config=Zx(e,{addTypename:!1!==e.addTypename,canonizeResults:nK(e)}),this.canon=e.canon||new xK,this.executeSelectionSet=sY((function(e){var n,r=e.context.canonizeResults,o=kK(e);o[3]=!r;var i=(n=t.executeSelectionSet).peek.apply(n,o);return i?r?Ad(Ad({},i),{result:t.canon.admit(i.result)}):i:(hK(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:kK,makeCacheKey:function(e,t,n,r){if(yK(n.store))return n.store.makeCacheKey(e,vY(t)?t.__ref:t,n.varString,r)}}),this.executeSubSelectedArray=sY((function(e){return hK(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,n=e.array,r=e.context;if(yK(r.store))return r.store.makeCacheKey(t,n,r.varString)}})}return e.prototype.resetCanon=function(){this.canon=new xK},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.rootId,o=void 0===r?"ROOT_QUERY":r,i=e.variables,a=e.returnPartialData,l=void 0===a||a,s=e.canonizeResults,u=void 0===s?this.config.canonizeResults:s,c=this.config.cache.policies;i=Ad(Ad({},MY(AY(n))),i);var d,f=hY(o),p=this.executeSelectionSet({selectionSet:jY(n).selectionSet,objectOrReference:f,enclosingRef:f,context:Ad({store:t,query:n,policies:c,variables:i,varString:_K(i),canonizeResults:u},lK(n,this.config.fragments))});if(p.missing&&(d=[new pY(EK(p.missing),p.missing,n,i)],!l))throw d[0];return{result:p.result,complete:!d,missing:d}},e.prototype.isFresh=function(e,t,n,r){if(yK(r.store)&&this.knownResults.get(e)===n){var o=this.executeSelectionSet.peek(n,t,r,this.canon.isKnown(e));if(o&&e===o.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,r=e.objectOrReference,o=e.enclosingRef,i=e.context;if(vY(r)&&!i.policies.rootTypenamesById[r.__ref]&&!i.store.has(r.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(r.__ref," object")};var a,l=i.variables,s=i.policies,u=i.store.getFieldValue(r,"__typename"),c=[],d=new $Y;function f(e,t){var n;return e.missing&&(a=d.merge(a,((n={})[t]=e.missing,n))),e.result}this.config.addTypename&&"string"===typeof u&&!s.rootIdsByTypename[u]&&c.push({__typename:u});var p=new Set(n.selections);p.forEach((function(e){var n,h;if(YY(e,l))if(kY(e)){var v=s.readField({fieldName:e.name.value,field:e,variables:i.variables,from:r},i),g=_Y(e);void 0===v?BY.added(e)||(a=d.merge(a,((n={})[g]="Can't find field '".concat(e.name.value,"' on ").concat(vY(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)),n))):r_(v)?v=f(t.executeSubSelectedArray({field:e,array:v,enclosingRef:o,context:i}),g):e.selectionSet?null!=v&&(v=f(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:vY(v)?v:o,context:i}),g)):i.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&c.push(((h={})[g]=v,h))}else{var m=dY(e,i.lookupFragment);if(!m&&e.kind===nR.FRAGMENT_SPREAD)throw __DEV__?new dx("No fragment named ".concat(e.name.value)):new dx(5);m&&s.fragmentMatches(m,u)&&m.selectionSet.selections.forEach(p.add,p)}}));var h={result:GY(c),missing:a},v=i.canonizeResults?this.canon.admit(h):g_(h);return v.result&&this.knownResults.set(v.result,n),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,n=this,r=e.field,o=e.array,i=e.enclosingRef,a=e.context,l=new $Y;function s(e,n){var r;return e.missing&&(t=l.merge(t,((r={})[n]=e.missing,r))),e.result}return r.selectionSet&&(o=o.filter(a.store.canRead)),o=o.map((function(e,t){return null===e?null:r_(e)?s(n.executeSubSelectedArray({field:r,array:e,enclosingRef:i,context:a}),t):r.selectionSet?s(n.executeSelectionSet({selectionSet:r.selectionSet,objectOrReference:e,enclosingRef:vY(e)?e:i,context:a}),t):(__DEV__&&function(e,t,n){if(!t.selectionSet){var r=new Set([n]);r.forEach((function(n){h_(n)&&(__DEV__?fx(!vY(n),"Missing selection set for object of type ".concat(function(e,t){return vY(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,n)," returned for query field ").concat(t.name.value)):fx(!vY(n),6),Object.values(n).forEach(r.add,r))}))}}(a.store,r,e),e)})),{result:a.canonizeResults?this.canon.admit(o):o,missing:t}},e}();function EK(e){try{JSON.stringify(e,(function(e,t){if("string"===typeof t)throw t;return t}))}catch(t){return t}}var TK=Object.prototype.toString;function RK(e){return OK(e)}function OK(e,t){switch(TK.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,r){n[r]=OK(e,t)})),n;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=OK(e[n],t)})),r;default:return e}}var PK=new Map;function IK(e){var t=PK.get(e)||1;return PK.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}var AK=new M$,jK=new WeakMap;function MK(e){var t=jK.get(e);return t||jK.set(e,t={vars:new Set,dep:iY()}),t}function DK(e){MK(e).vars.forEach((function(t){return t.forgetCache(e)}))}function LK(e){var t=new Set,n=new Set,r=function r(i){if(arguments.length>0){if(e!==i){e=i,t.forEach((function(e){MK(e).dep.dirty(r),function(e){e.broadcastWatches&&e.broadcastWatches()}(e)}));var a=Array.from(n);n.clear(),a.forEach((function(t){return t(e)}))}}else{var l=AK.getValue();l&&(o(l),MK(l).dep(r))}return e};r.onNextChange=function(e){return n.add(e),function(){n.delete(e)}};var o=r.attachCache=function(e){return t.add(e),MK(e).vars.add(r),r};return r.forgetCache=function(e){return t.delete(e)},r}var NK=Object.create(null);function FK(e){var t=JSON.stringify(e);return NK[t]||(NK[t]=Object.create(null))}function zK(e){var t=FK(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,n){var r=function(e,t){return n.readField(t,e)},o=n.keyObject=BK(e,(function(e){var o=HK(n.storeObject,e,r);return void 0===o&&t!==n.storeObject&&JY.call(t,e[0])&&(o=HK(t,e,WK)),__DEV__?fx(void 0!==o,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):fx(void 0!==o,2),o}));return"".concat(n.typename,":").concat(JSON.stringify(o))})}function VK(e){var t=FK(e);return t.keyArgsFn||(t.keyArgsFn=function(t,n){var r=n.field,o=n.variables,i=n.fieldName,a=BK(e,(function(e){var n=e[0],i=n.charAt(0);if("@"!==i)if("$"!==i){if(t)return HK(t,e)}else{var a=n.slice(1);if(o&&JY.call(o,a)){var l=e.slice(0);return l[0]=a,HK(o,l)}}else if(r&&o_(r.directives)){var s=n.slice(1),u=r.directives.find((function(e){return e.name.value===s})),c=u&&xY(u,o);return c&&HK(c,e.slice(1))}})),l=JSON.stringify(a);return(t||"{}"!==l)&&(i+=":"+l),i})}function BK(e,t){var n=new $Y;return UK(e).reduce((function(e,r){var o,i=t(r);if(void 0!==i){for(var a=r.length-1;a>=0;--a)(o={})[r[a]]=i,i=o;e=n.merge(e,i)}return e}),Object.create(null))}function UK(e){var t=FK(e);if(!t.paths){var n=t.paths=[],r=[];e.forEach((function(t,o){r_(t)?(UK(t).forEach((function(e){return n.push(r.concat(e))})),r.length=0):(r.push(t),r_(e[o+1])||(n.push(r.slice(0)),r.length=0))}))}return t.paths}function WK(e,t){return e[t]}function HK(e,t,n){return n=n||WK,qK(t.reduce((function e(t,r){return r_(t)?t.map((function(t){return e(t,r)})):t&&n(t,r)}),e))}function qK(e){return h_(e)?r_(e)?e.map(qK):BK(Object.keys(e).sort(),(function(t){return HK(e,t)})):e}function GK(e){return void 0!==e.args?e.args:e.field?xY(e.field,e.variables):null}yY.setStringify(_K);var QK=function(){},$K=function(e,t){return t.fieldName},YK=function(e,t,n){return(0,n.mergeObjects)(e,t)},KK=function(e,t){return t},XK=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=Ad({dataIdFromObject:eK},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var n,r=this,o=t&&(t.typename||(null===(n=t.storeObject)||void 0===n?void 0:n.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var i,a=t&&t.storeObject||e,l=Ad(Ad({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=ZK(arguments,a);return r.readField(e,{store:r.cache.data,variables:e.variables})}}),s=o&&this.getTypePolicy(o),u=s&&s.keyFn||this.config.dataIdFromObject;u;){var c=u(e,l);if(!r_(c)){i=c;break}u=zK(c)}return i=i?String(i):void 0,l.keyObject?[i,l.keyObject]:[i]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(n){var r=e[n],o=r.queryType,i=r.mutationType,a=r.subscriptionType,l=jd(r,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",n),i&&t.setRootTypename("Mutation",n),a&&t.setRootTypename("Subscription",n),JY.call(t.toBeAdded,n)?t.toBeAdded[n].push(l):t.toBeAdded[n]=[l]}))},e.prototype.updateTypePolicy=function(e,t){var n=this,r=this.getTypePolicy(e),o=t.keyFields,i=t.fields;function a(e,t){e.merge="function"===typeof t?t:!0===t?YK:!1===t?KK:e.merge}a(r,t.merge),r.keyFn=!1===o?QK:r_(o)?zK(o):"function"===typeof o?o:r.keyFn,i&&Object.keys(i).forEach((function(t){var r=n.getFieldPolicy(e,t,!0),o=i[t];if("function"===typeof o)r.read=o;else{var l=o.keyArgs,s=o.read,u=o.merge;r.keyFn=!1===l?$K:r_(l)?VK(l):"function"===typeof l?l:r.keyFn,"function"===typeof s&&(r.read=s),a(r,u)}r.read&&r.merge&&(r.keyFn=r.keyFn||$K)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var n="ROOT_"+e.toUpperCase(),r=this.rootTypenamesById[n];t!==r&&(__DEV__?fx(!r||r===e,"Cannot change root ".concat(e," __typename more than once")):fx(!r||r===e,3),r&&delete this.rootIdsByTypename[r],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(n){t.getSupertypeSet(n,!0),e[n].forEach((function(e){t.getSupertypeSet(e,!0).add(n);var r=e.match(rK);r&&r[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!JY.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var r=this.supertypeMap.get(e);r&&r.size&&r.forEach((function(e){var r=t.getTypePolicy(e),o=r.fields,i=jd(r,["fields"]);Object.assign(n,i),Object.assign(n.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(n){t.updateTypePolicy(e,n)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,n){if(e){var r=this.getTypePolicy(e).fields;return r[t]||n&&(r[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},e.prototype.fragmentMatches=function(e,t,n,r){var o=this;if(!e.typeCondition)return!0;if(!t)return!1;var i=e.typeCondition.name.value;if(t===i)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(i))for(var a=this.getSupertypeSet(t,!0),l=[a],s=function(e){var t=o.getSupertypeSet(e,!1);t&&t.size&&l.indexOf(t)<0&&l.push(t)},u=!(!n||!this.fuzzySubtypes.size),c=!1,d=0;d1?i:t}:(r=Ad({},o),JY.call(r,"from")||(r.from=t)),__DEV__&&void 0===r.from&&__DEV__&&fx.warn("Undefined 'from' passed to readField with arguments ".concat(function(e){var t=IK("stringifyForDisplay");return JSON.stringify(e,(function(e,n){return void 0===n?t:n})).split(JSON.stringify(t)).join("")}(Array.from(e)))),void 0===r.variables&&(r.variables=n),r}function eX(e){return function(t,n){if(r_(t)||r_(n))throw __DEV__?new dx("Cannot automatically merge arrays"):new dx(4);if(h_(t)&&h_(n)){var r=e.getFieldValue(t,"__typename"),o=e.getFieldValue(n,"__typename");if(r&&o&&r!==o)return n;if(vY(t)&&aK(n))return e.merge(t.__ref,n),t;if(aK(t)&&vY(n))return e.merge(t,n.__ref),n;if(aK(t)&&aK(n))return Ad(Ad({},t),n)}return n}}function tX(e,t,n){var r="".concat(t).concat(n),o=e.flavors.get(r);return o||e.flavors.set(r,o=e.clientOnly===t&&e.deferred===n?e:Ad(Ad({},e),{clientOnly:t,deferred:n})),o}var nX=function(){function e(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return e.prototype.writeToStore=function(e,t){var n=this,r=t.query,o=t.result,i=t.dataId,a=t.variables,l=t.overwrite,s=OY(r),u=new $Y;a=Ad(Ad({},MY(s)),a);var c=Ad(Ad({store:e,written:Object.create(null),merge:function(e,t){return u.merge(e,t)},variables:a,varString:_K(a)},lK(r,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),d=this.processSelectionSet({result:o||Object.create(null),dataId:i,selectionSet:s.selectionSet,mergeTree:{map:new Map},context:c});if(!vY(d))throw __DEV__?new dx("Could not identify object ".concat(JSON.stringify(o))):new dx(7);return c.incomingById.forEach((function(t,r){var o=t.storeObject,i=t.mergeTree,a=t.fieldNodeSet,l=hY(r);if(i&&i.map.size){var s=n.applyMerges(i,l,o,c);if(vY(s))return;o=s}if(__DEV__&&!c.overwrite){var u=Object.create(null);a.forEach((function(e){e.selectionSet&&(u[e.name.value]=!0)}));Object.keys(o).forEach((function(e){(function(e){return!0===u[oK(e)]})(e)&&!function(e){var t=i&&i.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,n,r){var o=function(e){var t=r.getFieldValue(e,n);return"object"===typeof t&&t},i=o(e);if(!i)return;var a=o(t);if(!a)return;if(vY(i))return;if(Qx(i,a))return;if(Object.keys(i).every((function(e){return void 0!==r.getFieldValue(a,e)})))return;var l=r.getFieldValue(e,"__typename")||r.getFieldValue(t,"__typename"),s=oK(n),u="".concat(l,".").concat(s);if(sX.has(u))return;sX.add(u);var c=[];r_(i)||r_(a)||[i,a].forEach((function(e){var t=r.getFieldValue(e,"__typename");"string"!==typeof t||c.includes(t)||c.push(t)}));__DEV__&&fx.warn("Cache data may be lost when replacing the ".concat(s," field of a ").concat(l," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(c.length?"either ensure all objects of type "+c.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(u," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(i).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}(l,o,e,c.store)}))}e.merge(r,o)})),e.retain(d.__ref),d},e.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,r=e.result,o=e.selectionSet,i=e.context,a=e.mergeTree,l=this.cache.policies,s=Object.create(null),u=n&&l.rootTypenamesById[n]||SY(r,o,i.fragmentMap)||n&&i.store.get(n,"__typename");"string"===typeof u&&(s.__typename=u);var c=function(){var e=ZK(arguments,s,i.variables);if(vY(e.from)){var t=i.incomingById.get(e.from.__ref);if(t){var n=l.readField(Ad(Ad({},e),{from:t.storeObject}),i);if(void 0!==n)return n}}return l.readField(e,i)},d=new Set;this.flattenFields(o,r,i,u).forEach((function(e,n){var o,i=_Y(n),f=r[i];if(d.add(n),void 0!==f){var p=l.getStoreFieldName({typename:u,fieldName:n.name.value,field:n,variables:e.variables}),h=oX(a,p),v=t.processFieldValue(f,n,n.selectionSet?tX(e,!1,!1):e,h),g=void 0;n.selectionSet&&(vY(v)||aK(v))&&(g=c("__typename",v));var m=l.getMergeFunction(u,n.name.value,g);m?h.info={field:n,typename:u,merge:m}:lX(a,p),s=e.merge(s,((o={})[p]=v,o))}else!__DEV__||e.clientOnly||e.deferred||BY.added(n)||l.getReadFunction(u,n.name.value)||__DEV__&&fx.error("Missing field '".concat(_Y(n),"' while writing result ").concat(JSON.stringify(r,null,2)).substring(0,1e3))}));try{var f=l.identify(r,{typename:u,selectionSet:o,fragmentMap:i.fragmentMap,storeObject:s,readField:c}),p=f[0],h=f[1];n=n||p,h&&(s=i.merge(s,h))}catch(y){if(!n)throw y}if("string"===typeof n){var v=hY(n),g=i.written[n]||(i.written[n]=[]);if(g.indexOf(o)>=0)return v;if(g.push(o),this.reader&&this.reader.isFresh(r,v,o,i))return v;var m=i.incomingById.get(n);return m?(m.storeObject=i.merge(m.storeObject,s),m.mergeTree=iX(m.mergeTree,a),d.forEach((function(e){return m.fieldNodeSet.add(e)}))):i.incomingById.set(n,{storeObject:s,mergeTree:aX(a)?void 0:a,fieldNodeSet:d}),v}return s},e.prototype.processFieldValue=function(e,t,n,r){var o=this;return t.selectionSet&&null!==e?r_(e)?e.map((function(e,i){var a=o.processFieldValue(e,t,n,oX(r,i));return lX(r,i),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:r}):__DEV__?RK(e):e},e.prototype.flattenFields=function(e,t,n,r){void 0===r&&(r=SY(t,e,n.fragmentMap));var o=new Map,i=this.cache.policies,a=new T$(!1);return function e(l,s){var u=a.lookup(l,s.clientOnly,s.deferred);u.visited||(u.visited=!0,l.selections.forEach((function(a){if(YY(a,n.variables)){var l=s.clientOnly,u=s.deferred;if(l&&u||!o_(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(l=!0),"defer"===t){var r=xY(e,n.variables);r&&!1===r.if||(u=!0)}})),kY(a)){var c=o.get(a);c&&(l=l&&c.clientOnly,u=u&&c.deferred),o.set(a,tX(n,l,u))}else{var d=dY(a,n.lookupFragment);if(!d&&a.kind===nR.FRAGMENT_SPREAD)throw __DEV__?new dx("No fragment named ".concat(a.name.value)):new dx(8);d&&i.fragmentMatches(d,r,t,n.variables)&&e(d.selectionSet,tX(n,l,u))}}})))}(e,n),o},e.prototype.applyMerges=function(e,t,n,r,o){var i,a=this;if(e.map.size&&!vY(n)){var l,s=r_(n)||!vY(t)&&!aK(t)?void 0:t,u=n;s&&!o&&(o=[vY(s)?s.__ref:s]);var c=function(e,t){return r_(e)?"number"===typeof t?e[t]:void 0:r.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var n=c(s,t),i=c(u,t);if(void 0!==i){o&&o.push(t);var d=a.applyMerges(e,n,i,r,o);d!==i&&(l=l||new Map).set(t,d),o&&fx(o.pop()===t)}})),l&&(n=r_(u)?u.slice(0):Ad({},u),l.forEach((function(e,t){n[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,r,o&&(i=r.store).getStorage.apply(i,o)):n},e}(),rX=[];function oX(e,t){var n=e.map;return n.has(t)||n.set(t,rX.pop()||{map:new Map}),n.get(t)}function iX(e,t){if(e===t||!t||aX(t))return e;if(!e||aX(e))return t;var n=e.info&&t.info?Ad(Ad({},e.info),t.info):e.info||t.info,r=e.map.size&&t.map.size,o={info:n,map:r?new Map:e.map.size?e.map:t.map};if(r){var i=new Set(t.map.keys());e.map.forEach((function(e,n){o.map.set(n,iX(e,t.map.get(n))),i.delete(n)})),i.forEach((function(n){o.map.set(n,iX(t.map.get(n),e.map.get(n)))}))}return o}function aX(e){return!e||!(e.info||e.map.size)}function lX(e,t){var n=e.map,r=n.get(t);r&&aX(r)&&(rX.push(r),n.delete(t))}var sX=new Set;var uX=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.watches=new Set,n.typenameDocumentCache=new Map,n.makeVar=LK,n.txCount=0,n.config=function(e){return Zx(tK,e)}(t),n.addTypename=!!n.config.addTypename,n.policies=new XK({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return Id(t,e),t.prototype.init=function(){var e=this.data=new dK.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,n=this.storeReader,r=this.config.fragments;this.storeWriter=new nX(this,this.storeReader=new CK({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:nK(this.config),canon:e?void 0:n&&n.canon,fragments:r}),r),this.maybeBroadcastWatch=sY((function(e,n){return t.broadcastWatch(e,n)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var n=e.optimistic?t.optimisticData:t.data;if(yK(n)){var r=e.optimistic,o=e.id,i=e.variables;return n.makeCacheKey(e.query,e.callback,_K({optimistic:r,id:o,variables:i}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,n=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(Ad(Ad({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:n})).result||null}catch(r){if(r instanceof pY)return null;throw r}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(JY.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(Ad(Ad({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){MK(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&DK(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){_K.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(vY(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(t){__DEV__&&fx.warn(t)}},t.prototype.evict=function(e){if(!e.id){if(JY.call(e,"id"))return!1;e=Ad(Ad({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),_K.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),DK(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,n=this,r=e.update,o=e.optimistic,i=void 0===o||o,a=e.removeOptimistic,l=e.onWatchUpdated,s=function(e){var o=n,i=o.data,a=o.optimisticData;++n.txCount,e&&(n.data=n.optimisticData=e);try{return t=r(n)}finally{--n.txCount,n.data=i,n.optimisticData=a}},u=new Set;return l&&!this.txCount&&this.broadcastWatches(Ad(Ad({},e),{onWatchUpdated:function(e){return u.add(e),!1}})),"string"===typeof i?this.optimisticData=this.optimisticData.addLayer(i,s):!1===i?s(this.data):s(),"string"===typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),l&&u.size?(this.broadcastWatches(Ad(Ad({},e),{onWatchUpdated:function(e,t){var n=l.call(this,e,t);return!1!==n&&u.delete(e),n}})),u.size&&u.forEach((function(e){return n.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=BY(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(n){return t.maybeBroadcastWatch(n,e)}))},t.prototype.broadcastWatch=function(e,t){var n=e.lastDiff,r=this.diff(e);t&&(e.optimistic&&"string"===typeof t.optimistic&&(r.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,r,n))||n&&Qx(n.result,r.result)||e.callback(e.lastDiff=r,n)},t}(fY);function cX(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return dX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dX(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function dX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1,o=!1,i=arguments[1];return new n((function(n){return t.subscribe({next:function(t){var a=!o;if(o=!0,!a||r)try{i=e(i,t)}catch(l){return n.error(l)}else i=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(i),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r