@task-shepherd/agent 1.0.30 → 1.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ function Qp(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function hr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lc={exports:{}},Mi={},Fc={exports:{}},K={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ds=Symbol.for("react.element"),Vp=Symbol.for("react.portal"),Kp=Symbol.for("react.fragment"),Gp=Symbol.for("react.strict_mode"),Yp=Symbol.for("react.profiler"),Xp=Symbol.for("react.provider"),Jp=Symbol.for("react.context"),Zp=Symbol.for("react.forward_ref"),eh=Symbol.for("react.suspense"),th=Symbol.for("react.memo"),nh=Symbol.for("react.lazy"),Gl=Symbol.iterator;function rh(e){return e===null||typeof e!="object"?null:(e=Gl&&e[Gl]||e["@@iterator"],typeof e=="function"?e:null)}var Ic={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dc=Object.assign,$c={};function mr(e,t,n){this.props=e,this.context=t,this.refs=$c,this.updater=n||Ic}mr.prototype.isReactComponent={};mr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uc(){}Uc.prototype=mr.prototype;function Va(e,t,n){this.props=e,this.context=t,this.refs=$c,this.updater=n||Ic}var Ka=Va.prototype=new Uc;Ka.constructor=Va;Dc(Ka,mr.prototype);Ka.isPureReactComponent=!0;var Yl=Array.isArray,Wc=Object.prototype.hasOwnProperty,Ga={current:null},Bc={key:!0,ref:!0,__self:!0,__source:!0};function Hc(e,t,n){var r,s={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Wc.call(t,r)&&!Bc.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:ds,type:e,key:i,ref:a,props:s,_owner:Ga.current}}function sh(e,t){return{$$typeof:ds,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ya(e){return typeof e=="object"&&e!==null&&e.$$typeof===ds}function ih(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Xl=/\/+/g;function so(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ih(""+e.key):t.toString(36)}function Ws(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ds:case Vp:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+so(a,0):r,Yl(s)?(n="",e!=null&&(n=e.replace(Xl,"$&/")+"/"),Ws(s,t,n,"",function(c){return c})):s!=null&&(Ya(s)&&(s=sh(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(Xl,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Yl(e))for(var l=0;l<e.length;l++){i=e[l];var u=r+so(i,l);a+=Ws(i,t,n,u,s)}else if(u=rh(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+so(i,l++),a+=Ws(i,t,n,u,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function ws(e,t,n){if(e==null)return e;var r=[],s=0;return Ws(e,r,"","",function(i){return t.call(n,i,s++)}),r}function oh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Be={current:null},Bs={transition:null},ah={ReactCurrentDispatcher:Be,ReactCurrentBatchConfig:Bs,ReactCurrentOwner:Ga};function qc(){throw Error("act(...) is not supported in production builds of React.")}K.Children={map:ws,forEach:function(e,t,n){ws(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ws(e,function(){t++}),t},toArray:function(e){return ws(e,function(t){return t})||[]},only:function(e){if(!Ya(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};K.Component=mr;K.Fragment=Kp;K.Profiler=Yp;K.PureComponent=Va;K.StrictMode=Gp;K.Suspense=eh;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ah;K.act=qc;K.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Dc({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Ga.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Wc.call(t,u)&&!Bc.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:ds,type:e.type,key:s,ref:i,props:r,_owner:a}};K.createContext=function(e){return e={$$typeof:Jp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Xp,_context:e},e.Consumer=e};K.createElement=Hc;K.createFactory=function(e){var t=Hc.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Zp,render:e}};K.isValidElement=Ya;K.lazy=function(e){return{$$typeof:nh,_payload:{_status:-1,_result:e},_init:oh}};K.memo=function(e,t){return{$$typeof:th,type:e,compare:t===void 0?null:t}};K.startTransition=function(e){var t=Bs.transition;Bs.transition={};try{e()}finally{Bs.transition=t}};K.unstable_act=qc;K.useCallback=function(e,t){return Be.current.useCallback(e,t)};K.useContext=function(e){return Be.current.useContext(e)};K.useDebugValue=function(){};K.useDeferredValue=function(e){return Be.current.useDeferredValue(e)};K.useEffect=function(e,t){return Be.current.useEffect(e,t)};K.useId=function(){return Be.current.useId()};K.useImperativeHandle=function(e,t,n){return Be.current.useImperativeHandle(e,t,n)};K.useInsertionEffect=function(e,t){return Be.current.useInsertionEffect(e,t)};K.useLayoutEffect=function(e,t){return Be.current.useLayoutEffect(e,t)};K.useMemo=function(e,t){return Be.current.useMemo(e,t)};K.useReducer=function(e,t,n){return Be.current.useReducer(e,t,n)};K.useRef=function(e){return Be.current.useRef(e)};K.useState=function(e){return Be.current.useState(e)};K.useSyncExternalStore=function(e,t,n){return Be.current.useSyncExternalStore(e,t,n)};K.useTransition=function(){return Be.current.useTransition()};K.version="18.3.1";Fc.exports=K;var N=Fc.exports;const _=hr(N),lh=Qp({__proto__:null,default:_},[N]);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var uh=N,ch=Symbol.for("react.element"),dh=Symbol.for("react.fragment"),fh=Object.prototype.hasOwnProperty,ph=uh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hh={key:!0,ref:!0,__self:!0,__source:!0};function Qc(e,t,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)fh.call(t,r)&&!hh.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:ch,type:e,key:i,ref:a,props:s,_owner:ph.current}}Mi.Fragment=dh;Mi.jsx=Qc;Mi.jsxs=Qc;Lc.exports=Mi;var o=Lc.exports,Io={},Vc={exports:{}},tt={},Kc={exports:{}},Gc={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(O,I){var D=O.length;O.push(I);e:for(;0<D;){var ee=D-1>>>1,q=O[ee];if(0<s(q,I))O[ee]=I,O[D]=q,D=ee;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var I=O[0],D=O.pop();if(D!==I){O[0]=D;e:for(var ee=0,q=O.length,X=q>>>1;ee<X;){var we=2*(ee+1)-1,qe=O[we],Se=we+1,wt=O[Se];if(0>s(qe,D))Se<q&&0>s(wt,qe)?(O[ee]=wt,O[Se]=D,ee=Se):(O[ee]=qe,O[we]=D,ee=we);else if(Se<q&&0>s(wt,D))O[ee]=wt,O[Se]=D,ee=Se;else break e}}return I}function s(O,I){var D=O.sortIndex-I.sortIndex;return D!==0?D:O.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var u=[],c=[],d=1,f=null,p=3,y=!1,v=!1,w=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(O){for(var I=n(c);I!==null;){if(I.callback===null)r(c);else if(I.startTime<=O)r(c),I.sortIndex=I.expirationTime,t(u,I);else break;I=n(c)}}function b(O){if(w=!1,g(O),!v)if(n(u)!==null)v=!0,Y(E);else{var I=n(c);I!==null&&ie(b,I.startTime-O)}}function E(O,I){v=!1,w&&(w=!1,m(j),j=-1),y=!0;var D=p;try{for(g(I),f=n(u);f!==null&&(!(f.expirationTime>I)||O&&!Q());){var ee=f.callback;if(typeof ee=="function"){f.callback=null,p=f.priorityLevel;var q=ee(f.expirationTime<=I);I=e.unstable_now(),typeof q=="function"?f.callback=q:f===n(u)&&r(u),g(I)}else r(u);f=n(u)}if(f!==null)var X=!0;else{var we=n(c);we!==null&&ie(b,we.startTime-I),X=!1}return X}finally{f=null,p=D,y=!1}}var P=!1,S=null,j=-1,A=5,z=-1;function Q(){return!(e.unstable_now()-z<A)}function C(){if(S!==null){var O=e.unstable_now();z=O;var I=!0;try{I=S(!0,O)}finally{I?te():(P=!1,S=null)}}else P=!1}var te;if(typeof h=="function")te=function(){h(C)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,se=W.port2;W.port1.onmessage=C,te=function(){se.postMessage(null)}}else te=function(){k(C,0)};function Y(O){S=O,P||(P=!0,te())}function ie(O,I){j=k(function(){O(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){v||y||(v=!0,Y(E))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var D=p;p=I;try{return O()}finally{p=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,I){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var D=p;p=O;try{return I()}finally{p=D}},e.unstable_scheduleCallback=function(O,I,D){var ee=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?ee+D:ee):D=ee,O){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=D+q,O={id:d++,callback:I,priorityLevel:O,startTime:D,expirationTime:q,sortIndex:-1},D>ee?(O.sortIndex=D,t(c,O),n(u)===null&&O===n(c)&&(w?(m(j),j=-1):w=!0,ie(b,D-ee))):(O.sortIndex=q,t(u,O),v||y||(v=!0,Y(E))),O},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(O){var I=p;return function(){var D=p;p=I;try{return O.apply(this,arguments)}finally{p=D}}}})(Gc);Kc.exports=Gc;var mh=Kc.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var gh=N,et=mh;function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Yc=new Set,Qr={};function zn(e,t){ar(e,t),ar(e+"Capture",t)}function ar(e,t){for(Qr[e]=t,e=0;e<t.length;e++)Yc.add(t[e])}var Lt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Do=Object.prototype.hasOwnProperty,yh=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Jl={},Zl={};function vh(e){return Do.call(Zl,e)?!0:Do.call(Jl,e)?!1:yh.test(e)?Zl[e]=!0:(Jl[e]=!0,!1)}function xh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wh(e,t,n,r){if(t===null||typeof t>"u"||xh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function He(e,t,n,r,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new He(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Re[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xa=/[\-:]([a-z])/g;function Ja(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xa,Ja);Re[t]=new He(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xa,Ja);Re[t]=new He(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xa,Ja);Re[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function Za(e,t,n,r){var s=Re.hasOwnProperty(t)?Re[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(wh(t,n,s,r)&&(n=null),r||s===null?vh(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var $t=gh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,js=Symbol.for("react.element"),$n=Symbol.for("react.portal"),Un=Symbol.for("react.fragment"),el=Symbol.for("react.strict_mode"),$o=Symbol.for("react.profiler"),Xc=Symbol.for("react.provider"),Jc=Symbol.for("react.context"),tl=Symbol.for("react.forward_ref"),Uo=Symbol.for("react.suspense"),Wo=Symbol.for("react.suspense_list"),nl=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Zc=Symbol.for("react.offscreen"),eu=Symbol.iterator;function wr(e){return e===null||typeof e!="object"?null:(e=eu&&e[eu]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,io;function Ar(e){if(io===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);io=t&&t[1]||""}return`
34
+ `+io+e}var oo=!1;function ao(e,t){if(!e||oo)return"";oo=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
35
+ `),i=r.stack.split(`
36
+ `),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var u=`
37
+ `+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{oo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ar(e):""}function jh(e){switch(e.tag){case 5:return Ar(e.type);case 16:return Ar("Lazy");case 13:return Ar("Suspense");case 19:return Ar("SuspenseList");case 0:case 2:case 15:return e=ao(e.type,!1),e;case 11:return e=ao(e.type.render,!1),e;case 1:return e=ao(e.type,!0),e;default:return""}}function Bo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Un:return"Fragment";case $n:return"Portal";case $o:return"Profiler";case el:return"StrictMode";case Uo:return"Suspense";case Wo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jc:return(e.displayName||"Context")+".Consumer";case Xc:return(e._context.displayName||"Context")+".Provider";case tl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nl:return t=e.displayName||null,t!==null?t:Bo(e.type)||"Memo";case Bt:t=e._payload,e=e._init;try{return Bo(e(t))}catch{}}return null}function bh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bo(t);case 8:return t===el?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ed(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kh(e){var t=ed(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bs(e){e._valueTracker||(e._valueTracker=kh(e))}function td(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ed(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function si(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ho(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ln(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nd(e,t){t=t.checked,t!=null&&Za(e,"checked",t,!1)}function qo(e,t){nd(e,t);var n=ln(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Qo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Qo(e,t.type,ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Qo(e,t,n){(t!=="number"||si(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Rr=Array.isArray;function Zn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ln(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Vo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ru(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Rr(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ln(n)}}function rd(e,t){var n=ln(t.value),r=ln(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function su(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ko(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ks,id=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ks=ks||document.createElement("div"),ks.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ks.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Vr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nh=["Webkit","ms","Moz","O"];Object.keys(Lr).forEach(function(e){Nh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lr[t]=Lr[e]})});function od(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lr.hasOwnProperty(e)&&Lr[e]?(""+t).trim():t+"px"}function ad(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=od(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Sh=ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Go(e,t){if(t){if(Sh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Yo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Xo=null;function rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jo=null,er=null,tr=null;function iu(e){if(e=hs(e)){if(typeof Jo!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Di(t),Jo(e.stateNode,e.type,t))}}function ld(e){er?tr?tr.push(e):tr=[e]:er=e}function ud(){if(er){var e=er,t=tr;if(tr=er=null,iu(e),t)for(e=0;e<t.length;e++)iu(t[e])}}function cd(e,t){return e(t)}function dd(){}var lo=!1;function fd(e,t,n){if(lo)return e(t,n);lo=!0;try{return cd(e,t,n)}finally{lo=!1,(er!==null||tr!==null)&&(dd(),ud())}}function Kr(e,t){var n=e.stateNode;if(n===null)return null;var r=Di(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(T(231,t,typeof n));return n}var Zo=!1;if(Lt)try{var jr={};Object.defineProperty(jr,"passive",{get:function(){Zo=!0}}),window.addEventListener("test",jr,jr),window.removeEventListener("test",jr,jr)}catch{Zo=!1}function Ch(e,t,n,r,s,i,a,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Fr=!1,ii=null,oi=!1,ea=null,Eh={onError:function(e){Fr=!0,ii=e}};function Ph(e,t,n,r,s,i,a,l,u){Fr=!1,ii=null,Ch.apply(Eh,arguments)}function Th(e,t,n,r,s,i,a,l,u){if(Ph.apply(this,arguments),Fr){if(Fr){var c=ii;Fr=!1,ii=null}else throw Error(T(198));oi||(oi=!0,ea=c)}}function An(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pd(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ou(e){if(An(e)!==e)throw Error(T(188))}function Oh(e){var t=e.alternate;if(!t){if(t=An(e),t===null)throw Error(T(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return ou(s),e;if(i===r)return ou(s),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function hd(e){return e=Oh(e),e!==null?md(e):null}function md(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=md(e);if(t!==null)return t;e=e.sibling}return null}var gd=et.unstable_scheduleCallback,au=et.unstable_cancelCallback,zh=et.unstable_shouldYield,Ah=et.unstable_requestPaint,be=et.unstable_now,Rh=et.unstable_getCurrentPriorityLevel,sl=et.unstable_ImmediatePriority,yd=et.unstable_UserBlockingPriority,ai=et.unstable_NormalPriority,Mh=et.unstable_LowPriority,vd=et.unstable_IdlePriority,_i=null,Ct=null;function _h(e){if(Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(_i,e,void 0,(e.current.flags&128)===128)}catch{}}var yt=Math.clz32?Math.clz32:Ih,Lh=Math.log,Fh=Math.LN2;function Ih(e){return e>>>=0,e===0?32:31-(Lh(e)/Fh|0)|0}var Ns=64,Ss=4194304;function Mr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function li(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Mr(l):(i&=a,i!==0&&(r=Mr(i)))}else a=n&~s,a!==0?r=Mr(a):i!==0&&(r=Mr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-yt(t),s=1<<n,r|=e[n],t&=~s;return r}function Dh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $h(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-yt(i),l=1<<a,u=s[a];u===-1?(!(l&n)||l&r)&&(s[a]=Dh(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function ta(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xd(){var e=Ns;return Ns<<=1,!(Ns&4194240)&&(Ns=64),e}function uo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function Uh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-yt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function il(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var le=0;function wd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jd,ol,bd,kd,Nd,na=!1,Cs=[],Jt=null,Zt=null,en=null,Gr=new Map,Yr=new Map,Vt=[],Wh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function lu(e,t){switch(e){case"focusin":case"focusout":Jt=null;break;case"dragenter":case"dragleave":Zt=null;break;case"mouseover":case"mouseout":en=null;break;case"pointerover":case"pointerout":Gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yr.delete(t.pointerId)}}function br(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=hs(t),t!==null&&ol(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Bh(e,t,n,r,s){switch(t){case"focusin":return Jt=br(Jt,e,t,n,r,s),!0;case"dragenter":return Zt=br(Zt,e,t,n,r,s),!0;case"mouseover":return en=br(en,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Gr.set(i,br(Gr.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Yr.set(i,br(Yr.get(i)||null,e,t,n,r,s)),!0}return!1}function Sd(e){var t=yn(e.target);if(t!==null){var n=An(t);if(n!==null){if(t=n.tag,t===13){if(t=pd(n),t!==null){e.blockedOn=t,Nd(e.priority,function(){bd(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ra(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Xo=r,n.target.dispatchEvent(r),Xo=null}else return t=hs(n),t!==null&&ol(t),e.blockedOn=n,!1;t.shift()}return!0}function uu(e,t,n){Hs(e)&&n.delete(t)}function Hh(){na=!1,Jt!==null&&Hs(Jt)&&(Jt=null),Zt!==null&&Hs(Zt)&&(Zt=null),en!==null&&Hs(en)&&(en=null),Gr.forEach(uu),Yr.forEach(uu)}function kr(e,t){e.blockedOn===t&&(e.blockedOn=null,na||(na=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,Hh)))}function Xr(e){function t(s){return kr(s,e)}if(0<Cs.length){kr(Cs[0],e);for(var n=1;n<Cs.length;n++){var r=Cs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jt!==null&&kr(Jt,e),Zt!==null&&kr(Zt,e),en!==null&&kr(en,e),Gr.forEach(t),Yr.forEach(t),n=0;n<Vt.length;n++)r=Vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Vt.length&&(n=Vt[0],n.blockedOn===null);)Sd(n),n.blockedOn===null&&Vt.shift()}var nr=$t.ReactCurrentBatchConfig,ui=!0;function qh(e,t,n,r){var s=le,i=nr.transition;nr.transition=null;try{le=1,al(e,t,n,r)}finally{le=s,nr.transition=i}}function Qh(e,t,n,r){var s=le,i=nr.transition;nr.transition=null;try{le=4,al(e,t,n,r)}finally{le=s,nr.transition=i}}function al(e,t,n,r){if(ui){var s=ra(e,t,n,r);if(s===null)wo(e,t,r,ci,n),lu(e,r);else if(Bh(s,e,t,n,r))r.stopPropagation();else if(lu(e,r),t&4&&-1<Wh.indexOf(e)){for(;s!==null;){var i=hs(s);if(i!==null&&jd(i),i=ra(e,t,n,r),i===null&&wo(e,t,r,ci,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else wo(e,t,r,null,n)}}var ci=null;function ra(e,t,n,r){if(ci=null,e=rl(r),e=yn(e),e!==null)if(t=An(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pd(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ci=e,null}function Cd(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Rh()){case sl:return 1;case yd:return 4;case ai:case Mh:return 16;case vd:return 536870912;default:return 16}default:return 16}}var Gt=null,ll=null,qs=null;function Ed(){if(qs)return qs;var e,t=ll,n=t.length,r,s="value"in Gt?Gt.value:Gt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return qs=s.slice(e,1<r?1-r:void 0)}function Qs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Es(){return!0}function cu(){return!1}function nt(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Es:cu,this.isPropagationStopped=cu,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Es)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Es)},persist:function(){},isPersistent:Es}),t}var gr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ul=nt(gr),ps=ye({},gr,{view:0,detail:0}),Vh=nt(ps),co,fo,Nr,Li=ye({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Nr&&(Nr&&e.type==="mousemove"?(co=e.screenX-Nr.screenX,fo=e.screenY-Nr.screenY):fo=co=0,Nr=e),co)},movementY:function(e){return"movementY"in e?e.movementY:fo}}),du=nt(Li),Kh=ye({},Li,{dataTransfer:0}),Gh=nt(Kh),Yh=ye({},ps,{relatedTarget:0}),po=nt(Yh),Xh=ye({},gr,{animationName:0,elapsedTime:0,pseudoElement:0}),Jh=nt(Xh),Zh=ye({},gr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),em=nt(Zh),tm=ye({},gr,{data:0}),fu=nt(tm),nm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},sm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function im(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=sm[e])?!!t[e]:!1}function cl(){return im}var om=ye({},ps,{key:function(e){if(e.key){var t=nm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cl,charCode:function(e){return e.type==="keypress"?Qs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),am=nt(om),lm=ye({},Li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pu=nt(lm),um=ye({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cl}),cm=nt(um),dm=ye({},gr,{propertyName:0,elapsedTime:0,pseudoElement:0}),fm=nt(dm),pm=ye({},Li,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),hm=nt(pm),mm=[9,13,27,32],dl=Lt&&"CompositionEvent"in window,Ir=null;Lt&&"documentMode"in document&&(Ir=document.documentMode);var gm=Lt&&"TextEvent"in window&&!Ir,Pd=Lt&&(!dl||Ir&&8<Ir&&11>=Ir),hu=String.fromCharCode(32),mu=!1;function Td(e,t){switch(e){case"keyup":return mm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Od(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wn=!1;function ym(e,t){switch(e){case"compositionend":return Od(t);case"keypress":return t.which!==32?null:(mu=!0,hu);case"textInput":return e=t.data,e===hu&&mu?null:e;default:return null}}function vm(e,t){if(Wn)return e==="compositionend"||!dl&&Td(e,t)?(e=Ed(),qs=ll=Gt=null,Wn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Pd&&t.locale!=="ko"?null:t.data;default:return null}}var xm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function gu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xm[e.type]:t==="textarea"}function zd(e,t,n,r){ld(r),t=di(t,"onChange"),0<t.length&&(n=new ul("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dr=null,Jr=null;function wm(e){Wd(e,0)}function Fi(e){var t=qn(e);if(td(t))return e}function jm(e,t){if(e==="change")return t}var Ad=!1;if(Lt){var ho;if(Lt){var mo="oninput"in document;if(!mo){var yu=document.createElement("div");yu.setAttribute("oninput","return;"),mo=typeof yu.oninput=="function"}ho=mo}else ho=!1;Ad=ho&&(!document.documentMode||9<document.documentMode)}function vu(){Dr&&(Dr.detachEvent("onpropertychange",Rd),Jr=Dr=null)}function Rd(e){if(e.propertyName==="value"&&Fi(Jr)){var t=[];zd(t,Jr,e,rl(e)),fd(wm,t)}}function bm(e,t,n){e==="focusin"?(vu(),Dr=t,Jr=n,Dr.attachEvent("onpropertychange",Rd)):e==="focusout"&&vu()}function km(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fi(Jr)}function Nm(e,t){if(e==="click")return Fi(t)}function Sm(e,t){if(e==="input"||e==="change")return Fi(t)}function Cm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:Cm;function Zr(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Do.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function xu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wu(e,t){var n=xu(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=xu(n)}}function Md(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Md(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _d(){for(var e=window,t=si();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=si(e.document)}return t}function fl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Em(e){var t=_d(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Md(n.ownerDocument.documentElement,n)){if(r!==null&&fl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=wu(n,i);var a=wu(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Pm=Lt&&"documentMode"in document&&11>=document.documentMode,Bn=null,sa=null,$r=null,ia=!1;function ju(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ia||Bn==null||Bn!==si(r)||(r=Bn,"selectionStart"in r&&fl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Zr($r,r)||($r=r,r=di(sa,"onSelect"),0<r.length&&(t=new ul("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Bn)))}function Ps(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Hn={animationend:Ps("Animation","AnimationEnd"),animationiteration:Ps("Animation","AnimationIteration"),animationstart:Ps("Animation","AnimationStart"),transitionend:Ps("Transition","TransitionEnd")},go={},Ld={};Lt&&(Ld=document.createElement("div").style,"AnimationEvent"in window||(delete Hn.animationend.animation,delete Hn.animationiteration.animation,delete Hn.animationstart.animation),"TransitionEvent"in window||delete Hn.transitionend.transition);function Ii(e){if(go[e])return go[e];if(!Hn[e])return e;var t=Hn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ld)return go[e]=t[n];return e}var Fd=Ii("animationend"),Id=Ii("animationiteration"),Dd=Ii("animationstart"),$d=Ii("transitionend"),Ud=new Map,bu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cn(e,t){Ud.set(e,t),zn(t,[e])}for(var yo=0;yo<bu.length;yo++){var vo=bu[yo],Tm=vo.toLowerCase(),Om=vo[0].toUpperCase()+vo.slice(1);cn(Tm,"on"+Om)}cn(Fd,"onAnimationEnd");cn(Id,"onAnimationIteration");cn(Dd,"onAnimationStart");cn("dblclick","onDoubleClick");cn("focusin","onFocus");cn("focusout","onBlur");cn($d,"onTransitionEnd");ar("onMouseEnter",["mouseout","mouseover"]);ar("onMouseLeave",["mouseout","mouseover"]);ar("onPointerEnter",["pointerout","pointerover"]);ar("onPointerLeave",["pointerout","pointerover"]);zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zn("onBeforeInput",["compositionend","keypress","textInput","paste"]);zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zm=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function ku(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Th(r,t,void 0,e),e.currentTarget=null}function Wd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==i&&s.isPropagationStopped())break e;ku(s,l,c),i=u}else for(a=0;a<r.length;a++){if(l=r[a],u=l.instance,c=l.currentTarget,l=l.listener,u!==i&&s.isPropagationStopped())break e;ku(s,l,c),i=u}}}if(oi)throw e=ea,oi=!1,ea=null,e}function fe(e,t){var n=t[ca];n===void 0&&(n=t[ca]=new Set);var r=e+"__bubble";n.has(r)||(Bd(t,e,2,!1),n.add(r))}function xo(e,t,n){var r=0;t&&(r|=4),Bd(n,e,r,t)}var Ts="_reactListening"+Math.random().toString(36).slice(2);function es(e){if(!e[Ts]){e[Ts]=!0,Yc.forEach(function(n){n!=="selectionchange"&&(zm.has(n)||xo(n,!1,e),xo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ts]||(t[Ts]=!0,xo("selectionchange",!1,t))}}function Bd(e,t,n,r){switch(Cd(t)){case 1:var s=qh;break;case 4:s=Qh;break;default:s=al}n=s.bind(null,t,n,e),s=void 0,!Zo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function wo(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;l!==null;){if(a=yn(l),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}l=l.parentNode}}r=r.return}fd(function(){var c=i,d=rl(n),f=[];e:{var p=Ud.get(e);if(p!==void 0){var y=ul,v=e;switch(e){case"keypress":if(Qs(n)===0)break e;case"keydown":case"keyup":y=am;break;case"focusin":v="focus",y=po;break;case"focusout":v="blur",y=po;break;case"beforeblur":case"afterblur":y=po;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=du;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=cm;break;case Fd:case Id:case Dd:y=Jh;break;case $d:y=fm;break;case"scroll":y=Vh;break;case"wheel":y=hm;break;case"copy":case"cut":case"paste":y=em;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=pu}var w=(t&4)!==0,k=!w&&e==="scroll",m=w?p!==null?p+"Capture":null:p;w=[];for(var h=c,g;h!==null;){g=h;var b=g.stateNode;if(g.tag===5&&b!==null&&(g=b,m!==null&&(b=Kr(h,m),b!=null&&w.push(ts(h,b,g)))),k)break;h=h.return}0<w.length&&(p=new y(p,v,null,n,d),f.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==Xo&&(v=n.relatedTarget||n.fromElement)&&(yn(v)||v[Ft]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(v=n.relatedTarget||n.toElement,y=c,v=v?yn(v):null,v!==null&&(k=An(v),v!==k||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=c),y!==v)){if(w=du,b="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(w=pu,b="onPointerLeave",m="onPointerEnter",h="pointer"),k=y==null?p:qn(y),g=v==null?p:qn(v),p=new w(b,h+"leave",y,n,d),p.target=k,p.relatedTarget=g,b=null,yn(d)===c&&(w=new w(m,h+"enter",v,n,d),w.target=g,w.relatedTarget=k,b=w),k=b,y&&v)t:{for(w=y,m=v,h=0,g=w;g;g=In(g))h++;for(g=0,b=m;b;b=In(b))g++;for(;0<h-g;)w=In(w),h--;for(;0<g-h;)m=In(m),g--;for(;h--;){if(w===m||m!==null&&w===m.alternate)break t;w=In(w),m=In(m)}w=null}else w=null;y!==null&&Nu(f,p,y,w,!1),v!==null&&k!==null&&Nu(f,k,v,w,!0)}}e:{if(p=c?qn(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var E=jm;else if(gu(p))if(Ad)E=Sm;else{E=km;var P=bm}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=Nm);if(E&&(E=E(e,c))){zd(f,E,n,d);break e}P&&P(e,p,c),e==="focusout"&&(P=p._wrapperState)&&P.controlled&&p.type==="number"&&Qo(p,"number",p.value)}switch(P=c?qn(c):window,e){case"focusin":(gu(P)||P.contentEditable==="true")&&(Bn=P,sa=c,$r=null);break;case"focusout":$r=sa=Bn=null;break;case"mousedown":ia=!0;break;case"contextmenu":case"mouseup":case"dragend":ia=!1,ju(f,n,d);break;case"selectionchange":if(Pm)break;case"keydown":case"keyup":ju(f,n,d)}var S;if(dl)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Wn?Td(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Pd&&n.locale!=="ko"&&(Wn||j!=="onCompositionStart"?j==="onCompositionEnd"&&Wn&&(S=Ed()):(Gt=d,ll="value"in Gt?Gt.value:Gt.textContent,Wn=!0)),P=di(c,j),0<P.length&&(j=new fu(j,e,null,n,d),f.push({event:j,listeners:P}),S?j.data=S:(S=Od(n),S!==null&&(j.data=S)))),(S=gm?ym(e,n):vm(e,n))&&(c=di(c,"onBeforeInput"),0<c.length&&(d=new fu("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=S))}Wd(f,t)})}function ts(e,t,n){return{instance:e,listener:t,currentTarget:n}}function di(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Kr(e,n),i!=null&&r.unshift(ts(e,i,s)),i=Kr(e,t),i!=null&&r.push(ts(e,i,s))),e=e.return}return r}function In(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Nu(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,s?(u=Kr(n,i),u!=null&&a.unshift(ts(n,u,l))):s||(u=Kr(n,i),u!=null&&a.push(ts(n,u,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Am=/\r\n?/g,Rm=/\u0000|\uFFFD/g;function Su(e){return(typeof e=="string"?e:""+e).replace(Am,`
38
+ `).replace(Rm,"")}function Os(e,t,n){if(t=Su(t),Su(e)!==t&&n)throw Error(T(425))}function fi(){}var oa=null,aa=null;function la(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ua=typeof setTimeout=="function"?setTimeout:void 0,Mm=typeof clearTimeout=="function"?clearTimeout:void 0,Cu=typeof Promise=="function"?Promise:void 0,_m=typeof queueMicrotask=="function"?queueMicrotask:typeof Cu<"u"?function(e){return Cu.resolve(null).then(e).catch(Lm)}:ua;function Lm(e){setTimeout(function(){throw e})}function jo(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Xr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Xr(t)}function tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Eu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var yr=Math.random().toString(36).slice(2),St="__reactFiber$"+yr,ns="__reactProps$"+yr,Ft="__reactContainer$"+yr,ca="__reactEvents$"+yr,Fm="__reactListeners$"+yr,Im="__reactHandles$"+yr;function yn(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ft]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Eu(e);e!==null;){if(n=e[St])return n;e=Eu(e)}return t}e=n,n=e.parentNode}return null}function hs(e){return e=e[St]||e[Ft],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Di(e){return e[ns]||null}var da=[],Qn=-1;function dn(e){return{current:e}}function pe(e){0>Qn||(e.current=da[Qn],da[Qn]=null,Qn--)}function ce(e,t){Qn++,da[Qn]=e.current,e.current=t}var un={},Ie=dn(un),Ke=dn(!1),Cn=un;function lr(e,t){var n=e.type.contextTypes;if(!n)return un;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ge(e){return e=e.childContextTypes,e!=null}function pi(){pe(Ke),pe(Ie)}function Pu(e,t,n){if(Ie.current!==un)throw Error(T(168));ce(Ie,t),ce(Ke,n)}function Hd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,bh(e)||"Unknown",s));return ye({},n,r)}function hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||un,Cn=Ie.current,ce(Ie,e),ce(Ke,Ke.current),!0}function Tu(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Hd(e,t,Cn),r.__reactInternalMemoizedMergedChildContext=e,pe(Ke),pe(Ie),ce(Ie,e)):pe(Ke),ce(Ke,n)}var zt=null,$i=!1,bo=!1;function qd(e){zt===null?zt=[e]:zt.push(e)}function Dm(e){$i=!0,qd(e)}function fn(){if(!bo&&zt!==null){bo=!0;var e=0,t=le;try{var n=zt;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zt=null,$i=!1}catch(s){throw zt!==null&&(zt=zt.slice(e+1)),gd(sl,fn),s}finally{le=t,bo=!1}}return null}var Vn=[],Kn=0,mi=null,gi=0,st=[],it=0,En=null,Rt=1,Mt="";function hn(e,t){Vn[Kn++]=gi,Vn[Kn++]=mi,mi=e,gi=t}function Qd(e,t,n){st[it++]=Rt,st[it++]=Mt,st[it++]=En,En=e;var r=Rt;e=Mt;var s=32-yt(r)-1;r&=~(1<<s),n+=1;var i=32-yt(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Rt=1<<32-yt(t)+s|n<<s|r,Mt=i+e}else Rt=1<<i|n<<s|r,Mt=e}function pl(e){e.return!==null&&(hn(e,1),Qd(e,1,0))}function hl(e){for(;e===mi;)mi=Vn[--Kn],Vn[Kn]=null,gi=Vn[--Kn],Vn[Kn]=null;for(;e===En;)En=st[--it],st[it]=null,Mt=st[--it],st[it]=null,Rt=st[--it],st[it]=null}var Ze=null,Je=null,he=!1,gt=null;function Vd(e,t){var n=ot(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ou(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ze=e,Je=tn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ze=e,Je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=En!==null?{id:Rt,overflow:Mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ze=e,Je=null,!0):!1;default:return!1}}function fa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function pa(e){if(he){var t=Je;if(t){var n=t;if(!Ou(e,t)){if(fa(e))throw Error(T(418));t=tn(n.nextSibling);var r=Ze;t&&Ou(e,t)?Vd(r,n):(e.flags=e.flags&-4097|2,he=!1,Ze=e)}}else{if(fa(e))throw Error(T(418));e.flags=e.flags&-4097|2,he=!1,Ze=e}}}function zu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ze=e}function zs(e){if(e!==Ze)return!1;if(!he)return zu(e),he=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!la(e.type,e.memoizedProps)),t&&(t=Je)){if(fa(e))throw Kd(),Error(T(418));for(;t;)Vd(e,t),t=tn(t.nextSibling)}if(zu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Je=tn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Je=null}}else Je=Ze?tn(e.stateNode.nextSibling):null;return!0}function Kd(){for(var e=Je;e;)e=tn(e.nextSibling)}function ur(){Je=Ze=null,he=!1}function ml(e){gt===null?gt=[e]:gt.push(e)}var $m=$t.ReactCurrentBatchConfig;function Sr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(T(309));var r=n.stateNode}if(!r)throw Error(T(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=s.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function As(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Au(e){var t=e._init;return t(e._payload)}function Gd(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function r(m,h){for(m=new Map;h!==null;)h.key!==null?m.set(h.key,h):m.set(h.index,h),h=h.sibling;return m}function s(m,h){return m=on(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=2,h):g):(m.flags|=2,h)):(m.flags|=1048576,h)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,h,g,b){return h===null||h.tag!==6?(h=To(g,m.mode,b),h.return=m,h):(h=s(h,g),h.return=m,h)}function u(m,h,g,b){var E=g.type;return E===Un?d(m,h,g.props.children,b,g.key):h!==null&&(h.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Bt&&Au(E)===h.type)?(b=s(h,g.props),b.ref=Sr(m,h,g),b.return=m,b):(b=Zs(g.type,g.key,g.props,null,m.mode,b),b.ref=Sr(m,h,g),b.return=m,b)}function c(m,h,g,b){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Oo(g,m.mode,b),h.return=m,h):(h=s(h,g.children||[]),h.return=m,h)}function d(m,h,g,b,E){return h===null||h.tag!==7?(h=kn(g,m.mode,b,E),h.return=m,h):(h=s(h,g),h.return=m,h)}function f(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number")return h=To(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case js:return g=Zs(h.type,h.key,h.props,null,m.mode,g),g.ref=Sr(m,null,h),g.return=m,g;case $n:return h=Oo(h,m.mode,g),h.return=m,h;case Bt:var b=h._init;return f(m,b(h._payload),g)}if(Rr(h)||wr(h))return h=kn(h,m.mode,g,null),h.return=m,h;As(m,h)}return null}function p(m,h,g,b){var E=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return E!==null?null:l(m,h,""+g,b);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case js:return g.key===E?u(m,h,g,b):null;case $n:return g.key===E?c(m,h,g,b):null;case Bt:return E=g._init,p(m,h,E(g._payload),b)}if(Rr(g)||wr(g))return E!==null?null:d(m,h,g,b,null);As(m,g)}return null}function y(m,h,g,b,E){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(g)||null,l(h,m,""+b,E);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case js:return m=m.get(b.key===null?g:b.key)||null,u(h,m,b,E);case $n:return m=m.get(b.key===null?g:b.key)||null,c(h,m,b,E);case Bt:var P=b._init;return y(m,h,g,P(b._payload),E)}if(Rr(b)||wr(b))return m=m.get(g)||null,d(h,m,b,E,null);As(h,b)}return null}function v(m,h,g,b){for(var E=null,P=null,S=h,j=h=0,A=null;S!==null&&j<g.length;j++){S.index>j?(A=S,S=null):A=S.sibling;var z=p(m,S,g[j],b);if(z===null){S===null&&(S=A);break}e&&S&&z.alternate===null&&t(m,S),h=i(z,h,j),P===null?E=z:P.sibling=z,P=z,S=A}if(j===g.length)return n(m,S),he&&hn(m,j),E;if(S===null){for(;j<g.length;j++)S=f(m,g[j],b),S!==null&&(h=i(S,h,j),P===null?E=S:P.sibling=S,P=S);return he&&hn(m,j),E}for(S=r(m,S);j<g.length;j++)A=y(S,m,j,g[j],b),A!==null&&(e&&A.alternate!==null&&S.delete(A.key===null?j:A.key),h=i(A,h,j),P===null?E=A:P.sibling=A,P=A);return e&&S.forEach(function(Q){return t(m,Q)}),he&&hn(m,j),E}function w(m,h,g,b){var E=wr(g);if(typeof E!="function")throw Error(T(150));if(g=E.call(g),g==null)throw Error(T(151));for(var P=E=null,S=h,j=h=0,A=null,z=g.next();S!==null&&!z.done;j++,z=g.next()){S.index>j?(A=S,S=null):A=S.sibling;var Q=p(m,S,z.value,b);if(Q===null){S===null&&(S=A);break}e&&S&&Q.alternate===null&&t(m,S),h=i(Q,h,j),P===null?E=Q:P.sibling=Q,P=Q,S=A}if(z.done)return n(m,S),he&&hn(m,j),E;if(S===null){for(;!z.done;j++,z=g.next())z=f(m,z.value,b),z!==null&&(h=i(z,h,j),P===null?E=z:P.sibling=z,P=z);return he&&hn(m,j),E}for(S=r(m,S);!z.done;j++,z=g.next())z=y(S,m,j,z.value,b),z!==null&&(e&&z.alternate!==null&&S.delete(z.key===null?j:z.key),h=i(z,h,j),P===null?E=z:P.sibling=z,P=z);return e&&S.forEach(function(C){return t(m,C)}),he&&hn(m,j),E}function k(m,h,g,b){if(typeof g=="object"&&g!==null&&g.type===Un&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case js:e:{for(var E=g.key,P=h;P!==null;){if(P.key===E){if(E=g.type,E===Un){if(P.tag===7){n(m,P.sibling),h=s(P,g.props.children),h.return=m,m=h;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Bt&&Au(E)===P.type){n(m,P.sibling),h=s(P,g.props),h.ref=Sr(m,P,g),h.return=m,m=h;break e}n(m,P);break}else t(m,P);P=P.sibling}g.type===Un?(h=kn(g.props.children,m.mode,b,g.key),h.return=m,m=h):(b=Zs(g.type,g.key,g.props,null,m.mode,b),b.ref=Sr(m,h,g),b.return=m,m=b)}return a(m);case $n:e:{for(P=g.key;h!==null;){if(h.key===P)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=s(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Oo(g,m.mode,b),h.return=m,m=h}return a(m);case Bt:return P=g._init,k(m,h,P(g._payload),b)}if(Rr(g))return v(m,h,g,b);if(wr(g))return w(m,h,g,b);As(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=s(h,g),h.return=m,m=h):(n(m,h),h=To(g,m.mode,b),h.return=m,m=h),a(m)):n(m,h)}return k}var cr=Gd(!0),Yd=Gd(!1),yi=dn(null),vi=null,Gn=null,gl=null;function yl(){gl=Gn=vi=null}function vl(e){var t=yi.current;pe(yi),e._currentValue=t}function ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function rr(e,t){vi=e,gl=Gn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ve=!0),e.firstContext=null)}function lt(e){var t=e._currentValue;if(gl!==e)if(e={context:e,memoizedValue:t,next:null},Gn===null){if(vi===null)throw Error(T(308));Gn=e,vi.dependencies={lanes:0,firstContext:e}}else Gn=Gn.next=e;return t}var vn=null;function xl(e){vn===null?vn=[e]:vn.push(e)}function Xd(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,xl(t)):(n.next=s.next,s.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ht=!1;function wl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,It(e,n)}return s=r.interleaved,s===null?(t.next=t,xl(r)):(t.next=s.next,s.next=t),r.interleaved=t,It(e,n)}function Vs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,il(e,n)}}function Ru(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xi(e,t,n,r){var s=e.updateQueue;Ht=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,a===null?i=c:a.next=c,a=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;a=0,d=c=u=null,l=i;do{var p=l.lane,y=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,w=l;switch(p=t,y=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(y,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,p=typeof v=="function"?v.call(y,f,p):v,p==null)break e;f=ye({},f,p);break e;case 2:Ht=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=y,u=f):d=d.next=y,a|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(1);if(d===null&&(u=f),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Tn|=a,e.lanes=a,e.memoizedState=f}}function Mu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(T(191,s));s.call(r)}}}var ms={},Et=dn(ms),rs=dn(ms),ss=dn(ms);function xn(e){if(e===ms)throw Error(T(174));return e}function jl(e,t){switch(ce(ss,t),ce(rs,e),ce(Et,ms),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ko(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ko(t,e)}pe(Et),ce(Et,t)}function dr(){pe(Et),pe(rs),pe(ss)}function Zd(e){xn(ss.current);var t=xn(Et.current),n=Ko(t,e.type);t!==n&&(ce(rs,e),ce(Et,n))}function bl(e){rs.current===e&&(pe(Et),pe(rs))}var me=dn(0);function wi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ko=[];function kl(){for(var e=0;e<ko.length;e++)ko[e]._workInProgressVersionPrimary=null;ko.length=0}var Ks=$t.ReactCurrentDispatcher,No=$t.ReactCurrentBatchConfig,Pn=0,ge=null,Ee=null,Te=null,ji=!1,Ur=!1,is=0,Um=0;function _e(){throw Error(T(321))}function Nl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function Sl(e,t,n,r,s,i){if(Pn=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ks.current=e===null||e.memoizedState===null?qm:Qm,e=n(r,s),Ur){i=0;do{if(Ur=!1,is=0,25<=i)throw Error(T(301));i+=1,Te=Ee=null,t.updateQueue=null,Ks.current=Vm,e=n(r,s)}while(Ur)}if(Ks.current=bi,t=Ee!==null&&Ee.next!==null,Pn=0,Te=Ee=ge=null,ji=!1,t)throw Error(T(300));return e}function Cl(){var e=is!==0;return is=0,e}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?ge.memoizedState=Te=e:Te=Te.next=e,Te}function ut(){if(Ee===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=Te===null?ge.memoizedState:Te.next;if(t!==null)Te=t,Ee=e;else{if(e===null)throw Error(T(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},Te===null?ge.memoizedState=Te=e:Te=Te.next=e}return Te}function os(e,t){return typeof t=="function"?t(e):t}function So(e){var t=ut(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Ee,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=a=null,u=null,c=i;do{var d=c.lane;if((Pn&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=f,a=r):u=u.next=f,ge.lanes|=d,Tn|=d}c=c.next}while(c!==null&&c!==i);u===null?a=r:u.next=l,xt(r,t.memoizedState)||(Ve=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ge.lanes|=i,Tn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Co(e){var t=ut(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);xt(i,t.memoizedState)||(Ve=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ef(){}function tf(e,t){var n=ge,r=ut(),s=t(),i=!xt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ve=!0),r=r.queue,El(sf.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Te!==null&&Te.memoizedState.tag&1){if(n.flags|=2048,as(9,rf.bind(null,n,r,s,t),void 0,null),Oe===null)throw Error(T(349));Pn&30||nf(n,t,s)}return s}function nf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rf(e,t,n,r){t.value=n,t.getSnapshot=r,of(t)&&af(e)}function sf(e,t,n){return n(function(){of(t)&&af(e)})}function of(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function af(e){var t=It(e,1);t!==null&&vt(t,e,1,-1)}function _u(e){var t=kt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},t.queue=e,e=e.dispatch=Hm.bind(null,ge,e),[t.memoizedState,e]}function as(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function lf(){return ut().memoizedState}function Gs(e,t,n,r){var s=kt();ge.flags|=e,s.memoizedState=as(1|t,n,void 0,r===void 0?null:r)}function Ui(e,t,n,r){var s=ut();r=r===void 0?null:r;var i=void 0;if(Ee!==null){var a=Ee.memoizedState;if(i=a.destroy,r!==null&&Nl(r,a.deps)){s.memoizedState=as(t,n,i,r);return}}ge.flags|=e,s.memoizedState=as(1|t,n,i,r)}function Lu(e,t){return Gs(8390656,8,e,t)}function El(e,t){return Ui(2048,8,e,t)}function uf(e,t){return Ui(4,2,e,t)}function cf(e,t){return Ui(4,4,e,t)}function df(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ff(e,t,n){return n=n!=null?n.concat([e]):null,Ui(4,4,df.bind(null,t,e),n)}function Pl(){}function pf(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Nl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hf(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Nl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function mf(e,t,n){return Pn&21?(xt(n,t)||(n=xd(),ge.lanes|=n,Tn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ve=!0),e.memoizedState=n)}function Wm(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=No.transition;No.transition={};try{e(!1),t()}finally{le=n,No.transition=r}}function gf(){return ut().memoizedState}function Bm(e,t,n){var r=sn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yf(e))vf(t,n);else if(n=Xd(e,t,n,r),n!==null){var s=We();vt(n,e,r,s),xf(n,t,r)}}function Hm(e,t,n){var r=sn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yf(e))vf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(s.hasEagerState=!0,s.eagerState=l,xt(l,a)){var u=t.interleaved;u===null?(s.next=s,xl(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Xd(e,t,s,r),n!==null&&(s=We(),vt(n,e,r,s),xf(n,t,r))}}function yf(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function vf(e,t){Ur=ji=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,il(e,n)}}var bi={readContext:lt,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},qm={readContext:lt,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:Lu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,df.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Bm.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:_u,useDebugValue:Pl,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=_u(!1),t=e[0];return e=Wm.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ge,s=kt();if(he){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),Oe===null)throw Error(T(349));Pn&30||nf(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Lu(sf.bind(null,r,i,e),[e]),r.flags|=2048,as(9,rf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=kt(),t=Oe.identifierPrefix;if(he){var n=Mt,r=Rt;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=is++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Um++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Qm={readContext:lt,useCallback:pf,useContext:lt,useEffect:El,useImperativeHandle:ff,useInsertionEffect:uf,useLayoutEffect:cf,useMemo:hf,useReducer:So,useRef:lf,useState:function(){return So(os)},useDebugValue:Pl,useDeferredValue:function(e){var t=ut();return mf(t,Ee.memoizedState,e)},useTransition:function(){var e=So(os)[0],t=ut().memoizedState;return[e,t]},useMutableSource:ef,useSyncExternalStore:tf,useId:gf,unstable_isNewReconciler:!1},Vm={readContext:lt,useCallback:pf,useContext:lt,useEffect:El,useImperativeHandle:ff,useInsertionEffect:uf,useLayoutEffect:cf,useMemo:hf,useReducer:Co,useRef:lf,useState:function(){return Co(os)},useDebugValue:Pl,useDeferredValue:function(e){var t=ut();return Ee===null?t.memoizedState=e:mf(t,Ee.memoizedState,e)},useTransition:function(){var e=Co(os)[0],t=ut().memoizedState;return[e,t]},useMutableSource:ef,useSyncExternalStore:tf,useId:gf,unstable_isNewReconciler:!1};function pt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ma(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wi={isMounted:function(e){return(e=e._reactInternals)?An(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=We(),s=sn(e),i=_t(r,s);i.payload=t,n!=null&&(i.callback=n),t=nn(e,i,s),t!==null&&(vt(t,e,s,r),Vs(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=We(),s=sn(e),i=_t(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=nn(e,i,s),t!==null&&(vt(t,e,s,r),Vs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=We(),r=sn(e),s=_t(n,r);s.tag=2,t!=null&&(s.callback=t),t=nn(e,s,r),t!==null&&(vt(t,e,r,n),Vs(t,e,r))}};function Fu(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Zr(n,r)||!Zr(s,i):!0}function wf(e,t,n){var r=!1,s=un,i=t.contextType;return typeof i=="object"&&i!==null?i=lt(i):(s=Ge(t)?Cn:Ie.current,r=t.contextTypes,i=(r=r!=null)?lr(e,s):un),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Iu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Wi.enqueueReplaceState(t,t.state,null)}function ga(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},wl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=lt(i):(i=Ge(t)?Cn:Ie.current,s.context=lr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ma(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Wi.enqueueReplaceState(s,s.state,null),xi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function fr(e,t){try{var n="",r=t;do n+=jh(r),r=r.return;while(r);var s=n}catch(i){s=`
39
+ Error generating stack: `+i.message+`
40
+ `+i.stack}return{value:e,source:t,stack:s,digest:null}}function Eo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ya(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Km=typeof WeakMap=="function"?WeakMap:Map;function jf(e,t,n){n=_t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ni||(Ni=!0,Ea=r),ya(e,t)},n}function bf(e,t,n){n=_t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){ya(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ya(e,t),typeof r!="function"&&(rn===null?rn=new Set([this]):rn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Du(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Km;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lg.bind(null,e,t,n),t.then(e,e))}function $u(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Uu(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_t(-1,1),t.tag=2,nn(n,t,1))),n.lanes|=1),e)}var Gm=$t.ReactCurrentOwner,Ve=!1;function $e(e,t,n,r){t.child=e===null?Yd(t,null,n,r):cr(t,e.child,n,r)}function Wu(e,t,n,r,s){n=n.render;var i=t.ref;return rr(t,s),r=Sl(e,t,n,r,i,s),n=Cl(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(he&&n&&pl(t),t.flags|=1,$e(e,t,r,s),t.child)}function Bu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Ll(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,kf(e,t,i,r,s)):(e=Zs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Zr,n(a,r)&&e.ref===t.ref)return Dt(e,t,s)}return t.flags|=1,e=on(i,r),e.ref=t.ref,e.return=t,t.child=e}function kf(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Zr(i,r)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ve=!0);else return t.lanes=e.lanes,Dt(e,t,s)}return va(e,t,n,r,s)}function Nf(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(Xn,Xe),Xe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ce(Xn,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(Xn,Xe),Xe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ce(Xn,Xe),Xe|=r;return $e(e,t,s,n),t.child}function Sf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function va(e,t,n,r,s){var i=Ge(n)?Cn:Ie.current;return i=lr(t,i),rr(t,s),n=Sl(e,t,n,r,i,s),r=Cl(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(he&&r&&pl(t),t.flags|=1,$e(e,t,n,s),t.child)}function Hu(e,t,n,r,s){if(Ge(n)){var i=!0;hi(t)}else i=!1;if(rr(t,s),t.stateNode===null)Ys(e,t),wf(t,n,r),ga(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=lt(c):(c=Ge(n)?Cn:Ie.current,c=lr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||u!==c)&&Iu(t,a,r,c),Ht=!1;var p=t.memoizedState;a.state=p,xi(t,r,a,s),u=t.memoizedState,l!==r||p!==u||Ke.current||Ht?(typeof d=="function"&&(ma(t,n,d,r),u=t.memoizedState),(l=Ht||Fu(t,n,l,r,p,u,c))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Jd(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:pt(t.type,l),a.props=c,f=t.pendingProps,p=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=lt(u):(u=Ge(n)?Cn:Ie.current,u=lr(t,u));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==u)&&Iu(t,a,r,u),Ht=!1,p=t.memoizedState,a.state=p,xi(t,r,a,s);var v=t.memoizedState;l!==f||p!==v||Ke.current||Ht?(typeof y=="function"&&(ma(t,n,y,r),v=t.memoizedState),(c=Ht||Fu(t,n,c,r,p,v,u)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=u,r=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return xa(e,t,n,r,i,s)}function xa(e,t,n,r,s,i){Sf(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Tu(t,n,!1),Dt(e,t,i);r=t.stateNode,Gm.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=cr(t,e.child,null,i),t.child=cr(t,null,l,i)):$e(e,t,l,i),t.memoizedState=r.state,s&&Tu(t,n,!0),t.child}function Cf(e){var t=e.stateNode;t.pendingContext?Pu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Pu(e,t.context,!1),jl(e,t.containerInfo)}function qu(e,t,n,r,s){return ur(),ml(s),t.flags|=256,$e(e,t,n,r),t.child}var wa={dehydrated:null,treeContext:null,retryLane:0};function ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ef(e,t,n){var r=t.pendingProps,s=me.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ce(me,s&1),e===null)return pa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=qi(a,r,0,null),e=kn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ja(n),t.memoizedState=wa,e):Tl(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return Ym(e,t,a,r,l,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=on(s,u),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=on(l,i):(i=kn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ja(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=wa,r}return i=e.child,e=i.sibling,r=on(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Tl(e,t){return t=qi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Rs(e,t,n,r){return r!==null&&ml(r),cr(t,e.child,null,n),e=Tl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ym(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Eo(Error(T(422))),Rs(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=qi({mode:"visible",children:r.children},s,0,null),i=kn(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&cr(t,e.child,null,a),t.child.memoizedState=ja(a),t.memoizedState=wa,i);if(!(t.mode&1))return Rs(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(T(419)),r=Eo(i,r,void 0),Rs(e,t,a,r)}if(l=(a&e.childLanes)!==0,Ve||l){if(r=Oe,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,It(e,s),vt(r,e,s,-1))}return _l(),r=Eo(Error(T(421))),Rs(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=ug.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Je=tn(s.nextSibling),Ze=t,he=!0,gt=null,e!==null&&(st[it++]=Rt,st[it++]=Mt,st[it++]=En,Rt=e.id,Mt=e.overflow,En=t),t=Tl(t,r.children),t.flags|=4096,t)}function Qu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ha(e.return,t,n)}function Po(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Pf(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=me.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qu(e,n,t);else if(e.tag===19)Qu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ce(me,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&wi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Po(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Po(t,!0,n,null,i);break;case"together":Po(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ys(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=on(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=on(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Xm(e,t,n){switch(t.tag){case 3:Cf(t),ur();break;case 5:Zd(t);break;case 1:Ge(t.type)&&hi(t);break;case 4:jl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ce(yi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?Ef(e,t,n):(ce(me,me.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);ce(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pf(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ce(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,Nf(e,t,n)}return Dt(e,t,n)}var Tf,ba,Of,zf;Tf=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ba=function(){};Of=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,xn(Et.current);var i=null;switch(n){case"input":s=Ho(e,s),r=Ho(e,r),i=[];break;case"select":s=ye({},s,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":s=Vo(e,s),r=Vo(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fi)}Go(n,r);var a;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Qr.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Qr.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&fe("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};zf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Cr(e,t){if(!he)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Jm(e,t,n){var r=t.pendingProps;switch(hl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Ge(t.type)&&pi(),Le(t),null;case 3:return r=t.stateNode,dr(),pe(Ke),pe(Ie),kl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(zs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gt!==null&&(Oa(gt),gt=null))),ba(e,t),Le(t),null;case 5:bl(t);var s=xn(ss.current);if(n=t.type,e!==null&&t.stateNode!=null)Of(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return Le(t),null}if(e=xn(Et.current),zs(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[St]=t,r[ns]=i,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(s=0;s<_r.length;s++)fe(_r[s],r);break;case"source":fe("error",r);break;case"img":case"image":case"link":fe("error",r),fe("load",r);break;case"details":fe("toggle",r);break;case"input":tu(r,i),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},fe("invalid",r);break;case"textarea":ru(r,i),fe("invalid",r)}Go(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Os(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Os(r.textContent,l,e),s=["children",""+l]):Qr.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&fe("scroll",r)}switch(n){case"input":bs(r),nu(r,i,!0);break;case"textarea":bs(r),su(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=fi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[St]=t,e[ns]=r,Tf(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yo(n,r),n){case"dialog":fe("cancel",e),fe("close",e),s=r;break;case"iframe":case"object":case"embed":fe("load",e),s=r;break;case"video":case"audio":for(s=0;s<_r.length;s++)fe(_r[s],e);s=r;break;case"source":fe("error",e),s=r;break;case"img":case"image":case"link":fe("error",e),fe("load",e),s=r;break;case"details":fe("toggle",e),s=r;break;case"input":tu(e,r),s=Ho(e,r),fe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ye({},r,{value:void 0}),fe("invalid",e);break;case"textarea":ru(e,r),s=Vo(e,r),fe("invalid",e);break;default:s=r}Go(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?ad(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&id(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Vr(e,u):typeof u=="number"&&Vr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qr.hasOwnProperty(i)?u!=null&&i==="onScroll"&&fe("scroll",e):u!=null&&Za(e,i,u,a))}switch(n){case"input":bs(e),nu(e,r,!1);break;case"textarea":bs(e),su(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ln(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Zn(e,!!r.multiple,i,!1):r.defaultValue!=null&&Zn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=fi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)zf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=xn(ss.current),xn(Et.current),zs(t)){if(r=t.stateNode,n=t.memoizedProps,r[St]=t,(i=r.nodeValue!==n)&&(e=Ze,e!==null))switch(e.tag){case 3:Os(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Os(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[St]=t,t.stateNode=r}return Le(t),null;case 13:if(pe(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(he&&Je!==null&&t.mode&1&&!(t.flags&128))Kd(),ur(),t.flags|=98560,i=!1;else if(i=zs(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[St]=t}else ur(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Le(t),i=!1}else gt!==null&&(Oa(gt),gt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Pe===0&&(Pe=3):_l())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return dr(),ba(e,t),e===null&&es(t.stateNode.containerInfo),Le(t),null;case 10:return vl(t.type._context),Le(t),null;case 17:return Ge(t.type)&&pi(),Le(t),null;case 19:if(pe(me),i=t.memoizedState,i===null)return Le(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)Cr(i,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=wi(e),a!==null){for(t.flags|=128,Cr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ce(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&be()>pr&&(t.flags|=128,r=!0,Cr(i,!1),t.lanes=4194304)}else{if(!r)if(e=wi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!he)return Le(t),null}else 2*be()-i.renderingStartTime>pr&&n!==1073741824&&(t.flags|=128,r=!0,Cr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=be(),t.sibling=null,n=me.current,ce(me,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return Ml(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xe&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Zm(e,t){switch(hl(t),t.tag){case 1:return Ge(t.type)&&pi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return dr(),pe(Ke),pe(Ie),kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bl(t),null;case 13:if(pe(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(me),null;case 4:return dr(),null;case 10:return vl(t.type._context),null;case 22:case 23:return Ml(),null;case 24:return null;default:return null}}var Ms=!1,Fe=!1,eg=typeof WeakSet=="function"?WeakSet:Set,L=null;function Yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xe(e,t,r)}else n.current=null}function ka(e,t,n){try{n()}catch(r){xe(e,t,r)}}var Vu=!1;function tg(e,t){if(oa=ui,e=_d(),fl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(l=a+s),f!==i||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++c===s&&(l=a),p===i&&++d===r&&(u=a),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(aa={focusedElem:e,selectionRange:n},ui=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,k=v.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:pt(t.type,w),k);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(b){xe(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return v=Vu,Vu=!1,v}function Wr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&ka(t,n,i)}s=s.next}while(s!==r)}}function Bi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Na(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Af(e){var t=e.alternate;t!==null&&(e.alternate=null,Af(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[ns],delete t[ca],delete t[Fm],delete t[Im])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rf(e){return e.tag===5||e.tag===3||e.tag===4}function Ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fi));else if(r!==4&&(e=e.child,e!==null))for(Sa(e,t,n),e=e.sibling;e!==null;)Sa(e,t,n),e=e.sibling}function Ca(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ca(e,t,n),e=e.sibling;e!==null;)Ca(e,t,n),e=e.sibling}var ze=null,mt=!1;function Ut(e,t,n){for(n=n.child;n!==null;)Mf(e,t,n),n=n.sibling}function Mf(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(_i,n)}catch{}switch(n.tag){case 5:Fe||Yn(n,t);case 6:var r=ze,s=mt;ze=null,Ut(e,t,n),ze=r,mt=s,ze!==null&&(mt?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(mt?(e=ze,n=n.stateNode,e.nodeType===8?jo(e.parentNode,n):e.nodeType===1&&jo(e,n),Xr(e)):jo(ze,n.stateNode));break;case 4:r=ze,s=mt,ze=n.stateNode.containerInfo,mt=!0,Ut(e,t,n),ze=r,mt=s;break;case 0:case 11:case 14:case 15:if(!Fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ka(n,t,a),s=s.next}while(s!==r)}Ut(e,t,n);break;case 1:if(!Fe&&(Yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){xe(n,t,l)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(Fe=(r=Fe)||n.memoizedState!==null,Ut(e,t,n),Fe=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Gu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new eg),t.forEach(function(r){var s=cg.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function dt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:ze=l.stateNode,mt=!1;break e;case 3:ze=l.stateNode.containerInfo,mt=!0;break e;case 4:ze=l.stateNode.containerInfo,mt=!0;break e}l=l.return}if(ze===null)throw Error(T(160));Mf(i,a,s),ze=null,mt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){xe(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_f(t,e),t=t.sibling}function _f(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),bt(e),r&4){try{Wr(3,e,e.return),Bi(3,e)}catch(w){xe(e,e.return,w)}try{Wr(5,e,e.return)}catch(w){xe(e,e.return,w)}}break;case 1:dt(t,e),bt(e),r&512&&n!==null&&Yn(n,n.return);break;case 5:if(dt(t,e),bt(e),r&512&&n!==null&&Yn(n,n.return),e.flags&32){var s=e.stateNode;try{Vr(s,"")}catch(w){xe(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&nd(s,i),Yo(l,a);var c=Yo(l,i);for(a=0;a<u.length;a+=2){var d=u[a],f=u[a+1];d==="style"?ad(s,f):d==="dangerouslySetInnerHTML"?id(s,f):d==="children"?Vr(s,f):Za(s,d,f,c)}switch(l){case"input":qo(s,i);break;case"textarea":rd(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?Zn(s,!!i.multiple,y,!1):p!==!!i.multiple&&(i.defaultValue!=null?Zn(s,!!i.multiple,i.defaultValue,!0):Zn(s,!!i.multiple,i.multiple?[]:"",!1))}s[ns]=i}catch(w){xe(e,e.return,w)}}break;case 6:if(dt(t,e),bt(e),r&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){xe(e,e.return,w)}}break;case 3:if(dt(t,e),bt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Xr(t.containerInfo)}catch(w){xe(e,e.return,w)}break;case 4:dt(t,e),bt(e);break;case 13:dt(t,e),bt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Al=be())),r&4&&Gu(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Fe=(c=Fe)||d,dt(t,e),Fe=c):dt(t,e),bt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(L=e,d=e.child;d!==null;){for(f=L=d;L!==null;){switch(p=L,y=p.child,p.tag){case 0:case 11:case 14:case 15:Wr(4,p,p.return);break;case 1:Yn(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(w){xe(r,n,w)}}break;case 5:Yn(p,p.return);break;case 22:if(p.memoizedState!==null){Xu(f);continue}}y!==null?(y.return=p,L=y):Xu(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,u=f.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=od("display",a))}catch(w){xe(e,e.return,w)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){xe(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dt(t,e),bt(e),r&4&&Gu(e);break;case 21:break;default:dt(t,e),bt(e)}}function bt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rf(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Vr(s,""),r.flags&=-33);var i=Ku(e);Ca(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Ku(e);Sa(e,l,a);break;default:throw Error(T(161))}}catch(u){xe(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ng(e,t,n){L=e,Lf(e)}function Lf(e,t,n){for(var r=(e.mode&1)!==0;L!==null;){var s=L,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||Ms;if(!a){var l=s.alternate,u=l!==null&&l.memoizedState!==null||Fe;l=Ms;var c=Fe;if(Ms=a,(Fe=u)&&!c)for(L=s;L!==null;)a=L,u=a.child,a.tag===22&&a.memoizedState!==null?Ju(s):u!==null?(u.return=a,L=u):Ju(s);for(;i!==null;)L=i,Lf(i),i=i.sibling;L=s,Ms=l,Fe=c}Yu(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,L=i):Yu(e)}}function Yu(e){for(;L!==null;){var t=L;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Fe||Bi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Fe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:pt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Mu(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Mu(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Xr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}Fe||t.flags&512&&Na(t)}catch(p){xe(t,t.return,p)}}if(t===e){L=null;break}if(n=t.sibling,n!==null){n.return=t.return,L=n;break}L=t.return}}function Xu(e){for(;L!==null;){var t=L;if(t===e){L=null;break}var n=t.sibling;if(n!==null){n.return=t.return,L=n;break}L=t.return}}function Ju(e){for(;L!==null;){var t=L;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Bi(4,t)}catch(u){xe(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){xe(t,s,u)}}var i=t.return;try{Na(t)}catch(u){xe(t,i,u)}break;case 5:var a=t.return;try{Na(t)}catch(u){xe(t,a,u)}}}catch(u){xe(t,t.return,u)}if(t===e){L=null;break}var l=t.sibling;if(l!==null){l.return=t.return,L=l;break}L=t.return}}var rg=Math.ceil,ki=$t.ReactCurrentDispatcher,Ol=$t.ReactCurrentOwner,at=$t.ReactCurrentBatchConfig,ne=0,Oe=null,ke=null,Ae=0,Xe=0,Xn=dn(0),Pe=0,ls=null,Tn=0,Hi=0,zl=0,Br=null,Qe=null,Al=0,pr=1/0,Ot=null,Ni=!1,Ea=null,rn=null,_s=!1,Yt=null,Si=0,Hr=0,Pa=null,Xs=-1,Js=0;function We(){return ne&6?be():Xs!==-1?Xs:Xs=be()}function sn(e){return e.mode&1?ne&2&&Ae!==0?Ae&-Ae:$m.transition!==null?(Js===0&&(Js=xd()),Js):(e=le,e!==0||(e=window.event,e=e===void 0?16:Cd(e.type)),e):1}function vt(e,t,n,r){if(50<Hr)throw Hr=0,Pa=null,Error(T(185));fs(e,n,r),(!(ne&2)||e!==Oe)&&(e===Oe&&(!(ne&2)&&(Hi|=n),Pe===4&&Kt(e,Ae)),Ye(e,r),n===1&&ne===0&&!(t.mode&1)&&(pr=be()+500,$i&&fn()))}function Ye(e,t){var n=e.callbackNode;$h(e,t);var r=li(e,e===Oe?Ae:0);if(r===0)n!==null&&au(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&au(n),t===1)e.tag===0?Dm(Zu.bind(null,e)):qd(Zu.bind(null,e)),_m(function(){!(ne&6)&&fn()}),n=null;else{switch(wd(r)){case 1:n=sl;break;case 4:n=yd;break;case 16:n=ai;break;case 536870912:n=vd;break;default:n=ai}n=Hf(n,Ff.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ff(e,t){if(Xs=-1,Js=0,ne&6)throw Error(T(327));var n=e.callbackNode;if(sr()&&e.callbackNode!==n)return null;var r=li(e,e===Oe?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ci(e,r);else{t=r;var s=ne;ne|=2;var i=Df();(Oe!==e||Ae!==t)&&(Ot=null,pr=be()+500,bn(e,t));do try{og();break}catch(l){If(e,l)}while(1);yl(),ki.current=i,ne=s,ke!==null?t=0:(Oe=null,Ae=0,t=Pe)}if(t!==0){if(t===2&&(s=ta(e),s!==0&&(r=s,t=Ta(e,s))),t===1)throw n=ls,bn(e,0),Kt(e,r),Ye(e,be()),n;if(t===6)Kt(e,r);else{if(s=e.current.alternate,!(r&30)&&!sg(s)&&(t=Ci(e,r),t===2&&(i=ta(e),i!==0&&(r=i,t=Ta(e,i))),t===1))throw n=ls,bn(e,0),Kt(e,r),Ye(e,be()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:mn(e,Qe,Ot);break;case 3:if(Kt(e,r),(r&130023424)===r&&(t=Al+500-be(),10<t)){if(li(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){We(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ua(mn.bind(null,e,Qe,Ot),t);break}mn(e,Qe,Ot);break;case 4:if(Kt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-yt(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rg(r/1960))-r,10<r){e.timeoutHandle=ua(mn.bind(null,e,Qe,Ot),r);break}mn(e,Qe,Ot);break;case 5:mn(e,Qe,Ot);break;default:throw Error(T(329))}}}return Ye(e,be()),e.callbackNode===n?Ff.bind(null,e):null}function Ta(e,t){var n=Br;return e.current.memoizedState.isDehydrated&&(bn(e,t).flags|=256),e=Ci(e,t),e!==2&&(t=Qe,Qe=n,t!==null&&Oa(t)),e}function Oa(e){Qe===null?Qe=e:Qe.push.apply(Qe,e)}function sg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!xt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Kt(e,t){for(t&=~zl,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function Zu(e){if(ne&6)throw Error(T(327));sr();var t=li(e,0);if(!(t&1))return Ye(e,be()),null;var n=Ci(e,t);if(e.tag!==0&&n===2){var r=ta(e);r!==0&&(t=r,n=Ta(e,r))}if(n===1)throw n=ls,bn(e,0),Kt(e,t),Ye(e,be()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,mn(e,Qe,Ot),Ye(e,be()),null}function Rl(e,t){var n=ne;ne|=1;try{return e(t)}finally{ne=n,ne===0&&(pr=be()+500,$i&&fn())}}function On(e){Yt!==null&&Yt.tag===0&&!(ne&6)&&sr();var t=ne;ne|=1;var n=at.transition,r=le;try{if(at.transition=null,le=1,e)return e()}finally{le=r,at.transition=n,ne=t,!(ne&6)&&fn()}}function Ml(){Xe=Xn.current,pe(Xn)}function bn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mm(n)),ke!==null)for(n=ke.return;n!==null;){var r=n;switch(hl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&pi();break;case 3:dr(),pe(Ke),pe(Ie),kl();break;case 5:bl(r);break;case 4:dr();break;case 13:pe(me);break;case 19:pe(me);break;case 10:vl(r.type._context);break;case 22:case 23:Ml()}n=n.return}if(Oe=e,ke=e=on(e.current,null),Ae=Xe=t,Pe=0,ls=null,zl=Hi=Tn=0,Qe=Br=null,vn!==null){for(t=0;t<vn.length;t++)if(n=vn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}vn=null}return e}function If(e,t){do{var n=ke;try{if(yl(),Ks.current=bi,ji){for(var r=ge.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}ji=!1}if(Pn=0,Te=Ee=ge=null,Ur=!1,is=0,Ol.current=null,n===null||n.return===null){Pe=1,ls=t,ke=null;break}e:{var i=e,a=n.return,l=n,u=t;if(t=Ae,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=$u(a);if(y!==null){y.flags&=-257,Uu(y,a,l,i,t),y.mode&1&&Du(i,c,t),t=y,u=c;var v=t.updateQueue;if(v===null){var w=new Set;w.add(u),t.updateQueue=w}else v.add(u);break e}else{if(!(t&1)){Du(i,c,t),_l();break e}u=Error(T(426))}}else if(he&&l.mode&1){var k=$u(a);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Uu(k,a,l,i,t),ml(fr(u,l));break e}}i=u=fr(u,l),Pe!==4&&(Pe=2),Br===null?Br=[i]:Br.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=jf(i,u,t);Ru(i,m);break e;case 1:l=u;var h=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(rn===null||!rn.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=bf(i,l,t);Ru(i,b);break e}}i=i.return}while(i!==null)}Uf(n)}catch(E){t=E,ke===n&&n!==null&&(ke=n=n.return);continue}break}while(1)}function Df(){var e=ki.current;return ki.current=bi,e===null?bi:e}function _l(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Oe===null||!(Tn&268435455)&&!(Hi&268435455)||Kt(Oe,Ae)}function Ci(e,t){var n=ne;ne|=2;var r=Df();(Oe!==e||Ae!==t)&&(Ot=null,bn(e,t));do try{ig();break}catch(s){If(e,s)}while(1);if(yl(),ne=n,ki.current=r,ke!==null)throw Error(T(261));return Oe=null,Ae=0,Pe}function ig(){for(;ke!==null;)$f(ke)}function og(){for(;ke!==null&&!zh();)$f(ke)}function $f(e){var t=Bf(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?Uf(e):ke=t,Ol.current=null}function Uf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Zm(n,t),n!==null){n.flags&=32767,ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pe=6,ke=null;return}}else if(n=Jm(n,t,Xe),n!==null){ke=n;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);Pe===0&&(Pe=5)}function mn(e,t,n){var r=le,s=at.transition;try{at.transition=null,le=1,ag(e,t,n,r)}finally{at.transition=s,le=r}return null}function ag(e,t,n,r){do sr();while(Yt!==null);if(ne&6)throw Error(T(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Uh(e,i),e===Oe&&(ke=Oe=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_s||(_s=!0,Hf(ai,function(){return sr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=at.transition,at.transition=null;var a=le;le=1;var l=ne;ne|=4,Ol.current=null,tg(e,n),_f(n,e),Em(aa),ui=!!oa,aa=oa=null,e.current=n,ng(n),Ah(),ne=l,le=a,at.transition=i}else e.current=n;if(_s&&(_s=!1,Yt=e,Si=s),i=e.pendingLanes,i===0&&(rn=null),_h(n.stateNode),Ye(e,be()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ni)throw Ni=!1,e=Ea,Ea=null,e;return Si&1&&e.tag!==0&&sr(),i=e.pendingLanes,i&1?e===Pa?Hr++:(Hr=0,Pa=e):Hr=0,fn(),null}function sr(){if(Yt!==null){var e=wd(Si),t=at.transition,n=le;try{if(at.transition=null,le=16>e?16:e,Yt===null)var r=!1;else{if(e=Yt,Yt=null,Si=0,ne&6)throw Error(T(331));var s=ne;for(ne|=4,L=e.current;L!==null;){var i=L,a=i.child;if(L.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(L=c;L!==null;){var d=L;switch(d.tag){case 0:case 11:case 15:Wr(8,d,i)}var f=d.child;if(f!==null)f.return=d,L=f;else for(;L!==null;){d=L;var p=d.sibling,y=d.return;if(Af(d),d===c){L=null;break}if(p!==null){p.return=y,L=p;break}L=y}}}var v=i.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var k=w.sibling;w.sibling=null,w=k}while(w!==null)}}L=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,L=a;else e:for(;L!==null;){if(i=L,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Wr(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,L=m;break e}L=i.return}}var h=e.current;for(L=h;L!==null;){a=L;var g=a.child;if(a.subtreeFlags&2064&&g!==null)g.return=a,L=g;else e:for(a=h;L!==null;){if(l=L,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Bi(9,l)}}catch(E){xe(l,l.return,E)}if(l===a){L=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,L=b;break e}L=l.return}}if(ne=s,fn(),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(_i,e)}catch{}r=!0}return r}finally{le=n,at.transition=t}}return!1}function ec(e,t,n){t=fr(n,t),t=jf(e,t,1),e=nn(e,t,1),t=We(),e!==null&&(fs(e,1,t),Ye(e,t))}function xe(e,t,n){if(e.tag===3)ec(e,e,n);else for(;t!==null;){if(t.tag===3){ec(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rn===null||!rn.has(r))){e=fr(n,e),e=bf(t,e,1),t=nn(t,e,1),e=We(),t!==null&&(fs(t,1,e),Ye(t,e));break}}t=t.return}}function lg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&n,Oe===e&&(Ae&n)===n&&(Pe===4||Pe===3&&(Ae&130023424)===Ae&&500>be()-Al?bn(e,0):zl|=n),Ye(e,t)}function Wf(e,t){t===0&&(e.mode&1?(t=Ss,Ss<<=1,!(Ss&130023424)&&(Ss=4194304)):t=1);var n=We();e=It(e,t),e!==null&&(fs(e,t,n),Ye(e,n))}function ug(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wf(e,n)}function cg(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Wf(e,n)}var Bf;Bf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ve=!1,Xm(e,t,n);Ve=!!(e.flags&131072)}else Ve=!1,he&&t.flags&1048576&&Qd(t,gi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ys(e,t),e=t.pendingProps;var s=lr(t,Ie.current);rr(t,n),s=Sl(null,t,r,e,s,n);var i=Cl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,hi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,wl(t),s.updater=Wi,t.stateNode=s,s._reactInternals=t,ga(t,r,e,n),t=xa(null,t,r,!0,i,n)):(t.tag=0,he&&i&&pl(t),$e(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ys(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=fg(r),e=pt(r,e),s){case 0:t=va(null,t,r,e,n);break e;case 1:t=Hu(null,t,r,e,n);break e;case 11:t=Wu(null,t,r,e,n);break e;case 14:t=Bu(null,t,r,pt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pt(r,s),va(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pt(r,s),Hu(e,t,r,s,n);case 3:e:{if(Cf(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Jd(e,t),xi(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=fr(Error(T(423)),t),t=qu(e,t,r,n,s);break e}else if(r!==s){s=fr(Error(T(424)),t),t=qu(e,t,r,n,s);break e}else for(Je=tn(t.stateNode.containerInfo.firstChild),Ze=t,he=!0,gt=null,n=Yd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ur(),r===s){t=Dt(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return Zd(t),e===null&&pa(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,la(r,s)?a=null:i!==null&&la(r,i)&&(t.flags|=32),Sf(e,t),$e(e,t,a,n),t.child;case 6:return e===null&&pa(t),null;case 13:return Ef(e,t,n);case 4:return jl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pt(r,s),Wu(e,t,r,s,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,ce(yi,r._currentValue),r._currentValue=a,i!==null)if(xt(i.value,a)){if(i.children===s.children&&!Ke.current){t=Dt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=_t(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ha(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(T(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),ha(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}$e(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,rr(t,n),s=lt(s),r=r(s),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,s=pt(r,t.pendingProps),s=pt(r.type,s),Bu(e,t,r,s,n);case 15:return kf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:pt(r,s),Ys(e,t),t.tag=1,Ge(r)?(e=!0,hi(t)):e=!1,rr(t,n),wf(t,r,s),ga(t,r,s,n),xa(null,t,r,!0,e,n);case 19:return Pf(e,t,n);case 22:return Nf(e,t,n)}throw Error(T(156,t.tag))};function Hf(e,t){return gd(e,t)}function dg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ot(e,t,n,r){return new dg(e,t,n,r)}function Ll(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fg(e){if(typeof e=="function")return Ll(e)?1:0;if(e!=null){if(e=e.$$typeof,e===tl)return 11;if(e===nl)return 14}return 2}function on(e,t){var n=e.alternate;return n===null?(n=ot(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zs(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")Ll(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Un:return kn(n.children,s,i,t);case el:a=8,s|=8;break;case $o:return e=ot(12,n,t,s|2),e.elementType=$o,e.lanes=i,e;case Uo:return e=ot(13,n,t,s),e.elementType=Uo,e.lanes=i,e;case Wo:return e=ot(19,n,t,s),e.elementType=Wo,e.lanes=i,e;case Zc:return qi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xc:a=10;break e;case Jc:a=9;break e;case tl:a=11;break e;case nl:a=14;break e;case Bt:a=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=ot(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function kn(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function qi(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Zc,e.lanes=n,e.stateNode={isHidden:!1},e}function To(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function Oo(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pg(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=uo(0),this.expirationTimes=uo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Fl(e,t,n,r,s,i,a,l,u){return e=new pg(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},wl(i),e}function hg(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$n,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qf(e){if(!e)return un;e=e._reactInternals;e:{if(An(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ge(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var n=e.type;if(Ge(n))return Hd(e,n,t)}return t}function Qf(e,t,n,r,s,i,a,l,u){return e=Fl(n,r,!0,e,s,i,a,l,u),e.context=qf(null),n=e.current,r=We(),s=sn(n),i=_t(r,s),i.callback=t??null,nn(n,i,s),e.current.lanes=s,fs(e,s,r),Ye(e,r),e}function Qi(e,t,n,r){var s=t.current,i=We(),a=sn(s);return n=qf(n),t.context===null?t.context=n:t.pendingContext=n,t=_t(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=nn(s,t,a),e!==null&&(vt(e,s,a,i),Vs(e,s,a)),a}function Ei(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function tc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Il(e,t){tc(e,t),(e=e.alternate)&&tc(e,t)}function mg(){return null}var Vf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Dl(e){this._internalRoot=e}Vi.prototype.render=Dl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));Qi(e,t,null,null)};Vi.prototype.unmount=Dl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;On(function(){Qi(null,e,null,null)}),t[Ft]=null}};function Vi(e){this._internalRoot=e}Vi.prototype.unstable_scheduleHydration=function(e){if(e){var t=kd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Vt.length&&t!==0&&t<Vt[n].priority;n++);Vt.splice(n,0,e),n===0&&Sd(e)}};function $l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ki(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function nc(){}function gg(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Ei(a);i.call(c)}}var a=Qf(t,r,e,0,null,!1,!1,"",nc);return e._reactRootContainer=a,e[Ft]=a.current,es(e.nodeType===8?e.parentNode:e),On(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=Ei(u);l.call(c)}}var u=Fl(e,0,!1,null,null,!1,!1,"",nc);return e._reactRootContainer=u,e[Ft]=u.current,es(e.nodeType===8?e.parentNode:e),On(function(){Qi(t,u,n,r)}),u}function Gi(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var u=Ei(a);l.call(u)}}Qi(t,a,e,s)}else a=gg(n,t,e,s,r);return Ei(a)}jd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Mr(t.pendingLanes);n!==0&&(il(t,n|1),Ye(t,be()),!(ne&6)&&(pr=be()+500,fn()))}break;case 13:On(function(){var r=It(e,1);if(r!==null){var s=We();vt(r,e,1,s)}}),Il(e,1)}};ol=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=We();vt(t,e,134217728,n)}Il(e,134217728)}};bd=function(e){if(e.tag===13){var t=sn(e),n=It(e,t);if(n!==null){var r=We();vt(n,e,t,r)}Il(e,t)}};kd=function(){return le};Nd=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};Jo=function(e,t,n){switch(t){case"input":if(qo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Di(r);if(!s)throw Error(T(90));td(r),qo(r,s)}}}break;case"textarea":rd(e,n);break;case"select":t=n.value,t!=null&&Zn(e,!!n.multiple,t,!1)}};cd=Rl;dd=On;var yg={usingClientEntryPoint:!1,Events:[hs,qn,Di,ld,ud,Rl]},Er={findFiberByHostInstance:yn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vg={bundleType:Er.bundleType,version:Er.version,rendererPackageName:Er.rendererPackageName,rendererConfig:Er.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$t.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hd(e),e===null?null:e.stateNode},findFiberByHostInstance:Er.findFiberByHostInstance||mg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ls.isDisabled&&Ls.supportsFiber)try{_i=Ls.inject(vg),Ct=Ls}catch{}}tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yg;tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$l(t))throw Error(T(200));return hg(e,t,null,n)};tt.createRoot=function(e,t){if(!$l(e))throw Error(T(299));var n=!1,r="",s=Vf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Fl(e,1,!1,null,null,n,!1,r,s),e[Ft]=t.current,es(e.nodeType===8?e.parentNode:e),new Dl(t)};tt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=hd(t),e=e===null?null:e.stateNode,e};tt.flushSync=function(e){return On(e)};tt.hydrate=function(e,t,n){if(!Ki(t))throw Error(T(200));return Gi(null,e,t,!0,n)};tt.hydrateRoot=function(e,t,n){if(!$l(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=Vf;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Qf(t,null,e,1,n??null,s,!1,i,a),e[Ft]=t.current,es(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Vi(t)};tt.render=function(e,t,n){if(!Ki(t))throw Error(T(200));return Gi(null,e,t,!1,n)};tt.unmountComponentAtNode=function(e){if(!Ki(e))throw Error(T(40));return e._reactRootContainer?(On(function(){Gi(null,null,e,!1,function(){e._reactRootContainer=null,e[Ft]=null})}),!0):!1};tt.unstable_batchedUpdates=Rl;tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ki(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Gi(e,t,n,!1,r)};tt.version="18.3.1-next-f1338f8080-20240426";function Kf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kf)}catch(e){console.error(e)}}Kf(),Vc.exports=tt;var Gf=Vc.exports;const xg=hr(Gf);var rc=Gf;Io.createRoot=rc.createRoot,Io.hydrateRoot=rc.hydrateRoot;/**
41
+ * @remix-run/router v1.23.0
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},us.apply(this,arguments)}var Xt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Xt||(Xt={}));const sc="popstate";function wg(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:l}=r.location;return za("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Pi(s)}return bg(t,n,null,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jg(){return Math.random().toString(36).substr(2,8)}function ic(e,t){return{usr:e.state,key:e.key,idx:t}}function za(e,t,n,r){return n===void 0&&(n=null),us({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?vr(t):t,{state:n,key:t&&t.key||r||jg()})}function Pi(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function vr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function bg(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,l=Xt.Pop,u=null,c=d();c==null&&(c=0,a.replaceState(us({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){l=Xt.Pop;let k=d(),m=k==null?null:k-c;c=k,u&&u({action:l,location:w.location,delta:m})}function p(k,m){l=Xt.Push;let h=za(w.location,k,m);n&&n(h,k),c=d()+1;let g=ic(h,c),b=w.createHref(h);try{a.pushState(g,"",b)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(b)}i&&u&&u({action:l,location:w.location,delta:1})}function y(k,m){l=Xt.Replace;let h=za(w.location,k,m);n&&n(h,k),c=d();let g=ic(h,c),b=w.createHref(h);a.replaceState(g,"",b),i&&u&&u({action:l,location:w.location,delta:0})}function v(k){let m=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof k=="string"?k:Pi(k);return h=h.replace(/ $/,"%20"),Ne(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let w={get action(){return l},get location(){return e(s,a)},listen(k){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(sc,f),u=k,()=>{s.removeEventListener(sc,f),u=null}},createHref(k){return t(s,k)},createURL:v,encodeLocation(k){let m=v(k);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:y,go(k){return a.go(k)}};return w}var oc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(oc||(oc={}));function kg(e,t,n){return n===void 0&&(n="/"),Ng(e,t,n,!1)}function Ng(e,t,n,r){let s=typeof t=="string"?vr(t):t,i=Ul(s.pathname||"/",n);if(i==null)return null;let a=Xf(e);Sg(a);let l=null;for(let u=0;l==null&&u<a.length;++u){let c=Lg(i);l=Mg(a[u],c,r)}return l}function Xf(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,l)=>{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(Ne(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=an([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(Ne(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Xf(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Ag(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,a);else for(let u of Jf(i.path))s(i,a,u)}),t}function Jf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=Jf(r.join("/")),l=[];return l.push(...a.map(u=>u===""?i:[i,u].join("/"))),s&&l.push(...a),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Sg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Rg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Cg=/^:[\w-]+$/,Eg=3,Pg=2,Tg=1,Og=10,zg=-2,ac=e=>e==="*";function Ag(e,t){let n=e.split("/"),r=n.length;return n.some(ac)&&(r+=zg),t&&(r+=Pg),n.filter(s=>!ac(s)).reduce((s,i)=>s+(Cg.test(i)?Eg:i===""?Tg:Og),r)}function Rg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Mg(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},i="/",a=[];for(let l=0;l<r.length;++l){let u=r[l],c=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=lc({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=lc({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),a.push({params:s,pathname:an([i,f.pathname]),pathnameBase:$g(an([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=an([i,f.pathnameBase]))}return a}function lc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=_g(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:p,isOptional:y}=d;if(p==="*"){let w=l[f]||"";a=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=l[f];return y&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function _g(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Yf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Lg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ul(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Fg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?vr(e):e;return{pathname:n?n.startsWith("/")?n:Ig(n,t):t,search:Ug(r),hash:Wg(s)}}function Ig(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function zo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Dg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Zf(e,t){let n=Dg(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ep(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=vr(e):(s=us({},e),Ne(!s.pathname||!s.pathname.includes("?"),zo("?","pathname","search",s)),Ne(!s.pathname||!s.pathname.includes("#"),zo("#","pathname","hash",s)),Ne(!s.search||!s.search.includes("#"),zo("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}l=f>=0?t[f]:"/"}let u=Fg(s,l),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const an=e=>e.join("/").replace(/\/\/+/g,"/"),$g=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ug=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Bg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const tp=["post","put","patch","delete"];new Set(tp);const Hg=["get",...tp];new Set(Hg);/**
50
+ * React Router v6.30.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cs.apply(this,arguments)}const Wl=N.createContext(null),qg=N.createContext(null),Rn=N.createContext(null),Yi=N.createContext(null),Mn=N.createContext({outlet:null,matches:[],isDataRoute:!1}),np=N.createContext(null);function Qg(e,t){let{relative:n}=t===void 0?{}:t;gs()||Ne(!1);let{basename:r,navigator:s}=N.useContext(Rn),{hash:i,pathname:a,search:l}=sp(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:an([r,a])),s.createHref({pathname:u,search:l,hash:i})}function gs(){return N.useContext(Yi)!=null}function ys(){return gs()||Ne(!1),N.useContext(Yi).location}function rp(e){N.useContext(Rn).static||N.useLayoutEffect(e)}function Vg(){let{isDataRoute:e}=N.useContext(Mn);return e?o0():Kg()}function Kg(){gs()||Ne(!1);let e=N.useContext(Wl),{basename:t,future:n,navigator:r}=N.useContext(Rn),{matches:s}=N.useContext(Mn),{pathname:i}=ys(),a=JSON.stringify(Zf(s,n.v7_relativeSplatPath)),l=N.useRef(!1);return rp(()=>{l.current=!0}),N.useCallback(function(c,d){if(d===void 0&&(d={}),!l.current)return;if(typeof c=="number"){r.go(c);return}let f=ep(c,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:an([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,a,i,e])}function sp(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(Rn),{matches:s}=N.useContext(Mn),{pathname:i}=ys(),a=JSON.stringify(Zf(s,r.v7_relativeSplatPath));return N.useMemo(()=>ep(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Gg(e,t){return Yg(e,t)}function Yg(e,t,n,r){gs()||Ne(!1);let{navigator:s}=N.useContext(Rn),{matches:i}=N.useContext(Mn),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let c=ys(),d;if(t){var f;let k=typeof t=="string"?vr(t):t;u==="/"||(f=k.pathname)!=null&&f.startsWith(u)||Ne(!1),d=k}else d=c;let p=d.pathname||"/",y=p;if(u!=="/"){let k=u.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(k.length).join("/")}let v=kg(e,{pathname:y}),w=t0(v&&v.map(k=>Object.assign({},k,{params:Object.assign({},l,k.params),pathname:an([u,s.encodeLocation?s.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?u:an([u,s.encodeLocation?s.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&w?N.createElement(Yi.Provider,{value:{location:cs({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Xt.Pop}},w):w}function Xg(){let e=i0(),t=Bg(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:s},n):null,i)}const Jg=N.createElement(Xg,null);class Zg extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(Mn.Provider,{value:this.props.routeContext},N.createElement(np.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function e0(e){let{routeContext:t,match:n,children:r}=e,s=N.useContext(Wl);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Mn.Provider,{value:t},r)}function t0(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Ne(!1),a=a.slice(0,Math.min(a.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:y}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){u=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((d,f,p)=>{let y,v=!1,w=null,k=null;n&&(y=l&&f.route.id?l[f.route.id]:void 0,w=f.route.errorElement||Jg,u&&(c<0&&p===0?(a0("route-fallback",!1),v=!0,k=null):c===p&&(v=!0,k=f.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,p+1)),h=()=>{let g;return y?g=w:v?g=k:f.route.Component?g=N.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=d,N.createElement(e0,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:g})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?N.createElement(Zg,{location:n.location,revalidation:n.revalidation,component:w,error:y,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var ip=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ip||{}),Ti=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ti||{});function n0(e){let t=N.useContext(Wl);return t||Ne(!1),t}function r0(e){let t=N.useContext(qg);return t||Ne(!1),t}function s0(e){let t=N.useContext(Mn);return t||Ne(!1),t}function op(e){let t=s0(),n=t.matches[t.matches.length-1];return n.route.id||Ne(!1),n.route.id}function i0(){var e;let t=N.useContext(np),n=r0(Ti.UseRouteError),r=op(Ti.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function o0(){let{router:e}=n0(ip.UseNavigateStable),t=op(Ti.UseNavigateStable),n=N.useRef(!1);return rp(()=>{n.current=!0}),N.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,cs({fromRouteId:t},i)))},[e,t])}const uc={};function a0(e,t,n){!t&&!uc[e]&&(uc[e]=!0)}function l0(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function ei(e){Ne(!1)}function u0(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Xt.Pop,navigator:i,static:a=!1,future:l}=e;gs()&&Ne(!1);let u=t.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:u,navigator:i,static:a,future:cs({v7_relativeSplatPath:!1},l)}),[u,l,i,a]);typeof r=="string"&&(r=vr(r));let{pathname:d="/",search:f="",hash:p="",state:y=null,key:v="default"}=r,w=N.useMemo(()=>{let k=Ul(d,u);return k==null?null:{location:{pathname:k,search:f,hash:p,state:y,key:v},navigationType:s}},[u,d,f,p,y,v,s]);return w==null?null:N.createElement(Rn.Provider,{value:c},N.createElement(Yi.Provider,{children:n,value:w}))}function c0(e){let{children:t,location:n}=e;return Gg(Aa(t),n)}new Promise(()=>{});function Aa(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,s)=>{if(!N.isValidElement(r))return;let i=[...t,s];if(r.type===N.Fragment){n.push.apply(n,Aa(r.props.children,i));return}r.type!==ei&&Ne(!1),!r.props.index||!r.props.children||Ne(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Aa(r.props.children,i)),n.push(a)}),n}/**
59
+ * React Router DOM v6.30.1
60
+ *
61
+ * Copyright (c) Remix Software Inc.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE.md file in the root directory of this source tree.
65
+ *
66
+ * @license MIT
67
+ */function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ra.apply(this,arguments)}function d0(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function f0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function p0(e,t){return e.button===0&&(!t||t==="_self")&&!f0(e)}const h0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],m0="6";try{window.__reactRouterVersion=m0}catch{}const g0="startTransition",cc=lh[g0];function y0(e){let{basename:t,children:n,future:r,window:s}=e,i=N.useRef();i.current==null&&(i.current=wg({window:s,v5Compat:!0}));let a=i.current,[l,u]=N.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=N.useCallback(f=>{c&&cc?cc(()=>u(f)):u(f)},[u,c]);return N.useLayoutEffect(()=>a.listen(d),[a,d]),N.useEffect(()=>l0(r),[r]),N.createElement(u0,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const v0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ap=N.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,p=d0(t,h0),{basename:y}=N.useContext(Rn),v,w=!1;if(typeof c=="string"&&x0.test(c)&&(v=c,v0))try{let g=new URL(window.location.href),b=c.startsWith("//")?new URL(g.protocol+c):new URL(c),E=Ul(b.pathname,y);b.origin===g.origin&&E!=null?c=E+b.search+b.hash:w=!0}catch{}let k=Qg(c,{relative:s}),m=w0(c,{replace:a,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f});function h(g){r&&r(g),g.defaultPrevented||m(g)}return N.createElement("a",Ra({},p,{href:v||k,onClick:w||i?r:h,ref:n,target:u}))});var dc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(dc||(dc={}));var fc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fc||(fc={}));function w0(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:l}=t===void 0?{}:t,u=Vg(),c=ys(),d=sp(e,{relative:a});return N.useCallback(f=>{if(p0(f,n)){f.preventDefault();let p=r!==void 0?r:Pi(c)===Pi(d);u(e,{replace:p,state:s,preventScrollReset:i,relative:a,viewTransition:l})}},[c,u,d,r,s,n,e,i,a,l])}class Xi{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Bl=typeof window>"u"||"Deno"in window;function ht(){}function j0(e,t){return typeof e=="function"?e(t):e}function b0(e){return typeof e=="number"&&e>=0&&e!==1/0}function k0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fs(e,t,n){return Ji(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function qt(e,t,n){return Ji(e)?[{...t,queryKey:e},n]:[e||{},t]}function pc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:l}=e;if(Ji(a)){if(r){if(t.queryHash!==Hl(a,t.options))return!1}else if(!Oi(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof s<"u"&&s!==t.state.fetchStatus||i&&!i(t))}function hc(e,t){const{exact:n,fetching:r,predicate:s,mutationKey:i}=e;if(Ji(i)){if(!t.options.mutationKey)return!1;if(n){if(wn(t.options.mutationKey)!==wn(i))return!1}else if(!Oi(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||s&&!s(t))}function Hl(e,t){return((t==null?void 0:t.queryKeyHashFn)||wn)(e)}function wn(e){return JSON.stringify(e,(t,n)=>Ma(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Oi(e,t){return lp(e,t)}function lp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!lp(e[n],t[n])):!1}function up(e,t){if(e===t)return e;const n=mc(e)&&mc(t);if(n||Ma(e)&&Ma(t)){const r=n?e.length:Object.keys(e).length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const c=n?u:s[u];a[c]=up(e[c],t[c]),a[c]===e[c]&&l++}return r===i&&l===r?e:a}return t}function mc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ma(e){if(!gc(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!gc(n)||!n.hasOwnProperty("isPrototypeOf"))}function gc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ji(e){return Array.isArray(e)}function cp(e){return new Promise(t=>{setTimeout(t,e)})}function yc(e){cp(0).then(e)}function N0(){if(typeof AbortController=="function")return new AbortController}function S0(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?up(e,t):t}class C0 extends Xi{constructor(){super(),this.setup=t=>{if(!Bl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const _a=new C0,vc=["online","offline"];class E0 extends Xi{constructor(){super(),this.setup=t=>{if(!Bl&&window.addEventListener){const n=()=>t();return vc.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{vc.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zi=new E0;function P0(e){return Math.min(1e3*2**e,3e4)}function ql(e){return(e??"online")==="online"?zi.isOnline():!0}class dp{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Ao(e){return e instanceof dp}function fp(e){let t=!1,n=0,r=!1,s,i,a;const l=new Promise((k,m)=>{i=k,a=m}),u=k=>{r||(y(new dp(k)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},f=()=>!_a.isFocused()||e.networkMode!=="always"&&!zi.isOnline(),p=k=>{r||(r=!0,e.onSuccess==null||e.onSuccess(k),s==null||s(),i(k))},y=k=>{r||(r=!0,e.onError==null||e.onError(k),s==null||s(),a(k))},v=()=>new Promise(k=>{s=m=>{const h=r||!f();return h&&k(m),h},e.onPause==null||e.onPause()}).then(()=>{s=void 0,r||e.onContinue==null||e.onContinue()}),w=()=>{if(r)return;let k;try{k=e.fn()}catch(m){k=Promise.reject(m)}Promise.resolve(k).then(p).catch(m=>{var h,g;if(r)return;const b=(h=e.retry)!=null?h:3,E=(g=e.retryDelay)!=null?g:P0,P=typeof E=="function"?E(n,m):E,S=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,m);if(t||!S){y(m);return}n++,e.onFail==null||e.onFail(n,m),cp(P).then(()=>{if(f())return v()}).then(()=>{t?y(m):w()})})};return ql(e.networkMode)?w():v().then(w),{promise:l,cancel:u,continue:()=>(s==null?void 0:s())?l:Promise.resolve(),cancelRetry:c,continueRetry:d}}const Ql=console;function T0(){let e=[],t=0,n=d=>{d()},r=d=>{d()};const s=d=>{let f;t++;try{f=d()}finally{t--,t||l()}return f},i=d=>{t?e.push(d):yc(()=>{n(d)})},a=d=>(...f)=>{i(()=>{d(...f)})},l=()=>{const d=e;e=[],d.length&&yc(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:s,batchCalls:a,schedule:i,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const Ue=T0();class pp{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),b0(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Bl?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class O0 extends pp{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||Ql,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||z0(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=S0(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(ht).catch(ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!k0(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(v=>v.options.queryFn);y&&this.setOptions(y.options)}const a=N0(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};u(l);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(u(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=d.fetchOptions)==null?void 0:s.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const p=y=>{if(Ao(y)&&y.silent||this.dispatch({type:"error",error:y}),!Ao(y)){var v,w,k,m;(v=(w=this.cache.config).onError)==null||v.call(w,y,this),(k=(m=this.cache.config).onSettled)==null||k.call(m,this.state.data,y,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=fp({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:y=>{var v,w,k,m;if(typeof y>"u"){p(new Error(this.queryHash+" data is undefined"));return}this.setData(y),(v=(w=this.cache.config).onSuccess)==null||v.call(w,y,this),(k=(m=this.cache.config).onSettled)==null||k.call(m,y,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:p,onFail:(y,v)=>{this.dispatch({type:"failed",failureCount:y,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var s,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=t.meta)!=null?s:null,fetchStatus:ql(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Ao(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function z0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class A0 extends Xi{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var s;const i=n.queryKey,a=(s=n.queryHash)!=null?s:Hl(i,n);let l=this.get(a);return l||(l=new O0({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=qt(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(s=>pc(r,s))}findAll(t,n){const[r]=qt(t,n);return Object.keys(r).length>0?this.queries.filter(s=>pc(r,s)):this.queries}notify(t){Ue.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Ue.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class R0 extends pp{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||Ql,this.observers=[],this.state=t.state||M0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var S;return this.retryer=fp({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(j,A)=>{this.dispatch({type:"failed",failureCount:j,error:A})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(S=this.options.retry)!=null?S:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,s,i,a,l,u,c,d;if(!n){var f,p,y,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const j=await((y=(v=this.options).onMutate)==null?void 0:y.call(v,this.state.variables));j!==this.state.context&&this.dispatch({type:"loading",context:j,variables:this.state.variables})}const S=await t();return await((r=(s=this.mutationCache.config).onSuccess)==null?void 0:r.call(s,S,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,S,this.state.variables,this.state.context)),await((l=(u=this.mutationCache.config).onSettled)==null?void 0:l.call(u,S,null,this.state.variables,this.state.context,this)),await((c=(d=this.options).onSettled)==null?void 0:c.call(d,S,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:S}),S}catch(S){try{var w,k,m,h,g,b,E,P;throw await((w=(k=this.mutationCache.config).onError)==null?void 0:w.call(k,S,this.state.variables,this.state.context,this)),await((m=(h=this.options).onError)==null?void 0:m.call(h,S,this.state.variables,this.state.context)),await((g=(b=this.mutationCache.config).onSettled)==null?void 0:g.call(b,void 0,S,this.state.variables,this.state.context,this)),await((E=(P=this.options).onSettled)==null?void 0:E.call(P,void 0,S,this.state.variables,this.state.context)),S}finally{this.dispatch({type:"error",error:S})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!ql(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function M0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class _0 extends Xi{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const s=new R0({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(s),s}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ue.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>hc(t,n))}findAll(t){return this.mutations.filter(n=>hc(t,n))}notify(t){Ue.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ue.batch(()=>n.reduce((r,s)=>r.then(()=>s.continue().catch(ht)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function L0(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,s,i,a;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(s=r.meta)==null?void 0:s.fetchMore,c=u==null?void 0:u.pageParam,d=(u==null?void 0:u.direction)==="forward",f=(u==null?void 0:u.direction)==="backward",p=((i=e.state.data)==null?void 0:i.pages)||[],y=((a=e.state.data)==null?void 0:a.pageParams)||[];let v=y,w=!1;const k=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>{var S;if((S=e.signal)!=null&&S.aborted)w=!0;else{var j;(j=e.signal)==null||j.addEventListener("abort",()=>{w=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(P,S,j,A)=>(v=A?[S,...v]:[...v,S],A?[j,...P]:[...P,j]),g=(P,S,j,A)=>{if(w)return Promise.reject("Cancelled");if(typeof j>"u"&&!S&&P.length)return Promise.resolve(P);const z={queryKey:e.queryKey,pageParam:j,meta:e.options.meta};k(z);const Q=m(z);return Promise.resolve(Q).then(te=>h(P,j,te,A))};let b;if(!p.length)b=g([]);else if(d){const P=typeof c<"u",S=P?c:xc(e.options,p);b=g(p,P,S)}else if(f){const P=typeof c<"u",S=P?c:F0(e.options,p);b=g(p,P,S,!0)}else{v=[];const P=typeof e.options.getNextPageParam>"u";b=(l&&p[0]?l(p[0],0,p):!0)?g([],P,y[0]):Promise.resolve(h([],y[0],p[0]));for(let j=1;j<p.length;j++)b=b.then(A=>{if(l&&p[j]?l(p[j],j,p):!0){const Q=P?y[j]:xc(e.options,A);return g(A,P,Q)}return Promise.resolve(h(A,y[j],p[j]))})}return b.then(P=>({pages:P,pageParams:v}))}}}}function xc(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function F0(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class I0{constructor(t={}){this.queryCache=t.queryCache||new A0,this.mutationCache=t.mutationCache||new _0,this.logger=t.logger||Ql,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=_a.subscribe(()=>{_a.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=zi.subscribe(()=>{zi.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=qt(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const s=Fs(t,n,r),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.queryCache.find(t),i=s==null?void 0:s.state.data,a=j0(n,i);if(typeof a>"u")return;const l=Fs(t),u=this.defaultQueryOptions(l);return this.queryCache.build(this,u).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Ue.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=qt(t,n),s=this.queryCache;Ue.batch(()=>{s.findAll(r).forEach(i=>{s.remove(i)})})}resetQueries(t,n,r){const[s,i]=qt(t,n,r),a=this.queryCache,l={type:"active",...s};return Ue.batch(()=>(a.findAll(s).forEach(u=>{u.reset()}),this.refetchQueries(l,i)))}cancelQueries(t,n,r){const[s,i={}]=qt(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=Ue.batch(()=>this.queryCache.findAll(s).map(l=>l.cancel(i)));return Promise.all(a).then(ht).catch(ht)}invalidateQueries(t,n,r){const[s,i]=qt(t,n,r);return Ue.batch(()=>{var a,l;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const u={...s,type:(a=(l=s.refetchType)!=null?l:s.type)!=null?a:"active"};return this.refetchQueries(u,i)})}refetchQueries(t,n,r){const[s,i]=qt(t,n,r),a=Ue.batch(()=>this.queryCache.findAll(s).filter(u=>!u.isDisabled()).map(u=>{var c;return u.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let l=Promise.all(a).then(ht);return i!=null&&i.throwOnError||(l=l.catch(ht)),l}fetchQuery(t,n,r){const s=Fs(t,n,r),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(ht).catch(ht)}fetchInfiniteQuery(t,n,r){const s=Fs(t,n,r);return s.behavior=L0(),this.fetchQuery(s)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(ht).catch(ht)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(s=>wn(t)===wn(s.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Oi(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(s=>wn(t)===wn(s.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Oi(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Hl(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}const wc=N.createContext(void 0),D0=N.createContext(!1);function $0(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=wc),window.ReactQueryClientContext):wc)}const U0=({client:e,children:t,context:n,contextSharing:r=!1})=>{N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const s=$0(n,r);return N.createElement(D0.Provider,{value:!n&&r},N.createElement(s.Provider,{value:e},t))};var hp={exports:{}},W0="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",B0=W0,H0=B0;function mp(){}function gp(){}gp.resetWarningCache=mp;var q0=function(){function e(r,s,i,a,l,u){if(u!==H0){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:gp,resetWarningCache:mp};return n.PropTypes=n,n};hp.exports=q0();var Q0=hp.exports;const Z=hr(Q0);var V0=typeof Element<"u",K0=typeof Map=="function",G0=typeof Set=="function",Y0=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ti(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ti(e[r],t[r]))return!1;return!0}var i;if(K0&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!ti(r.value[1],t.get(r.value[0])))return!1;return!0}if(G0&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Y0&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(V0&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!ti(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var X0=function(t,n){try{return ti(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const J0=hr(X0);var Z0=function(e,t,n,r,s,i,a,l){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,a,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},ey=Z0;const jc=hr(ey);var ty=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),c=0;c<a.length;c++){var d=a[c];if(!u(d))return!1;var f=t[d],p=n[d];if(i=r?r.call(s,f,p,d):void 0,i===!1||i===void 0&&f!==p)return!1}return!0};const ny=hr(ty);function je(){return je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},je.apply(this,arguments)}function Vl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,La(e,t)}function La(e,t){return La=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},La(e,t)}function bc(e,t){if(e==null)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(s[n]=e[n]);return s}var $={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},ry={rel:["amphtml","canonical","alternate"]},sy={type:["application/ld+json"]},iy={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},kc=Object.keys($).map(function(e){return $[e]}),Ai={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},oy=Object.keys(Ai).reduce(function(e,t){return e[Ai[t]]=t,e},{}),ir=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},ay=function(e){var t=ir(e,$.TITLE),n=ir(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=ir(e,"defaultTitle");return t||r||void 0},ly=function(e){return ir(e,"onChangeClientState")||function(){}},Ro=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,r){return je({},n,r)},{})},uy=function(e,t){return t.filter(function(n){return n[$.BASE]!==void 0}).map(function(n){return n[$.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var s=Object.keys(r),i=0;i<s.length;i+=1){var a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}return n},[])},Pr=function(e,t,n){var r={};return n.filter(function(s){return!!Array.isArray(s[e])||(s[e]!==void 0&&console&&typeof console.warn=="function"&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof s[e]+'"'),!1)}).map(function(s){return s[e]}).reverse().reduce(function(s,i){var a={};i.filter(function(f){for(var p,y=Object.keys(f),v=0;v<y.length;v+=1){var w=y[v],k=w.toLowerCase();t.indexOf(k)===-1||p==="rel"&&f[p].toLowerCase()==="canonical"||k==="rel"&&f[k].toLowerCase()==="stylesheet"||(p=k),t.indexOf(w)===-1||w!=="innerHTML"&&w!=="cssText"&&w!=="itemprop"||(p=w)}if(!p||!f[p])return!1;var m=f[p].toLowerCase();return r[p]||(r[p]={}),a[p]||(a[p]={}),!r[p][m]&&(a[p][m]=!0,!0)}).reverse().forEach(function(f){return s.push(f)});for(var l=Object.keys(a),u=0;u<l.length;u+=1){var c=l[u],d=je({},r[c],a[c]);r[c]=d}return s},[]).reverse()},cy=function(e,t){if(Array.isArray(e)&&e.length){for(var n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},yp=function(e){return Array.isArray(e)?e.join(""):e},Mo=function(e,t){return Array.isArray(e)?e.reduce(function(n,r){return function(s,i){for(var a=Object.keys(s),l=0;l<a.length;l+=1)if(i[a[l]]&&i[a[l]].includes(s[a[l]]))return!0;return!1}(r,t)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:e}},Nc=function(e,t){var n;return je({},e,((n={})[t]=void 0,n))},dy=[$.NOSCRIPT,$.SCRIPT,$.STYLE],_o=function(e,t){return t===void 0&&(t=!0),t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Sc=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Cc=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,r){return n[Ai[r]||r]=e[r],n},t)},ni=function(e,t){return t.map(function(n,r){var s,i=((s={key:r})["data-rh"]=!0,s);return Object.keys(n).forEach(function(a){var l=Ai[a]||a;l==="innerHTML"||l==="cssText"?i.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:i[l]=n[a]}),_.createElement(e,i)})},rt=function(e,t,n){switch(e){case $.TITLE:return{toComponent:function(){return s=t.titleAttributes,(i={key:r=t.title})["data-rh"]=!0,a=Cc(s,i),[_.createElement($.TITLE,a,r)];var r,s,i,a},toString:function(){return function(r,s,i,a){var l=Sc(i),u=yp(s);return l?"<"+r+' data-rh="true" '+l+">"+_o(u,a)+"</"+r+">":"<"+r+' data-rh="true">'+_o(u,a)+"</"+r+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return Cc(t)},toString:function(){return Sc(t)}};default:return{toComponent:function(){return ni(e,t)},toString:function(){return function(r,s,i){return s.reduce(function(a,l){var u=Object.keys(l).filter(function(f){return!(f==="innerHTML"||f==="cssText")}).reduce(function(f,p){var y=l[p]===void 0?p:p+'="'+_o(l[p],i)+'"';return f?f+" "+y:y},""),c=l.innerHTML||l.cssText||"",d=dy.indexOf(r)===-1;return a+"<"+r+' data-rh="true" '+u+(d?"/>":">"+c+"</"+r+">")},"")}(e,t,n)}}}},Fa=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,s=e.htmlAttributes,i=e.noscriptTags,a=e.styleTags,l=e.title,u=l===void 0?"":l,c=e.titleAttributes,d=e.linkTags,f=e.metaTags,p=e.scriptTags,y={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var v=function(w){var k=w.linkTags,m=w.scriptTags,h=w.encode,g=Mo(w.metaTags,iy),b=Mo(k,ry),E=Mo(m,sy);return{priorityMethods:{toComponent:function(){return[].concat(ni($.META,g.priority),ni($.LINK,b.priority),ni($.SCRIPT,E.priority))},toString:function(){return rt($.META,g.priority,h)+" "+rt($.LINK,b.priority,h)+" "+rt($.SCRIPT,E.priority,h)}},metaTags:g.default,linkTags:b.default,scriptTags:E.default}}(e);y=v.priorityMethods,d=v.linkTags,f=v.metaTags,p=v.scriptTags}return{priority:y,base:rt($.BASE,t,r),bodyAttributes:rt("bodyAttributes",n,r),htmlAttributes:rt("htmlAttributes",s,r),link:rt($.LINK,d,r),meta:rt($.META,f,r),noscript:rt($.NOSCRIPT,i,r),script:rt($.SCRIPT,p,r),style:rt($.STYLE,a,r),title:rt($.TITLE,{title:u,titleAttributes:c},r)}},Is=[],Ia=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(r){n.context.helmet=r},helmetInstances:{get:function(){return n.canUseDOM?Is:n.instances},add:function(r){(n.canUseDOM?Is:n.instances).push(r)},remove:function(r){var s=(n.canUseDOM?Is:n.instances).indexOf(r);(n.canUseDOM?Is:n.instances).splice(s,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=Fa({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},vp=_.createContext({}),fy=Z.shape({setHelmet:Z.func,helmetInstances:Z.shape({get:Z.func,add:Z.func,remove:Z.func})}),py=typeof document<"u",Jn=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new Ia(r.props.context,t.canUseDOM),r}return Vl(t,e),t.prototype.render=function(){return _.createElement(vp.Provider,{value:this.helmetData.value},this.props.children)},t}(N.Component);Jn.canUseDOM=py,Jn.propTypes={context:Z.shape({helmet:Z.shape()}),children:Z.node.isRequired},Jn.defaultProps={context:{}},Jn.displayName="HelmetProvider";var Dn=function(e,t){var n,r=document.head||document.querySelector($.HEAD),s=r.querySelectorAll(e+"[data-rh]"),i=[].slice.call(s),a=[];return t&&t.length&&t.forEach(function(l){var u=document.createElement(e);for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(c==="innerHTML"?u.innerHTML=l.innerHTML:c==="cssText"?u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText)):u.setAttribute(c,l[c]===void 0?"":l[c]));u.setAttribute("data-rh","true"),i.some(function(d,f){return n=f,u.isEqualNode(d)})?i.splice(n,1):a.push(u)}),i.forEach(function(l){return l.parentNode.removeChild(l)}),a.forEach(function(l){return r.appendChild(l)}),{oldTags:i,newTags:a}},Lo=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),s=r?r.split(","):[],i=[].concat(s),a=Object.keys(t),l=0;l<a.length;l+=1){var u=a[l],c=t[u]||"";n.getAttribute(u)!==c&&n.setAttribute(u,c),s.indexOf(u)===-1&&s.push(u);var d=i.indexOf(u);d!==-1&&i.splice(d,1)}for(var f=i.length-1;f>=0;f-=1)n.removeAttribute(i[f]);s.length===i.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute("data-rh",a.join(","))}},Ec=function(e,t){var n=e.baseTag,r=e.htmlAttributes,s=e.linkTags,i=e.metaTags,a=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,d=e.title,f=e.titleAttributes;Lo($.BODY,e.bodyAttributes),Lo($.HTML,r),function(w,k){w!==void 0&&document.title!==w&&(document.title=yp(w)),Lo($.TITLE,k)}(d,f);var p={baseTag:Dn($.BASE,n),linkTags:Dn($.LINK,s),metaTags:Dn($.META,i),noscriptTags:Dn($.NOSCRIPT,a),scriptTags:Dn($.SCRIPT,u),styleTags:Dn($.STYLE,c)},y={},v={};Object.keys(p).forEach(function(w){var k=p[w],m=k.newTags,h=k.oldTags;m.length&&(y[w]=m),h.length&&(v[w]=p[w].oldTags)}),t&&t(),l(e,y,v)},Tr=null,Ri=function(e){function t(){for(var r,s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return(r=e.call.apply(e,[this].concat(i))||this).rendered=!1,r}Vl(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!ny(r,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var r,s,i=this.props.context,a=i.setHelmet,l=null,u=(r=i.helmetInstances.get().map(function(c){var d=je({},c.props);return delete d.context,d}),{baseTag:uy(["href"],r),bodyAttributes:Ro("bodyAttributes",r),defer:ir(r,"defer"),encode:ir(r,"encodeSpecialCharacters"),htmlAttributes:Ro("htmlAttributes",r),linkTags:Pr($.LINK,["rel","href"],r),metaTags:Pr($.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:Pr($.NOSCRIPT,["innerHTML"],r),onChangeClientState:ly(r),scriptTags:Pr($.SCRIPT,["src","innerHTML"],r),styleTags:Pr($.STYLE,["cssText"],r),title:ay(r),titleAttributes:Ro("titleAttributes",r),prioritizeSeoTags:cy(r,"prioritizeSeoTags")});Jn.canUseDOM?(s=u,Tr&&cancelAnimationFrame(Tr),s.defer?Tr=requestAnimationFrame(function(){Ec(s,function(){Tr=null})}):(Ec(s),Tr=null)):Fa&&(l=Fa(u)),a(l)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(N.Component);Ri.propTypes={context:fy.isRequired},Ri.displayName="HelmetDispatcher";var hy=["children"],my=["children"],Nn=function(e){function t(){return e.apply(this,arguments)||this}Vl(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!J0(Nc(this.props,"helmetData"),Nc(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,s){if(!s)return null;switch(r.type){case $.SCRIPT:case $.NOSCRIPT:return{innerHTML:s};case $.STYLE:return{cssText:s};default:throw new Error("<"+r.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(r){var s,i=r.child,a=r.arrayTypeChildren;return je({},a,((s={})[i.type]=[].concat(a[i.type]||[],[je({},r.newChildProps,this.mapNestedChildrenToProps(i,r.nestedChildren))]),s))},n.mapObjectTypeChildren=function(r){var s,i,a=r.child,l=r.newProps,u=r.newChildProps,c=r.nestedChildren;switch(a.type){case $.TITLE:return je({},l,((s={})[a.type]=c,s.titleAttributes=je({},u),s));case $.BODY:return je({},l,{bodyAttributes:je({},u)});case $.HTML:return je({},l,{htmlAttributes:je({},u)});default:return je({},l,((i={})[a.type]=je({},u),i))}},n.mapArrayTypeChildrenToProps=function(r,s){var i=je({},s);return Object.keys(r).forEach(function(a){var l;i=je({},i,((l={})[a]=r[a],l))}),i},n.warnOnInvalidChildren=function(r,s){return jc(kc.some(function(i){return r.type===i}),typeof r.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+kc.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),jc(!s||typeof s=="string"||Array.isArray(s)&&!s.some(function(i){return typeof i!="string"}),"Helmet expects a string as a child of <"+r.type+">. Did you forget to wrap your children in braces? ( <"+r.type+">{``}</"+r.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(r,s){var i=this,a={};return _.Children.forEach(r,function(l){if(l&&l.props){var u=l.props,c=u.children,d=bc(u,hy),f=Object.keys(d).reduce(function(y,v){return y[oy[v]||v]=d[v],y},{}),p=l.type;switch(typeof p=="symbol"?p=p.toString():i.warnOnInvalidChildren(l,c),p){case $.FRAGMENT:s=i.mapChildrenToProps(c,s);break;case $.LINK:case $.META:case $.NOSCRIPT:case $.SCRIPT:case $.STYLE:a=i.flattenArrayTypeChildren({child:l,arrayTypeChildren:a,newChildProps:f,nestedChildren:c});break;default:s=i.mapObjectTypeChildren({child:l,newProps:s,newChildProps:f,nestedChildren:c})}}}),this.mapArrayTypeChildrenToProps(a,s)},n.render=function(){var r=this.props,s=r.children,i=bc(r,my),a=je({},i),l=i.helmetData;return s&&(a=this.mapChildrenToProps(s,a)),!l||l instanceof Ia||(l=new Ia(l.context,l.instances)),l?_.createElement(Ri,je({},a,{context:l.value,helmetData:void 0})):_.createElement(vp.Consumer,null,function(u){return _.createElement(Ri,je({},a,{context:u}))})},t}(N.Component);Nn.propTypes={base:Z.object,bodyAttributes:Z.object,children:Z.oneOfType([Z.arrayOf(Z.node),Z.node]),defaultTitle:Z.string,defer:Z.bool,encodeSpecialCharacters:Z.bool,htmlAttributes:Z.object,link:Z.arrayOf(Z.object),meta:Z.arrayOf(Z.object),noscript:Z.arrayOf(Z.object),onChangeClientState:Z.func,script:Z.arrayOf(Z.object),style:Z.arrayOf(Z.object),title:Z.string,titleAttributes:Z.object,titleTemplate:Z.string,prioritizeSeoTags:Z.bool,helmetData:Z.object},Nn.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},Nn.displayName="Helmet";function gy(e,{insertAt:t}={}){if(!e||typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}gy(`[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 6px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[data-sonner-toast]{--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:-3px;margin-right:4px}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:-1px}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:auto;border:none;cursor:pointer;outline:none;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:auto}[data-sonner-toast] [data-cancel]{color:var(--color);background:var(--border-color)}[data-sonner-toast] [data-close-button]{position:absolute;left:0;top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:translate(-35%,-35%);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]:before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true] [data-sonner-toast][data-type=success],[data-rich-colors=true] [data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true] [data-sonner-toast][data-type=error],[data-rich-colors=true] [data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}
68
+ `);var yy=e=>{switch(e){case"success":return wy;case"error":return jy;default:return null}},vy=Array(12).fill(0),xy=({visible:e})=>_.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},_.createElement("div",{className:"sonner-spinner"},vy.map((t,n)=>_.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),wy=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),jy=_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},_.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Da=0,by=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Da++;return this.toasts.find(i=>i.id===s)?this.toasts=this.toasts.map(i=>i.id===s?(this.publish({...i,...e,id:s,title:n}),{...i,...e,id:s,title:n}):i):this.addToast({title:n,...r,id:s}),s},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.promise=(e,t)=>{let n=this.create({...t,promise:e,type:"loading",message:t.loading});return(e instanceof Promise?e:e()).then(r=>{let s=typeof t.success=="function"?t.success(r):t.success;this.create({id:n,type:"success",message:s})}).catch(r=>{let s=typeof t.error=="function"?t.error(r):t.error;this.create({id:n,type:"error",message:s})}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Da++;this.publish({jsx:e(n),id:n,...t})},this.subscribers=[],this.toasts=[]}},Qt=new by,ky=(e,t)=>{let n=(t==null?void 0:t.id)||Da++;return Qt.addToast({title:e,...t,id:n}),n},Ny=ky;Object.assign(Ny,{success:Qt.success,error:Qt.error,custom:Qt.custom,message:Qt.message,promise:Qt.promise,dismiss:Qt.dismiss});var Sy=3,Cy="32px",Ey=4e3,Py=356,xp=14,Ty=20,Oy=200,zy=e=>{let{invert:t,toast:n,interacting:r,setHeights:s,visibleToasts:i,heights:a,index:l,toasts:u,expanded:c,removeToast:d,closeButton:f,style:p,className:y="",descriptionClassName:v="",duration:w,position:k,expandByDefault:m}=e,[h,g]=_.useState(!1),[b,E]=_.useState(!1),[P,S]=_.useState(!1),[j,A]=_.useState(!1),[z,Q]=_.useState(0),[C,te]=_.useState(0),W=_.useRef(null),se=l===0,Y=l+1<=i,ie=n.type,O=n.className||"",I=n.descriptionClassName||"",D=_.useMemo(()=>a.findIndex(H=>H.toastId===n.id)||0,[a,n.id]),ee=_.useMemo(()=>n.duration||w||Ey,[n.duration,w]),q=_.useRef(0),X=_.useRef(0),we=_.useRef(ee),qe=_.useRef(0),Se=_.useRef(null),[wt,vs]=k.split("-"),Pt=_.useMemo(()=>a.reduce((H,ue,Ce)=>Ce>=D?H:H+ue.height,0),[a,D]),Tt=n.invert||t,xr=ie==="loading";X.current=_.useMemo(()=>D*xp+Pt,[D,Pt]),_.useEffect(()=>{g(!0)},[]),_.useLayoutEffect(()=>{if(!h)return;let H=W.current,ue=H.style.height;H.style.height="auto";let Ce=H.getBoundingClientRect().height;H.style.height=ue,te(Ce),s(ct=>ct.find(jt=>jt.toastId===n.id)?ct.map(jt=>jt.toastId===n.id?{...jt,height:Ce}:jt):[{toastId:n.id,height:Ce},...ct])},[h,n.title,n.description,s,n.id]);let ve=_.useCallback(()=>{E(!0),Q(X.current),s(H=>H.filter(ue=>ue.toastId!==n.id)),setTimeout(()=>{d(n)},Oy)},[n,d,s,X]);return _.useEffect(()=>{if(n.promise&&ie==="loading"||n.duration===1/0)return;let H;return c||r?(()=>{if(qe.current<q.current){let ue=new Date().getTime()-q.current;we.current=we.current-ue}qe.current=new Date().getTime()})():(q.current=new Date().getTime(),H=setTimeout(()=>{var ue;(ue=n.onAutoClose)==null||ue.call(n,n),ve()},we.current)),()=>clearTimeout(H)},[c,r,m,n,ee,ve,n.promise,ie]),_.useEffect(()=>{let H=W.current;if(H){let ue=H.getBoundingClientRect().height;return te(ue),s(Ce=>[{toastId:n.id,height:ue},...Ce]),()=>s(Ce=>Ce.filter(ct=>ct.toastId!==n.id))}},[s,n.id]),_.useEffect(()=>{n.delete&&ve()},[ve,n.delete]),_.createElement("li",{"aria-live":n.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:W,className:y+" "+O,"data-sonner-toast":"","data-styled":!n.jsx,"data-mounted":h,"data-promise":!!n.promise,"data-removed":b,"data-visible":Y,"data-y-position":wt,"data-x-position":vs,"data-index":l,"data-front":se,"data-swiping":P,"data-type":ie,"data-invert":Tt,"data-swipe-out":j,"data-expanded":!!(c||m&&h),style:{"--index":l,"--toasts-before":l,"--z-index":u.length-l,"--offset":`${b?z:X.current}px`,"--initial-height":m?"auto":`${C}px`,...p,...n.style},onPointerDown:H=>{xr||(Q(X.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(S(!0),Se.current={x:H.clientX,y:H.clientY}))},onPointerUp:()=>{var H,ue,Ce;if(j)return;Se.current=null;let ct=Number(((H=W.current)==null?void 0:H.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(ct)>=Ty){Q(X.current),(ue=n.onDismiss)==null||ue.call(n,n),ve(),A(!0);return}(Ce=W.current)==null||Ce.style.setProperty("--swipe-amount","0px"),S(!1)},onPointerMove:H=>{var ue;if(!Se.current)return;let Ce=H.clientY-Se.current.y,ct=H.clientX-Se.current.x,jt=(wt==="top"?Math.min:Math.max)(0,Ce),Ln=H.pointerType==="touch"?10:2;Math.abs(jt)>Ln?(ue=W.current)==null||ue.style.setProperty("--swipe-amount",`${Ce}px`):Math.abs(ct)>Ln&&(Se.current=null)}},f&&!n.jsx?_.createElement("button",{"aria-label":"Close toast","data-disabled":xr,"data-close-button":!0,onClick:xr?void 0:()=>{var H;ve(),(H=n.onDismiss)==null||H.call(n,n)}},_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},_.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),_.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,n.jsx||_.isValidElement(n.title)?n.jsx||n.title:_.createElement(_.Fragment,null,ie||n.icon||n.promise?_.createElement("div",{"data-icon":""},n.promise?_.createElement(xy,{visible:ie==="loading"}):null,n.icon||yy(ie)):null,_.createElement("div",{"data-content":""},_.createElement("div",{"data-title":""},n.title),n.description?_.createElement("div",{"data-description":"",className:v+I},n.description):null),n.cancel?_.createElement("button",{"data-button":!0,"data-cancel":!0,onClick:()=>{var H;ve(),(H=n.cancel)!=null&&H.onClick&&n.cancel.onClick()}},n.cancel.label):null,n.action?_.createElement("button",{"data-button":"",onClick:H=>{var ue;(ue=n.action)==null||ue.onClick(H),!H.defaultPrevented&&ve()}},n.action.label):null))},Ay=e=>{var t;let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:c="light",richColors:d,duration:f,style:p,visibleToasts:y=Sy,toastOptions:v}=e,[w,k]=_.useState([]),[m,h]=_.useState([]),[g,b]=_.useState(!1),[E,P]=_.useState(!1),[S,j]=_.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[A,z]=r.split("-"),Q=_.useRef(null),C=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),te=_.useCallback(W=>k(se=>se.filter(({id:Y})=>Y!==W.id)),[]);return _.useEffect(()=>Qt.subscribe(W=>{if(W.dismiss){k(se=>se.map(Y=>Y.id===W.id?{...Y,delete:!0}:Y));return}setTimeout(()=>{xg.flushSync(()=>{k(se=>{let Y=se.findIndex(ie=>ie.id===W.id);return Y!==-1?[...se.slice(0,Y),{...se[Y],...W},...se.slice(Y+1)]:[W,...se]})})})}),[]),_.useEffect(()=>{if(c!=="system"){j(c);return}typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:W})=>{j(W?"dark":"light")})},[c]),_.useEffect(()=>{w.length<=1&&b(!1)},[w]),_.useEffect(()=>{let W=se=>{var Y,ie;s.every(O=>se[O]||se.code===O)&&(b(!0),(Y=Q.current)==null||Y.focus()),se.code==="Escape"&&(document.activeElement===Q.current||(ie=Q.current)!=null&&ie.contains(document.activeElement))&&b(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[s]),w.length?_.createElement("section",{"aria-label":`Notifications ${C}`,tabIndex:-1},_.createElement("ol",{tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-theme":S,"data-rich-colors":d,"data-y-position":A,"data-x-position":z,style:{"--front-toast-height":`${(t=m[0])==null?void 0:t.height}px`,"--offset":typeof u=="number"?`${u}px`:u||Cy,"--width":`${Py}px`,"--gap":`${xp}px`,...p},onMouseEnter:()=>b(!0),onMouseMove:()=>b(!0),onMouseLeave:()=>{E||b(!1)},onPointerDown:()=>{P(!0)},onPointerUp:()=>P(!1)},w.map((W,se)=>_.createElement(zy,{key:W.id,index:se,toast:W,duration:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:y,closeButton:a,interacting:E,position:r,style:v==null?void 0:v.style,removeToast:te,toasts:w,heights:m,setHeights:h,expandByDefault:i,expanded:g})))):null},Ry={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const My=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ae=(e,t)=>{const n=N.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:l,...u},c)=>N.createElement("svg",{ref:c,...Ry,width:s,height:s,stroke:r,strokeWidth:a?Number(i)*24/Number(s):i,className:`lucide lucide-${My(e)}`,...u},[...t.map(([d,f])=>N.createElement(d,f)),...(Array.isArray(l)?l:[l])||[]]));return n.displayName=`${e}`,n},Fo=ae("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),Nt=ae("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),$a=ae("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),_y=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),Ly=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Sn=ae("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),Pc=ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Tc=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),At=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Fy=ae("FolderOpen",[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}]]),wp=ae("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),or=ae("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Iy=ae("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Oc=ae("PauseCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]),Ua=ae("PenSquare",[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]]),zc=ae("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]),ri=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),gn=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Wa=ae("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),Ba=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Dy=ae("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),$y=ae("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]),Uy=ae("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]),Ha=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Wy=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),By=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Hy=ae("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Ac=ae("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),qr=ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),jp=ae("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function bp(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=bp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qy(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=bp(e))&&(r&&(r+=" "),r+=t);return r}function Qy(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=kp(t))&&(r&&(r+=" "),r+=n);return r}function kp(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=kp(e[r]))&&(n&&(n+=" "),n+=t);return n}var Kl="-";function Vy(e){var t=Gy(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,s=r===void 0?{}:r;function i(l){var u=l.split(Kl);return u[0]===""&&u.length!==1&&u.shift(),Np(u,t)||Ky(l)}function a(l,u){var c=n[l]||[];return u&&s[l]?[].concat(c,s[l]):c}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function Np(e,t){var a;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),s=r?Np(e.slice(1),r):void 0;if(s)return s;if(t.validators.length!==0){var i=e.join(Kl);return(a=t.validators.find(function(l){var u=l.validator;return u(i)}))==null?void 0:a.classGroupId}}var Rc=/^\[(.+)\]$/;function Ky(e){if(Rc.test(e)){var t=Rc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Gy(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},s=Xy(Object.entries(e.classGroups),n);return s.forEach(function(i){var a=i[0],l=i[1];qa(l,r,a,t)}),r}function qa(e,t,n,r){e.forEach(function(s){if(typeof s=="string"){var i=s===""?t:Mc(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(Yy(s)){qa(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(function(a){var l=a[0],u=a[1];qa(u,Mc(t,l),n,r)})})}function Mc(e,t){var n=e;return t.split(Kl).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Yy(e){return e.isThemeGetter}function Xy(e,t){return t?e.map(function(n){var r=n[0],s=n[1],i=s.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(l){var u=l[0],c=l[1];return[t+u,c]})):a});return[r,i]}):e}function Jy(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function s(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(a){var l=n.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return s(a,l),l},set:function(a,l){n.has(a)?n.set(a,l):s(a,l)}}}var Sp="!";function Zy(e){var t=e.separator||":",n=t.length===1,r=t[0],s=t.length;return function(a){for(var l=[],u=0,c=0,d,f=0;f<a.length;f++){var p=a[f];if(u===0){if(p===r&&(n||a.slice(f,f+s)===t)){l.push(a.slice(c,f)),c=f+s;continue}if(p==="/"){d=f;continue}}p==="["?u++:p==="]"&&u--}var y=l.length===0?a:a.substring(c),v=y.startsWith(Sp),w=v?y.substring(1):y,k=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:k}}}function ev(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var s=r[0]==="[";s?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function tv(e){return{cache:Jy(e.cacheSize),splitModifiers:Zy(e),...Vy(e)}}var nv=/\s+/;function rv(e,t){var n=t.splitModifiers,r=t.getClassGroupId,s=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(nv).map(function(a){var l=n(a),u=l.modifiers,c=l.hasImportantModifier,d=l.baseClassName,f=l.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),y=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:a};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:a};y=!1}var v=ev(u).join(":"),w=c?v+Sp:v;return{isTailwindClass:!0,modifierId:w,classGroupId:p,originalClassName:a,hasPostfixModifier:y}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var l=a.modifierId,u=a.classGroupId,c=a.hasPostfixModifier,d=l+u;return i.has(d)?!1:(i.add(d),s(u,c).forEach(function(f){return i.add(l+f)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function sv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,s,i,a=l;function l(c){var d=t[0],f=t.slice(1),p=f.reduce(function(y,v){return v(y)},d());return r=tv(p),s=r.cache.get,i=r.cache.set,a=u,u(c)}function u(c){var d=s(c);if(d)return d;var f=rv(c,r);return i(c,f),f}return function(){return a(Qy.apply(null,arguments))}}function de(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var Cp=/^\[(?:([a-z-]+):)?(.+)\]$/i,iv=/^\d+\/\d+$/,ov=new Set(["px","full","screen"]),av=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uv=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ft(e){return jn(e)||ov.has(e)||iv.test(e)||Qa(e)}function Qa(e){return _n(e,"length",mv)}function cv(e){return _n(e,"size",Ep)}function dv(e){return _n(e,"position",Ep)}function fv(e){return _n(e,"url",gv)}function Ds(e){return _n(e,"number",jn)}function jn(e){return!Number.isNaN(Number(e))}function pv(e){return e.endsWith("%")&&jn(e.slice(0,-1))}function Or(e){return _c(e)||_n(e,"number",_c)}function G(e){return Cp.test(e)}function zr(){return!0}function Wt(e){return av.test(e)}function hv(e){return _n(e,"",yv)}function _n(e,t,n){var r=Cp.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function mv(e){return lv.test(e)}function Ep(){return!1}function gv(e){return e.startsWith("url(")}function _c(e){return Number.isInteger(Number(e))}function yv(e){return uv.test(e)}function vv(){var e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),s=de("borderColor"),i=de("borderRadius"),a=de("borderSpacing"),l=de("borderWidth"),u=de("contrast"),c=de("grayscale"),d=de("hueRotate"),f=de("invert"),p=de("gap"),y=de("gradientColorStops"),v=de("gradientColorStopPositions"),w=de("inset"),k=de("margin"),m=de("opacity"),h=de("padding"),g=de("saturate"),b=de("scale"),E=de("sepia"),P=de("skew"),S=de("space"),j=de("translate"),A=function(){return["auto","contain","none"]},z=function(){return["auto","hidden","clip","visible","scroll"]},Q=function(){return["auto",G,t]},C=function(){return[G,t]},te=function(){return["",ft]},W=function(){return["auto",jn,G]},se=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},Y=function(){return["solid","dashed","dotted","double","none"]},ie=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},O=function(){return["start","end","center","between","around","evenly","stretch"]},I=function(){return["","0",G]},D=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ee=function(){return[jn,Ds]},q=function(){return[jn,G]};return{cacheSize:500,theme:{colors:[zr],spacing:[ft],blur:["none","",Wt,G],brightness:ee(),borderColor:[e],borderRadius:["none","","full",Wt,G],borderSpacing:C(),borderWidth:te(),contrast:ee(),grayscale:I(),hueRotate:q(),invert:I(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[pv,Qa],inset:Q(),margin:Q(),opacity:ee(),padding:C(),saturate:ee(),scale:ee(),sepia:I(),skew:q(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",G]}],container:["container"],columns:[{columns:[Wt]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(se(),[G])}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Or]}],basis:[{basis:Q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",G]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Or]}],"grid-cols":[{"grid-cols":[zr]}],"col-start-end":[{col:["auto",{span:["full",Or]},G]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[zr]}],"row-start-end":[{row:["auto",{span:[Or]},G]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",G]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",G]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(O())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(O(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(O(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",G,t]}],"min-w":[{"min-w":["min","max","fit",G,ft]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Wt]},Wt,G]}],h:[{h:[G,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",G,ft]}],"max-h":[{"max-h":[G,t,"min","max","fit"]}],"font-size":[{text:["base",Wt,Qa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ds]}],"font-family":[{font:[zr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",G]}],"line-clamp":[{"line-clamp":["none",jn,Ds]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",G,ft]}],"list-image":[{"list-image":["none",G]}],"list-style-type":[{list:["none","disc","decimal",G]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(Y(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",ft]}],"underline-offset":[{"underline-offset":["auto",G,ft]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(se(),[dv])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(Y(),["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:Y()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:[""].concat(Y())}],"outline-offset":[{"outline-offset":[G,ft]}],"outline-w":[{outline:[ft]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ft]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Wt,hv]}],"shadow-color":[{shadow:[zr]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":ie()}],"bg-blend":[{"bg-blend":ie()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Wt,G]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",G]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",G]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",G]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Or,G]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",G]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",G]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",G]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ft,Ds]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var xv=sv(vv);function wv(...e){return xv(qy(e))}const jv=[{name:"Dashboard",href:"/",icon:wp},{name:"Organizations",href:"/organizations",icon:Ba}];function bv({children:e}){const t=ys(),[n,r]=N.useState(null);return N.useEffect(()=>{fetch("/api/health").then(s=>s.json()).then(s=>r({version:s.version,environment:s.environment})).catch(()=>r(null))},[]),o.jsxs("div",{className:"min-h-screen bg-background",style:{minHeight:"100vh",backgroundColor:"#ffffff"},children:[o.jsx("header",{className:"border-b border-border bg-card",style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #e0e0e0"},children:o.jsx("div",{className:"flex h-16 items-center px-6",children:o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx(Iy,{className:"h-6 w-6 md:hidden"}),o.jsx("h1",{className:"text-xl font-semibold text-foreground",style:{color:"#000000",fontSize:"1.25rem",fontWeight:"600"},children:"AI Agent Service"})]})})}),o.jsxs("div",{className:"flex",children:[o.jsx("aside",{className:"hidden w-64 border-r border-border bg-card md:block",children:o.jsx("nav",{className:"space-y-1 p-4",children:jv.map(s=>{const i=t.pathname===s.href||s.href!=="/"&&t.pathname.startsWith(s.href);return o.jsxs(ap,{to:s.href,className:wv("flex items-center space-x-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",i?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[o.jsx(s.icon,{className:"h-5 w-5"}),o.jsx("span",{children:s.name})]},s.name)})})}),o.jsx("main",{className:"flex-1 p-6",children:o.jsx("div",{className:"mx-auto max-w-7xl",children:e})})]}),o.jsx("footer",{className:"border-t border-border bg-card px-6 py-3",style:{backgroundColor:"#f8f9fa",borderTop:"1px solid #e0e0e0"},children:o.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[o.jsx("span",{children:"AI Agent Service"}),n&&o.jsxs("span",{children:["v",n.version]})]})})]})}const kv={}.VITE_API_URL||"/api";function Nv(e){const t=e.startsWith("/")?e.slice(1):e;return`${kv}/${t}`}async function $s(e,t){const n=Nv(e);try{const r=await fetch(n,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!r.ok)throw new Error(`API request failed: ${r.status} ${r.statusText}`);return r}catch(r){throw console.error(`API request error for ${e}:`,r),r}}const Us={health:"health",ready:"ready",analysis:"analysis",analysisStatus:e=>`analysis/${e}`,queueQueued:"queue/queued",queueInProgress:"queue/in-progress",queueCompleted:"queue/completed",queueFailed:"queue/failed",workItemsHealth:"work-items/health",workItemsErrors:"work-items/errors",workItemsLogs:"work-items/logs",errorsRecent:"errors/recent",workspaceDiscover:"workspace/discover",workspaceList:"workspace/list",workspaceStats:e=>e?`workspace/stats/${e}`:"workspace/stats",websocketStatus:"websocket/status",websocketActivity:"websocket/activity",websocketWorker:"websocket/worker",websocketReconnect:"websocket/reconnect",usageStats:"usage/stats",usageHistory:"usage/history",usageRateLimit:"usage/rate-limit",analyticsProjects:"analytics/projects",analyticsStats:"analytics/stats",analyticsOperations:"analytics/operations"};function Sv(){var j,A,z,Q;const[e,t]=N.useState(null),[n,r]=N.useState(null),[s,i]=N.useState(null),[a,l]=N.useState(null),[u,c]=N.useState(!0),[d,f]=N.useState(null),[p,y]=N.useState("queued"),[v,w]=N.useState(null);N.useEffect(()=>{const C=async()=>{try{c(!0),f(null);const[W,se,Y,ie]=await Promise.allSettled([$s(Us.queueQueued),$s(Us.queueInProgress),$s(Us.queueCompleted+"?limit=10"),$s(Us.queueFailed+"?limit=10")]);if(W.status==="fulfilled"&&W.value.ok){const O=await W.value.json();t(O.data)}if(se.status==="fulfilled"&&se.value.ok){const O=await se.value.json();r(O.data)}if(Y.status==="fulfilled"&&Y.value.ok){const O=await Y.value.json();i(O.data)}if(ie.status==="fulfilled"&&ie.value.ok){const O=await ie.value.json();l(O.data)}}catch(W){f(W instanceof Error?W.message:"Failed to fetch work queue data")}finally{c(!1)}};C();const te=setInterval(C,1e4);return()=>clearInterval(te)},[]);const k=C=>{const te=Math.floor(C/60),W=Math.floor(te/60);return W>0?`${W}h ${te%60}m`:te>0?`${te}m`:`${C}s`},m=C=>{const te=new Date,W=new Date(C),se=te.getTime()-W.getTime(),Y=Math.floor(se/(1e3*60));if(Y<1)return"Just now";if(Y<60)return`${Y}m ago`;const ie=Math.floor(Y/60);return ie<24?`${ie}h ago`:`${Math.floor(ie/24)}d ago`},h=C=>{switch(C){case"project_review":return"📋";case"code_review":return"🔍";case"story_implementation":return"⚡";case"development_planning":return"📊";default:return"📄"}},g=C=>C>=9?"text-red-600 bg-red-50":C>=7?"text-orange-600 bg-orange-50":C>=5?"text-yellow-600 bg-yellow-50":"text-green-600 bg-green-50",b=C=>C>=9?"Critical":C>=7?"High":C>=5?"Medium":"Low",E=C=>{switch(C){case"completed":return o.jsx(Sn,{className:"w-4 h-4 text-green-600"});case"failed":return o.jsx(Nt,{className:"w-4 h-4 text-red-600"});case"in_progress":return o.jsx(or,{className:"w-4 h-4 text-blue-600 animate-spin"});case"queued":return o.jsx(At,{className:"w-4 h-4 text-yellow-600"});default:return o.jsx(At,{className:"w-4 h-4 text-gray-400"})}},P=C=>{switch(C){case"completed":return"text-green-600 bg-green-50 border-green-200";case"failed":return"text-red-600 bg-red-50 border-red-200";case"in_progress":return"text-blue-600 bg-blue-50 border-blue-200";case"queued":return"text-yellow-600 bg-yellow-50 border-yellow-200";default:return"text-gray-600 bg-gray-50 border-gray-200"}},S=(C,te)=>{var W;return o.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 transition-colors",children:[o.jsxs("div",{className:"flex items-start justify-between mb-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:h(C.type)}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-sm",children:C.title}),o.jsx("p",{className:"text-xs text-gray-600",children:C.projectName})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[te==="completed"&&o.jsxs("span",{className:`px-2 py-1 rounded border text-xs font-medium flex items-center gap-1 ${P(C.status)}`,children:[E(C.status),C.status==="completed"?"Success":C.status==="failed"?"Failed":C.status]}),o.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g(C.priority)}`,children:b(C.priority)}),C.estimatedDuration&&o.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[o.jsx(At,{className:"w-3 h-3"}),k(C.estimatedDuration)]}),C.actualDuration&&te==="completed"&&o.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[o.jsx(At,{className:"w-3 h-3"}),k(Math.round(C.actualDuration/1e3))," actual"]})]})]}),C.description&&o.jsx("p",{className:"text-xs text-gray-600 mb-2 line-clamp-2",children:C.description}),C.progress&&C.status==="in_progress"&&o.jsxs("div",{className:"mb-2",children:[o.jsxs("div",{className:"flex justify-between text-xs text-gray-600 mb-1",children:[o.jsx("span",{children:C.progress.currentStep}),o.jsxs("span",{children:[C.progress.percentage,"%"]})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${C.progress.percentage}%`}})})]}),C.status==="failed"&&o.jsxs("div",{className:"mb-2 p-2 bg-red-50 rounded border border-red-200 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Nt,{className:"w-4 h-4 text-red-600"}),o.jsx("span",{className:"text-xs text-red-800 font-medium",children:"Work item failed"}),((W=C.metadata)==null?void 0:W.failedAt)&&o.jsxs("span",{className:"text-xs text-red-600",children:["• Failed: ",m(C.metadata.failedAt)]})]}),o.jsx("button",{onClick:se=>{se.stopPropagation(),w(C)},className:"px-2 py-1 text-xs bg-red-100 text-red-700 hover:bg-red-200 rounded transition-colors",children:"View Details"})]}),o.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[o.jsxs("span",{children:["Created ",m(C.createdAt)]}),C.assignedTo&&o.jsx("span",{className:"bg-blue-100 text-blue-800 px-2 py-1 rounded",children:C.assignedTo}),C.completedAt&&o.jsxs("span",{className:"text-green-600",children:["Completed ",m(C.completedAt)]})]})]},`${te}-${C.id}`)};return u?o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(or,{className:"h-8 w-8 animate-spin text-blue-600"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading work queue..."})]})}):d?o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center py-8 text-red-600",children:[o.jsx(Nt,{className:"h-6 w-6 mr-2"}),o.jsx("span",{className:"text-sm",children:d})]})}):o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsxs("div",{className:"p-6 border-b",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Work Queue Status"}),o.jsxs("div",{className:"flex space-x-1 bg-gray-100 rounded-lg p-1",children:[o.jsxs("button",{onClick:()=>y("queued"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="queued"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(Oc,{className:"w-4 h-4"}),"Queued (",(e==null?void 0:e.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("progress"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="progress"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(zc,{className:"w-4 h-4"}),"In Progress (",(n==null?void 0:n.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("completed"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="completed"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(Sn,{className:"w-4 h-4"}),"Recent (",(s==null?void 0:s.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("failed"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="failed"?"bg-white text-red-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(Nt,{className:"w-4 h-4"}),"Failed (",(a==null?void 0:a.total)||0,")"]})]})]}),o.jsxs("div",{className:"p-6",children:[p==="queued"&&(e==null?void 0:e.estimatedWaitTime)&&o.jsx("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:o.jsxs("p",{className:"text-sm text-yellow-800",children:[o.jsx(At,{className:"w-4 h-4 inline mr-1"}),"Estimated wait time: ",k(e.estimatedWaitTime)]})}),p==="progress"&&(n==null?void 0:n.totalEstimatedRemaining)&&o.jsx("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg border border-blue-200",children:o.jsxs("p",{className:"text-sm text-blue-800",children:[o.jsx(or,{className:"w-4 h-4 inline mr-1"}),"Estimated remaining time: ",k(n.totalEstimatedRemaining)]})}),o.jsxs("div",{className:"space-y-3",children:[p==="queued"&&o.jsx(o.Fragment,{children:(e==null?void 0:e.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(Oc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No items in queue"})]}):e==null?void 0:e.items.map(C=>S(C,"queued"))}),p==="progress"&&o.jsx(o.Fragment,{children:(n==null?void 0:n.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(zc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No items in progress"})]}):n==null?void 0:n.items.map(C=>S(C,"progress"))}),p==="completed"&&o.jsx(o.Fragment,{children:(s==null?void 0:s.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(Sn,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No completed items"})]}):s==null?void 0:s.items.map(C=>S(C,"completed"))}),p==="failed"&&o.jsx(o.Fragment,{children:(a==null?void 0:a.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(Nt,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No failed items"})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mb-4 p-3 bg-red-50 rounded-lg border border-red-200",children:o.jsxs("p",{className:"text-sm text-red-800",children:[o.jsx(Nt,{className:"w-4 h-4 inline mr-1"}),(a==null?void 0:a.total)||0," work items have failed and may need attention"]})}),a==null?void 0:a.items.map(C=>S(C,"failed"))]})})]}),p==="completed"&&(s==null?void 0:s.hasMore)&&o.jsx("div",{className:"mt-4 text-center",children:o.jsx("button",{className:"px-4 py-2 text-sm text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded-lg transition-colors",children:"Load more completed items"})})]}),v&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:o.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-2xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Nt,{className:"w-5 h-5 text-red-600"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Error Details"})]}),o.jsx("button",{onClick:()=>w(null),className:"text-gray-400 hover:text-gray-600 transition-colors",children:o.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"border rounded-lg p-4 bg-gray-50",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Work Item Information"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Type:"}),o.jsx("span",{className:"ml-2",children:v.type})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Status:"}),o.jsx("span",{className:"ml-2 text-red-600",children:"Failed"})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Project:"}),o.jsx("span",{className:"ml-2",children:v.projectName})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Created:"}),o.jsxs("span",{className:"ml-2",children:[m(v.createdAt)," ago"]})]}),v.completedAt&&o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Failed:"}),o.jsxs("span",{className:"ml-2",children:[m(v.completedAt)," ago"]})]}),v.assignedTo&&o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Assigned to:"}),o.jsx("span",{className:"ml-2",children:v.assignedTo})]})]})]}),o.jsxs("div",{className:"border rounded-lg p-4 bg-red-50 border-red-200",children:[o.jsxs("h3",{className:"font-medium text-red-900 mb-2 flex items-center gap-2",children:[o.jsx(Nt,{className:"w-4 h-4"}),"Error Message"]}),o.jsx("p",{className:"text-red-800 text-sm",children:((j=v.metadata)==null?void 0:j.reason)||((A=v.metadata)==null?void 0:A.failureReason)||((z=v.metadata)==null?void 0:z.error)||"No specific error message available"})]}),((Q=v.metadata)==null?void 0:Q.errorHistory)&&v.metadata.errorHistory.length>0&&o.jsxs("div",{className:"border rounded-lg p-4",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Attempt History"}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsxs("p",{className:"mb-2",children:["This work item failed after ",v.metadata.errorHistory.length," attempt",v.metadata.errorHistory.length>1?"s":"",":"]}),o.jsx("div",{className:"space-y-2",children:v.metadata.errorHistory.map((C,te)=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[o.jsxs("span",{children:["Attempt #",C.attemptNumber||te+1]}),o.jsx("span",{className:"text-xs text-gray-500",children:C.timestamp&&m(C.timestamp)})]},te))})]})]}),v.metadata&&Object.keys(v.metadata).length>0&&o.jsxs("div",{className:"border rounded-lg p-4",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Additional Information"}),o.jsxs("details",{className:"text-sm",children:[o.jsx("summary",{className:"cursor-pointer text-gray-600 hover:text-gray-800",children:"View raw metadata"}),o.jsx("pre",{className:"mt-2 text-xs bg-gray-50 p-2 rounded overflow-x-auto",children:JSON.stringify(v.metadata,null,2)})]})]})]}),o.jsx("div",{className:"flex justify-end mt-6",children:o.jsx("button",{onClick:()=>w(null),className:"px-4 py-2 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors",children:"Close"})})]})})]})}function Cv(){const[e,t]=N.useState(null),[n,r]=N.useState(!0),[s,i]=N.useState(!1);N.useEffect(()=>{const d=async()=>{try{const p=await fetch("/api/smart-polling/metrics");if(p.ok){const y=await p.json();t(y.data)}}catch(p){console.error("Failed to fetch smart polling metrics:",p)}finally{r(!1)}};d();const f=setInterval(d,1e4);return()=>clearInterval(f)},[]);const a=async()=>{i(!0);try{if((await fetch("/api/smart-polling/force",{method:"POST"})).ok){const f=await fetch("/api/smart-polling/metrics");if(f.ok){const p=await f.json();t(p.data)}}}catch(d){console.error("Failed to force polling:",d)}finally{i(!1)}},l=d=>d<1e3?`${d}ms`:d<6e4?`${Math.round(d/1e3)}s`:`${Math.round(d/6e4)}m`,u=d=>{if(!d)return"Never";const f=new Date(d),y=new Date().getTime()-f.getTime();return y<6e4?`${Math.round(y/1e3)}s ago`:y<36e5?`${Math.round(y/6e4)}m ago`:f.toLocaleTimeString()},c=d=>d.isPolling?d.consecutiveErrors>=3?o.jsx($a,{className:"h-4 w-4 text-red-500"}):d.consecutiveErrors>0?o.jsx(At,{className:"h-4 w-4 text-yellow-500"}):o.jsx(Sn,{className:"h-4 w-4 text-green-500"}):o.jsx(Dy,{className:"h-4 w-4 text-gray-500"});return n||!e?o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx("div",{className:"border-b border-border p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Fo,{className:"h-5 w-5"}),o.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"})]})}),o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"animate-pulse",children:o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"h-4 bg-muted rounded"}),o.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),o.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})})})]}):o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx("div",{className:"border-b border-border p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Fo,{className:"h-5 w-5"}),o.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"}),o.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),"Active: ",e.activePolling,"/",e.totalOrganizations]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(jp,{className:"h-3 w-3"}),"Avg: ",l(e.averageInterval)]}),o.jsxs("button",{onClick:a,disabled:s,className:"flex items-center gap-1 px-2 py-1 text-xs bg-blue-500 hover:bg-blue-600 disabled:bg-blue-300 text-white rounded transition-colors",title:"Force immediate polling for all organizations",children:[o.jsx(gn,{className:`h-3 w-3 ${s?"animate-spin":""}`}),s?"Polling...":"Force Poll"]})]})]})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.totalPolls}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Polls"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.totalClaimedWork}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Work Claimed"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-red-600",children:e.totalErrors}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Errors"})]}),o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{className:"text-2xl font-bold text-purple-600",children:[(e.errorRate*100).toFixed(1),"%"]}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Error Rate"})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Organization Status"}),e.organizationStats.length===0?o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx(Fo,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No organizations configured"})]}):e.organizationStats.map(d=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/50",children:[o.jsx("div",{className:"flex-shrink-0",children:c(d)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("p",{className:"font-medium truncate",children:d.organizationName}),o.jsx("span",{className:`text-xs px-2 py-1 rounded ${d.isPolling?"bg-green-100 text-green-700":"bg-gray-100 text-gray-700"}`,children:d.isPolling?"Polling":"Stopped"})]}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 text-xs text-muted-foreground",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Interval:"})," ",l(d.currentInterval)]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Last Poll:"})," ",u(d.lastPollAt)]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Work Claimed:"})," ",d.claimedWorkCount]}),o.jsxs("div",{className:d.consecutiveErrors>0?"text-red-600":"",children:[o.jsx("span",{className:"font-medium",children:"Errors:"})," ",d.totalErrors,d.consecutiveErrors>0&&` (${d.consecutiveErrors} consecutive)`]})]})]}),o.jsxs("div",{className:"flex-shrink-0 text-right",children:[o.jsx("div",{className:"text-sm font-medium",children:d.totalPolls}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"polls"})]})]},d.organizationId))]}),o.jsxs("div",{className:"mt-6 p-3 bg-muted/30 rounded-lg",children:[o.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Status Indicators"}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Sn,{className:"h-3 w-3 text-green-500"}),o.jsx("span",{children:"Healthy polling"})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(At,{className:"h-3 w-3 text-yellow-500"}),o.jsx("span",{children:"Some errors"})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx($a,{className:"h-3 w-3 text-red-500"}),o.jsx("span",{children:"Multiple failures"})]})]})]})]})]})}function Ev(){const[e,t]=N.useState(null),[n,r]=N.useState(!0);N.useEffect(()=>{const i=async()=>{try{const l=await fetch("/api/queue/stats");if(l.ok){const u=await l.json();t({queued:u.queued,inProgress:u.inProgress,completedToday:u.completed,completedThisWeek:u.completed,averageCompletionTime:u.averageCompletionTime*1e3,successRate:u.successRate,activeAgents:u.workers,totalProcessed:u.total})}}catch(l){console.error("Failed to fetch queue stats:",l)}finally{r(!1)}};i();const a=setInterval(i,3e4);return()=>clearInterval(a)},[]);const s=i=>i<1e3?`${i}ms`:i<6e4?`${(i/1e3).toFixed(1)}s`:`${(i/6e4).toFixed(1)}m`;return o.jsxs(o.Fragment,{children:[o.jsx(Nn,{children:o.jsx("title",{children:"Dashboard - AI Agent Service"})}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),o.jsx("p",{className:"text-muted-foreground",children:"Overview of your AI Agent Service performance"})]}),o.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Tasks"}),o.jsx("div",{className:"text-2xl font-bold text-blue-600",children:n?"-":(e==null?void 0:e.totalProcessed)||0})]}),o.jsx(Ly,{className:"h-8 w-8 text-blue-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"All time"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"}),o.jsx("div",{className:"text-2xl font-bold text-green-600",children:n?"-":`${Math.round(((e==null?void 0:e.successRate)||0)*100)}%`})]}),o.jsx(Wy,{className:"h-8 w-8 text-green-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Overall performance"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Avg Completion Time"}),o.jsx("div",{className:"text-2xl font-bold text-purple-600",children:n?"-":s((e==null?void 0:e.averageCompletionTime)||0)})]}),o.jsx(At,{className:"h-8 w-8 text-purple-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Per task"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Active Agents"}),o.jsx("div",{className:"text-2xl font-bold text-orange-600",children:n?"-":(e==null?void 0:e.activeAgents)||0})]}),o.jsx(Hy,{className:"h-8 w-8 text-orange-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Currently active"})]})]}),o.jsx(Cv,{}),o.jsx(Sv,{}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Welcome to AI Agent Service"}),o.jsx("p",{className:"text-muted-foreground",children:"This dashboard provides insights into your AI agent performance across multiple Task Shepherd organizations. Visit the Organizations page to manage connections and the Analytics page for detailed metrics."})]})]})]})}const Pv=({organizationId:e,onComplete:t,onCancel:n})=>{const[r,s]=N.useState({id:"",name:"",description:""}),[i,a]=N.useState(!1),[l,u]=N.useState(null),c=async f=>{f.preventDefault(),u(null),a(!0);try{const p=await fetch(`/api/organizations/${e}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,services:[]})});if(!p.ok){const v=await p.json();throw new Error(v.error||"Failed to create workspace")}const y=await p.json();if(y.success)t(y.data);else throw new Error(y.error||"Failed to create workspace")}catch(p){console.error("Failed to create workspace:",p),u(p instanceof Error?p.message:"Failed to create workspace")}finally{a(!1)}},d=r.id.trim()&&r.name.trim();return o.jsxs("div",{className:"max-w-2xl mx-auto bg-white rounded-lg shadow-lg",children:[o.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Register Workspace"}),o.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:o.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),o.jsxs("form",{onSubmit:c,className:"p-6 space-y-6",children:[l&&o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:o.jsx("p",{className:"text-sm text-red-700",children:l})}),o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"id",className:"block text-sm font-medium text-gray-700 mb-1",children:["Workspace ID ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{type:"text",id:"id",value:r.id,onChange:f=>s({...r,id:f.target.value}),className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"my-workspace",required:!0}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'A unique identifier for this workspace (e.g., "my-app", "project-name")'})]}),o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:["Workspace Name ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{type:"text",id:"name",value:r.name,onChange:f=>s({...r,name:f.target.value}),className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"My Workspace",required:!0}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"A human-readable name for the workspace"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("textarea",{id:"description",value:r.description,onChange:f=>s({...r,description:f.target.value}),rows:3,className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"Optional description of this workspace"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Optional description of what this workspace contains"})]}),o.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-sm font-medium text-blue-800 mb-2",children:"Note"}),o.jsx("p",{className:"text-sm text-blue-700",children:"The agent will handle mapping this workspace to a local path. You can manage services and additional workspace configuration through the main Task Shepherd UI after registration."})]}),o.jsxs("div",{className:"flex justify-end space-x-3 pt-4 border-t border-gray-200",children:[o.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",disabled:!d||i,className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:i?"Creating...":"Register Workspace"})]})]})]})},Tv=({organizationId:e,workspace:t,onClose:n,onApplyChanges:r})=>{var S;const[s,i]=N.useState(!1),[a,l]=N.useState(null),[u,c]=N.useState(new Set),[d,f]=N.useState(null),[p,y]=N.useState({}),v=async()=>{i(!0);try{const j=await fetch(`/api/organizations/${e}/workspaces/${t.id}/analyze`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!j.ok)throw new Error("Failed to analyze workspace");const A=await j.json();if(A.success)l(A.data);else throw new Error(A.error||"Analysis failed")}catch(j){console.error("Workspace analysis failed:",j),alert(j instanceof Error?j.message:"Failed to analyze workspace")}finally{i(!1)}},w=j=>{switch(j){case"found":return o.jsx(Sn,{className:"w-4 h-4 text-green-500"});case"outdated":return o.jsx($a,{className:"w-4 h-4 text-yellow-500"});case"missing":return o.jsx(Ac,{className:"w-4 h-4 text-red-500"});default:return null}},k=j=>{switch(j){case"add_service":return o.jsx(ri,{className:"w-4 h-4 text-green-500"});case"update_service":return o.jsx(gn,{className:"w-4 h-4 text-blue-500"});case"remove_service":return o.jsx(Ac,{className:"w-4 h-4 text-red-500"});default:return o.jsx(_y,{className:"w-4 h-4 text-gray-500"})}},m=j=>{const A=new Set(u);A.has(j)?A.delete(j):A.add(j),c(A)},h=()=>{if(!a||u.size===0)return;const j=Array.from(u).map(A=>a.improvements[A]);r==null||r(j),n()},g=j=>{f(j.name),y({name:j.name,type:j.type,technology:j.technology,port:j.port,description:j.description})},b=()=>{f(null),y({})},E=async()=>{if(d)try{const j=await fetch(`/api/organizations/${e}/workspaces/${t.id}/services/${d}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),A=await j.json();if(j.ok&&A.success)f(null),y({}),await v();else throw new Error(A.error||"Failed to update service")}catch(j){console.error("Failed to update service:",j),alert(j instanceof Error?j.message:"Failed to update service")}},P=async j=>{if(confirm(`Are you sure you want to remove the service "${j}"? This action cannot be undone.`))try{const A=await fetch(`/api/organizations/${e}/workspaces/${t.id}/services/${j}`,{method:"DELETE"}),z=await A.json();if(A.ok&&z.success)await v();else throw new Error(z.error||"Failed to remove service")}catch(A){console.error("Failed to remove service:",A),alert(A instanceof Error?A.message:"Failed to remove service")}};return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:o.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h1",{className:"text-2xl font-bold text-gray-900",children:["Analyze Workspace: ",t.name]}),o.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:o.jsx(qr,{className:"w-6 h-6"})})]}),o.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Analyze the current workspace configuration and discover improvements"})]}),o.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-140px)]",children:[!a&&o.jsxs("div",{className:"text-center py-12",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(gn,{className:"w-8 h-8 text-blue-600"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Ready to Analyze Workspace"}),o.jsx("p",{className:"text-gray-600 mb-6 max-w-md mx-auto",children:"This will scan the workspace directory and compare it with your current configuration to suggest improvements."}),o.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-6",children:o.jsxs("div",{className:"text-sm text-gray-700",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Workspace:"})," ",t.name]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Path:"})," ",o.jsx("code",{className:"font-mono text-xs",children:t.path})]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Current services:"})," ",((S=t.services)==null?void 0:S.length)||0]})]})})]}),o.jsx("button",{onClick:v,disabled:s,className:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?o.jsxs(o.Fragment,{children:[o.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(gn,{className:"w-4 h-4 mr-2"}),"Start Analysis"]})})]}),a&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-lg font-medium text-blue-900 mb-2",children:"Analysis Summary"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Current Services"}),o.jsxs("div",{className:"text-blue-600",children:[a.currentServices.length," configured"]})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Discovered Services"}),o.jsxs("div",{className:"text-blue-600",children:[a.discoveredServices.length," found"]})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Improvements"}),o.jsxs("div",{className:"text-blue-600",children:[a.improvements.length," suggested"]})]})]})]}),o.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Current Services Status"}),a.currentServices.length>0?o.jsx("div",{className:"space-y-2",children:a.currentServices.map((j,A)=>o.jsx("div",{className:"p-3 bg-gray-50 rounded-lg border",children:d===j.name?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:p.name||"",onChange:z=>y({...p,name:z.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),o.jsxs("select",{value:p.type||"backend",onChange:z=>y({...p,type:z.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),o.jsx("input",{type:"text",value:p.technology||"",onChange:z=>y({...p,technology:z.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"e.g., Node.js, Python"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:p.port||"",onChange:z=>y({...p,port:z.target.value?parseInt(z.target.value):void 0}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"3000"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:p.description||"",onChange:z=>y({...p,description:z.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[o.jsxs("button",{onClick:E,className:"inline-flex items-center px-3 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:[o.jsx(Wa,{className:"h-3 w-3 mr-1"}),"Save"]}),o.jsxs("button",{onClick:b,className:"inline-flex items-center px-3 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:[o.jsx(qr,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[w(j.status),o.jsxs("div",{children:[o.jsx("div",{className:"font-medium",children:j.name}),o.jsxs("div",{className:"text-sm text-gray-600",children:[j.type," ",j.technology&&`• ${j.technology}`," ",j.port&&`• Port ${j.port}`,j.description&&` • ${j.description}`]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>g(j),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:o.jsx(Ua,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>P(j.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:o.jsx(Ha,{className:"h-3 w-3"})}),o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${j.status==="found"?"bg-green-100 text-green-800":j.status==="outdated"?"bg-yellow-100 text-yellow-800":"bg-red-100 text-red-800"}`,children:j.status})]})]})},A))}):o.jsx("p",{className:"text-gray-600",children:"No services currently configured"})]}),a.improvements.length>0&&o.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:["Suggested Improvements (",a.improvements.length,")"]}),o.jsx("div",{className:"space-y-3",children:a.improvements.map((j,A)=>o.jsxs("div",{className:"flex items-start gap-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50",children:[o.jsx("input",{type:"checkbox",id:`improvement-${A}`,checked:u.has(A),onChange:()=>m(A),className:"mt-1 h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[k(j.type),o.jsx("span",{className:"font-medium",children:j.service}),o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${j.type==="add_service"?"bg-green-100 text-green-800":j.type==="update_service"?"bg-blue-100 text-blue-800":j.type==="remove_service"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:j.type.replace("_"," ")})]}),o.jsx("p",{className:"text-sm text-gray-700 mb-1",children:j.description}),o.jsx("p",{className:"text-xs text-gray-500",children:j.action})]})]},A))}),u.size>0&&o.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm text-blue-800",children:[u.size," improvement(s) selected"]}),o.jsx("button",{onClick:h,className:"px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",children:"Apply Selected"})]})})]}),a.recommendations.length>0&&o.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-sm font-medium text-green-800 mb-2",children:"Recommendations"}),o.jsx("ul",{className:"space-y-1",children:a.recommendations.map((j,A)=>o.jsxs("li",{className:"text-sm text-green-700",children:["• ",j]},A))})]}),a.warnings.length>0&&o.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-sm font-medium text-yellow-800 mb-2",children:"Warnings"}),o.jsx("ul",{className:"space-y-1",children:a.warnings.map((j,A)=>o.jsxs("li",{className:"text-sm text-yellow-700",children:["• ",j]},A))})]}),o.jsx("div",{className:"text-center pt-4 border-t border-gray-200",children:o.jsxs("button",{onClick:v,disabled:s,className:"inline-flex items-center px-3 py-2 text-sm text-gray-600 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 disabled:opacity-50",children:[o.jsx(gn,{className:`w-4 h-4 mr-2 ${s?"animate-spin":""}`}),"Re-analyze"]})})]})]})]})})};function Ov(){const[e,t]=N.useState(null),[n,r]=N.useState(!0),[s,i]=N.useState(!1),[a,l]=N.useState({name:"",basePath:"",apiKey:""}),[u,c]=N.useState([]),[d,f]=N.useState(new Set),[p,y]=N.useState(new Set),[v,w]=N.useState(null),[k,m]=N.useState(null),[h,g]=N.useState(null),[b,E]=N.useState({name:"",id:"",path:"",description:""}),[P,S]=N.useState(new Set),[j,A]=N.useState(null),[z,Q]=N.useState({name:"",type:"backend",port:"",url:"",technology:"",description:""}),[C,te]=N.useState(Date.now()),[W,se]=N.useState(null),[Y,ie]=N.useState(null),[O,I]=N.useState(null),[D,ee]=N.useState({}),[q,X]=N.useState({}),[we,qe]=N.useState({}),[Se,wt]=N.useState(!1),[vs,Pt]=N.useState(null),[Tt,xr]=N.useState([]),[ve,H]=N.useState(new Set),[ue,Ce]=N.useState({}),[ct,jt]=N.useState(!1),[Ln,Zi]=N.useState(!1);N.useEffect(()=>{xs()},[]);const re=(x,M,F)=>{const U={id:Date.now().toString(),type:x,title:M,message:F,timestamp:Date.now()};c(B=>[...B,U]),x==="success"&&setTimeout(()=>{c(B=>B.filter(V=>V.id!==U.id))},5e3)},Pp=x=>{c(M=>M.filter(F=>F.id!==x))},xs=async()=>{try{const x=await fetch("/api/organizations");if(x.ok){const M=await x.json();t(M.data),te(Date.now())}}catch(x){console.error("Failed to fetch organizations:",x)}finally{r(!1)}},pn=async()=>{await xs()},eo=()=>{},to=()=>{},no=()=>{},Tp=async x=>{const M=new Set(d);M.has(x)?M.delete(x):M.add(x),f(M)},Op=async(x,M)=>{x.preventDefault();try{const F=await fetch(`/api/organizations/${M}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),U=await F.json();if(F.ok&&U.success&&U.data){if(e){const B=e.organizations.map(V=>{if(V.id===M){const Me=V.workspaces||[];return{...V,workspaces:[...Me,U.data],workspaceCount:(V.workspaceCount||0)+1}}return V});t({...e,organizations:B})}w(null),E({name:"",id:"",path:"",description:""}),eo(),re("success","Workspace Added",`Successfully added workspace "${b.name}"`)}else re("error","Failed to Add Workspace",U.message||U.error)}catch(F){console.error("Failed to add workspace:",F),re("error","Network Error","Failed to add workspace. Please try again.")}},zp=async(x,M,F)=>{console.log("🔄 handleUpdateWorkspace called:",{orgId:x,workspaceId:M,updates:F});try{console.log("📡 Making PATCH request to:",`/api/organizations/${x}/workspaces/${M}`);const U=await fetch(`/api/organizations/${x}/workspaces/${M}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});console.log("📨 Response status:",U.status,U.statusText);const B=await U.json();U.ok?(await pn(),re("success","Workspace Updated","Workspace settings updated successfully")):re("error","Failed to Update Workspace",B.message||B.error)}catch(U){console.error("Failed to update workspace:",U),re("error","Network Error","Failed to update workspace. Please try again.")}},Ap=x=>{ie(x.id),X({name:x.name,type:x.type,technology:x.technology,port:x.port,url:x.url,description:x.description})},Rp=()=>{ie(null),X({})},Mp=async(x,M,F)=>{try{const U=await fetch(`/api/organizations/${x}/workspaces/${M}/services/${F}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(q)}),B=await U.json();if(U.ok&&B.success)await pn(),ie(null),X({}),re("success","Service Updated","Service details updated successfully");else throw new Error(B.error||"Failed to update service")}catch(U){console.error("Failed to update service:",U),re("error","Update Failed",U instanceof Error?U.message:"Failed to update service")}},_p=async(x,M,F,U)=>{if(confirm(`Are you sure you want to remove the service "${U}"? This action cannot be undone.`))try{const B=await fetch(`/api/organizations/${x}/workspaces/${M}/services/${F}`,{method:"DELETE"}),V=await B.json();if(B.ok&&V.success)await pn(),re("success","Service Removed",`Service "${U}" has been removed`);else throw new Error(V.error||"Failed to remove service")}catch(B){console.error("Failed to remove service:",B),re("error","Removal Failed",B instanceof Error?B.message:"Failed to remove service")}},Lp=async(x,M,F)=>{x.preventDefault();try{const U={...z,port:z.port?parseInt(z.port):void 0,isActive:!0},B=await fetch(`/api/organizations/${M}/workspaces/${F}/services`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(U)}),V=await B.json();if(B.ok&&V.success){if(e){const Me=e.organizations.map(De=>{var R;if(De.id===M){const J=(R=De.workspaces)==null?void 0:R.map(oe=>{if(oe.id===F){const Fn=oe.services||[];return{...oe,services:[...Fn,V.data]}}return oe});return{...De,workspaces:J}}return De});t({...e,organizations:Me})}A(null),Q({name:"",type:"backend",port:"",url:"",technology:"",description:""}),eo(),re("success","Service Added",`Successfully added service "${U.name}"`)}else re("error","Failed to Add Service",V.message||V.error)}catch(U){console.error("Failed to add service:",U),re("error","Network Error","Failed to add service. Please try again.")}},Fp=async(x,M,F,U)=>{try{const B=await fetch(`/api/organizations/${x}/workspaces/${M}/services/${F}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:U})}),V=await B.json();if(B.ok&&V.success){if(e){const Me=e.organizations.map(De=>{var R;if(De.id===x){const J=(R=De.workspaces)==null?void 0:R.map(oe=>{var Fn;if(oe.id===M){const qp=(Fn=oe.services)==null?void 0:Fn.map(ro=>ro.id===F?{...ro,isActive:U}:ro);return{...oe,services:qp}}return oe});return{...De,workspaces:J}}return De});t({...e,organizations:Me})}re("success","Service Updated",`Service ${U?"activated":"deactivated"} successfully`)}else re("error","Failed to Update Service",V.message||V.error)}catch(B){console.error("Failed to update service:",B),re("error","Network Error","Failed to update service. Please try again.")}},Ip=x=>{I(x.id),qe({name:x.name,apiUrl:x.apiUrl,apiKey:"",enabled:x.enabled})},Dp=()=>{I(null),qe({})},$p=async x=>{wt(!0);try{const M=await fetch(`/api/organizations/${x}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(we)}),F=await M.json();if(M.ok&&F.success)await pn(),I(null),qe({}),re("success","Organization Updated","Organization details updated successfully");else throw new Error(F.error||"Failed to update organization")}catch(M){console.error("Failed to update organization:",M),re("error","Update Failed",M instanceof Error?M.message:"Failed to update organization")}finally{wt(!1)}},Up=async x=>{Pt(x),jt(!0);try{const M=await fetch(`/api/organizations/${x}/workspaces/available`),F=await M.json();if(M.ok&&F.success){xr(F.workspaces||[]);const U=new Set,B={};F.workspaces.forEach(V=>{V.syncedLocally&&V.isActive!==!1?(U.add(V.id),B[V.id]=V.localPath||V.path||""):B[V.id]=V.path||""}),H(U),Ce(B)}else re("error","Failed to Fetch Workspaces",F.error||"Could not fetch available workspaces"),Pt(null)}catch(M){console.error("Failed to fetch available workspaces:",M),re("error","Network Error","Failed to fetch available workspaces. Please try again."),Pt(null)}finally{jt(!1)}},Wp=async x=>{Zi(!0);try{if(ve.size>0){const Me=await fetch(`/api/organizations/${x}/workspaces/sync`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceIds:Array.from(ve)})}),De=await Me.json();if(!Me.ok){re("error","Failed to Sync Workspaces",De.message||De.error),Zi(!1);return}for(const R of ve){const J=Tt.find(Fn=>Fn.id===R),oe=ue[R];J&&oe&&oe!==J.path&&await fetch(`/api/organizations/${x}/workspaces/${R}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:oe})})}}const M=new Set(ve),F=Tt.filter(Me=>Me.syncedLocally&&!M.has(Me.id));for(const Me of F)await fetch(`/api/organizations/${x}/workspaces/${Me.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})});await pn();const U=ve.size,B=F.length;let V="";U>0&&B>0?V=`Saved ${U} workspace(s) and disabled ${B} workspace(s)`:U>0?V=`Saved ${U} workspace(s)`:B>0?V=`Disabled ${B} workspace(s)`:V="No changes made",re("success","Workspaces Updated",V),Pt(null)}catch(M){console.error("Failed to save workspaces:",M),re("error","Network Error","Failed to save workspaces. Please try again.")}finally{Zi(!1)}},Bp=async x=>{x.preventDefault();try{const M=a.basePath.endsWith("/")?`${a.basePath}graphql`:`${a.basePath}/graphql`,F={name:a.name,apiUrl:M,apiKey:a.apiKey},U=await fetch("/api/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),B=await U.json();U.ok?(await xs(),i(!1),l({name:"",basePath:"",apiKey:""}),eo(),re("success","Organization Added",`Successfully added "${a.name}"`)):re("error","Failed to Add Organization",B.message||B.error)}catch(M){console.error("Failed to add organization:",M),re("error","Network Error","Failed to connect to server. Please try again.")}},Hp=async x=>{if(confirm("Are you sure you want to delete this organization?"))try{const M=await fetch(`/api/organizations/${x}`,{method:"DELETE"}),F=await M.json();M.ok?(await xs(),re("success","Organization Deleted",F.message||"Organization deleted successfully")):re("error","Failed to Delete Organization",F.message||F.error)}catch(M){console.error("Failed to delete organization:",M),re("error","Network Error","Failed to delete organization. Please try again.")}};return o.jsxs(o.Fragment,{children:[o.jsx(Nn,{children:o.jsx("title",{children:"Organizations - AI Agent Service"})}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Organizations"}),o.jsx("p",{className:"text-muted-foreground",children:"Manage Task Shepherd organizations and API connections"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(At,{className:"h-4 w-4"}),o.jsxs("span",{children:["Last updated: ",new Date(C).toLocaleTimeString()]})]}),o.jsxs("button",{onClick:pn,disabled:n,className:"inline-flex items-center px-3 py-2 text-sm text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50",children:[o.jsx(gn,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Refresh"]}),o.jsxs("button",{onClick:()=>{i(!0)},className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:[o.jsx(ri,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]})]}),u.filter(x=>!(x.type==="success"&&x.title==="Connection Test")).length>0&&o.jsx("div",{className:"space-y-2",children:u.filter(x=>!(x.type==="success"&&x.title==="Connection Test")).map(x=>o.jsxs("div",{className:`flex items-start justify-between p-3 rounded-md border text-sm ${x.type==="error"?"border-red-200 bg-red-50 text-red-800":"border-green-200 bg-green-50 text-green-800"}`,children:[o.jsxs("div",{className:"flex items-start space-x-2",children:[x.type==="error"?o.jsx(Nt,{className:"h-4 w-4 text-red-600 mt-0.5 flex-shrink-0"}):o.jsx(Sn,{className:"h-4 w-4 text-green-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:x.title}),o.jsx("p",{className:"opacity-90",children:x.message}),x.type==="error"&&o.jsx("p",{className:"text-xs mt-1 opacity-75",children:"Check your API URL format and ensure the Agent API key is valid for this organization."})]})]}),o.jsx("button",{onClick:()=>Pp(x.id),className:"text-current opacity-60 hover:opacity-100 transition-opacity ml-2",children:o.jsx(qr,{className:"h-3 w-3"})})]},x.id))}),!n&&e&&o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(Nt,{className:`h-5 w-5 ${e.setupCompleted?"text-green-600":"text-yellow-600"}`}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium",children:e.setupCompleted?"Setup Complete":"Setup Required"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e.setupCompleted?`You have ${e.organizations.length} organization(s) configured.`:"Add your first organization to get started with Task Shepherd integration."})]})]})}),s&&o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Add New Organization"}),o.jsxs("form",{onSubmit:Bp,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"name",className:"block text-sm font-medium mb-2",children:"Organization Name"}),o.jsx("input",{type:"text",id:"name",value:a.name,onChange:x=>l({...a,name:x.target.value}),onFocus:to,onBlur:no,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"e.g. My Company",required:!0}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"A friendly name to identify this Task Shepherd instance"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"basePath",className:"block text-sm font-medium mb-2",children:"API Base Path"}),o.jsx("input",{type:"url",id:"basePath",value:a.basePath,onChange:x=>l({...a,basePath:x.target.value}),onFocus:to,onBlur:no,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://myorg.taskshepherd.com/api",required:!0}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Base API path (GraphQL will be appended automatically: /api → /api/graphql)"}),a.basePath&&o.jsxs("p",{className:"text-xs text-blue-600 mt-1",children:["GraphQL URL will be: ",o.jsx("code",{children:a.basePath.endsWith("/")?`${a.basePath}graphql`:`${a.basePath}/graphql`})]})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"apiKey",className:"block text-sm font-medium mb-2",children:"Agent API Key"}),o.jsx("input",{type:"password",id:"apiKey",value:a.apiKey,onChange:x=>l({...a,apiKey:x.target.value}),onFocus:to,onBlur:no,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"tks_agent_...",required:!0}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Generate an ",o.jsx("strong",{children:"Agent API key"})," from your Task Shepherd organization settings → API Keys → Create Agent Key"]})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[o.jsx("button",{type:"button",onClick:()=>{i(!1),l({name:"",basePath:"",apiKey:""}),c([])},className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Add Organization"})]})]})]}),n?o.jsx("div",{className:"text-center py-12",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading organizations..."})}):(e==null?void 0:e.organizations.length)===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx(Ba,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Organizations Configured"}),o.jsx("p",{className:"text-muted-foreground mb-4",children:"Add your first organization to start using the AI Agent Service with Task Shepherd."}),o.jsxs("button",{onClick:()=>{i(!0)},className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:[o.jsx(ri,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]}):o.jsx("div",{className:"grid gap-4",children:e==null?void 0:e.organizations.map(x=>{var B,V,Me,De;const M=((B=x.workerRegistration)==null?void 0:B.registered)||!1,F=((V=x.workerRegistration)==null?void 0:V.lastHeartbeat)||x.createdAt,U=(Me=x.workerRegistration)!=null&&Me.lastHeartbeat?"Last heartbeat":"Created";return o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex-1",children:O===x.id?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:we.name||"",onChange:R=>qe({...we,name:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API URL"}),o.jsx("input",{type:"text",value:we.apiUrl||"",onChange:R=>qe({...we,apiUrl:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API Key"}),o.jsx("input",{type:"password",value:we.apiKey||"",onChange:R=>qe({...we,apiKey:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Leave empty to keep current key"})]}),o.jsxs("div",{className:"flex items-center",children:[o.jsx("input",{type:"checkbox",id:`enabled-${x.id}`,checked:we.enabled??x.enabled,onChange:R=>qe({...we,enabled:R.target.checked}),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),o.jsx("label",{htmlFor:`enabled-${x.id}`,className:"ml-2 block text-sm text-gray-700",children:"Enabled"})]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:()=>$p(x.id),disabled:Se,className:"inline-flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:[Se&&o.jsx(or,{className:"h-4 w-4 animate-spin"}),Se?"Saving...":"Save"]}),o.jsx("button",{onClick:Dp,disabled:Se,className:"px-3 py-1.5 bg-gray-200 text-gray-700 text-sm rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h3",{className:"font-medium",children:x.name}),o.jsxs("div",{className:`flex items-center gap-1 text-sm ${M?"text-green-600":"text-yellow-600"}`,children:[o.jsx("div",{className:`w-2 h-2 rounded-full ${M?"bg-green-600 animate-pulse":"bg-yellow-600"}`}),M?"Connected":"Not Connected"]})]}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:x.apiUrl}),F&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[U,": ",new Date(F).toLocaleString()]})]})}),O!==x.id&&o.jsx("div",{className:"flex items-start",children:o.jsx("button",{onClick:()=>Ip(x),className:"p-2 text-gray-500 hover:text-blue-600 transition-colors",title:"Edit organization",children:o.jsx(Ua,{className:"h-5 w-5"})})})]}),o.jsx("div",{className:"mt-4",children:!O&&o.jsxs(o.Fragment,{children:[M&&x.workerRegistration&&o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(By,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-sm font-medium",children:"Worker Details"})]}),o.jsxs("div",{className:"space-y-1",children:[x.workerRegistration.workerId&&o.jsxs("p",{className:"text-xs text-gray-600",children:["Worker ID: ",o.jsx("code",{className:"text-xs font-mono bg-gray-100 px-1 rounded",children:x.workerRegistration.workerId})]}),x.workerRegistration.capabilities&&x.workerRegistration.capabilities.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:x.workerRegistration.capabilities.map(R=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs bg-blue-100 text-blue-700 rounded",children:[o.jsx(jp,{className:"h-3 w-3"}),R.replace("_"," ").toLowerCase()]},R))})]})]}),M&&o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("button",{onClick:()=>Tp(x.id),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:[d.has(x.id)?o.jsx(Pc,{className:"h-4 w-4"}):o.jsx(Tc,{className:"h-4 w-4"}),o.jsx(Fy,{className:"h-4 w-4 text-gray-500"}),o.jsxs("span",{className:"text-sm font-medium",children:["Workspaces ",x.workspaceCount!==void 0&&`(${x.workspaceCount})`]})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("button",{onClick:()=>Up(x.id),className:"inline-flex items-center px-2 py-1 text-xs text-blue-600 border border-blue-200 rounded-md hover:bg-blue-50",children:[o.jsx(Ba,{className:"h-3 w-3 mr-1"}),"Manage"]})})]}),d.has(x.id)&&o.jsxs("div",{className:"mt-2 space-y-2",children:[p.has(x.id)?o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"Loading workspaces..."}):x.workspaces&&x.workspaces.length>0?x.workspaces.map(R=>o.jsxs("div",{className:"bg-gray-50 p-3 rounded-md",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsx("div",{className:"flex-1",children:W===R.id?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:D.name||"",onChange:J=>ee({...D,name:J.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Path"}),o.jsx("input",{type:"text",value:D.path||"",onChange:J=>ee({...D,path:J.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:D.description||"",onChange:J=>ee({...D,description:J.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",o.jsx("code",{className:"font-mono",children:R.id})]})]}):o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h4",{className:"text-sm font-medium",children:R.name}),o.jsx("span",{className:`px-1.5 py-0.5 text-xs rounded ${R.isActive?"bg-green-100 text-green-700":"bg-gray-200 text-gray-600"}`,children:R.isActive?"Active":"Inactive"})]}),R.description&&o.jsx("p",{className:"text-xs text-gray-600 mt-1",children:R.description}),o.jsxs("div",{className:"mt-1 space-y-0.5",children:[o.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",o.jsx("code",{className:"font-mono",children:R.id})]}),o.jsxs("p",{className:"text-xs text-gray-500",children:["Path: ",o.jsx("code",{className:"font-mono",children:R.path})]}),R.projectCount!==void 0&&o.jsxs("p",{className:"text-xs text-gray-500",children:["Projects: ",R.projectCount]})]})]})}),o.jsx("div",{className:"flex items-center gap-1",children:o.jsx("button",{onClick:()=>zp(x.id,R.id,{isActive:!R.isActive}),className:`p-1 transition-colors ${R.isActive?"text-green-500 hover:text-red-600":"text-gray-400 hover:text-green-600"}`,title:R.isActive?"Deactivate workspace":"Activate workspace",children:R.isActive?o.jsx(Uy,{className:"h-3 w-3"}):o.jsx($y,{className:"h-3 w-3"})})})]}),o.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1",children:[o.jsxs("button",{onClick:()=>{const J=`${x.id}-${R.id}`,oe=new Set(P);oe.has(J)?oe.delete(J):oe.add(J),S(oe)},className:"flex items-center gap-1 text-xs text-gray-600 hover:text-blue-600",children:[P.has(`${x.id}-${R.id}`)?o.jsx(Pc,{className:"h-3 w-3"}):o.jsx(Tc,{className:"h-3 w-3"}),"Services ",R.services?`(${R.services.length})`:"(0)"]}),o.jsx("button",{onClick:()=>{A({orgId:x.id,workspaceId:R.id})},className:"text-xs text-green-600 hover:text-green-700",children:o.jsx(ri,{className:"h-3 w-3"})})]}),P.has(`${x.id}-${R.id}`)&&o.jsx("div",{className:"space-y-1 ml-4",children:R.services&&R.services.length>0?R.services.map(J=>o.jsx("div",{className:"bg-white p-2 rounded border",children:Y===J.id?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:q.name||"",onChange:oe=>X({...q,name:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),o.jsxs("select",{value:q.type||"backend",onChange:oe=>X({...q,type:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),o.jsx("input",{type:"text",value:q.technology||"",onChange:oe=>X({...q,technology:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"e.g., Node.js, Python"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:q.port||"",onChange:oe=>X({...q,port:oe.target.value?parseInt(oe.target.value):void 0}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"3000"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"URL"}),o.jsx("input",{type:"url",value:q.url||"",onChange:oe=>X({...q,url:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"http://localhost:3000"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:q.description||"",onChange:oe=>X({...q,description:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("div",{className:"flex items-center justify-end gap-1 pt-1",children:[o.jsx("button",{onClick:()=>Mp(x.id,R.id,J.id),className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:o.jsx(Wa,{className:"h-3 w-3"})}),o.jsx("button",{onClick:Rp,className:"px-2 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:o.jsx(qr,{className:"h-3 w-3"})})]})]}):o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o.jsx("span",{className:"font-medium",children:J.name}),o.jsxs("span",{className:"text-gray-500",children:["(",J.type,")"]}),J.port&&o.jsxs("span",{className:"text-gray-400",children:[":",J.port]}),J.technology&&o.jsx("span",{className:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",children:J.technology}),J.description&&o.jsxs("span",{className:"text-gray-400 italic",children:["- ",J.description]})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{onClick:()=>Ap(J),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:o.jsx(Ua,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>_p(x.id,R.id,J.id,J.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:o.jsx(Ha,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>Fp(x.id,R.id,J.id,!J.isActive),className:`px-1.5 py-0.5 rounded text-xs ${J.isActive?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:J.isActive?"Active":"Inactive"})]})]})},J.id)):o.jsx("div",{className:"text-xs text-gray-500",children:"No services configured"})})]})]},R.id)):o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:'No workspaces configured. Click "Manage" to import from Task Shepherd.'}),(j==null?void 0:j.orgId)===x.id&&((De=x.workspaces)==null?void 0:De.some(R=>R.id===j.workspaceId))&&o.jsxs("div",{className:"bg-green-50 p-3 rounded-md border border-green-200",children:[o.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Service"}),o.jsxs("form",{onSubmit:R=>Lp(R,j.orgId,j.workspaceId),className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{type:"text",placeholder:"Service Name",value:z.name,onChange:R=>Q({...z,name:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500",required:!0}),o.jsxs("select",{value:z.type,onChange:R=>Q({...z,type:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500",required:!0,children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[o.jsx("input",{type:"number",placeholder:"Port",value:z.port,onChange:R=>Q({...z,port:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsx("input",{type:"text",placeholder:"Technology (e.g., Node.js)",value:z.technology,onChange:R=>Q({...z,technology:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsx("input",{type:"url",placeholder:"URL (optional)",value:z.url,onChange:R=>Q({...z,url:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"})]}),o.jsx("input",{type:"text",placeholder:"Description (optional)",value:z.description,onChange:R=>Q({...z,description:R.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsxs("div",{className:"flex justify-end gap-1",children:[o.jsx("button",{type:"button",onClick:()=>{A(null),Q({name:"",type:"backend",port:"",url:"",technology:"",description:""})},className:"px-2 py-1 text-xs text-gray-600 border border-gray-300 rounded hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:"Add Service"})]})]})]}),v===x.id&&o.jsxs("div",{className:"bg-blue-50 p-3 rounded-md border border-blue-200",children:[o.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Workspace"}),o.jsxs("form",{onSubmit:R=>Op(R,x.id),className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{type:"text",placeholder:"Workspace Name",value:b.name,onChange:R=>E({...b,name:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0}),o.jsx("input",{type:"text",placeholder:"Workspace ID",value:b.id,onChange:R=>E({...b,id:R.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0})]}),o.jsx("input",{type:"text",placeholder:"Path (e.g., /home/user/projects/workspace)",value:b.path,onChange:R=>E({...b,path:R.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0}),o.jsx("input",{type:"text",placeholder:"Description (optional)",value:b.description,onChange:R=>E({...b,description:R.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),o.jsxs("div",{className:"flex justify-end gap-1",children:[o.jsx("button",{type:"button",onClick:()=>{w(null),E({name:"",id:"",path:"",description:""})},className:"px-2 py-1 text-xs text-gray-600 border border-gray-300 rounded hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700",children:"Add Workspace"})]})]})]})]})]})]})}),o.jsx("div",{className:"flex items-center gap-2 mt-4",children:x.id!=="default"&&o.jsxs("button",{onClick:()=>Hp(x.id),className:"inline-flex items-center px-3 py-1 text-sm text-red-600 border border-red-200 rounded-md hover:bg-red-50",children:[o.jsx(Ha,{className:"h-3 w-3 mr-1"}),"Delete"]})})]},x.id)})}),k&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:o.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:o.jsx(Pv,{organizationId:k,onComplete:x=>{var F;if(e){const U=e.organizations.map(B=>{if(B.id===k){const V=[...B.workspaces||[],x];return{...B,workspaces:V,workspaceCount:V.length}}return B});t({...e,organizations:U})}m(null);const M=((F=x.services)==null?void 0:F.length)||0;re("success","Workspace Created",`Successfully created workspace "${x.name}" with ${M} service(s) using wizard`)},onCancel:()=>{m(null)}})})}),h&&o.jsx(Tv,{organizationId:h.orgId,workspace:h.workspace,onClose:()=>{g(null)},onApplyChanges:async x=>{console.log("🔧 Applying workspace analysis changes:",x);try{const M=await fetch(`/api/organizations/${h.orgId}/workspaces/${h.workspace.id}/apply-improvements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({improvements:x})}),F=await M.json();if(M.ok&&F.success)re("success","Changes Applied",`Applied ${x.length} improvement(s) to workspace "${h.workspace.name}"`),await pn();else throw new Error(F.error||"Failed to apply changes")}catch(M){console.error("Failed to apply workspace changes:",M),re("error","Failed to Apply Changes",M instanceof Error?M.message:"Failed to apply workspace improvements")}}}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"rounded-lg border bg-green-50 p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Getting Your Task Shepherd API Information"}),o.jsxs("div",{className:"space-y-3 text-sm text-green-900",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Step 1:"})," Open your Task Shepherd frontend in a browser"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Step 2:"})," Copy the URL up to ",o.jsx("code",{children:"/api"})]}),o.jsxs("div",{className:"bg-green-100 p-3 rounded-md font-mono text-xs",children:[o.jsx("p",{children:o.jsx("strong",{children:"Example:"})}),o.jsxs("p",{children:["• Frontend URL: ",o.jsx("code",{children:"https://myorg.taskshepherd.com"})]}),o.jsxs("p",{children:["• API Base Path: ",o.jsx("code",{children:"https://myorg.taskshepherd.com/api"})]})]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Step 3:"})," Generate an ",o.jsx("strong",{children:"Agent API key"})," from Organization Settings → API Keys → Create Agent Key"]})]})]}),vs&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:o.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-4xl w-full max-h-[90vh] overflow-y-auto m-4",children:[o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsx("h2",{className:"text-xl font-semibold",children:"Manage Workspaces"}),o.jsx("button",{onClick:()=>Pt(null),className:"text-gray-500 hover:text-gray-700",children:o.jsx(qr,{className:"h-5 w-5"})})]}),ct?o.jsxs("div",{className:"flex items-center justify-center py-12",children:[o.jsx(or,{className:"h-8 w-8 animate-spin text-blue-600"}),o.jsx("span",{className:"ml-2 text-gray-600",children:"Loading available workspaces..."})]}):o.jsxs("div",{className:"space-y-4",children:[o.jsx("p",{className:"text-sm text-gray-600",children:"Select workspaces to sync from Task Shepherd and configure local paths for each."}),Tt.length===0?o.jsx("div",{className:"text-center py-8 text-gray-500",children:"No workspaces available in this organization"}):o.jsxs("div",{className:"space-y-4",children:[Tt.filter(x=>x.isActive!==!1).length>0&&o.jsx("div",{className:"space-y-2",children:Tt.filter(x=>x.isActive!==!1).map(x=>o.jsx("div",{className:`border rounded-lg p-4 ${ve.has(x.id)?"border-blue-500 bg-blue-50":"border-gray-200"}`,children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("input",{type:"checkbox",checked:ve.has(x.id),onChange:M=>{const F=new Set(ve);M.target.checked?F.add(x.id):F.delete(x.id),H(F)},className:"mt-1"}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium",children:x.name}),x.description&&o.jsx("p",{className:"text-sm text-gray-600",children:x.description})]}),x.syncedLocally&&o.jsx("span",{className:"text-xs px-2 py-1 bg-green-100 text-green-700 rounded",children:"Already Synced"})]}),o.jsxs("div",{className:"mt-2",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Local Path"}),o.jsx("input",{type:"text",value:ue[x.id]||"",onChange:M=>{Ce({...ue,[x.id]:M.target.value})},placeholder:x.path||"Enter local directory path",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm",disabled:!ve.has(x.id)}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Suggested path: ",x.path||"Not specified"]})]}),x.projectCount!==void 0&&o.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[x.projectCount," project(s)"]})]})]})},x.id))}),Tt.filter(x=>x.isActive===!1).length>0&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-500",children:"Inactive Workspaces"}),Tt.filter(x=>x.isActive===!1).map(x=>o.jsx("div",{className:`border rounded-lg p-4 opacity-60 ${ve.has(x.id)?"border-blue-500 bg-blue-50":"border-gray-200"}`,children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("input",{type:"checkbox",checked:ve.has(x.id),onChange:M=>{const F=new Set(ve);M.target.checked?F.add(x.id):F.delete(x.id),H(F)},className:"mt-1"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"flex items-center justify-between mb-2",children:o.jsxs("div",{children:[o.jsxs("h3",{className:"font-medium flex items-center gap-2",children:[x.name,o.jsx("span",{className:"text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded",children:"Inactive"})]}),x.description&&o.jsx("p",{className:"text-sm text-gray-600",children:x.description})]})}),o.jsxs("div",{className:"mt-2",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Local Path"}),o.jsx("input",{type:"text",value:ue[x.id]||"",onChange:M=>{Ce({...ue,[x.id]:M.target.value})},placeholder:x.path||"Enter local directory path",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm",disabled:!ve.has(x.id)}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Suggested path: ",x.path||"Not specified"]})]}),x.projectCount!==void 0&&o.jsxs("p",{className:"text-sm text-gray-600 mt-2",children:[x.projectCount," project(s)"]})]})]})},x.id))]})]}),o.jsxs("div",{className:"flex justify-end gap-2 mt-6 pt-4 border-t",children:[o.jsx("button",{onClick:()=>Pt(null),className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:Ln,children:"Cancel"}),o.jsx("button",{onClick:()=>Wp(vs),disabled:Ln,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:Ln?o.jsxs(o.Fragment,{children:[o.jsx(or,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Wa,{className:"h-4 w-4"}),"Save"]})})]})]})]})}),o.jsxs("div",{className:"rounded-lg border bg-blue-50 p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"About Organization & Workspace Management"}),o.jsxs("div",{className:"space-y-2 text-sm text-blue-900",children:[o.jsxs("p",{children:["• ",o.jsx("strong",{children:"Organizations"})," represent different Task Shepherd instances you want to connect to"]}),o.jsxs("p",{children:["• Each organization needs an ",o.jsx("strong",{children:"Agent API key"})," (not a user API key) generated from the Task Shepherd organization settings"]}),o.jsxs("p",{children:["• ",o.jsx("strong",{children:"Workspaces"})," are collections of related projects within an organization"]}),o.jsxs("p",{children:["• Click ",o.jsx("strong",{children:"Manage"})," to select and sync workspaces from Task Shepherd with custom local paths"]}),o.jsx("p",{children:"• You can activate/deactivate workspaces to control which ones the agent works with"}),o.jsx("p",{children:"• The agent will automatically sync workspaces and accept work assignments from configured organizations"})]})]})]})]})]})}function zv(){return o.jsxs(o.Fragment,{children:[o.jsx(Nn,{children:o.jsx("title",{children:"404 - Page Not Found"})}),o.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:o.jsxs("div",{className:"space-y-4",children:[o.jsx("h1",{className:"text-4xl font-bold",children:"404"}),o.jsx("h2",{className:"text-xl text-muted-foreground",children:"Page Not Found"}),o.jsx("p",{className:"text-muted-foreground max-w-md",children:"The page you're looking for doesn't exist or has been moved."}),o.jsxs(ap,{to:"/",className:"inline-flex items-center space-x-2 rounded-lg bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90",children:[o.jsx(wp,{className:"h-4 w-4"}),o.jsx("span",{children:"Go Home"})]})]})})]})}function Av(){return o.jsxs(o.Fragment,{children:[o.jsxs(Nn,{children:[o.jsx("title",{children:"AI Agent Service Dashboard"}),o.jsx("meta",{name:"description",content:"Analytics dashboard for AI agent service monitoring"})]}),o.jsx(bv,{children:o.jsxs(c0,{children:[o.jsx(ei,{path:"/",element:o.jsx(Ev,{})}),o.jsx(ei,{path:"/organizations",element:o.jsx(Ov,{})}),o.jsx(ei,{path:"*",element:o.jsx(zv,{})})]})})]})}const Rv=new I0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:1e3*60*5}}});Io.createRoot(document.getElementById("root")).render(o.jsx(_.StrictMode,{children:o.jsx(Jn,{children:o.jsx(U0,{client:Rv,children:o.jsxs(y0,{children:[o.jsx(Av,{}),o.jsx(Ay,{position:"top-right"})]})})})}));
69
+ //# sourceMappingURL=index-97f67174.js.map