@mem-weave/server 0.3.1 → 0.3.2
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.
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var rd=e=>{throw TypeError(e)};var Ka=(e,t,n)=>t.has(e)||rd("Cannot "+n);var y=(e,t,n)=>(Ka(e,t,"read from private field"),n?n.call(e):t.get(e)),Q=(e,t,n)=>t.has(e)?rd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),I=(e,t,n,r)=>(Ka(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),G=(e,t,n)=>(Ka(e,t,"access private method"),n);var ll=(e,t,n,r)=>({set _(i){I(e,t,i,n)},get _(){return y(e,t,r)}});function ch(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function dh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fh={exports:{}},_a={},hh={exports:{}},J={};/**
|
|
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 Ks=Symbol.for("react.element"),Pg=Symbol.for("react.portal"),Sg=Symbol.for("react.fragment"),jg=Symbol.for("react.strict_mode"),Cg=Symbol.for("react.profiler"),Eg=Symbol.for("react.provider"),kg=Symbol.for("react.context"),Ng=Symbol.for("react.forward_ref"),Rg=Symbol.for("react.suspense"),Tg=Symbol.for("react.memo"),Dg=Symbol.for("react.lazy"),id=Symbol.iterator;function Lg(e){return e===null||typeof e!="object"?null:(e=id&&e[id]||e["@@iterator"],typeof e=="function"?e:null)}var ph={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mh=Object.assign,gh={};function zi(e,t,n){this.props=e,this.context=t,this.refs=gh,this.updater=n||ph}zi.prototype.isReactComponent={};zi.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")};zi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function vh(){}vh.prototype=zi.prototype;function Iu(e,t,n){this.props=e,this.context=t,this.refs=gh,this.updater=n||ph}var zu=Iu.prototype=new vh;zu.constructor=Iu;mh(zu,zi.prototype);zu.isPureReactComponent=!0;var sd=Array.isArray,yh=Object.prototype.hasOwnProperty,Au={current:null},xh={key:!0,ref:!0,__self:!0,__source:!0};function _h(e,t,n){var r,i={},s=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(s=""+t.key),t)yh.call(t,r)&&!xh.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),c=0;c<a;c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Ks,type:e,key:s,ref:l,props:i,_owner:Au.current}}function Mg(e,t){return{$$typeof:Ks,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Uu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ks}function Fg(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ld=/\/+/g;function Wa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Fg(""+e.key):t.toString(36)}function Rl(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Ks:case Pg:l=!0}}if(l)return l=e,i=i(l),e=r===""?"."+Wa(l,0):r,sd(i)?(n="",e!=null&&(n=e.replace(ld,"$&/")+"/"),Rl(i,t,n,"",function(c){return c})):i!=null&&(Uu(i)&&(i=Mg(i,n+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(ld,"$&/")+"/")+e)),t.push(i)),1;if(l=0,r=r===""?".":r+":",sd(e))for(var a=0;a<e.length;a++){s=e[a];var o=r+Wa(s,a);l+=Rl(s,t,n,o,i)}else if(o=Lg(e),typeof o=="function")for(e=o.call(e),a=0;!(s=e.next()).done;)s=s.value,o=r+Wa(s,a++),l+=Rl(s,t,n,o,i);else if(s==="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 l}function al(e,t,n){if(e==null)return e;var r=[],i=0;return Rl(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Og(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 at={current:null},Tl={transition:null},Ig={ReactCurrentDispatcher:at,ReactCurrentBatchConfig:Tl,ReactCurrentOwner:Au};function wh(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:al,forEach:function(e,t,n){al(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return al(e,function(){t++}),t},toArray:function(e){return al(e,function(t){return t})||[]},only:function(e){if(!Uu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=zi;J.Fragment=Sg;J.Profiler=Cg;J.PureComponent=Iu;J.StrictMode=jg;J.Suspense=Rg;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ig;J.act=wh;J.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=mh({},e.props),i=e.key,s=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,l=Au.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(o in t)yh.call(t,o)&&!xh.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&a!==void 0?a[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){a=Array(o);for(var c=0;c<o;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ks,type:e.type,key:i,ref:s,props:r,_owner:l}};J.createContext=function(e){return e={$$typeof:kg,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Eg,_context:e},e.Consumer=e};J.createElement=_h;J.createFactory=function(e){var t=_h.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:Ng,render:e}};J.isValidElement=Uu;J.lazy=function(e){return{$$typeof:Dg,_payload:{_status:-1,_result:e},_init:Og}};J.memo=function(e,t){return{$$typeof:Tg,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=Tl.transition;Tl.transition={};try{e()}finally{Tl.transition=t}};J.unstable_act=wh;J.useCallback=function(e,t){return at.current.useCallback(e,t)};J.useContext=function(e){return at.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return at.current.useDeferredValue(e)};J.useEffect=function(e,t){return at.current.useEffect(e,t)};J.useId=function(){return at.current.useId()};J.useImperativeHandle=function(e,t,n){return at.current.useImperativeHandle(e,t,n)};J.useInsertionEffect=function(e,t){return at.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return at.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return at.current.useMemo(e,t)};J.useReducer=function(e,t,n){return at.current.useReducer(e,t,n)};J.useRef=function(e){return at.current.useRef(e)};J.useState=function(e){return at.current.useState(e)};J.useSyncExternalStore=function(e,t,n){return at.current.useSyncExternalStore(e,t,n)};J.useTransition=function(){return at.current.useTransition()};J.version="18.3.1";hh.exports=J;var C=hh.exports;const zg=dh(C),Ag=ch({__proto__:null,default:zg},[C]);/**
|
|
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 Ug=C,$g=Symbol.for("react.element"),bg=Symbol.for("react.fragment"),Bg=Object.prototype.hasOwnProperty,Qg=Ug.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Hg={key:!0,ref:!0,__self:!0,__source:!0};function Ph(e,t,n){var r,i={},s=null,l=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Bg.call(t,r)&&!Hg.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:$g,type:e,key:s,ref:l,props:i,_owner:Qg.current}}_a.Fragment=bg;_a.jsx=Ph;_a.jsxs=Ph;fh.exports=_a;var u=fh.exports,Sh={exports:{}},Ct={},jh={exports:{}},Ch={};/**
|
|
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(F,V){var W=F.length;F.push(V);e:for(;0<W;){var he=W-1>>>1,pe=F[he];if(0<i(pe,V))F[he]=V,F[W]=pe,W=he;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var V=F[0],W=F.pop();if(W!==V){F[0]=W;e:for(var he=0,pe=F.length,It=pe>>>1;he<It;){var vt=2*(he+1)-1,Ze=F[vt],et=vt+1,kt=F[et];if(0>i(Ze,W))et<pe&&0>i(kt,Ze)?(F[he]=kt,F[et]=W,he=et):(F[he]=Ze,F[vt]=W,he=vt);else if(et<pe&&0>i(kt,W))F[he]=kt,F[et]=W,he=et;else break e}}return V}function i(F,V){var W=F.sortIndex-V.sortIndex;return W!==0?W:F.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,a=l.now();e.unstable_now=function(){return l.now()-a}}var o=[],c=[],d=1,f=null,h=3,g=!1,x=!1,P=!1,k=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(F){for(var V=n(c);V!==null;){if(V.callback===null)r(c);else if(V.startTime<=F)r(c),V.sortIndex=V.expirationTime,t(o,V);else break;V=n(c)}}function S(F){if(P=!1,v(F),!x)if(n(o)!==null)x=!0,En(R);else{var V=n(c);V!==null&&kn(S,V.startTime-F)}}function R(F,V){x=!1,P&&(P=!1,m(N),N=-1),g=!0;var W=h;try{for(v(V),f=n(o);f!==null&&(!(f.expirationTime>V)||F&&!Y());){var he=f.callback;if(typeof he=="function"){f.callback=null,h=f.priorityLevel;var pe=he(f.expirationTime<=V);V=e.unstable_now(),typeof pe=="function"?f.callback=pe:f===n(o)&&r(o),v(V)}else r(o);f=n(o)}if(f!==null)var It=!0;else{var vt=n(c);vt!==null&&kn(S,vt.startTime-V),It=!1}return It}finally{f=null,h=W,g=!1}}var M=!1,w=null,N=-1,z=5,L=-1;function Y(){return!(e.unstable_now()-L<z)}function le(){if(w!==null){var F=e.unstable_now();L=F;var V=!0;try{V=w(!0,F)}finally{V?Ce():(M=!1,w=null)}}else M=!1}var Ce;if(typeof p=="function")Ce=function(){p(le)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,Ke=Ee.port2;Ee.port1.onmessage=le,Ce=function(){Ke.postMessage(null)}}else Ce=function(){k(le,0)};function En(F){w=F,M||(M=!0,Ce())}function kn(F,V){N=k(function(){F(e.unstable_now())},V)}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(F){F.callback=null},e.unstable_continueExecution=function(){x||g||(x=!0,En(R))},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(F){switch(h){case 1:case 2:case 3:var V=3;break;default:V=h}var W=h;h=V;try{return F()}finally{h=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(F,V){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var W=h;h=F;try{return V()}finally{h=W}},e.unstable_scheduleCallback=function(F,V,W){var he=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?he+W:he):W=he,F){case 1:var pe=-1;break;case 2:pe=250;break;case 5:pe=1073741823;break;case 4:pe=1e4;break;default:pe=5e3}return pe=W+pe,F={id:d++,callback:V,priorityLevel:F,startTime:W,expirationTime:pe,sortIndex:-1},W>he?(F.sortIndex=W,t(c,F),n(o)===null&&F===n(c)&&(P?(m(N),N=-1):P=!0,kn(S,W-he))):(F.sortIndex=pe,t(o,F),x||g||(x=!0,En(R))),F},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(F){var V=h;return function(){var W=h;h=V;try{return F.apply(this,arguments)}finally{h=W}}}})(Ch);jh.exports=Ch;var Vg=jh.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 Kg=C,jt=Vg;function D(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 Eh=new Set,_s={};function Hr(e,t){Ri(e,t),Ri(e+"Capture",t)}function Ri(e,t){for(_s[e]=t,e=0;e<t.length;e++)Eh.add(t[e])}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jo=Object.prototype.hasOwnProperty,Wg=/^[: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]*$/,ad={},od={};function qg(e){return jo.call(od,e)?!0:jo.call(ad,e)?!1:Wg.test(e)?od[e]=!0:(ad[e]=!0,!1)}function Gg(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 Yg(e,t,n,r){if(t===null||typeof t>"u"||Gg(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 ot(e,t,n,r,i,s,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=l}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ve[e]=new ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ve[t]=new ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ve[e]=new ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ve[e]=new ot(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){Ve[e]=new ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ve[e]=new ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ve[e]=new ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ve[e]=new ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ve[e]=new ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var $u=/[\-:]([a-z])/g;function bu(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($u,bu);Ve[t]=new ot(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($u,bu);Ve[t]=new ot(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($u,bu);Ve[t]=new ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ve[e]=new ot(e,1,!1,e.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ve[e]=new ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bu(e,t,n,r){var i=Ve.hasOwnProperty(t)?Ve[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Yg(t,n,i,r)&&(n=null),r||i===null?qg(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jn=Kg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ol=Symbol.for("react.element"),Jr=Symbol.for("react.portal"),Zr=Symbol.for("react.fragment"),Qu=Symbol.for("react.strict_mode"),Co=Symbol.for("react.profiler"),kh=Symbol.for("react.provider"),Nh=Symbol.for("react.context"),Hu=Symbol.for("react.forward_ref"),Eo=Symbol.for("react.suspense"),ko=Symbol.for("react.suspense_list"),Vu=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),Rh=Symbol.for("react.offscreen"),ud=Symbol.iterator;function Ki(e){return e===null||typeof e!="object"?null:(e=ud&&e[ud]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,qa;function ss(e){if(qa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qa=t&&t[1]||""}return`
|
|
34
|
-
`+qa+e}var Ga=!1;function Ya(e,t){if(!e||Ga)return"";Ga=!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 i=c.stack.split(`
|
|
35
|
-
`),s=r.stack.split(`
|
|
36
|
-
`),l=i.length-1,a=s.length-1;1<=l&&0<=a&&i[l]!==s[a];)a--;for(;1<=l&&0<=a;l--,a--)if(i[l]!==s[a]){if(l!==1||a!==1)do if(l--,a--,0>a||i[l]!==s[a]){var o=`
|
|
37
|
-
`+i[l].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=l&&0<=a);break}}}finally{Ga=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function Xg(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=Ya(e.type,!1),e;case 11:return e=Ya(e.type.render,!1),e;case 1:return e=Ya(e.type,!0),e;default:return""}}function No(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 Zr:return"Fragment";case Jr:return"Portal";case Co:return"Profiler";case Qu:return"StrictMode";case Eo:return"Suspense";case ko:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nh:return(e.displayName||"Context")+".Consumer";case kh:return(e._context.displayName||"Context")+".Provider";case Hu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vu:return t=e.displayName||null,t!==null?t:No(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return No(e(t))}catch{}}return null}function Jg(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 No(t);case 8:return t===Qu?"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 sr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Th(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zg(e){var t=Th(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 i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,s.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ul(e){e._valueTracker||(e._valueTracker=Zg(e))}function Dh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Th(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ql(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 Ro(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function cd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sr(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 Lh(e,t){t=t.checked,t!=null&&Bu(e,"checked",t,!1)}function To(e,t){Lh(e,t);var n=sr(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")?Do(e,t.type,n):t.hasOwnProperty("defaultValue")&&Do(e,t.type,sr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dd(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 Do(e,t,n){(t!=="number"||Ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function ci(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+sr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Lo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function fd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ls(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:sr(n)}}function Mh(e,t){var n=sr(t.value),r=sr(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 hd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fh(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 Mo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cl,Oh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cl=cl||document.createElement("div"),cl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ws(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ds={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},ev=["Webkit","ms","Moz","O"];Object.keys(ds).forEach(function(e){ev.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ds[t]=ds[e]})});function Ih(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ds.hasOwnProperty(e)&&ds[e]?(""+t).trim():t+"px"}function zh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ih(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var tv=je({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 Fo(e,t){if(t){if(tv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Oo(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 Io=null;function Ku(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zo=null,di=null,fi=null;function pd(e){if(e=Gs(e)){if(typeof zo!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Ca(t),zo(e.stateNode,e.type,t))}}function Ah(e){di?fi?fi.push(e):fi=[e]:di=e}function Uh(){if(di){var e=di,t=fi;if(fi=di=null,pd(e),t)for(e=0;e<t.length;e++)pd(t[e])}}function $h(e,t){return e(t)}function bh(){}var Xa=!1;function Bh(e,t,n){if(Xa)return e(t,n);Xa=!0;try{return $h(e,t,n)}finally{Xa=!1,(di!==null||fi!==null)&&(bh(),Uh())}}function Ps(e,t){var n=e.stateNode;if(n===null)return null;var r=Ca(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(D(231,t,typeof n));return n}var Ao=!1;if(xn)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){Ao=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{Ao=!1}function nv(e,t,n,r,i,s,l,a,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var fs=!1,Hl=null,Vl=!1,Uo=null,rv={onError:function(e){fs=!0,Hl=e}};function iv(e,t,n,r,i,s,l,a,o){fs=!1,Hl=null,nv.apply(rv,arguments)}function sv(e,t,n,r,i,s,l,a,o){if(iv.apply(this,arguments),fs){if(fs){var c=Hl;fs=!1,Hl=null}else throw Error(D(198));Vl||(Vl=!0,Uo=c)}}function Vr(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 Qh(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 md(e){if(Vr(e)!==e)throw Error(D(188))}function lv(e){var t=e.alternate;if(!t){if(t=Vr(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return md(i),e;if(s===r)return md(i),t;s=s.sibling}throw Error(D(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,a=i.child;a;){if(a===n){l=!0,n=i,r=s;break}if(a===r){l=!0,r=i,n=s;break}a=a.sibling}if(!l){for(a=s.child;a;){if(a===n){l=!0,n=s,r=i;break}if(a===r){l=!0,r=s,n=i;break}a=a.sibling}if(!l)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function Hh(e){return e=lv(e),e!==null?Vh(e):null}function Vh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Vh(e);if(t!==null)return t;e=e.sibling}return null}var Kh=jt.unstable_scheduleCallback,gd=jt.unstable_cancelCallback,av=jt.unstable_shouldYield,ov=jt.unstable_requestPaint,Le=jt.unstable_now,uv=jt.unstable_getCurrentPriorityLevel,Wu=jt.unstable_ImmediatePriority,Wh=jt.unstable_UserBlockingPriority,Kl=jt.unstable_NormalPriority,cv=jt.unstable_LowPriority,qh=jt.unstable_IdlePriority,wa=null,Zt=null;function dv(e){if(Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(wa,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:pv,fv=Math.log,hv=Math.LN2;function pv(e){return e>>>=0,e===0?32:31-(fv(e)/hv|0)|0}var dl=64,fl=4194304;function as(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 Wl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,l=n&268435455;if(l!==0){var a=l&~i;a!==0?r=as(a):(s&=l,s!==0&&(r=as(s)))}else l=n&~i,l!==0?r=as(l):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&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-Qt(t),i=1<<n,r|=e[n],t&=~i;return r}function mv(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 gv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-Qt(s),a=1<<l,o=i[l];o===-1?(!(a&n)||a&r)&&(i[l]=mv(a,t)):o<=t&&(e.expiredLanes|=a),s&=~a}}function $o(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Gh(){var e=dl;return dl<<=1,!(dl&4194240)&&(dl=64),e}function Ja(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ws(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function vv(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 i=31-Qt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function qu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var fe=0;function Yh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xh,Gu,Jh,Zh,ep,bo=!1,hl=[],Yn=null,Xn=null,Jn=null,Ss=new Map,js=new Map,In=[],yv="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 vd(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":Ss.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function qi(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Gs(t),t!==null&&Gu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function xv(e,t,n,r,i){switch(t){case"focusin":return Yn=qi(Yn,e,t,n,r,i),!0;case"dragenter":return Xn=qi(Xn,e,t,n,r,i),!0;case"mouseover":return Jn=qi(Jn,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ss.set(s,qi(Ss.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,js.set(s,qi(js.get(s)||null,e,t,n,r,i)),!0}return!1}function tp(e){var t=_r(e.target);if(t!==null){var n=Vr(t);if(n!==null){if(t=n.tag,t===13){if(t=Qh(n),t!==null){e.blockedOn=t,ep(e.priority,function(){Jh(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 Dl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Io=r,n.target.dispatchEvent(r),Io=null}else return t=Gs(n),t!==null&&Gu(t),e.blockedOn=n,!1;t.shift()}return!0}function yd(e,t,n){Dl(e)&&n.delete(t)}function _v(){bo=!1,Yn!==null&&Dl(Yn)&&(Yn=null),Xn!==null&&Dl(Xn)&&(Xn=null),Jn!==null&&Dl(Jn)&&(Jn=null),Ss.forEach(yd),js.forEach(yd)}function Gi(e,t){e.blockedOn===t&&(e.blockedOn=null,bo||(bo=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,_v)))}function Cs(e){function t(i){return Gi(i,e)}if(0<hl.length){Gi(hl[0],e);for(var n=1;n<hl.length;n++){var r=hl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yn!==null&&Gi(Yn,e),Xn!==null&&Gi(Xn,e),Jn!==null&&Gi(Jn,e),Ss.forEach(t),js.forEach(t),n=0;n<In.length;n++)r=In[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<In.length&&(n=In[0],n.blockedOn===null);)tp(n),n.blockedOn===null&&In.shift()}var hi=jn.ReactCurrentBatchConfig,ql=!0;function wv(e,t,n,r){var i=fe,s=hi.transition;hi.transition=null;try{fe=1,Yu(e,t,n,r)}finally{fe=i,hi.transition=s}}function Pv(e,t,n,r){var i=fe,s=hi.transition;hi.transition=null;try{fe=4,Yu(e,t,n,r)}finally{fe=i,hi.transition=s}}function Yu(e,t,n,r){if(ql){var i=Bo(e,t,n,r);if(i===null)oo(e,t,r,Gl,n),vd(e,r);else if(xv(i,e,t,n,r))r.stopPropagation();else if(vd(e,r),t&4&&-1<yv.indexOf(e)){for(;i!==null;){var s=Gs(i);if(s!==null&&Xh(s),s=Bo(e,t,n,r),s===null&&oo(e,t,r,Gl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else oo(e,t,r,null,n)}}var Gl=null;function Bo(e,t,n,r){if(Gl=null,e=Ku(r),e=_r(e),e!==null)if(t=Vr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Qh(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 Gl=e,null}function np(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(uv()){case Wu:return 1;case Wh:return 4;case Kl:case cv:return 16;case qh:return 536870912;default:return 16}default:return 16}}var Wn=null,Xu=null,Ll=null;function rp(){if(Ll)return Ll;var e,t=Xu,n=t.length,r,i="value"in Wn?Wn.value:Wn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===i[s-r];r++);return Ll=i.slice(e,1<r?1-r:void 0)}function Ml(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 pl(){return!0}function xd(){return!1}function Et(e){function t(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?pl:xd,this.isPropagationStopped=xd,this}return je(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=pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pl)},persist:function(){},isPersistent:pl}),t}var Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ju=Et(Ai),qs=je({},Ai,{view:0,detail:0}),Sv=Et(qs),Za,eo,Yi,Pa=je({},qs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zu,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!==Yi&&(Yi&&e.type==="mousemove"?(Za=e.screenX-Yi.screenX,eo=e.screenY-Yi.screenY):eo=Za=0,Yi=e),Za)},movementY:function(e){return"movementY"in e?e.movementY:eo}}),_d=Et(Pa),jv=je({},Pa,{dataTransfer:0}),Cv=Et(jv),Ev=je({},qs,{relatedTarget:0}),to=Et(Ev),kv=je({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),Nv=Et(kv),Rv=je({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tv=Et(Rv),Dv=je({},Ai,{data:0}),wd=Et(Dv),Lv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mv={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"},Fv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ov(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fv[e])?!!t[e]:!1}function Zu(){return Ov}var Iv=je({},qs,{key:function(e){if(e.key){var t=Lv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zu,charCode:function(e){return e.type==="keypress"?Ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),zv=Et(Iv),Av=je({},Pa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pd=Et(Av),Uv=je({},qs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zu}),$v=Et(Uv),bv=je({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bv=Et(bv),Qv=je({},Pa,{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}),Hv=Et(Qv),Vv=[9,13,27,32],ec=xn&&"CompositionEvent"in window,hs=null;xn&&"documentMode"in document&&(hs=document.documentMode);var Kv=xn&&"TextEvent"in window&&!hs,ip=xn&&(!ec||hs&&8<hs&&11>=hs),Sd=" ",jd=!1;function sp(e,t){switch(e){case"keyup":return Vv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ei=!1;function Wv(e,t){switch(e){case"compositionend":return lp(t);case"keypress":return t.which!==32?null:(jd=!0,Sd);case"textInput":return e=t.data,e===Sd&&jd?null:e;default:return null}}function qv(e,t){if(ei)return e==="compositionend"||!ec&&sp(e,t)?(e=rp(),Ll=Xu=Wn=null,ei=!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 ip&&t.locale!=="ko"?null:t.data;default:return null}}var Gv={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 Cd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gv[e.type]:t==="textarea"}function ap(e,t,n,r){Ah(r),t=Yl(t,"onChange"),0<t.length&&(n=new Ju("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ps=null,Es=null;function Yv(e){yp(e,0)}function Sa(e){var t=ri(e);if(Dh(t))return e}function Xv(e,t){if(e==="change")return t}var op=!1;if(xn){var no;if(xn){var ro="oninput"in document;if(!ro){var Ed=document.createElement("div");Ed.setAttribute("oninput","return;"),ro=typeof Ed.oninput=="function"}no=ro}else no=!1;op=no&&(!document.documentMode||9<document.documentMode)}function kd(){ps&&(ps.detachEvent("onpropertychange",up),Es=ps=null)}function up(e){if(e.propertyName==="value"&&Sa(Es)){var t=[];ap(t,Es,e,Ku(e)),Bh(Yv,t)}}function Jv(e,t,n){e==="focusin"?(kd(),ps=t,Es=n,ps.attachEvent("onpropertychange",up)):e==="focusout"&&kd()}function Zv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sa(Es)}function ey(e,t){if(e==="click")return Sa(t)}function ty(e,t){if(e==="input"||e==="change")return Sa(t)}function ny(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:ny;function ks(e,t){if(Vt(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 i=n[r];if(!jo.call(t,i)||!Vt(e[i],t[i]))return!1}return!0}function Nd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rd(e,t){var n=Nd(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=Nd(n)}}function cp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dp(){for(var e=window,t=Ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ql(e.document)}return t}function tc(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 ry(e){var t=dp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&cp(n.ownerDocument.documentElement,n)){if(r!==null&&tc(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 i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Rd(n,s);var l=Rd(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.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 iy=xn&&"documentMode"in document&&11>=document.documentMode,ti=null,Qo=null,ms=null,Ho=!1;function Td(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ho||ti==null||ti!==Ql(r)||(r=ti,"selectionStart"in r&&tc(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}),ms&&ks(ms,r)||(ms=r,r=Yl(Qo,"onSelect"),0<r.length&&(t=new Ju("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ti)))}function ml(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ni={animationend:ml("Animation","AnimationEnd"),animationiteration:ml("Animation","AnimationIteration"),animationstart:ml("Animation","AnimationStart"),transitionend:ml("Transition","TransitionEnd")},io={},fp={};xn&&(fp=document.createElement("div").style,"AnimationEvent"in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),"TransitionEvent"in window||delete ni.transitionend.transition);function ja(e){if(io[e])return io[e];if(!ni[e])return e;var t=ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in fp)return io[e]=t[n];return e}var hp=ja("animationend"),pp=ja("animationiteration"),mp=ja("animationstart"),gp=ja("transitionend"),vp=new Map,Dd="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 ar(e,t){vp.set(e,t),Hr(t,[e])}for(var so=0;so<Dd.length;so++){var lo=Dd[so],sy=lo.toLowerCase(),ly=lo[0].toUpperCase()+lo.slice(1);ar(sy,"on"+ly)}ar(hp,"onAnimationEnd");ar(pp,"onAnimationIteration");ar(mp,"onAnimationStart");ar("dblclick","onDoubleClick");ar("focusin","onFocus");ar("focusout","onBlur");ar(gp,"onTransitionEnd");Ri("onMouseEnter",["mouseout","mouseover"]);Ri("onMouseLeave",["mouseout","mouseover"]);Ri("onPointerEnter",["pointerout","pointerover"]);Ri("onPointerLeave",["pointerout","pointerover"]);Hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Hr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var os="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(" "),ay=new Set("cancel close invalid load scroll toggle".split(" ").concat(os));function Ld(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,sv(r,t,void 0,e),e.currentTarget=null}function yp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var l=r.length-1;0<=l;l--){var a=r[l],o=a.instance,c=a.currentTarget;if(a=a.listener,o!==s&&i.isPropagationStopped())break e;Ld(i,a,c),s=o}else for(l=0;l<r.length;l++){if(a=r[l],o=a.instance,c=a.currentTarget,a=a.listener,o!==s&&i.isPropagationStopped())break e;Ld(i,a,c),s=o}}}if(Vl)throw e=Uo,Vl=!1,Uo=null,e}function ve(e,t){var n=t[Go];n===void 0&&(n=t[Go]=new Set);var r=e+"__bubble";n.has(r)||(xp(t,e,2,!1),n.add(r))}function ao(e,t,n){var r=0;t&&(r|=4),xp(n,e,r,t)}var gl="_reactListening"+Math.random().toString(36).slice(2);function Ns(e){if(!e[gl]){e[gl]=!0,Eh.forEach(function(n){n!=="selectionchange"&&(ay.has(n)||ao(n,!1,e),ao(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gl]||(t[gl]=!0,ao("selectionchange",!1,t))}}function xp(e,t,n,r){switch(np(t)){case 1:var i=wv;break;case 4:i=Pv;break;default:i=Yu}n=i.bind(null,t,n,e),i=void 0,!Ao||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function oo(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var o=l.tag;if((o===3||o===4)&&(o=l.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;l=l.return}for(;a!==null;){if(l=_r(a),l===null)return;if(o=l.tag,o===5||o===6){r=s=l;continue e}a=a.parentNode}}r=r.return}Bh(function(){var c=s,d=Ku(n),f=[];e:{var h=vp.get(e);if(h!==void 0){var g=Ju,x=e;switch(e){case"keypress":if(Ml(n)===0)break e;case"keydown":case"keyup":g=zv;break;case"focusin":x="focus",g=to;break;case"focusout":x="blur",g=to;break;case"beforeblur":case"afterblur":g=to;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":g=_d;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Cv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=$v;break;case hp:case pp:case mp:g=Nv;break;case gp:g=Bv;break;case"scroll":g=Sv;break;case"wheel":g=Hv;break;case"copy":case"cut":case"paste":g=Tv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Pd}var P=(t&4)!==0,k=!P&&e==="scroll",m=P?h!==null?h+"Capture":null:h;P=[];for(var p=c,v;p!==null;){v=p;var S=v.stateNode;if(v.tag===5&&S!==null&&(v=S,m!==null&&(S=Ps(p,m),S!=null&&P.push(Rs(p,S,v)))),k)break;p=p.return}0<P.length&&(h=new g(h,x,null,n,d),f.push({event:h,listeners:P}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==Io&&(x=n.relatedTarget||n.fromElement)&&(_r(x)||x[_n]))break e;if((g||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,g?(x=n.relatedTarget||n.toElement,g=c,x=x?_r(x):null,x!==null&&(k=Vr(x),x!==k||x.tag!==5&&x.tag!==6)&&(x=null)):(g=null,x=c),g!==x)){if(P=_d,S="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(P=Pd,S="onPointerLeave",m="onPointerEnter",p="pointer"),k=g==null?h:ri(g),v=x==null?h:ri(x),h=new P(S,p+"leave",g,n,d),h.target=k,h.relatedTarget=v,S=null,_r(d)===c&&(P=new P(m,p+"enter",x,n,d),P.target=v,P.relatedTarget=k,S=P),k=S,g&&x)t:{for(P=g,m=x,p=0,v=P;v;v=Yr(v))p++;for(v=0,S=m;S;S=Yr(S))v++;for(;0<p-v;)P=Yr(P),p--;for(;0<v-p;)m=Yr(m),v--;for(;p--;){if(P===m||m!==null&&P===m.alternate)break t;P=Yr(P),m=Yr(m)}P=null}else P=null;g!==null&&Md(f,h,g,P,!1),x!==null&&k!==null&&Md(f,k,x,P,!0)}}e:{if(h=c?ri(c):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var R=Xv;else if(Cd(h))if(op)R=ty;else{R=Zv;var M=Jv}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(R=ey);if(R&&(R=R(e,c))){ap(f,R,n,d);break e}M&&M(e,h,c),e==="focusout"&&(M=h._wrapperState)&&M.controlled&&h.type==="number"&&Do(h,"number",h.value)}switch(M=c?ri(c):window,e){case"focusin":(Cd(M)||M.contentEditable==="true")&&(ti=M,Qo=c,ms=null);break;case"focusout":ms=Qo=ti=null;break;case"mousedown":Ho=!0;break;case"contextmenu":case"mouseup":case"dragend":Ho=!1,Td(f,n,d);break;case"selectionchange":if(iy)break;case"keydown":case"keyup":Td(f,n,d)}var w;if(ec)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ei?sp(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(ip&&n.locale!=="ko"&&(ei||N!=="onCompositionStart"?N==="onCompositionEnd"&&ei&&(w=rp()):(Wn=d,Xu="value"in Wn?Wn.value:Wn.textContent,ei=!0)),M=Yl(c,N),0<M.length&&(N=new wd(N,e,null,n,d),f.push({event:N,listeners:M}),w?N.data=w:(w=lp(n),w!==null&&(N.data=w)))),(w=Kv?Wv(e,n):qv(e,n))&&(c=Yl(c,"onBeforeInput"),0<c.length&&(d=new wd("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=w))}yp(f,t)})}function Rs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Yl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ps(e,n),s!=null&&r.unshift(Rs(e,s,i)),s=Ps(e,t),s!=null&&r.push(Rs(e,s,i))),e=e.return}return r}function Yr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Md(e,t,n,r,i){for(var s=t._reactName,l=[];n!==null&&n!==r;){var a=n,o=a.alternate,c=a.stateNode;if(o!==null&&o===r)break;a.tag===5&&c!==null&&(a=c,i?(o=Ps(n,s),o!=null&&l.unshift(Rs(n,o,a))):i||(o=Ps(n,s),o!=null&&l.push(Rs(n,o,a)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var oy=/\r\n?/g,uy=/\u0000|\uFFFD/g;function Fd(e){return(typeof e=="string"?e:""+e).replace(oy,`
|
|
38
|
-
`).replace(uy,"")}function vl(e,t,n){if(t=Fd(t),Fd(e)!==t&&n)throw Error(D(425))}function Xl(){}var Vo=null,Ko=null;function Wo(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 qo=typeof setTimeout=="function"?setTimeout:void 0,cy=typeof clearTimeout=="function"?clearTimeout:void 0,Od=typeof Promise=="function"?Promise:void 0,dy=typeof queueMicrotask=="function"?queueMicrotask:typeof Od<"u"?function(e){return Od.resolve(null).then(e).catch(fy)}:qo;function fy(e){setTimeout(function(){throw e})}function uo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Cs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Cs(t)}function Zn(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 Id(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 Ui=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Ui,Ts="__reactProps$"+Ui,_n="__reactContainer$"+Ui,Go="__reactEvents$"+Ui,hy="__reactListeners$"+Ui,py="__reactHandles$"+Ui;function _r(e){var t=e[Jt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_n]||n[Jt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Id(e);e!==null;){if(n=e[Jt])return n;e=Id(e)}return t}e=n,n=e.parentNode}return null}function Gs(e){return e=e[Jt]||e[_n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ri(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Ca(e){return e[Ts]||null}var Yo=[],ii=-1;function or(e){return{current:e}}function ye(e){0>ii||(e.current=Yo[ii],Yo[ii]=null,ii--)}function ge(e,t){ii++,Yo[ii]=e.current,e.current=t}var lr={},Je=or(lr),pt=or(!1),Ir=lr;function Ti(e,t){var n=e.type.contextTypes;if(!n)return lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mt(e){return e=e.childContextTypes,e!=null}function Jl(){ye(pt),ye(Je)}function zd(e,t,n){if(Je.current!==lr)throw Error(D(168));ge(Je,t),ge(pt,n)}function _p(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(D(108,Jg(e)||"Unknown",i));return je({},n,r)}function Zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lr,Ir=Je.current,ge(Je,e),ge(pt,pt.current),!0}function Ad(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=_p(e,t,Ir),r.__reactInternalMemoizedMergedChildContext=e,ye(pt),ye(Je),ge(Je,e)):ye(pt),ge(pt,n)}var un=null,Ea=!1,co=!1;function wp(e){un===null?un=[e]:un.push(e)}function my(e){Ea=!0,wp(e)}function ur(){if(!co&&un!==null){co=!0;var e=0,t=fe;try{var n=un;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}un=null,Ea=!1}catch(i){throw un!==null&&(un=un.slice(e+1)),Kh(Wu,ur),i}finally{fe=t,co=!1}}return null}var si=[],li=0,ea=null,ta=0,Rt=[],Tt=0,zr=null,pn=1,mn="";function gr(e,t){si[li++]=ta,si[li++]=ea,ea=e,ta=t}function Pp(e,t,n){Rt[Tt++]=pn,Rt[Tt++]=mn,Rt[Tt++]=zr,zr=e;var r=pn;e=mn;var i=32-Qt(r)-1;r&=~(1<<i),n+=1;var s=32-Qt(t)+i;if(30<s){var l=i-i%5;s=(r&(1<<l)-1).toString(32),r>>=l,i-=l,pn=1<<32-Qt(t)+i|n<<i|r,mn=s+e}else pn=1<<s|n<<i|r,mn=e}function nc(e){e.return!==null&&(gr(e,1),Pp(e,1,0))}function rc(e){for(;e===ea;)ea=si[--li],si[li]=null,ta=si[--li],si[li]=null;for(;e===zr;)zr=Rt[--Tt],Rt[Tt]=null,mn=Rt[--Tt],Rt[Tt]=null,pn=Rt[--Tt],Rt[Tt]=null}var St=null,Pt=null,_e=!1,Bt=null;function Sp(e,t){var n=Dt(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 Ud(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,St=e,Pt=Zn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,St=e,Pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=zr!==null?{id:pn,overflow:mn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,St=e,Pt=null,!0):!1;default:return!1}}function Xo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Jo(e){if(_e){var t=Pt;if(t){var n=t;if(!Ud(e,t)){if(Xo(e))throw Error(D(418));t=Zn(n.nextSibling);var r=St;t&&Ud(e,t)?Sp(r,n):(e.flags=e.flags&-4097|2,_e=!1,St=e)}}else{if(Xo(e))throw Error(D(418));e.flags=e.flags&-4097|2,_e=!1,St=e}}}function $d(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function yl(e){if(e!==St)return!1;if(!_e)return $d(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wo(e.type,e.memoizedProps)),t&&(t=Pt)){if(Xo(e))throw jp(),Error(D(418));for(;t;)Sp(e,t),t=Zn(t.nextSibling)}if($d(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Pt=Zn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Pt=null}}else Pt=St?Zn(e.stateNode.nextSibling):null;return!0}function jp(){for(var e=Pt;e;)e=Zn(e.nextSibling)}function Di(){Pt=St=null,_e=!1}function ic(e){Bt===null?Bt=[e]:Bt.push(e)}var gy=jn.ReactCurrentBatchConfig;function Xi(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(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(l){var a=i.refs;l===null?delete a[s]:a[s]=l},t._stringRef=s,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bd(e){var t=e._init;return t(e._payload)}function Cp(e){function t(m,p){if(e){var v=m.deletions;v===null?(m.deletions=[p],m.flags|=16):v.push(p)}}function n(m,p){if(!e)return null;for(;p!==null;)t(m,p),p=p.sibling;return null}function r(m,p){for(m=new Map;p!==null;)p.key!==null?m.set(p.key,p):m.set(p.index,p),p=p.sibling;return m}function i(m,p){return m=rr(m,p),m.index=0,m.sibling=null,m}function s(m,p,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<p?(m.flags|=2,p):v):(m.flags|=2,p)):(m.flags|=1048576,p)}function l(m){return e&&m.alternate===null&&(m.flags|=2),m}function a(m,p,v,S){return p===null||p.tag!==6?(p=yo(v,m.mode,S),p.return=m,p):(p=i(p,v),p.return=m,p)}function o(m,p,v,S){var R=v.type;return R===Zr?d(m,p,v.props.children,S,v.key):p!==null&&(p.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Fn&&bd(R)===p.type)?(S=i(p,v.props),S.ref=Xi(m,p,v),S.return=m,S):(S=$l(v.type,v.key,v.props,null,m.mode,S),S.ref=Xi(m,p,v),S.return=m,S)}function c(m,p,v,S){return p===null||p.tag!==4||p.stateNode.containerInfo!==v.containerInfo||p.stateNode.implementation!==v.implementation?(p=xo(v,m.mode,S),p.return=m,p):(p=i(p,v.children||[]),p.return=m,p)}function d(m,p,v,S,R){return p===null||p.tag!==7?(p=Or(v,m.mode,S,R),p.return=m,p):(p=i(p,v),p.return=m,p)}function f(m,p,v){if(typeof p=="string"&&p!==""||typeof p=="number")return p=yo(""+p,m.mode,v),p.return=m,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ol:return v=$l(p.type,p.key,p.props,null,m.mode,v),v.ref=Xi(m,null,p),v.return=m,v;case Jr:return p=xo(p,m.mode,v),p.return=m,p;case Fn:var S=p._init;return f(m,S(p._payload),v)}if(ls(p)||Ki(p))return p=Or(p,m.mode,v,null),p.return=m,p;xl(m,p)}return null}function h(m,p,v,S){var R=p!==null?p.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return R!==null?null:a(m,p,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ol:return v.key===R?o(m,p,v,S):null;case Jr:return v.key===R?c(m,p,v,S):null;case Fn:return R=v._init,h(m,p,R(v._payload),S)}if(ls(v)||Ki(v))return R!==null?null:d(m,p,v,S,null);xl(m,v)}return null}function g(m,p,v,S,R){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(v)||null,a(p,m,""+S,R);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ol:return m=m.get(S.key===null?v:S.key)||null,o(p,m,S,R);case Jr:return m=m.get(S.key===null?v:S.key)||null,c(p,m,S,R);case Fn:var M=S._init;return g(m,p,v,M(S._payload),R)}if(ls(S)||Ki(S))return m=m.get(v)||null,d(p,m,S,R,null);xl(p,S)}return null}function x(m,p,v,S){for(var R=null,M=null,w=p,N=p=0,z=null;w!==null&&N<v.length;N++){w.index>N?(z=w,w=null):z=w.sibling;var L=h(m,w,v[N],S);if(L===null){w===null&&(w=z);break}e&&w&&L.alternate===null&&t(m,w),p=s(L,p,N),M===null?R=L:M.sibling=L,M=L,w=z}if(N===v.length)return n(m,w),_e&&gr(m,N),R;if(w===null){for(;N<v.length;N++)w=f(m,v[N],S),w!==null&&(p=s(w,p,N),M===null?R=w:M.sibling=w,M=w);return _e&&gr(m,N),R}for(w=r(m,w);N<v.length;N++)z=g(w,m,N,v[N],S),z!==null&&(e&&z.alternate!==null&&w.delete(z.key===null?N:z.key),p=s(z,p,N),M===null?R=z:M.sibling=z,M=z);return e&&w.forEach(function(Y){return t(m,Y)}),_e&&gr(m,N),R}function P(m,p,v,S){var R=Ki(v);if(typeof R!="function")throw Error(D(150));if(v=R.call(v),v==null)throw Error(D(151));for(var M=R=null,w=p,N=p=0,z=null,L=v.next();w!==null&&!L.done;N++,L=v.next()){w.index>N?(z=w,w=null):z=w.sibling;var Y=h(m,w,L.value,S);if(Y===null){w===null&&(w=z);break}e&&w&&Y.alternate===null&&t(m,w),p=s(Y,p,N),M===null?R=Y:M.sibling=Y,M=Y,w=z}if(L.done)return n(m,w),_e&&gr(m,N),R;if(w===null){for(;!L.done;N++,L=v.next())L=f(m,L.value,S),L!==null&&(p=s(L,p,N),M===null?R=L:M.sibling=L,M=L);return _e&&gr(m,N),R}for(w=r(m,w);!L.done;N++,L=v.next())L=g(w,m,N,L.value,S),L!==null&&(e&&L.alternate!==null&&w.delete(L.key===null?N:L.key),p=s(L,p,N),M===null?R=L:M.sibling=L,M=L);return e&&w.forEach(function(le){return t(m,le)}),_e&&gr(m,N),R}function k(m,p,v,S){if(typeof v=="object"&&v!==null&&v.type===Zr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ol:e:{for(var R=v.key,M=p;M!==null;){if(M.key===R){if(R=v.type,R===Zr){if(M.tag===7){n(m,M.sibling),p=i(M,v.props.children),p.return=m,m=p;break e}}else if(M.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Fn&&bd(R)===M.type){n(m,M.sibling),p=i(M,v.props),p.ref=Xi(m,M,v),p.return=m,m=p;break e}n(m,M);break}else t(m,M);M=M.sibling}v.type===Zr?(p=Or(v.props.children,m.mode,S,v.key),p.return=m,m=p):(S=$l(v.type,v.key,v.props,null,m.mode,S),S.ref=Xi(m,p,v),S.return=m,m=S)}return l(m);case Jr:e:{for(M=v.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=i(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=xo(v,m.mode,S),p.return=m,m=p}return l(m);case Fn:return M=v._init,k(m,p,M(v._payload),S)}if(ls(v))return x(m,p,v,S);if(Ki(v))return P(m,p,v,S);xl(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,v),p.return=m,m=p):(n(m,p),p=yo(v,m.mode,S),p.return=m,m=p),l(m)):n(m,p)}return k}var Li=Cp(!0),Ep=Cp(!1),na=or(null),ra=null,ai=null,sc=null;function lc(){sc=ai=ra=null}function ac(e){var t=na.current;ye(na),e._currentValue=t}function Zo(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 pi(e,t){ra=e,sc=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ht=!0),e.firstContext=null)}function Mt(e){var t=e._currentValue;if(sc!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(ra===null)throw Error(D(308));ai=e,ra.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var wr=null;function oc(e){wr===null?wr=[e]:wr.push(e)}function kp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,oc(t)):(n.next=i.next,i.next=n),t.interleaved=n,wn(e,r)}function wn(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 On=!1;function uc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Np(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 gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,wn(e,n)}return i=r.interleaved,i===null?(t.next=t,oc(r)):(t.next=i.next,i.next=t),r.interleaved=t,wn(e,n)}function Fl(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,qu(e,n)}}function Bd(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 ia(e,t,n,r){var i=e.updateQueue;On=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var o=a,c=o.next;o.next=null,l===null?s=c:l.next=c,l=o;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==l&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=o))}if(s!==null){var f=i.baseState;l=0,d=c=o=null,a=s;do{var h=a.lane,g=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,P=a;switch(h=t,g=n,P.tag){case 1:if(x=P.payload,typeof x=="function"){f=x.call(g,f,h);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=P.payload,h=typeof x=="function"?x.call(g,f,h):x,h==null)break e;f=je({},f,h);break e;case 2:On=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=g,o=f):d=d.next=g,l|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(o=f),i.baseState=o,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do l|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ur|=l,e.lanes=l,e.memoizedState=f}}function Qd(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(D(191,i));i.call(r)}}}var Ys={},en=or(Ys),Ds=or(Ys),Ls=or(Ys);function Pr(e){if(e===Ys)throw Error(D(174));return e}function cc(e,t){switch(ge(Ls,t),ge(Ds,e),ge(en,Ys),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mo(t,e)}ye(en),ge(en,t)}function Mi(){ye(en),ye(Ds),ye(Ls)}function Rp(e){Pr(Ls.current);var t=Pr(en.current),n=Mo(t,e.type);t!==n&&(ge(Ds,e),ge(en,n))}function dc(e){Ds.current===e&&(ye(en),ye(Ds))}var Pe=or(0);function sa(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 fo=[];function fc(){for(var e=0;e<fo.length;e++)fo[e]._workInProgressVersionPrimary=null;fo.length=0}var Ol=jn.ReactCurrentDispatcher,ho=jn.ReactCurrentBatchConfig,Ar=0,Se=null,Ie=null,$e=null,la=!1,gs=!1,Ms=0,vy=0;function We(){throw Error(D(321))}function hc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vt(e[n],t[n]))return!1;return!0}function pc(e,t,n,r,i,s){if(Ar=s,Se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ol.current=e===null||e.memoizedState===null?wy:Py,e=n(r,i),gs){s=0;do{if(gs=!1,Ms=0,25<=s)throw Error(D(301));s+=1,$e=Ie=null,t.updateQueue=null,Ol.current=Sy,e=n(r,i)}while(gs)}if(Ol.current=aa,t=Ie!==null&&Ie.next!==null,Ar=0,$e=Ie=Se=null,la=!1,t)throw Error(D(300));return e}function mc(){var e=Ms!==0;return Ms=0,e}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Se.memoizedState=$e=e:$e=$e.next=e,$e}function Ft(){if(Ie===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=$e===null?Se.memoizedState:$e.next;if(t!==null)$e=t,Ie=e;else{if(e===null)throw Error(D(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},$e===null?Se.memoizedState=$e=e:$e=$e.next=e}return $e}function Fs(e,t){return typeof t=="function"?t(e):t}function po(e){var t=Ft(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=Ie,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=l=null,o=null,c=s;do{var d=c.lane;if((Ar&d)===d)o!==null&&(o=o.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};o===null?(a=o=f,l=r):o=o.next=f,Se.lanes|=d,Ur|=d}c=c.next}while(c!==null&&c!==s);o===null?l=r:o.next=a,Vt(r,t.memoizedState)||(ht=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Se.lanes|=s,Ur|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function mo(e){var t=Ft(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=e(s,l.action),l=l.next;while(l!==i);Vt(s,t.memoizedState)||(ht=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Tp(){}function Dp(e,t){var n=Se,r=Ft(),i=t(),s=!Vt(r.memoizedState,i);if(s&&(r.memoizedState=i,ht=!0),r=r.queue,gc(Fp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||$e!==null&&$e.memoizedState.tag&1){if(n.flags|=2048,Os(9,Mp.bind(null,n,r,i,t),void 0,null),be===null)throw Error(D(349));Ar&30||Lp(n,t,i)}return i}function Lp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mp(e,t,n,r){t.value=n,t.getSnapshot=r,Op(t)&&Ip(e)}function Fp(e,t,n){return n(function(){Op(t)&&Ip(e)})}function Op(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vt(e,n)}catch{return!0}}function Ip(e){var t=wn(e,1);t!==null&&Ht(t,e,1,-1)}function Hd(e){var t=qt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fs,lastRenderedState:e},t.queue=e,e=e.dispatch=_y.bind(null,Se,e),[t.memoizedState,e]}function Os(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Se.updateQueue,t===null?(t={lastEffect:null,stores:null},Se.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 zp(){return Ft().memoizedState}function Il(e,t,n,r){var i=qt();Se.flags|=e,i.memoizedState=Os(1|t,n,void 0,r===void 0?null:r)}function ka(e,t,n,r){var i=Ft();r=r===void 0?null:r;var s=void 0;if(Ie!==null){var l=Ie.memoizedState;if(s=l.destroy,r!==null&&hc(r,l.deps)){i.memoizedState=Os(t,n,s,r);return}}Se.flags|=e,i.memoizedState=Os(1|t,n,s,r)}function Vd(e,t){return Il(8390656,8,e,t)}function gc(e,t){return ka(2048,8,e,t)}function Ap(e,t){return ka(4,2,e,t)}function Up(e,t){return ka(4,4,e,t)}function $p(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 bp(e,t,n){return n=n!=null?n.concat([e]):null,ka(4,4,$p.bind(null,t,e),n)}function vc(){}function Bp(e,t){var n=Ft();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Qp(e,t){var n=Ft();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Hp(e,t,n){return Ar&21?(Vt(n,t)||(n=Gh(),Se.lanes|=n,Ur|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=n)}function yy(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{fe=n,ho.transition=r}}function Vp(){return Ft().memoizedState}function xy(e,t,n){var r=nr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kp(e))Wp(t,n);else if(n=kp(e,t,n,r),n!==null){var i=lt();Ht(n,e,r,i),qp(n,t,r)}}function _y(e,t,n){var r=nr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kp(e))Wp(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var l=t.lastRenderedState,a=s(l,n);if(i.hasEagerState=!0,i.eagerState=a,Vt(a,l)){var o=t.interleaved;o===null?(i.next=i,oc(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=kp(e,t,i,r),n!==null&&(i=lt(),Ht(n,e,r,i),qp(n,t,r))}}function Kp(e){var t=e.alternate;return e===Se||t!==null&&t===Se}function Wp(e,t){gs=la=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qu(e,n)}}var aa={readContext:Mt,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},wy={readContext:Mt,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Vd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Il(4194308,4,$p.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Il(4194308,4,e,t)},useInsertionEffect:function(e,t){return Il(4,2,e,t)},useMemo:function(e,t){var n=qt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qt();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=xy.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:Hd,useDebugValue:vc,useDeferredValue:function(e){return qt().memoizedState=e},useTransition:function(){var e=Hd(!1),t=e[0];return e=yy.bind(null,e[1]),qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Se,i=qt();if(_e){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),be===null)throw Error(D(349));Ar&30||Lp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Vd(Fp.bind(null,r,s,e),[e]),r.flags|=2048,Os(9,Mp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=qt(),t=be.identifierPrefix;if(_e){var n=mn,r=pn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ms++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vy++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Py={readContext:Mt,useCallback:Bp,useContext:Mt,useEffect:gc,useImperativeHandle:bp,useInsertionEffect:Ap,useLayoutEffect:Up,useMemo:Qp,useReducer:po,useRef:zp,useState:function(){return po(Fs)},useDebugValue:vc,useDeferredValue:function(e){var t=Ft();return Hp(t,Ie.memoizedState,e)},useTransition:function(){var e=po(Fs)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Tp,useSyncExternalStore:Dp,useId:Vp,unstable_isNewReconciler:!1},Sy={readContext:Mt,useCallback:Bp,useContext:Mt,useEffect:gc,useImperativeHandle:bp,useInsertionEffect:Ap,useLayoutEffect:Up,useMemo:Qp,useReducer:mo,useRef:zp,useState:function(){return mo(Fs)},useDebugValue:vc,useDeferredValue:function(e){var t=Ft();return Ie===null?t.memoizedState=e:Hp(t,Ie.memoizedState,e)},useTransition:function(){var e=mo(Fs)[0],t=Ft().memoizedState;return[e,t]},useMutableSource:Tp,useSyncExternalStore:Dp,useId:Vp,unstable_isNewReconciler:!1};function At(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function eu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Na={isMounted:function(e){return(e=e._reactInternals)?Vr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=lt(),i=nr(e),s=gn(r,i);s.payload=t,n!=null&&(s.callback=n),t=er(e,s,i),t!==null&&(Ht(t,e,i,r),Fl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=lt(),i=nr(e),s=gn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=er(e,s,i),t!==null&&(Ht(t,e,i,r),Fl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=lt(),r=nr(e),i=gn(n,r);i.tag=2,t!=null&&(i.callback=t),t=er(e,i,r),t!==null&&(Ht(t,e,r,n),Fl(t,e,r))}};function Kd(e,t,n,r,i,s,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,l):t.prototype&&t.prototype.isPureReactComponent?!ks(n,r)||!ks(i,s):!0}function Gp(e,t,n){var r=!1,i=lr,s=t.contextType;return typeof s=="object"&&s!==null?s=Mt(s):(i=mt(t)?Ir:Je.current,r=t.contextTypes,s=(r=r!=null)?Ti(e,i):lr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Na,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Wd(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&&Na.enqueueReplaceState(t,t.state,null)}function tu(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},uc(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Mt(s):(s=mt(t)?Ir:Je.current,i.context=Ti(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(eu(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Na.enqueueReplaceState(i,i.state,null),ia(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Fi(e,t){try{var n="",r=t;do n+=Xg(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
-
Error generating stack: `+s.message+`
|
|
40
|
-
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function go(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function nu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jy=typeof WeakMap=="function"?WeakMap:Map;function Yp(e,t,n){n=gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ua||(ua=!0,fu=r),nu(e,t)},n}function Xp(e,t,n){n=gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){nu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){nu(e,t),typeof r!="function"&&(tr===null?tr=new Set([this]):tr.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function qd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jy;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ay.bind(null,e,t,n),t.then(e,e))}function Gd(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 Yd(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,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=gn(-1,1),t.tag=2,er(n,t,1))),n.lanes|=1),e)}var Cy=jn.ReactCurrentOwner,ht=!1;function it(e,t,n,r){t.child=e===null?Ep(t,null,n,r):Li(t,e.child,n,r)}function Xd(e,t,n,r,i){n=n.render;var s=t.ref;return pi(t,i),r=pc(e,t,n,r,s,i),n=mc(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Pn(e,t,i)):(_e&&n&&nc(t),t.flags|=1,it(e,t,r,i),t.child)}function Jd(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Cc(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Jp(e,t,s,r,i)):(e=$l(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:ks,n(l,r)&&e.ref===t.ref)return Pn(e,t,i)}return t.flags|=1,e=rr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Jp(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(ks(s,r)&&e.ref===t.ref)if(ht=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(ht=!0);else return t.lanes=e.lanes,Pn(e,t,i)}return ru(e,t,n,r,i)}function Zp(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(ui,yt),yt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(ui,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ge(ui,yt),yt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ge(ui,yt),yt|=r;return it(e,t,i,n),t.child}function em(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ru(e,t,n,r,i){var s=mt(n)?Ir:Je.current;return s=Ti(t,s),pi(t,i),n=pc(e,t,n,r,s,i),r=mc(),e!==null&&!ht?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Pn(e,t,i)):(_e&&r&&nc(t),t.flags|=1,it(e,t,n,i),t.child)}function Zd(e,t,n,r,i){if(mt(n)){var s=!0;Zl(t)}else s=!1;if(pi(t,i),t.stateNode===null)zl(e,t),Gp(t,n,r),tu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,a=t.memoizedProps;l.props=a;var o=l.context,c=n.contextType;typeof c=="object"&&c!==null?c=Mt(c):(c=mt(n)?Ir:Je.current,c=Ti(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==r||o!==c)&&Wd(t,l,r,c),On=!1;var h=t.memoizedState;l.state=h,ia(t,r,l,i),o=t.memoizedState,a!==r||h!==o||pt.current||On?(typeof d=="function"&&(eu(t,n,d,r),o=t.memoizedState),(a=On||Kd(t,n,a,r,h,o,c))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),l.props=r,l.state=o,l.context=c,r=a):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Np(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:At(t.type,a),l.props=c,f=t.pendingProps,h=l.context,o=n.contextType,typeof o=="object"&&o!==null?o=Mt(o):(o=mt(n)?Ir:Je.current,o=Ti(t,o));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(a!==f||h!==o)&&Wd(t,l,r,o),On=!1,h=t.memoizedState,l.state=h,ia(t,r,l,i);var x=t.memoizedState;a!==f||h!==x||pt.current||On?(typeof g=="function"&&(eu(t,n,g,r),x=t.memoizedState),(c=On||Kd(t,n,c,r,h,x,o)||!1)?(d||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,x,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,x,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),l.props=r,l.state=x,l.context=o,r=c):(typeof l.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return iu(e,t,n,r,s,i)}function iu(e,t,n,r,i,s){em(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Ad(t,n,!1),Pn(e,t,s);r=t.stateNode,Cy.current=t;var a=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Li(t,e.child,null,s),t.child=Li(t,null,a,s)):it(e,t,a,s),t.memoizedState=r.state,i&&Ad(t,n,!0),t.child}function tm(e){var t=e.stateNode;t.pendingContext?zd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zd(e,t.context,!1),cc(e,t.containerInfo)}function ef(e,t,n,r,i){return Di(),ic(i),t.flags|=256,it(e,t,n,r),t.child}var su={dehydrated:null,treeContext:null,retryLane:0};function lu(e){return{baseLanes:e,cachePool:null,transitions:null}}function nm(e,t,n){var r=t.pendingProps,i=Pe.current,s=!1,l=(t.flags&128)!==0,a;if((a=l)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ge(Pe,i&1),e===null)return Jo(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):(l=r.children,e=r.fallback,s?(r=t.mode,s=t.child,l={mode:"hidden",children:l},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=l):s=Da(l,r,0,null),e=Or(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=lu(n),t.memoizedState=su,e):yc(t,l));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return Ey(e,t,l,r,a,i,n);if(s){s=r.fallback,l=t.mode,i=e.child,a=i.sibling;var o={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=rr(i,o),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=rr(a,s):(s=Or(s,l,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,l=e.child.memoizedState,l=l===null?lu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=su,r}return s=e.child,e=s.sibling,r=rr(s,{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 yc(e,t){return t=Da({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _l(e,t,n,r){return r!==null&&ic(r),Li(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ey(e,t,n,r,i,s,l){if(n)return t.flags&256?(t.flags&=-257,r=go(Error(D(422))),_l(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Da({mode:"visible",children:r.children},i,0,null),s=Or(s,i,l,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Li(t,e.child,null,l),t.child.memoizedState=lu(l),t.memoizedState=su,s);if(!(t.mode&1))return _l(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(D(419)),r=go(s,r,void 0),_l(e,t,l,r)}if(a=(l&e.childLanes)!==0,ht||a){if(r=be,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,wn(e,i),Ht(r,e,i,-1))}return jc(),r=go(Error(D(421))),_l(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Uy.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Pt=Zn(i.nextSibling),St=t,_e=!0,Bt=null,e!==null&&(Rt[Tt++]=pn,Rt[Tt++]=mn,Rt[Tt++]=zr,pn=e.id,mn=e.overflow,zr=t),t=yc(t,r.children),t.flags|=4096,t)}function tf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zo(e.return,t,n)}function vo(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function rm(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(it(e,t,r.children,n),r=Pe.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&&tf(e,n,t);else if(e.tag===19)tf(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(ge(Pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&sa(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vo(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&sa(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vo(t,!0,n,null,s);break;case"together":vo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Pn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ur|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ky(e,t,n){switch(t.tag){case 3:tm(t),Di();break;case 5:Rp(t);break;case 1:mt(t.type)&&Zl(t);break;case 4:cc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ge(na,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Pe,Pe.current&1),t.flags|=128,null):n&t.child.childLanes?nm(e,t,n):(ge(Pe,Pe.current&1),e=Pn(e,t,n),e!==null?e.sibling:null);ge(Pe,Pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return rm(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ge(Pe,Pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Zp(e,t,n)}return Pn(e,t,n)}var im,au,sm,lm;im=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}};au=function(){};sm=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Pr(en.current);var s=null;switch(n){case"input":i=Ro(e,i),r=Ro(e,r),s=[];break;case"select":i=je({},i,{value:void 0}),r=je({},r,{value:void 0}),s=[];break;case"textarea":i=Lo(e,i),r=Lo(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xl)}Fo(n,r);var l;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(l in a)a.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(_s.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var o=r[c];if(a=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&o!==a&&(o!=null||a!=null))if(c==="style")if(a){for(l in a)!a.hasOwnProperty(l)||o&&o.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in o)o.hasOwnProperty(l)&&a[l]!==o[l]&&(n||(n={}),n[l]=o[l])}else n||(s||(s=[]),s.push(c,n)),n=o;else c==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,a=a?a.__html:void 0,o!=null&&a!==o&&(s=s||[]).push(c,o)):c==="children"?typeof o!="string"&&typeof o!="number"||(s=s||[]).push(c,""+o):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(_s.hasOwnProperty(c)?(o!=null&&c==="onScroll"&&ve("scroll",e),s||a===o||(s=[])):(s=s||[]).push(c,o))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};lm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ji(e,t){if(!_e)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 qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ny(e,t,n){var r=t.pendingProps;switch(rc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return mt(t.type)&&Jl(),qe(t),null;case 3:return r=t.stateNode,Mi(),ye(pt),ye(Je),fc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bt!==null&&(mu(Bt),Bt=null))),au(e,t),qe(t),null;case 5:dc(t);var i=Pr(Ls.current);if(n=t.type,e!==null&&t.stateNode!=null)sm(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return qe(t),null}if(e=Pr(en.current),yl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Jt]=t,r[Ts]=s,e=(t.mode&1)!==0,n){case"dialog":ve("cancel",r),ve("close",r);break;case"iframe":case"object":case"embed":ve("load",r);break;case"video":case"audio":for(i=0;i<os.length;i++)ve(os[i],r);break;case"source":ve("error",r);break;case"img":case"image":case"link":ve("error",r),ve("load",r);break;case"details":ve("toggle",r);break;case"input":cd(r,s),ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ve("invalid",r);break;case"textarea":fd(r,s),ve("invalid",r)}Fo(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var a=s[l];l==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&vl(r.textContent,a,e),i=["children",""+a]):_s.hasOwnProperty(l)&&a!=null&&l==="onScroll"&&ve("scroll",r)}switch(n){case"input":ul(r),dd(r,s,!0);break;case"textarea":ul(r),hd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Xl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Jt]=t,e[Ts]=r,im(e,t,!1,!1),t.stateNode=e;e:{switch(l=Oo(n,r),n){case"dialog":ve("cancel",e),ve("close",e),i=r;break;case"iframe":case"object":case"embed":ve("load",e),i=r;break;case"video":case"audio":for(i=0;i<os.length;i++)ve(os[i],e);i=r;break;case"source":ve("error",e),i=r;break;case"img":case"image":case"link":ve("error",e),ve("load",e),i=r;break;case"details":ve("toggle",e),i=r;break;case"input":cd(e,r),i=Ro(e,r),ve("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=je({},r,{value:void 0}),ve("invalid",e);break;case"textarea":fd(e,r),i=Lo(e,r),ve("invalid",e);break;default:i=r}Fo(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var o=a[s];s==="style"?zh(e,o):s==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&Oh(e,o)):s==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&ws(e,o):typeof o=="number"&&ws(e,""+o):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(_s.hasOwnProperty(s)?o!=null&&s==="onScroll"&&ve("scroll",e):o!=null&&Bu(e,s,o,l))}switch(n){case"input":ul(e),dd(e,r,!1);break;case"textarea":ul(e),hd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+sr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ci(e,!!r.multiple,s,!1):r.defaultValue!=null&&ci(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Xl)}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 qe(t),null;case 6:if(e&&t.stateNode!=null)lm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Pr(Ls.current),Pr(en.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Jt]=t,(s=r.nodeValue!==n)&&(e=St,e!==null))switch(e.tag){case 3:vl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vl(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Jt]=t,t.stateNode=r}return qe(t),null;case 13:if(ye(Pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&Pt!==null&&t.mode&1&&!(t.flags&128))jp(),Di(),t.flags|=98560,s=!1;else if(s=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(D(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(D(317));s[Jt]=t}else Di(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qe(t),s=!1}else Bt!==null&&(mu(Bt),Bt=null),s=!0;if(!s)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||Pe.current&1?Ae===0&&(Ae=3):jc())),t.updateQueue!==null&&(t.flags|=4),qe(t),null);case 4:return Mi(),au(e,t),e===null&&Ns(t.stateNode.containerInfo),qe(t),null;case 10:return ac(t.type._context),qe(t),null;case 17:return mt(t.type)&&Jl(),qe(t),null;case 19:if(ye(Pe),s=t.memoizedState,s===null)return qe(t),null;if(r=(t.flags&128)!==0,l=s.rendering,l===null)if(r)Ji(s,!1);else{if(Ae!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=sa(e),l!==null){for(t.flags|=128,Ji(s,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(Pe,Pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&Le()>Oi&&(t.flags|=128,r=!0,Ji(s,!1),t.lanes=4194304)}else{if(!r)if(e=sa(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ji(s,!0),s.tail===null&&s.tailMode==="hidden"&&!l.alternate&&!_e)return qe(t),null}else 2*Le()-s.renderingStartTime>Oi&&n!==1073741824&&(t.flags|=128,r=!0,Ji(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(n=s.last,n!==null?n.sibling=l:t.child=l,s.last=l)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Le(),t.sibling=null,n=Pe.current,ge(Pe,r?n&1|2:n&1),t):(qe(t),null);case 22:case 23:return Sc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function Ry(e,t){switch(rc(t),t.tag){case 1:return mt(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mi(),ye(pt),ye(Je),fc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dc(t),null;case 13:if(ye(Pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Di()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(Pe),null;case 4:return Mi(),null;case 10:return ac(t.type._context),null;case 22:case 23:return Sc(),null;case 24:return null;default:return null}}var wl=!1,Ye=!1,Ty=typeof WeakSet=="function"?WeakSet:Set,A=null;function oi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function ou(e,t,n){try{n()}catch(r){Te(e,t,r)}}var nf=!1;function Dy(e,t){if(Vo=ql,e=dp(),tc(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,a=-1,o=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=l+i),f!==s||r!==0&&f.nodeType!==3||(o=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++c===i&&(a=l),h===s&&++d===r&&(o=l),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=a===-1||o===-1?null:{start:a,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ko={focusedElem:e,selectionRange:n},ql=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var P=x.memoizedProps,k=x.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?P:At(t.type,P),k);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){Te(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return x=nf,nf=!1,x}function vs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ou(t,n,s)}i=i.next}while(i!==r)}}function Ra(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 uu(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 am(e){var t=e.alternate;t!==null&&(e.alternate=null,am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[Ts],delete t[Go],delete t[hy],delete t[py])),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 om(e){return e.tag===5||e.tag===3||e.tag===4}function rf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||om(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 cu(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=Xl));else if(r!==4&&(e=e.child,e!==null))for(cu(e,t,n),e=e.sibling;e!==null;)cu(e,t,n),e=e.sibling}function du(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(du(e,t,n),e=e.sibling;e!==null;)du(e,t,n),e=e.sibling}var Qe=null,$t=!1;function Tn(e,t,n){for(n=n.child;n!==null;)um(e,t,n),n=n.sibling}function um(e,t,n){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(wa,n)}catch{}switch(n.tag){case 5:Ye||oi(n,t);case 6:var r=Qe,i=$t;Qe=null,Tn(e,t,n),Qe=r,$t=i,Qe!==null&&($t?(e=Qe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Qe.removeChild(n.stateNode));break;case 18:Qe!==null&&($t?(e=Qe,n=n.stateNode,e.nodeType===8?uo(e.parentNode,n):e.nodeType===1&&uo(e,n),Cs(e)):uo(Qe,n.stateNode));break;case 4:r=Qe,i=$t,Qe=n.stateNode.containerInfo,$t=!0,Tn(e,t,n),Qe=r,$t=i;break;case 0:case 11:case 14:case 15:if(!Ye&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&&(s&2||s&4)&&ou(n,t,l),i=i.next}while(i!==r)}Tn(e,t,n);break;case 1:if(!Ye&&(oi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Te(n,t,a)}Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:n.mode&1?(Ye=(r=Ye)||n.memoizedState!==null,Tn(e,t,n),Ye=r):Tn(e,t,n);break;default:Tn(e,t,n)}}function sf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ty),t.forEach(function(r){var i=$y.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function zt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,l=t,a=l;e:for(;a!==null;){switch(a.tag){case 5:Qe=a.stateNode,$t=!1;break e;case 3:Qe=a.stateNode.containerInfo,$t=!0;break e;case 4:Qe=a.stateNode.containerInfo,$t=!0;break e}a=a.return}if(Qe===null)throw Error(D(160));um(s,l,i),Qe=null,$t=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(c){Te(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)cm(t,e),t=t.sibling}function cm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zt(t,e),Wt(e),r&4){try{vs(3,e,e.return),Ra(3,e)}catch(P){Te(e,e.return,P)}try{vs(5,e,e.return)}catch(P){Te(e,e.return,P)}}break;case 1:zt(t,e),Wt(e),r&512&&n!==null&&oi(n,n.return);break;case 5:if(zt(t,e),Wt(e),r&512&&n!==null&&oi(n,n.return),e.flags&32){var i=e.stateNode;try{ws(i,"")}catch(P){Te(e,e.return,P)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,l=n!==null?n.memoizedProps:s,a=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Lh(i,s),Oo(a,l);var c=Oo(a,s);for(l=0;l<o.length;l+=2){var d=o[l],f=o[l+1];d==="style"?zh(i,f):d==="dangerouslySetInnerHTML"?Oh(i,f):d==="children"?ws(i,f):Bu(i,d,f,c)}switch(a){case"input":To(i,s);break;case"textarea":Mh(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?ci(i,!!s.multiple,g,!1):h!==!!s.multiple&&(s.defaultValue!=null?ci(i,!!s.multiple,s.defaultValue,!0):ci(i,!!s.multiple,s.multiple?[]:"",!1))}i[Ts]=s}catch(P){Te(e,e.return,P)}}break;case 6:if(zt(t,e),Wt(e),r&4){if(e.stateNode===null)throw Error(D(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(P){Te(e,e.return,P)}}break;case 3:if(zt(t,e),Wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cs(t.containerInfo)}catch(P){Te(e,e.return,P)}break;case 4:zt(t,e),Wt(e);break;case 13:zt(t,e),Wt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(wc=Le())),r&4&&sf(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ye=(c=Ye)||d,zt(t,e),Ye=c):zt(t,e),Wt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(A=e,d=e.child;d!==null;){for(f=A=d;A!==null;){switch(h=A,g=h.child,h.tag){case 0:case 11:case 14:case 15:vs(4,h,h.return);break;case 1:oi(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(P){Te(r,n,P)}}break;case 5:oi(h,h.return);break;case 22:if(h.memoizedState!==null){af(f);continue}}g!==null?(g.return=h,A=g):af(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,o=f.memoizedProps.style,l=o!=null&&o.hasOwnProperty("display")?o.display:null,a.style.display=Ih("display",l))}catch(P){Te(e,e.return,P)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(P){Te(e,e.return,P)}}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:zt(t,e),Wt(e),r&4&&sf(e);break;case 21:break;default:zt(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(om(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ws(i,""),r.flags&=-33);var s=rf(e);du(e,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,a=rf(e);cu(e,a,l);break;default:throw Error(D(161))}}catch(o){Te(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ly(e,t,n){A=e,dm(e)}function dm(e,t,n){for(var r=(e.mode&1)!==0;A!==null;){var i=A,s=i.child;if(i.tag===22&&r){var l=i.memoizedState!==null||wl;if(!l){var a=i.alternate,o=a!==null&&a.memoizedState!==null||Ye;a=wl;var c=Ye;if(wl=l,(Ye=o)&&!c)for(A=i;A!==null;)l=A,o=l.child,l.tag===22&&l.memoizedState!==null?of(i):o!==null?(o.return=l,A=o):of(i);for(;s!==null;)A=s,dm(s),s=s.sibling;A=i,wl=a,Ye=c}lf(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,A=s):lf(e)}}function lf(e){for(;A!==null;){var t=A;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ye||Ra(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ye)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:At(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Qd(t,s,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Qd(t,l,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.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&&Cs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Ye||t.flags&512&&uu(t)}catch(h){Te(t,t.return,h)}}if(t===e){A=null;break}if(n=t.sibling,n!==null){n.return=t.return,A=n;break}A=t.return}}function af(e){for(;A!==null;){var t=A;if(t===e){A=null;break}var n=t.sibling;if(n!==null){n.return=t.return,A=n;break}A=t.return}}function of(e){for(;A!==null;){var t=A;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ra(4,t)}catch(o){Te(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){Te(t,i,o)}}var s=t.return;try{uu(t)}catch(o){Te(t,s,o)}break;case 5:var l=t.return;try{uu(t)}catch(o){Te(t,l,o)}}}catch(o){Te(t,t.return,o)}if(t===e){A=null;break}var a=t.sibling;if(a!==null){a.return=t.return,A=a;break}A=t.return}}var My=Math.ceil,oa=jn.ReactCurrentDispatcher,xc=jn.ReactCurrentOwner,Lt=jn.ReactCurrentBatchConfig,re=0,be=null,Oe=null,He=0,yt=0,ui=or(0),Ae=0,Is=null,Ur=0,Ta=0,_c=0,ys=null,ft=null,wc=0,Oi=1/0,on=null,ua=!1,fu=null,tr=null,Pl=!1,qn=null,ca=0,xs=0,hu=null,Al=-1,Ul=0;function lt(){return re&6?Le():Al!==-1?Al:Al=Le()}function nr(e){return e.mode&1?re&2&&He!==0?He&-He:gy.transition!==null?(Ul===0&&(Ul=Gh()),Ul):(e=fe,e!==0||(e=window.event,e=e===void 0?16:np(e.type)),e):1}function Ht(e,t,n,r){if(50<xs)throw xs=0,hu=null,Error(D(185));Ws(e,n,r),(!(re&2)||e!==be)&&(e===be&&(!(re&2)&&(Ta|=n),Ae===4&&zn(e,He)),gt(e,r),n===1&&re===0&&!(t.mode&1)&&(Oi=Le()+500,Ea&&ur()))}function gt(e,t){var n=e.callbackNode;gv(e,t);var r=Wl(e,e===be?He:0);if(r===0)n!==null&&gd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&gd(n),t===1)e.tag===0?my(uf.bind(null,e)):wp(uf.bind(null,e)),dy(function(){!(re&6)&&ur()}),n=null;else{switch(Yh(r)){case 1:n=Wu;break;case 4:n=Wh;break;case 16:n=Kl;break;case 536870912:n=qh;break;default:n=Kl}n=xm(n,fm.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function fm(e,t){if(Al=-1,Ul=0,re&6)throw Error(D(327));var n=e.callbackNode;if(mi()&&e.callbackNode!==n)return null;var r=Wl(e,e===be?He:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=da(e,r);else{t=r;var i=re;re|=2;var s=pm();(be!==e||He!==t)&&(on=null,Oi=Le()+500,Fr(e,t));do try{Iy();break}catch(a){hm(e,a)}while(!0);lc(),oa.current=s,re=i,Oe!==null?t=0:(be=null,He=0,t=Ae)}if(t!==0){if(t===2&&(i=$o(e),i!==0&&(r=i,t=pu(e,i))),t===1)throw n=Is,Fr(e,0),zn(e,r),gt(e,Le()),n;if(t===6)zn(e,r);else{if(i=e.current.alternate,!(r&30)&&!Fy(i)&&(t=da(e,r),t===2&&(s=$o(e),s!==0&&(r=s,t=pu(e,s))),t===1))throw n=Is,Fr(e,0),zn(e,r),gt(e,Le()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:vr(e,ft,on);break;case 3:if(zn(e,r),(r&130023424)===r&&(t=wc+500-Le(),10<t)){if(Wl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qo(vr.bind(null,e,ft,on),t);break}vr(e,ft,on);break;case 4:if(zn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var l=31-Qt(r);s=1<<l,l=t[l],l>i&&(i=l),r&=~s}if(r=i,r=Le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*My(r/1960))-r,10<r){e.timeoutHandle=qo(vr.bind(null,e,ft,on),r);break}vr(e,ft,on);break;case 5:vr(e,ft,on);break;default:throw Error(D(329))}}}return gt(e,Le()),e.callbackNode===n?fm.bind(null,e):null}function pu(e,t){var n=ys;return e.current.memoizedState.isDehydrated&&(Fr(e,t).flags|=256),e=da(e,t),e!==2&&(t=ft,ft=n,t!==null&&mu(t)),e}function mu(e){ft===null?ft=e:ft.push.apply(ft,e)}function Fy(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!Vt(s(),i))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 zn(e,t){for(t&=~_c,t&=~Ta,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),r=1<<n;e[n]=-1,t&=~r}}function uf(e){if(re&6)throw Error(D(327));mi();var t=Wl(e,0);if(!(t&1))return gt(e,Le()),null;var n=da(e,t);if(e.tag!==0&&n===2){var r=$o(e);r!==0&&(t=r,n=pu(e,r))}if(n===1)throw n=Is,Fr(e,0),zn(e,t),gt(e,Le()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ft,on),gt(e,Le()),null}function Pc(e,t){var n=re;re|=1;try{return e(t)}finally{re=n,re===0&&(Oi=Le()+500,Ea&&ur())}}function $r(e){qn!==null&&qn.tag===0&&!(re&6)&&mi();var t=re;re|=1;var n=Lt.transition,r=fe;try{if(Lt.transition=null,fe=1,e)return e()}finally{fe=r,Lt.transition=n,re=t,!(re&6)&&ur()}}function Sc(){yt=ui.current,ye(ui)}function Fr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cy(n)),Oe!==null)for(n=Oe.return;n!==null;){var r=n;switch(rc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Jl();break;case 3:Mi(),ye(pt),ye(Je),fc();break;case 5:dc(r);break;case 4:Mi();break;case 13:ye(Pe);break;case 19:ye(Pe);break;case 10:ac(r.type._context);break;case 22:case 23:Sc()}n=n.return}if(be=e,Oe=e=rr(e.current,null),He=yt=t,Ae=0,Is=null,_c=Ta=Ur=0,ft=ys=null,wr!==null){for(t=0;t<wr.length;t++)if(n=wr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}wr=null}return e}function hm(e,t){do{var n=Oe;try{if(lc(),Ol.current=aa,la){for(var r=Se.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}la=!1}if(Ar=0,$e=Ie=Se=null,gs=!1,Ms=0,xc.current=null,n===null||n.return===null){Ae=1,Is=t,Oe=null;break}e:{var s=e,l=n.return,a=n,o=t;if(t=He,a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=o,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Gd(l);if(g!==null){g.flags&=-257,Yd(g,l,a,s,t),g.mode&1&&qd(s,c,t),t=g,o=c;var x=t.updateQueue;if(x===null){var P=new Set;P.add(o),t.updateQueue=P}else x.add(o);break e}else{if(!(t&1)){qd(s,c,t),jc();break e}o=Error(D(426))}}else if(_e&&a.mode&1){var k=Gd(l);if(k!==null){!(k.flags&65536)&&(k.flags|=256),Yd(k,l,a,s,t),ic(Fi(o,a));break e}}s=o=Fi(o,a),Ae!==4&&(Ae=2),ys===null?ys=[s]:ys.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var m=Yp(s,o,t);Bd(s,m);break e;case 1:a=o;var p=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof p.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(tr===null||!tr.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Xp(s,a,t);Bd(s,S);break e}}s=s.return}while(s!==null)}gm(n)}catch(R){t=R,Oe===n&&n!==null&&(Oe=n=n.return);continue}break}while(!0)}function pm(){var e=oa.current;return oa.current=aa,e===null?aa:e}function jc(){(Ae===0||Ae===3||Ae===2)&&(Ae=4),be===null||!(Ur&268435455)&&!(Ta&268435455)||zn(be,He)}function da(e,t){var n=re;re|=2;var r=pm();(be!==e||He!==t)&&(on=null,Fr(e,t));do try{Oy();break}catch(i){hm(e,i)}while(!0);if(lc(),re=n,oa.current=r,Oe!==null)throw Error(D(261));return be=null,He=0,Ae}function Oy(){for(;Oe!==null;)mm(Oe)}function Iy(){for(;Oe!==null&&!av();)mm(Oe)}function mm(e){var t=ym(e.alternate,e,yt);e.memoizedProps=e.pendingProps,t===null?gm(e):Oe=t,xc.current=null}function gm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ry(n,t),n!==null){n.flags&=32767,Oe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ae=6,Oe=null;return}}else if(n=Ny(n,t,yt),n!==null){Oe=n;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);Ae===0&&(Ae=5)}function vr(e,t,n){var r=fe,i=Lt.transition;try{Lt.transition=null,fe=1,zy(e,t,n,r)}finally{Lt.transition=i,fe=r}return null}function zy(e,t,n,r){do mi();while(qn!==null);if(re&6)throw Error(D(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(vv(e,s),e===be&&(Oe=be=null,He=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Pl||(Pl=!0,xm(Kl,function(){return mi(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Lt.transition,Lt.transition=null;var l=fe;fe=1;var a=re;re|=4,xc.current=null,Dy(e,n),cm(n,e),ry(Ko),ql=!!Vo,Ko=Vo=null,e.current=n,Ly(n),ov(),re=a,fe=l,Lt.transition=s}else e.current=n;if(Pl&&(Pl=!1,qn=e,ca=i),s=e.pendingLanes,s===0&&(tr=null),dv(n.stateNode),gt(e,Le()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ua)throw ua=!1,e=fu,fu=null,e;return ca&1&&e.tag!==0&&mi(),s=e.pendingLanes,s&1?e===hu?xs++:(xs=0,hu=e):xs=0,ur(),null}function mi(){if(qn!==null){var e=Yh(ca),t=Lt.transition,n=fe;try{if(Lt.transition=null,fe=16>e?16:e,qn===null)var r=!1;else{if(e=qn,qn=null,ca=0,re&6)throw Error(D(331));var i=re;for(re|=4,A=e.current;A!==null;){var s=A,l=s.child;if(A.flags&16){var a=s.deletions;if(a!==null){for(var o=0;o<a.length;o++){var c=a[o];for(A=c;A!==null;){var d=A;switch(d.tag){case 0:case 11:case 15:vs(8,d,s)}var f=d.child;if(f!==null)f.return=d,A=f;else for(;A!==null;){d=A;var h=d.sibling,g=d.return;if(am(d),d===c){A=null;break}if(h!==null){h.return=g,A=h;break}A=g}}}var x=s.alternate;if(x!==null){var P=x.child;if(P!==null){x.child=null;do{var k=P.sibling;P.sibling=null,P=k}while(P!==null)}}A=s}}if(s.subtreeFlags&2064&&l!==null)l.return=s,A=l;else e:for(;A!==null;){if(s=A,s.flags&2048)switch(s.tag){case 0:case 11:case 15:vs(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,A=m;break e}A=s.return}}var p=e.current;for(A=p;A!==null;){l=A;var v=l.child;if(l.subtreeFlags&2064&&v!==null)v.return=l,A=v;else e:for(l=p;A!==null;){if(a=A,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ra(9,a)}}catch(R){Te(a,a.return,R)}if(a===l){A=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,A=S;break e}A=a.return}}if(re=i,ur(),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(wa,e)}catch{}r=!0}return r}finally{fe=n,Lt.transition=t}}return!1}function cf(e,t,n){t=Fi(n,t),t=Yp(e,t,1),e=er(e,t,1),t=lt(),e!==null&&(Ws(e,1,t),gt(e,t))}function Te(e,t,n){if(e.tag===3)cf(e,e,n);else for(;t!==null;){if(t.tag===3){cf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tr===null||!tr.has(r))){e=Fi(n,e),e=Xp(t,e,1),t=er(t,e,1),e=lt(),t!==null&&(Ws(t,1,e),gt(t,e));break}}t=t.return}}function Ay(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=lt(),e.pingedLanes|=e.suspendedLanes&n,be===e&&(He&n)===n&&(Ae===4||Ae===3&&(He&130023424)===He&&500>Le()-wc?Fr(e,0):_c|=n),gt(e,t)}function vm(e,t){t===0&&(e.mode&1?(t=fl,fl<<=1,!(fl&130023424)&&(fl=4194304)):t=1);var n=lt();e=wn(e,t),e!==null&&(Ws(e,t,n),gt(e,n))}function Uy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vm(e,n)}function $y(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),vm(e,n)}var ym;ym=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)ht=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ht=!1,ky(e,t,n);ht=!!(e.flags&131072)}else ht=!1,_e&&t.flags&1048576&&Pp(t,ta,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zl(e,t),e=t.pendingProps;var i=Ti(t,Je.current);pi(t,n),i=pc(null,t,r,e,i,n);var s=mc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,mt(r)?(s=!0,Zl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,uc(t),i.updater=Na,t.stateNode=i,i._reactInternals=t,tu(t,r,e,n),t=iu(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&nc(t),it(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=By(r),e=At(r,e),i){case 0:t=ru(null,t,r,e,n);break e;case 1:t=Zd(null,t,r,e,n);break e;case 11:t=Xd(null,t,r,e,n);break e;case 14:t=Jd(null,t,r,At(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),ru(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),Zd(e,t,r,i,n);case 3:e:{if(tm(t),e===null)throw Error(D(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Np(e,t),ia(t,r,null,n);var l=t.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Fi(Error(D(423)),t),t=ef(e,t,r,n,i);break e}else if(r!==i){i=Fi(Error(D(424)),t),t=ef(e,t,r,n,i);break e}else for(Pt=Zn(t.stateNode.containerInfo.firstChild),St=t,_e=!0,Bt=null,n=Ep(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Di(),r===i){t=Pn(e,t,n);break e}it(e,t,r,n)}t=t.child}return t;case 5:return Rp(t),e===null&&Jo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,l=i.children,Wo(r,i)?l=null:s!==null&&Wo(r,s)&&(t.flags|=32),em(e,t),it(e,t,l,n),t.child;case 6:return e===null&&Jo(t),null;case 13:return nm(e,t,n);case 4:return cc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,n):it(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),Xd(e,t,r,i,n);case 7:return it(e,t,t.pendingProps,n),t.child;case 8:return it(e,t,t.pendingProps.children,n),t.child;case 12:return it(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,l=i.value,ge(na,r._currentValue),r._currentValue=l,s!==null)if(Vt(s.value,l)){if(s.children===i.children&&!pt.current){t=Pn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){l=s.child;for(var o=a.firstContext;o!==null;){if(o.context===r){if(s.tag===1){o=gn(-1,n&-n),o.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?o.next=o:(o.next=d.next,d.next=o),c.pending=o}}s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zo(s.return,n,t),a.lanes|=n;break}o=o.next}}else if(s.tag===10)l=s.type===t.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(D(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Zo(l,n,t),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===t){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}it(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,pi(t,n),i=Mt(i),r=r(i),t.flags|=1,it(e,t,r,n),t.child;case 14:return r=t.type,i=At(r,t.pendingProps),i=At(r.type,i),Jd(e,t,r,i,n);case 15:return Jp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:At(r,i),zl(e,t),t.tag=1,mt(r)?(e=!0,Zl(t)):e=!1,pi(t,n),Gp(t,r,i),tu(t,r,i,n),iu(null,t,r,!0,e,n);case 19:return rm(e,t,n);case 22:return Zp(e,t,n)}throw Error(D(156,t.tag))};function xm(e,t){return Kh(e,t)}function by(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 Dt(e,t,n,r){return new by(e,t,n,r)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function By(e){if(typeof e=="function")return Cc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hu)return 11;if(e===Vu)return 14}return 2}function rr(e,t){var n=e.alternate;return n===null?(n=Dt(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 $l(e,t,n,r,i,s){var l=2;if(r=e,typeof e=="function")Cc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Zr:return Or(n.children,i,s,t);case Qu:l=8,i|=8;break;case Co:return e=Dt(12,n,t,i|2),e.elementType=Co,e.lanes=s,e;case Eo:return e=Dt(13,n,t,i),e.elementType=Eo,e.lanes=s,e;case ko:return e=Dt(19,n,t,i),e.elementType=ko,e.lanes=s,e;case Rh:return Da(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kh:l=10;break e;case Nh:l=9;break e;case Hu:l=11;break e;case Vu:l=14;break e;case Fn:l=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Dt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Or(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function Da(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=Rh,e.lanes=n,e.stateNode={isHidden:!1},e}function yo(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function xo(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qy(e,t,n,r,i){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=Ja(0),this.expirationTimes=Ja(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ja(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ec(e,t,n,r,i,s,l,a,o){return e=new Qy(e,t,n,a,o),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Dt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},uc(s),e}function Hy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Jr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _m(e){if(!e)return lr;e=e._reactInternals;e:{if(Vr(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(mt(n))return _p(e,n,t)}return t}function wm(e,t,n,r,i,s,l,a,o){return e=Ec(n,r,!0,e,i,s,l,a,o),e.context=_m(null),n=e.current,r=lt(),i=nr(n),s=gn(r,i),s.callback=t??null,er(n,s,i),e.current.lanes=i,Ws(e,i,r),gt(e,r),e}function La(e,t,n,r){var i=t.current,s=lt(),l=nr(i);return n=_m(n),t.context===null?t.context=n:t.pendingContext=n,t=gn(s,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=er(i,t,l),e!==null&&(Ht(e,i,l,s),Fl(e,i,l)),l}function fa(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 df(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kc(e,t){df(e,t),(e=e.alternate)&&df(e,t)}function Vy(){return null}var Pm=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nc(e){this._internalRoot=e}Ma.prototype.render=Nc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));La(e,t,null,null)};Ma.prototype.unmount=Nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$r(function(){La(null,e,null,null)}),t[_n]=null}};function Ma(e){this._internalRoot=e}Ma.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<In.length&&t!==0&&t<In[n].priority;n++);In.splice(n,0,e),n===0&&tp(e)}};function Rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ff(){}function Ky(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=fa(l);s.call(c)}}var l=wm(t,r,e,0,null,!1,!1,"",ff);return e._reactRootContainer=l,e[_n]=l.current,Ns(e.nodeType===8?e.parentNode:e),$r(),l}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var c=fa(o);a.call(c)}}var o=Ec(e,0,!1,null,null,!1,!1,"",ff);return e._reactRootContainer=o,e[_n]=o.current,Ns(e.nodeType===8?e.parentNode:e),$r(function(){La(t,o,n,r)}),o}function Oa(e,t,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i=="function"){var a=i;i=function(){var o=fa(l);a.call(o)}}La(t,l,e,i)}else l=Ky(n,t,e,i,r);return fa(l)}Xh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(qu(t,n|1),gt(t,Le()),!(re&6)&&(Oi=Le()+500,ur()))}break;case 13:$r(function(){var r=wn(e,1);if(r!==null){var i=lt();Ht(r,e,1,i)}}),kc(e,1)}};Gu=function(e){if(e.tag===13){var t=wn(e,134217728);if(t!==null){var n=lt();Ht(t,e,134217728,n)}kc(e,134217728)}};Jh=function(e){if(e.tag===13){var t=nr(e),n=wn(e,t);if(n!==null){var r=lt();Ht(n,e,t,r)}kc(e,t)}};Zh=function(){return fe};ep=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};zo=function(e,t,n){switch(t){case"input":if(To(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 i=Ca(r);if(!i)throw Error(D(90));Dh(r),To(r,i)}}}break;case"textarea":Mh(e,n);break;case"select":t=n.value,t!=null&&ci(e,!!n.multiple,t,!1)}};$h=Pc;bh=$r;var Wy={usingClientEntryPoint:!1,Events:[Gs,ri,Ca,Ah,Uh,Pc]},Zi={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qy={bundleType:Zi.bundleType,version:Zi.version,rendererPackageName:Zi.rendererPackageName,rendererConfig:Zi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hh(e),e===null?null:e.stateNode},findFiberByHostInstance:Zi.findFiberByHostInstance||Vy,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 Sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sl.isDisabled&&Sl.supportsFiber)try{wa=Sl.inject(qy),Zt=Sl}catch{}}Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wy;Ct.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rc(t))throw Error(D(200));return Hy(e,t,null,n)};Ct.createRoot=function(e,t){if(!Rc(e))throw Error(D(299));var n=!1,r="",i=Pm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ec(e,1,!1,null,null,n,!1,r,i),e[_n]=t.current,Ns(e.nodeType===8?e.parentNode:e),new Nc(t)};Ct.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(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=Hh(t),e=e===null?null:e.stateNode,e};Ct.flushSync=function(e){return $r(e)};Ct.hydrate=function(e,t,n){if(!Fa(t))throw Error(D(200));return Oa(null,e,t,!0,n)};Ct.hydrateRoot=function(e,t,n){if(!Rc(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",l=Pm;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=wm(t,null,e,1,n??null,i,!1,s,l),e[_n]=t.current,Ns(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ma(t)};Ct.render=function(e,t,n){if(!Fa(t))throw Error(D(200));return Oa(null,e,t,!1,n)};Ct.unmountComponentAtNode=function(e){if(!Fa(e))throw Error(D(40));return e._reactRootContainer?($r(function(){Oa(null,null,e,!1,function(){e._reactRootContainer=null,e[_n]=null})}),!0):!1};Ct.unstable_batchedUpdates=Pc;Ct.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Fa(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return Oa(e,t,n,!1,r)};Ct.version="18.3.1-next-f1338f8080-20240426";function Sm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sm)}catch(e){console.error(e)}}Sm(),Sh.exports=Ct;var Tc=Sh.exports;const Gy=dh(Tc),Yy=ch({__proto__:null,default:Gy},[Tc]);var jm,hf=Tc;jm=hf.createRoot,hf.hydrateRoot;var $i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cr,An,gi,Zf,Xy=(Zf=class extends $i{constructor(){super();Q(this,Cr);Q(this,An);Q(this,gi);I(this,gi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){y(this,An)||this.setEventListener(y(this,gi))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,An))==null||t.call(this),I(this,An,void 0))}setEventListener(t){var n;I(this,gi,t),(n=y(this,An))==null||n.call(this),I(this,An,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){y(this,Cr)!==t&&(I(this,Cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof y(this,Cr)=="boolean"?y(this,Cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cr=new WeakMap,An=new WeakMap,gi=new WeakMap,Zf),Dc=new Xy,Jy={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Un,Ou,eh,Zy=(eh=class{constructor(){Q(this,Un,Jy);Q(this,Ou,!1)}setTimeoutProvider(e){I(this,Un,e)}setTimeout(e,t){return y(this,Un).setTimeout(e,t)}clearTimeout(e){y(this,Un).clearTimeout(e)}setInterval(e,t){return y(this,Un).setInterval(e,t)}clearInterval(e){y(this,Un).clearInterval(e)}},Un=new WeakMap,Ou=new WeakMap,eh),Sr=new Zy;function e0(e){setTimeout(e,0)}var t0=typeof window>"u"||"Deno"in globalThis;function st(){}function n0(e,t){return typeof e=="function"?e(t):e}function gu(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ir(e,t){return typeof e=="function"?e(t):e}function _t(e,t){return typeof e=="function"?e(t):e}function pf(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:l,stale:a}=e;if(l){if(r){if(t.queryHash!==Lc(l,t.options))return!1}else if(!zs(t.queryKey,l))return!1}if(n!=="all"){const o=t.isActive();if(n==="active"&&!o||n==="inactive"&&o)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||s&&!s(t))}function mf(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(br(t.options.mutationKey)!==br(s))return!1}else if(!zs(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Lc(e,t){return((t==null?void 0:t.queryKeyHashFn)||br)(e)}function br(e){return JSON.stringify(e,(t,n)=>vu(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function zs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>zs(e[n],t[n])):!1}var r0=Object.prototype.hasOwnProperty;function Em(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=gf(e)&&gf(t);if(!r&&!(vu(e)&&vu(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),a=l.length,o=r?new Array(a):{};let c=0;for(let d=0;d<a;d++){const f=r?d:l[d],h=e[f],g=t[f];if(h===g){o[f]=h,(r?d<s:r0.call(e,f))&&c++;continue}if(h===null||g===null||typeof h!="object"||typeof g!="object"){o[f]=g;continue}const x=Em(h,g,n+1);o[f]=x,x===h&&c++}return s===a&&c===s?e:o}function ha(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function gf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vu(e){if(!vf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vf(e){return Object.prototype.toString.call(e)==="[object Object]"}function i0(e){return new Promise(t=>{Sr.setTimeout(t,e)})}function yu(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Em(e,t):t}function s0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function l0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Mc=Symbol();function km(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Mc?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fc(e,t){return typeof e=="function"?e(...t):!!e}function a0(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var As=(()=>{let e=()=>t0;return{isServer(){return e()},setIsServer(t){e=t}}})();function xu(){let e,t;const n=new Promise((i,s)=>{e=i,t=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var o0=e0;function u0(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=o0;const s=a=>{t?e.push(a):i(()=>{n(a)})},l=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(o=>{n(o)})})})};return{batch:a=>{let o;t++;try{o=a()}finally{t--,t||l()}return o},batchCalls:a=>(...o)=>{s(()=>{a(...o)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ze=u0(),vi,$n,yi,th,c0=(th=class extends $i{constructor(){super();Q(this,vi,!0);Q(this,$n);Q(this,yi);I(this,yi,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){y(this,$n)||this.setEventListener(y(this,yi))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,$n))==null||t.call(this),I(this,$n,void 0))}setEventListener(t){var n;I(this,yi,t),(n=y(this,$n))==null||n.call(this),I(this,$n,t(this.setOnline.bind(this)))}setOnline(t){y(this,vi)!==t&&(I(this,vi,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return y(this,vi)}},vi=new WeakMap,$n=new WeakMap,yi=new WeakMap,th),pa=new c0;function d0(e){return Math.min(1e3*2**e,3e4)}function Nm(e){return(e??"online")==="online"?pa.isOnline():!0}var _u=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Rm(e){let t=!1,n=0,r;const i=xu(),s=()=>i.status!=="pending",l=P=>{var k;if(!s()){const m=new _u(P);h(m),(k=e.onCancel)==null||k.call(e,m)}},a=()=>{t=!0},o=()=>{t=!1},c=()=>Dc.isFocused()&&(e.networkMode==="always"||pa.isOnline())&&e.canRun(),d=()=>Nm(e.networkMode)&&e.canRun(),f=P=>{s()||(r==null||r(),i.resolve(P))},h=P=>{s()||(r==null||r(),i.reject(P))},g=()=>new Promise(P=>{var k;r=m=>{(s()||c())&&P(m)},(k=e.onPause)==null||k.call(e)}).then(()=>{var P;r=void 0,s()||(P=e.onContinue)==null||P.call(e)}),x=()=>{if(s())return;let P;const k=n===0?e.initialPromise:void 0;try{P=k??e.fn()}catch(m){P=Promise.reject(m)}Promise.resolve(P).then(f).catch(m=>{var M;if(s())return;const p=e.retry??(As.isServer()?0:3),v=e.retryDelay??d0,S=typeof v=="function"?v(n,m):v,R=p===!0||typeof p=="number"&&n<p||typeof p=="function"&&p(n,m);if(t||!R){h(m);return}n++,(M=e.onFail)==null||M.call(e,n,m),i0(S).then(()=>c()?void 0:g()).then(()=>{t?h(m):x()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:o,canStart:d,start:()=>(d()?x():g().then(x),i)}}var Er,nh,Tm=(nh=class{constructor(){Q(this,Er)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gu(this.gcTime)&&I(this,Er,Sr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(As.isServer()?1/0:5*60*1e3))}clearGcTimeout(){y(this,Er)!==void 0&&(Sr.clearTimeout(y(this,Er)),I(this,Er,void 0))}},Er=new WeakMap,nh);function f0(e){return{onFetch:(t,n)=>{var d,f,h,g,x;const r=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,s=((g=t.state.data)==null?void 0:g.pages)||[],l=((x=t.state.data)==null?void 0:x.pageParams)||[];let a={pages:[],pageParams:[]},o=0;const c=async()=>{let P=!1;const k=v=>{a0(v,()=>t.signal,()=>P=!0)},m=km(t.options,t.fetchOptions),p=async(v,S,R)=>{if(P)return Promise.reject(t.signal.reason);if(S==null&&v.pages.length)return Promise.resolve(v);const w=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:S,direction:R?"backward":"forward",meta:t.options.meta};return k(Y),Y})(),N=await m(w),{maxPages:z}=t.options,L=R?l0:s0;return{pages:L(v.pages,N,z),pageParams:L(v.pageParams,S,z)}};if(i&&s.length){const v=i==="backward",S=v?h0:yf,R={pages:s,pageParams:l},M=S(r,R);a=await p(R,M,v)}else{const v=e??s.length;do{const S=o===0?l[0]??r.initialPageParam:yf(r,a);if(o>0&&S==null)break;a=await p(a,S),o++}while(o<v)}return a};t.options.persister?t.fetchFn=()=>{var P,k;return(k=(P=t.options).persister)==null?void 0:k.call(P,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function yf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function h0(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xi,kr,_i,Nt,Nr,Ue,bs,Rr,xt,Dm,an,rh,p0=(rh=class extends Tm{constructor(t){super();Q(this,xt);Q(this,xi);Q(this,kr);Q(this,_i);Q(this,Nt);Q(this,Nr);Q(this,Ue);Q(this,bs);Q(this,Rr);I(this,Rr,!1),I(this,bs,t.defaultOptions),this.setOptions(t.options),this.observers=[],I(this,Nr,t.client),I(this,Nt,y(this,Nr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,I(this,kr,_f(this.options)),this.state=t.state??y(this,kr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return y(this,xi)}get promise(){var t;return(t=y(this,Ue))==null?void 0:t.promise}setOptions(t){if(this.options={...y(this,bs),...t},t!=null&&t._type&&I(this,xi,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=_f(this.options);n.data!==void 0&&(this.setState(xf(n.data,n.dataUpdatedAt)),I(this,kr,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Nt).remove(this)}setData(t,n){const r=yu(this.state.data,t,this.options);return G(this,xt,an).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){G(this,xt,an).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=y(this,Ue))==null?void 0:r.promise;return(i=y(this,Ue))==null||i.cancel(t),n?n.then(st).catch(st):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return y(this,kr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_t(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ir(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Cm(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,Ue))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,Ue))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Nt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(y(this,Ue)&&(y(this,Rr)||G(this,xt,Dm).call(this)?y(this,Ue).cancel({revert:!0}):y(this,Ue).cancelRetry()),this.scheduleGc()),y(this,Nt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||G(this,xt,an).call(this,{type:"invalidate"})}async fetch(t,n){var c,d,f,h,g,x,P,k,m,p,v;if(this.state.fetchStatus!=="idle"&&((c=y(this,Ue))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(y(this,Ue))return y(this,Ue).continueRetry(),y(this,Ue).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(R=>R.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(I(this,Rr,!0),r.signal)})},s=()=>{const S=km(this.options,n),M=(()=>{const w={client:y(this,Nr),queryKey:this.queryKey,meta:this.meta};return i(w),w})();return I(this,Rr,!1),this.options.persister?this.options.persister(S,M,this):S(M)},a=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:y(this,Nr),state:this.state,fetchFn:s};return i(S),S})(),o=y(this,xi)==="infinite"?f0(this.options.pages):this.options.behavior;o==null||o.onFetch(a,this),I(this,_i,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&G(this,xt,an).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta}),I(this,Ue,Rm({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:S=>{S instanceof _u&&S.revert&&this.setState({...y(this,_i),fetchStatus:"idle"}),r.abort()},onFail:(S,R)=>{G(this,xt,an).call(this,{type:"failed",failureCount:S,error:R})},onPause:()=>{G(this,xt,an).call(this,{type:"pause"})},onContinue:()=>{G(this,xt,an).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const S=await y(this,Ue).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(g=(h=y(this,Nt).config).onSuccess)==null||g.call(h,S,this),(P=(x=y(this,Nt).config).onSettled)==null||P.call(x,S,this.state.error,this),S}catch(S){if(S instanceof _u){if(S.silent)return y(this,Ue).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw G(this,xt,an).call(this,{type:"error",error:S}),(m=(k=y(this,Nt).config).onError)==null||m.call(k,S,this),(v=(p=y(this,Nt).config).onSettled)==null||v.call(p,this.state.data,S,this),S}finally{this.scheduleGc()}}},xi=new WeakMap,kr=new WeakMap,_i=new WeakMap,Nt=new WeakMap,Nr=new WeakMap,Ue=new WeakMap,bs=new WeakMap,Rr=new WeakMap,xt=new WeakSet,Dm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},an=function(t){const n=r=>{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,...Lm(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...xf(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return I(this,_i,t.manual?i:void 0),i;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),y(this,Nt).notify({query:this,type:"updated",action:t})})},rh);function Lm(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nm(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _f(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,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":"pending",fetchStatus:"idle"}}var ut,te,Bs,rt,Tr,wi,cn,bn,Qs,Pi,Si,Dr,Lr,Bn,ji,ue,us,wu,Pu,Su,ju,Cu,Eu,ku,Mm,ih,m0=(ih=class extends $i{constructor(t,n){super();Q(this,ue);Q(this,ut);Q(this,te);Q(this,Bs);Q(this,rt);Q(this,Tr);Q(this,wi);Q(this,cn);Q(this,bn);Q(this,Qs);Q(this,Pi);Q(this,Si);Q(this,Dr);Q(this,Lr);Q(this,Bn);Q(this,ji,new Set);this.options=n,I(this,ut,t),I(this,bn,null),I(this,cn,xu()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,te).addObserver(this),wf(y(this,te),this.options)?G(this,ue,us).call(this):this.updateResult(),G(this,ue,ju).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nu(y(this,te),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nu(y(this,te),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,G(this,ue,Cu).call(this),G(this,ue,Eu).call(this),y(this,te).removeObserver(this)}setOptions(t){const n=this.options,r=y(this,te);if(this.options=y(this,ut).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _t(this.options.enabled,y(this,te))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");G(this,ue,ku).call(this),y(this,te).setOptions(this.options),n._defaulted&&!ha(this.options,n)&&y(this,ut).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,te),observer:this});const i=this.hasListeners();i&&Pf(y(this,te),r,this.options,n)&&G(this,ue,us).call(this),this.updateResult(),i&&(y(this,te)!==r||_t(this.options.enabled,y(this,te))!==_t(n.enabled,y(this,te))||ir(this.options.staleTime,y(this,te))!==ir(n.staleTime,y(this,te)))&&G(this,ue,wu).call(this);const s=G(this,ue,Pu).call(this);i&&(y(this,te)!==r||_t(this.options.enabled,y(this,te))!==_t(n.enabled,y(this,te))||s!==y(this,Bn))&&G(this,ue,Su).call(this,s)}getOptimisticResult(t){const n=y(this,ut).getQueryCache().build(y(this,ut),t),r=this.createResult(n,t);return v0(this,r)&&(I(this,rt,r),I(this,wi,this.options),I(this,Tr,y(this,te).state)),r}getCurrentResult(){return y(this,rt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&y(this,cn).status==="pending"&&y(this,cn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){y(this,ji).add(t)}getCurrentQuery(){return y(this,te)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=y(this,ut).defaultQueryOptions(t),r=y(this,ut).getQueryCache().build(y(this,ut),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return G(this,ue,us).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,rt)))}createResult(t,n){var z;const r=y(this,te),i=this.options,s=y(this,rt),l=y(this,Tr),a=y(this,wi),c=t!==r?t.state:y(this,Bs),{state:d}=t;let f={...d},h=!1,g;if(n._optimisticResults){const L=this.hasListeners(),Y=!L&&wf(t,n),le=L&&Pf(t,r,n,i);(Y||le)&&(f={...f,...Lm(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:x,errorUpdatedAt:P,status:k}=f;g=f.data;let m=!1;if(n.placeholderData!==void 0&&g===void 0&&k==="pending"){let L;s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(L=s.data,m=!0):L=typeof n.placeholderData=="function"?n.placeholderData((z=y(this,Si))==null?void 0:z.state.data,y(this,Si)):n.placeholderData,L!==void 0&&(k="success",g=yu(s==null?void 0:s.data,L,n),h=!0)}if(n.select&&g!==void 0&&!m)if(s&&g===(l==null?void 0:l.data)&&n.select===y(this,Qs))g=y(this,Pi);else try{I(this,Qs,n.select),g=n.select(g),g=yu(s==null?void 0:s.data,g,n),I(this,Pi,g),I(this,bn,null)}catch(L){I(this,bn,L)}y(this,bn)&&(x=y(this,bn),g=y(this,Pi),P=Date.now(),k="error");const p=f.fetchStatus==="fetching",v=k==="pending",S=k==="error",R=v&&p,M=g!==void 0,N={status:k,fetchStatus:f.fetchStatus,isPending:v,isSuccess:k==="success",isError:S,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:f.dataUpdatedAt,error:x,errorUpdatedAt:P,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:p,isRefetching:p&&!v,isLoadingError:S&&!M,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&M,isStale:Oc(t,n),refetch:this.refetch,promise:y(this,cn),isEnabled:_t(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=N.data!==void 0,Y=N.status==="error"&&!L,le=Ke=>{Y?Ke.reject(N.error):L&&Ke.resolve(N.data)},Ce=()=>{const Ke=I(this,cn,N.promise=xu());le(Ke)},Ee=y(this,cn);switch(Ee.status){case"pending":t.queryHash===r.queryHash&&le(Ee);break;case"fulfilled":(Y||N.data!==Ee.value)&&Ce();break;case"rejected":(!Y||N.error!==Ee.reason)&&Ce();break}}return N}updateResult(){const t=y(this,rt),n=this.createResult(y(this,te),this.options);if(I(this,Tr,y(this,te).state),I(this,wi,this.options),y(this,Tr).data!==void 0&&I(this,Si,y(this,te)),ha(n,t))return;I(this,rt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!y(this,ji).size)return!0;const l=new Set(s??y(this,ji));return this.options.throwOnError&&l.add("error"),Object.keys(y(this,rt)).some(a=>{const o=a;return y(this,rt)[o]!==t[o]&&l.has(o)})};G(this,ue,Mm).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&G(this,ue,ju).call(this)}},ut=new WeakMap,te=new WeakMap,Bs=new WeakMap,rt=new WeakMap,Tr=new WeakMap,wi=new WeakMap,cn=new WeakMap,bn=new WeakMap,Qs=new WeakMap,Pi=new WeakMap,Si=new WeakMap,Dr=new WeakMap,Lr=new WeakMap,Bn=new WeakMap,ji=new WeakMap,ue=new WeakSet,us=function(t){G(this,ue,ku).call(this);let n=y(this,te).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(st)),n},wu=function(){G(this,ue,Cu).call(this);const t=ir(this.options.staleTime,y(this,te));if(As.isServer()||y(this,rt).isStale||!gu(t))return;const r=Cm(y(this,rt).dataUpdatedAt,t)+1;I(this,Dr,Sr.setTimeout(()=>{y(this,rt).isStale||this.updateResult()},r))},Pu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,te)):this.options.refetchInterval)??!1},Su=function(t){G(this,ue,Eu).call(this),I(this,Bn,t),!(As.isServer()||_t(this.options.enabled,y(this,te))===!1||!gu(y(this,Bn))||y(this,Bn)===0)&&I(this,Lr,Sr.setInterval(()=>{(this.options.refetchIntervalInBackground||Dc.isFocused())&&G(this,ue,us).call(this)},y(this,Bn)))},ju=function(){G(this,ue,wu).call(this),G(this,ue,Su).call(this,G(this,ue,Pu).call(this))},Cu=function(){y(this,Dr)!==void 0&&(Sr.clearTimeout(y(this,Dr)),I(this,Dr,void 0))},Eu=function(){y(this,Lr)!==void 0&&(Sr.clearInterval(y(this,Lr)),I(this,Lr,void 0))},ku=function(){const t=y(this,ut).getQueryCache().build(y(this,ut),this.options);if(t===y(this,te))return;const n=y(this,te);I(this,te,t),I(this,Bs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Mm=function(t){ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(y(this,rt))}),y(this,ut).getQueryCache().notify({query:y(this,te),type:"observerResultsUpdated"})})},ih);function g0(e,t){return _t(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&_t(t.retryOnMount,e)===!1)}function wf(e,t){return g0(e,t)||e.state.data!==void 0&&Nu(e,t,t.refetchOnMount)}function Nu(e,t,n){if(_t(t.enabled,e)!==!1&&ir(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Oc(e,t)}return!1}function Pf(e,t,n,r){return(e!==t||_t(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Oc(e,n)}function Oc(e,t){return _t(t.enabled,e)!==!1&&e.isStaleByTime(ir(t.staleTime,e))}function v0(e,t){return!ha(e.getCurrentResult(),t)}var Hs,Gt,Ge,Mr,Yt,Ln,sh,y0=(sh=class extends Tm{constructor(t){super();Q(this,Yt);Q(this,Hs);Q(this,Gt);Q(this,Ge);Q(this,Mr);I(this,Hs,t.client),this.mutationId=t.mutationId,I(this,Ge,t.mutationCache),I(this,Gt,[]),this.state=t.state||Fm(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,Gt).includes(t)||(y(this,Gt).push(t),this.clearGcTimeout(),y(this,Ge).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){I(this,Gt,y(this,Gt).filter(n=>n!==t)),this.scheduleGc(),y(this,Ge).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,Gt).length||(this.state.status==="pending"?this.scheduleGc():y(this,Ge).remove(this))}continue(){var t;return((t=y(this,Mr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,a,o,c,d,f,h,g,x,P,k,m,p,v,S,R,M,w;const n=()=>{G(this,Yt,Ln).call(this,{type:"continue"})},r={client:y(this,Hs),meta:this.options.meta,mutationKey:this.options.mutationKey};I(this,Mr,Rm({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(N,z)=>{G(this,Yt,Ln).call(this,{type:"failed",failureCount:N,error:z})},onPause:()=>{G(this,Yt,Ln).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,Ge).canRun(this)}));const i=this.state.status==="pending",s=!y(this,Mr).canStart();try{if(i)n();else{G(this,Yt,Ln).call(this,{type:"pending",variables:t,isPaused:s}),y(this,Ge).config.onMutate&&await y(this,Ge).config.onMutate(t,this,r);const z=await((a=(l=this.options).onMutate)==null?void 0:a.call(l,t,r));z!==this.state.context&&G(this,Yt,Ln).call(this,{type:"pending",context:z,variables:t,isPaused:s})}const N=await y(this,Mr).start();return await((c=(o=y(this,Ge).config).onSuccess)==null?void 0:c.call(o,N,t,this.state.context,this,r)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,N,t,this.state.context,r)),await((g=(h=y(this,Ge).config).onSettled)==null?void 0:g.call(h,N,null,this.state.variables,this.state.context,this,r)),await((P=(x=this.options).onSettled)==null?void 0:P.call(x,N,null,t,this.state.context,r)),G(this,Yt,Ln).call(this,{type:"success",data:N}),N}catch(N){try{await((m=(k=y(this,Ge).config).onError)==null?void 0:m.call(k,N,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((v=(p=this.options).onError)==null?void 0:v.call(p,N,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((R=(S=y(this,Ge).config).onSettled)==null?void 0:R.call(S,void 0,N,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((w=(M=this.options).onSettled)==null?void 0:w.call(M,void 0,N,t,this.state.context,r))}catch(z){Promise.reject(z)}throw G(this,Yt,Ln).call(this,{type:"error",error:N}),N}finally{y(this,Ge).runNext(this)}}},Hs=new WeakMap,Gt=new WeakMap,Ge=new WeakMap,Mr=new WeakMap,Yt=new WeakSet,Ln=function(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"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};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"}}};this.state=n(this.state),ze.batch(()=>{y(this,Gt).forEach(r=>{r.onMutationUpdate(t)}),y(this,Ge).notify({mutation:this,type:"updated",action:t})})},sh);function Fm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dn,Ut,Vs,lh,x0=(lh=class extends $i{constructor(t={}){super();Q(this,dn);Q(this,Ut);Q(this,Vs);this.config=t,I(this,dn,new Set),I(this,Ut,new Map),I(this,Vs,0)}build(t,n,r){const i=new y0({client:t,mutationCache:this,mutationId:++ll(this,Vs)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){y(this,dn).add(t);const n=jl(t);if(typeof n=="string"){const r=y(this,Ut).get(n);r?r.push(t):y(this,Ut).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,dn).delete(t)){const n=jl(t);if(typeof n=="string"){const r=y(this,Ut).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&y(this,Ut).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=jl(t);if(typeof n=="string"){const r=y(this,Ut).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=jl(t);if(typeof n=="string"){const i=(r=y(this,Ut).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ze.batch(()=>{y(this,dn).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,dn).clear(),y(this,Ut).clear()})}getAll(){return Array.from(y(this,dn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mf(n,r))}findAll(t={}){return this.getAll().filter(n=>mf(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(st))))}},dn=new WeakMap,Ut=new WeakMap,Vs=new WeakMap,lh);function jl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var fn,Qn,ct,hn,yn,bl,Ru,ah,_0=(ah=class extends $i{constructor(n,r){super();Q(this,yn);Q(this,fn);Q(this,Qn);Q(this,ct);Q(this,hn);I(this,fn,n),this.setOptions(r),this.bindMethods(),G(this,yn,bl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=y(this,fn).defaultMutationOptions(n),ha(this.options,r)||y(this,fn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,ct),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&br(r.mutationKey)!==br(this.options.mutationKey)?this.reset():((i=y(this,ct))==null?void 0:i.state.status)==="pending"&&y(this,ct).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=y(this,ct))==null||n.removeObserver(this)}onMutationUpdate(n){G(this,yn,bl).call(this),G(this,yn,Ru).call(this,n)}getCurrentResult(){return y(this,Qn)}reset(){var n;(n=y(this,ct))==null||n.removeObserver(this),I(this,ct,void 0),G(this,yn,bl).call(this),G(this,yn,Ru).call(this)}mutate(n,r){var i;return I(this,hn,r),(i=y(this,ct))==null||i.removeObserver(this),I(this,ct,y(this,fn).getMutationCache().build(y(this,fn),this.options)),y(this,ct).addObserver(this),y(this,ct).execute(n)}},fn=new WeakMap,Qn=new WeakMap,ct=new WeakMap,hn=new WeakMap,yn=new WeakSet,bl=function(){var r;const n=((r=y(this,ct))==null?void 0:r.state)??Fm();I(this,Qn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ru=function(n){ze.batch(()=>{var r,i,s,l,a,o,c,d;if(y(this,hn)&&this.hasListeners()){const f=y(this,Qn).variables,h=y(this,Qn).context,g={client:y(this,fn),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=y(this,hn)).onSuccess)==null||i.call(r,n.data,f,h,g)}catch(x){Promise.reject(x)}try{(l=(s=y(this,hn)).onSettled)==null||l.call(s,n.data,null,f,h,g)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(o=(a=y(this,hn)).onError)==null||o.call(a,n.error,f,h,g)}catch(x){Promise.reject(x)}try{(d=(c=y(this,hn)).onSettled)==null||d.call(c,void 0,n.error,f,h,g)}catch(x){Promise.reject(x)}}}this.listeners.forEach(f=>{f(y(this,Qn))})})},ah),Xt,oh,w0=(oh=class extends $i{constructor(t={}){super();Q(this,Xt);this.config=t,I(this,Xt,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Lc(i,n);let l=this.get(s);return l||(l=new p0({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){y(this,Xt).has(t.queryHash)||(y(this,Xt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=y(this,Xt).get(t.queryHash);n&&(t.destroy(),n===t&&y(this,Xt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,Xt).get(t)}getAll(){return[...y(this,Xt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>pf(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>pf(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xt=new WeakMap,oh),Re,Hn,Vn,Ci,Ei,Kn,ki,Ni,uh,P0=(uh=class{constructor(e={}){Q(this,Re);Q(this,Hn);Q(this,Vn);Q(this,Ci);Q(this,Ei);Q(this,Kn);Q(this,ki);Q(this,Ni);I(this,Re,e.queryCache||new w0),I(this,Hn,e.mutationCache||new x0),I(this,Vn,e.defaultOptions||{}),I(this,Ci,new Map),I(this,Ei,new Map),I(this,Kn,0)}mount(){ll(this,Kn)._++,y(this,Kn)===1&&(I(this,ki,Dc.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,Re).onFocus())})),I(this,Ni,pa.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,Re).onOnline())})))}unmount(){var e,t;ll(this,Kn)._--,y(this,Kn)===0&&((e=y(this,ki))==null||e.call(this),I(this,ki,void 0),(t=y(this,Ni))==null||t.call(this),I(this,Ni,void 0))}isFetching(e){return y(this,Re).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,Hn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,Re).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=y(this,Re).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ir(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return y(this,Re).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=y(this,Re).get(r.queryHash),s=i==null?void 0:i.state.data,l=n0(t,s);if(l!==void 0)return y(this,Re).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>y(this,Re).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,Re).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=y(this,Re);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=y(this,Re);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>y(this,Re).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(st).catch(st)}invalidateQueries(e,t={}){return ze.batch(()=>(y(this,Re).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ze.batch(()=>y(this,Re).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(st)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(st)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=y(this,Re).build(this,t);return n.isStaleByTime(ir(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(st).catch(st)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(st).catch(st)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return pa.isOnline()?y(this,Hn).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,Re)}getMutationCache(){return y(this,Hn)}getDefaultOptions(){return y(this,Vn)}setDefaultOptions(e){I(this,Vn,e)}setQueryDefaults(e,t){y(this,Ci).set(br(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Ci).values()],n={};return t.forEach(r=>{zs(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){y(this,Ei).set(br(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Ei).values()],n={};return t.forEach(r=>{zs(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,Vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Mc&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,Vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,Re).clear(),y(this,Hn).clear()}},Re=new WeakMap,Hn=new WeakMap,Vn=new WeakMap,Ci=new WeakMap,Ei=new WeakMap,Kn=new WeakMap,ki=new WeakMap,Ni=new WeakMap,uh),Om=C.createContext(void 0),Xs=e=>{const t=C.useContext(Om);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},S0=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Om.Provider,{value:e,children:t})),Im=C.createContext(!1),j0=()=>C.useContext(Im);Im.Provider;function C0(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var E0=C.createContext(C0()),k0=()=>C.useContext(E0),N0=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Fc(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},R0=e=>{C.useEffect(()=>{e.clearReset()},[e])},T0=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Fc(n,[e.error,r])),D0=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L0=(e,t)=>e.isLoading&&e.isFetching&&!t,M0=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Sf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function F0(e,t,n){var g,x,P,k;const r=j0(),i=k0(),s=Xs(),l=s.defaultQueryOptions(e);(x=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||x.call(g,l);const a=s.getQueryCache().get(l.queryHash),o=e.subscribed!==!1;l._optimisticResults=r?"isRestoring":o?"optimistic":void 0,D0(l),N0(l,i,a),R0(i);const c=!s.getQueryCache().get(l.queryHash),[d]=C.useState(()=>new t(s,l)),f=d.getOptimisticResult(l),h=!r&&o;if(C.useSyncExternalStore(C.useCallback(m=>{const p=h?d.subscribe(ze.batchCalls(m)):st;return d.updateResult(),p},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),C.useEffect(()=>{d.setOptions(l)},[l,d]),M0(l,f))throw Sf(l,d,i);if(T0({result:f,errorResetBoundary:i,throwOnError:l.throwOnError,query:a,suspense:l.suspense}))throw f.error;if((k=(P=s.getDefaultOptions().queries)==null?void 0:P._experimental_afterQuery)==null||k.call(P,l,f),l.experimental_prefetchInRender&&!As.isServer()&&L0(f,r)){const m=c?Sf(l,d,i):a==null?void 0:a.promise;m==null||m.catch(st).finally(()=>{d.updateResult()})}return l.notifyOnChangeProps?f:d.trackResult(f)}function tn(e,t){return F0(e,m0)}function ma(e,t){const n=Xs(),[r]=C.useState(()=>new _0(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(l=>r.subscribe(ze.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=C.useCallback((l,a)=>{r.mutate(l,a).catch(st)},[r]);if(i.error&&Fc(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}/**
|
|
41
|
-
* @remix-run/router v1.23.3
|
|
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 xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xe.apply(null,arguments)}var Fe;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Fe||(Fe={}));const jf="popstate";function O0(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:l,hash:a}=r.location;return Us("",{pathname:s,search:l,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Qr(i)}return z0(t,n,null,e)}function X(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Br(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function I0(){return Math.random().toString(36).substr(2,8)}function Cf(e,t){return{usr:e.state,key:e.key,idx:t}}function Us(e,t,n,r){return n===void 0&&(n=null),xe({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?cr(t):t,{state:n,key:t&&t.key||r||I0()})}function Qr(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 cr(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 z0(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,l=i.history,a=Fe.Pop,o=null,c=d();c==null&&(c=0,l.replaceState(xe({},l.state,{idx:c}),""));function d(){return(l.state||{idx:null}).idx}function f(){a=Fe.Pop;let k=d(),m=k==null?null:k-c;c=k,o&&o({action:a,location:P.location,delta:m})}function h(k,m){a=Fe.Push;let p=Us(P.location,k,m);c=d()+1;let v=Cf(p,c),S=P.createHref(p);try{l.pushState(v,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(S)}s&&o&&o({action:a,location:P.location,delta:1})}function g(k,m){a=Fe.Replace;let p=Us(P.location,k,m);c=d();let v=Cf(p,c),S=P.createHref(p);l.replaceState(v,"",S),s&&o&&o({action:a,location:P.location,delta:0})}function x(k){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof k=="string"?k:Qr(k);return p=p.replace(/ $/,"%20"),X(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let P={get action(){return a},get location(){return e(i,l)},listen(k){if(o)throw new Error("A history only accepts one active listener");return i.addEventListener(jf,f),o=k,()=>{i.removeEventListener(jf,f),o=null}},createHref(k){return t(i,k)},createURL:x,encodeLocation(k){let m=x(k);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:g,go(k){return l.go(k)}};return P}var de;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(de||(de={}));const A0=new Set(["lazy","caseSensitive","path","id","index","children"]);function U0(e){return e.index===!0}function ga(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,s)=>{let l=[...n,String(s)],a=typeof i.id=="string"?i.id:l.join("-");if(X(i.index!==!0||!i.children,"Cannot specify children on an index route"),X(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),U0(i)){let o=xe({},i,t(i),{id:a});return r[a]=o,o}else{let o=xe({},i,t(i),{id:a,children:void 0});return r[a]=o,i.children&&(o.children=ga(i.children,t,l,r)),o}})}function yr(e,t,n){return n===void 0&&(n="/"),Bl(e,t,n,!1)}function Bl(e,t,n,r){let i=typeof t=="string"?cr(t):t,s=Sn(i.pathname||"/",n);if(s==null)return null;let l=zm(e);b0(l);let a=null,o=J0(s);for(let c=0;a==null&&c<l.length;++c)a=Y0(l[c],o,r);return a}function $0(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function zm(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,l,a)=>{let o={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:l,route:s};o.relativePath.startsWith("/")&&(X(o.relativePath.startsWith(r),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(r.length));let c=vn([r,o.relativePath]),d=n.concat(o);s.children&&s.children.length>0&&(X(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),zm(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:q0(c,s.index),routesMeta:d})};return e.forEach((s,l)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,l);else for(let o of Am(s.path))i(s,l,o)}),t}function Am(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let l=Am(r.join("/")),a=[];return a.push(...l.map(o=>o===""?s:[s,o].join("/"))),i&&a.push(...l),a.map(o=>e.startsWith("/")&&o===""?"/":o)}function b0(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:G0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const B0=/^:[\w-]+$/,Q0=3,H0=2,V0=1,K0=10,W0=-2,Ef=e=>e==="*";function q0(e,t){let n=e.split("/"),r=n.length;return n.some(Ef)&&(r+=W0),t&&(r+=H0),n.filter(i=>!Ef(i)).reduce((i,s)=>i+(B0.test(s)?Q0:s===""?V0:K0),r)}function G0(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Y0(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},s="/",l=[];for(let a=0;a<r.length;++a){let o=r[a],c=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",f=va({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},d),h=o.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=va({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},d)),!f)return null;Object.assign(i,f.params),l.push({params:i,pathname:vn([s,f.pathname]),pathnameBase:n1(vn([s,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(s=vn([s,f.pathnameBase]))}return l}function va(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=X0(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],l=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:h,isOptional:g}=d;if(h==="*"){let P=a[f]||"";l=s.slice(0,s.length-P.length).replace(/(.)\/+$/,"$1")}const x=a[f];return g&&!x?c[h]=void 0:c[h]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:l,pattern:e}}function X0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Br(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=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,a,o)=>(r.push({paramName:a,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function J0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Br(!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 Sn(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)||"/"}const Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,e1=e=>Z0.test(e);function t1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?cr(e):e,s;if(n)if(e1(n))s=n;else{if(n.includes("//")){let l=n;n=Ic(n),Br(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?s=kf(n.substring(1),"/"):s=kf(n,t)}else s=t;return{pathname:s,search:r1(r),hash:i1(i)}}function kf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function _o(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 Um(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ia(e,t){let n=Um(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function za(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=cr(e):(i=xe({},e),X(!i.pathname||!i.pathname.includes("?"),_o("?","pathname","search",i)),X(!i.pathname||!i.pathname.includes("#"),_o("#","pathname","hash",i)),X(!i.search||!i.search.includes("#"),_o("#","search","hash",i)));let s=e===""||i.pathname==="",l=s?"/":i.pathname,a;if(l==null)a=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?t[f]:"/"}let o=t1(i,a),c=l&&l!=="/"&&l.endsWith("/"),d=(s||l===".")&&n.endsWith("/");return!o.pathname.endsWith("/")&&(c||d)&&(o.pathname+="/"),o}const Ic=e=>e.replace(/\/\/+/g,"/"),vn=e=>Ic(e.join("/")),n1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),r1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,i1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ya{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function $s(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $m=["post","put","patch","delete"],s1=new Set($m),l1=["get",...$m],a1=new Set(l1),o1=new Set([301,302,303,307,308]),u1=new Set([307,308]),wo={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},c1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},es={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},zc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,d1=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),bm="remix-router-transitions";function f1(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let _=e.detectErrorBoundary;i=j=>({hasErrorBoundary:_(j)})}else i=d1;let s={},l=ga(e.routes,i,void 0,s),a,o=e.basename||"/",c=e.dataStrategy||g1,d=e.patchRoutesOnNavigation,f=xe({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,g=new Set,x=null,P=null,k=null,m=e.hydrationData!=null,p=yr(l,e.history.location,o),v=!1,S=null;if(p==null&&!d){let _=dt(404,{pathname:e.history.location.pathname}),{matches:j,route:E}=Af(l);p=j,S={[E.id]:_}}p&&!e.hydrationData&&nl(p,l,e.history.location.pathname).active&&(p=null);let R;if(p)if(p.some(_=>_.route.lazy))R=!1;else if(!p.some(_=>_.route.loader))R=!0;else if(f.v7_partialHydration){let _=e.hydrationData?e.hydrationData.loaderData:null,j=e.hydrationData?e.hydrationData.errors:null;if(j){let E=p.findIndex(T=>j[T.route.id]!==void 0);R=p.slice(0,E+1).every(T=>!Du(T.route,_,j))}else R=p.every(E=>!Du(E.route,_,j))}else R=e.hydrationData!=null;else if(R=!1,p=[],f.v7_partialHydration){let _=nl(null,l,e.history.location.pathname);_.active&&_.matches&&(v=!0,p=_.matches)}let M,w={historyAction:e.history.action,location:e.history.location,matches:p,initialized:R,navigation:wo,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},N=Fe.Pop,z=!1,L,Y=!1,le=new Map,Ce=null,Ee=!1,Ke=!1,En=[],kn=new Set,F=new Map,V=0,W=-1,he=new Map,pe=new Set,It=new Map,vt=new Map,Ze=new Set,et=new Map,kt=new Map,Zs;function sg(){if(h=e.history.listen(_=>{let{action:j,location:E,delta:T}=_;if(Zs){Zs(),Zs=void 0;return}Br(kt.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let O=Zc({currentLocation:w.location,nextLocation:E,historyAction:j});if(O&&T!=null){let H=new Promise(K=>{Zs=K});e.history.go(T*-1),tl(O,{state:"blocked",location:E,proceed(){tl(O,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),H.then(()=>e.history.go(T))},reset(){let K=new Map(w.blockers);K.set(O,es),tt({blockers:K})}});return}return fr(j,E)}),n){T1(t,le);let _=()=>D1(t,le);t.addEventListener("pagehide",_),Ce=()=>t.removeEventListener("pagehide",_)}return w.initialized||fr(Fe.Pop,w.location,{initialHydration:!0}),M}function lg(){h&&h(),Ce&&Ce(),g.clear(),L&&L.abort(),w.fetchers.forEach((_,j)=>el(j)),w.blockers.forEach((_,j)=>Jc(j))}function ag(_){return g.add(_),()=>g.delete(_)}function tt(_,j){j===void 0&&(j={}),w=xe({},w,_);let E=[],T=[];f.v7_fetcherPersist&&w.fetchers.forEach((O,H)=>{O.state==="idle"&&(Ze.has(H)?T.push(H):E.push(H))}),Ze.forEach(O=>{!w.fetchers.has(O)&&!F.has(O)&&T.push(O)}),[...g].forEach(O=>O(w,{deletedFetchers:T,viewTransitionOpts:j.viewTransitionOpts,flushSync:j.flushSync===!0})),f.v7_fetcherPersist?(E.forEach(O=>w.fetchers.delete(O)),T.forEach(O=>el(O))):T.forEach(O=>Ze.delete(O))}function Kr(_,j,E){var T,O;let{flushSync:H}=E===void 0?{}:E,K=w.actionData!=null&&w.navigation.formMethod!=null&&bt(w.navigation.formMethod)&&w.navigation.state==="loading"&&((T=_.state)==null?void 0:T._isRedirect)!==!0,$;j.actionData?Object.keys(j.actionData).length>0?$=j.actionData:$=null:K?$=w.actionData:$=null;let b=j.loaderData?If(w.loaderData,j.loaderData,j.matches||[],j.errors):w.loaderData,U=w.blockers;U.size>0&&(U=new Map(U),U.forEach((ne,Be)=>U.set(Be,es)));let B=z===!0||w.navigation.formMethod!=null&&bt(w.navigation.formMethod)&&((O=_.state)==null?void 0:O._isRedirect)!==!0;a&&(l=a,a=void 0),Ee||N===Fe.Pop||(N===Fe.Push?e.history.push(_,_.state):N===Fe.Replace&&e.history.replace(_,_.state));let q;if(N===Fe.Pop){let ne=le.get(w.location.pathname);ne&&ne.has(_.pathname)?q={currentLocation:w.location,nextLocation:_}:le.has(_.pathname)&&(q={currentLocation:_,nextLocation:w.location})}else if(Y){let ne=le.get(w.location.pathname);ne?ne.add(_.pathname):(ne=new Set([_.pathname]),le.set(w.location.pathname,ne)),q={currentLocation:w.location,nextLocation:_}}tt(xe({},j,{actionData:$,loaderData:b,historyAction:N,location:_,initialized:!0,navigation:wo,revalidation:"idle",restoreScrollPosition:td(_,j.matches||w.matches),preventScrollReset:B,blockers:U}),{viewTransitionOpts:q,flushSync:H===!0}),N=Fe.Pop,z=!1,Y=!1,Ee=!1,Ke=!1,En=[]}async function Vc(_,j){if(typeof _=="number"){e.history.go(_);return}let E=Tu(w.location,w.matches,o,f.v7_prependBasename,_,f.v7_relativeSplatPath,j==null?void 0:j.fromRouteId,j==null?void 0:j.relative),{path:T,submission:O,error:H}=Nf(f.v7_normalizeFormMethod,!1,E,j),K=w.location,$=Us(w.location,T,j&&j.state);$=xe({},$,e.history.encodeLocation($));let b=j&&j.replace!=null?j.replace:void 0,U=Fe.Push;b===!0?U=Fe.Replace:b===!1||O!=null&&bt(O.formMethod)&&O.formAction===w.location.pathname+w.location.search&&(U=Fe.Replace);let B=j&&"preventScrollReset"in j?j.preventScrollReset===!0:void 0,q=(j&&j.flushSync)===!0,ne=Zc({currentLocation:K,nextLocation:$,historyAction:U});if(ne){tl(ne,{state:"blocked",location:$,proceed(){tl(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),Vc(_,j)},reset(){let Be=new Map(w.blockers);Be.set(ne,es),tt({blockers:Be})}});return}return await fr(U,$,{submission:O,pendingError:H,preventScrollReset:B,replace:j&&j.replace,enableViewTransition:j&&j.viewTransition,flushSync:q})}function og(){if(Ba(),tt({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){fr(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}fr(N||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:Y===!0})}}async function fr(_,j,E){L&&L.abort(),L=null,N=_,Ee=(E&&E.startUninterruptedRevalidation)===!0,yg(w.location,w.matches),z=(E&&E.preventScrollReset)===!0,Y=(E&&E.enableViewTransition)===!0;let T=a||l,O=E&&E.overrideNavigation,H=E!=null&&E.initialHydration&&w.matches&&w.matches.length>0&&!v?w.matches:yr(T,j,o),K=(E&&E.flushSync)===!0;if(H&&w.initialized&&!Ke&&P1(w.location,j)&&!(E&&E.submission&&bt(E.submission.formMethod))){Kr(j,{matches:H},{flushSync:K});return}let $=nl(H,T,j.pathname);if($.active&&$.matches&&(H=$.matches),!H){let{error:me,notFoundMatches:ae,route:ke}=Qa(j.pathname);Kr(j,{matches:ae,loaderData:{},errors:{[ke.id]:me}},{flushSync:K});return}L=new AbortController;let b=Xr(e.history,j,L.signal,E&&E.submission),U;if(E&&E.pendingError)U=[xr(H).route.id,{type:de.error,error:E.pendingError}];else if(E&&E.submission&&bt(E.submission.formMethod)){let me=await ug(b,j,E.submission,H,$.active,{replace:E.replace,flushSync:K});if(me.shortCircuited)return;if(me.pendingActionResult){let[ae,ke]=me.pendingActionResult;if(wt(ke)&&$s(ke.error)&&ke.error.status===404){L=null,Kr(j,{matches:me.matches,loaderData:{},errors:{[ae]:ke.error}});return}}H=me.matches||H,U=me.pendingActionResult,O=Po(j,E.submission),K=!1,$.active=!1,b=Xr(e.history,b.url,b.signal)}let{shortCircuited:B,matches:q,loaderData:ne,errors:Be}=await cg(b,j,H,$.active,O,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,K,U);B||(L=null,Kr(j,xe({matches:q||H},zf(U),{loaderData:ne,errors:Be})))}async function ug(_,j,E,T,O,H){H===void 0&&(H={}),Ba();let K=N1(j,E);if(tt({navigation:K},{flushSync:H.flushSync===!0}),O){let U=await rl(T,j.pathname,_.signal);if(U.type==="aborted")return{shortCircuited:!0};if(U.type==="error"){let B=xr(U.partialMatches).route.id;return{matches:U.partialMatches,pendingActionResult:[B,{type:de.error,error:U.error}]}}else if(U.matches)T=U.matches;else{let{notFoundMatches:B,error:q,route:ne}=Qa(j.pathname);return{matches:B,pendingActionResult:[ne.id,{type:de.error,error:q}]}}}let $,b=cs(T,j);if(!b.route.action&&!b.route.lazy)$={type:de.error,error:dt(405,{method:_.method,pathname:j.pathname,routeId:b.route.id})};else if($=(await Bi("action",w,_,[b],T,null))[b.route.id],_.signal.aborted)return{shortCircuited:!0};if(jr($)){let U;return H&&H.replace!=null?U=H.replace:U=Mf($.response.headers.get("Location"),new URL(_.url),o,e.history)===w.location.pathname+w.location.search,await hr(_,$,!0,{submission:E,replace:U}),{shortCircuited:!0}}if(Gn($))throw dt(400,{type:"defer-action"});if(wt($)){let U=xr(T,b.route.id);return(H&&H.replace)!==!0&&(N=Fe.Push),{matches:T,pendingActionResult:[U.route.id,$]}}return{matches:T,pendingActionResult:[b.route.id,$]}}async function cg(_,j,E,T,O,H,K,$,b,U,B){let q=O||Po(j,H),ne=H||K||$f(q),Be=!Ee&&(!f.v7_partialHydration||!b);if(T){if(Be){let Ne=Kc(B);tt(xe({navigation:q},Ne!==void 0?{actionData:Ne}:{}),{flushSync:U})}let ie=await rl(E,j.pathname,_.signal);if(ie.type==="aborted")return{shortCircuited:!0};if(ie.type==="error"){let Ne=xr(ie.partialMatches).route.id;return{matches:ie.partialMatches,loaderData:{},errors:{[Ne]:ie.error}}}else if(ie.matches)E=ie.matches;else{let{error:Ne,notFoundMatches:qr,route:Vi}=Qa(j.pathname);return{matches:qr,loaderData:{},errors:{[Vi.id]:Ne}}}}let me=a||l,[ae,ke]=Tf(e.history,w,E,ne,j,f.v7_partialHydration&&b===!0,f.v7_skipActionErrorRevalidation,Ke,En,kn,Ze,It,pe,me,o,B);if(Ha(ie=>!(E&&E.some(Ne=>Ne.route.id===ie))||ae&&ae.some(Ne=>Ne.route.id===ie)),W=++V,ae.length===0&&ke.length===0){let ie=Yc();return Kr(j,xe({matches:E,loaderData:{},errors:B&&wt(B[1])?{[B[0]]:B[1].error}:null},zf(B),ie?{fetchers:new Map(w.fetchers)}:{}),{flushSync:U}),{shortCircuited:!0}}if(Be){let ie={};if(!T){ie.navigation=q;let Ne=Kc(B);Ne!==void 0&&(ie.actionData=Ne)}ke.length>0&&(ie.fetchers=dg(ke)),tt(ie,{flushSync:U})}ke.forEach(ie=>{Rn(ie.key),ie.controller&&F.set(ie.key,ie.controller)});let Wr=()=>ke.forEach(ie=>Rn(ie.key));L&&L.signal.addEventListener("abort",Wr);let{loaderResults:Qi,fetcherResults:ln}=await Wc(w,E,ae,ke,_);if(_.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Wr),ke.forEach(ie=>F.delete(ie.key));let Kt=Cl(Qi);if(Kt)return await hr(_,Kt.result,!0,{replace:$}),{shortCircuited:!0};if(Kt=Cl(ln),Kt)return pe.add(Kt.key),await hr(_,Kt.result,!0,{replace:$}),{shortCircuited:!0};let{loaderData:Va,errors:Hi}=Of(w,E,Qi,B,ke,ln,et);et.forEach((ie,Ne)=>{ie.subscribe(qr=>{(qr||ie.done)&&et.delete(Ne)})}),f.v7_partialHydration&&b&&w.errors&&(Hi=xe({},w.errors,Hi));let pr=Yc(),il=Xc(W),sl=pr||il||ke.length>0;return xe({matches:E,loaderData:Va,errors:Hi},sl?{fetchers:new Map(w.fetchers)}:{})}function Kc(_){if(_&&!wt(_[1]))return{[_[0]]:_[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function dg(_){return _.forEach(j=>{let E=w.fetchers.get(j.key),T=ts(void 0,E?E.data:void 0);w.fetchers.set(j.key,T)}),new Map(w.fetchers)}function fg(_,j,E,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Rn(_);let O=(T&&T.flushSync)===!0,H=a||l,K=Tu(w.location,w.matches,o,f.v7_prependBasename,E,f.v7_relativeSplatPath,j,T==null?void 0:T.relative),$=yr(H,K,o),b=nl($,H,K);if(b.active&&b.matches&&($=b.matches),!$){sn(_,j,dt(404,{pathname:K}),{flushSync:O});return}let{path:U,submission:B,error:q}=Nf(f.v7_normalizeFormMethod,!0,K,T);if(q){sn(_,j,q,{flushSync:O});return}let ne=cs($,U),Be=(T&&T.preventScrollReset)===!0;if(B&&bt(B.formMethod)){hg(_,j,U,ne,$,b.active,O,Be,B);return}It.set(_,{routeId:j,path:U}),pg(_,j,U,ne,$,b.active,O,Be,B)}async function hg(_,j,E,T,O,H,K,$,b){Ba(),It.delete(_);function U(Me){if(!Me.route.action&&!Me.route.lazy){let Gr=dt(405,{method:b.formMethod,pathname:E,routeId:j});return sn(_,j,Gr,{flushSync:K}),!0}return!1}if(!H&&U(T))return;let B=w.fetchers.get(_);Nn(_,R1(b,B),{flushSync:K});let q=new AbortController,ne=Xr(e.history,E,q.signal,b);if(H){let Me=await rl(O,new URL(ne.url).pathname,ne.signal,_);if(Me.type==="aborted")return;if(Me.type==="error"){sn(_,j,Me.error,{flushSync:K});return}else if(Me.matches){if(O=Me.matches,T=cs(O,E),U(T))return}else{sn(_,j,dt(404,{pathname:E}),{flushSync:K});return}}F.set(_,q);let Be=V,ae=(await Bi("action",w,ne,[T],O,_))[T.route.id];if(ne.signal.aborted){F.get(_)===q&&F.delete(_);return}if(f.v7_fetcherPersist&&Ze.has(_)){if(jr(ae)||wt(ae)){Nn(_,Mn(void 0));return}}else{if(jr(ae))if(F.delete(_),W>Be){Nn(_,Mn(void 0));return}else return pe.add(_),Nn(_,ts(b)),hr(ne,ae,!1,{fetcherSubmission:b,preventScrollReset:$});if(wt(ae)){sn(_,j,ae.error);return}}if(Gn(ae))throw dt(400,{type:"defer-action"});let ke=w.navigation.location||w.location,Wr=Xr(e.history,ke,q.signal),Qi=a||l,ln=w.navigation.state!=="idle"?yr(Qi,w.navigation.location,o):w.matches;X(ln,"Didn't find any matches after fetcher action");let Kt=++V;he.set(_,Kt);let Va=ts(b,ae.data);w.fetchers.set(_,Va);let[Hi,pr]=Tf(e.history,w,ln,b,ke,!1,f.v7_skipActionErrorRevalidation,Ke,En,kn,Ze,It,pe,Qi,o,[T.route.id,ae]);pr.filter(Me=>Me.key!==_).forEach(Me=>{let Gr=Me.key,nd=w.fetchers.get(Gr),wg=ts(void 0,nd?nd.data:void 0);w.fetchers.set(Gr,wg),Rn(Gr),Me.controller&&F.set(Gr,Me.controller)}),tt({fetchers:new Map(w.fetchers)});let il=()=>pr.forEach(Me=>Rn(Me.key));q.signal.addEventListener("abort",il);let{loaderResults:sl,fetcherResults:ie}=await Wc(w,ln,Hi,pr,Wr);if(q.signal.aborted)return;q.signal.removeEventListener("abort",il),he.delete(_),F.delete(_),pr.forEach(Me=>F.delete(Me.key));let Ne=Cl(sl);if(Ne)return hr(Wr,Ne.result,!1,{preventScrollReset:$});if(Ne=Cl(ie),Ne)return pe.add(Ne.key),hr(Wr,Ne.result,!1,{preventScrollReset:$});let{loaderData:qr,errors:Vi}=Of(w,ln,sl,void 0,pr,ie,et);if(w.fetchers.has(_)){let Me=Mn(ae.data);w.fetchers.set(_,Me)}Xc(Kt),w.navigation.state==="loading"&&Kt>W?(X(N,"Expected pending action"),L&&L.abort(),Kr(w.navigation.location,{matches:ln,loaderData:qr,errors:Vi,fetchers:new Map(w.fetchers)})):(tt({errors:Vi,loaderData:If(w.loaderData,qr,ln,Vi),fetchers:new Map(w.fetchers)}),Ke=!1)}async function pg(_,j,E,T,O,H,K,$,b){let U=w.fetchers.get(_);Nn(_,ts(b,U?U.data:void 0),{flushSync:K});let B=new AbortController,q=Xr(e.history,E,B.signal);if(H){let ae=await rl(O,new URL(q.url).pathname,q.signal,_);if(ae.type==="aborted")return;if(ae.type==="error"){sn(_,j,ae.error,{flushSync:K});return}else if(ae.matches)O=ae.matches,T=cs(O,E);else{sn(_,j,dt(404,{pathname:E}),{flushSync:K});return}}F.set(_,B);let ne=V,me=(await Bi("loader",w,q,[T],O,_))[T.route.id];if(Gn(me)&&(me=await Ac(me,q.signal,!0)||me),F.get(_)===B&&F.delete(_),!q.signal.aborted){if(Ze.has(_)){Nn(_,Mn(void 0));return}if(jr(me))if(W>ne){Nn(_,Mn(void 0));return}else{pe.add(_),await hr(q,me,!1,{preventScrollReset:$});return}if(wt(me)){sn(_,j,me.error);return}X(!Gn(me),"Unhandled fetcher deferred data"),Nn(_,Mn(me.data))}}async function hr(_,j,E,T){let{submission:O,fetcherSubmission:H,preventScrollReset:K,replace:$}=T===void 0?{}:T;j.response.headers.has("X-Remix-Revalidate")&&(Ke=!0);let b=j.response.headers.get("Location");X(b,"Expected a Location header on the redirect Response"),b=Mf(b,new URL(_.url),o,e.history);let U=Us(w.location,b,{_isRedirect:!0});if(n){let ae=!1;if(j.response.headers.has("X-Remix-Reload-Document"))ae=!0;else if(zc.test(b)){const ke=e.history.createURL(b);ae=ke.origin!==t.location.origin||Sn(ke.pathname,o)==null}if(ae){$?t.location.replace(b):t.location.assign(b);return}}L=null;let B=$===!0||j.response.headers.has("X-Remix-Replace")?Fe.Replace:Fe.Push,{formMethod:q,formAction:ne,formEncType:Be}=w.navigation;!O&&!H&&q&&ne&&Be&&(O=$f(w.navigation));let me=O||H;if(u1.has(j.response.status)&&me&&bt(me.formMethod))await fr(B,U,{submission:xe({},me,{formAction:b}),preventScrollReset:K||z,enableViewTransition:E?Y:void 0});else{let ae=Po(U,O);await fr(B,U,{overrideNavigation:ae,fetcherSubmission:H,preventScrollReset:K||z,enableViewTransition:E?Y:void 0})}}async function Bi(_,j,E,T,O,H){let K,$={};try{K=await v1(c,_,j,E,T,O,H,s,i)}catch(b){return T.forEach(U=>{$[U.route.id]={type:de.error,error:b}}),$}for(let[b,U]of Object.entries(K))if(S1(U)){let B=U.result;$[b]={type:de.redirect,response:_1(B,E,b,O,o,f.v7_relativeSplatPath)}}else $[b]=await x1(U);return $}async function Wc(_,j,E,T,O){let H=_.matches,K=Bi("loader",_,O,E,j,null),$=Promise.all(T.map(async B=>{if(B.matches&&B.match&&B.controller){let ne=(await Bi("loader",_,Xr(e.history,B.path,B.controller.signal),[B.match],B.matches,B.key))[B.match.route.id];return{[B.key]:ne}}else return Promise.resolve({[B.key]:{type:de.error,error:dt(404,{pathname:B.path})}})})),b=await K,U=(await $).reduce((B,q)=>Object.assign(B,q),{});return await Promise.all([E1(j,b,O.signal,H,_.loaderData),k1(j,U,T)]),{loaderResults:b,fetcherResults:U}}function Ba(){Ke=!0,En.push(...Ha()),It.forEach((_,j)=>{F.has(j)&&kn.add(j),Rn(j)})}function Nn(_,j,E){E===void 0&&(E={}),w.fetchers.set(_,j),tt({fetchers:new Map(w.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function sn(_,j,E,T){T===void 0&&(T={});let O=xr(w.matches,j);el(_),tt({errors:{[O.route.id]:E},fetchers:new Map(w.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function qc(_){return vt.set(_,(vt.get(_)||0)+1),Ze.has(_)&&Ze.delete(_),w.fetchers.get(_)||c1}function el(_){let j=w.fetchers.get(_);F.has(_)&&!(j&&j.state==="loading"&&he.has(_))&&Rn(_),It.delete(_),he.delete(_),pe.delete(_),f.v7_fetcherPersist&&Ze.delete(_),kn.delete(_),w.fetchers.delete(_)}function mg(_){let j=(vt.get(_)||0)-1;j<=0?(vt.delete(_),Ze.add(_),f.v7_fetcherPersist||el(_)):vt.set(_,j),tt({fetchers:new Map(w.fetchers)})}function Rn(_){let j=F.get(_);j&&(j.abort(),F.delete(_))}function Gc(_){for(let j of _){let E=qc(j),T=Mn(E.data);w.fetchers.set(j,T)}}function Yc(){let _=[],j=!1;for(let E of pe){let T=w.fetchers.get(E);X(T,"Expected fetcher: "+E),T.state==="loading"&&(pe.delete(E),_.push(E),j=!0)}return Gc(_),j}function Xc(_){let j=[];for(let[E,T]of he)if(T<_){let O=w.fetchers.get(E);X(O,"Expected fetcher: "+E),O.state==="loading"&&(Rn(E),he.delete(E),j.push(E))}return Gc(j),j.length>0}function gg(_,j){let E=w.blockers.get(_)||es;return kt.get(_)!==j&&kt.set(_,j),E}function Jc(_){w.blockers.delete(_),kt.delete(_)}function tl(_,j){let E=w.blockers.get(_)||es;X(E.state==="unblocked"&&j.state==="blocked"||E.state==="blocked"&&j.state==="blocked"||E.state==="blocked"&&j.state==="proceeding"||E.state==="blocked"&&j.state==="unblocked"||E.state==="proceeding"&&j.state==="unblocked","Invalid blocker state transition: "+E.state+" -> "+j.state);let T=new Map(w.blockers);T.set(_,j),tt({blockers:T})}function Zc(_){let{currentLocation:j,nextLocation:E,historyAction:T}=_;if(kt.size===0)return;kt.size>1&&Br(!1,"A router only supports one blocker at a time");let O=Array.from(kt.entries()),[H,K]=O[O.length-1],$=w.blockers.get(H);if(!($&&$.state==="proceeding")&&K({currentLocation:j,nextLocation:E,historyAction:T}))return H}function Qa(_){let j=dt(404,{pathname:_}),E=a||l,{matches:T,route:O}=Af(E);return Ha(),{notFoundMatches:T,route:O,error:j}}function Ha(_){let j=[];return et.forEach((E,T)=>{(!_||_(T))&&(E.cancel(),j.push(T),et.delete(T))}),j}function vg(_,j,E){if(x=_,k=j,P=E||null,!m&&w.navigation===wo){m=!0;let T=td(w.location,w.matches);T!=null&&tt({restoreScrollPosition:T})}return()=>{x=null,k=null,P=null}}function ed(_,j){return P&&P(_,j.map(T=>$0(T,w.loaderData)))||_.key}function yg(_,j){if(x&&k){let E=ed(_,j);x[E]=k()}}function td(_,j){if(x){let E=ed(_,j),T=x[E];if(typeof T=="number")return T}return null}function nl(_,j,E){if(d)if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:Bl(j,E,o,!0)}}else return{active:!0,matches:Bl(j,E,o,!0)||[]};return{active:!1,matches:null}}async function rl(_,j,E,T){if(!d)return{type:"success",matches:_};let O=_;for(;;){let H=a==null,K=a||l,$=s;try{await d({signal:E,path:j,matches:O,fetcherKey:T,patch:(B,q)=>{E.aborted||Lf(B,q,K,$,i)}})}catch(B){return{type:"error",error:B,partialMatches:O}}finally{H&&!E.aborted&&(l=[...l])}if(E.aborted)return{type:"aborted"};let b=yr(K,j,o);if(b)return{type:"success",matches:b};let U=Bl(K,j,o,!0);if(!U||O.length===U.length&&O.every((B,q)=>B.route.id===U[q].route.id))return{type:"success",matches:null};O=U}}function xg(_){s={},a=ga(_,i,void 0,s)}function _g(_,j){let E=a==null;Lf(_,j,a||l,s,i),E&&(l=[...l],tt({}))}return M={get basename(){return o},get future(){return f},get state(){return w},get routes(){return l},get window(){return t},initialize:sg,subscribe:ag,enableScrollRestoration:vg,navigate:Vc,fetch:fg,revalidate:og,createHref:_=>e.history.createHref(_),encodeLocation:_=>e.history.encodeLocation(_),getFetcher:qc,deleteFetcher:mg,dispose:lg,getBlocker:gg,deleteBlocker:Jc,patchRoutes:_g,_internalFetchControllers:F,_internalActiveDeferreds:et,_internalSetRoutes:xg},M}function h1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Tu(e,t,n,r,i,s,l,a){let o,c;if(l){o=[];for(let f of t)if(o.push(f),f.route.id===l){c=f;break}}else o=t,c=t[t.length-1];let d=za(i||".",Ia(o,s),Sn(e.pathname,n)||e.pathname,a==="path");if(i==null&&(d.search=e.search,d.hash=e.hash),(i==null||i===""||i===".")&&c){let f=Uc(d.search);if(c.route.index&&!f)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&f){let h=new URLSearchParams(d.search),g=h.getAll("index");h.delete("index"),g.filter(P=>P).forEach(P=>h.append("index",P));let x=h.toString();d.search=x?"?"+x:""}}return r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:vn([n,d.pathname])),Qr(d)}function Nf(e,t,n,r){if(!r||!h1(r))return{path:n};if(r.formMethod&&!C1(r.formMethod))return{path:n,error:dt(405,{method:r.formMethod})};let i=()=>({path:n,error:dt(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),a=Hm(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!bt(l))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,x)=>{let[P,k]=x;return""+g+P+"="+k+`
|
|
50
|
-
`},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!bt(l))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:a,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}X(typeof FormData=="function","FormData is not available in this environment");let o,c;if(r.formData)o=Lu(r.formData),c=r.formData;else if(r.body instanceof FormData)o=Lu(r.body),c=r.body;else if(r.body instanceof URLSearchParams)o=r.body,c=Ff(o);else if(r.body==null)o=new URLSearchParams,c=new FormData;else try{o=new URLSearchParams(r.body),c=Ff(o)}catch{return i()}let d={formMethod:l,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(bt(d.formMethod))return{path:n,submission:d};let f=cr(n);return t&&f.search&&Uc(f.search)&&o.append("index",""),f.search="?"+o,{path:Qr(f),submission:d}}function Rf(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Tf(e,t,n,r,i,s,l,a,o,c,d,f,h,g,x,P){let k=P?wt(P[1])?P[1].error:P[1].data:void 0,m=e.createURL(t.location),p=e.createURL(i),v=n;s&&t.errors?v=Rf(n,Object.keys(t.errors)[0],!0):P&&wt(P[1])&&(v=Rf(n,P[0]));let S=P?P[1].statusCode:void 0,R=l&&S&&S>=400,M=v.filter((N,z)=>{let{route:L}=N;if(L.lazy)return!0;if(L.loader==null)return!1;if(s)return Du(L,t.loaderData,t.errors);if(p1(t.loaderData,t.matches[z],N)||o.some(Ce=>Ce===N.route.id))return!0;let Y=t.matches[z],le=N;return Df(N,xe({currentUrl:m,currentParams:Y.params,nextUrl:p,nextParams:le.params},r,{actionResult:k,actionStatus:S,defaultShouldRevalidate:R?!1:a||m.pathname+m.search===p.pathname+p.search||m.search!==p.search||Bm(Y,le)}))}),w=[];return f.forEach((N,z)=>{if(s||!n.some(Ee=>Ee.route.id===N.routeId)||d.has(z))return;let L=yr(g,N.path,x);if(!L){w.push({key:z,routeId:N.routeId,path:N.path,matches:null,match:null,controller:null});return}let Y=t.fetchers.get(z),le=cs(L,N.path),Ce=!1;h.has(z)?Ce=!1:c.has(z)?(c.delete(z),Ce=!0):Y&&Y.state!=="idle"&&Y.data===void 0?Ce=a:Ce=Df(le,xe({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:p,nextParams:n[n.length-1].params},r,{actionResult:k,actionStatus:S,defaultShouldRevalidate:R?!1:a})),Ce&&w.push({key:z,routeId:N.routeId,path:N.path,matches:L,match:le,controller:new AbortController})}),[M,w]}function Du(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function p1(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Bm(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Df(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Lf(e,t,n,r,i){var s;let l;if(e){let c=r[e];X(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),l=c.children}else l=n;let a=t.filter(c=>!l.some(d=>Qm(c,d))),o=ga(a,i,[e||"_","patch",String(((s=l)==null?void 0:s.length)||"0")],r);l.push(...o)}function Qm(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(s=>Qm(n,s))}):!1}async function m1(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];X(i,"No route found in manifest");let s={};for(let l in r){let o=i[l]!==void 0&&l!=="hasErrorBoundary";Br(!o,'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!o&&!A0.has(l)&&(s[l]=r[l])}Object.assign(i,s),Object.assign(i,xe({},t(i),{lazy:void 0}))}async function g1(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,s,l)=>Object.assign(i,{[n[l].route.id]:s}),{})}async function v1(e,t,n,r,i,s,l,a,o,c){let d=s.map(g=>g.route.lazy?m1(g.route,o,a):void 0),f=s.map((g,x)=>{let P=d[x],k=i.some(p=>p.route.id===g.route.id);return xe({},g,{shouldLoad:k,resolve:async p=>(p&&r.method==="GET"&&(g.route.lazy||g.route.loader)&&(k=!0),k?y1(t,r,g,P,p,c):Promise.resolve({type:de.data,result:void 0}))})}),h=await e({matches:f,request:r,params:s[0].params,fetcherKey:l,context:c});try{await Promise.all(d)}catch{}return h}async function y1(e,t,n,r,i,s){let l,a,o=c=>{let d,f=new Promise((x,P)=>d=P);a=()=>d(),t.signal.addEventListener("abort",a);let h=x=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:s},...x!==void 0?[x]:[]),g=(async()=>{try{return{type:"data",result:await(i?i(P=>h(P)):h())}}catch(x){return{type:"error",result:x}}})();return Promise.race([g,f])};try{let c=n.route[e];if(r)if(c){let d,[f]=await Promise.all([o(c).catch(h=>{d=h}),r]);if(d!==void 0)throw d;l=f}else if(await r,c=n.route[e],c)l=await o(c);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw dt(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:de.data,result:void 0};else if(c)l=await o(c);else{let d=new URL(t.url),f=d.pathname+d.search;throw dt(404,{pathname:f})}X(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:de.error,result:c}}finally{a&&t.signal.removeEventListener("abort",a)}return l}async function x1(e){let{result:t,type:n}=e;if(Vm(t)){let f;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(h){return{type:de.error,error:h}}return n===de.error?{type:de.error,error:new ya(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:de.data,data:f,statusCode:t.status,headers:t.headers}}if(n===de.error){if(Uf(t)){var r,i;if(t.data instanceof Error){var s,l;return{type:de.error,error:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:de.error,error:new ya(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:$s(t)?t.status:void 0,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:de.error,error:t,statusCode:$s(t)?t.status:void 0}}if(j1(t)){var a,o;return{type:de.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(Uf(t)){var c,d;return{type:de.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:de.data,data:t}}function _1(e,t,n,r,i,s){let l=e.headers.get("Location");if(X(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!zc.test(l)){let a=r.slice(0,r.findIndex(o=>o.route.id===n)+1);l=Tu(new URL(t.url),a,i,!0,l,s),e.headers.set("Location",l)}return e}function Mf(e,t,n,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(zc.test(e)){let s=e,l=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(i.includes(l.protocol))throw new Error("Invalid redirect location");let a=Sn(l.pathname,n)!=null;if(l.origin===t.origin&&a)return Ic(l.pathname)+l.search+l.hash}try{let s=r.createURL(e);if(i.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Xr(e,t,n,r){let i=e.createURL(Hm(t)).toString(),s={signal:n};if(r&&bt(r.formMethod)){let{formMethod:l,formEncType:a}=r;s.method=l.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=Lu(r.formData):s.body=r.formData}return new Request(i,s)}function Lu(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Ff(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function w1(e,t,n,r,i){let s={},l=null,a,o=!1,c={},d=n&&wt(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,g=t[h];if(X(!jr(g),"Cannot handle redirect results in processLoaderData"),wt(g)){let x=g.error;d!==void 0&&(x=d,d=void 0),l=l||{};{let P=xr(e,h);l[P.route.id]==null&&(l[P.route.id]=x)}s[h]=void 0,o||(o=!0,a=$s(g.error)?g.error.status:500),g.headers&&(c[h]=g.headers)}else Gn(g)?(r.set(h,g.deferredData),s[h]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!o&&(a=g.statusCode),g.headers&&(c[h]=g.headers)):(s[h]=g.data,g.statusCode&&g.statusCode!==200&&!o&&(a=g.statusCode),g.headers&&(c[h]=g.headers))}),d!==void 0&&n&&(l={[n[0]]:d},s[n[0]]=void 0),{loaderData:s,errors:l,statusCode:a||200,loaderHeaders:c}}function Of(e,t,n,r,i,s,l){let{loaderData:a,errors:o}=w1(t,n,r,l);return i.forEach(c=>{let{key:d,match:f,controller:h}=c,g=s[d];if(X(g,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(wt(g)){let x=xr(e.matches,f==null?void 0:f.route.id);o&&o[x.route.id]||(o=xe({},o,{[x.route.id]:g.error})),e.fetchers.delete(d)}else if(jr(g))X(!1,"Unhandled fetcher revalidation redirect");else if(Gn(g))X(!1,"Unhandled fetcher deferred data");else{let x=Mn(g.data);e.fetchers.set(d,x)}}),{loaderData:a,errors:o}}function If(e,t,n,r){let i=xe({},t);for(let s of n){let l=s.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(i[l]=t[l]):e[l]!==void 0&&s.route.loader&&(i[l]=e[l]),r&&r.hasOwnProperty(l))break}return i}function zf(e){return e?wt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Af(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function dt(e,t){let{pathname:n,routeId:r,method:i,type:s,message:l}=t===void 0?{}:t,a="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&n&&r?o="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?o="defer() is not supported in actions":s==="invalid-body"&&(o="Unable to encode submission body")):e===403?(a="Forbidden",o='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",o='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",i&&n&&r?o="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(o='Invalid request method "'+i.toUpperCase()+'"')),new ya(e||500,a,new Error(o),!0)}function Cl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(jr(i))return{key:r,result:i}}}function Hm(e){let t=typeof e=="string"?cr(e):e;return Qr(xe({},t,{hash:""}))}function P1(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function S1(e){return Vm(e.result)&&o1.has(e.result.status)}function Gn(e){return e.type===de.deferred}function wt(e){return e.type===de.error}function jr(e){return(e&&e.type)===de.redirect}function Uf(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function j1(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function C1(e){return a1.has(e.toLowerCase())}function bt(e){return s1.has(e.toLowerCase())}async function E1(e,t,n,r,i){let s=Object.entries(t);for(let l=0;l<s.length;l++){let[a,o]=s[l],c=e.find(h=>(h==null?void 0:h.route.id)===a);if(!c)continue;let d=r.find(h=>h.route.id===c.route.id),f=d!=null&&!Bm(d,c)&&(i&&i[c.route.id])!==void 0;Gn(o)&&f&&await Ac(o,n,!1).then(h=>{h&&(t[a]=h)})}}async function k1(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:s,controller:l}=n[r],a=t[i];e.find(c=>(c==null?void 0:c.route.id)===s)&&Gn(a)&&(X(l,"Expected an AbortController for revalidating fetcher deferred result"),await Ac(a,l.signal,!0).then(c=>{c&&(t[i]=c)}))}}async function Ac(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:de.data,data:e.deferredData.unwrappedData}}catch(i){return{type:de.error,error:i}}return{type:de.data,data:e.deferredData.data}}}function Uc(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function cs(e,t){let n=typeof t=="string"?cr(t).search:t.search;if(e[e.length-1].route.index&&Uc(n||""))return e[e.length-1];let r=Um(e);return r[r.length-1]}function $f(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:s,json:l}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Po(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function N1(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ts(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function R1(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Mn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function T1(e,t){try{let n=e.sessionStorage.getItem(bm);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function D1(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(bm,JSON.stringify(n))}catch(r){Br(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
|
|
51
|
-
* React Router v6.30.4
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/function xa(){return xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xa.apply(null,arguments)}const Js=C.createContext(null),$c=C.createContext(null),Cn=C.createContext(null),bc=C.createContext(null),rn=C.createContext({outlet:null,matches:[],isDataRoute:!1}),Km=C.createContext(null);function L1(e,t){let{relative:n}=t===void 0?{}:t;bi()||X(!1);let{basename:r,navigator:i}=C.useContext(Cn),{hash:s,pathname:l,search:a}=Ua(e,{relative:n}),o=l;return r!=="/"&&(o=l==="/"?r:vn([r,l])),i.createHref({pathname:o,search:a,hash:s})}function bi(){return C.useContext(bc)!=null}function dr(){return bi()||X(!1),C.useContext(bc).location}function Wm(e){C.useContext(Cn).static||C.useLayoutEffect(e)}function Aa(){let{isDataRoute:e}=C.useContext(rn);return e?K1():M1()}function M1(){bi()||X(!1);let e=C.useContext(Js),{basename:t,future:n,navigator:r}=C.useContext(Cn),{matches:i}=C.useContext(rn),{pathname:s}=dr(),l=JSON.stringify(Ia(i,n.v7_relativeSplatPath)),a=C.useRef(!1);return Wm(()=>{a.current=!0}),C.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=za(c,JSON.parse(l),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:vn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,l,s,e])}const F1=C.createContext(null);function O1(e){let t=C.useContext(rn).outlet;return t&&C.createElement(F1.Provider,{value:e},t)}function qm(){let{matches:e}=C.useContext(rn),t=e[e.length-1];return t?t.params:{}}function Ua(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(Cn),{matches:i}=C.useContext(rn),{pathname:s}=dr(),l=JSON.stringify(Ia(i,r.v7_relativeSplatPath));return C.useMemo(()=>za(e,JSON.parse(l),s,n==="path"),[e,l,s,n])}function I1(e,t,n,r){bi()||X(!1);let{navigator:i}=C.useContext(Cn),{matches:s}=C.useContext(rn),l=s[s.length-1],a=l?l.params:{};l&&l.pathname;let o=l?l.pathnameBase:"/";l&&l.route;let c=dr(),d;d=c;let f=d.pathname||"/",h=f;if(o!=="/"){let P=o.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(P.length).join("/")}let g=yr(e,{pathname:h});return b1(g&&g.map(P=>Object.assign({},P,{params:Object.assign({},a,P.params),pathname:vn([o,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?o:vn([o,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),s,n,r)}function z1(){let e=V1(),t=$s(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:i},n):null,null)}const A1=C.createElement(z1,null);class U1 extends C.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?C.createElement(rn.Provider,{value:this.props.routeContext},C.createElement(Km.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $1(e){let{routeContext:t,match:n,children:r}=e,i=C.useContext(Js);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(rn.Provider,{value:t},r)}function b1(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=l.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||X(!1),l=l.slice(0,Math.min(l.length,d+1))}let o=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<l.length;d++){let f=l[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:h,errors:g}=n,x=f.route.loader&&h[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||x){o=!0,c>=0?l=l.slice(0,c+1):l=[l[0]];break}}}return l.reduceRight((d,f,h)=>{let g,x=!1,P=null,k=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,P=f.route.errorElement||A1,o&&(c<0&&h===0?(W1("route-fallback"),x=!0,k=null):c===h&&(x=!0,k=f.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,h+1)),p=()=>{let v;return g?v=P:x?v=k:f.route.Component?v=C.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,C.createElement($1,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?C.createElement(U1,{location:n.location,revalidation:n.revalidation,component:P,error:g,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var Gm=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Gm||{}),Ym=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}(Ym||{});function B1(e){let t=C.useContext(Js);return t||X(!1),t}function Q1(e){let t=C.useContext($c);return t||X(!1),t}function H1(e){let t=C.useContext(rn);return t||X(!1),t}function Xm(e){let t=H1(),n=t.matches[t.matches.length-1];return n.route.id||X(!1),n.route.id}function V1(){var e;let t=C.useContext(Km),n=Q1(),r=Xm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function K1(){let{router:e}=B1(Gm.UseNavigateStable),t=Xm(Ym.UseNavigateStable),n=C.useRef(!1);return Wm(()=>{n.current=!0}),C.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,xa({fromRouteId:t},s)))},[e,t])}const bf={};function W1(e,t,n){bf[e]||(bf[e]=!0)}function q1(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 G1(e){let{to:t,replace:n,state:r,relative:i}=e;bi()||X(!1);let{future:s,static:l}=C.useContext(Cn),{matches:a}=C.useContext(rn),{pathname:o}=dr(),c=Aa(),d=za(t,Ia(a,s.v7_relativeSplatPath),o,i==="path"),f=JSON.stringify(d);return C.useEffect(()=>c(JSON.parse(f),{replace:n,state:r,relative:i}),[c,f,i,n,r]),null}function Y1(e){return O1(e.context)}function X1(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Fe.Pop,navigator:s,static:l=!1,future:a}=e;bi()&&X(!1);let o=t.replace(/^\/*/,"/"),c=C.useMemo(()=>({basename:o,navigator:s,static:l,future:xa({v7_relativeSplatPath:!1},a)}),[o,a,s,l]);typeof r=="string"&&(r=cr(r));let{pathname:d="/",search:f="",hash:h="",state:g=null,key:x="default"}=r,P=C.useMemo(()=>{let k=Sn(d,o);return k==null?null:{location:{pathname:k,search:f,hash:h,state:g,key:x},navigationType:i}},[o,d,f,h,g,x,i]);return P==null?null:C.createElement(Cn.Provider,{value:c},C.createElement(bc.Provider,{children:n,value:P}))}new Promise(()=>{});function J1(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
|
60
|
-
* React Router DOM v6.30.4
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Remix Software Inc.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
-
*
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ii.apply(null,arguments)}function Jm(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Z1(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ex(e,t){return e.button===0&&(!t||t==="_self")&&!Z1(e)}function Mu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function tx(e,t){let n=Mu(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const nx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],rx=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],ix="6";try{window.__reactRouterVersion=ix}catch{}function sx(e,t){return f1({basename:t==null?void 0:t.basename,future:Ii({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:O0({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||lx(),routes:e,mapRouteProperties:J1,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function lx(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ii({},t,{errors:ax(t.errors)})),t}function ax(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new ya(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let l=new s(i.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}const Zm=C.createContext({isTransitioning:!1}),ox=C.createContext(new Map),ux="startTransition",Bf=Ag[ux],cx="flushSync",Qf=Yy[cx];function dx(e){Bf?Bf(e):e()}function ns(e){Qf?Qf(e):e()}class fx{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function hx(e){let{fallbackElement:t,router:n,future:r}=e,[i,s]=C.useState(n.state),[l,a]=C.useState(),[o,c]=C.useState({isTransitioning:!1}),[d,f]=C.useState(),[h,g]=C.useState(),[x,P]=C.useState(),k=C.useRef(new Map),{v7_startTransition:m}=r||{},p=C.useCallback(N=>{m?dx(N):N()},[m]),v=C.useCallback((N,z)=>{let{deletedFetchers:L,flushSync:Y,viewTransitionOpts:le}=z;N.fetchers.forEach((Ee,Ke)=>{Ee.data!==void 0&&k.current.set(Ke,Ee.data)}),L.forEach(Ee=>k.current.delete(Ee));let Ce=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!le||Ce){Y?ns(()=>s(N)):p(()=>s(N));return}if(Y){ns(()=>{h&&(d&&d.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:le.currentLocation,nextLocation:le.nextLocation})});let Ee=n.window.document.startViewTransition(()=>{ns(()=>s(N))});Ee.finished.finally(()=>{ns(()=>{f(void 0),g(void 0),a(void 0),c({isTransitioning:!1})})}),ns(()=>g(Ee));return}h?(d&&d.resolve(),h.skipTransition(),P({state:N,currentLocation:le.currentLocation,nextLocation:le.nextLocation})):(a(N),c({isTransitioning:!0,flushSync:!1,currentLocation:le.currentLocation,nextLocation:le.nextLocation}))},[n.window,h,d,k,p]);C.useLayoutEffect(()=>n.subscribe(v),[n,v]),C.useEffect(()=>{o.isTransitioning&&!o.flushSync&&f(new fx)},[o]),C.useEffect(()=>{if(d&&l&&n.window){let N=l,z=d.promise,L=n.window.document.startViewTransition(async()=>{p(()=>s(N)),await z});L.finished.finally(()=>{f(void 0),g(void 0),a(void 0),c({isTransitioning:!1})}),g(L)}},[p,l,d,n.window]),C.useEffect(()=>{d&&l&&i.location.key===l.location.key&&d.resolve()},[d,h,i.location,l]),C.useEffect(()=>{!o.isTransitioning&&x&&(a(x.state),c({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),P(void 0))},[o.isTransitioning,x]),C.useEffect(()=>{},[]);let S=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:N=>n.navigate(N),push:(N,z,L)=>n.navigate(N,{state:z,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(N,z,L)=>n.navigate(N,{replace:!0,state:z,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),R=n.basename||"/",M=C.useMemo(()=>({router:n,navigator:S,static:!1,basename:R}),[n,S,R]),w=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>q1(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(Js.Provider,{value:M},C.createElement($c.Provider,{value:i},C.createElement(ox.Provider,{value:k.current},C.createElement(Zm.Provider,{value:o},C.createElement(X1,{basename:R,location:i.location,navigationType:i.historyAction,navigator:S,future:w},i.initialized||n.future.v7_partialHydration?C.createElement(px,{routes:n.routes,future:n.future,state:i}):t))))),null)}const px=C.memo(mx);function mx(e){let{routes:t,future:n,state:r}=e;return I1(t,void 0,r,n)}const gx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yx=C.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:l,state:a,target:o,to:c,preventScrollReset:d,viewTransition:f}=t,h=Jm(t,nx),{basename:g}=C.useContext(Cn),x,P=!1;if(typeof c=="string"&&vx.test(c)&&(x=c,gx))try{let v=new URL(window.location.href),S=c.startsWith("//")?new URL(v.protocol+c):new URL(c),R=Sn(S.pathname,g);S.origin===v.origin&&R!=null?c=R+S.search+S.hash:P=!0}catch{}let k=L1(c,{relative:i}),m=wx(c,{replace:l,state:a,target:o,preventScrollReset:d,relative:i,viewTransition:f});function p(v){r&&r(v),v.defaultPrevented||m(v)}return C.createElement("a",Ii({},h,{href:x||k,onClick:P||s?r:p,ref:n,target:o}))}),xx=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:l=!1,style:a,to:o,viewTransition:c,children:d}=t,f=Jm(t,rx),h=Ua(o,{relative:f.relative}),g=dr(),x=C.useContext($c),{navigator:P,basename:k}=C.useContext(Cn),m=x!=null&&Sx(h)&&c===!0,p=P.encodeLocation?P.encodeLocation(h).pathname:h.pathname,v=g.pathname,S=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(v=v.toLowerCase(),S=S?S.toLowerCase():null,p=p.toLowerCase()),S&&k&&(S=Sn(S,k)||S);const R=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let M=v===p||!l&&v.startsWith(p)&&v.charAt(R)==="/",w=S!=null&&(S===p||!l&&S.startsWith(p)&&S.charAt(p.length)==="/"),N={isActive:M,isPending:w,isTransitioning:m},z=M?r:void 0,L;typeof s=="function"?L=s(N):L=[s,M?"active":null,w?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let Y=typeof a=="function"?a(N):a;return C.createElement(yx,Ii({},f,{"aria-current":z,className:L,ref:n,style:Y,to:o,viewTransition:c}),typeof d=="function"?d(N):d)});var Fu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fu||(Fu={}));var Hf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hf||(Hf={}));function _x(e){let t=C.useContext(Js);return t||X(!1),t}function wx(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:l,viewTransition:a}=t===void 0?{}:t,o=Aa(),c=dr(),d=Ua(e,{relative:l});return C.useCallback(f=>{if(ex(f,n)){f.preventDefault();let h=r!==void 0?r:Qr(c)===Qr(d);o(e,{replace:h,state:i,preventScrollReset:s,relative:l,viewTransition:a})}},[c,o,d,r,i,n,e,s,l,a])}function Px(e){let t=C.useRef(Mu(e)),n=C.useRef(!1),r=dr(),i=C.useMemo(()=>tx(r.search,n.current?null:t.current),[r.search]),s=Aa(),l=C.useCallback((a,o)=>{const c=Mu(typeof a=="function"?a(i):a);n.current=!0,s("?"+c,o)},[s,i]);return[i,l]}function Sx(e,t){t===void 0&&(t={});let n=C.useContext(Zm);n==null&&X(!1);let{basename:r}=_x(Fu.useViewTransitionState),i=Ua(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Sn(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Sn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return va(i.pathname,l)!=null||va(i.pathname,s)!=null}const jx="/api/v1";class eg extends Error{constructor(t,n,r){super(r),this.status=t,this.body=n,this.name="ApiError"}}async function rs(e,t,n){const r=await fetch(`${jx}${t}`,{method:e,headers:n!==void 0?{"Content-Type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0,credentials:"same-origin"});if(!r.ok){let i;try{i=await r.json()}catch{i=await r.text().catch(()=>null)}throw new eg(r.status,i,`${e} ${t} → ${r.status}`)}if(r.status!==204)return await r.json()}function Cx(e){if(!e)return"";const t=[];for(const[n,r]of Object.entries(e))r==null||r===""||t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`);return t.length>0?`?${t.join("&")}`:""}const Xe={get:e=>rs("GET",e),post:(e,t)=>rs("POST",e,t),patch:(e,t)=>rs("PATCH",e,t),put:(e,t)=>rs("PUT",e,t),delete:e=>rs("DELETE",e)},Vf={en:{"appShell.nav.atlas":"Atlas","appShell.nav.memories":"Memories","appShell.nav.injection":"Injection","appShell.nav.sleep":"Sleep","appShell.nav.settings":"Settings","appShell.searchPlaceholder":"Search memories…","appShell.toggleTheme":"Toggle theme","appShell.version":"v","atlasPage.title":"Atlas","atlasPage.subtitle":"Memory observatory — strength over time","atlasPage.loading":"Loading Atlas…","atlasPage.error":"Failed to load stats:","atlasPage.kpi.totalMemories":"Total memorias","atlasPage.kpi.active":"active","atlasPage.kpi.todayNew":"Today: new","atlasPage.kpi.promoted":"promoted","atlasPage.kpi.evicted":"evicted","atlasPage.kpi.edges":"Edges","atlasPage.kpi.causalAndRef":"causal + reference","atlasPage.kpi.lastSleep":"Last sleep","atlasPage.kpi.noRuns":"no runs yet","atlasPage.section.byTier":"By tier","atlasPage.section.byType":"By type","atlasPage.section.recentProjects":"Recent projects","atlasPage.emptyProjects":"No scoped memorias yet.","memoriesPage.filters":"Filters","memoriesPage.filterType":"Type","memoriesPage.filterTier":"Tier","memoriesPage.filterProject":"Project","memoriesPage.projectPlaceholder":"project value","memoriesPage.loading":"Loading…","memoriesPage.error":"Failed to load:","memoriesPage.empty":"No memorias match these filters.","memoriesPage.total":"total","memoriesPage.selectHint":"Select a memory to read it.","memoriesPage.reading.summary":"Summary","memoriesPage.reading.content":"Content","memoriesPage.reading.properties":"Properties","memoriesPage.reading.strength":"Strength","memoriesPage.reading.importance":"importance","memoriesPage.reading.confidence":"confidence","memoriesPage.reading.accessCount":"Access count","memoriesPage.reading.source":"Source","memoriesPage.reading.created":"Created","memoriesPage.reading.lastAccessed":"Last accessed","memoriesPage.reading.expandGraph":"Expand graph","memoriesPage.reading.forget":"Forget","memoriesPage.confirmForget":'Forget memory "{title}"?',"memoryDetail.loading":"Loading…","memoryDetail.notFound":"Not found","memoryDetail.summary":"Summary","memoryDetail.content":"Content","memoryDetail.properties":"Properties","memoryDetail.strength":"Strength","memoryDetail.importance":"importance","memoryDetail.confidence":"confidence","memoryDetail.accessCount":"Access count","memoryDetail.source":"Source","memoryDetail.created":"Created","memoryDetail.lastAccessed":"Last accessed","memoryDetail.tab.graph":"Graph","memoryDetail.tab.accessLogs":"Access logs","memoryDetail.emptyEdges":"No connected edges.","memoryDetail.emptyLogs":"No access recorded yet.","memoryDetail.th.when":"When","memoryDetail.th.source":"Source","memoryDetail.th.usedInContext":"Used in context","memoryDetail.th.query":"Query","memoryDetail.edgeStrength":"strength","injectionPage.title":"Injection","injectionPage.subtitle":"Audit what the agent would see","injectionPage.formTitle":"Request a preview","injectionPage.field.phase":"Phase","injectionPage.field.sessionId":"Session ID","injectionPage.field.query":"Query","injectionPage.field.files":"Files (comma-separated, optional)","injectionPage.submit":"Preview injection bundle","injectionPage.computing":"Computing…","injectionPage.meta.bundleId":"Bundle ID","injectionPage.meta.phase":"Phase","injectionPage.meta.contentHash":"Content hash","injectionPage.meta.memories":"Memories","injectionPage.meta.estimatedTokens":"Estimated tokens","injectionPage.sectionXml":"Context XML","injectionPage.empty":"Submit the form to preview an injection bundle.","sleepPage.title":"Sleep","sleepPage.subtitle":"Consolidation history — promotion, eviction, merging","sleepPage.dryRun":"Dry run","sleepPage.runNow":"Run now","sleepPage.running":"Running…","sleepPage.runFailed":"Run failed:","sleepPage.loading":"Loading runs…","sleepPage.error":"Failed to load:","sleepPage.empty":'No sleep cycles yet. Click "Run now" to start one.',"sleepPage.cycle":"Sleep Cycle #","sleepPage.dryRunBadge":"dry-run","sleepPage.started":"Started:","sleepPage.ended":"Ended:","sleepPage.edgesCreated":"Edges created:","sleepPage.contradictions":"Contradictions:","sleepPage.noChanges":"No changes in this cycle.","sleepPage.promoted":"promoted","sleepPage.evicted":"evicted","sleepPage.merged":"merged","settingsPage.title":"Settings","settingsPage.subtitle":"Server configuration and registered devices","settingsPage.section.server":"Server","settingsPage.section.devices":"Devices","settingsPage.server.host":"Host","settingsPage.server.port":"Port","settingsPage.server.dbPath":"DB path","settingsPage.server.embedding":"Embedding provider","settingsPage.server.llm":"LLM provider","settingsPage.server.consolidation":"Consolidation","settingsPage.server.authRequired":"Auth required","settingsPage.server.yes":"yes","settingsPage.server.noDevMode":"no (dev mode)","settingsPage.server.disabled":"disabled","settingsPage.server.every":"every","settingsPage.loading":"Loading…","settingsPage.error":"Failed to load:","settingsPage.emptyDevices":"No devices registered yet.","settingsPage.table.name":"Name","settingsPage.table.type":"Type","settingsPage.table.registered":"Registered","settingsPage.table.lastSeen":"Last seen","settingsPage.revoke":"Revoke","settingsPage.confirmRevoke":'Revoke device "{name}"?',"settingsPage.registerDevice":"+ Register device","settingsPage.dialog.title":"Register a new device","settingsPage.dialog.name":"Name","settingsPage.dialog.type":"Type","settingsPage.dialog.cancel":"Cancel","settingsPage.dialog.create":"Create","settingsPage.dialog.creating":"Creating…","settingsPage.dialog.created":"Device created","settingsPage.dialog.apiKey":"API key (copy now — won't be shown again)","settingsPage.dialog.copy":"Copy","settingsPage.dialog.done":"Done","graphPage.filters":"Filters","graphPage.depth":"Depth","graphPage.direction":"Direction","graphPage.edgeTypes":"Edge types","graphPage.option.both":"both","graphPage.option.outgoing":"outgoing","graphPage.option.incoming":"incoming","graphPage.loading":"Loading graph…","graphPage.error":"Failed:","graphPage.empty":"No graph for this memory.","notFound.title":"404","notFound.message":"That page doesn't exist.","notFound.back":"Back to Atlas"},zh:{"appShell.nav.atlas":"仪表盘","appShell.nav.memories":"记忆","appShell.nav.injection":"注入","appShell.nav.sleep":"睡眠","appShell.nav.settings":"设置","appShell.searchPlaceholder":"搜索记忆…","appShell.toggleTheme":"切换主题","appShell.version":"v","atlasPage.title":"仪表盘","atlasPage.subtitle":"记忆观测站 — 强度随时间变化","atlasPage.loading":"加载中…","atlasPage.error":"加载统计失败:","atlasPage.kpi.totalMemories":"记忆总数","atlasPage.kpi.active":"活跃","atlasPage.kpi.todayNew":"今日新增","atlasPage.kpi.promoted":"升格","atlasPage.kpi.evicted":"淘汰","atlasPage.kpi.edges":"关系边","atlasPage.kpi.causalAndRef":"因果 + 参考","atlasPage.kpi.lastSleep":"上次睡眠","atlasPage.kpi.noRuns":"暂无","atlasPage.section.byTier":"按层级","atlasPage.section.byType":"按类型","atlasPage.section.recentProjects":"近期项目","atlasPage.emptyProjects":"暂无项目级记忆。","memoriesPage.filters":"筛选","memoriesPage.filterType":"类型","memoriesPage.filterTier":"层级","memoriesPage.filterProject":"项目","memoriesPage.projectPlaceholder":"项目名称","memoriesPage.loading":"加载中…","memoriesPage.error":"加载失败:","memoriesPage.empty":"没有符合筛选条件的记忆。","memoriesPage.total":"共计","memoriesPage.selectHint":"选择一条记忆查看详情。","memoriesPage.reading.summary":"摘要","memoriesPage.reading.content":"正文","memoriesPage.reading.properties":"属性","memoriesPage.reading.strength":"强度","memoriesPage.reading.importance":"重要性","memoriesPage.reading.confidence":"置信度","memoriesPage.reading.accessCount":"访问次数","memoriesPage.reading.source":"来源","memoriesPage.reading.created":"创建时间","memoriesPage.reading.lastAccessed":"最后访问","memoriesPage.reading.expandGraph":"展开关系图","memoriesPage.reading.forget":"遗忘","memoriesPage.confirmForget":'确认遗忘记忆"{title}"?',"memoryDetail.loading":"加载中…","memoryDetail.notFound":"未找到","memoryDetail.summary":"摘要","memoryDetail.content":"正文","memoryDetail.properties":"属性","memoryDetail.strength":"强度","memoryDetail.importance":"重要性","memoryDetail.confidence":"置信度","memoryDetail.accessCount":"访问次数","memoryDetail.source":"来源","memoryDetail.created":"创建时间","memoryDetail.lastAccessed":"最后访问","memoryDetail.tab.graph":"关系图","memoryDetail.tab.accessLogs":"访问日志","memoryDetail.emptyEdges":"暂无关联边。","memoryDetail.emptyLogs":"暂无访问记录。","memoryDetail.th.when":"时间","memoryDetail.th.source":"来源","memoryDetail.th.usedInContext":"已注入上下文","memoryDetail.th.query":"查询","memoryDetail.edgeStrength":"强度","injectionPage.title":"注入","injectionPage.subtitle":"预览 Agent 的注入内容","injectionPage.formTitle":"发起预览","injectionPage.field.phase":"阶段","injectionPage.field.sessionId":"会话 ID","injectionPage.field.query":"查询","injectionPage.field.files":"文件(逗号分隔,可选)","injectionPage.submit":"预览注入包","injectionPage.computing":"计算中…","injectionPage.meta.bundleId":"包 ID","injectionPage.meta.phase":"阶段","injectionPage.meta.contentHash":"内容哈希","injectionPage.meta.memories":"记忆数","injectionPage.meta.estimatedTokens":"预估 Token","injectionPage.sectionXml":"上下文 XML","injectionPage.empty":"提交表单以预览注入包。","sleepPage.title":"睡眠","sleepPage.subtitle":"整理历史 — 升格、淘汰、合并","sleepPage.dryRun":"试运行","sleepPage.runNow":"立即运行","sleepPage.running":"运行中…","sleepPage.runFailed":"运行失败:","sleepPage.loading":"加载运行记录…","sleepPage.error":"加载失败:","sleepPage.empty":'还没有睡眠周期。点击"立即运行"开始一次。',"sleepPage.cycle":"睡眠周期 #","sleepPage.dryRunBadge":"试运行","sleepPage.started":"开始时间:","sleepPage.ended":"结束时间:","sleepPage.edgesCreated":"创建边数:","sleepPage.contradictions":"发现矛盾:","sleepPage.noChanges":"此周期无变更。","sleepPage.promoted":"升格","sleepPage.evicted":"淘汰","sleepPage.merged":"合并","settingsPage.title":"设置","settingsPage.subtitle":"服务端配置与已注册设备","settingsPage.section.server":"服务端","settingsPage.section.devices":"设备","settingsPage.server.host":"主机","settingsPage.server.port":"端口","settingsPage.server.dbPath":"数据库路径","settingsPage.server.embedding":"嵌入提供者","settingsPage.server.llm":"大模型提供者","settingsPage.server.consolidation":"整理","settingsPage.server.authRequired":"认证","settingsPage.server.yes":"是","settingsPage.server.noDevMode":"否(开发模式)","settingsPage.server.disabled":"已禁用","settingsPage.server.every":"每","settingsPage.loading":"加载中…","settingsPage.error":"加载失败:","settingsPage.emptyDevices":"暂无已注册设备。","settingsPage.table.name":"名称","settingsPage.table.type":"类型","settingsPage.table.registered":"注册时间","settingsPage.table.lastSeen":"最后在线","settingsPage.revoke":"吊销","settingsPage.confirmRevoke":'确认吊销设备"{name}"?',"settingsPage.registerDevice":"+ 注册设备","settingsPage.dialog.title":"注册新设备","settingsPage.dialog.name":"名称","settingsPage.dialog.type":"类型","settingsPage.dialog.cancel":"取消","settingsPage.dialog.create":"创建","settingsPage.dialog.creating":"创建中…","settingsPage.dialog.created":"设备已创建","settingsPage.dialog.apiKey":"API 密钥(请立即复制,不再显示)","settingsPage.dialog.copy":"复制","settingsPage.dialog.done":"完成","graphPage.filters":"筛选","graphPage.depth":"深度","graphPage.direction":"方向","graphPage.edgeTypes":"边类型","graphPage.option.both":"双向","graphPage.option.outgoing":"出向","graphPage.option.incoming":"入向","graphPage.loading":"加载关系图…","graphPage.error":"加载失败:","graphPage.empty":"此记忆暂无关系图。","notFound.title":"404","notFound.message":"页面不存在。","notFound.back":"返回仪表盘"}},tg=C.createContext(null);function Ex({children:e}){const[t,n]=C.useState(()=>localStorage.getItem("memweave-locale")==="zh"?"zh":"en"),r=C.useCallback(s=>{n(s),localStorage.setItem("memweave-locale",s)},[]),i=(s,l)=>{var o,c;const a=((o=Vf[t])==null?void 0:o[s])??((c=Vf.en)==null?void 0:c[s])??s;return l?a.replace(/\{(\w+)\}/g,(d,f)=>String(l[f]??`{${f}}`)):a};return u.jsx(tg.Provider,{value:{locale:t,setLocale:r,t:i},children:e})}function Ot(){const e=C.useContext(tg);if(!e)throw new Error("useLocale() must be used inside <LocaleProvider>");return e}const kx="_shell_158eu_1",Nx="_sidebar_158eu_13",Rx="_brand_158eu_23",Tx="_nav_158eu_32",Dx="_navItem_158eu_39",Lx="_navItemActive_158eu_56",Mx="_sidebarFooter_158eu_61",Fx="_sidebarVersion_158eu_69",Ox="_topbar_158eu_73",Ix="_searchForm_158eu_83",zx="_search_158eu_83",Ax="_themeToggle_158eu_104",Ux="_localeToggle_158eu_123",$x="_main_158eu_144",nt={shell:kx,sidebar:Nx,brand:Rx,nav:Tx,navItem:Dx,navItemActive:Lx,sidebarFooter:Mx,sidebarVersion:Fx,topbar:Ox,searchForm:Ix,search:zx,themeToggle:Ax,localeToggle:Ux,main:$x},bx=[{to:"/atlas",key:"appShell.nav.atlas"},{to:"/memories",key:"appShell.nav.memories"},{to:"/injection",key:"appShell.nav.injection"},{to:"/sleep",key:"appShell.nav.sleep"},{to:"/settings",key:"appShell.nav.settings"}];function Bx(){const e=Aa();dr();const{t,locale:n,setLocale:r}=Ot(),[i,s]=C.useState(()=>localStorage.getItem("memweave-theme")==="dark"?"dark":"light"),[l,a]=C.useState(""),[o,c]=C.useState(null);C.useEffect(()=>{Xe.get("/health").then(h=>{h.version&&c(h.version)}).catch(()=>{})},[]),C.useEffect(()=>{document.documentElement.setAttribute("data-theme",i),localStorage.setItem("memweave-theme",i)},[i]);const d=h=>{h.preventDefault(),l.trim()&&e(`/memories?q=${encodeURIComponent(l.trim())}`)},f=()=>r(n==="en"?"zh":"en");return u.jsxs("div",{className:nt.shell,children:[u.jsxs("aside",{className:nt.sidebar,children:[u.jsx("div",{className:nt.brand,children:"MemWeave"}),u.jsx("nav",{className:nt.nav,children:bx.map(h=>u.jsx(xx,{to:h.to,className:({isActive:g})=>g?`${nt.navItem} ${nt.navItemActive}`:nt.navItem,children:t(h.key)},h.to))}),u.jsx("div",{className:nt.sidebarFooter,children:u.jsxs("span",{className:nt.sidebarVersion,children:[t("appShell.version"),o??"…"]})})]}),u.jsxs("header",{className:nt.topbar,children:[u.jsx("form",{className:nt.searchForm,onSubmit:d,children:u.jsx("input",{type:"search",className:nt.search,placeholder:t("appShell.searchPlaceholder"),value:l,onChange:h=>a(h.target.value)})}),u.jsx("button",{className:nt.localeToggle,onClick:f,"aria-label":n==="en"?"Switch to Chinese":"Switch to English",children:n==="en"?"中":"EN"}),u.jsx("button",{className:nt.themeToggle,onClick:()=>s(h=>h==="light"?"dark":"light"),"aria-label":t("appShell.toggleTheme"),children:i==="light"?"◐":"◑"})]}),u.jsx("main",{className:nt.main,children:u.jsx(Y1,{})})]})}const ng=e=>e.toFixed(2),nn=e=>e?new Date(e).toLocaleString():"—",Bc=e=>{if(!e)return"—";const t=Date.now()-e,n=Math.round(t/1e3);if(n<60)return`${n}s ago`;const r=Math.round(n/60);if(r<60)return`${r}m ago`;const i=Math.round(r/60);if(i<24)return`${i}h ago`;const s=Math.round(i/24);return s<30?`${s}d ago`:nn(e)},Qx=(e,t)=>e.length<=t?e:e.slice(0,t-1)+"…",Hx="_page_zs4as_1",Vx="_loading_zs4as_6",Kx="_error_zs4as_7",Wx="_empty_zs4as_8",qx="_header_zs4as_18",Gx="_title_zs4as_22",Yx="_subtitle_zs4as_27",Xx="_kpiRow_zs4as_32",Jx="_kpi_zs4as_32",Zx="_kpiLabel_zs4as_46",e_="_kpiValue_zs4as_55",t_="_kpiSub_zs4as_64",n_="_section_zs4as_69",r_="_sectionTitle_zs4as_73",i_="_barGroup_zs4as_78",s_="_barRow_zs4as_88",l_="_barLabel_zs4as_95",a_="_barTrack_zs4as_101",o_="_barFill_zs4as_108",u_="_barValue_zs4as_114",c_="_projectChips_zs4as_121",d_="_projectChip_zs4as_121",f_="_projectName_zs4as_144",h_="_projectCount_zs4as_148",ce={page:Hx,loading:Vx,error:Kx,empty:Wx,header:qx,title:Gx,subtitle:Yx,kpiRow:Xx,kpi:Jx,kpiLabel:Zx,kpiValue:e_,kpiSub:t_,section:n_,sectionTitle:r_,barGroup:i_,barRow:s_,barLabel:l_,barTrack:a_,barFill:o_,barValue:u_,projectChips:c_,projectChip:d_,projectName:f_,projectCount:h_},p_=["fact","decision","preference","event","project_context","lesson","code_pattern","bug","workflow"],m_=["short","medium","long"];function g_(){const{t:e}=Ot(),{data:t,isLoading:n,error:r}=tn({queryKey:["stats"],queryFn:()=>Xe.get("/stats")});return n?u.jsxs("div",{className:ce.loading,children:[u.jsx("span",{className:"spinner"})," ",e("atlasPage.loading")]}):r?u.jsxs("div",{className:ce.error,children:[e("atlasPage.error")," ",r.message]}):t?u.jsxs("div",{className:ce.page,children:[u.jsxs("header",{className:ce.header,children:[u.jsx("h1",{className:ce.title,children:e("atlasPage.title")}),u.jsx("p",{className:ce.subtitle,children:e("atlasPage.subtitle")})]}),u.jsxs("section",{className:ce.kpiRow,children:[u.jsx(El,{label:e("atlasPage.kpi.totalMemories"),value:t.totals.memories.toLocaleString(),sub:`${t.totals.activeMemories.toLocaleString()} ${e("atlasPage.kpi.active")}`}),u.jsx(El,{label:e("atlasPage.kpi.todayNew"),value:t.today.newMemories.toLocaleString(),sub:`${t.today.promoted} ${e("atlasPage.kpi.promoted")} · ${t.today.evicted} ${e("atlasPage.kpi.evicted")}`}),u.jsx(El,{label:e("atlasPage.kpi.edges"),value:t.totals.edges.toLocaleString(),sub:e("atlasPage.kpi.causalAndRef")}),u.jsx(El,{label:e("atlasPage.kpi.lastSleep"),value:t.lastConsolidation?Bc(t.lastConsolidation.startedAt):"—",sub:t.lastConsolidation?t.lastConsolidation.summary:e("atlasPage.kpi.noRuns")})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:e("atlasPage.section.byTier")}),u.jsx("div",{className:ce.barGroup,children:m_.map(i=>u.jsx(Kf,{label:i,value:t.byTier[i],max:Math.max(1,...Object.values(t.byTier)),colorVar:`var(--tier-${i})`},i))})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:e("atlasPage.section.byType")}),u.jsx("div",{className:ce.barGroup,children:p_.map(i=>u.jsx(Kf,{label:i,value:t.byType[i],max:Math.max(1,...Object.values(t.byType)),colorVar:`var(--type-${i})`},i))})]}),u.jsxs("section",{className:ce.section,children:[u.jsx("h2",{className:ce.sectionTitle,children:e("atlasPage.section.recentProjects")}),t.recentProjects.length===0?u.jsx("p",{className:ce.empty,children:e("atlasPage.emptyProjects")}):u.jsx("div",{className:ce.projectChips,children:t.recentProjects.map(i=>u.jsxs("a",{href:`/ui/memories?project=${encodeURIComponent(i.project)}`,className:ce.projectChip,children:[u.jsx("span",{className:ce.projectName,children:i.project}),u.jsx("span",{className:ce.projectCount,children:i.count})]},i.project))})]})]}):null}function El({label:e,value:t,sub:n}){return u.jsxs("div",{className:ce.kpi,children:[u.jsx("div",{className:ce.kpiLabel,children:e}),u.jsx("div",{className:ce.kpiValue,children:t}),u.jsx("div",{className:ce.kpiSub,children:n})]})}function Kf({label:e,value:t,max:n,colorVar:r}){const i=n>0?t/n*100:0;return u.jsxs("div",{className:ce.barRow,children:[u.jsx("span",{className:ce.barLabel,children:e}),u.jsx("div",{className:ce.barTrack,children:u.jsx("div",{className:ce.barFill,style:{width:`${i}%`,background:r}})}),u.jsx("span",{className:ce.barValue,children:ng(t)})]})}const v_="_bar_7o9ij_1",y_="_track_7o9ij_7",x_="_fill_7o9ij_17",__="_label_7o9ij_22",kl={bar:v_,track:y_,fill:x_,label:__};function Qc({value:e,label:t=!0}){const n=Math.max(0,Math.min(1,e)),r=(n*100).toFixed(0),i=n<.34?"var(--danger)":n<.67?"var(--warning)":"var(--accent)";return u.jsxs("div",{className:kl.bar,children:[u.jsx("div",{className:kl.track,children:u.jsx("div",{className:kl.fill,style:{width:`${r}%`,background:i}})}),t&&u.jsx("span",{className:kl.label,children:ng(n)})]})}const w_="_badge_1jsky_1",rg={badge:w_},Wf={fact:"var(--type-fact)",decision:"var(--type-decision)",preference:"var(--type-preference)",event:"var(--type-event)",project_context:"var(--type-project_context)",lesson:"var(--type-lesson)",code_pattern:"var(--type-code-pattern)",bug:"var(--type-bug)",workflow:"var(--type-workflow)"},qf={short:"var(--tier-short)",medium:"var(--tier-medium)",long:"var(--tier-long)"};function $a({type:e}){return u.jsx("span",{className:rg.badge,style:{borderColor:Wf[e],color:Wf[e]},children:e})}function ba({tier:e}){return u.jsx("span",{className:rg.badge,style:{borderColor:qf[e],color:qf[e]},children:e})}const P_="_row_ympqr_1",S_="_chip_ympqr_7",j_="_chipKey_ympqr_18",C_="_chipValue_ympqr_23",Nl={row:P_,chip:S_,chipKey:j_,chipValue:C_},Gf={project:"var(--accent)",domain:"var(--link)",topic:"var(--text-muted)"};function Hc({scopes:e}){return e.length===0?null:u.jsx("div",{className:Nl.row,children:e.map(t=>u.jsxs("span",{className:Nl.chip,style:{borderColor:Gf[t.key],color:Gf[t.key]},title:`${t.key} = ${t.value}`,children:[u.jsxs("span",{className:Nl.chipKey,children:[t.key,":"]}),u.jsx("span",{className:Nl.chipValue,children:t.value})]},`${t.key}:${t.value}`))})}const E_="_card_1cfv2_1",k_="_cardSelected_1cfv2_20",N_="_header_1cfv2_25",R_="_title_1cfv2_32",T_="_summary_1cfv2_40",D_="_footer_1cfv2_50",L_="_meta_1cfv2_58",Dn={card:E_,cardSelected:k_,header:N_,title:R_,summary:T_,footer:D_,meta:L_};function M_({memory:e,selected:t=!1,onClick:n}){return u.jsxs("button",{className:t?`${Dn.card} ${Dn.cardSelected}`:Dn.card,onClick:n,type:"button",children:[u.jsxs("div",{className:Dn.header,children:[u.jsx($a,{type:e.type}),u.jsx(ba,{tier:e.tier}),u.jsx("span",{className:Dn.title,children:e.title})]}),u.jsx("div",{className:Dn.summary,children:Qx(e.summary,140)}),u.jsx(Hc,{scopes:e.scopes}),u.jsxs("div",{className:Dn.footer,children:[u.jsx(Qc,{value:e.strength,label:!0}),u.jsxs("span",{className:Dn.meta,children:[e.accessCount,"× · ",Bc(e.lastAccessedAt)]})]})]})}const F_="_page_vxyah_1",O_="_filterRail_vxyah_9",I_="_filterTitle_vxyah_16",z_="_filterGroup_vxyah_25",A_="_filterGroupTitle_vxyah_29",U_="_filterGroupBody_vxyah_36",$_="_filterCheckbox_vxyah_42",b_="_filterInput_vxyah_57",B_="_list_vxyah_67",Q_="_listHeader_vxyah_75",H_="_empty_vxyah_82",V_="_error_vxyah_83",K_="_reading_vxyah_93",W_="_readingArticle_vxyah_100",q_="_readingHeader_vxyah_106",G_="_readingBadges_vxyah_114",Y_="_readingTitle_vxyah_119",X_="_readingSection_vxyah_124",J_="_readingSectionTitle_vxyah_130",Z_="_readingContent_vxyah_138",ew="_readingDl_vxyah_150",tw="_readingActions_vxyah_173",nw="_btnSecondary_vxyah_180",rw="_btnDanger_vxyah_181",oe={page:F_,filterRail:O_,filterTitle:I_,filterGroup:z_,filterGroupTitle:A_,filterGroupBody:U_,filterCheckbox:$_,filterInput:b_,list:B_,listHeader:Q_,empty:H_,error:V_,reading:K_,readingArticle:W_,readingHeader:q_,readingBadges:G_,readingTitle:Y_,readingSection:X_,readingSectionTitle:J_,readingContent:Z_,readingDl:ew,readingActions:tw,btnSecondary:nw,btnDanger:rw},iw=["fact","decision","preference","event","project_context","lesson","code_pattern","bug","workflow"],sw=["short","medium","long"];function lw(){var h;const{t:e}=Ot(),[t,n]=Px(),r=t.get("selected"),i=t.get("project")??"",s=t.getAll("type")??[],l=t.getAll("tier")??[],a=tn({queryKey:["memories",{project:i,types:s,tiers:l}],queryFn:()=>Xe.get(`/memories${Cx({limit:50,type:s[0],tier:l[0]})}`)}),o=tn({queryKey:["memory",r],queryFn:async()=>r?Xe.get(`/memories/${r}`):null,enabled:!!r}),c=Xs(),d=ma({mutationFn:g=>Xe.delete(`/memories/${g}`),onSuccess:()=>{c.invalidateQueries({queryKey:["memories"]}),n(g=>(g.delete("selected"),g))}}),f=(g,x,P)=>{n(k=>{{const m=k.getAll(g),p=m.includes(x)?m.filter(v=>v!==x):[...m,x];k.delete(g);for(const v of p)k.append(g,v)}return k})};return u.jsxs("div",{className:oe.page,children:[u.jsxs("aside",{className:oe.filterRail,children:[u.jsx("h2",{className:oe.filterTitle,children:e("memoriesPage.filters")}),u.jsx(So,{title:e("memoriesPage.filterType"),children:iw.map(g=>u.jsx(Yf,{label:g,checked:s.includes(g),onChange:()=>f("type",g)},g))}),u.jsx(So,{title:e("memoriesPage.filterTier"),children:sw.map(g=>u.jsx(Yf,{label:g,checked:l.includes(g),onChange:()=>f("tier",g)},g))}),u.jsx(So,{title:e("memoriesPage.filterProject"),children:u.jsx("input",{type:"text",placeholder:e("memoriesPage.projectPlaceholder"),className:oe.filterInput,value:i,onChange:g=>n(x=>(g.target.value?x.set("project",g.target.value):x.delete("project"),x))})})]}),u.jsx("section",{className:oe.list,children:a.isLoading?u.jsxs("div",{className:oe.empty,children:[u.jsx("span",{className:"spinner"})," ",e("memoriesPage.loading")]}):a.error?u.jsxs("div",{className:oe.error,children:[e("memoriesPage.error")," ",a.error.message]}):(((h=a.data)==null?void 0:h.memories.length)??0)===0?u.jsx("div",{className:oe.empty,children:e("memoriesPage.empty")}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:oe.listHeader,children:u.jsxs("span",{children:[a.data.total.toLocaleString()," ",e("memoriesPage.total")]})}),a.data.memories.map(g=>u.jsx(M_,{memory:g,selected:g.id===r,onClick:()=>n(x=>(x.set("selected",g.id),x))},g.id))]})}),u.jsx("aside",{className:oe.reading,children:o.isLoading?u.jsxs("div",{className:oe.empty,children:[u.jsx("span",{className:"spinner"})," ",e("memoriesPage.loading")]}):o.data?u.jsx(aw,{memory:o.data,onForget:()=>{confirm(e("memoriesPage.confirmForget",{title:o.data.title}))&&d.mutate(o.data.id)},onExpandGraph:()=>{window.location.href=`/ui/memories/${o.data.id}/graph`}}):u.jsx("div",{className:oe.empty,children:e("memoriesPage.selectHint")})})]})}function So({title:e,children:t}){return u.jsxs("div",{className:oe.filterGroup,children:[u.jsx("h3",{className:oe.filterGroupTitle,children:e}),u.jsx("div",{className:oe.filterGroupBody,children:t})]})}function Yf({label:e,checked:t,onChange:n}){return u.jsxs("label",{className:oe.filterCheckbox,children:[u.jsx("input",{type:"checkbox",checked:t,onChange:n}),u.jsx("span",{children:e})]})}function aw({memory:e,onForget:t,onExpandGraph:n}){const{t:r}=Ot();return u.jsxs("article",{className:oe.readingArticle,children:[u.jsxs("header",{className:oe.readingHeader,children:[u.jsxs("div",{className:oe.readingBadges,children:[u.jsx($a,{type:e.type}),u.jsx(ba,{tier:e.tier})]}),u.jsx("h1",{className:oe.readingTitle,children:e.title}),u.jsx(Hc,{scopes:e.scopes})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:r("memoriesPage.reading.summary")}),u.jsx("p",{children:e.summary})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:r("memoriesPage.reading.content")}),u.jsx("pre",{className:oe.readingContent,children:e.content})]}),u.jsxs("section",{className:oe.readingSection,children:[u.jsx("h2",{className:oe.readingSectionTitle,children:r("memoriesPage.reading.properties")}),u.jsxs("dl",{className:oe.readingDl,children:[u.jsx("dt",{children:r("memoriesPage.reading.strength")}),u.jsx("dd",{children:u.jsx(Qc,{value:e.strength})}),u.jsx("dt",{children:r("memoriesPage.reading.importance")}),u.jsx("dd",{children:e.importance}),u.jsx("dt",{children:r("memoriesPage.reading.confidence")}),u.jsx("dd",{children:e.confidence.toFixed(2)}),u.jsx("dt",{children:r("memoriesPage.reading.accessCount")}),u.jsx("dd",{children:e.accessCount}),u.jsx("dt",{children:r("memoriesPage.reading.source")}),u.jsxs("dd",{children:[e.source,e.sourceClient?` · ${e.sourceClient}`:""]}),u.jsx("dt",{children:r("memoriesPage.reading.created")}),u.jsx("dd",{children:nn(e.createdAt)}),e.lastAccessedAt&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:r("memoriesPage.reading.lastAccessed")}),u.jsx("dd",{children:nn(e.lastAccessedAt)})]})]})]}),u.jsxs("footer",{className:oe.readingActions,children:[u.jsx("button",{onClick:n,className:oe.btnSecondary,children:r("memoriesPage.reading.expandGraph")}),u.jsx("button",{onClick:t,className:oe.btnDanger,children:r("memoriesPage.reading.forget")})]})]})}const ow="_page_1wqmc_1",uw="_loading_1wqmc_9",cw="_error_1wqmc_10",dw="_empty_1wqmc_11",fw="_header_1wqmc_21",hw="_badges_1wqmc_29",pw="_title_1wqmc_34",mw="_section_1wqmc_39",gw="_sectionTitle_1wqmc_45",vw="_content_1wqmc_54",yw="_dl_1wqmc_64",xw="_tabs_1wqmc_85",_w="_tab_1wqmc_85",ww="_tabActive_1wqmc_104",Pw="_edgeList_1wqmc_109",Sw="_edgeItem_1wqmc_118",jw="_edgeDirection_1wqmc_130",Cw="_edgeTarget_1wqmc_136",Ew="_edgeType_1wqmc_142",kw="_edgeStrength_1wqmc_147",Nw="_edgeReason_1wqmc_153",Rw="_logTable_1wqmc_158",Tw="_mono_1wqmc_178",ee={page:ow,loading:uw,error:cw,empty:dw,header:fw,badges:hw,title:pw,section:mw,sectionTitle:gw,content:vw,dl:yw,tabs:xw,tab:_w,tabActive:ww,edgeList:Pw,edgeItem:Sw,edgeDirection:jw,edgeTarget:Cw,edgeType:Ew,edgeStrength:kw,edgeReason:Nw,logTable:Rw,mono:Tw};function Dw(){var o,c,d,f;const{t:e}=Ot(),{id:t}=qm(),n=tn({queryKey:["memory",t],queryFn:()=>Xe.get(`/memories/${t}`),enabled:!!t}),r=tn({queryKey:["memory-graph",t],queryFn:()=>Xe.get(`/memories/${t}/graph?depth=1&direction=both`)}),i=tn({queryKey:["memory-access-logs",t],queryFn:()=>Xe.get(`/memories/${t}/access-logs`)}),[s,l]=C.useState("graph");if(n.isLoading)return u.jsxs("div",{className:ee.loading,children:[u.jsx("span",{className:"spinner"})," ",e("memoryDetail.loading")]});if(n.error)return u.jsx("div",{className:ee.error,children:e("memoryDetail.notFound")});if(!n.data)return null;const a=n.data;return u.jsxs("article",{className:ee.page,children:[u.jsxs("header",{className:ee.header,children:[u.jsxs("div",{className:ee.badges,children:[u.jsx($a,{type:a.type}),u.jsx(ba,{tier:a.tier})]}),u.jsx("h1",{className:ee.title,children:a.title}),u.jsx(Hc,{scopes:a.scopes})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:e("memoryDetail.summary")}),u.jsx("p",{children:a.summary})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:e("memoryDetail.content")}),u.jsx("pre",{className:ee.content,children:a.content})]}),u.jsxs("section",{className:ee.section,children:[u.jsx("h2",{className:ee.sectionTitle,children:e("memoryDetail.properties")}),u.jsxs("dl",{className:ee.dl,children:[u.jsx("dt",{children:e("memoryDetail.strength")}),u.jsx("dd",{children:u.jsx(Qc,{value:a.strength})}),u.jsx("dt",{children:e("memoryDetail.importance")}),u.jsx("dd",{children:a.importance}),u.jsx("dt",{children:e("memoryDetail.confidence")}),u.jsx("dd",{children:a.confidence.toFixed(2)}),u.jsx("dt",{children:e("memoryDetail.accessCount")}),u.jsx("dd",{children:a.accessCount}),u.jsx("dt",{children:e("memoryDetail.source")}),u.jsx("dd",{children:a.source}),u.jsx("dt",{children:e("memoryDetail.created")}),u.jsx("dd",{children:nn(a.createdAt)}),a.lastAccessedAt&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:e("memoryDetail.lastAccessed")}),u.jsx("dd",{children:nn(a.lastAccessedAt)})]})]})]}),u.jsxs("section",{className:ee.section,children:[u.jsxs("div",{className:ee.tabs,children:[u.jsxs("button",{className:s==="graph"?`${ee.tab} ${ee.tabActive}`:ee.tab,onClick:()=>l("graph"),children:[e("memoryDetail.tab.graph")," (",((o=r.data)==null?void 0:o.nodes.length)??0,")"]}),u.jsxs("button",{className:s==="access"?`${ee.tab} ${ee.tabActive}`:ee.tab,onClick:()=>l("access"),children:[e("memoryDetail.tab.accessLogs")," (",((c=i.data)==null?void 0:c.logs.length)??0,")"]})]}),s==="graph"?u.jsx("div",{className:ee.graphPanel,children:(((d=r.data)==null?void 0:d.edges.length)??0)===0?u.jsx("p",{className:ee.empty,children:e("memoryDetail.emptyEdges")}):u.jsx("ul",{className:ee.edgeList,children:r.data.edges.map(h=>u.jsxs("li",{className:ee.edgeItem,children:[u.jsx("span",{className:ee.edgeDirection,children:h.fromMemoryId===a.id?"→":"←"}),u.jsx("a",{href:`/ui/memories/${h.fromMemoryId===a.id?h.toMemoryId:h.fromMemoryId}`,className:ee.edgeTarget,children:h.fromMemoryId===a.id?h.toMemoryId.slice(0,8):h.fromMemoryId.slice(0,8)}),u.jsx("span",{className:ee.edgeType,children:h.type}),u.jsxs("span",{className:ee.edgeStrength,children:[e("memoryDetail.edgeStrength")," ",h.strength.toFixed(2)]}),u.jsx("span",{className:ee.edgeReason,children:h.reason})]},h.id))})}):u.jsx("div",{className:ee.logsPanel,children:(((f=i.data)==null?void 0:f.logs.length)??0)===0?u.jsx("p",{className:ee.empty,children:e("memoryDetail.emptyLogs")}):u.jsxs("table",{className:ee.logTable,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e("memoryDetail.th.when")}),u.jsx("th",{children:e("memoryDetail.th.source")}),u.jsx("th",{children:e("memoryDetail.th.usedInContext")}),u.jsx("th",{children:e("memoryDetail.th.query")})]})}),u.jsx("tbody",{children:i.data.logs.map(h=>u.jsxs("tr",{children:[u.jsx("td",{children:nn(h.accessedAt)}),u.jsx("td",{children:h.source}),u.jsx("td",{children:h.usedInContext?"✓":"—"}),u.jsx("td",{className:ee.mono,children:h.query??"—"})]},h.id))})]})})]})]})}const Lw="_page_1x3bx_1",Mw="_controls_1x3bx_9",Fw="_controlsTitle_1x3bx_16",Ow="_field_1x3bx_25",Iw="_controlVal_1x3bx_50",zw="_edgeTypeList_1x3bx_57",Aw="_edgeType_1x3bx_57",Uw="_canvas_1x3bx_81",$w="_loading_1x3bx_88",bw="_error_1x3bx_89",Bw="_empty_1x3bx_90",Qw="_graphWrap_1x3bx_101",Hw="_node_1x3bx_108",Vw="_nodeCenter_1x3bx_119",Kw="_nodeBadges_1x3bx_126",Ww="_nodeTitle_1x3bx_134",qw="_edges_1x3bx_143",Gw="_edge_1x3bx_57",De={page:Lw,controls:Mw,controlsTitle:Fw,field:Ow,controlVal:Iw,edgeTypeList:zw,edgeType:Aw,canvas:Uw,loading:$w,error:bw,empty:Bw,graphWrap:Qw,node:Hw,nodeCenter:Vw,nodeBadges:Kw,nodeTitle:Ww,edges:qw,edge:Gw},Xf=["causes","enables","contradicts","supersedes","references","related_to","before","after","duplicates","refines"],Jf={causes:"var(--edge-causes)",enables:"var(--edge-enables)",contradicts:"var(--edge-contradicts)",supersedes:"var(--edge-supersedes)",references:"var(--edge-references)",related_to:"var(--edge-related_to)",before:"var(--edge-before)",after:"var(--edge-after)",duplicates:"var(--edge-duplicates)",refines:"var(--edge-refines)"};function Yw(){const{t:e}=Ot(),{id:t}=qm(),[n,r]=C.useState(1),[i,s]=C.useState("both"),[l,a]=C.useState(new Set(Xf)),o=tn({queryKey:["memory-graph",t,n,i],queryFn:()=>{const d=Array.from(l).join(",");return Xe.get(`/memories/${t}/graph?depth=${n}&direction=${i}&edgeTypes=${d}`)}}),c=d=>{a(f=>{const h=new Set(f);return h.has(d)?h.delete(d):h.add(d),h})};return u.jsxs("div",{className:De.page,children:[u.jsxs("aside",{className:De.controls,children:[u.jsx("h2",{className:De.controlsTitle,children:e("graphPage.filters")}),u.jsxs("label",{className:De.field,children:[u.jsx("span",{children:e("graphPage.depth")}),u.jsx("input",{type:"range",min:1,max:3,value:n,onChange:d=>r(Number(d.target.value))}),u.jsx("span",{className:De.controlVal,children:n})]}),u.jsxs("label",{className:De.field,children:[u.jsx("span",{children:e("graphPage.direction")}),u.jsxs("select",{value:i,onChange:d=>s(d.target.value),children:[u.jsx("option",{value:"both",children:e("graphPage.option.both")}),u.jsx("option",{value:"out",children:e("graphPage.option.outgoing")}),u.jsx("option",{value:"in",children:e("graphPage.option.incoming")})]})]}),u.jsxs("div",{className:De.field,children:[u.jsx("span",{children:e("graphPage.edgeTypes")}),u.jsx("div",{className:De.edgeTypeList,children:Xf.map(d=>u.jsxs("label",{className:De.edgeType,children:[u.jsx("input",{type:"checkbox",checked:l.has(d),onChange:()=>c(d)}),u.jsx("span",{style:{borderColor:Jf[d]},children:d})]},d))})]})]}),u.jsx("main",{className:De.canvas,children:o.isLoading?u.jsxs("div",{className:De.loading,children:[u.jsx("span",{className:"spinner"})," ",e("graphPage.loading")]}):o.error?u.jsxs("div",{className:De.error,children:[e("graphPage.error")," ",o.error.message]}):!o.data||o.data.nodes.length===0?u.jsx("div",{className:De.empty,children:e("graphPage.empty")}):u.jsxs("div",{className:De.graphWrap,children:[o.data.nodes.map((d,f)=>{const h=f/Math.max(1,o.data.nodes.length)*2*Math.PI,g=180,x=50+Math.cos(h)*g,P=50+Math.sin(h)*g,k=d.id===t;return u.jsxs("div",{className:k?`${De.node} ${De.nodeCenter}`:De.node,style:{left:`${x}%`,top:`${P}%`},children:[u.jsxs("div",{className:De.nodeBadges,children:[u.jsx($a,{type:d.type}),u.jsx(ba,{tier:d.tier})]}),u.jsx("div",{className:De.nodeTitle,children:d.title})]},d.id)}),o.data.edges.map(d=>{const f=o.data.nodes.findIndex(S=>S.id===d.fromMemoryId),h=o.data.nodes.findIndex(S=>S.id===d.toMemoryId);if(f<0||h<0)return null;const g=f/o.data.nodes.length*2*Math.PI,x=h/o.data.nodes.length*2*Math.PI,P=180,k=50+Math.cos(g)*P,m=50+Math.sin(g)*P,p=50+Math.cos(x)*P,v=50+Math.sin(x)*P;return u.jsx("svg",{className:De.edges,viewBox:"0 0 100 100",preserveAspectRatio:"none",children:u.jsx("line",{x1:k,y1:m,x2:p,y2:v,style:{stroke:Jf[d.type]},className:De.edge})},d.id)})]})})]})}const Xw="_page_11aai_1",Jw="_header_11aai_6",Zw="_title_11aai_10",eP="_subtitle_11aai_15",tP="_split_11aai_20",nP="_form_11aai_26",rP="_formTitle_11aai_36",iP="_field_11aai_45",sP="_submit_11aai_76",lP="_error_11aai_91",aP="_viewer_11aai_99",oP="_empty_11aai_109",uP="_viewerMeta_11aai_115",cP="_metaRow_11aai_123",dP="_metaKey_11aai_131",fP="_metaVal_11aai_139",hP="_metaValMono_11aai_143",pP="_viewerSubTitle_11aai_148",mP="_xml_11aai_157",we={page:Xw,header:Jw,title:Zw,subtitle:eP,split:tP,form:nP,formTitle:rP,field:iP,submit:sP,error:lP,viewer:aP,empty:oP,viewerMeta:uP,metaRow:cP,metaKey:dP,metaVal:fP,metaValMono:hP,viewerSubTitle:pP,xml:mP},gP=["session_start","prompt_delta","file_pack","failure_delta"];function vP(){const{t:e}=Ot(),[t,n]=C.useState("prompt_delta"),[r,i]=C.useState("demo-session"),[s,l]=C.useState("SQLite design"),[a,o]=C.useState(""),[c,d]=C.useState(null),[f,h]=C.useState(null),[g,x]=C.useState(!1),P=async k=>{k.preventDefault(),x(!0),h(null);try{const m={sessionId:r,phase:t,query:s};a.trim()&&(m.files=a.split(",").map(v=>v.trim()).filter(Boolean));const p=await Xe.post("/inject",m);d(p)}catch(m){h(m instanceof eg?`${m.status}: ${JSON.stringify(m.body)}`:m.message)}finally{x(!1)}};return u.jsxs("div",{className:we.page,children:[u.jsxs("header",{className:we.header,children:[u.jsx("h1",{className:we.title,children:e("injectionPage.title")}),u.jsx("p",{className:we.subtitle,children:e("injectionPage.subtitle")})]}),u.jsxs("div",{className:we.split,children:[u.jsxs("form",{className:we.form,onSubmit:P,children:[u.jsx("h2",{className:we.formTitle,children:e("injectionPage.formTitle")}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:e("injectionPage.field.phase")}),u.jsx("select",{value:t,onChange:k=>n(k.target.value),children:gP.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:e("injectionPage.field.sessionId")}),u.jsx("input",{type:"text",value:r,onChange:k=>i(k.target.value)})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:e("injectionPage.field.query")}),u.jsx("textarea",{value:s,onChange:k=>l(k.target.value),rows:3})]}),u.jsxs("label",{className:we.field,children:[u.jsx("span",{children:e("injectionPage.field.files")}),u.jsx("input",{type:"text",value:a,onChange:k=>o(k.target.value)})]}),u.jsx("button",{type:"submit",disabled:g,className:we.submit,children:e(g?"injectionPage.computing":"injectionPage.submit")}),f&&u.jsx("div",{className:we.error,children:f})]}),u.jsx("section",{className:we.viewer,children:c?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:we.viewerMeta,children:[u.jsx(is,{k:e("injectionPage.meta.bundleId"),v:c.bundleId}),u.jsx(is,{k:e("injectionPage.meta.phase"),v:c.phase}),u.jsx(is,{k:e("injectionPage.meta.contentHash"),v:c.contentHash,mono:!0}),u.jsx(is,{k:e("injectionPage.meta.memories"),v:c.memoryIds.length.toString()}),u.jsx(is,{k:e("injectionPage.meta.estimatedTokens"),v:c.estimatedTokens.toString()})]}),u.jsx("h3",{className:we.viewerSubTitle,children:e("injectionPage.sectionXml")}),u.jsx("pre",{className:we.xml,children:c.contextXml})]}):u.jsx("div",{className:we.empty,children:e("injectionPage.empty")})})]})]})}function is({k:e,v:t,mono:n=!1}){return u.jsxs("div",{className:we.metaRow,children:[u.jsx("span",{className:we.metaKey,children:e}),u.jsx("span",{className:n?`${we.metaVal} ${we.metaValMono}`:we.metaVal,children:t})]})}const yP="_page_vld73_1",xP="_header_vld73_6",_P="_title_vld73_14",wP="_subtitle_vld73_19",PP="_actions_vld73_24",SP="_dryRun_vld73_30",jP="_runButton_vld73_38",CP="_loading_vld73_53",EP="_empty_vld73_54",kP="_error_vld73_55",NP="_list_vld73_69",RP="_run_vld73_38",TP="_runHeader_vld73_85",DP="_runNumber_vld73_102",LP="_runTime_vld73_108",MP="_dryRunBadge_vld73_114",FP="_runSummary_vld73_124",OP="_runChevron_vld73_132",IP="_diff_vld73_137",zP="_diffMeta_vld73_143",AP="_diffEmpty_vld73_153",UP="_diffList_vld73_158",$P="_diffOp_vld73_178",bP="_diffMsg_vld73_183",BP="_diffPromoted_vld73_187",QP="_diffEvicted_vld73_190",HP="_diffMerged_vld73_193",se={page:yP,header:xP,title:_P,subtitle:wP,actions:PP,dryRun:SP,runButton:jP,loading:CP,empty:EP,error:kP,list:NP,run:RP,runHeader:TP,runNumber:DP,runTime:LP,dryRunBadge:MP,runSummary:FP,runChevron:OP,diff:IP,diffMeta:zP,diffEmpty:AP,diffList:UP,diffOp:$P,diffMsg:bP,diffPromoted:BP,diffEvicted:QP,diffMerged:HP};function VP(){const{t:e}=Ot(),t=Xs(),{data:n,isLoading:r,error:i}=tn({queryKey:["consolidation-runs"],queryFn:()=>Xe.get("/consolidate/runs?limit=20")}),s=ma({mutationFn:d=>Xe.post("/consolidate",{dryRun:d}),onSuccess:()=>t.invalidateQueries({queryKey:["consolidation-runs"]})}),[l,a]=C.useState(null),[o,c]=C.useState(!1);return u.jsxs("div",{className:se.page,children:[u.jsxs("header",{className:se.header,children:[u.jsxs("div",{children:[u.jsx("h1",{className:se.title,children:e("sleepPage.title")}),u.jsx("p",{className:se.subtitle,children:e("sleepPage.subtitle")})]}),u.jsxs("div",{className:se.actions,children:[u.jsxs("label",{className:se.dryRun,children:[u.jsx("input",{type:"checkbox",checked:o,onChange:d=>c(d.target.checked)}),u.jsx("span",{children:e("sleepPage.dryRun")})]}),u.jsx("button",{className:se.runButton,disabled:s.isPending,onClick:()=>s.mutate(o),children:s.isPending?e("sleepPage.running"):e("sleepPage.runNow")})]})]}),s.error&&u.jsxs("div",{className:se.error,children:[e("sleepPage.runFailed")," ",s.error.message]}),r?u.jsxs("div",{className:se.loading,children:[u.jsx("span",{className:"spinner"})," ",e("sleepPage.loading")]}):i?u.jsxs("div",{className:se.error,children:[e("sleepPage.error")," ",i.message]}):((n==null?void 0:n.runs.length)??0)===0?u.jsx("div",{className:se.empty,children:e("sleepPage.empty")}):u.jsx("ul",{className:se.list,children:n.runs.map((d,f)=>u.jsx(KP,{run:d,cycleNumber:n.runs.length-f,expanded:l===d.id,onToggle:()=>a(l===d.id?null:d.id)},d.id))})]})}function KP({run:e,cycleNumber:t,expanded:n,onToggle:r}){const{t:i}=Ot();return u.jsxs("li",{className:se.run,children:[u.jsxs("button",{className:se.runHeader,onClick:r,children:[u.jsxs("span",{className:se.runNumber,children:[i("sleepPage.cycle"),t]}),u.jsx("span",{className:se.runTime,children:Bc(e.startedAt)}),e.dryRun&&u.jsx("span",{className:se.dryRunBadge,children:i("sleepPage.dryRunBadge")}),u.jsx("span",{className:se.runSummary,children:e.summary}),u.jsx("span",{className:se.runChevron,children:n?"▾":"▸"})]}),n&&u.jsx(WP,{run:e})]})}function WP({run:e}){const{t}=Ot();return u.jsxs("div",{className:se.diff,children:[u.jsxs("div",{className:se.diffMeta,children:[u.jsxs("span",{children:[t("sleepPage.started")," ",nn(e.startedAt)]}),u.jsxs("span",{children:[t("sleepPage.ended")," ",nn(e.endedAt)]}),u.jsxs("span",{children:[t("sleepPage.edgesCreated")," ",e.edgesCreated]}),u.jsxs("span",{children:[t("sleepPage.contradictions")," ",e.contradictionFound]})]}),e.promoted.length===0&&e.evicted.length===0&&e.merged.length===0?u.jsx("p",{className:se.diffEmpty,children:t("sleepPage.noChanges")}):u.jsxs("ul",{className:se.diffList,children:[e.promoted.map(n=>u.jsxs("li",{className:se.diffPromoted,children:[u.jsx("span",{className:se.diffOp,children:"+"}),u.jsxs("span",{className:se.diffMsg,children:[t("sleepPage.promoted")," ",n.slice(0,8)," (short → medium)"]})]},`p${n}`)),e.evicted.map(n=>u.jsxs("li",{className:se.diffEvicted,children:[u.jsx("span",{className:se.diffOp,children:"−"}),u.jsxs("span",{className:se.diffMsg,children:[t("sleepPage.evicted")," ",n.slice(0,8)," (strength < 0.1, age > 7d)"]})]},`e${n}`)),e.merged.map((n,r)=>{var i,s;return u.jsxs("li",{className:se.diffMerged,children:[u.jsx("span",{className:se.diffOp,children:"~"}),u.jsxs("span",{className:se.diffMsg,children:[t("sleepPage.merged")," ",(i=n[0])==null?void 0:i.slice(0,8)," + ",(s=n[1])==null?void 0:s.slice(0,8)]})]},`m${r}`)})]})]})}const qP="_page_pmtma_1",GP="_header_pmtma_6",YP="_title_pmtma_10",XP="_subtitle_pmtma_15",JP="_section_pmtma_20",ZP="_sectionHeader_pmtma_28",eS="_sectionTitle_pmtma_35",tS="_loading_pmtma_45",nS="_empty_pmtma_46",rS="_error_pmtma_47",iS="_dl_pmtma_55",sS="_dlRow_pmtma_62",lS="_dlKey_pmtma_73",aS="_dlVal_pmtma_81",oS="_dlMono_pmtma_83",uS="_btnPrimary_pmtma_85",cS="_btnSecondary_pmtma_86",dS="_btnDanger_pmtma_87",fS="_table_pmtma_122",hS="_dialogBackdrop_pmtma_144",pS="_dialog_pmtma_144",mS="_dialogTitle_pmtma_164",gS="_warning_pmtma_169",vS="_field_pmtma_178",yS="_dialogActions_pmtma_208",Z={page:qP,header:GP,title:YP,subtitle:XP,section:JP,sectionHeader:ZP,sectionTitle:eS,loading:tS,empty:nS,error:rS,dl:iS,dlRow:sS,dlKey:lS,dlVal:aS,dlMono:oS,btnPrimary:uS,btnSecondary:cS,btnDanger:dS,table:fS,dialogBackdrop:hS,dialog:pS,dialogTitle:mS,warning:gS,field:vS,dialogActions:yS};function xS(){var g;const{t:e}=Ot(),t=tn({queryKey:["settings"],queryFn:()=>Xe.get("/settings")}),n=tn({queryKey:["devices"],queryFn:()=>Xe.get("/devices")}),r=Xs(),i=ma({mutationFn:x=>Xe.post("/devices",x),onSuccess:()=>r.invalidateQueries({queryKey:["devices"]})}),s=ma({mutationFn:x=>Xe.delete(`/devices/${x}`),onSuccess:()=>r.invalidateQueries({queryKey:["devices"]})}),[l,a]=C.useState(!1),[o,c]=C.useState(""),[d,f]=C.useState("opencode"),h=x=>{x.preventDefault(),o.trim()&&i.mutate({name:o.trim(),type:d})};return u.jsxs("div",{className:Z.page,children:[u.jsxs("header",{className:Z.header,children:[u.jsx("h1",{className:Z.title,children:e("settingsPage.title")}),u.jsx("p",{className:Z.subtitle,children:e("settingsPage.subtitle")})]}),u.jsxs("section",{className:Z.section,children:[u.jsx("h2",{className:Z.sectionTitle,children:e("settingsPage.section.server")}),t.isLoading?u.jsxs("div",{className:Z.loading,children:[u.jsx("span",{className:"spinner"})," ",e("settingsPage.loading")]}):t.error?u.jsxs("div",{className:Z.error,children:[e("settingsPage.error")," ",t.error.message]}):t.data?u.jsxs("dl",{className:Z.dl,children:[u.jsx(mr,{k:e("settingsPage.server.host"),v:t.data.server.host}),u.jsx(mr,{k:e("settingsPage.server.port"),v:t.data.server.port.toString()}),u.jsx(mr,{k:e("settingsPage.server.dbPath"),v:t.data.storage.path,mono:!0}),u.jsx(mr,{k:e("settingsPage.server.embedding"),v:`${t.data.embedding.provider} (${t.data.embedding.model}, ${t.data.embedding.dimensions}d)`}),u.jsx(mr,{k:e("settingsPage.server.llm"),v:`${t.data.llm.provider} (${t.data.llm.model})`}),u.jsx(mr,{k:e("settingsPage.server.consolidation"),v:t.data.consolidation.enabled?`${e("settingsPage.server.every")} ${t.data.consolidation.intervalHours}h`:e("settingsPage.server.disabled")}),u.jsx(mr,{k:e("settingsPage.server.authRequired"),v:t.data.auth.requireAuth?e("settingsPage.server.yes"):e("settingsPage.server.noDevMode")})]}):null]}),u.jsxs("section",{className:Z.section,children:[u.jsxs("div",{className:Z.sectionHeader,children:[u.jsx("h2",{className:Z.sectionTitle,children:e("settingsPage.section.devices")}),u.jsx("button",{className:Z.btnPrimary,onClick:()=>a(!0),children:e("settingsPage.registerDevice")})]}),n.isLoading?u.jsxs("div",{className:Z.loading,children:[u.jsx("span",{className:"spinner"})," ",e("settingsPage.loading")]}):(((g=n.data)==null?void 0:g.devices.length)??0)===0?u.jsx("div",{className:Z.empty,children:e("settingsPage.emptyDevices")}):u.jsxs("table",{className:Z.table,children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e("settingsPage.table.name")}),u.jsx("th",{children:e("settingsPage.table.type")}),u.jsx("th",{children:e("settingsPage.table.registered")}),u.jsx("th",{children:e("settingsPage.table.lastSeen")}),u.jsx("th",{})]})}),u.jsx("tbody",{children:n.data.devices.map(x=>u.jsxs("tr",{children:[u.jsx("td",{children:x.name}),u.jsx("td",{children:x.type}),u.jsx("td",{children:nn(x.registeredAt)}),u.jsx("td",{children:nn(x.lastSeenAt)}),u.jsx("td",{children:u.jsx("button",{className:Z.btnDanger,onClick:()=>{confirm(e("settingsPage.confirmRevoke",{name:x.name}))&&s.mutate(x.id)},children:e("settingsPage.revoke")})})]},x.id))})]})]}),l&&u.jsx("div",{className:Z.dialogBackdrop,onClick:()=>a(!1),children:u.jsx("div",{className:Z.dialog,onClick:x=>x.stopPropagation(),children:i.data?u.jsxs("div",{children:[u.jsx("h3",{className:Z.dialogTitle,children:e("settingsPage.dialog.created")}),u.jsx("p",{className:Z.warning,children:i.data.notice}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:e("settingsPage.dialog.apiKey")}),u.jsx("input",{value:i.data.apiKey,readOnly:!0,onClick:x=>x.target.select()})]}),u.jsxs("div",{className:Z.dialogActions,children:[u.jsx("button",{type:"button",onClick:()=>{var x;return(x=navigator.clipboard)==null?void 0:x.writeText(i.data.apiKey)},className:Z.btnSecondary,children:e("settingsPage.dialog.copy")}),u.jsx("button",{type:"button",onClick:()=>{a(!1),c(""),i.reset()},className:Z.btnPrimary,children:e("settingsPage.dialog.done")})]})]}):u.jsxs("form",{onSubmit:h,children:[u.jsx("h3",{className:Z.dialogTitle,children:e("settingsPage.dialog.title")}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:e("settingsPage.dialog.name")}),u.jsx("input",{value:o,onChange:x=>c(x.target.value),placeholder:"laptop-1",required:!0})]}),u.jsxs("label",{className:Z.field,children:[u.jsx("span",{children:e("settingsPage.dialog.type")}),u.jsxs("select",{value:d,onChange:x=>f(x.target.value),children:[u.jsx("option",{value:"opencode",children:"opencode"}),u.jsx("option",{value:"cursor",children:"cursor"}),u.jsx("option",{value:"claude_code",children:"claude_code"}),u.jsx("option",{value:"rest",children:"rest"})]})]}),u.jsxs("div",{className:Z.dialogActions,children:[u.jsx("button",{type:"button",onClick:()=>a(!1),className:Z.btnSecondary,children:e("settingsPage.dialog.cancel")}),u.jsx("button",{type:"submit",className:Z.btnPrimary,disabled:i.isPending,children:i.isPending?e("settingsPage.dialog.creating"):e("settingsPage.dialog.create")})]})]})})})]})}function mr({k:e,v:t,mono:n=!1}){return u.jsxs("div",{className:Z.dlRow,children:[u.jsx("span",{className:Z.dlKey,children:e}),u.jsx("span",{className:n?`${Z.dlVal} ${Z.dlMono}`:Z.dlVal,children:t})]})}function _S(){const{t:e}=Ot();return u.jsxs("div",{style:{padding:"48px",textAlign:"center",color:"var(--text-muted)"},children:[u.jsx("h1",{children:e("notFound.title")}),u.jsx("p",{children:e("notFound.message")}),u.jsx("a",{href:"/ui/",children:e("notFound.back")})]})}const wS=sx([{path:"/",element:u.jsx(Bx,{}),children:[{index:!0,element:u.jsx(G1,{to:"/atlas",replace:!0})},{path:"atlas",element:u.jsx(g_,{})},{path:"memories",element:u.jsx(lw,{})},{path:"memories/:id",element:u.jsx(Dw,{})},{path:"memories/:id/graph",element:u.jsx(Yw,{})},{path:"injection",element:u.jsx(vP,{})},{path:"sleep",element:u.jsx(VP,{})},{path:"settings",element:u.jsx(xS,{})},{path:"*",element:u.jsx(_S,{})}]}],{basename:"/ui"}),PS=new P0({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),ig=document.getElementById("root");if(!ig)throw new Error("Root element #root not found");jm(ig).render(u.jsx(C.StrictMode,{children:u.jsx(S0,{client:PS,children:u.jsx(Ex,{children:u.jsx(hx,{router:wS})})})}));
|