@baseplate-dev/project-builder-web 0.2.0 → 0.2.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.
- package/dist/assets/-constants-DdiaSxL9.js +4 -0
- package/dist/assets/-constants-DdiaSxL9.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BEiksgOM.js +2 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-BEiksgOM.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-ByoEPRxY.js +5 -0
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-ByoEPRxY.js.map +1 -0
- package/dist/assets/__federation_shared_@baseplate-dev/{ui-components-BngA7Gbo.js → ui-components-2ByEN20H.js} +2 -2
- package/dist/assets/__federation_shared_@baseplate-dev/{ui-components-BngA7Gbo.js.map → ui-components-2ByEN20H.js.map} +1 -1
- package/dist/assets/{_virtual___federation_fn_import-DTGz4eK3.js → _virtual___federation_fn_import-BllbkH3T.js} +2 -2
- package/dist/assets/{_virtual___federation_fn_import-DTGz4eK3.js.map → _virtual___federation_fn_import-BllbkH3T.js.map} +1 -1
- package/dist/assets/backend-CoTpyUcx.js +2 -0
- package/dist/assets/backend-CoTpyUcx.js.map +1 -0
- package/dist/assets/badge-with-type-label-BTWMyfcL.js +2 -0
- package/dist/assets/badge-with-type-label-BTWMyfcL.js.map +1 -0
- package/dist/assets/edit._id-BzfH4jc0.js +2 -0
- package/dist/assets/edit._id-BzfH4jc0.js.map +1 -0
- package/dist/assets/enum-info-form-EeSfFY6Y.js +2 -0
- package/dist/assets/enum-info-form-EeSfFY6Y.js.map +1 -0
- package/dist/assets/graphql-D5k81FHL.js +2 -0
- package/dist/assets/graphql-D5k81FHL.js.map +1 -0
- package/dist/assets/hierarchy-CDgBahPq.js +2 -0
- package/dist/assets/hierarchy-CDgBahPq.js.map +1 -0
- package/dist/assets/immer-xieDw-3D.js +2 -0
- package/dist/assets/immer-xieDw-3D.js.map +1 -0
- package/dist/assets/index-B5VAZnNv.js +2 -0
- package/dist/assets/index-B5VAZnNv.js.map +1 -0
- package/dist/assets/index-BDJ79UQH.css +1 -0
- package/dist/assets/index-BYcSgAsc.js +2 -0
- package/dist/assets/index-BYcSgAsc.js.map +1 -0
- package/dist/assets/index-CJK2iGtK.js +2 -0
- package/dist/assets/index-CJK2iGtK.js.map +1 -0
- package/dist/assets/index-CJO9KLcs.js +2 -0
- package/dist/assets/index-CJO9KLcs.js.map +1 -0
- package/dist/assets/index-D5UX5AHP.js +5 -0
- package/dist/assets/index-D5UX5AHP.js.map +1 -0
- package/dist/assets/index-DbPo0KMc.js +2 -0
- package/dist/assets/index-DbPo0KMc.js.map +1 -0
- package/dist/assets/index-HA6UU1kS.js +2 -0
- package/dist/assets/index-HA6UU1kS.js.map +1 -0
- package/dist/assets/index-Lx-c3w3C.js +2 -0
- package/dist/assets/index-Lx-c3w3C.js.map +1 -0
- package/dist/assets/index-MPyZaAGd.js +2 -0
- package/dist/assets/index-MPyZaAGd.js.map +1 -0
- package/dist/assets/index-VsI1zxbc.js +58 -0
- package/dist/assets/index-VsI1zxbc.js.map +1 -0
- package/dist/assets/index-ghp0h4jr.js +2 -0
- package/dist/assets/index-ghp0h4jr.js.map +1 -0
- package/dist/assets/index-y6w6FRv9.js +2 -0
- package/dist/assets/index-y6w6FRv9.js.map +1 -0
- package/dist/assets/{index.esm-BCWxrcvn.js → index.esm-CGbP6mNa.js} +3 -3
- package/dist/assets/{index.esm-BCWxrcvn.js.map → index.esm-CGbP6mNa.js.map} +1 -1
- package/dist/assets/inflection-C1nKqrJS.js +9 -0
- package/dist/assets/inflection-C1nKqrJS.js.map +1 -0
- package/dist/assets/model-info-form-DWYyoR9g.js +2 -0
- package/dist/assets/model-info-form-DWYyoR9g.js.map +1 -0
- package/dist/assets/model-merger-s86W4xg2.js +2 -0
- package/dist/assets/model-merger-s86W4xg2.js.map +1 -0
- package/dist/assets/new-app-dialog-CGp0nciM.js +2 -0
- package/dist/assets/new-app-dialog-CGp0nciM.js.map +1 -0
- package/dist/assets/new-enum-dialog-DQxXV11c.js +2 -0
- package/dist/assets/new-enum-dialog-DQxXV11c.js.map +1 -0
- package/dist/assets/new-model-dialog-Ta_YghmL.js +2 -0
- package/dist/assets/new-model-dialog-Ta_YghmL.js.map +1 -0
- package/dist/assets/route-C0DpSC86.js +2 -0
- package/dist/assets/route-C0DpSC86.js.map +1 -0
- package/dist/assets/route-CmgYcJT_.js +2 -0
- package/dist/assets/route-CmgYcJT_.js.map +1 -0
- package/dist/assets/route-D9aGR6_H.js +2 -0
- package/dist/assets/route-D9aGR6_H.js.map +1 -0
- package/dist/assets/route-De01FR6I.js +2 -0
- package/dist/assets/route-De01FR6I.js.map +1 -0
- package/dist/assets/route-DwYLJh1Z.js +2 -0
- package/dist/assets/route-DwYLJh1Z.js.map +1 -0
- package/dist/assets/route-DzDATEIF.js +2 -0
- package/dist/assets/route-DzDATEIF.js.map +1 -0
- package/dist/assets/route-Ofm_Xk4Q.js +2 -0
- package/dist/assets/route-Ofm_Xk4Q.js.map +1 -0
- package/dist/assets/route-cP4l-WDl.js +2 -0
- package/dist/assets/route-cP4l-WDl.js.map +1 -0
- package/dist/assets/route-xrfcRWC7.js +2 -0
- package/dist/assets/route-xrfcRWC7.js.map +1 -0
- package/dist/assets/sections-Bl6CBMqu.js +2 -0
- package/dist/assets/sections-Bl6CBMqu.js.map +1 -0
- package/dist/assets/sections._sectionKey-lnWxksec.js +2 -0
- package/dist/assets/sections._sectionKey-lnWxksec.js.map +1 -0
- package/dist/assets/service-CH1p5s9d.js +2 -0
- package/dist/assets/service-CH1p5s9d.js.map +1 -0
- package/dist/assets/template-extractor-_5pq8PSE.js +2 -0
- package/dist/assets/template-extractor-_5pq8PSE.js.map +1 -0
- package/dist/assets/theme-builder-LEW3UAWc.js +11 -0
- package/dist/assets/theme-builder-LEW3UAWc.js.map +1 -0
- package/dist/assets/use-definition-schema-BB2JVpWG.js +2 -0
- package/dist/assets/use-definition-schema-BB2JVpWG.js.map +1 -0
- package/dist/assets/use-enum-form-CMIHUOLu.js +2 -0
- package/dist/assets/use-enum-form-CMIHUOLu.js.map +1 -0
- package/dist/assets/use-model-form-hncL1MN2.js +2 -0
- package/dist/assets/use-model-form-hncL1MN2.js.map +1 -0
- package/dist/assets/utils-BMK0C56t.js +2 -0
- package/dist/assets/utils-BMK0C56t.js.map +1 -0
- package/dist/assets/web-BRltYNcY.js +2 -0
- package/dist/assets/web-BRltYNcY.js.map +1 -0
- package/dist/index.html +6 -8
- package/package.json +8 -7
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DeLjV85y.js +0 -2
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DeLjV85y.js.map +0 -1
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-CEcnKpIc.js +0 -5
- package/dist/assets/__federation_shared_@baseplate-dev/project-builder-lib-CEcnKpIc.js.map +0 -1
- package/dist/assets/index-BM00URXH.js +0 -78
- package/dist/assets/index-BM00URXH.js.map +0 -1
- package/dist/assets/index-BievMsrf.css +0 -1
- package/dist/assets/index-DC_DCd-Q.js +0 -12
- package/dist/assets/index-DC_DCd-Q.js.map +0 -1
- package/dist/assets/model-merger-xMPe_PFP.js +0 -2
- package/dist/assets/model-merger-xMPe_PFP.js.map +0 -1
- package/dist/assets/not-empty-CxPFIhu9.js +0 -2
- package/dist/assets/not-empty-CxPFIhu9.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-C0DpSC86.js","assets/_virtual___federation_fn_import-BllbkH3T.js","assets/index.esm-CGbP6mNa.js","assets/route-CmgYcJT_.js","assets/index-MPyZaAGd.js","assets/route-De01FR6I.js","assets/new-enum-dialog-DQxXV11c.js","assets/use-enum-form-CMIHUOLu.js","assets/immer-xieDw-3D.js","assets/enum-info-form-EeSfFY6Y.js","assets/new-model-dialog-Ta_YghmL.js","assets/use-model-form-hncL1MN2.js","assets/model-info-form-DWYyoR9g.js","assets/route-DwYLJh1Z.js","assets/new-app-dialog-CGp0nciM.js","assets/index-DbPo0KMc.js","assets/index-ghp0h4jr.js","assets/index-B5VAZnNv.js","assets/utils-BMK0C56t.js","assets/index-Lx-c3w3C.js","assets/theme-builder-LEW3UAWc.js","assets/inflection-C1nKqrJS.js","assets/index-D5UX5AHP.js","assets/template-extractor-_5pq8PSE.js","assets/hierarchy-CDgBahPq.js","assets/route-cP4l-WDl.js","assets/index-CJO9KLcs.js","assets/index-HA6UU1kS.js","assets/edit._id-BzfH4jc0.js","assets/route-D9aGR6_H.js","assets/web-BRltYNcY.js","assets/backend-CoTpyUcx.js","assets/use-definition-schema-BB2JVpWG.js","assets/route-DzDATEIF.js","assets/route-Ofm_Xk4Q.js","assets/route-xrfcRWC7.js","assets/index-y6w6FRv9.js","assets/-constants-DdiaSxL9.js","assets/isEqual-C420KeG-.js","assets/capitalize-gOJXDbsR.js","assets/index-CJK2iGtK.js","assets/index-BYcSgAsc.js","assets/service-CH1p5s9d.js","assets/badge-with-type-label-BTWMyfcL.js","assets/graphql-D5k81FHL.js","assets/sections-Bl6CBMqu.js","assets/sections._sectionKey-lnWxksec.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as ne}from"./_virtual___federation_fn_import-BllbkH3T.js";import{j as S,c as kd,u as LE,g as Cd,s as Zu,a as NE,b as zE}from"./index.esm-CGbP6mNa.js";import{r as Gd,g as Xd}from"./index-9Ra4Lmds.js";import{r as $E}from"./index-B0D_rfGi.js";import{c as zn,G as Ao,M as sv,a as _0,b as BE,d as C0,e as UE,f as qE,n as HE,g as PE,h as D0,i as A0,j as O0,k as VE,l as kE}from"./index-MPyZaAGd.js";import{s as GE,o as XE,p as IE}from"./immer-xieDw-3D.js";(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();var Ju={exports:{}},ll={},Wu={exports:{}},ef={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* scheduler.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var ov;function YE(){return ov||(ov=1,function(a){function l(D,z){var Q=D.length;D.push(z);e:for(;0<Q;){var J=Q-1>>>1,te=D[J];if(0<c(te,z))D[J]=z,D[Q]=te,Q=J;else break e}}function r(D){return D.length===0?null:D[0]}function s(D){if(D.length===0)return null;var z=D[0],Q=D.pop();if(Q!==z){D[0]=Q;e:for(var J=0,te=D.length,ae=te>>>1;J<ae;){var ee=2*(J+1)-1,ie=D[ee],le=ee+1,ce=D[le];if(0>c(ie,Q))le<te&&0>c(ce,ie)?(D[J]=ce,D[le]=Q,J=le):(D[J]=ie,D[ee]=Q,J=ee);else if(le<te&&0>c(ce,Q))D[J]=ce,D[le]=Q,J=le;else break e}}return z}function c(D,z){var Q=D.sortIndex-z.sortIndex;return Q!==0?Q:D.id-z.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var d=Date,h=d.now();a.unstable_now=function(){return d.now()-h}}var p=[],v=[],m=1,g=null,b=3,x=!1,w=!1,R=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function V(D){for(var z=r(v);z!==null;){if(z.callback===null)s(v);else if(z.startTime<=D)s(v),z.sortIndex=z.expirationTime,l(p,z);else break;z=r(v)}}function Z(D){if(R=!1,V(D),!w)if(r(p)!==null)w=!0,$||($=!0,W());else{var z=r(v);z!==null&&k(Z,z.startTime-D)}}var $=!1,H=-1,O=5,P=-1;function K(){return _?!0:!(a.unstable_now()-P<O)}function I(){if(_=!1,$){var D=a.unstable_now();P=D;var z=!0;try{e:{w=!1,R&&(R=!1,U(H),H=-1),x=!0;var Q=b;try{t:{for(V(D),g=r(p);g!==null&&!(g.expirationTime>D&&K());){var J=g.callback;if(typeof J=="function"){g.callback=null,b=g.priorityLevel;var te=J(g.expirationTime<=D);if(D=a.unstable_now(),typeof te=="function"){g.callback=te,V(D),z=!0;break t}g===r(p)&&s(p),V(D)}else s(p);g=r(p)}if(g!==null)z=!0;else{var ae=r(v);ae!==null&&k(Z,ae.startTime-D),z=!1}}break e}finally{g=null,b=Q,x=!1}z=void 0}}finally{z?W():$=!1}}}var W;if(typeof N=="function")W=function(){N(I)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,X=re.port2;re.port1.onmessage=I,W=function(){X.postMessage(null)}}else W=function(){C(I,0)};function k(D,z){H=C(function(){D(a.unstable_now())},z)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(D){D.callback=null},a.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<D?Math.floor(1e3/D):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_next=function(D){switch(b){case 1:case 2:case 3:var z=3;break;default:z=b}var Q=b;b=z;try{return D()}finally{b=Q}},a.unstable_requestPaint=function(){_=!0},a.unstable_runWithPriority=function(D,z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var Q=b;b=D;try{return z()}finally{b=Q}},a.unstable_scheduleCallback=function(D,z,Q){var J=a.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?J+Q:J):Q=J,D){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=Q+te,D={id:m++,callback:z,priorityLevel:D,startTime:Q,expirationTime:te,sortIndex:-1},Q>J?(D.sortIndex=Q,l(v,D),r(p)===null&&D===r(v)&&(R?(U(H),H=-1):R=!0,k(Z,Q-J))):(D.sortIndex=te,l(p,D),w||x||(w=!0,$||($=!0,W()))),D},a.unstable_shouldYield=K,a.unstable_wrapCallback=function(D){var z=b;return function(){var Q=b;b=z;try{return D.apply(this,arguments)}finally{b=Q}}}}(ef)),ef}var cv;function KE(){return cv||(cv=1,Wu.exports=YE()),Wu.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-dom-client.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var uv;function QE(){if(uv)return ll;uv=1;var a=KE(),l=Gd(),r=$E();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d(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 h(e){if(f(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,i=t;;){var o=n.return;if(o===null)break;var u=o.alternate;if(u===null){if(i=o.return,i!==null){n=i;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===n)return h(o),e;if(u===i)return h(o),t;u=u.sibling}throw Error(s(188))}if(n.return!==i.return)n=o,i=u;else{for(var y=!1,E=o.child;E;){if(E===n){y=!0,n=o,i=u;break}if(E===i){y=!0,i=o,n=u;break}E=E.sibling}if(!y){for(E=u.child;E;){if(E===n){y=!0,n=u,i=o;break}if(E===i){y=!0,i=u,n=o;break}E=E.sibling}if(!y)throw Error(s(189))}}if(n.alternate!==i)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),N=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function X(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case _:return"Profiler";case R:return"StrictMode";case Z:return"Suspense";case $:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case N:return(e.displayName||"Context")+".Provider";case U:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:X(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return X(e(t))}catch{}}return null}var k=Array.isArray,D=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},J=[],te=-1;function ae(e){return{current:e}}function ee(e){0>te||(e.current=J[te],J[te]=null,te--)}function ie(e,t){te++,J[te]=e.current,e.current=t}var le=ae(null),ce=ae(null),fe=ae(null),be=ae(null);function me(e,t){switch(ie(fe,t),ie(ce,e),ie(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zg(t),e=$g(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ee(le),ie(le,e)}function ge(){ee(le),ee(ce),ee(fe)}function oe(e){e.memoizedState!==null&&ie(be,e);var t=le.current,n=$g(t,e.type);t!==n&&(ie(ce,e),ie(le,n))}function je(e){ce.current===e&&(ee(le),ee(ce)),be.current===e&&(ee(be),tl._currentValue=Q)}var Re=Object.prototype.hasOwnProperty,Ie=a.unstable_scheduleCallback,Ze=a.unstable_cancelCallback,wt=a.unstable_shouldYield,Tt=a.unstable_requestPaint,Ge=a.unstable_now,on=a.unstable_getCurrentPriorityLevel,xn=a.unstable_ImmediatePriority,jt=a.unstable_UserBlockingPriority,It=a.unstable_NormalPriority,Te=a.unstable_LowPriority,Ve=a.unstable_IdlePriority,ra=a.log,li=a.unstable_setDisableYieldValue,Un=null,Ye=null;function _t(e){if(typeof ra=="function"&&li(e),Ye&&typeof Ye.setStrictMode=="function")try{Ye.setStrictMode(Un,e)}catch{}}var at=Math.clz32?Math.clz32:Nl,Ll=Math.log,wn=Math.LN2;function Nl(e){return e>>>=0,e===0?32:31-(Ll(e)/wn|0)|0}var si=256,oi=4194304;function cn(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $a(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var o=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var E=i&134217727;return E!==0?(i=E&~u,i!==0?o=cn(i):(y&=E,y!==0?o=cn(y):n||(n=E&~e,n!==0&&(o=cn(n))))):(E=i&~u,E!==0?o=cn(E):y!==0?o=cn(y):n||(n=i&~e,n!==0&&(o=cn(n)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:o}function Ba(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function zl(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $l(){var e=si;return si<<=1,(si&4194048)===0&&(si=256),e}function Bl(){var e=oi;return oi<<=1,(oi&62914560)===0&&(oi=4194304),e}function dr(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ct(e,t,n,i,o,u){var y=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var E=e.entanglements,T=e.expirationTimes,L=e.hiddenUpdates;for(n=y&~n;0<n;){var G=31-at(n),F=1<<G;E[G]=0,T[G]=-1;var B=L[G];if(B!==null)for(L[G]=null,G=0;G<B.length;G++){var q=B[G];q!==null&&(q.lane&=-536870913)}n&=~F}i!==0&&bt(e,i,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function bt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-at(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&4194090}function un(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-at(n),o=1<<i;o&t|e[i]&t&&(e[i]|=t),n&=~o}}function St(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function dt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ut(){var e=z.p;return e!==0?e:(e=window.event,e===void 0?32:tv(e.type))}function la(e,t){var n=z.p;try{return z.p=e,t()}finally{z.p=n}}var Ue=Math.random().toString(36).slice(2),He="__reactFiber$"+Ue,Pe="__reactProps$"+Ue,Et="__reactContainer$"+Ue,qn="__reactEvents$"+Ue,Ua="__reactListeners$"+Ue,Tn="__reactHandles$"+Ue,sa="__reactResources$"+Ue,Hn="__reactMarker$"+Ue;function Go(e){delete e[He],delete e[Pe],delete e[qn],delete e[Ua],delete e[Tn]}function ci(e){var t=e[He];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Et]||n[He]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hg(e);e!==null;){if(n=e[He])return n;e=Hg(e)}return t}e=n,n=e.parentNode}return null}function ui(e){if(e=e[He]||e[Et]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function hr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function fi(e){var t=e[sa];return t||(t=e[sa]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function st(e){e[Hn]=!0}var wh=new Set,Th={};function qa(e,t){di(e,t),di(e+"Capture",t)}function di(e,t){for(Th[e]=t,e=0;e<t.length;e++)wh.add(t[e])}var TS=RegExp("^[: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]*$"),_h={},Ch={};function _S(e){return Re.call(Ch,e)?!0:Re.call(_h,e)?!1:TS.test(e)?Ch[e]=!0:(_h[e]=!0,!1)}function Ul(e,t,n){if(_S(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ql(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Pn(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}var Xo,Dh;function hi(e){if(Xo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xo=t&&t[1]||"",Dh=-1<n.stack.indexOf(`
|
|
19
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
20
|
+
`+Xo+e+Dh}var Io=!1;function Yo(e,t){if(!e||Io)return"";Io=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(q){var B=q}Reflect.construct(e,[],F)}else{try{F.call()}catch(q){B=q}e.call(F.prototype)}}else{try{throw Error()}catch(q){B=q}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(q){if(q&&B&&typeof q.stack=="string")return[q.stack,B.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=i.DetermineComponentFrameRoot(),y=u[0],E=u[1];if(y&&E){var T=y.split(`
|
|
21
|
+
`),L=E.split(`
|
|
22
|
+
`);for(o=i=0;i<T.length&&!T[i].includes("DetermineComponentFrameRoot");)i++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(i===T.length||o===L.length)for(i=T.length-1,o=L.length-1;1<=i&&0<=o&&T[i]!==L[o];)o--;for(;1<=i&&0<=o;i--,o--)if(T[i]!==L[o]){if(i!==1||o!==1)do if(i--,o--,0>o||T[i]!==L[o]){var G=`
|
|
23
|
+
`+T[i].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=i&&0<=o);break}}}finally{Io=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?hi(n):""}function CS(e){switch(e.tag){case 26:case 27:case 5:return hi(e.type);case 16:return hi("Lazy");case 13:return hi("Suspense");case 19:return hi("SuspenseList");case 0:case 15:return Yo(e.type,!1);case 11:return Yo(e.type.render,!1);case 1:return Yo(e.type,!0);case 31:return hi("Activity");default:return""}}function Ah(e){try{var t="";do t+=CS(e),e=e.return;while(e);return t}catch(n){return`
|
|
24
|
+
Error generating stack: `+n.message+`
|
|
25
|
+
`+n.stack}}function Yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function DS(e){var t=Oh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(y){i=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hl(e){e._valueTracker||(e._valueTracker=DS(e))}function jh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Oh(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Pl(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}}var AS=/[\n"\\]/g;function Kt(e){return e.replace(AS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ko(e,t,n,i,o,u,y,E){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Yt(t)):e.value!==""+Yt(t)&&(e.value=""+Yt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Qo(e,y,Yt(t)):n!=null?Qo(e,y,Yt(n)):i!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Yt(E):e.removeAttribute("name")}function Mh(e,t,n,i,o,u,y,E){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;n=n!=null?""+Yt(n):"",t=t!=null?""+Yt(t):n,E||t===e.value||(e.value=t),e.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=E?e.checked:!!i,e.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function Qo(e,t,n){t==="number"&&Pl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function pi(e,t,n,i){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&i&&(e[n].defaultSelected=!0)}else{for(n=""+Yt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,i&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Lh(e,t,n){if(t!=null&&(t=""+Yt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Yt(n):""}function Nh(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(s(92));if(k(i)){if(1<i.length)throw Error(s(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=Yt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i)}function mi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var OS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zh(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||OS.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $h(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var o in t)i=t[o],t.hasOwnProperty(o)&&n[o]!==i&&zh(e,o,i)}else for(var u in t)t.hasOwnProperty(u)&&zh(e,u,t[u])}function Fo(e){if(e.indexOf("-")===-1)return!1;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 jS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),MS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vl(e){return MS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Zo=null;function Jo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gi=null,vi=null;function Bh(e){var t=ui(e);if(t&&(e=t.stateNode)){var n=e[Pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ko(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var o=i[Pe]||null;if(!o)throw Error(s(90));Ko(i,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&jh(i)}break e;case"textarea":Lh(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}}}var Wo=!1;function Uh(e,t,n){if(Wo)return e(t,n);Wo=!0;try{var i=e(t);return i}finally{if(Wo=!1,(gi!==null||vi!==null)&&(Cs(),gi&&(t=gi,e=vi,vi=gi=null,Bh(t),e)))for(t=0;t<e.length;t++)Bh(e[t])}}function pr(e,t){var n=e.stateNode;if(n===null)return null;var i=n[Pe]||null;if(i===null)return null;n=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(Vn)try{var mr={};Object.defineProperty(mr,"passive",{get:function(){ec=!0}}),window.addEventListener("test",mr,mr),window.removeEventListener("test",mr,mr)}catch{ec=!1}var oa=null,tc=null,kl=null;function qh(){if(kl)return kl;var e,t=tc,n=t.length,i,o="value"in oa?oa.value:oa.textContent,u=o.length;for(e=0;e<n&&t[e]===o[e];e++);var y=n-e;for(i=1;i<=y&&t[n-i]===o[u-i];i++);return kl=o.slice(e,1<i?1-i:void 0)}function Gl(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 Xl(){return!0}function Hh(){return!1}function Mt(e){function t(n,i,o,u,y){this._reactName=n,this._targetInst=o,this.type=i,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(n=e[E],this[E]=n?n(u):u[E]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Xl:Hh,this.isPropagationStopped=Hh,this}return m(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=Xl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),t}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Il=Mt(Ha),gr=m({},Ha,{view:0,detail:0}),LS=Mt(gr),nc,ac,vr,Yl=m({},gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,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!==vr&&(vr&&e.type==="mousemove"?(nc=e.screenX-vr.screenX,ac=e.screenY-vr.screenY):ac=nc=0,vr=e),nc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),Ph=Mt(Yl),NS=m({},Yl,{dataTransfer:0}),zS=Mt(NS),$S=m({},gr,{relatedTarget:0}),ic=Mt($S),BS=m({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),US=Mt(BS),qS=m({},Ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),HS=Mt(qS),PS=m({},Ha,{data:0}),Vh=Mt(PS),VS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kS={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"},GS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=GS[e])?!!t[e]:!1}function rc(){return XS}var IS=m({},gr,{key:function(e){if(e.key){var t=VS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(e){return e.type==="keypress"?Gl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),YS=Mt(IS),KS=m({},Yl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kh=Mt(KS),QS=m({},gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),FS=Mt(QS),ZS=m({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),JS=Mt(ZS),WS=m({},Yl,{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}),e1=Mt(WS),t1=m({},Ha,{newState:0,oldState:0}),n1=Mt(t1),a1=[9,13,27,32],lc=Vn&&"CompositionEvent"in window,yr=null;Vn&&"documentMode"in document&&(yr=document.documentMode);var i1=Vn&&"TextEvent"in window&&!yr,Gh=Vn&&(!lc||yr&&8<yr&&11>=yr),Xh=" ",Ih=!1;function Yh(e,t){switch(e){case"keyup":return a1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yi=!1;function r1(e,t){switch(e){case"compositionend":return Kh(t);case"keypress":return t.which!==32?null:(Ih=!0,Xh);case"textInput":return e=t.data,e===Xh&&Ih?null:e;default:return null}}function l1(e,t){if(yi)return e==="compositionend"||!lc&&Yh(e,t)?(e=qh(),kl=tc=oa=null,yi=!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 Gh&&t.locale!=="ko"?null:t.data;default:return null}}var s1={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 Qh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!s1[e.type]:t==="textarea"}function Fh(e,t,n,i){gi?vi?vi.push(i):vi=[i]:gi=i,t=Ls(t,"onChange"),0<t.length&&(n=new Il("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var br=null,Sr=null;function o1(e){Og(e,0)}function Kl(e){var t=hr(e);if(jh(t))return e}function Zh(e,t){if(e==="change")return t}var Jh=!1;if(Vn){var sc;if(Vn){var oc="oninput"in document;if(!oc){var Wh=document.createElement("div");Wh.setAttribute("oninput","return;"),oc=typeof Wh.oninput=="function"}sc=oc}else sc=!1;Jh=sc&&(!document.documentMode||9<document.documentMode)}function ep(){br&&(br.detachEvent("onpropertychange",tp),Sr=br=null)}function tp(e){if(e.propertyName==="value"&&Kl(Sr)){var t=[];Fh(t,Sr,e,Jo(e)),Uh(o1,t)}}function c1(e,t,n){e==="focusin"?(ep(),br=t,Sr=n,br.attachEvent("onpropertychange",tp)):e==="focusout"&&ep()}function u1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Kl(Sr)}function f1(e,t){if(e==="click")return Kl(t)}function d1(e,t){if(e==="input"||e==="change")return Kl(t)}function h1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:h1;function Er(e,t){if(qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var o=n[i];if(!Re.call(t,o)||!qt(e[o],t[o]))return!1}return!0}function np(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ap(e,t){var n=np(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=np(n)}}function ip(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ip(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Pl(e.document)}return t}function cc(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")}var p1=Vn&&"documentMode"in document&&11>=document.documentMode,bi=null,uc=null,Rr=null,fc=!1;function lp(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fc||bi==null||bi!==Pl(i)||(i=bi,"selectionStart"in i&&cc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Rr&&Er(Rr,i)||(Rr=i,i=Ls(uc,"onSelect"),0<i.length&&(t=new Il("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=bi)))}function Pa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Si={animationend:Pa("Animation","AnimationEnd"),animationiteration:Pa("Animation","AnimationIteration"),animationstart:Pa("Animation","AnimationStart"),transitionrun:Pa("Transition","TransitionRun"),transitionstart:Pa("Transition","TransitionStart"),transitioncancel:Pa("Transition","TransitionCancel"),transitionend:Pa("Transition","TransitionEnd")},dc={},sp={};Vn&&(sp=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function Va(e){if(dc[e])return dc[e];if(!Si[e])return e;var t=Si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sp)return dc[e]=t[n];return e}var op=Va("animationend"),cp=Va("animationiteration"),up=Va("animationstart"),m1=Va("transitionrun"),g1=Va("transitionstart"),v1=Va("transitioncancel"),fp=Va("transitionend"),dp=new Map,hc="abort auxClick beforeToggle 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(" ");hc.push("scrollEnd");function fn(e,t){dp.set(e,t),qa(t,[e])}var hp=new WeakMap;function Qt(e,t){if(typeof e=="object"&&e!==null){var n=hp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Ah(t)},hp.set(e,t),t)}return{value:e,source:t,stack:Ah(t)}}var Ft=[],Ei=0,pc=0;function Ql(){for(var e=Ei,t=pc=Ei=0;t<e;){var n=Ft[t];Ft[t++]=null;var i=Ft[t];Ft[t++]=null;var o=Ft[t];Ft[t++]=null;var u=Ft[t];if(Ft[t++]=null,i!==null&&o!==null){var y=i.pending;y===null?o.next=o:(o.next=y.next,y.next=o),i.pending=o}u!==0&&pp(n,o,u)}}function Fl(e,t,n,i){Ft[Ei++]=e,Ft[Ei++]=t,Ft[Ei++]=n,Ft[Ei++]=i,pc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function mc(e,t,n,i){return Fl(e,t,n,i),Zl(e)}function Ri(e,t){return Fl(e,null,null,t),Zl(e)}function pp(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var o=!1,u=e.return;u!==null;)u.childLanes|=n,i=u.alternate,i!==null&&(i.childLanes|=n),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-at(n),e=u.hiddenUpdates,i=e[o],i===null?e[o]=[t]:i.push(t),t.lane=n|536870912),u):null}function Zl(e){if(50<Yr)throw Yr=0,Eu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xi={};function y1(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,t,n,i){return new y1(e,t,n,i)}function gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kn(e,t){var n=e.alternate;return n===null?(n=Ht(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&65011712,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.refCleanup=e.refCleanup,n}function mp(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Jl(e,t,n,i,o,u){var y=0;if(i=e,typeof e=="function")gc(e)&&(y=1);else if(typeof e=="string")y=SE(e,n,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Ht(31,n,t,o),e.elementType=P,e.lanes=u,e;case w:return ka(n.children,o,u,t);case R:y=8,o|=24;break;case _:return e=Ht(12,n,t,o|2),e.elementType=_,e.lanes=u,e;case Z:return e=Ht(13,n,t,o),e.elementType=Z,e.lanes=u,e;case $:return e=Ht(19,n,t,o),e.elementType=$,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case C:case N:y=10;break e;case U:y=9;break e;case V:y=11;break e;case H:y=14;break e;case O:y=16,i=null;break e}y=29,n=Error(s(130,e===null?"null":typeof e,"")),i=null}return t=Ht(y,n,t,o),t.elementType=e,t.type=i,t.lanes=u,t}function ka(e,t,n,i){return e=Ht(7,e,i,t),e.lanes=n,e}function vc(e,t,n){return e=Ht(6,e,null,t),e.lanes=n,e}function yc(e,t,n){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wi=[],Ti=0,Wl=null,es=0,Zt=[],Jt=0,Ga=null,Gn=1,Xn="";function Xa(e,t){wi[Ti++]=es,wi[Ti++]=Wl,Wl=e,es=t}function gp(e,t,n){Zt[Jt++]=Gn,Zt[Jt++]=Xn,Zt[Jt++]=Ga,Ga=e;var i=Gn;e=Xn;var o=32-at(i)-1;i&=~(1<<o),n+=1;var u=32-at(t)+o;if(30<u){var y=o-o%5;u=(i&(1<<y)-1).toString(32),i>>=y,o-=y,Gn=1<<32-at(t)+o|n<<o|i,Xn=u+e}else Gn=1<<u|n<<o|i,Xn=e}function bc(e){e.return!==null&&(Xa(e,1),gp(e,1,0))}function Sc(e){for(;e===Wl;)Wl=wi[--Ti],wi[Ti]=null,es=wi[--Ti],wi[Ti]=null;for(;e===Ga;)Ga=Zt[--Jt],Zt[Jt]=null,Xn=Zt[--Jt],Zt[Jt]=null,Gn=Zt[--Jt],Zt[Jt]=null}var Dt=null,Qe=null,Ce=!1,Ia=null,_n=!1,Ec=Error(s(519));function Ya(e){var t=Error(s(418,""));throw Tr(Qt(t,e)),Ec}function vp(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[He]=e,t[Pe]=i,n){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(n=0;n<Qr.length;n++)Ee(Qr[n],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),Mh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Hl(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Nh(t,i.value,i.defaultValue,i.children),Hl(t)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||Ng(t.textContent,n)?(i.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),i.onScroll!=null&&Ee("scroll",t),i.onScrollEnd!=null&&Ee("scrollend",t),i.onClick!=null&&(t.onclick=Ns),t=!0):t=!1,t||Ya(e)}function yp(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 13:_n=!1;return;case 27:case 3:_n=!0;return;default:Dt=Dt.return}}function xr(e){if(e!==Dt)return!1;if(!Ce)return yp(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Bu(e.type,e.memoizedProps)),n=!n),n&&Qe&&Ya(e),yp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Qe=hn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Qe=null}}else t===27?(t=Qe,wa(e.type)?(e=Pu,Pu=null,Qe=e):Qe=t):Qe=Dt?hn(e.stateNode.nextSibling):null;return!0}function wr(){Qe=Dt=null,Ce=!1}function bp(){var e=Ia;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Ia=null),e}function Tr(e){Ia===null?Ia=[e]:Ia.push(e)}var Rc=ae(null),Ka=null,In=null;function ca(e,t,n){ie(Rc,t._currentValue),t._currentValue=n}function Yn(e){e._currentValue=Rc.current,ee(Rc)}function xc(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function wc(e,t,n,i){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var y=o.child;u=u.firstContext;e:for(;u!==null;){var E=u;u=o;for(var T=0;T<t.length;T++)if(E.context===t[T]){u.lanes|=n,E=u.alternate,E!==null&&(E.lanes|=n),xc(u.return,n,e),i||(y=null);break e}u=E.next}}else if(o.tag===18){if(y=o.return,y===null)throw Error(s(341));y.lanes|=n,u=y.alternate,u!==null&&(u.lanes|=n),xc(y,n,e),y=null}else y=o.child;if(y!==null)y.return=o;else for(y=o;y!==null;){if(y===e){y=null;break}if(o=y.sibling,o!==null){o.return=y.return,y=o;break}y=y.return}o=y}}function _r(e,t,n,i){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var y=o.alternate;if(y===null)throw Error(s(387));if(y=y.memoizedProps,y!==null){var E=o.type;qt(o.pendingProps.value,y.value)||(e!==null?e.push(E):e=[E])}}else if(o===be.current){if(y=o.alternate,y===null)throw Error(s(387));y.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(tl):e=[tl])}o=o.return}e!==null&&wc(t,e,n,i),t.flags|=262144}function ts(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qa(e){Ka=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Sp(Ka,e)}function ns(e,t){return Ka===null&&Qa(e),Sp(e,t)}function Sp(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},In===null){if(e===null)throw Error(s(308));In=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else In=In.next=t;return n}var b1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},S1=a.unstable_scheduleCallback,E1=a.unstable_NormalPriority,it={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tc(){return{controller:new b1,data:new Map,refCount:0}}function Cr(e){e.refCount--,e.refCount===0&&S1(E1,function(){e.controller.abort()})}var Dr=null,_c=0,_i=0,Ci=null;function R1(e,t){if(Dr===null){var n=Dr=[];_c=0,_i=Du(),Ci={status:"pending",value:void 0,then:function(i){n.push(i)}}}return _c++,t.then(Ep,Ep),t}function Ep(){if(--_c===0&&Dr!==null){Ci!==null&&(Ci.status="fulfilled");var e=Dr;Dr=null,_i=0,Ci=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function x1(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(i.status="rejected",i.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),i}var Rp=D.S;D.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&R1(e,t),Rp!==null&&Rp(e,t)};var Fa=ae(null);function Cc(){var e=Fa.current;return e!==null?e:qe.pooledCache}function as(e,t){t===null?ie(Fa,Fa.current):ie(Fa,t.pool)}function xp(){var e=Cc();return e===null?null:{parent:it._currentValue,pool:e}}var Ar=Error(s(460)),wp=Error(s(474)),is=Error(s(542)),Dc={then:function(){}};function Tp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rs(){}function _p(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(rs,rs),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dp(e),e;default:if(typeof t.status=="string")t.then(rs,rs);else{if(e=qe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=i}},function(i){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dp(e),e}throw Or=t,Ar}}var Or=null;function Cp(){if(Or===null)throw Error(s(459));var e=Or;return Or=null,e}function Dp(e){if(e===Ar||e===is)throw Error(s(483))}var ua=!1;function Ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function da(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ae&2)!==0){var o=i.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),i.pending=t,t=Zl(e),pp(e,null,n),t}return Fl(e,i,t,n),Zl(e)}function jr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,un(e,n)}}function jc(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var o=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var y={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?o=u=y:u=u.next=y,n=n.next}while(n!==null);u===null?o=u=t:u=u.next=t}else o=u=t;n={baseState:i.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Mc=!1;function Mr(){if(Mc){var e=Ci;if(e!==null)throw e}}function Lr(e,t,n,i){Mc=!1;var o=e.updateQueue;ua=!1;var u=o.firstBaseUpdate,y=o.lastBaseUpdate,E=o.shared.pending;if(E!==null){o.shared.pending=null;var T=E,L=T.next;T.next=null,y===null?u=L:y.next=L,y=T;var G=e.alternate;G!==null&&(G=G.updateQueue,E=G.lastBaseUpdate,E!==y&&(E===null?G.firstBaseUpdate=L:E.next=L,G.lastBaseUpdate=T))}if(u!==null){var F=o.baseState;y=0,G=L=T=null,E=u;do{var B=E.lane&-536870913,q=B!==E.lane;if(q?(xe&B)===B:(i&B)===B){B!==0&&B===_i&&(Mc=!0),G!==null&&(G=G.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var pe=e,de=E;B=t;var Ne=n;switch(de.tag){case 1:if(pe=de.payload,typeof pe=="function"){F=pe.call(Ne,F,B);break e}F=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=de.payload,B=typeof pe=="function"?pe.call(Ne,F,B):pe,B==null)break e;F=m({},F,B);break e;case 2:ua=!0}}B=E.callback,B!==null&&(e.flags|=64,q&&(e.flags|=8192),q=o.callbacks,q===null?o.callbacks=[B]:q.push(B))}else q={lane:B,tag:E.tag,payload:E.payload,callback:E.callback,next:null},G===null?(L=G=q,T=F):G=G.next=q,y|=B;if(E=E.next,E===null){if(E=o.shared.pending,E===null)break;q=E,E=q.next,q.next=null,o.lastBaseUpdate=q,o.shared.pending=null}}while(!0);G===null&&(T=F),o.baseState=T,o.firstBaseUpdate=L,o.lastBaseUpdate=G,u===null&&(o.shared.lanes=0),Sa|=y,e.lanes=y,e.memoizedState=F}}function Ap(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Op(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ap(n[e],t)}var Di=ae(null),ls=ae(0);function jp(e,t){e=ea,ie(ls,e),ie(Di,t),ea=e|t.baseLanes}function Lc(){ie(ls,ea),ie(Di,Di.current)}function Nc(){ea=ls.current,ee(Di),ee(ls)}var ha=0,ve=null,Me=null,et=null,ss=!1,Ai=!1,Za=!1,os=0,Nr=0,Oi=null,w1=0;function Je(){throw Error(s(321))}function zc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qt(e[n],t[n]))return!1;return!0}function $c(e,t,n,i,o,u){return ha=u,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?pm:mm,Za=!1,u=n(i,o),Za=!1,Ai&&(u=Lp(t,n,i,o)),Mp(e),u}function Mp(e){D.H=ps;var t=Me!==null&&Me.next!==null;if(ha=0,et=Me=ve=null,ss=!1,Nr=0,Oi=null,t)throw Error(s(300));e===null||ot||(e=e.dependencies,e!==null&&ts(e)&&(ot=!0))}function Lp(e,t,n,i){ve=e;var o=0;do{if(Ai&&(Oi=null),Nr=0,Ai=!1,25<=o)throw Error(s(301));if(o+=1,et=Me=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}D.H=j1,u=t(n,i)}while(Ai);return u}function T1(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?zr(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(ve.flags|=1024),t}function Bc(){var e=os!==0;return os=0,e}function Uc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function qc(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}ha=0,et=Me=ve=null,Ai=!1,Nr=os=0,Oi=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?ve.memoizedState=et=e:et=et.next=e,et}function tt(){if(Me===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=et===null?ve.memoizedState:et.next;if(t!==null)et=t,Me=e;else{if(e===null)throw ve.alternate===null?Error(s(467)):Error(s(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},et===null?ve.memoizedState=et=e:et=et.next=e}return et}function Hc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zr(e){var t=Nr;return Nr+=1,Oi===null&&(Oi=[]),e=_p(Oi,e,t),t=ve,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?pm:mm),e}function cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zr(e);if(e.$$typeof===N)return Rt(e)}throw Error(s(438,String(e)))}function Pc(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=ve.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Hc(),ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=K;return t.index++,n}function Kn(e,t){return typeof t=="function"?t(e):t}function us(e){var t=tt();return Vc(t,Me,e)}function Vc(e,t,n){var i=e.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=n;var o=e.baseQueue,u=i.pending;if(u!==null){if(o!==null){var y=o.next;o.next=u.next,u.next=y}t.baseQueue=o=u,i.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var E=y=null,T=null,L=t,G=!1;do{var F=L.lane&-536870913;if(F!==L.lane?(xe&F)===F:(ha&F)===F){var B=L.revertLane;if(B===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),F===_i&&(G=!0);else if((ha&B)===B){L=L.next,B===_i&&(G=!0);continue}else F={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},T===null?(E=T=F,y=u):T=T.next=F,ve.lanes|=B,Sa|=B;F=L.action,Za&&n(u,F),u=L.hasEagerState?L.eagerState:n(u,F)}else B={lane:F,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},T===null?(E=T=B,y=u):T=T.next=B,ve.lanes|=F,Sa|=F;L=L.next}while(L!==null&&L!==t);if(T===null?y=u:T.next=E,!qt(u,e.memoizedState)&&(ot=!0,G&&(n=Ci,n!==null)))throw n;e.memoizedState=u,e.baseState=y,e.baseQueue=T,i.lastRenderedState=u}return o===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function kc(e){var t=tt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var i=n.dispatch,o=n.pending,u=t.memoizedState;if(o!==null){n.pending=null;var y=o=o.next;do u=e(u,y.action),y=y.next;while(y!==o);qt(u,t.memoizedState)||(ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),n.lastRenderedState=u}return[u,i]}function Np(e,t,n){var i=ve,o=tt(),u=Ce;if(u){if(n===void 0)throw Error(s(407));n=n()}else n=t();var y=!qt((Me||o).memoizedState,n);y&&(o.memoizedState=n,ot=!0),o=o.queue;var E=Bp.bind(null,i,o,e);if($r(2048,8,E,[e]),o.getSnapshot!==t||y||et!==null&&et.memoizedState.tag&1){if(i.flags|=2048,ji(9,fs(),$p.bind(null,i,o,n,t),null),qe===null)throw Error(s(349));u||(ha&124)!==0||zp(i,t,n)}return n}function zp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=Hc(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $p(e,t,n,i){t.value=n,t.getSnapshot=i,Up(t)&&qp(e)}function Bp(e,t,n){return n(function(){Up(t)&&qp(e)})}function Up(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qt(e,n)}catch{return!0}}function qp(e){var t=Ri(e,2);t!==null&&Xt(t,e,2)}function Gc(e){var t=Lt();if(typeof e=="function"){var n=e;if(e=n(),Za){_t(!0);try{n()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function Hp(e,t,n,i){return e.baseState=n,Vc(e,Me,typeof i=="function"?i:Kn)}function _1(e,t,n,i,o){if(hs(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};D.T!==null?n(!0):u.isTransition=!1,i(u),n=t.pending,n===null?(u.next=t.pending=u,Pp(t,u)):(u.next=n.next,t.pending=n.next=u)}}function Pp(e,t){var n=t.action,i=t.payload,o=e.state;if(t.isTransition){var u=D.T,y={};D.T=y;try{var E=n(o,i),T=D.S;T!==null&&T(y,E),Vp(e,t,E)}catch(L){Xc(e,t,L)}finally{D.T=u}}else try{u=n(o,i),Vp(e,t,u)}catch(L){Xc(e,t,L)}}function Vp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){kp(e,t,i)},function(i){return Xc(e,t,i)}):kp(e,t,n)}function kp(e,t,n){t.status="fulfilled",t.value=n,Gp(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Pp(e,n)))}function Xc(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,Gp(t),t=t.next;while(t!==i)}e.action=null}function Gp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xp(e,t){return t}function Ip(e,t){if(Ce){var n=qe.formState;if(n!==null){e:{var i=ve;if(Ce){if(Qe){t:{for(var o=Qe,u=_n;o.nodeType!==8;){if(!u){o=null;break t}if(o=hn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Qe=hn(o.nextSibling),i=o.data==="F!";break e}}Ya(i)}i=!1}i&&(t=n[0])}}return n=Lt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:t},n.queue=i,n=fm.bind(null,ve,i),i.dispatch=n,i=Gc(!1),u=Fc.bind(null,ve,!1,i.queue),i=Lt(),o={state:t,dispatch:null,action:e,pending:null},i.queue=o,n=_1.bind(null,ve,o,u,n),o.dispatch=n,i.memoizedState=e,[t,n,!1]}function Yp(e){var t=tt();return Kp(t,Me,e)}function Kp(e,t,n){if(t=Vc(e,t,Xp)[0],e=us(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=zr(t)}catch(y){throw y===Ar?is:y}else i=t;t=tt();var o=t.queue,u=o.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,ji(9,fs(),C1.bind(null,o,n),null)),[i,u,e]}function C1(e,t){e.action=t}function Qp(e){var t=tt(),n=Me;if(n!==null)return Kp(t,n,e);tt(),t=t.memoizedState,n=tt();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function ji(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Hc(),ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function fs(){return{destroy:void 0,resource:void 0}}function Fp(){return tt().memoizedState}function ds(e,t,n,i){var o=Lt();i=i===void 0?null:i,ve.flags|=e,o.memoizedState=ji(1|t,fs(),n,i)}function $r(e,t,n,i){var o=tt();i=i===void 0?null:i;var u=o.memoizedState.inst;Me!==null&&i!==null&&zc(i,Me.memoizedState.deps)?o.memoizedState=ji(t,u,n,i):(ve.flags|=e,o.memoizedState=ji(1|t,u,n,i))}function Zp(e,t){ds(8390656,8,e,t)}function Jp(e,t){$r(2048,8,e,t)}function Wp(e,t){return $r(4,2,e,t)}function em(e,t){return $r(4,4,e,t)}function tm(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function nm(e,t,n){n=n!=null?n.concat([e]):null,$r(4,4,tm.bind(null,t,e),n)}function Ic(){}function am(e,t){var n=tt();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&zc(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function im(e,t){var n=tt();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&zc(t,i[1]))return i[0];if(i=e(),Za){_t(!0);try{e()}finally{_t(!1)}}return n.memoizedState=[i,t],i}function Yc(e,t,n){return n===void 0||(ha&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=sg(),ve.lanes|=e,Sa|=e,n)}function rm(e,t,n,i){return qt(n,t)?n:Di.current!==null?(e=Yc(e,n,i),qt(e,t)||(ot=!0),e):(ha&42)===0?(ot=!0,e.memoizedState=n):(e=sg(),ve.lanes|=e,Sa|=e,t)}function lm(e,t,n,i,o){var u=z.p;z.p=u!==0&&8>u?u:8;var y=D.T,E={};D.T=E,Fc(e,!1,t,n);try{var T=o(),L=D.S;if(L!==null&&L(E,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var G=x1(T,i);Br(e,t,G,Gt(e))}else Br(e,t,i,Gt(e))}catch(F){Br(e,t,{then:function(){},status:"rejected",reason:F},Gt())}finally{z.p=u,D.T=y}}function D1(){}function Kc(e,t,n,i){if(e.tag!==5)throw Error(s(476));var o=sm(e).queue;lm(e,o,t,Q,n===null?D1:function(){return om(e),n(i)})}function sm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:Q},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function om(e){var t=sm(e).next.queue;Br(e,t,{},Gt())}function Qc(){return Rt(tl)}function cm(){return tt().memoizedState}function um(){return tt().memoizedState}function A1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gt();e=fa(n);var i=da(t,e,n);i!==null&&(Xt(i,t,n),jr(i,t,n)),t={cache:Tc()},e.payload=t;return}t=t.return}}function O1(e,t,n){var i=Gt();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},hs(e)?dm(t,n):(n=mc(e,t,n,i),n!==null&&(Xt(n,e,i),hm(n,t,i)))}function fm(e,t,n){var i=Gt();Br(e,t,n,i)}function Br(e,t,n,i){var o={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(hs(e))dm(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,E=u(y,n);if(o.hasEagerState=!0,o.eagerState=E,qt(E,y))return Fl(e,t,o,0),qe===null&&Ql(),!1}catch{}finally{}if(n=mc(e,t,o,i),n!==null)return Xt(n,e,i),hm(n,t,i),!0}return!1}function Fc(e,t,n,i){if(i={lane:2,revertLane:Du(),action:i,hasEagerState:!1,eagerState:null,next:null},hs(e)){if(t)throw Error(s(479))}else t=mc(e,n,i,2),t!==null&&Xt(t,e,2)}function hs(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function dm(e,t){Ai=ss=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hm(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,un(e,n)}}var ps={readContext:Rt,use:cs,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je},pm={readContext:Rt,use:cs,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:Zp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ds(4194308,4,tm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=Lt();t=t===void 0?null:t;var i=e();if(Za){_t(!0);try{e()}finally{_t(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Lt();if(n!==void 0){var o=n(t);if(Za){_t(!0);try{n(t)}finally{_t(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=O1.bind(null,ve,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Gc(e);var t=e.queue,n=fm.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ic,useDeferredValue:function(e,t){var n=Lt();return Yc(n,e,t)},useTransition:function(){var e=Gc(!1);return e=lm.bind(null,ve,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=ve,o=Lt();if(Ce){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),qe===null)throw Error(s(349));(xe&124)!==0||zp(i,t,n)}o.memoizedState=n;var u={value:n,getSnapshot:t};return o.queue=u,Zp(Bp.bind(null,i,u,e),[e]),i.flags|=2048,ji(9,fs(),$p.bind(null,i,u,n,t),null),n},useId:function(){var e=Lt(),t=qe.identifierPrefix;if(Ce){var n=Xn,i=Gn;n=(i&~(1<<32-at(i)-1)).toString(32)+n,t="«"+t+"R"+n,n=os++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=w1++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Qc,useFormState:Ip,useActionState:Ip,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fc.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:Pc,useCacheRefresh:function(){return Lt().memoizedState=A1.bind(null,ve)}},mm={readContext:Rt,use:cs,useCallback:am,useContext:Rt,useEffect:Jp,useImperativeHandle:nm,useInsertionEffect:Wp,useLayoutEffect:em,useMemo:im,useReducer:us,useRef:Fp,useState:function(){return us(Kn)},useDebugValue:Ic,useDeferredValue:function(e,t){var n=tt();return rm(n,Me.memoizedState,e,t)},useTransition:function(){var e=us(Kn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:zr(e),t]},useSyncExternalStore:Np,useId:cm,useHostTransitionStatus:Qc,useFormState:Yp,useActionState:Yp,useOptimistic:function(e,t){var n=tt();return Hp(n,Me,e,t)},useMemoCache:Pc,useCacheRefresh:um},j1={readContext:Rt,use:cs,useCallback:am,useContext:Rt,useEffect:Jp,useImperativeHandle:nm,useInsertionEffect:Wp,useLayoutEffect:em,useMemo:im,useReducer:kc,useRef:Fp,useState:function(){return kc(Kn)},useDebugValue:Ic,useDeferredValue:function(e,t){var n=tt();return Me===null?Yc(n,e,t):rm(n,Me.memoizedState,e,t)},useTransition:function(){var e=kc(Kn)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:zr(e),t]},useSyncExternalStore:Np,useId:cm,useHostTransitionStatus:Qc,useFormState:Qp,useActionState:Qp,useOptimistic:function(e,t){var n=tt();return Me!==null?Hp(n,Me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Pc,useCacheRefresh:um},Mi=null,Ur=0;function ms(e){var t=Ur;return Ur+=1,Mi===null&&(Mi=[]),_p(Mi,e,t)}function qr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gs(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function gm(e){var t=e._init;return t(e._payload)}function vm(e){function t(j,A){if(e){var M=j.deletions;M===null?(j.deletions=[A],j.flags|=16):M.push(A)}}function n(j,A){if(!e)return null;for(;A!==null;)t(j,A),A=A.sibling;return null}function i(j){for(var A=new Map;j!==null;)j.key!==null?A.set(j.key,j):A.set(j.index,j),j=j.sibling;return A}function o(j,A){return j=kn(j,A),j.index=0,j.sibling=null,j}function u(j,A,M){return j.index=M,e?(M=j.alternate,M!==null?(M=M.index,M<A?(j.flags|=67108866,A):M):(j.flags|=67108866,A)):(j.flags|=1048576,A)}function y(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function E(j,A,M,Y){return A===null||A.tag!==6?(A=vc(M,j.mode,Y),A.return=j,A):(A=o(A,M),A.return=j,A)}function T(j,A,M,Y){var se=M.type;return se===w?G(j,A,M.props.children,Y,M.key):A!==null&&(A.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===O&&gm(se)===A.type)?(A=o(A,M.props),qr(A,M),A.return=j,A):(A=Jl(M.type,M.key,M.props,null,j.mode,Y),qr(A,M),A.return=j,A)}function L(j,A,M,Y){return A===null||A.tag!==4||A.stateNode.containerInfo!==M.containerInfo||A.stateNode.implementation!==M.implementation?(A=yc(M,j.mode,Y),A.return=j,A):(A=o(A,M.children||[]),A.return=j,A)}function G(j,A,M,Y,se){return A===null||A.tag!==7?(A=ka(M,j.mode,Y,se),A.return=j,A):(A=o(A,M),A.return=j,A)}function F(j,A,M){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=vc(""+A,j.mode,M),A.return=j,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case b:return M=Jl(A.type,A.key,A.props,null,j.mode,M),qr(M,A),M.return=j,M;case x:return A=yc(A,j.mode,M),A.return=j,A;case O:var Y=A._init;return A=Y(A._payload),F(j,A,M)}if(k(A)||W(A))return A=ka(A,j.mode,M,null),A.return=j,A;if(typeof A.then=="function")return F(j,ms(A),M);if(A.$$typeof===N)return F(j,ns(j,A),M);gs(j,A)}return null}function B(j,A,M,Y){var se=A!==null?A.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return se!==null?null:E(j,A,""+M,Y);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return M.key===se?T(j,A,M,Y):null;case x:return M.key===se?L(j,A,M,Y):null;case O:return se=M._init,M=se(M._payload),B(j,A,M,Y)}if(k(M)||W(M))return se!==null?null:G(j,A,M,Y,null);if(typeof M.then=="function")return B(j,A,ms(M),Y);if(M.$$typeof===N)return B(j,A,ns(j,M),Y);gs(j,M)}return null}function q(j,A,M,Y,se){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return j=j.get(M)||null,E(A,j,""+Y,se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return j=j.get(Y.key===null?M:Y.key)||null,T(A,j,Y,se);case x:return j=j.get(Y.key===null?M:Y.key)||null,L(A,j,Y,se);case O:var ye=Y._init;return Y=ye(Y._payload),q(j,A,M,Y,se)}if(k(Y)||W(Y))return j=j.get(M)||null,G(A,j,Y,se,null);if(typeof Y.then=="function")return q(j,A,M,ms(Y),se);if(Y.$$typeof===N)return q(j,A,M,ns(A,Y),se);gs(A,Y)}return null}function pe(j,A,M,Y){for(var se=null,ye=null,ue=A,he=A=0,ut=null;ue!==null&&he<M.length;he++){ue.index>he?(ut=ue,ue=null):ut=ue.sibling;var _e=B(j,ue,M[he],Y);if(_e===null){ue===null&&(ue=ut);break}e&&ue&&_e.alternate===null&&t(j,ue),A=u(_e,A,he),ye===null?se=_e:ye.sibling=_e,ye=_e,ue=ut}if(he===M.length)return n(j,ue),Ce&&Xa(j,he),se;if(ue===null){for(;he<M.length;he++)ue=F(j,M[he],Y),ue!==null&&(A=u(ue,A,he),ye===null?se=ue:ye.sibling=ue,ye=ue);return Ce&&Xa(j,he),se}for(ue=i(ue);he<M.length;he++)ut=q(ue,j,he,M[he],Y),ut!==null&&(e&&ut.alternate!==null&&ue.delete(ut.key===null?he:ut.key),A=u(ut,A,he),ye===null?se=ut:ye.sibling=ut,ye=ut);return e&&ue.forEach(function(Aa){return t(j,Aa)}),Ce&&Xa(j,he),se}function de(j,A,M,Y){if(M==null)throw Error(s(151));for(var se=null,ye=null,ue=A,he=A=0,ut=null,_e=M.next();ue!==null&&!_e.done;he++,_e=M.next()){ue.index>he?(ut=ue,ue=null):ut=ue.sibling;var Aa=B(j,ue,_e.value,Y);if(Aa===null){ue===null&&(ue=ut);break}e&&ue&&Aa.alternate===null&&t(j,ue),A=u(Aa,A,he),ye===null?se=Aa:ye.sibling=Aa,ye=Aa,ue=ut}if(_e.done)return n(j,ue),Ce&&Xa(j,he),se;if(ue===null){for(;!_e.done;he++,_e=M.next())_e=F(j,_e.value,Y),_e!==null&&(A=u(_e,A,he),ye===null?se=_e:ye.sibling=_e,ye=_e);return Ce&&Xa(j,he),se}for(ue=i(ue);!_e.done;he++,_e=M.next())_e=q(ue,j,he,_e.value,Y),_e!==null&&(e&&_e.alternate!==null&&ue.delete(_e.key===null?he:_e.key),A=u(_e,A,he),ye===null?se=_e:ye.sibling=_e,ye=_e);return e&&ue.forEach(function(ME){return t(j,ME)}),Ce&&Xa(j,he),se}function Ne(j,A,M,Y){if(typeof M=="object"&&M!==null&&M.type===w&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case b:e:{for(var se=M.key;A!==null;){if(A.key===se){if(se=M.type,se===w){if(A.tag===7){n(j,A.sibling),Y=o(A,M.props.children),Y.return=j,j=Y;break e}}else if(A.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===O&&gm(se)===A.type){n(j,A.sibling),Y=o(A,M.props),qr(Y,M),Y.return=j,j=Y;break e}n(j,A);break}else t(j,A);A=A.sibling}M.type===w?(Y=ka(M.props.children,j.mode,Y,M.key),Y.return=j,j=Y):(Y=Jl(M.type,M.key,M.props,null,j.mode,Y),qr(Y,M),Y.return=j,j=Y)}return y(j);case x:e:{for(se=M.key;A!==null;){if(A.key===se)if(A.tag===4&&A.stateNode.containerInfo===M.containerInfo&&A.stateNode.implementation===M.implementation){n(j,A.sibling),Y=o(A,M.children||[]),Y.return=j,j=Y;break e}else{n(j,A);break}else t(j,A);A=A.sibling}Y=yc(M,j.mode,Y),Y.return=j,j=Y}return y(j);case O:return se=M._init,M=se(M._payload),Ne(j,A,M,Y)}if(k(M))return pe(j,A,M,Y);if(W(M)){if(se=W(M),typeof se!="function")throw Error(s(150));return M=se.call(M),de(j,A,M,Y)}if(typeof M.then=="function")return Ne(j,A,ms(M),Y);if(M.$$typeof===N)return Ne(j,A,ns(j,M),Y);gs(j,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,A!==null&&A.tag===6?(n(j,A.sibling),Y=o(A,M),Y.return=j,j=Y):(n(j,A),Y=vc(M,j.mode,Y),Y.return=j,j=Y),y(j)):n(j,A)}return function(j,A,M,Y){try{Ur=0;var se=Ne(j,A,M,Y);return Mi=null,se}catch(ue){if(ue===Ar||ue===is)throw ue;var ye=Ht(29,ue,null,j.mode);return ye.lanes=Y,ye.return=j,ye}finally{}}}var Li=vm(!0),ym=vm(!1),Wt=ae(null),Cn=null;function pa(e){var t=e.alternate;ie(rt,rt.current&1),ie(Wt,e),Cn===null&&(t===null||Di.current!==null||t.memoizedState!==null)&&(Cn=e)}function bm(e){if(e.tag===22){if(ie(rt,rt.current),ie(Wt,e),Cn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Cn=e)}}else ma()}function ma(){ie(rt,rt.current),ie(Wt,Wt.current)}function Qn(e){ee(Wt),Cn===e&&(Cn=null),ee(rt)}var rt=ae(0);function vs(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==="$?"||Hu(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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}function Zc(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jc={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Gt(),o=fa(i);o.payload=t,n!=null&&(o.callback=n),t=da(e,o,i),t!==null&&(Xt(t,e,i),jr(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Gt(),o=fa(i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=da(e,o,i),t!==null&&(Xt(t,e,i),jr(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gt(),i=fa(n);i.tag=2,t!=null&&(i.callback=t),t=da(e,i,n),t!==null&&(Xt(t,e,n),jr(t,e,n))}};function Sm(e,t,n,i,o,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,u,y):t.prototype&&t.prototype.isPureReactComponent?!Er(n,i)||!Er(o,u):!0}function Em(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Jc.enqueueReplaceState(t,t.state,null)}function Ja(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=m({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}var ys=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Rm(e){ys(e)}function xm(e){console.error(e)}function wm(e){ys(e)}function bs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Tm(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Wc(e,t,n){return n=fa(n),n.tag=3,n.payload={element:null},n.callback=function(){bs(e,t)},n}function _m(e){return e=fa(e),e.tag=3,e}function Cm(e,t,n,i){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var u=i.value;e.payload=function(){return o(u)},e.callback=function(){Tm(t,n,i)}}var y=n.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Tm(t,n,i),typeof o!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var E=i.stack;this.componentDidCatch(i.value,{componentStack:E!==null?E:""})})}function M1(e,t,n,i,o){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&_r(t,n,o,!0),n=Wt.current,n!==null){switch(n.tag){case 13:return Cn===null?xu():n.alternate===null&&Fe===0&&(Fe=3),n.flags&=-257,n.flags|=65536,n.lanes=o,i===Dc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Tu(e,i,o)),!1;case 22:return n.flags|=65536,i===Dc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Tu(e,i,o)),!1}throw Error(s(435,n.tag))}return Tu(e,i,o),xu(),!1}if(Ce)return t=Wt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,i!==Ec&&(e=Error(s(422),{cause:i}),Tr(Qt(e,n)))):(i!==Ec&&(t=Error(s(423),{cause:i}),Tr(Qt(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,i=Qt(i,n),o=Wc(e.stateNode,i,o),jc(e,o),Fe!==4&&(Fe=2)),!1;var u=Error(s(520),{cause:i});if(u=Qt(u,n),Ir===null?Ir=[u]:Ir.push(u),Fe!==4&&(Fe=2),t===null)return!0;i=Qt(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Wc(n.stateNode,i,e),jc(n,e),!1;case 1:if(t=n.type,u=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ea===null||!Ea.has(u))))return n.flags|=65536,o&=-o,n.lanes|=o,o=_m(o),Cm(o,e,n,i),jc(n,o),!1}n=n.return}while(n!==null);return!1}var Dm=Error(s(461)),ot=!1;function ht(e,t,n,i){t.child=e===null?ym(t,null,n,i):Li(t,e.child,n,i)}function Am(e,t,n,i,o){n=n.render;var u=t.ref;if("ref"in i){var y={};for(var E in i)E!=="ref"&&(y[E]=i[E])}else y=i;return Qa(t),i=$c(e,t,n,y,u,o),E=Bc(),e!==null&&!ot?(Uc(e,t,o),Fn(e,t,o)):(Ce&&E&&bc(t),t.flags|=1,ht(e,t,i,o),t.child)}function Om(e,t,n,i,o){if(e===null){var u=n.type;return typeof u=="function"&&!gc(u)&&u.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=u,jm(e,t,u,i,o)):(e=Jl(n.type,null,i,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!su(e,o)){var y=u.memoizedProps;if(n=n.compare,n=n!==null?n:Er,n(y,i)&&e.ref===t.ref)return Fn(e,t,o)}return t.flags|=1,e=kn(u,i),e.ref=t.ref,e.return=t,t.child=e}function jm(e,t,n,i,o){if(e!==null){var u=e.memoizedProps;if(Er(u,i)&&e.ref===t.ref)if(ot=!1,t.pendingProps=i=u,su(e,o))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Fn(e,t,o)}return eu(e,t,n,i,o)}function Mm(e,t,n){var i=t.pendingProps,o=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=u!==null?u.baseLanes|n:n,e!==null){for(o=t.child=e.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;t.childLanes=u&~i}else t.childLanes=0,t.child=null;return Lm(e,t,i,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&as(t,u!==null?u.cachePool:null),u!==null?jp(t,u):Lc(),bm(t);else return t.lanes=t.childLanes=536870912,Lm(e,t,u!==null?u.baseLanes|n:n,n)}else u!==null?(as(t,u.cachePool),jp(t,u),ma(),t.memoizedState=null):(e!==null&&as(t,null),Lc(),ma());return ht(e,t,o,n),t.child}function Lm(e,t,n,i){var o=Cc();return o=o===null?null:{parent:it._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&as(t,null),Lc(),bm(t),e!==null&&_r(e,t,i,!0),null}function Ss(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function eu(e,t,n,i,o){return Qa(t),n=$c(e,t,n,i,void 0,o),i=Bc(),e!==null&&!ot?(Uc(e,t,o),Fn(e,t,o)):(Ce&&i&&bc(t),t.flags|=1,ht(e,t,n,o),t.child)}function Nm(e,t,n,i,o,u){return Qa(t),t.updateQueue=null,n=Lp(t,i,n,o),Mp(e),i=Bc(),e!==null&&!ot?(Uc(e,t,u),Fn(e,t,u)):(Ce&&i&&bc(t),t.flags|=1,ht(e,t,n,u),t.child)}function zm(e,t,n,i,o){if(Qa(t),t.stateNode===null){var u=xi,y=n.contextType;typeof y=="object"&&y!==null&&(u=Rt(y)),u=new n(i,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Jc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=i,u.state=t.memoizedState,u.refs={},Ac(t),y=n.contextType,u.context=typeof y=="object"&&y!==null?Rt(y):xi,u.state=t.memoizedState,y=n.getDerivedStateFromProps,typeof y=="function"&&(Zc(t,n,y,i),u.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Jc.enqueueReplaceState(u,u.state,null),Lr(t,i,u,o),Mr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){u=t.stateNode;var E=t.memoizedProps,T=Ja(n,E);u.props=T;var L=u.context,G=n.contextType;y=xi,typeof G=="object"&&G!==null&&(y=Rt(G));var F=n.getDerivedStateFromProps;G=typeof F=="function"||typeof u.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,G||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(E||L!==y)&&Em(t,u,i,y),ua=!1;var B=t.memoizedState;u.state=B,Lr(t,i,u,o),Mr(),L=t.memoizedState,E||B!==L||ua?(typeof F=="function"&&(Zc(t,n,F,i),L=t.memoizedState),(T=ua||Sm(t,n,T,i,B,L,y))?(G||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=L),u.props=i,u.state=L,u.context=y,i=T):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{u=t.stateNode,Oc(e,t),y=t.memoizedProps,G=Ja(n,y),u.props=G,F=t.pendingProps,B=u.context,L=n.contextType,T=xi,typeof L=="object"&&L!==null&&(T=Rt(L)),E=n.getDerivedStateFromProps,(L=typeof E=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==F||B!==T)&&Em(t,u,i,T),ua=!1,B=t.memoizedState,u.state=B,Lr(t,i,u,o),Mr();var q=t.memoizedState;y!==F||B!==q||ua||e!==null&&e.dependencies!==null&&ts(e.dependencies)?(typeof E=="function"&&(Zc(t,n,E,i),q=t.memoizedState),(G=ua||Sm(t,n,G,i,B,q,T)||e!==null&&e.dependencies!==null&&ts(e.dependencies))?(L||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(i,q,T),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(i,q,T)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=q),u.props=i,u.state=q,u.context=T,i=G):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),i=!1)}return u=i,Ss(e,t),i=(t.flags&128)!==0,u||i?(u=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&i?(t.child=Li(t,e.child,null,o),t.child=Li(t,null,n,o)):ht(e,t,n,o),t.memoizedState=u.state,e=t.child):e=Fn(e,t,o),e}function $m(e,t,n,i){return wr(),t.flags|=256,ht(e,t,n,i),t.child}var tu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nu(e){return{baseLanes:e,cachePool:xp()}}function au(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=en),e}function Bm(e,t,n){var i=t.pendingProps,o=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(rt.current&2)!==0),y&&(o=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(o?pa(t):ma(),Ce){var E=Qe,T;if(T=E){e:{for(T=E,E=_n;T.nodeType!==8;){if(!E){E=null;break e}if(T=hn(T.nextSibling),T===null){E=null;break e}}E=T}E!==null?(t.memoizedState={dehydrated:E,treeContext:Ga!==null?{id:Gn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},T=Ht(18,null,null,0),T.stateNode=E,T.return=t,t.child=T,Dt=t,Qe=null,T=!0):T=!1}T||Ya(t)}if(E=t.memoizedState,E!==null&&(E=E.dehydrated,E!==null))return Hu(E)?t.lanes=32:t.lanes=536870912,null;Qn(t)}return E=i.children,i=i.fallback,o?(ma(),o=t.mode,E=Es({mode:"hidden",children:E},o),i=ka(i,o,n,null),E.return=t,i.return=t,E.sibling=i,t.child=E,o=t.child,o.memoizedState=nu(n),o.childLanes=au(e,y,n),t.memoizedState=tu,i):(pa(t),iu(t,E))}if(T=e.memoizedState,T!==null&&(E=T.dehydrated,E!==null)){if(u)t.flags&256?(pa(t),t.flags&=-257,t=ru(e,t,n)):t.memoizedState!==null?(ma(),t.child=e.child,t.flags|=128,t=null):(ma(),o=i.fallback,E=t.mode,i=Es({mode:"visible",children:i.children},E),o=ka(o,E,n,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,Li(t,e.child,null,n),i=t.child,i.memoizedState=nu(n),i.childLanes=au(e,y,n),t.memoizedState=tu,t=o);else if(pa(t),Hu(E)){if(y=E.nextSibling&&E.nextSibling.dataset,y)var L=y.dgst;y=L,i=Error(s(419)),i.stack="",i.digest=y,Tr({value:i,source:null,stack:null}),t=ru(e,t,n)}else if(ot||_r(e,t,n,!1),y=(n&e.childLanes)!==0,ot||y){if(y=qe,y!==null&&(i=n&-n,i=(i&42)!==0?1:St(i),i=(i&(y.suspendedLanes|n))!==0?0:i,i!==0&&i!==T.retryLane))throw T.retryLane=i,Ri(e,i),Xt(y,e,i),Dm;E.data==="$?"||xu(),t=ru(e,t,n)}else E.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,Qe=hn(E.nextSibling),Dt=t,Ce=!0,Ia=null,_n=!1,e!==null&&(Zt[Jt++]=Gn,Zt[Jt++]=Xn,Zt[Jt++]=Ga,Gn=e.id,Xn=e.overflow,Ga=t),t=iu(t,i.children),t.flags|=4096);return t}return o?(ma(),o=i.fallback,E=t.mode,T=e.child,L=T.sibling,i=kn(T,{mode:"hidden",children:i.children}),i.subtreeFlags=T.subtreeFlags&65011712,L!==null?o=kn(L,o):(o=ka(o,E,n,null),o.flags|=2),o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,E=e.child.memoizedState,E===null?E=nu(n):(T=E.cachePool,T!==null?(L=it._currentValue,T=T.parent!==L?{parent:L,pool:L}:T):T=xp(),E={baseLanes:E.baseLanes|n,cachePool:T}),o.memoizedState=E,o.childLanes=au(e,y,n),t.memoizedState=tu,i):(pa(t),n=e.child,e=n.sibling,n=kn(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=n,t.memoizedState=null,n)}function iu(e,t){return t=Es({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Es(e,t){return e=Ht(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function ru(e,t,n){return Li(t,e.child,null,n),e=iu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Um(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),xc(e.return,t,n)}function lu(e,t,n,i,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=i,u.tail=n,u.tailMode=o)}function qm(e,t,n){var i=t.pendingProps,o=i.revealOrder,u=i.tail;if(ht(e,t,i.children,n),i=rt.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Um(e,n,t);else if(e.tag===19)Um(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}i&=1}switch(ie(rt,i),o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&vs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),lu(t,!1,o,n,u);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&vs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}lu(t,!0,n,null,u);break;case"together":lu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(_r(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function su(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ts(e)))}function L1(e,t,n){switch(t.tag){case 3:me(t,t.stateNode.containerInfo),ca(t,it,e.memoizedState.cache),wr();break;case 27:case 5:oe(t);break;case 4:me(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(pa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Bm(e,t,n):(pa(t),e=Fn(e,t,n),e!==null?e.sibling:null);pa(t);break;case 19:var o=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(_r(e,t,n,!1),i=(n&t.childLanes)!==0),o){if(i)return qm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ie(rt,rt.current),i)break;return null;case 22:case 23:return t.lanes=0,Mm(e,t,n);case 24:ca(t,it,e.memoizedState.cache)}return Fn(e,t,n)}function Hm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!su(e,n)&&(t.flags&128)===0)return ot=!1,L1(e,t,n);ot=(e.flags&131072)!==0}else ot=!1,Ce&&(t.flags&1048576)!==0&&gp(t,es,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,o=i._init;if(i=o(i._payload),t.type=i,typeof i=="function")gc(i)?(e=Ja(i,e),t.tag=1,t=zm(null,t,i,e,n)):(t.tag=0,t=eu(null,t,i,e,n));else{if(i!=null){if(o=i.$$typeof,o===V){t.tag=11,t=Am(null,t,i,e,n);break e}else if(o===H){t.tag=14,t=Om(null,t,i,e,n);break e}}throw t=X(i)||i,Error(s(306,t,""))}}return t;case 0:return eu(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,o=Ja(i,t.pendingProps),zm(e,t,i,o,n);case 3:e:{if(me(t,t.stateNode.containerInfo),e===null)throw Error(s(387));i=t.pendingProps;var u=t.memoizedState;o=u.element,Oc(e,t),Lr(t,i,null,n);var y=t.memoizedState;if(i=y.cache,ca(t,it,i),i!==u.cache&&wc(t,[it],n,!0),Mr(),i=y.element,u.isDehydrated)if(u={element:i,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=$m(e,t,i,n);break e}else if(i!==o){o=Qt(Error(s(424)),t),Tr(o),t=$m(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=hn(e.firstChild),Dt=t,Ce=!0,Ia=null,_n=!0,n=ym(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(wr(),i===o){t=Fn(e,t,n);break e}ht(e,t,i,n)}t=t.child}return t;case 26:return Ss(e,t),e===null?(n=Gg(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,i=zs(fe.current).createElement(n),i[He]=t,i[Pe]=e,mt(i,n,e),st(i),t.stateNode=i):t.memoizedState=Gg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&Ce&&(i=t.stateNode=Pg(t.type,t.pendingProps,fe.current),Dt=t,_n=!0,o=Qe,wa(t.type)?(Pu=o,Qe=hn(i.firstChild)):Qe=o),ht(e,t,t.pendingProps.children,n),Ss(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((o=i=Qe)&&(i=sE(i,t.type,t.pendingProps,_n),i!==null?(t.stateNode=i,Dt=t,Qe=hn(i.firstChild),_n=!1,o=!0):o=!1),o||Ya(t)),oe(t),o=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,i=u.children,Bu(o,u)?i=null:y!==null&&Bu(o,y)&&(t.flags|=32),t.memoizedState!==null&&(o=$c(e,t,T1,null,null,n),tl._currentValue=o),Ss(e,t),ht(e,t,i,n),t.child;case 6:return e===null&&Ce&&((e=n=Qe)&&(n=oE(n,t.pendingProps,_n),n!==null?(t.stateNode=n,Dt=t,Qe=null,e=!0):e=!1),e||Ya(t)),null;case 13:return Bm(e,t,n);case 4:return me(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Li(t,null,i,n):ht(e,t,i,n),t.child;case 11:return Am(e,t,t.type,t.pendingProps,n);case 7:return ht(e,t,t.pendingProps,n),t.child;case 8:return ht(e,t,t.pendingProps.children,n),t.child;case 12:return ht(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,ca(t,t.type,i.value),ht(e,t,i.children,n),t.child;case 9:return o=t.type._context,i=t.pendingProps.children,Qa(t),o=Rt(o),i=i(o),t.flags|=1,ht(e,t,i,n),t.child;case 14:return Om(e,t,t.type,t.pendingProps,n);case 15:return jm(e,t,t.type,t.pendingProps,n);case 19:return qm(e,t,n);case 31:return i=t.pendingProps,n=t.mode,i={mode:i.mode,children:i.children},e===null?(n=Es(i,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=kn(e.child,i),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Mm(e,t,n);case 24:return Qa(t),i=Rt(it),e===null?(o=Cc(),o===null&&(o=qe,u=Tc(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=n),o=u),t.memoizedState={parent:i,cache:o},Ac(t),ca(t,it,o)):((e.lanes&n)!==0&&(Oc(e,t),Lr(t,null,null,n),Mr()),o=e.memoizedState,u=t.memoizedState,o.parent!==i?(o={parent:i,cache:i},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),ca(t,it,i)):(i=u.cache,ca(t,it,i),i!==o.cache&&wc(t,[it],n,!0))),ht(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Zn(e){e.flags|=4}function Pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t)){if(t=Wt.current,t!==null&&((xe&4194048)===xe?Cn!==null:(xe&62914560)!==xe&&(xe&536870912)===0||t!==Cn))throw Or=Dc,wp;e.flags|=8192}}function Rs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bl():536870912,e.lanes|=t,Bi|=t)}function Hr(e,t){if(!Ce)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags&65011712,i|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags,i|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function N1(e,t,n){var i=t.pendingProps;switch(Sc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Yn(it),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(xr(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bp())),Xe(t),null;case 26:return n=t.memoizedState,e===null?(Zn(t),n!==null?(Xe(t),Pm(t,n)):(Xe(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Zn(t),Xe(t),Pm(t,n)):(Xe(t),t.flags&=-16777217):(e.memoizedProps!==i&&Zn(t),Xe(t),t.flags&=-16777217),null;case 27:je(t),n=fe.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Zn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return Xe(t),null}e=le.current,xr(t)?vp(t):(e=Pg(o,i,n),t.stateNode=e,Zn(t))}return Xe(t),null;case 5:if(je(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Zn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return Xe(t),null}if(e=le.current,xr(t))vp(t);else{switch(o=zs(fe.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?o.createElement("select",{is:i.is}):o.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?o.createElement(n,{is:i.is}):o.createElement(n)}}e[He]=t,e[Pe]=i;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(mt(e,n,i),n){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Zn(t)}}return Xe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Zn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(s(166));if(e=fe.current,xr(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,o=Dt,o!==null)switch(o.tag){case 27:case 5:i=o.memoizedProps}e[He]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||Ng(e.nodeValue,n)),e||Ya(t)}else e=zs(e).createTextNode(i),e[He]=t,t.stateNode=e}return Xe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=xr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[He]=t}else wr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),o=!1}else o=bp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Qn(t),t):(Qn(t),null)}if(Qn(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=i!==null,e=e!==null&&e.memoizedState!==null,n){i=t.child,o=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(o=i.alternate.memoizedState.cachePool.pool);var u=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==o&&(i.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Rs(t,t.updateQueue),Xe(t),null;case 4:return ge(),e===null&&Mu(t.stateNode.containerInfo),Xe(t),null;case 10:return Yn(t.type),Xe(t),null;case 19:if(ee(rt),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,u=o.rendering,u===null)if(i)Hr(o,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=vs(e),u!==null){for(t.flags|=128,Hr(o,!1),e=u.updateQueue,t.updateQueue=e,Rs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mp(n,e),n=n.sibling;return ie(rt,rt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ge()>Ts&&(t.flags|=128,i=!0,Hr(o,!1),t.lanes=4194304)}else{if(!i)if(e=vs(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Rs(t,e),Hr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!Ce)return Xe(t),null}else 2*Ge()-o.renderingStartTime>Ts&&n!==536870912&&(t.flags|=128,i=!0,Hr(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(e=o.last,e!==null?e.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ge(),t.sibling=null,e=rt.current,ie(rt,i?e&1|2:e&1),t):(Xe(t),null);case 22:case 23:return Qn(t),Nc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&Rs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&ee(Fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yn(it),Xe(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function z1(e,t){switch(Sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yn(it),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 13:if(Qn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));wr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(rt),null;case 4:return ge(),null;case 10:return Yn(t.type),null;case 22:case 23:return Qn(t),Nc(),e!==null&&ee(Fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yn(it),null;case 25:return null;default:return null}}function Vm(e,t){switch(Sc(t),t.tag){case 3:Yn(it),ge();break;case 26:case 27:case 5:je(t);break;case 4:ge();break;case 13:Qn(t);break;case 19:ee(rt);break;case 10:Yn(t.type);break;case 22:case 23:Qn(t),Nc(),e!==null&&ee(Fa);break;case 24:Yn(it)}}function Pr(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var o=i.next;n=o;do{if((n.tag&e)===e){i=void 0;var u=n.create,y=n.inst;i=u(),y.destroy=i}n=n.next}while(n!==o)}}catch(E){Be(t,t.return,E)}}function ga(e,t,n){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var u=o.next;i=u;do{if((i.tag&e)===e){var y=i.inst,E=y.destroy;if(E!==void 0){y.destroy=void 0,o=t;var T=n,L=E;try{L()}catch(G){Be(o,T,G)}}}i=i.next}while(i!==u)}}catch(G){Be(t,t.return,G)}}function km(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Op(t,n)}catch(i){Be(e,e.return,i)}}}function Gm(e,t,n){n.props=Ja(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){Be(e,t,i)}}function Vr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(o){Be(e,t,o)}}function Dn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(o){Be(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Be(e,t,o)}else n.current=null}function Xm(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(o){Be(e,e.return,o)}}function ou(e,t,n){try{var i=e.stateNode;nE(i,e.type,n,t),i[Pe]=t}catch(o){Be(e,e.return,o)}}function Im(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wa(e.type)||e.tag===4}function cu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Im(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.tag===27&&wa(e.type)||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 uu(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ns));else if(i!==4&&(i===27&&wa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(uu(e,t,n),e=e.sibling;e!==null;)uu(e,t,n),e=e.sibling}function xs(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&wa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(xs(e,t,n),e=e.sibling;e!==null;)xs(e,t,n),e=e.sibling}function Ym(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);mt(t,i,n),t[He]=e,t[Pe]=n}catch(u){Be(e,e.return,u)}}var Jn=!1,We=!1,fu=!1,Km=typeof WeakSet=="function"?WeakSet:Set,ct=null;function $1(e,t){if(e=e.containerInfo,zu=Ps,e=rp(e),cc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var o=i.anchorOffset,u=i.focusNode;i=i.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var y=0,E=-1,T=-1,L=0,G=0,F=e,B=null;t:for(;;){for(var q;F!==n||o!==0&&F.nodeType!==3||(E=y+o),F!==u||i!==0&&F.nodeType!==3||(T=y+i),F.nodeType===3&&(y+=F.nodeValue.length),(q=F.firstChild)!==null;)B=F,F=q;for(;;){if(F===e)break t;if(B===n&&++L===o&&(E=y),B===u&&++G===i&&(T=y),(q=F.nextSibling)!==null)break;F=B,B=F.parentNode}F=q}n=E===-1||T===-1?null:{start:E,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for($u={focusedElem:e,selectionRange:n},Ps=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,n=t,o=u.memoizedProps,u=u.memoizedState,i=n.stateNode;try{var pe=Ja(n.type,o,n.elementType===n.type);e=i.getSnapshotBeforeUpdate(pe,u),i.__reactInternalSnapshotBeforeUpdate=e}catch(de){Be(n,n.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)qu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function Qm(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:va(e,n),i&4&&Pr(5,n);break;case 1:if(va(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(y){Be(n,n.return,y)}else{var o=Ja(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Be(n,n.return,y)}}i&64&&km(n),i&512&&Vr(n,n.return);break;case 3:if(va(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Op(e,t)}catch(y){Be(n,n.return,y)}}break;case 27:t===null&&i&4&&Ym(n);case 26:case 5:va(e,n),t===null&&i&4&&Xm(n),i&512&&Vr(n,n.return);break;case 12:va(e,n);break;case 13:va(e,n),i&4&&Jm(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=X1.bind(null,n),cE(e,n))));break;case 22:if(i=n.memoizedState!==null||Jn,!i){t=t!==null&&t.memoizedState!==null||We,o=Jn;var u=We;Jn=i,(We=t)&&!u?ya(e,n,(n.subtreeFlags&8772)!==0):va(e,n),Jn=o,We=u}break;case 30:break;default:va(e,n)}}function Fm(e){var t=e.alternate;t!==null&&(e.alternate=null,Fm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Go(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ke=null,Nt=!1;function Wn(e,t,n){for(n=n.child;n!==null;)Zm(e,t,n),n=n.sibling}function Zm(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount=="function")try{Ye.onCommitFiberUnmount(Un,n)}catch{}switch(n.tag){case 26:We||Dn(n,t),Wn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:We||Dn(n,t);var i=ke,o=Nt;wa(n.type)&&(ke=n.stateNode,Nt=!1),Wn(e,t,n),Zr(n.stateNode),ke=i,Nt=o;break;case 5:We||Dn(n,t);case 6:if(i=ke,o=Nt,ke=null,Wn(e,t,n),ke=i,Nt=o,ke!==null)if(Nt)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(n.stateNode)}catch(u){Be(n,t,u)}else try{ke.removeChild(n.stateNode)}catch(u){Be(n,t,u)}break;case 18:ke!==null&&(Nt?(e=ke,qg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),rl(e)):qg(ke,n.stateNode));break;case 4:i=ke,o=Nt,ke=n.stateNode.containerInfo,Nt=!0,Wn(e,t,n),ke=i,Nt=o;break;case 0:case 11:case 14:case 15:We||ga(2,n,t),We||ga(4,n,t),Wn(e,t,n);break;case 1:We||(Dn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Gm(n,t,i)),Wn(e,t,n);break;case 21:Wn(e,t,n);break;case 22:We=(i=We)||n.memoizedState!==null,Wn(e,t,n),We=i;break;default:Wn(e,t,n)}}function Jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rl(e)}catch(n){Be(t,t.return,n)}}function B1(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Km),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Km),t;default:throw Error(s(435,e.tag))}}function du(e,t){var n=B1(e);t.forEach(function(i){var o=I1.bind(null,e,i);n.has(i)||(n.add(i),i.then(o,o))})}function Pt(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var o=n[i],u=e,y=t,E=y;e:for(;E!==null;){switch(E.tag){case 27:if(wa(E.type)){ke=E.stateNode,Nt=!1;break e}break;case 5:ke=E.stateNode,Nt=!1;break e;case 3:case 4:ke=E.stateNode.containerInfo,Nt=!0;break e}E=E.return}if(ke===null)throw Error(s(160));Zm(u,y,o),ke=null,Nt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Wm(t,e),t=t.sibling}var dn=null;function Wm(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Pt(t,e),Vt(e),i&4&&(ga(3,e,e.return),Pr(3,e),ga(5,e,e.return));break;case 1:Pt(t,e),Vt(e),i&512&&(We||n===null||Dn(n,n.return)),i&64&&Jn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var o=dn;if(Pt(t,e),Vt(e),i&512&&(We||n===null||Dn(n,n.return)),i&4){var u=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(i){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Hn]||u[He]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(i),o.head.insertBefore(u,o.querySelector("head > title"))),mt(u,i,n),u[He]=e,st(u),i=u;break e;case"link":var y=Yg("link","href",o).get(i+(n.href||""));if(y){for(var E=0;E<y.length;E++)if(u=y[E],u.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&u.getAttribute("rel")===(n.rel==null?null:n.rel)&&u.getAttribute("title")===(n.title==null?null:n.title)&&u.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){y.splice(E,1);break t}}u=o.createElement(i),mt(u,i,n),o.head.appendChild(u);break;case"meta":if(y=Yg("meta","content",o).get(i+(n.content||""))){for(E=0;E<y.length;E++)if(u=y[E],u.getAttribute("content")===(n.content==null?null:""+n.content)&&u.getAttribute("name")===(n.name==null?null:n.name)&&u.getAttribute("property")===(n.property==null?null:n.property)&&u.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&u.getAttribute("charset")===(n.charSet==null?null:n.charSet)){y.splice(E,1);break t}}u=o.createElement(i),mt(u,i,n),o.head.appendChild(u);break;default:throw Error(s(468,i))}u[He]=e,st(u),i=u}e.stateNode=i}else Kg(o,e.type,e.stateNode);else e.stateNode=Ig(o,i,e.memoizedProps);else u!==i?(u===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):u.count--,i===null?Kg(o,e.type,e.stateNode):Ig(o,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ou(e,e.memoizedProps,n.memoizedProps)}break;case 27:Pt(t,e),Vt(e),i&512&&(We||n===null||Dn(n,n.return)),n!==null&&i&4&&ou(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Pt(t,e),Vt(e),i&512&&(We||n===null||Dn(n,n.return)),e.flags&32){o=e.stateNode;try{mi(o,"")}catch(q){Be(e,e.return,q)}}i&4&&e.stateNode!=null&&(o=e.memoizedProps,ou(e,o,n!==null?n.memoizedProps:o)),i&1024&&(fu=!0);break;case 6:if(Pt(t,e),Vt(e),i&4){if(e.stateNode===null)throw Error(s(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(q){Be(e,e.return,q)}}break;case 3:if(Us=null,o=dn,dn=$s(t.containerInfo),Pt(t,e),dn=o,Vt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{rl(t.containerInfo)}catch(q){Be(e,e.return,q)}fu&&(fu=!1,eg(e));break;case 4:i=dn,dn=$s(e.stateNode.containerInfo),Pt(t,e),Vt(e),dn=i;break;case 12:Pt(t,e),Vt(e);break;case 13:Pt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(yu=Ge()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,du(e,i)));break;case 22:o=e.memoizedState!==null;var T=n!==null&&n.memoizedState!==null,L=Jn,G=We;if(Jn=L||o,We=G||T,Pt(t,e),We=G,Jn=L,Vt(e),i&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||T||Jn||We||Wa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){T=n=t;try{if(u=T.stateNode,o)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{E=T.stateNode;var F=T.memoizedProps.style,B=F!=null&&F.hasOwnProperty("display")?F.display:null;E.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(q){Be(T,T.return,q)}}}else if(t.tag===6){if(n===null){T=t;try{T.stateNode.nodeValue=o?"":T.memoizedProps}catch(q){Be(T,T.return,q)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,du(e,n))));break;case 19:Pt(t,e),Vt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,du(e,i)));break;case 30:break;case 21:break;default:Pt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(Im(i)){n=i;break}i=i.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var o=n.stateNode,u=cu(e);xs(e,u,o);break;case 5:var y=n.stateNode;n.flags&32&&(mi(y,""),n.flags&=-33);var E=cu(e);xs(e,E,y);break;case 3:case 4:var T=n.stateNode.containerInfo,L=cu(e);uu(e,L,T);break;default:throw Error(s(161))}}catch(G){Be(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;eg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qm(e,t.alternate,t),t=t.sibling}function Wa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ga(4,t,t.return),Wa(t);break;case 1:Dn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Gm(t,t.return,n),Wa(t);break;case 27:Zr(t.stateNode);case 26:case 5:Dn(t,t.return),Wa(t);break;case 22:t.memoizedState===null&&Wa(t);break;case 30:Wa(t);break;default:Wa(t)}e=e.sibling}}function ya(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,o=e,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:ya(o,u,n),Pr(4,u);break;case 1:if(ya(o,u,n),i=u,o=i.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Be(i,i.return,L)}if(i=u,o=i.updateQueue,o!==null){var E=i.stateNode;try{var T=o.shared.hiddenCallbacks;if(T!==null)for(o.shared.hiddenCallbacks=null,o=0;o<T.length;o++)Ap(T[o],E)}catch(L){Be(i,i.return,L)}}n&&y&64&&km(u),Vr(u,u.return);break;case 27:Ym(u);case 26:case 5:ya(o,u,n),n&&i===null&&y&4&&Xm(u),Vr(u,u.return);break;case 12:ya(o,u,n);break;case 13:ya(o,u,n),n&&y&4&&Jm(o,u);break;case 22:u.memoizedState===null&&ya(o,u,n),Vr(u,u.return);break;case 30:break;default:ya(o,u,n)}t=t.sibling}}function hu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Cr(n))}function pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e))}function An(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)tg(e,t,n,i),t=t.sibling}function tg(e,t,n,i){var o=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,n,i),o&2048&&Pr(9,t);break;case 1:An(e,t,n,i);break;case 3:An(e,t,n,i),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e)));break;case 12:if(o&2048){An(e,t,n,i),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,E=u.onPostCommit;typeof E=="function"&&E(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Be(t,t.return,T)}}else An(e,t,n,i);break;case 13:An(e,t,n,i);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?An(e,t,n,i):kr(e,t):u._visibility&2?An(e,t,n,i):(u._visibility|=2,Ni(e,t,n,i,(t.subtreeFlags&10256)!==0)),o&2048&&hu(y,t);break;case 24:An(e,t,n,i),o&2048&&pu(t.alternate,t);break;default:An(e,t,n,i)}}function Ni(e,t,n,i,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,y=t,E=n,T=i,L=y.flags;switch(y.tag){case 0:case 11:case 15:Ni(u,y,E,T,o),Pr(8,y);break;case 23:break;case 22:var G=y.stateNode;y.memoizedState!==null?G._visibility&2?Ni(u,y,E,T,o):kr(u,y):(G._visibility|=2,Ni(u,y,E,T,o)),o&&L&2048&&hu(y.alternate,y);break;case 24:Ni(u,y,E,T,o),o&&L&2048&&pu(y.alternate,y);break;default:Ni(u,y,E,T,o)}t=t.sibling}}function kr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,o=i.flags;switch(i.tag){case 22:kr(n,i),o&2048&&hu(i.alternate,i);break;case 24:kr(n,i),o&2048&&pu(i.alternate,i);break;default:kr(n,i)}t=t.sibling}}var Gr=8192;function zi(e){if(e.subtreeFlags&Gr)for(e=e.child;e!==null;)ng(e),e=e.sibling}function ng(e){switch(e.tag){case 26:zi(e),e.flags&Gr&&e.memoizedState!==null&&RE(dn,e.memoizedState,e.memoizedProps);break;case 5:zi(e);break;case 3:case 4:var t=dn;dn=$s(e.stateNode.containerInfo),zi(e),dn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Gr,Gr=16777216,zi(e),Gr=t):zi(e));break;default:zi(e)}}function ag(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];ct=i,rg(i,e)}ag(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ig(e),e=e.sibling}function ig(e){switch(e.tag){case 0:case 11:case 15:Xr(e),e.flags&2048&&ga(9,e,e.return);break;case 3:Xr(e);break;case 12:Xr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ws(e)):Xr(e);break;default:Xr(e)}}function ws(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];ct=i,rg(i,e)}ag(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ga(8,t,t.return),ws(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ws(t));break;default:ws(t)}e=e.sibling}}function rg(e,t){for(;ct!==null;){var n=ct;switch(n.tag){case 0:case 11:case 15:ga(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Cr(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,ct=i;else e:for(n=e;ct!==null;){i=ct;var o=i.sibling,u=i.return;if(Fm(i),i===n){ct=null;break e}if(o!==null){o.return=u,ct=o;break e}ct=u}}}var U1={getCacheForType:function(e){var t=Rt(it),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},q1=typeof WeakMap=="function"?WeakMap:Map,Ae=0,qe=null,Se=null,xe=0,Oe=0,kt=null,ba=!1,$i=!1,mu=!1,ea=0,Fe=0,Sa=0,ei=0,gu=0,en=0,Bi=0,Ir=null,zt=null,vu=!1,yu=0,Ts=1/0,_s=null,Ea=null,pt=0,Ra=null,Ui=null,qi=0,bu=0,Su=null,lg=null,Yr=0,Eu=null;function Gt(){if((Ae&2)!==0&&xe!==0)return xe&-xe;if(D.T!==null){var e=_i;return e!==0?e:Du()}return Ut()}function sg(){en===0&&(en=(xe&536870912)===0||Ce?$l():536870912);var e=Wt.current;return e!==null&&(e.flags|=32),en}function Xt(e,t,n){(e===qe&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Hi(e,0),xa(e,xe,en,!1)),Ke(e,n),((Ae&2)===0||e!==qe)&&(e===qe&&((Ae&2)===0&&(ei|=n),Fe===4&&xa(e,xe,en,!1)),On(e))}function og(e,t,n){if((Ae&6)!==0)throw Error(s(327));var i=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Ba(e,t),o=i?V1(e,t):wu(e,t,!0),u=i;do{if(o===0){$i&&!i&&xa(e,t,0,!1);break}else{if(n=e.current.alternate,u&&!H1(n)){o=wu(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var E=e;o=Ir;var T=E.current.memoizedState.isDehydrated;if(T&&(Hi(E,y).flags|=256),y=wu(E,y,!1),y!==2){if(mu&&!T){E.errorRecoveryDisabledLanes|=u,ei|=u,o=4;break e}u=zt,zt=o,u!==null&&(zt===null?zt=u:zt.push.apply(zt,u))}o=y}if(u=!1,o!==2)continue}}if(o===1){Hi(e,0),xa(e,t,0,!0);break}e:{switch(i=e,u=o,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:xa(i,t,en,!ba);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=yu+300-Ge(),10<o)){if(xa(i,t,en,!ba),$a(i,0,!0)!==0)break e;i.timeoutHandle=Bg(cg.bind(null,i,n,zt,_s,vu,t,en,ei,Bi,ba,u,2,-0,0),o);break e}cg(i,n,zt,_s,vu,t,en,ei,Bi,ba,u,0,-0,0)}}break}while(!0);On(e)}function cg(e,t,n,i,o,u,y,E,T,L,G,F,B,q){if(e.timeoutHandle=-1,F=t.subtreeFlags,(F&8192||(F&16785408)===16785408)&&(el={stylesheets:null,count:0,unsuspend:EE},ng(t),F=xE(),F!==null)){e.cancelPendingCommit=F(gg.bind(null,e,t,u,n,i,o,y,E,T,G,1,B,q)),xa(e,u,y,!L);return}gg(e,t,u,n,i,o,y,E,T)}function H1(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var o=n[i],u=o.getSnapshot;o=o.value;try{if(!qt(u(),o))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 xa(e,t,n,i){t&=~gu,t&=~ei,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var o=t;0<o;){var u=31-at(o),y=1<<u;i[u]=-1,o&=~y}n!==0&&bt(e,n,t)}function Cs(){return(Ae&6)===0?(Kr(0),!1):!0}function Ru(){if(Se!==null){if(Oe===0)var e=Se.return;else e=Se,In=Ka=null,qc(e),Mi=null,Ur=0,e=Se;for(;e!==null;)Vm(e.alternate,e),e=e.return;Se=null}}function Hi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,iE(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ru(),qe=e,Se=n=kn(e.current,null),xe=t,Oe=0,kt=null,ba=!1,$i=Ba(e,t),mu=!1,Bi=en=gu=ei=Sa=Fe=0,zt=Ir=null,vu=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var o=31-at(i),u=1<<o;t|=e[o],i&=~u}return ea=t,Ql(),n}function ug(e,t){ve=null,D.H=ps,t===Ar||t===is?(t=Cp(),Oe=3):t===wp?(t=Cp(),Oe=4):Oe=t===Dm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,Se===null&&(Fe=1,bs(e,Qt(t,e.current)))}function fg(){var e=D.H;return D.H=ps,e===null?ps:e}function dg(){var e=D.A;return D.A=U1,e}function xu(){Fe=4,ba||(xe&4194048)!==xe&&Wt.current!==null||($i=!0),(Sa&134217727)===0&&(ei&134217727)===0||qe===null||xa(qe,xe,en,!1)}function wu(e,t,n){var i=Ae;Ae|=2;var o=fg(),u=dg();(qe!==e||xe!==t)&&(_s=null,Hi(e,t)),t=!1;var y=Fe;e:do try{if(Oe!==0&&Se!==null){var E=Se,T=kt;switch(Oe){case 8:Ru(),y=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(t=!0);var L=Oe;if(Oe=0,kt=null,Pi(e,E,T,L),n&&$i){y=0;break e}break;default:L=Oe,Oe=0,kt=null,Pi(e,E,T,L)}}P1(),y=Fe;break}catch(G){ug(e,G)}while(!0);return t&&e.shellSuspendCounter++,In=Ka=null,Ae=i,D.H=o,D.A=u,Se===null&&(qe=null,xe=0,Ql()),y}function P1(){for(;Se!==null;)hg(Se)}function V1(e,t){var n=Ae;Ae|=2;var i=fg(),o=dg();qe!==e||xe!==t?(_s=null,Ts=Ge()+500,Hi(e,t)):$i=Ba(e,t);e:do try{if(Oe!==0&&Se!==null){t=Se;var u=kt;t:switch(Oe){case 1:Oe=0,kt=null,Pi(e,t,u,1);break;case 2:case 9:if(Tp(u)){Oe=0,kt=null,pg(t);break}t=function(){Oe!==2&&Oe!==9||qe!==e||(Oe=7),On(e)},u.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Tp(u)?(Oe=0,kt=null,pg(t)):(Oe=0,kt=null,Pi(e,t,u,7));break;case 5:var y=null;switch(Se.tag){case 26:y=Se.memoizedState;case 5:case 27:var E=Se;if(!y||Qg(y)){Oe=0,kt=null;var T=E.sibling;if(T!==null)Se=T;else{var L=E.return;L!==null?(Se=L,Ds(L)):Se=null}break t}}Oe=0,kt=null,Pi(e,t,u,5);break;case 6:Oe=0,kt=null,Pi(e,t,u,6);break;case 8:Ru(),Fe=6;break e;default:throw Error(s(462))}}k1();break}catch(G){ug(e,G)}while(!0);return In=Ka=null,D.H=i,D.A=o,Ae=n,Se!==null?0:(qe=null,xe=0,Ql(),Fe)}function k1(){for(;Se!==null&&!wt();)hg(Se)}function hg(e){var t=Hm(e.alternate,e,ea);e.memoizedProps=e.pendingProps,t===null?Ds(e):Se=t}function pg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Nm(n,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=Nm(n,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:qc(t);default:Vm(n,t),t=Se=mp(t,ea),t=Hm(n,t,ea)}e.memoizedProps=e.pendingProps,t===null?Ds(e):Se=t}function Pi(e,t,n,i){In=Ka=null,qc(t),Mi=null,Ur=0;var o=t.return;try{if(M1(e,o,t,n,xe)){Fe=1,bs(e,Qt(n,e.current)),Se=null;return}}catch(u){if(o!==null)throw Se=o,u;Fe=1,bs(e,Qt(n,e.current)),Se=null;return}t.flags&32768?(Ce||i===1?e=!0:$i||(xe&536870912)!==0?e=!1:(ba=e=!0,(i===2||i===9||i===3||i===6)&&(i=Wt.current,i!==null&&i.tag===13&&(i.flags|=16384))),mg(t,e)):Ds(t)}function Ds(e){var t=e;do{if((t.flags&32768)!==0){mg(t,ba);return}e=t.return;var n=N1(t.alternate,t,ea);if(n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Fe===0&&(Fe=5)}function mg(e,t){do{var n=z1(e.alternate,e);if(n!==null){n.flags&=32767,Se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=n}while(e!==null);Fe=6,Se=null}function gg(e,t,n,i,o,u,y,E,T){e.cancelPendingCommit=null;do As();while(pt!==0);if((Ae&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=pc,Ct(e,n,u,y,E,T),e===qe&&(Se=qe=null,xe=0),Ui=t,Ra=e,qi=n,bu=u,Su=o,lg=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Y1(It,function(){return Eg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=D.T,D.T=null,o=z.p,z.p=2,y=Ae,Ae|=4;try{$1(e,t,n)}finally{Ae=y,z.p=o,D.T=i}}pt=1,vg(),yg(),bg()}}function vg(){if(pt===1){pt=0;var e=Ra,t=Ui,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var i=z.p;z.p=2;var o=Ae;Ae|=4;try{Wm(t,e);var u=$u,y=rp(e.containerInfo),E=u.focusedElem,T=u.selectionRange;if(y!==E&&E&&E.ownerDocument&&ip(E.ownerDocument.documentElement,E)){if(T!==null&&cc(E)){var L=T.start,G=T.end;if(G===void 0&&(G=L),"selectionStart"in E)E.selectionStart=L,E.selectionEnd=Math.min(G,E.value.length);else{var F=E.ownerDocument||document,B=F&&F.defaultView||window;if(B.getSelection){var q=B.getSelection(),pe=E.textContent.length,de=Math.min(T.start,pe),Ne=T.end===void 0?de:Math.min(T.end,pe);!q.extend&&de>Ne&&(y=Ne,Ne=de,de=y);var j=ap(E,de),A=ap(E,Ne);if(j&&A&&(q.rangeCount!==1||q.anchorNode!==j.node||q.anchorOffset!==j.offset||q.focusNode!==A.node||q.focusOffset!==A.offset)){var M=F.createRange();M.setStart(j.node,j.offset),q.removeAllRanges(),de>Ne?(q.addRange(M),q.extend(A.node,A.offset)):(M.setEnd(A.node,A.offset),q.addRange(M))}}}}for(F=[],q=E;q=q.parentNode;)q.nodeType===1&&F.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<F.length;E++){var Y=F[E];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Ps=!!zu,$u=zu=null}finally{Ae=o,z.p=i,D.T=n}}e.current=t,pt=2}}function yg(){if(pt===2){pt=0;var e=Ra,t=Ui,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var i=z.p;z.p=2;var o=Ae;Ae|=4;try{Qm(e,t.alternate,t)}finally{Ae=o,z.p=i,D.T=n}}pt=3}}function bg(){if(pt===4||pt===3){pt=0,Tt();var e=Ra,t=Ui,n=qi,i=lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,Ui=Ra=null,Sg(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Ea=null),dt(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot=="function")try{Ye.onCommitFiberRoot(Un,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=D.T,o=z.p,z.p=2,D.T=null;try{for(var u=e.onRecoverableError,y=0;y<i.length;y++){var E=i[y];u(E.value,{componentStack:E.stack})}}finally{D.T=t,z.p=o}}(qi&3)!==0&&As(),On(e),o=e.pendingLanes,(n&4194090)!==0&&(o&42)!==0?e===Eu?Yr++:(Yr=0,Eu=e):Yr=0,Kr(0)}}function Sg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cr(t)))}function As(e){return vg(),yg(),bg(),Eg()}function Eg(){if(pt!==5)return!1;var e=Ra,t=bu;bu=0;var n=dt(qi),i=D.T,o=z.p;try{z.p=32>n?32:n,D.T=null,n=Su,Su=null;var u=Ra,y=qi;if(pt=0,Ui=Ra=null,qi=0,(Ae&6)!==0)throw Error(s(331));var E=Ae;if(Ae|=4,ig(u.current),tg(u,u.current,y,n),Ae=E,Kr(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot=="function")try{Ye.onPostCommitFiberRoot(Un,u)}catch{}return!0}finally{z.p=o,D.T=i,Sg(e,t)}}function Rg(e,t,n){t=Qt(n,t),t=Wc(e.stateNode,t,2),e=da(e,t,2),e!==null&&(Ke(e,2),On(e))}function Be(e,t,n){if(e.tag===3)Rg(e,e,n);else for(;t!==null;){if(t.tag===3){Rg(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ea===null||!Ea.has(i))){e=Qt(n,e),n=_m(2),i=da(t,n,2),i!==null&&(Cm(n,i,t,e),Ke(i,2),On(i));break}}t=t.return}}function Tu(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new q1;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(n)||(mu=!0,o.add(n),e=G1.bind(null,e,t,n),t.then(e,e))}function G1(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,qe===e&&(xe&n)===n&&(Fe===4||Fe===3&&(xe&62914560)===xe&&300>Ge()-yu?(Ae&2)===0&&Hi(e,0):gu|=n,Bi===xe&&(Bi=0)),On(e)}function xg(e,t){t===0&&(t=Bl()),e=Ri(e,t),e!==null&&(Ke(e,t),On(e))}function X1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xg(e,n)}function I1(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(s(314))}i!==null&&i.delete(t),xg(e,n)}function Y1(e,t){return Ie(e,t)}var Os=null,Vi=null,_u=!1,js=!1,Cu=!1,ti=0;function On(e){e!==Vi&&e.next===null&&(Vi===null?Os=Vi=e:Vi=Vi.next=e),js=!0,_u||(_u=!0,Q1())}function Kr(e,t){if(!Cu&&js){Cu=!0;do for(var n=!1,i=Os;i!==null;){if(e!==0){var o=i.pendingLanes;if(o===0)var u=0;else{var y=i.suspendedLanes,E=i.pingedLanes;u=(1<<31-at(42|e)+1)-1,u&=o&~(y&~E),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Cg(i,u))}else u=xe,u=$a(i,i===qe?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(u&3)===0||Ba(i,u)||(n=!0,Cg(i,u));i=i.next}while(n);Cu=!1}}function K1(){wg()}function wg(){js=_u=!1;var e=0;ti!==0&&(aE()&&(e=ti),ti=0);for(var t=Ge(),n=null,i=Os;i!==null;){var o=i.next,u=Tg(i,t);u===0?(i.next=null,n===null?Os=o:n.next=o,o===null&&(Vi=n)):(n=i,(e!==0||(u&3)!==0)&&(js=!0)),i=o}Kr(e)}function Tg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-at(u),E=1<<y,T=o[y];T===-1?((E&n)===0||(E&i)!==0)&&(o[y]=zl(E,t)):T<=t&&(e.expiredLanes|=E),u&=~E}if(t=qe,n=xe,n=$a(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Ze(i),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ba(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&Ze(i),dt(n)){case 2:case 8:n=jt;break;case 32:n=It;break;case 268435456:n=Ve;break;default:n=It}return i=_g.bind(null,e),n=Ie(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&Ze(i),e.callbackPriority=2,e.callbackNode=null,2}function _g(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(As()&&e.callbackNode!==n)return null;var i=xe;return i=$a(e,e===qe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(og(e,i,t),Tg(e,Ge()),e.callbackNode!=null&&e.callbackNode===n?_g.bind(null,e):null)}function Cg(e,t){if(As())return null;og(e,t,!0)}function Q1(){rE(function(){(Ae&6)!==0?Ie(xn,K1):wg()})}function Du(){return ti===0&&(ti=$l()),ti}function Dg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Vl(""+e)}function Ag(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function F1(e,t,n,i,o){if(t==="submit"&&n&&n.stateNode===o){var u=Dg((o[Pe]||null).action),y=i.submitter;y&&(t=(t=y[Pe]||null)?Dg(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var E=new Il("action","action",null,i,o);e.push({event:E,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ti!==0){var T=y?Ag(o,y):new FormData(o);Kc(n,{pending:!0,data:T,method:o.method,action:u},null,T)}}else typeof u=="function"&&(E.preventDefault(),T=y?Ag(o,y):new FormData(o),Kc(n,{pending:!0,data:T,method:o.method,action:u},u,T))},currentTarget:o}]})}}for(var Au=0;Au<hc.length;Au++){var Ou=hc[Au],Z1=Ou.toLowerCase(),J1=Ou[0].toUpperCase()+Ou.slice(1);fn(Z1,"on"+J1)}fn(op,"onAnimationEnd"),fn(cp,"onAnimationIteration"),fn(up,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(m1,"onTransitionRun"),fn(g1,"onTransitionStart"),fn(v1,"onTransitionCancel"),fn(fp,"onTransitionEnd"),di("onMouseEnter",["mouseout","mouseover"]),di("onMouseLeave",["mouseout","mouseover"]),di("onPointerEnter",["pointerout","pointerover"]),di("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qr="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(" "),W1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qr));function Og(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],o=i.event;i=i.listeners;e:{var u=void 0;if(t)for(var y=i.length-1;0<=y;y--){var E=i[y],T=E.instance,L=E.currentTarget;if(E=E.listener,T!==u&&o.isPropagationStopped())break e;u=E,o.currentTarget=L;try{u(o)}catch(G){ys(G)}o.currentTarget=null,u=T}else for(y=0;y<i.length;y++){if(E=i[y],T=E.instance,L=E.currentTarget,E=E.listener,T!==u&&o.isPropagationStopped())break e;u=E,o.currentTarget=L;try{u(o)}catch(G){ys(G)}o.currentTarget=null,u=T}}}}function Ee(e,t){var n=t[qn];n===void 0&&(n=t[qn]=new Set);var i=e+"__bubble";n.has(i)||(jg(t,e,2,!1),n.add(i))}function ju(e,t,n){var i=0;t&&(i|=4),jg(n,e,i,t)}var Ms="_reactListening"+Math.random().toString(36).slice(2);function Mu(e){if(!e[Ms]){e[Ms]=!0,wh.forEach(function(n){n!=="selectionchange"&&(W1.has(n)||ju(n,!1,e),ju(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ms]||(t[Ms]=!0,ju("selectionchange",!1,t))}}function jg(e,t,n,i){switch(tv(t)){case 2:var o=_E;break;case 8:o=CE;break;default:o=Iu}n=o.bind(null,t,n,e),o=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),i?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Lu(e,t,n,i,o){var u=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var E=i.stateNode.containerInfo;if(E===o)break;if(y===4)for(y=i.return;y!==null;){var T=y.tag;if((T===3||T===4)&&y.stateNode.containerInfo===o)return;y=y.return}for(;E!==null;){if(y=ci(E),y===null)return;if(T=y.tag,T===5||T===6||T===26||T===27){i=u=y;continue e}E=E.parentNode}}i=i.return}Uh(function(){var L=u,G=Jo(n),F=[];e:{var B=dp.get(e);if(B!==void 0){var q=Il,pe=e;switch(e){case"keypress":if(Gl(n)===0)break e;case"keydown":case"keyup":q=YS;break;case"focusin":pe="focus",q=ic;break;case"focusout":pe="blur",q=ic;break;case"beforeblur":case"afterblur":q=ic;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":q=Ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=zS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=FS;break;case op:case cp:case up:q=US;break;case fp:q=JS;break;case"scroll":case"scrollend":q=LS;break;case"wheel":q=e1;break;case"copy":case"cut":case"paste":q=HS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=kh;break;case"toggle":case"beforetoggle":q=n1}var de=(t&4)!==0,Ne=!de&&(e==="scroll"||e==="scrollend"),j=de?B!==null?B+"Capture":null:B;de=[];for(var A=L,M;A!==null;){var Y=A;if(M=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||M===null||j===null||(Y=pr(A,j),Y!=null&&de.push(Fr(A,Y,M))),Ne)break;A=A.return}0<de.length&&(B=new q(B,pe,null,n,G),F.push({event:B,listeners:de}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",B&&n!==Zo&&(pe=n.relatedTarget||n.fromElement)&&(ci(pe)||pe[Et]))break e;if((q||B)&&(B=G.window===G?G:(B=G.ownerDocument)?B.defaultView||B.parentWindow:window,q?(pe=n.relatedTarget||n.toElement,q=L,pe=pe?ci(pe):null,pe!==null&&(Ne=f(pe),de=pe.tag,pe!==Ne||de!==5&&de!==27&&de!==6)&&(pe=null)):(q=null,pe=L),q!==pe)){if(de=Ph,Y="onMouseLeave",j="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(de=kh,Y="onPointerLeave",j="onPointerEnter",A="pointer"),Ne=q==null?B:hr(q),M=pe==null?B:hr(pe),B=new de(Y,A+"leave",q,n,G),B.target=Ne,B.relatedTarget=M,Y=null,ci(G)===L&&(de=new de(j,A+"enter",pe,n,G),de.target=M,de.relatedTarget=Ne,Y=de),Ne=Y,q&&pe)t:{for(de=q,j=pe,A=0,M=de;M;M=ki(M))A++;for(M=0,Y=j;Y;Y=ki(Y))M++;for(;0<A-M;)de=ki(de),A--;for(;0<M-A;)j=ki(j),M--;for(;A--;){if(de===j||j!==null&&de===j.alternate)break t;de=ki(de),j=ki(j)}de=null}else de=null;q!==null&&Mg(F,B,q,de,!1),pe!==null&&Ne!==null&&Mg(F,Ne,pe,de,!0)}}e:{if(B=L?hr(L):window,q=B.nodeName&&B.nodeName.toLowerCase(),q==="select"||q==="input"&&B.type==="file")var se=Zh;else if(Qh(B))if(Jh)se=d1;else{se=u1;var ye=c1}else q=B.nodeName,!q||q.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?L&&Fo(L.elementType)&&(se=Zh):se=f1;if(se&&(se=se(e,L))){Fh(F,se,n,G);break e}ye&&ye(e,B,L),e==="focusout"&&L&&B.type==="number"&&L.memoizedProps.value!=null&&Qo(B,"number",B.value)}switch(ye=L?hr(L):window,e){case"focusin":(Qh(ye)||ye.contentEditable==="true")&&(bi=ye,uc=L,Rr=null);break;case"focusout":Rr=uc=bi=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,lp(F,n,G);break;case"selectionchange":if(p1)break;case"keydown":case"keyup":lp(F,n,G)}var ue;if(lc)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else yi?Yh(e,n)&&(he="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(he="onCompositionStart");he&&(Gh&&n.locale!=="ko"&&(yi||he!=="onCompositionStart"?he==="onCompositionEnd"&&yi&&(ue=qh()):(oa=G,tc="value"in oa?oa.value:oa.textContent,yi=!0)),ye=Ls(L,he),0<ye.length&&(he=new Vh(he,e,null,n,G),F.push({event:he,listeners:ye}),ue?he.data=ue:(ue=Kh(n),ue!==null&&(he.data=ue)))),(ue=i1?r1(e,n):l1(e,n))&&(he=Ls(L,"onBeforeInput"),0<he.length&&(ye=new Vh("onBeforeInput","beforeinput",null,n,G),F.push({event:ye,listeners:he}),ye.data=ue)),F1(F,e,L,n,G)}Og(F,t)})}function Fr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ls(e,t){for(var n=t+"Capture",i=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=pr(e,n),o!=null&&i.unshift(Fr(e,o,u)),o=pr(e,t),o!=null&&i.push(Fr(e,o,u))),e.tag===3)return i;e=e.return}return[]}function ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,t,n,i,o){for(var u=t._reactName,y=[];n!==null&&n!==i;){var E=n,T=E.alternate,L=E.stateNode;if(E=E.tag,T!==null&&T===i)break;E!==5&&E!==26&&E!==27||L===null||(T=L,o?(L=pr(n,u),L!=null&&y.unshift(Fr(n,L,T))):o||(L=pr(n,u),L!=null&&y.push(Fr(n,L,T)))),n=n.return}y.length!==0&&e.push({event:t,listeners:y})}var eE=/\r\n?/g,tE=/\u0000|\uFFFD/g;function Lg(e){return(typeof e=="string"?e:""+e).replace(eE,`
|
|
26
|
+
`).replace(tE,"")}function Ng(e,t){return t=Lg(t),Lg(e)===t}function Ns(){}function Le(e,t,n,i,o,u){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||mi(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&mi(e,""+i);break;case"className":ql(e,"class",i);break;case"tabIndex":ql(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ql(e,n,i);break;case"style":$h(e,i,u);break;case"data":if(t!=="object"){ql(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Vl(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(t!=="input"&&Le(e,t,"name",o.name,o,null),Le(e,t,"formEncType",o.formEncType,o,null),Le(e,t,"formMethod",o.formMethod,o,null),Le(e,t,"formTarget",o.formTarget,o,null)):(Le(e,t,"encType",o.encType,o,null),Le(e,t,"method",o.method,o,null),Le(e,t,"target",o.target,o,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=Vl(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=Ns);break;case"onScroll":i!=null&&Ee("scroll",e);break;case"onScrollEnd":i!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(n=i.__html,n!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=Vl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),Ul(e,"popover",i);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Ul(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=jS.get(n)||n,Ul(e,n,i))}}function Nu(e,t,n,i,o,u){switch(n){case"style":$h(e,i,u);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(s(61));if(n=i.__html,n!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof i=="string"?mi(e,i):(typeof i=="number"||typeof i=="bigint")&&mi(e,""+i);break;case"onScroll":i!=null&&Ee("scroll",e);break;case"onScrollEnd":i!=null&&Ee("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Ns);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Th.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),u=e[Pe]||null,u=u!=null?u[n]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof i=="function")){typeof u!="function"&&u!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,o);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):Ul(e,n,i)}}}function mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var i=!1,o=!1,u;for(u in n)if(n.hasOwnProperty(u)){var y=n[u];if(y!=null)switch(u){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Le(e,t,u,y,n,null)}}o&&Le(e,t,"srcSet",n.srcSet,n,null),i&&Le(e,t,"src",n.src,n,null);return;case"input":Ee("invalid",e);var E=u=y=o=null,T=null,L=null;for(i in n)if(n.hasOwnProperty(i)){var G=n[i];if(G!=null)switch(i){case"name":o=G;break;case"type":y=G;break;case"checked":T=G;break;case"defaultChecked":L=G;break;case"value":u=G;break;case"defaultValue":E=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(s(137,t));break;default:Le(e,t,i,G,n,null)}}Mh(e,u,E,T,L,y,o,!1),Hl(e);return;case"select":Ee("invalid",e),i=y=u=null;for(o in n)if(n.hasOwnProperty(o)&&(E=n[o],E!=null))switch(o){case"value":u=E;break;case"defaultValue":y=E;break;case"multiple":i=E;default:Le(e,t,o,E,n,null)}t=u,n=y,e.multiple=!!i,t!=null?pi(e,!!i,t,!1):n!=null&&pi(e,!!i,n,!0);return;case"textarea":Ee("invalid",e),u=o=i=null;for(y in n)if(n.hasOwnProperty(y)&&(E=n[y],E!=null))switch(y){case"value":i=E;break;case"defaultValue":o=E;break;case"children":u=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(91));break;default:Le(e,t,y,E,n,null)}Nh(e,i,o,u),Hl(e);return;case"option":for(T in n)if(n.hasOwnProperty(T)&&(i=n[T],i!=null))switch(T){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:Le(e,t,T,i,n,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(i=0;i<Qr.length;i++)Ee(Qr[i],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in n)if(n.hasOwnProperty(L)&&(i=n[L],i!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Le(e,t,L,i,n,null)}return;default:if(Fo(t)){for(G in n)n.hasOwnProperty(G)&&(i=n[G],i!==void 0&&Nu(e,t,G,i,n,void 0));return}}for(E in n)n.hasOwnProperty(E)&&(i=n[E],i!=null&&Le(e,t,E,i,n,null))}function nE(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,y=null,E=null,T=null,L=null,G=null;for(q in n){var F=n[q];if(n.hasOwnProperty(q)&&F!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":T=F;default:i.hasOwnProperty(q)||Le(e,t,q,null,i,F)}}for(var B in i){var q=i[B];if(F=n[B],i.hasOwnProperty(B)&&(q!=null||F!=null))switch(B){case"type":u=q;break;case"name":o=q;break;case"checked":L=q;break;case"defaultChecked":G=q;break;case"value":y=q;break;case"defaultValue":E=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(s(137,t));break;default:q!==F&&Le(e,t,B,q,i,F)}}Ko(e,y,E,T,L,G,u,o);return;case"select":q=y=E=B=null;for(u in n)if(T=n[u],n.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":q=T;default:i.hasOwnProperty(u)||Le(e,t,u,null,i,T)}for(o in i)if(u=i[o],T=n[o],i.hasOwnProperty(o)&&(u!=null||T!=null))switch(o){case"value":B=u;break;case"defaultValue":E=u;break;case"multiple":y=u;default:u!==T&&Le(e,t,o,u,i,T)}t=E,n=y,i=q,B!=null?pi(e,!!n,B,!1):!!i!=!!n&&(t!=null?pi(e,!!n,t,!0):pi(e,!!n,n?[]:"",!1));return;case"textarea":q=B=null;for(E in n)if(o=n[E],n.hasOwnProperty(E)&&o!=null&&!i.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Le(e,t,E,null,i,o)}for(y in i)if(o=i[y],u=n[y],i.hasOwnProperty(y)&&(o!=null||u!=null))switch(y){case"value":B=o;break;case"defaultValue":q=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&Le(e,t,y,o,i,u)}Lh(e,B,q);return;case"option":for(var pe in n)if(B=n[pe],n.hasOwnProperty(pe)&&B!=null&&!i.hasOwnProperty(pe))switch(pe){case"selected":e.selected=!1;break;default:Le(e,t,pe,null,i,B)}for(T in i)if(B=i[T],q=n[T],i.hasOwnProperty(T)&&B!==q&&(B!=null||q!=null))switch(T){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:Le(e,t,T,B,i,q)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var de in n)B=n[de],n.hasOwnProperty(de)&&B!=null&&!i.hasOwnProperty(de)&&Le(e,t,de,null,i,B);for(L in i)if(B=i[L],q=n[L],i.hasOwnProperty(L)&&B!==q&&(B!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(s(137,t));break;default:Le(e,t,L,B,i,q)}return;default:if(Fo(t)){for(var Ne in n)B=n[Ne],n.hasOwnProperty(Ne)&&B!==void 0&&!i.hasOwnProperty(Ne)&&Nu(e,t,Ne,void 0,i,B);for(G in i)B=i[G],q=n[G],!i.hasOwnProperty(G)||B===q||B===void 0&&q===void 0||Nu(e,t,G,B,i,q);return}}for(var j in n)B=n[j],n.hasOwnProperty(j)&&B!=null&&!i.hasOwnProperty(j)&&Le(e,t,j,null,i,B);for(F in i)B=i[F],q=n[F],!i.hasOwnProperty(F)||B===q||B==null&&q==null||Le(e,t,F,B,i,q)}var zu=null,$u=null;function zs(e){return e.nodeType===9?e:e.ownerDocument}function zg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $g(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Bu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Uu=null;function aE(){var e=window.event;return e&&e.type==="popstate"?e===Uu?!1:(Uu=e,!0):(Uu=null,!1)}var Bg=typeof setTimeout=="function"?setTimeout:void 0,iE=typeof clearTimeout=="function"?clearTimeout:void 0,Ug=typeof Promise=="function"?Promise:void 0,rE=typeof queueMicrotask=="function"?queueMicrotask:typeof Ug<"u"?function(e){return Ug.resolve(null).then(e).catch(lE)}:Bg;function lE(e){setTimeout(function(){throw e})}function wa(e){return e==="head"}function qg(e,t){var n=t,i=0,o=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"){if(0<i&&8>i){n=i;var y=e.ownerDocument;if(n&1&&Zr(y.documentElement),n&2&&Zr(y.body),n&4)for(n=y.head,Zr(n),y=n.firstChild;y;){var E=y.nextSibling,T=y.nodeName;y[Hn]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&y.rel.toLowerCase()==="stylesheet"||n.removeChild(y),y=E}}if(o===0){e.removeChild(u),rl(t);return}o--}else n==="$"||n==="$?"||n==="$!"?o++:i=n.charCodeAt(0)-48;else i=0;n=u}while(n);rl(t)}function qu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":qu(n),Go(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sE(e,t,n,i){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Hn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=hn(e.nextSibling),e===null)break}return null}function oE(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=hn(e.nextSibling),e===null))return null;return e}function Hu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function cE(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function hn(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Pu=null;function Hg(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}function Pg(e,t,n){switch(t=zs(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Zr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Go(e)}var tn=new Map,Vg=new Set;function $s(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ta=z.d;z.d={f:uE,r:fE,D:dE,C:hE,L:pE,m:mE,X:vE,S:gE,M:yE};function uE(){var e=ta.f(),t=Cs();return e||t}function fE(e){var t=ui(e);t!==null&&t.tag===5&&t.type==="form"?om(t):ta.r(e)}var Gi=typeof document>"u"?null:document;function kg(e,t,n){var i=Gi;if(i&&typeof t=="string"&&t){var o=Kt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Vg.has(o)||(Vg.add(o),e={rel:e,crossOrigin:n,href:t},i.querySelector(o)===null&&(t=i.createElement("link"),mt(t,"link",e),st(t),i.head.appendChild(t)))}}function dE(e){ta.D(e),kg("dns-prefetch",e,null)}function hE(e,t){ta.C(e,t),kg("preconnect",e,t)}function pE(e,t,n){ta.L(e,t,n);var i=Gi;if(i&&e&&t){var o='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Kt(n.imageSizes)+'"]')):o+='[href="'+Kt(e)+'"]';var u=o;switch(t){case"style":u=Xi(e);break;case"script":u=Ii(e)}tn.has(u)||(e=m({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),tn.set(u,e),i.querySelector(o)!==null||t==="style"&&i.querySelector(Jr(u))||t==="script"&&i.querySelector(Wr(u))||(t=i.createElement("link"),mt(t,"link",e),st(t),i.head.appendChild(t)))}}function mE(e,t){ta.m(e,t);var n=Gi;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Kt(i)+'"][href="'+Kt(e)+'"]',u=o;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ii(e)}if(!tn.has(u)&&(e=m({rel:"modulepreload",href:e},t),tn.set(u,e),n.querySelector(o)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Wr(u)))return}i=n.createElement("link"),mt(i,"link",e),st(i),n.head.appendChild(i)}}}function gE(e,t,n){ta.S(e,t,n);var i=Gi;if(i&&e){var o=fi(i).hoistableStyles,u=Xi(e);t=t||"default";var y=o.get(u);if(!y){var E={loading:0,preload:null};if(y=i.querySelector(Jr(u)))E.loading=5;else{e=m({rel:"stylesheet",href:e,"data-precedence":t},n),(n=tn.get(u))&&Vu(e,n);var T=y=i.createElement("link");st(T),mt(T,"link",e),T._p=new Promise(function(L,G){T.onload=L,T.onerror=G}),T.addEventListener("load",function(){E.loading|=1}),T.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Bs(y,t,i)}y={type:"stylesheet",instance:y,count:1,state:E},o.set(u,y)}}}function vE(e,t){ta.X(e,t);var n=Gi;if(n&&e){var i=fi(n).hoistableScripts,o=Ii(e),u=i.get(o);u||(u=n.querySelector(Wr(o)),u||(e=m({src:e,async:!0},t),(t=tn.get(o))&&ku(e,t),u=n.createElement("script"),st(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(o,u))}}function yE(e,t){ta.M(e,t);var n=Gi;if(n&&e){var i=fi(n).hoistableScripts,o=Ii(e),u=i.get(o);u||(u=n.querySelector(Wr(o)),u||(e=m({src:e,async:!0,type:"module"},t),(t=tn.get(o))&&ku(e,t),u=n.createElement("script"),st(u),mt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},i.set(o,u))}}function Gg(e,t,n,i){var o=(o=fe.current)?$s(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Xi(n.href),n=fi(o).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Xi(n.href);var u=fi(o).hoistableStyles,y=u.get(e);if(y||(o=o.ownerDocument||o,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=o.querySelector(Jr(e)))&&!u._p&&(y.instance=u,y.state.loading=5),tn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tn.set(e,n),u||bE(o,e,n,y.state))),t&&i===null)throw Error(s(528,""));return y}if(t&&i!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ii(n),n=fi(o).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Xi(e){return'href="'+Kt(e)+'"'}function Jr(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function bE(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),mt(t,"link",n),st(t),e.head.appendChild(t))}function Ii(e){return'[src="'+Kt(e)+'"]'}function Wr(e){return"script[async]"+e}function Ig(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(i)return t.instance=i,st(i),i;var o=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),st(i),mt(i,"style",o),Bs(i,n.precedence,e),t.instance=i;case"stylesheet":o=Xi(n.href);var u=e.querySelector(Jr(o));if(u)return t.state.loading|=4,t.instance=u,st(u),u;i=Xg(n),(o=tn.get(o))&&Vu(i,o),u=(e.ownerDocument||e).createElement("link"),st(u);var y=u;return y._p=new Promise(function(E,T){y.onload=E,y.onerror=T}),mt(u,"link",i),t.state.loading|=4,Bs(u,n.precedence,e),t.instance=u;case"script":return u=Ii(n.src),(o=e.querySelector(Wr(u)))?(t.instance=o,st(o),o):(i=n,(o=tn.get(u))&&(i=m({},n),ku(i,o)),e=e.ownerDocument||e,o=e.createElement("script"),st(o),mt(o,"link",i),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Bs(i,n.precedence,e));return t.instance}function Bs(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=i.length?i[i.length-1]:null,u=o,y=0;y<i.length;y++){var E=i[y];if(E.dataset.precedence===t)u=E;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ku(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Us=null;function Yg(e,t,n){if(Us===null){var i=new Map,o=Us=new Map;o.set(n,i)}else o=Us,i=o.get(n),i||(i=new Map,o.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var u=n[o];if(!(u[Hn]||u[He]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var E=i.get(y);E?E.push(u):i.set(y,[u])}}return i}function Kg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function SE(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var el=null;function EE(){}function RE(e,t,n){if(el===null)throw Error(s(475));var i=el;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=Xi(n.href),u=e.querySelector(Jr(o));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=qs.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=u,st(u);return}u=e.ownerDocument||e,n=Xg(n),(o=tn.get(o))&&Vu(n,o),u=u.createElement("link"),st(u);var y=u;y._p=new Promise(function(E,T){y.onload=E,y.onerror=T}),mt(u,"link",n),t.instance=u}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=qs.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function xE(){if(el===null)throw Error(s(475));var e=el;return e.stylesheets&&e.count===0&&Gu(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Gu(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function qs(){if(this.count--,this.count===0){if(this.stylesheets)Gu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hs=null;function Gu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hs=new Map,t.forEach(wE,e),Hs=null,qs.call(e))}function wE(e,t){if(!(t.state.loading&4)){var n=Hs.get(e);if(n)var i=n.get(null);else{n=new Map,Hs.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var y=o[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(n.set(y.dataset.precedence,y),i=y)}i&&n.set(null,i)}o=t.instance,y=o.getAttribute("data-precedence"),u=n.get(y)||i,u===i&&n.set(null,o),n.set(y,o),this.count++,i=qs.bind(this),o.addEventListener("load",i),o.addEventListener("error",i),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var tl={$$typeof:N,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function TE(e,t,n,i,o,u,y,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=i,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Fg(e,t,n,i,o,u,y,E,T,L,G,F){return e=new TE(e,t,n,y,E,T,L,F),t=1,u===!0&&(t|=24),u=Ht(3,null,null,t),e.current=u,u.stateNode=e,t=Tc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:i,isDehydrated:n,cache:t},Ac(u),e}function Zg(e){return e?(e=xi,e):xi}function Jg(e,t,n,i,o,u){o=Zg(o),i.context===null?i.context=o:i.pendingContext=o,i=fa(t),i.payload={element:n},u=u===void 0?null:u,u!==null&&(i.callback=u),n=da(e,i,t),n!==null&&(Xt(n,e,t),jr(n,e,t))}function Wg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xu(e,t){Wg(e,t),(e=e.alternate)&&Wg(e,t)}function ev(e){if(e.tag===13){var t=Ri(e,67108864);t!==null&&Xt(t,e,67108864),Xu(e,67108864)}}var Ps=!0;function _E(e,t,n,i){var o=D.T;D.T=null;var u=z.p;try{z.p=2,Iu(e,t,n,i)}finally{z.p=u,D.T=o}}function CE(e,t,n,i){var o=D.T;D.T=null;var u=z.p;try{z.p=8,Iu(e,t,n,i)}finally{z.p=u,D.T=o}}function Iu(e,t,n,i){if(Ps){var o=Yu(i);if(o===null)Lu(e,t,i,Vs,n),nv(e,i);else if(AE(o,e,t,n,i))i.stopPropagation();else if(nv(e,i),t&4&&-1<DE.indexOf(e)){for(;o!==null;){var u=ui(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=cn(u.pendingLanes);if(y!==0){var E=u;for(E.pendingLanes|=2,E.entangledLanes|=2;y;){var T=1<<31-at(y);E.entanglements[1]|=T,y&=~T}On(u),(Ae&6)===0&&(Ts=Ge()+500,Kr(0))}}break;case 13:E=Ri(u,2),E!==null&&Xt(E,u,2),Cs(),Xu(u,2)}if(u=Yu(i),u===null&&Lu(e,t,i,Vs,n),u===o)break;o=u}o!==null&&i.stopPropagation()}else Lu(e,t,i,null,n)}}function Yu(e){return e=Jo(e),Ku(e)}var Vs=null;function Ku(e){if(Vs=null,e=ci(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=d(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 Vs=e,null}function tv(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(on()){case xn:return 2;case jt:return 8;case It:case Te:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var Qu=!1,Ta=null,_a=null,Ca=null,nl=new Map,al=new Map,Da=[],DE="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".split(" ");function nv(e,t){switch(e){case"focusin":case"focusout":Ta=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":Ca=null;break;case"pointerover":case"pointerout":nl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":al.delete(t.pointerId)}}function il(e,t,n,i,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:u,targetContainers:[o]},t!==null&&(t=ui(t),t!==null&&ev(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function AE(e,t,n,i,o){switch(t){case"focusin":return Ta=il(Ta,e,t,n,i,o),!0;case"dragenter":return _a=il(_a,e,t,n,i,o),!0;case"mouseover":return Ca=il(Ca,e,t,n,i,o),!0;case"pointerover":var u=o.pointerId;return nl.set(u,il(nl.get(u)||null,e,t,n,i,o)),!0;case"gotpointercapture":return u=o.pointerId,al.set(u,il(al.get(u)||null,e,t,n,i,o)),!0}return!1}function av(e){var t=ci(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=d(n),t!==null){e.blockedOn=t,la(e.priority,function(){if(n.tag===13){var i=Gt();i=St(i);var o=Ri(n,i);o!==null&&Xt(o,n,i),Xu(n,i)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ks(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yu(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Zo=i,n.target.dispatchEvent(i),Zo=null}else return t=ui(n),t!==null&&ev(t),e.blockedOn=n,!1;t.shift()}return!0}function iv(e,t,n){ks(e)&&n.delete(t)}function OE(){Qu=!1,Ta!==null&&ks(Ta)&&(Ta=null),_a!==null&&ks(_a)&&(_a=null),Ca!==null&&ks(Ca)&&(Ca=null),nl.forEach(iv),al.forEach(iv)}function Gs(e,t){e.blockedOn===t&&(e.blockedOn=null,Qu||(Qu=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,OE)))}var Xs=null;function rv(e){Xs!==e&&(Xs=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Xs===e&&(Xs=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],o=e[t+2];if(typeof i!="function"){if(Ku(i||n)===null)continue;break}var u=ui(n);u!==null&&(e.splice(t,3),t-=3,Kc(u,{pending:!0,data:o,method:n.method,action:i},i,o))}}))}function rl(e){function t(T){return Gs(T,e)}Ta!==null&&Gs(Ta,e),_a!==null&&Gs(_a,e),Ca!==null&&Gs(Ca,e),nl.forEach(t),al.forEach(t);for(var n=0;n<Da.length;n++){var i=Da[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Da.length&&(n=Da[0],n.blockedOn===null);)av(n),n.blockedOn===null&&Da.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var o=n[i],u=n[i+1],y=o[Pe]||null;if(typeof u=="function")y||rv(n);else if(y){var E=null;if(u&&u.hasAttribute("formAction")){if(o=u,y=u[Pe]||null)E=y.formAction;else if(Ku(o)!==null)continue}else E=y.action;typeof E=="function"?n[i+1]=E:(n.splice(i,3),i-=3),rv(n)}}}function Fu(e){this._internalRoot=e}Is.prototype.render=Fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,i=Gt();Jg(n,i,e,t,null,null)},Is.prototype.unmount=Fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jg(e.current,2,null,e,null,null),Cs(),t[Et]=null}};function Is(e){this._internalRoot=e}Is.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ut();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Da.length&&t!==0&&t<Da[n].priority;n++);Da.splice(n,0,e),n===0&&av(e)}};var lv=l.version;if(lv!=="19.1.0")throw Error(s(527,lv,"19.1.0"));z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=p(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var jE={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{Un=Ys.inject(jE),Ye=Ys}catch{}}return ll.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,i="",o=Rm,u=xm,y=wm,E=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(E=t.unstable_transitionCallbacks)),t=Fg(e,1,!1,null,null,n,i,o,u,y,E,null),e[Et]=t.current,Mu(e),new Fu(t)},ll.hydrateRoot=function(e,t,n){if(!c(e))throw Error(s(299));var i=!1,o="",u=Rm,y=xm,E=wm,T=null,L=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(T=n.unstable_transitionCallbacks),n.formState!==void 0&&(L=n.formState)),t=Fg(e,1,!0,t,n??null,i,o,u,y,E,T,L),t.context=Zg(null),n=t.current,i=Gt(),i=St(i),o=fa(i),o.callback=null,da(n,o,i),n=i,t.current.lanes=n,Ke(t,n),On(t),e[Et]=t.current,Mu(e),new Is(t)},ll.version="19.1.0",ll}var fv;function FE(){if(fv)return Ju.exports;fv=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),Ju.exports=QE(),Ju.exports}var ZE=FE(),JE="Invariant failed";function ia(a,l){if(!a)throw new Error(JE)}const Fi=new WeakMap,co=new WeakMap,ho={current:[]};let tf=!1,pl=0;const ul=new Set,Ks=new Map;function j0(a){const l=Array.from(a).sort((r,s)=>r instanceof Zi&&r.options.deps.includes(s)?1:s instanceof Zi&&s.options.deps.includes(r)?-1:0);for(const r of l){if(ho.current.includes(r))continue;ho.current.push(r),r.recompute();const s=co.get(r);if(s)for(const c of s){const f=Fi.get(c);f&&j0(f)}}}function WE(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function eR(a){a.listeners.forEach(l=>l({prevVal:a.prevState,currentVal:a.state}))}function M0(a){if(pl>0&&!Ks.has(a)&&Ks.set(a,a.prevState),ul.add(a),!(pl>0)&&!tf)try{for(tf=!0;ul.size>0;){const l=Array.from(ul);ul.clear();for(const r of l){const s=Ks.get(r)??r.prevState;r.prevState=s,WE(r)}for(const r of l){const s=Fi.get(r);s&&(ho.current.push(r),j0(s))}for(const r of l){const s=Fi.get(r);if(s)for(const c of s)eR(c)}}}finally{tf=!1,ho.current=[],Ks.clear()}}function dv(a){pl++;try{a()}finally{if(pl--,pl===0){const l=Array.from(ul)[0];l&&M0(l)}}}function tR(a){return typeof a=="function"}class Dd{constructor(l,r){this.listeners=new Set,this.subscribe=s=>{var c,f;this.listeners.add(s);const d=(f=(c=this.options)==null?void 0:c.onSubscribe)==null?void 0:f.call(c,s,this);return()=>{this.listeners.delete(s),d?.()}},this.prevState=l,this.state=l,this.options=r}setState(l){var r,s,c;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(l):tR(l)?this.state=l(this.prevState):this.state=l,(c=(s=this.options)==null?void 0:s.onUpdate)==null||c.call(s),M0(this)}}class Zi{constructor(l){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const r=[],s=[];for(const c of this.options.deps)r.push(c.prevState),s.push(c.state);return this.lastSeenDepValues=s,{prevDepVals:r,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var r,s;this.prevState=this.state;const{prevDepVals:c,currDepVals:f,prevVal:d}=this.getDepVals();this.state=this.options.fn({prevDepVals:c,currDepVals:f,prevVal:d}),(s=(r=this.options).onUpdate)==null||s.call(r)},this.checkIfRecalculationNeededDeeply=()=>{for(const f of this.options.deps)f instanceof Zi&&f.checkIfRecalculationNeededDeeply();let r=!1;const s=this.lastSeenDepValues,{currDepVals:c}=this.getDepVals();for(let f=0;f<c.length;f++)if(c[f]!==s[f]){r=!0;break}r&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const r of this._subscriptions)r()}),this.subscribe=r=>{var s,c;this.listeners.add(r);const f=(c=(s=this.options).onSubscribe)==null?void 0:c.call(s,r,this);return()=>{this.listeners.delete(r),f?.()}},this.options=l,this.state=l.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(l=this.options.deps){for(const r of l)if(r instanceof Zi)r.registerOnGraph(),this.registerOnGraph(r.options.deps);else if(r instanceof Dd){let s=Fi.get(r);s||(s=new Set,Fi.set(r,s)),s.add(this);let c=co.get(this);c||(c=new Set,co.set(this,c)),c.add(r)}}unregisterFromGraph(l=this.options.deps){for(const r of l)if(r instanceof Zi)this.unregisterFromGraph(r.options.deps);else if(r instanceof Dd){const s=Fi.get(r);s&&s.delete(this);const c=co.get(this);c&&c.delete(r)}}}const Ma="__TSR_index",hv="popstate",pv="beforeunload";function L0(a){let l=a.getLocation();const r=new Set,s=d=>{l=a.getLocation(),r.forEach(h=>h({location:l,action:d}))},c=d=>{a.notifyOnIndexChange??!0?s(d):l=a.getLocation()},f=async({task:d,navigateOpts:h,...p})=>{var v,m;if(h?.ignoreBlocker??!1){d();return}const b=((v=a.getBlockers)==null?void 0:v.call(a))??[],x=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&b.length&&x)for(const w of b){const R=yl(p.path,p.state);if(await w.blockerFn({currentLocation:l,nextLocation:R,action:p.type})){(m=a.onBlocked)==null||m.call(a);return}}d()};return{get location(){return l},get length(){return a.getLength()},subscribers:r,subscribe:d=>(r.add(d),()=>{r.delete(d)}),push:(d,h,p)=>{const v=l.state[Ma];h=Ad(v+1,h),f({task:()=>{a.pushState(d,h),s({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:d,state:h})},replace:(d,h,p)=>{const v=l.state[Ma];h=Ad(v,h),f({task:()=>{a.replaceState(d,h),s({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:d,state:h})},go:(d,h)=>{f({task:()=>{a.go(d),c({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{f({task:()=>{a.back(d?.ignoreBlocker??!1),c({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{f({task:()=>{a.forward(d?.ignoreBlocker??!1),c({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>l.state[Ma]!==0,createHref:d=>a.createHref(d),block:d=>{var h;if(!a.setBlockers)return()=>{};const p=((h=a.getBlockers)==null?void 0:h.call(a))??[];return a.setBlockers([...p,d]),()=>{var v,m;const g=((v=a.getBlockers)==null?void 0:v.call(a))??[];(m=a.setBlockers)==null||m.call(a,g.filter(b=>b!==d))}},flush:()=>{var d;return(d=a.flush)==null?void 0:d.call(a)},destroy:()=>{var d;return(d=a.destroy)==null?void 0:d.call(a)},notify:s}}function Ad(a,l){l||(l={});const r=Id();return{...l,key:r,__TSR_key:r,[Ma]:a}}function nR(a){var l,r;const s=typeof document<"u"?window:void 0,c=s.history.pushState,f=s.history.replaceState;let d=[];const h=()=>d,p=K=>d=K,v=K=>K,m=()=>yl(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state);if(!((l=s.history.state)!=null&&l.__TSR_key)&&!((r=s.history.state)!=null&&r.key)){const K=Id();s.history.replaceState({[Ma]:0,key:K,__TSR_key:K},"")}let g=m(),b,x=!1,w=!1,R=!1,_=!1;const C=()=>g;let U,N;const V=()=>{U&&(P._ignoreSubscribers=!0,(U.isPush?s.history.pushState:s.history.replaceState)(U.state,"",U.href),P._ignoreSubscribers=!1,U=void 0,N=void 0,b=void 0)},Z=(K,I,W)=>{const re=v(I);N||(b=g),g=yl(I,W),U={href:re,state:W,isPush:U?.isPush||K==="push"},N||(N=Promise.resolve().then(()=>V()))},$=K=>{g=m(),P.notify({type:K})},H=async()=>{if(w){w=!1;return}const K=m(),I=K.state[Ma]-g.state[Ma],W=I===1,re=I===-1,X=!W&&!re||x;x=!1;const k=X?"GO":re?"BACK":"FORWARD",D=X?{type:"GO",index:I}:{type:re?"BACK":"FORWARD"};if(R)R=!1;else{const z=h();if(typeof document<"u"&&z.length){for(const Q of z)if(await Q.blockerFn({currentLocation:g,nextLocation:K,action:k})){w=!0,s.history.go(1),P.notify(D);return}}}g=m(),P.notify(D)},O=K=>{if(_){_=!1;return}let I=!1;const W=h();if(typeof document<"u"&&W.length)for(const re of W){const X=re.enableBeforeUnload??!0;if(X===!0){I=!0;break}if(typeof X=="function"&&X()===!0){I=!0;break}}if(I)return K.preventDefault(),K.returnValue=""},P=L0({getLocation:C,getLength:()=>s.history.length,pushState:(K,I)=>Z("push",K,I),replaceState:(K,I)=>Z("replace",K,I),back:K=>(K&&(R=!0),_=!0,s.history.back()),forward:K=>{K&&(R=!0),_=!0,s.history.forward()},go:K=>{x=!0,s.history.go(K)},createHref:K=>v(K),flush:V,destroy:()=>{s.history.pushState=c,s.history.replaceState=f,s.removeEventListener(pv,O,{capture:!0}),s.removeEventListener(hv,H)},onBlocked:()=>{b&&g!==b&&(g=b)},getBlockers:h,setBlockers:p,notifyOnIndexChange:!1});return s.addEventListener(pv,O,{capture:!0}),s.addEventListener(hv,H),s.history.pushState=function(...K){const I=c.apply(s.history,K);return P._ignoreSubscribers||$("PUSH"),I},s.history.replaceState=function(...K){const I=f.apply(s.history,K);return P._ignoreSubscribers||$("REPLACE"),I},P}function aR(a={initialEntries:["/"]}){const l=a.initialEntries;let r=a.initialIndex?Math.min(Math.max(a.initialIndex,0),l.length-1):l.length-1;const s=l.map((f,d)=>Ad(d,void 0));return L0({getLocation:()=>yl(l[r],s[r]),getLength:()=>l.length,pushState:(f,d)=>{r<l.length-1&&(l.splice(r+1),s.splice(r+1)),s.push(d),l.push(f),r=Math.max(l.length-1,0)},replaceState:(f,d)=>{s[r]=d,l[r]=f},back:()=>{r=Math.max(r-1,0)},forward:()=>{r=Math.min(r+1,l.length-1)},go:f=>{r=Math.min(Math.max(r+f,0),l.length-1)},createHref:f=>f})}function yl(a,l){const r=a.indexOf("#"),s=a.indexOf("?"),c=Id();return{href:a,pathname:a.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:a.length),hash:r>-1?a.substring(r):"",search:s>-1?a.slice(s,r===-1?void 0:r):"",state:l||{[Ma]:0,key:c,__TSR_key:c}}}function Id(){return(Math.random()+1).toString(36).substring(7)}function Od(a){return a[a.length-1]}function iR(a){return typeof a=="function"}function ai(a,l){return iR(a)?a(l):a}function jd(a,l){return l.reduce((r,s)=>(r[s]=a[s],r),{})}function nn(a,l){if(a===l)return a;const r=l,s=vv(a)&&vv(r);if(s||mv(a)&&mv(r)){const c=s?a:Object.keys(a).concat(Object.getOwnPropertySymbols(a)),f=c.length,d=s?r:Object.keys(r).concat(Object.getOwnPropertySymbols(r)),h=d.length,p=s?[]:{};let v=0;for(let m=0;m<h;m++){const g=s?m:d[m];(!s&&c.includes(g)||s)&&a[g]===void 0&&r[g]===void 0?(p[g]=void 0,v++):(p[g]=nn(a[g],r[g]),p[g]===a[g]&&a[g]!==void 0&&v++)}return f===h&&v===f?a:p}return r}function mv(a){return Md(a)&&Object.getOwnPropertyNames(a).length===Object.keys(a).length}function Md(a){if(!gv(a))return!1;const l=a.constructor;if(typeof l>"u")return!0;const r=l.prototype;return!(!gv(r)||!r.hasOwnProperty("isPrototypeOf"))}function gv(a){return Object.prototype.toString.call(a)==="[object Object]"}function vv(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function yv(a,l){let r=Object.keys(a);return l&&(r=r.filter(s=>a[s]!==void 0)),r}function Ji(a,l,r){if(a===l)return!0;if(typeof a!=typeof l)return!1;if(Md(a)&&Md(l)){const s=r?.ignoreUndefined??!0,c=yv(a,s),f=yv(l,s);return!r?.partial&&c.length!==f.length?!1:f.every(d=>Ji(a[d],l[d],r))}return Array.isArray(a)&&Array.isArray(l)?a.length!==l.length?!1:!a.some((s,c)=>!Ji(s,l[c],r)):!1}function Ki(a){let l,r;const s=new Promise((c,f)=>{l=c,r=f});return s.status="pending",s.resolve=c=>{s.status="resolved",s.value=c,l(c),a?.(c)},s.reject=c=>{s.status="rejected",r(c)},s}function Nn(a){return Oo(a.filter(l=>l!==void 0).join("/"))}function Oo(a){return a.replace(/\/{2,}/g,"/")}function Yd(a){return a==="/"?a:a.replace(/^\/{1,}/,"")}function tr(a){return a==="/"?a:a.replace(/\/{1,}$/,"")}function nf(a){return tr(Yd(a))}function po(a,l){return a?.endsWith("/")&&a!=="/"&&a!==`${l}/`?a.slice(0,-1):a}function rR(a,l,r){return po(a,r)===po(l,r)}function lR({basepath:a,base:l,to:r,trailingSlash:s="never",caseSensitive:c}){var f,d;l=mo(a,l,c),r=mo(a,r,c);let h=nr(l);const p=nr(r);h.length>1&&((f=Od(h))==null?void 0:f.value)==="/"&&h.pop(),p.forEach((g,b)=>{g.value==="/"?b?b===p.length-1&&h.push(g):h=[g]:g.value===".."?h.pop():g.value==="."||h.push(g)}),h.length>1&&(((d=Od(h))==null?void 0:d.value)==="/"?s==="never"&&h.pop():s==="always"&&h.push({type:"pathname",value:"/"}));const v=h.map(g=>{if(g.type==="param"){const b=g.value.substring(1);if(g.prefixSegment&&g.suffixSegment)return`${g.prefixSegment}{$${b}}${g.suffixSegment}`;if(g.prefixSegment)return`${g.prefixSegment}{$${b}}`;if(g.suffixSegment)return`{$${b}}${g.suffixSegment}`}if(g.type==="wildcard"){if(g.prefixSegment&&g.suffixSegment)return`${g.prefixSegment}{$}${g.suffixSegment}`;if(g.prefixSegment)return`${g.prefixSegment}{$}`;if(g.suffixSegment)return`{$}${g.suffixSegment}`}return g.value}),m=Nn([a,...v]);return Oo(m)}const sR=/^\$.{1,}$/,oR=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,cR=/^\$$/,uR=/^(.*?)\{\$\}(.*)$/;function nr(a){if(!a)return[];a=Oo(a);const l=[];if(a.slice(0,1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),!a)return l;const r=a.split("/").filter(Boolean);return l.push(...r.map(s=>{const c=s.match(uR);if(c){const d=c[1],h=c[2];return{type:"wildcard",value:"$",prefixSegment:d||void 0,suffixSegment:h||void 0}}const f=s.match(oR);if(f){const d=f[1],h=f[2],p=f[3];return{type:"param",value:""+h,prefixSegment:d||void 0,suffixSegment:p||void 0}}return sR.test(s)?{type:"param",value:"$"+s.substring(1),prefixSegment:void 0,suffixSegment:void 0}:cR.test(s)?{type:"wildcard",value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:"pathname",value:s.includes("%25")?s.split("%25").map(d=>decodeURI(d)).join("%25"):decodeURI(s)}})),a.slice(-1)==="/"&&(a=a.substring(1),l.push({type:"pathname",value:"/"})),l}function af({path:a,params:l,leaveWildcards:r,leaveParams:s,decodeCharMap:c}){const f=nr(a);function d(m){const g=l[m],b=typeof g=="string";return["*","_splat"].includes(m)?b?encodeURI(g):g:b?fR(g,c):g}let h=!1;const p={},v=Nn(f.map(m=>{if(m.type==="wildcard"){p._splat=l._splat;const g=m.prefixSegment||"",b=m.suffixSegment||"",x=d("_splat");return r?`${g}${m.value}${x??""}${b}`:`${g}${x}${b}`}if(m.type==="param"){const g=m.value.substring(1);!h&&!(g in l)&&(h=!0),p[g]=l[g];const b=m.prefixSegment||"",x=m.suffixSegment||"";if(s){const w=d(m.value);return`${b}${m.value}${w??""}${x}`}return`${b}${d(g)??"undefined"}${x}`}return m.value}));return{usedParams:p,interpolatedPath:v,isMissingParams:h}}function fR(a,l){let r=encodeURIComponent(a);if(l)for(const[s,c]of l)r=r.replaceAll(s,c);return r}function Ld(a,l,r){const s=dR(a,l,r);if(!(r.to&&!s))return s??{}}function mo(a,l,r=!1){const s=r?a:a.toLowerCase(),c=r?l:l.toLowerCase();switch(!0){case s==="/":return l;case c===s:return"";case l.length<a.length:return l;case c[s.length]!=="/":return l;case c.startsWith(s):return l.slice(a.length);default:return l}}function dR(a,l,r){if(a!=="/"&&!l.startsWith(a))return;l=mo(a,l,r.caseSensitive);const s=mo(a,`${r.to??"$"}`,r.caseSensitive),c=nr(l),f=nr(s);l.startsWith("/")||c.unshift({type:"pathname",value:"/"}),s.startsWith("/")||f.unshift({type:"pathname",value:"/"});const d={};return(()=>{var p;for(let v=0;v<Math.max(c.length,f.length);v++){const m=c[v],g=f[v],b=v>=c.length-1,x=v>=f.length-1;if(g){if(g.type==="wildcard"){const w=c.slice(v);let R;if(g.prefixSegment||g.suffixSegment){if(!m)return!1;const _=g.prefixSegment||"",C=g.suffixSegment||"",U=m.value;if("prefixSegment"in g&&!U.startsWith(_)||"suffixSegment"in g&&!((p=c[c.length-1])!=null&&p.value.endsWith(C)))return!1;let N=decodeURI(Nn(w.map(V=>V.value)));_&&N.startsWith(_)&&(N=N.slice(_.length)),C&&N.endsWith(C)&&(N=N.slice(0,N.length-C.length)),R=N}else R=decodeURI(Nn(w.map(_=>_.value)));return d["*"]=R,d._splat=R,!0}if(g.type==="pathname"){if(g.value==="/"&&!m?.value)return!0;if(m){if(r.caseSensitive){if(g.value!==m.value)return!1}else if(g.value.toLowerCase()!==m.value.toLowerCase())return!1}}if(!m)return!1;if(g.type==="param"){if(m.value==="/")return!1;let w;if(g.prefixSegment||g.suffixSegment){const R=g.prefixSegment||"",_=g.suffixSegment||"",C=m.value;if(R&&!C.startsWith(R)||_&&!C.endsWith(_))return!1;let U=C;R&&U.startsWith(R)&&(U=U.slice(R.length)),_&&U.endsWith(_)&&(U=U.slice(0,U.length-_.length)),w=decodeURIComponent(U)}else w=decodeURIComponent(m.value);d[g.value.substring(1)]=w}}if(!b&&x)return d["**"]=Nn(c.slice(v+1).map(w=>w.value)),!!r.fuzzy&&g?.value!=="/"}return!0})()?d:void 0}function za(a={}){if(a.isNotFound=!0,a.throw)throw a;return a}function an(a){return!!a?.isNotFound}function hR(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{return}}const go="tsr-scroll-restoration-v1_3",pR=(a,l)=>{let r;return(...s)=>{r||(r=setTimeout(()=>{a(...s),r=null},l))}};function mR(){const a=hR();if(!a)return;const l=a.getItem(go);let r=l?JSON.parse(l):{};return{state:r,set:s=>(r=ai(s,r)||r,a.setItem(go,JSON.stringify(r)))}}const rf=mR(),Nd=a=>a.state.__TSR_key||a.href;function gR(a){const l=[];let r;for(;r=a.parentNode;)l.unshift(`${a.tagName}:nth-child(${[].indexOf.call(r.children,a)+1})`),a=r;return`${l.join(" > ")}`.toLowerCase()}let vo=!1;function N0(a,l,r,s,c){var f;let d;try{d=JSON.parse(sessionStorage.getItem(a)||"{}")}catch(v){console.error(v);return}const h=l||((f=window.history.state)==null?void 0:f.key),p=d[h];vo=!0,(()=>{if(s&&p){for(const m in p){const g=p[m];if(m==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:r});else if(m){const b=document.querySelector(m);b&&(b.scrollLeft=g.scrollX,b.scrollTop=g.scrollY)}}return}const v=window.location.hash.split("#")[1];if(v){const m=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(m){const g=document.getElementById(v);g&&g.scrollIntoView(m)}return}["window",...c?.filter(m=>m!=="window")??[]].forEach(m=>{const g=m==="window"?window:typeof m=="function"?m():document.querySelector(m);g&&g.scrollTo({top:0,left:0,behavior:r})})})(),vo=!1}function vR(a,l){if(rf===void 0||((a.options.scrollRestoration??!1)&&(a.isScrollRestoring=!0),typeof document>"u"||a.isScrollRestorationSetup))return;a.isScrollRestorationSetup=!0,vo=!1;const s=a.options.getScrollRestorationKey||Nd;window.history.scrollRestoration="manual";const c=f=>{if(vo||!a.isScrollRestoring)return;let d="";if(f.target===document||f.target===window)d="window";else{const p=f.target.getAttribute("data-scroll-restoration-id");p?d=`[data-scroll-restoration-id="${p}"]`:d=gR(f.target)}const h=s(a.state.location);rf.set(p=>{const v=p[h]=p[h]||{},m=v[d]=v[d]||{};if(d==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(d){const g=document.querySelector(d);g&&(m.scrollX=g.scrollLeft||0,m.scrollY=g.scrollTop||0)}return p})};typeof document<"u"&&document.addEventListener("scroll",pR(c,100),!0),a.subscribe("onRendered",f=>{const d=s(f.toLocation);if(!a.resetNextScroll){a.resetNextScroll=!0;return}N0(go,d,a.options.scrollRestorationBehavior||void 0,a.isScrollRestoring||void 0,a.options.scrollToTopSelectors||void 0),a.isScrollRestoring&&rf.set(h=>(h[d]=h[d]||{},h))})}function yR(a){if(typeof document<"u"&&document.querySelector){const l=a.state.location.state.__hashScrollIntoViewOptions??!0;if(l&&a.state.location.hash!==""){const r=document.getElementById(a.state.location.hash);r&&r.scrollIntoView(l)}}}function bR(a,l){const r=Object.entries(a).flatMap(([c,f])=>Array.isArray(f)?f.map(d=>[c,String(d)]):[[c,String(f)]]);return""+new URLSearchParams(r).toString()}function lf(a){return a?a==="false"?!1:a==="true"?!0:+a*0===0&&+a+""===a?+a:a:""}function SR(a,l){const r=a;return[...new URLSearchParams(r).entries()].reduce((f,[d,h])=>{const p=f[d];return p==null?f[d]=lf(h):f[d]=Array.isArray(p)?[...p,lf(h)]:[p,lf(h)],f},{})}const ER=xR(JSON.parse),RR=wR(JSON.stringify,JSON.parse);function xR(a){return l=>{l.substring(0,1)==="?"&&(l=l.substring(1));const r=SR(l);for(const s in r){const c=r[s];if(typeof c=="string")try{r[s]=a(c)}catch{}}return r}}function wR(a,l){function r(s){if(typeof s=="object"&&s!==null)try{return a(s)}catch{}else if(typeof s=="string"&&typeof l=="function")try{return l(s),a(s)}catch{}return s}return s=>{s={...s},Object.keys(s).forEach(f=>{const d=s[f];typeof d>"u"||d===void 0?delete s[f]:s[f]=r(d)});const c=bR(s).toString();return c?`?${c}`:""}}const pn="__root__";function La(a){if(a.statusCode=a.statusCode||a.code||307,!a.reloadDocument)try{new URL(`${a.href}`),a.reloadDocument=!0}catch{}const l=new Headers(a.headers||{});a.href&&l.get("Location")===null&&l.set("Location",a.href);const r=new Response(null,{status:a.statusCode,headers:l});if(r.options=a,a.throw)throw r;return r}function jn(a){return a instanceof Response&&!!a.options}function ii(a){const l=a.resolvedLocation,r=a.location,s=l?.pathname!==r.pathname,c=l?.href!==r.href,f=l?.hash!==r.hash;return{fromLocation:l,toLocation:r,pathChanged:s,hrefChanged:c,hashChanged:f}}class TR{constructor(l){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.isShell=!1,this.update=r=>{var s;r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const c=this.options;this.options={...this.options,...r},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(f=>[encodeURIComponent(f),f])):void 0,(!this.basepath||r.basepath&&r.basepath!==c.basepath)&&(r.basepath===void 0||r.basepath===""||r.basepath==="/"?this.basepath="/":this.basepath=`/${nf(r.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?aR({initialEntries:[this.basepath||"/"]}):nR()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Dd(CR(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(f=>!["redirected"].includes(f.status))}}}),vR(this)),typeof window<"u"&&"CSS"in window&&typeof((s=window.CSS)==null?void 0:s.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)")),this.latestLocation.search.__TSS_SHELL&&(this.isShell=!0)},this.buildRouteTree=()=>{const{routesById:r,routesByPath:s,flatRoutes:c}=DR({routeTree:this.routeTree,initRoute:(d,h)=>{d.init({originalIndex:h,defaultSsr:this.options.defaultSsr})}});this.routesById=r,this.routesByPath=s,this.flatRoutes=c;const f=this.options.notFoundRoute;f&&(f.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[f.id]=f)},this.subscribe=(r,s)=>{const c={eventType:r,fn:s};return this.subscribers.add(c),()=>{this.subscribers.delete(c)}},this.emit=r=>{this.subscribers.forEach(s=>{s.eventType===r.type&&s.fn(r)})},this.parseLocation=(r,s)=>{const c=({pathname:p,search:v,hash:m,state:g})=>{const b=this.options.parseSearch(v),x=this.options.stringifySearch(b);return{pathname:p,searchStr:x,search:nn(r?.search,b),hash:m.split("#").reverse()[0]??"",href:`${p}${x}${m}`,state:nn(r?.state,g)}},f=c(s??this.history.location),{__tempLocation:d,__tempKey:h}=f.state;if(d&&(!h||h===this.tempLocationKey)){const p=c(d);return p.state.key=f.state.key,p.state.__TSR_key=f.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:f}}return f},this.resolvePathWithBase=(r,s)=>lR({basepath:this.basepath,base:r,to:Oo(s),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(r,s,c)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},c):this.matchRoutesInternal(r,s),this.getMatchedRoutes=(r,s)=>AR({pathname:r,routePathname:s,basepath:this.basepath,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes}),this.cancelMatch=r=>{const s=this.getMatch(r);s&&(s.abortController.abort(),clearTimeout(s.pendingTimeout))},this.cancelMatches=()=>{var r;(r=this.state.pendingMatches)==null||r.forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=r=>{const s=(f={})=>{var d;const h=f._fromLocation||this.latestLocation,p=this.matchRoutes(h,{_buildLocation:!0}),v=Od(p);let m=v.fullPath;f.unsafeRelative==="path"?m=h.pathname:f.to&&f.from&&(m=f.from,[...p].reverse().find(H=>H.fullPath===m||H.fullPath===Nn([m,"/"]))||console.warn(`Could not find match for from: ${f.from}`));const g=v.search,b={...v.params},x=f.to?this.resolvePathWithBase(m,`${f.to}`):this.resolvePathWithBase(m,".");let w=(f.params??!0)===!0?b:{...b,...ai(f.params,b)};const R=this.matchRoutes(x,{},{_buildLocation:!0}).map($=>this.looseRoutesById[$.routeId]);Object.keys(w).length>0&&R.map($=>{var H;return((H=$.options.params)==null?void 0:H.stringify)??$.options.stringifyParams}).filter(Boolean).forEach($=>{w={...w,...$(w)}});const _=af({path:x,params:w??{},leaveWildcards:!1,leaveParams:r.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let C=g;if(r._includeValidateSearch&&((d=this.options.search)!=null&&d.strict)){let $={};R.forEach(H=>{try{H.options.validateSearch&&($={...$,...zd(H.options.validateSearch,{...$,...C})??{}})}catch{}}),C=$}C=OR({search:C,dest:f,destRoutes:R,_includeValidateSearch:r._includeValidateSearch}),C=nn(g,C);const U=this.options.stringifySearch(C),N=f.hash===!0?h.hash:f.hash?ai(f.hash,h.hash):void 0,V=N?`#${N}`:"";let Z=f.state===!0?h.state:f.state?ai(f.state,h.state):{};return Z=nn(h.state,Z),{pathname:_,search:C,searchStr:U,state:Z,hash:N??"",href:`${_}${U}${V}`,unmaskOnReload:f.unmaskOnReload}},c=(f={},d)=>{var h;const p=s(f);let v=d?s(d):void 0;if(!v){let m={};const g=(h=this.options.routeMasks)==null?void 0:h.find(b=>{const x=Ld(this.basepath,p.pathname,{to:b.from,caseSensitive:!1,fuzzy:!1});return x?(m=x,!0):!1});if(g){const{from:b,...x}=g;d={...jd(r,["from"]),...x,params:m},v=s(d)}}if(v){const m=s(d);p.maskedLocation=m}return p};return r.mask?c(r,{...jd(r,["from"]),...r.mask}):c(r)},this.commitLocation=({viewTransition:r,ignoreBlocker:s,...c})=>{const f=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(m=>{c.state[m]=this.latestLocation.state[m]});const v=Ji(c.state,this.latestLocation.state);return p.forEach(m=>{delete c.state[m]}),v},d=this.latestLocation.href===c.href,h=this.commitLocationPromise;if(this.commitLocationPromise=Ki(()=>{h?.resolve()}),d&&f())this.load();else{let{maskedLocation:p,hashScrollIntoView:v,...m}=c;p&&(m={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=v??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[c.replace?"replace":"push"](m.href,m.state,{ignoreBlocker:s})}return this.resetNextScroll=c.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:c,viewTransition:f,ignoreBlocker:d,href:h,...p}={})=>{if(h){const m=this.history.location.state.__TSR_index,g=yl(h,{__TSR_index:r?m:m+1});p.to=g.pathname,p.search=this.options.parseSearch(g.search),p.hash=g.hash.slice(1)}const v=this.buildLocation({...p,_includeValidateSearch:!0});return this.commitLocation({...v,viewTransition:f,replace:r,resetScroll:s,hashScrollIntoView:c,ignoreBlocker:d})},this.navigate=({to:r,reloadDocument:s,href:c,...f})=>{if(!s&&c)try{new URL(`${c}`),s=!0}catch{}if(s){if(!c){const d=this.buildLocation({to:r,...f});c=this.history.createHref(d.href)}f.replace?window.location.replace(c):window.location.href=c;return}return this.buildAndCommitLocation({...f,href:c,to:r})},this.beforeLoad=()=>{if(this.cancelMatches(),this.latestLocation=this.parseLocation(this.latestLocation),this.isServer){const s=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(nf(this.latestLocation.href)!==nf(s.href))throw La({href:s.href})}const r=this.matchRoutes(this.latestLocation);this.__store.setState(s=>({...s,status:"pending",isLoading:!0,location:this.latestLocation,pendingMatches:r,cachedMatches:s.cachedMatches.filter(c=>!r.find(f=>f.id===c.id))}))},this.load=async r=>{let s,c,f;for(f=new Promise(d=>{this.startTransition(async()=>{var h;try{this.beforeLoad();const p=this.latestLocation,v=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ii({resolvedLocation:v,location:p})}),this.emit({type:"onBeforeLoad",...ii({resolvedLocation:v,location:p})}),await this.loadMatches({sync:r?.sync,matches:this.state.pendingMatches,location:p,onReady:async()=>{this.startViewTransition(async()=>{let m,g,b;dv(()=>{this.__store.setState(x=>{const w=x.matches,R=x.pendingMatches||x.matches;return m=w.filter(_=>!R.find(C=>C.id===_.id)),g=R.filter(_=>!w.find(C=>C.id===_.id)),b=w.filter(_=>R.find(C=>C.id===_.id)),{...x,isLoading:!1,loadedAt:Date.now(),matches:R,pendingMatches:void 0,cachedMatches:[...x.cachedMatches,...m.filter(_=>_.status!=="error")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[g,"onEnter"],[b,"onStay"]].forEach(([x,w])=>{x.forEach(R=>{var _,C;(C=(_=this.looseRoutesById[R.routeId].options)[w])==null||C.call(_,R)})})})}})}catch(p){jn(p)?(s=p,this.isServer||this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):an(p)&&(c=p),this.__store.setState(v=>({...v,statusCode:s?s.status:c?404:v.matches.some(m=>m.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===f&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=f,await f;this.latestLoadPromise&&f!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(d=>({...d,statusCode:404}))},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let c;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const f=this.latestLocation,d=this.state.resolvedLocation,h=typeof s.types=="function"?s.types(ii({resolvedLocation:d,location:f})):s.types;c={update:r,types:h}}else c=r;document.startViewTransition(c)}else r()},this.updateMatch=(r,s)=>{var c;let f;const d=(c=this.state.pendingMatches)==null?void 0:c.find(m=>m.id===r),h=this.state.matches.find(m=>m.id===r),p=this.state.cachedMatches.find(m=>m.id===r),v=d?"pendingMatches":h?"matches":p?"cachedMatches":"";return v&&this.__store.setState(m=>{var g;return{...m,[v]:(g=m[v])==null?void 0:g.map(b=>b.id===r?f=s(b):b)}}),f},this.getMatch=r=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(s=>s.id===r),this.loadMatches=async({location:r,matches:s,preload:c,onReady:f,updateMatch:d=this.updateMatch,sync:h})=>{let p,v=!1;const m=async()=>{v||(v=!0,await f?.())},g=x=>!!(c&&!this.state.matches.find(w=>w.id===x)),b=(x,w)=>{var R,_,C,U;if(jn(w)||an(w)){if(jn(w)&&w.redirectHandled&&!w.options.reloadDocument)throw w;if((R=x.beforeLoadPromise)==null||R.resolve(),(_=x.loaderPromise)==null||_.resolve(),d(x.id,N=>({...N,status:jn(w)?"redirected":an(w)?"notFound":"error",isFetching:!1,error:w,beforeLoadPromise:void 0,loaderPromise:void 0})),w.routeId||(w.routeId=x.routeId),(C=x.loadPromise)==null||C.resolve(),jn(w))throw v=!0,w.options._fromLocation=r,w.redirectHandled=!0,w=this.resolveRedirect(w),w;if(an(w))throw this._handleNotFound(s,w,{updateMatch:d}),(U=this.serverSsr)==null||U.onMatchSettled({router:this,match:this.getMatch(x.id)}),w}};try{await new Promise((x,w)=>{(async()=>{var R,_,C,U;try{const N=($,H,O)=>{var P,K;const{id:I,routeId:W}=s[$],re=this.looseRoutesById[W];if(H instanceof Promise)throw H;H.routerCode=O,p=p??$,b(this.getMatch(I),H);try{(K=(P=re.options).onError)==null||K.call(P,H)}catch(X){H=X,b(this.getMatch(I),H)}d(I,X=>{var k,D;return(k=X.beforeLoadPromise)==null||k.resolve(),(D=X.loadPromise)==null||D.resolve(),{...X,error:H,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[$,{id:H,routeId:O}]of s.entries()){const P=this.getMatch(H),K=(R=s[$-1])==null?void 0:R.id,I=this.looseRoutesById[O],W=I.options.pendingMs??this.options.defaultPendingMs,re=!!(f&&!this.isServer&&!g(H)&&(I.options.loader||I.options.beforeLoad||bv(I))&&typeof W=="number"&&W!==1/0&&(I.options.pendingComponent??((_=this.options)==null?void 0:_.defaultPendingComponent)));let X=!0;if(P.beforeLoadPromise||P.loaderPromise){re&&setTimeout(()=>{try{m()}catch{}},W),await P.beforeLoadPromise;const k=this.getMatch(H);k.status==="error"?X=!0:k.preload&&(k.status==="redirected"||k.status==="notFound")&&b(k,k.error)}if(X){try{d(H,be=>{const me=be.loadPromise;return{...be,loadPromise:Ki(()=>{me?.resolve()}),beforeLoadPromise:Ki()}});const k=new AbortController;let D;re&&(D=setTimeout(()=>{try{m()}catch{}},W));const{paramsError:z,searchError:Q}=this.getMatch(H);z&&N($,z,"PARSE_PARAMS"),Q&&N($,Q,"VALIDATE_SEARCH");const J=()=>K?this.getMatch(K).context:this.options.context??{};d(H,be=>({...be,isFetching:"beforeLoad",fetchCount:be.fetchCount+1,abortController:k,pendingTimeout:D,context:{...J(),...be.__routeContext}}));const{search:te,params:ae,context:ee,cause:ie}=this.getMatch(H),le=g(H),ce={search:te,abortController:k,params:ae,preload:le,context:ee,location:r,navigate:be=>this.navigate({...be,_fromLocation:r}),buildLocation:this.buildLocation,cause:le?"preload":ie,matches:s},fe=await((U=(C=I.options).beforeLoad)==null?void 0:U.call(C,ce))??{};(jn(fe)||an(fe))&&N($,fe,"BEFORE_LOAD"),d(H,be=>({...be,__beforeLoadContext:fe,context:{...J(),...be.__routeContext,...fe},abortController:k}))}catch(k){N($,k,"BEFORE_LOAD")}d(H,k=>{var D;return(D=k.beforeLoadPromise)==null||D.resolve(),{...k,beforeLoadPromise:void 0,isFetching:!1}})}}const V=s.slice(0,p),Z=[];V.forEach(({id:$,routeId:H},O)=>{Z.push((async()=>{let P=!1,K=!1;const I=this.getMatch($);if(I.loaderPromise){if(I.status==="success"&&!h&&!I.preload)return this.getMatch($);await I.loaderPromise;const W=this.getMatch($);W.error&&b(W,W.error)}else{const W=Z[O-1],re=this.looseRoutesById[H],X=()=>{const{params:le,loaderDeps:ce,abortController:fe,context:be,cause:me}=this.getMatch($),ge=g($);return{params:le,deps:ce,preload:!!ge,parentMatchPromise:W,abortController:fe,context:be,location:r,navigate:oe=>this.navigate({...oe,_fromLocation:r}),cause:ge?"preload":me,route:re}},k=Date.now()-this.getMatch($).updatedAt,D=g($),z=D?re.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:re.options.staleTime??this.options.defaultStaleTime??0,Q=re.options.shouldReload,J=typeof Q=="function"?Q(X()):Q;d($,le=>({...le,loaderPromise:Ki(),preload:!!D&&!this.state.matches.find(ce=>ce.id===$)}));const te=async()=>{var le,ce,fe,be,me,ge;const oe=this.getMatch($);if(!oe)return;const je={matches:s,match:oe,params:oe.params,loaderData:oe.loaderData},Re=await((ce=(le=re.options).head)==null?void 0:ce.call(le,je)),Ie=Re?.meta,Ze=Re?.links,wt=Re?.scripts,Tt=Re?.styles,Ge=await((be=(fe=re.options).scripts)==null?void 0:be.call(fe,je)),on=await((ge=(me=re.options).headers)==null?void 0:ge.call(me,je));return{meta:Ie,links:Ze,headScripts:wt,headers:on,scripts:Ge,styles:Tt}},ae=async()=>{var le,ce,fe,be,me;try{const ge=async()=>{const oe=this.getMatch($);oe.minPendingPromise&&await oe.minPendingPromise};try{this.loadRouteChunk(re),d($,Re=>({...Re,isFetching:"loader"}));const oe=await((ce=(le=re.options).loader)==null?void 0:ce.call(le,X()));b(this.getMatch($),oe),await re._lazyPromise,await ge(),await re._componentsPromise,d($,Re=>({...Re,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:oe}));const je=await te();d($,Re=>({...Re,...je}))}catch(oe){let je=oe;await ge(),b(this.getMatch($),oe);try{(be=(fe=re.options).onError)==null||be.call(fe,oe)}catch(Ie){je=Ie,b(this.getMatch($),Ie)}const Re=await te();d($,Ie=>({...Ie,error:je,status:"error",isFetching:!1,...Re}))}(me=this.serverSsr)==null||me.onMatchSettled({router:this,match:this.getMatch($)})}catch(ge){const oe=await te();d($,je=>({...je,loaderPromise:void 0,...oe})),b(this.getMatch($),ge)}},{status:ee,invalid:ie}=this.getMatch($);if(P=ee==="success"&&(ie||(J??k>z)),!(D&&re.options.preload===!1))if(P&&!h)K=!0,(async()=>{try{await ae();const{loaderPromise:le,loadPromise:ce}=this.getMatch($);le?.resolve(),ce?.resolve(),d($,fe=>({...fe,loaderPromise:void 0}))}catch(le){jn(le)&&await this.navigate(le.options)}})();else if(ee!=="success"||P&&h)await ae();else{const le=await te();d($,ce=>({...ce,...le}))}}if(!K){const{loaderPromise:W,loadPromise:re}=this.getMatch($);W?.resolve(),re?.resolve()}return d($,W=>({...W,isFetching:K?W.isFetching:!1,loaderPromise:K?W.loaderPromise:void 0,invalid:!1})),this.getMatch($)})())}),await Promise.all(Z),x()}catch(N){w(N)}})()}),await m()}catch(x){if(jn(x)||an(x))throw an(x)&&!c&&await m(),x}return s},this.invalidate=r=>{const s=c=>{var f;return((f=r?.filter)==null?void 0:f.call(r,c))??!0?{...c,invalid:!0,...r?.forcePending||c.status==="error"?{status:"pending",error:void 0}:{}}:c};return this.__store.setState(c=>{var f;return{...c,matches:c.matches.map(s),cachedMatches:c.cachedMatches.map(s),pendingMatches:(f=c.pendingMatches)==null?void 0:f.map(s)}}),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.resolveRedirect=r=>(r.options.href||(r.options.href=this.buildLocation(r.options).href,r.headers.set("Location",r.options.href)),r.headers.get("Location")||r.headers.set("Location",r.options.href),r),this.clearCache=r=>{const s=r?.filter;s!==void 0?this.__store.setState(c=>({...c,cachedMatches:c.cachedMatches.filter(f=>!s(f))})):this.__store.setState(c=>({...c,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=s=>{const c=this.looseRoutesById[s.routeId];if(!c.options.loader)return!0;const f=(s.preload?c.options.preloadGcTime??this.options.defaultPreloadGcTime:c.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(s.status!=="error"&&Date.now()-s.updatedAt<f)};this.clearCache({filter:r})},this.loadRouteChunk=r=>(r._lazyPromise===void 0&&(r.lazyFn?r._lazyPromise=r.lazyFn().then(s=>{const{id:c,...f}=s.options;Object.assign(r.options,f)}):r._lazyPromise=Promise.resolve()),r._componentsPromise===void 0&&(r._componentsPromise=r._lazyPromise.then(()=>Promise.all(z0.map(async s=>{const c=r.options[s];c?.preload&&await c.preload()})))),r._componentsPromise),this.preloadRoute=async r=>{const s=this.buildLocation(r);let c=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:r});const f=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(h=>h.id)),d=new Set([...f,...this.state.cachedMatches.map(h=>h.id)]);dv(()=>{c.forEach(h=>{d.has(h.id)||this.__store.setState(p=>({...p,cachedMatches:[...p.cachedMatches,h]}))})});try{return c=await this.loadMatches({matches:c,location:s,preload:!0,updateMatch:(h,p)=>{f.has(h)?c=c.map(v=>v.id===h?p(v):v):this.updateMatch(h,p)}}),c}catch(h){if(jn(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:s});an(h)||console.error(h);return}},this.matchRoute=(r,s)=>{const c={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},f=this.buildLocation(c);if(s?.pending&&this.state.status!=="pending")return!1;const h=(s?.pending===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,p=Ld(this.basepath,h.pathname,{...s,to:f.pathname});return!p||r.params&&!Ji(p,r.params,{partial:!0})?!1:p&&(s?.includeSearch??!0)?Ji(h.search,f.search,{partial:!0})?p:!1:p},this._handleNotFound=(r,s,{updateMatch:c=this.updateMatch}={})=>{var f;const d=this.routesById[s.routeId??""]??this.routeTree,h={};for(const v of r)h[v.routeId]=v;!d.options.notFoundComponent&&((f=this.options)!=null&&f.defaultNotFoundComponent)&&(d.options.notFoundComponent=this.options.defaultNotFoundComponent),ia(d.options.notFoundComponent);const p=h[d.id];ia(p,"Could not find match for route: "+d.id),c(p.id,v=>({...v,status:"notFound",error:s,isFetching:!1})),s.routerCode==="BEFORE_LOAD"&&d.parentRoute&&(s.routeId=d.parentRoute.id,this._handleNotFound(r,s,{updateMatch:c}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...l,caseSensitive:l.caseSensitive??!1,notFoundMode:l.notFoundMode??"fuzzy",stringifySearch:l.stringifySearch??RR,parseSearch:l.parseSearch??ER}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(l,r){var s;const{foundRoute:c,matchedRoutes:f,routeParams:d}=this.getMatchedRoutes(l.pathname,(s=r?.dest)==null?void 0:s.to);let h=!1;(c?c.path!=="/"&&d["**"]:tr(l.pathname))&&(this.options.notFoundRoute?f.push(this.options.notFoundRoute):h=!0);const p=(()=>{if(h){if(this.options.notFoundMode!=="root")for(let b=f.length-1;b>=0;b--){const x=f[b];if(x.children)return x.id}return pn}})(),v=f.map(b=>{var x;let w;const R=((x=b.options.params)==null?void 0:x.parse)??b.options.parseParams;if(R)try{const _=R(d);Object.assign(d,_)}catch(_){if(w=new _R(_.message,{cause:_}),r?.throwOnError)throw w;return w}}),m=[],g=b=>b?.id?b.context??this.options.context??{}:this.options.context??{};return f.forEach((b,x)=>{var w,R;const _=m[x-1],[C,U,N]=(()=>{const X=_?.search??l.search,k=_?._strictSearch??{};try{const D=zd(b.options.validateSearch,{...X})??{};return[{...X,...D},{...k,...D},void 0]}catch(D){let z=D;if(D instanceof yo||(z=new yo(D.message,{cause:D})),r?.throwOnError)throw z;return[X,{},z]}})(),V=((R=(w=b.options).loaderDeps)==null?void 0:R.call(w,{search:C}))??"",Z=V?JSON.stringify(V):"",{usedParams:$,interpolatedPath:H}=af({path:b.fullPath,params:d,decodeCharMap:this.pathParamsDecodeCharMap}),O=af({path:b.id,params:d,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+Z,P=this.getMatch(O),K=this.state.matches.find(X=>X.routeId===b.id),I=K?"stay":"enter";let W;if(P)W={...P,cause:I,params:K?nn(K.params,d):d,_strictParams:$,search:nn(K?K.search:P.search,C),_strictSearch:U};else{const X=b.options.loader||b.options.beforeLoad||b.lazyFn||bv(b)?"pending":"success";W={id:O,index:x,routeId:b.id,params:K?nn(K.params,d):d,_strictParams:$,pathname:Nn([this.basepath,H]),updatedAt:Date.now(),search:K?nn(K.search,C):C,_strictSearch:U,searchError:void 0,status:X,isFetching:!1,error:void 0,paramsError:v[x],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:K?nn(K.loaderDeps,V):V,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},loadPromise:Ki(),fullPath:b.fullPath}}r?.preload||(W.globalNotFound=p===b.id),W.searchError=N;const re=g(_);W.context={...re,...W.__routeContext,...W.__beforeLoadContext},m.push(W)}),m.forEach((b,x)=>{var w,R;const _=this.looseRoutesById[b.routeId];if(!this.getMatch(b.id)&&r?._buildLocation!==!0){const U=m[x-1],N=g(U),V={deps:b.loaderDeps,params:b.params,context:N,location:l,navigate:Z=>this.navigate({...Z,_fromLocation:l}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:m};b.__routeContext=((R=(w=_.options).context)==null?void 0:R.call(w,V))??{},b.context={...N,...b.__routeContext,...b.__beforeLoadContext}}}),m}}class yo extends Error{}class _R extends Error{}function CR(a){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:a,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function zd(a,l){if(a==null)return{};if("~standard"in a){const r=a["~standard"].validate(l);if(r instanceof Promise)throw new yo("Async validation not supported");if(r.issues)throw new yo(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in a?a.parse(l):typeof a=="function"?a(l):{}}const z0=["component","errorComponent","pendingComponent","notFoundComponent"];function bv(a){var l;for(const r of z0)if((l=a.options[r])!=null&&l.preload)return!0;return!1}function DR({routeTree:a,initRoute:l}){const r={},s={},c=p=>{p.forEach((v,m)=>{l?.(v,m);const g=r[v.id];if(ia(!g,`Duplicate routes found with id: ${String(v.id)}`),r[v.id]=v,!v.isRoot&&v.path){const x=tr(v.fullPath);(!s[x]||v.fullPath.endsWith("/"))&&(s[x]=v)}const b=v.children;b?.length&&c(b)})};c([a]);const f=[];Object.values(r).forEach((p,v)=>{var m;if(p.isRoot||!p.path)return;const g=Yd(p.fullPath),b=nr(g);for(;b.length>1&&((m=b[0])==null?void 0:m.value)==="/";)b.shift();const x=b.map(w=>w.value==="/"?.75:w.type==="param"&&w.prefixSegment&&w.suffixSegment?.55:w.type==="param"&&w.prefixSegment?.52:w.type==="param"&&w.suffixSegment?.51:w.type==="param"?.5:w.type==="wildcard"&&w.prefixSegment&&w.suffixSegment?.3:w.type==="wildcard"&&w.prefixSegment?.27:w.type==="wildcard"&&w.suffixSegment?.26:w.type==="wildcard"?.25:1);f.push({child:p,trimmed:g,parsed:b,index:v,scores:x})});const h=f.sort((p,v)=>{const m=Math.min(p.scores.length,v.scores.length);for(let g=0;g<m;g++)if(p.scores[g]!==v.scores[g])return v.scores[g]-p.scores[g];if(p.scores.length!==v.scores.length)return v.scores.length-p.scores.length;for(let g=0;g<m;g++)if(p.parsed[g].value!==v.parsed[g].value)return p.parsed[g].value>v.parsed[g].value?1:-1;return p.index-v.index}).map((p,v)=>(p.child.rank=v,p.child));return{routesById:r,routesByPath:s,flatRoutes:h}}function AR({pathname:a,routePathname:l,basepath:r,caseSensitive:s,routesByPath:c,routesById:f,flatRoutes:d}){let h={};const p=tr(a),v=x=>{var w;return Ld(r,p,{to:x.fullPath,caseSensitive:((w=x.options)==null?void 0:w.caseSensitive)??s,fuzzy:!0})};let m=l!==void 0?c[l]:void 0;m?h=v(m):m=d.find(x=>{const w=v(x);return w?(h=w,!0):!1});let g=m||f[pn];const b=[g];for(;g.parentRoute;)g=g.parentRoute,b.unshift(g);return{matchedRoutes:b,routeParams:h,foundRoute:m}}function OR({search:a,dest:l,destRoutes:r,_includeValidateSearch:s}){const c=r.reduce((h,p)=>{var v;const m=[];if("search"in p.options)(v=p.options.search)!=null&&v.middlewares&&m.push(...p.options.search.middlewares);else if(p.options.preSearchFilters||p.options.postSearchFilters){const g=({search:b,next:x})=>{let w=b;"preSearchFilters"in p.options&&p.options.preSearchFilters&&(w=p.options.preSearchFilters.reduce((_,C)=>C(_),b));const R=x(w);return"postSearchFilters"in p.options&&p.options.postSearchFilters?p.options.postSearchFilters.reduce((_,C)=>C(_),R):R};m.push(g)}if(s&&p.options.validateSearch){const g=({search:b,next:x})=>{const w=x(b);try{return{...w,...zd(p.options.validateSearch,w)??{}}}catch{return w}};m.push(g)}return h.concat(m)},[])??[],f=({search:h})=>l.search?l.search===!0?h:ai(l.search,h):{};c.push(f);const d=(h,p)=>{if(h>=c.length)return p;const v=c[h];return v({search:p,next:g=>d(h+1,g)})};return d(0,a)}const jR="Error preloading route! ☝️";class $0{constructor(l){if(this.init=r=>{var s,c;this.originalIndex=r.originalIndex;const f=this.options,d=!f?.path&&!f?.id;this.parentRoute=(c=(s=this.options).getParentRoute)==null?void 0:c.call(s),d?this._path=pn:this.parentRoute||ia(!1);let h=d?pn:f?.path;h&&h!=="/"&&(h=Yd(h));const p=f?.id||h;let v=d?pn:Nn([this.parentRoute.id===pn?"":this.parentRoute.id,p]);h===pn&&(h="/"),v!==pn&&(v=Nn(["/",v]));const m=v===pn?"/":Nn([this.parentRoute.fullPath,h]);this._path=h,this._id=v,this._fullPath=m,this._to=m,this._ssr=f?.ssr??r.defaultSsr??!0},this.clone=r=>{this._path=r._path,this._id=r._id,this._fullPath=r._fullPath,this._to=r._to,this._ssr=r._ssr,this.options.getParentRoute=r.options.getParentRoute,this.children=r.children},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.options=l||{},this.isRoot=!l?.getParentRoute,l?.id&&l?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class MR extends $0{constructor(l){super(l)}}const Kd=await ne("react");function Qd(a){const l=a.errorComponent??jo;return S.jsx(LR,{getResetKey:a.getResetKey,onCatch:a.onCatch,children:({error:r,reset:s})=>r?Kd.createElement(l,{error:r,reset:s}):a.children})}class LR extends Kd.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(l){return{resetKey:l.getResetKey()}}static getDerivedStateFromError(l){return{error:l}}reset(){this.setState({error:null})}componentDidUpdate(l,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(l,r){this.props.onCatch&&this.props.onCatch(l,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function jo({error:a}){const[l,r]=Kd.useState(!1);return S.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[S.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),S.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:l?"Hide Error":"Show Error"})]}),S.jsx("div",{style:{height:".25rem"}}),l?S.jsx("div",{children:S.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a.message?S.jsx("code",{children:a.message}):null})}):null]})}const $d=await ne("react");function NR({children:a,fallback:l=null}){return zR()?S.jsx($d.Fragment,{children:a}):S.jsx($d.Fragment,{children:l})}function zR(){return $d.useSyncExternalStore($R,()=>!0,()=>!1)}function $R(){return()=>{}}var sf={exports:{}},of={},cf={exports:{}},uf={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* use-sync-external-store-shim.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var Sv;function BR(){if(Sv)return uf;Sv=1;var a=Gd();function l(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var r=typeof Object.is=="function"?Object.is:l,s=a.useState,c=a.useEffect,f=a.useLayoutEffect,d=a.useDebugValue;function h(g,b){var x=b(),w=s({inst:{value:x,getSnapshot:b}}),R=w[0].inst,_=w[1];return f(function(){R.value=x,R.getSnapshot=b,p(R)&&_({inst:R})},[g,x,b]),c(function(){return p(R)&&_({inst:R}),g(function(){p(R)&&_({inst:R})})},[g]),d(x),x}function p(g){var b=g.getSnapshot;g=g.value;try{var x=b();return!r(g,x)}catch{return!0}}function v(g,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;return uf.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:m,uf}var Ev;function UR(){return Ev||(Ev=1,cf.exports=BR()),cf.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var Rv;function qR(){if(Rv)return of;Rv=1;var a=Gd(),l=UR();function r(v,m){return v===m&&(v!==0||1/v===1/m)||v!==v&&m!==m}var s=typeof Object.is=="function"?Object.is:r,c=l.useSyncExternalStore,f=a.useRef,d=a.useEffect,h=a.useMemo,p=a.useDebugValue;return of.useSyncExternalStoreWithSelector=function(v,m,g,b,x){var w=f(null);if(w.current===null){var R={hasValue:!1,value:null};w.current=R}else R=w.current;w=h(function(){function C($){if(!U){if(U=!0,N=$,$=b($),x!==void 0&&R.hasValue){var H=R.value;if(x(H,$))return V=H}return V=$}if(H=V,s(N,$))return H;var O=b($);return x!==void 0&&x(H,O)?(N=$,H):(N=$,V=O)}var U=!1,N,V,Z=g===void 0?null:g;return[function(){return C(m())},Z===null?void 0:function(){return C(Z())}]},[m,g,b,x]);var _=c(v,w[0],w[1]);return d(function(){R.hasValue=!0,R.value=_},[_]),p(_),_},of}var xv;function HR(){return xv||(xv=1,sf.exports=qR()),sf.exports}var PR=HR();function VR(a,l=r=>r){return PR.useSyncExternalStoreWithSelector(a.subscribe,()=>a.state,()=>a.state,l,kR)}function kR(a,l){if(Object.is(a,l))return!0;if(typeof a!="object"||a===null||typeof l!="object"||l===null)return!1;if(a instanceof Map&&l instanceof Map){if(a.size!==l.size)return!1;for(const[s,c]of a)if(!l.has(s)||!Object.is(c,l.get(s)))return!1;return!0}if(a instanceof Set&&l instanceof Set){if(a.size!==l.size)return!1;for(const s of a)if(!l.has(s))return!1;return!0}const r=Object.keys(a);if(r.length!==Object.keys(l).length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(l,r[s])||!Object.is(a[r[s]],l[r[s]]))return!1;return!0}const GR=await ne("react"),ff=GR.createContext(null);function B0(){return typeof document>"u"?ff:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ff,ff)}const XR=await ne("react");function sn(a){const l=XR.useContext(B0());return a?.warn,l}const{useRef:IR}=await ne("react");function xt(a){const l=sn({warn:a?.router===void 0}),r=a?.router||l,s=IR(void 0);return VR(r.__store,c=>{if(a?.select){if(a.structuralSharing??r.options.defaultStructuralSharing){const f=nn(s.current,a.select(c));return s.current=f,f}return a.select(c)}return c})}const U0=await ne("react"),Mo=U0.createContext(void 0),YR=U0.createContext(void 0),KR=await ne("react");function ln(a){const l=KR.useContext(a.from?YR:Mo);return xt({select:s=>{const c=s.matches.find(f=>a.from?a.from===f.routeId:f.id===l);if(ia(!((a.shouldThrow??!0)&&!c),`Could not find ${a.from?`an active match from "${a.from}"`:"a nearest match!"}`),c!==void 0)return a.select?a.select(c):c},structuralSharing:a.structuralSharing})}function Fd(a){return ln({from:a.from,strict:a.strict,structuralSharing:a.structuralSharing,select:l=>a.select?a.select(l.loaderData):l.loaderData})}function Zd(a){const{select:l,...r}=a;return ln({...r,select:s=>l?l(s.loaderDeps):s.loaderDeps})}function Jd(a){return ln({from:a.from,strict:a.strict,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,select:l=>a.select?a.select(l.params):l.params})}function Wd(a){return ln({from:a.from,strict:a.strict,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,select:l=>a.select?a.select(l.search):l.search})}const QR=await ne("react");function Lo(a){const{navigate:l,state:r}=sn(),s=ln({strict:!1,select:c=>c.index});return QR.useCallback(c=>{const f=c.from??a?.from??r.matches[s].fullPath;return l({...c,from:f})},[a?.from,l])}const Na=await ne("react"),fl=typeof window<"u"?Na.useLayoutEffect:Na.useEffect;function df(a){const l=Na.useRef({value:a,prev:null}),r=l.current.value;return a!==r&&(l.current={value:a,prev:r}),l.current.prev}function FR(a,l,r={},s={}){const c=Na.useRef(typeof IntersectionObserver=="function"),f=Na.useRef(null);return Na.useEffect(()=>{if(!(!a.current||!c.current||s.disabled))return f.current=new IntersectionObserver(([d])=>{l(d)},r),f.current.observe(a.current),()=>{var d;(d=f.current)==null||d.disconnect()}},[l,r,s.disabled,a]),f.current}function ZR(a){const l=Na.useRef(null);return Na.useImperativeHandle(a,()=>l.current,[]),l}const Mn=await ne("react"),{flushSync:JR}=await ne("react-dom");function WR(a,l){const r=sn(),[s,c]=Mn.useState(!1),f=Mn.useRef(!1),d=ZR(l),{activeProps:h=()=>({className:"active"}),inactiveProps:p=()=>({}),activeOptions:v,to:m,preload:g,preloadDelay:b,hashScrollIntoView:x,replace:w,startTransition:R,resetScroll:_,viewTransition:C,children:U,target:N,disabled:V,style:Z,className:$,onClick:H,onFocus:O,onMouseEnter:P,onMouseLeave:K,onTouchStart:I,ignoreBlocker:W,...re}=a,{params:X,search:k,hash:D,state:z,mask:Q,reloadDocument:J,unsafeRelative:te,...ae}=re,ee=Mn.useMemo(()=>{try{return new URL(`${m}`),"external"}catch{}return"internal"},[m]),ie=xt({select:Te=>Te.location.search,structuralSharing:!0}),le=ln({strict:!1,select:Te=>Te.fullPath}),ce=a.from??le;a={...a,from:ce};const fe=Mn.useMemo(()=>r.buildLocation(a),[r,a,ie]),be=Mn.useMemo(()=>a.reloadDocument?!1:g??r.options.defaultPreload,[r.options.defaultPreload,g,a.reloadDocument]),me=b??r.options.defaultPreloadDelay??0,ge=xt({select:Te=>{if(v?.exact){if(!rR(Te.location.pathname,fe.pathname,r.basepath))return!1}else{const Ve=po(Te.location.pathname,r.basepath).split("/");if(!po(fe.pathname,r.basepath).split("/").every((Un,Ye)=>Un===Ve[Ye]))return!1}return(v?.includeSearch??!0)&&!Ji(Te.location.search,fe.search,{partial:!v?.exact,ignoreUndefined:!v?.explicitUndefined})?!1:v?.includeHash?Te.location.hash===fe.hash:!0}}),oe=Mn.useCallback(()=>{r.preloadRoute(a).catch(Te=>{console.warn(Te),console.warn(jR)})},[a,r]),je=Mn.useCallback(Te=>{Te?.isIntersecting&&oe()},[oe]);if(FR(d,je,{rootMargin:"100px"},{disabled:!!V||be!=="viewport"}),fl(()=>{f.current||!V&&be==="render"&&(oe(),f.current=!0)},[V,oe,be]),ee==="external")return{...ae,ref:d,type:ee,href:m,...U&&{children:U},...N&&{target:N},...V&&{disabled:V},...Z&&{style:Z},...$&&{className:$},...H&&{onClick:H},...O&&{onFocus:O},...P&&{onMouseEnter:P},...K&&{onMouseLeave:K},...I&&{onTouchStart:I}};const Re=Te=>{if(!V&&!ex(Te)&&!Te.defaultPrevented&&(!N||N==="_self")&&Te.button===0){Te.preventDefault(),JR(()=>{c(!0)});const Ve=r.subscribe("onResolved",()=>{Ve(),c(!1)});return r.navigate({...a,replace:w,resetScroll:_,hashScrollIntoView:x,startTransition:R,viewTransition:C,ignoreBlocker:W})}},Ie=Te=>{V||be&&oe()},Ze=Ie,wt=Te=>{if(V)return;const Ve=Te.target||{};if(be){if(Ve.preloadTimeout)return;me?Ve.preloadTimeout=setTimeout(()=>{Ve.preloadTimeout=null,oe()},me):oe()}},Tt=Te=>{if(V)return;const Ve=Te.target||{};Ve.preloadTimeout&&(clearTimeout(Ve.preloadTimeout),Ve.preloadTimeout=null)},Ge=Te=>Ve=>{var ra;(ra=Ve.persist)==null||ra.call(Ve),Te.filter(Boolean).forEach(li=>{Ve.defaultPrevented||li(Ve)})},on=ge?ai(h,{})??{}:{},xn=ge?{}:ai(p,{}),jt=[$,on.className,xn.className].filter(Boolean).join(" "),It={...Z,...on.style,...xn.style};return{...ae,...on,...xn,href:V?void 0:fe.maskedLocation?r.history.createHref(fe.maskedLocation.href):r.history.createHref(fe.href),ref:d,onClick:Ge([H,Re]),onFocus:Ge([O,Ie]),onMouseEnter:Ge([P,wt]),onMouseLeave:Ge([K,Tt]),onTouchStart:Ge([I,Ze]),disabled:!!V,target:N,...Object.keys(It).length&&{style:It},...jt&&{className:jt},...V&&{role:"link","aria-disabled":!0},...ge&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}function q0(a){return Mn.forwardRef(function(r,s){return S.jsx(ri,{...r,_asChild:a,ref:s})})}const ri=Mn.forwardRef((a,l)=>{const{_asChild:r,...s}=a,{type:c,ref:f,...d}=WR(s,l),h=typeof s.children=="function"?s.children({isActive:d["data-status"]==="active"}):s.children;return typeof r>"u"&&delete d.disabled,Mn.createElement(r||"a",{...d,ref:f},h)});function ex(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}const H0=await ne("react");let tx=class extends $0{constructor(l){super(l),this.useMatch=r=>ln({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ln({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Wd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Jd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Zd({...r,from:this.id}),this.useLoaderData=r=>Fd({...r,from:this.id}),this.useNavigate=()=>Lo({from:this.fullPath}),this.Link=H0.forwardRef((r,s)=>S.jsx(ri,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function nx(a){return new tx(a)}function ax(){return a=>rx(a)}class ix extends MR{constructor(l){super(l),this.useMatch=r=>ln({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ln({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Wd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Jd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Zd({...r,from:this.id}),this.useLoaderData=r=>Fd({...r,from:this.id}),this.useNavigate=()=>Lo({from:this.fullPath}),this.Link=H0.forwardRef((r,s)=>S.jsx(ri,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function rx(a){return new ix(a)}function we(a){return typeof a=="object"?new wv(a,{silent:!0}).createRoute(a):new wv(a,{silent:!0}).createRoute}class wv{constructor(l,r){this.path=l,this.createRoute=s=>{this.silent;const c=nx(s);return c.isRoot=!1,c},this.silent=r?.silent}}class Tv{constructor(l){this.useMatch=r=>ln({select:r?.select,from:this.options.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ln({from:this.options.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Wd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useParams=r=>Jd({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>Zd({...r,from:this.options.id}),this.useLoaderData=r=>Fd({...r,from:this.options.id}),this.useNavigate=()=>{const r=sn();return Lo({from:r.routesById[this.options.id].fullPath})},this.options=l,this.$$typeof=Symbol.for("react.memo")}}function _v(a){return typeof a=="object"?new Tv(a):l=>new Tv({id:a,...l})}function lx(a){const l=xt({select:r=>`not-found-${r.location.pathname}-${r.status}`});return S.jsx(Qd,{getResetKey:()=>l,onCatch:(r,s)=>{var c;if(an(r))(c=a.onCatch)==null||c.call(a,r,s);else throw r},errorComponent:({error:r})=>{var s;if(an(r))return(s=a.fallback)==null?void 0:s.call(a,r);throw r},children:a.children})}function sx(){return S.jsx("p",{children:"Not Found"})}function Qi(a){return S.jsx(S.Fragment,{children:a.children})}function P0(a,l,r){return l.options.notFoundComponent?S.jsx(l.options.notFoundComponent,{data:r}):a.options.defaultNotFoundComponent?S.jsx(a.options.defaultNotFoundComponent,{data:r}):S.jsx(sx,{})}var hf,Cv;function ox(){if(Cv)return hf;Cv=1;const a={},l=a.hasOwnProperty,r=(O,P)=>{for(const K in O)l.call(O,K)&&P(K,O[K])},s=(O,P)=>(P&&r(P,(K,I)=>{O[K]=I}),O),c=(O,P)=>{const K=O.length;let I=-1;for(;++I<K;)P(O[I])},f=O=>"\\u"+("0000"+O).slice(-4),d=(O,P)=>{let K=O.toString(16);return P?K:K.toUpperCase()},h=a.toString,p=Array.isArray,v=O=>typeof Buffer=="function"&&Buffer.isBuffer(O),m=O=>h.call(O)=="[object Object]",g=O=>typeof O=="string"||h.call(O)=="[object String]",b=O=>typeof O=="number"||h.call(O)=="[object Number]",x=O=>typeof O=="bigint",w=O=>typeof O=="function",R=O=>h.call(O)=="[object Map]",_=O=>h.call(O)=="[object Set]",C={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},U=/[\\\b\f\n\r\t]/,N=/[0-9]/,V=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Z=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,$=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,H=(O,P)=>{const K=()=>{z=D,++P.indentLevel,D=P.indent.repeat(P.indentLevel)},I={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},W=P&&P.json;W&&(I.quotes="double",I.wrap=!0),P=s(I,P),P.quotes!="single"&&P.quotes!="double"&&P.quotes!="backtick"&&(P.quotes="single");const re=P.quotes=="double"?'"':P.quotes=="backtick"?"`":"'",X=P.compact,k=P.lowercaseHex;let D=P.indent.repeat(P.indentLevel),z="";const Q=P.__inline1__,J=P.__inline2__,te=X?"":`
|
|
43
|
+
`;let ae,ee=!0;const ie=P.numbers=="binary",le=P.numbers=="octal",ce=P.numbers=="decimal",fe=P.numbers=="hexadecimal";if(W&&O&&w(O.toJSON)&&(O=O.toJSON()),!g(O)){if(R(O))return O.size==0?"new Map()":(X||(P.__inline1__=!0,P.__inline2__=!1),"new Map("+H(Array.from(O),P)+")");if(_(O))return O.size==0?"new Set()":"new Set("+H(Array.from(O),P)+")";if(v(O))return O.length==0?"Buffer.from([])":"Buffer.from("+H(Array.from(O),P)+")";if(p(O))return ae=[],P.wrap=!0,Q&&(P.__inline1__=!1,P.__inline2__=!0),J||K(),c(O,me=>{ee=!1,J&&(P.__inline2__=!1),ae.push((X||J?"":D)+H(me,P))}),ee?"[]":J?"["+ae.join(", ")+"]":"["+te+ae.join(","+te)+te+(X?"":z)+"]";if(b(O)||x(O)){if(W)return JSON.stringify(Number(O));let me;if(ce)me=String(O);else if(fe){let ge=O.toString(16);k||(ge=ge.toUpperCase()),me="0x"+ge}else ie?me="0b"+O.toString(2):le&&(me="0o"+O.toString(8));return x(O)?me+"n":me}else return x(O)?W?JSON.stringify(Number(O)):O+"n":m(O)?(ae=[],P.wrap=!0,K(),r(O,(me,ge)=>{ee=!1,ae.push((X?"":D)+H(me,P)+":"+(X?"":" ")+H(ge,P))}),ee?"{}":"{"+te+ae.join(","+te)+te+(X?"":z)+"}"):W?JSON.stringify(O)||"null":String(O)}const be=P.escapeEverything?Z:$;return ae=O.replace(be,(me,ge,oe,je,Re,Ie)=>{if(ge){if(P.minimal)return ge;const wt=ge.charCodeAt(0),Tt=ge.charCodeAt(1);if(P.es6){const Ge=(wt-55296)*1024+Tt-56320+65536;return"\\u{"+d(Ge,k)+"}"}return f(d(wt,k))+f(d(Tt,k))}if(oe)return f(d(oe.charCodeAt(0),k));if(me=="\0"&&!W&&!N.test(Ie.charAt(Re+1)))return"\\0";if(je)return je==re||P.escapeEverything?"\\"+je:je;if(U.test(me))return C[me];if(P.minimal&&!V.test(me))return me;const Ze=d(me.charCodeAt(0),k);return W||Ze.length>2?f(Ze):"\\x"+("00"+Ze).slice(-2)}),re=="`"&&(ae=ae.replace(/\$\{/g,"\\${")),P.isScriptContext&&(ae=ae.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,W?"\\u003C!--":"\\x3C!--")),P.wrap&&(ae=re+ae+re),ae};return H.version="3.0.2",hf=H,hf}ox();function cx({children:a,log:l}){return typeof document<"u"?null:S.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[a,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
|
|
44
|
+
`)}})}function ux(){const a=sn(),r=(a.options.getScrollRestorationKey||Nd)(a.latestLocation),s=r!==Nd(a.latestLocation)?r:null;return!a.isScrollRestoring||!a.isServer?null:S.jsx(cx,{children:`(${N0.toString()})(${JSON.stringify(go)},${JSON.stringify(s)}, undefined, true)`,log:!1})}const Ln=await ne("react"),V0=Ln.memo(function({matchId:l}){var r,s;const c=sn(),f=xt({select:U=>{var N;return(N=U.matches.find(V=>V.id===l))==null?void 0:N.routeId}});ia(f);const d=c.routesById[f],h=d.options.pendingComponent??c.options.defaultPendingComponent,p=h?S.jsx(h,{}):null,v=d.options.errorComponent??c.options.defaultErrorComponent,m=d.options.onCatch??c.options.defaultOnCatch,g=d.isRoot?d.options.notFoundComponent??((r=c.options.notFoundRoute)==null?void 0:r.options.component):d.options.notFoundComponent,b=(!d.isRoot||d.options.wrapInSuspense)&&(d.options.wrapInSuspense??h??((s=d.options.errorComponent)==null?void 0:s.preload))?Ln.Suspense:Qi,x=v?Qd:Qi,w=g?lx:Qi,R=xt({select:U=>U.loadedAt}),_=xt({select:U=>{var N;const V=U.matches.findIndex(Z=>Z.id===l);return(N=U.matches[V-1])==null?void 0:N.routeId}}),C=d.isRoot?d.options.shellComponent??Qi:Qi;return S.jsxs(C,{children:[S.jsx(Mo.Provider,{value:l,children:S.jsx(b,{fallback:p,children:S.jsx(x,{getResetKey:()=>R,errorComponent:v||jo,onCatch:(U,N)=>{if(an(U))throw U;m?.(U,N)},children:S.jsx(w,{fallback:U=>{if(!g||U.routeId&&U.routeId!==f||!U.routeId&&!d.isRoot)throw U;return Ln.createElement(g,U)},children:S.jsx(dx,{matchId:l})})})})}),_===pn&&c.options.scrollRestoration?S.jsxs(S.Fragment,{children:[S.jsx(fx,{}),S.jsx(ux,{})]}):null]})});function fx(){const a=sn(),l=Ln.useRef(void 0);return S.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(l.current===void 0||l.current.href!==a.latestLocation.href)&&(a.emit({type:"onRendered",...ii(a.state)}),l.current=a.latestLocation)}},a.latestLocation.state.__TSR_key)}const dx=Ln.memo(function({matchId:l}){var r,s,c;const f=sn(),{match:d,key:h,routeId:p}=xt({select:b=>{const x=b.matches.findIndex(N=>N.id===l),w=b.matches[x],R=w.routeId,_=f.routesById[R].options.remountDeps??f.options.defaultRemountDeps,C=_?.({routeId:R,loaderDeps:w.loaderDeps,params:w._strictParams,search:w._strictSearch});return{key:C?JSON.stringify(C):void 0,routeId:R,match:jd(w,["id","status","error"])}},structuralSharing:!0}),v=f.routesById[p],m=Ln.useMemo(()=>{const b=v.options.component??f.options.defaultComponent;return b?S.jsx(b,{},h):S.jsx(eh,{})},[h,v.options.component,f.options.defaultComponent]),g=(v.options.errorComponent??f.options.defaultErrorComponent)||jo;if(d.status==="notFound")return ia(an(d.error)),P0(f,v,d.error);if(d.status==="redirected")throw ia(jn(d.error)),(r=f.getMatch(d.id))==null?void 0:r.loadPromise;if(d.status==="error"){if(f.isServer)return S.jsx(g,{error:d.error,reset:void 0,info:{componentStack:""}});throw d.error}if(d.status==="pending"){const b=v.options.pendingMinMs??f.options.defaultPendingMinMs;if(b&&!((s=f.getMatch(d.id))!=null&&s.minPendingPromise)&&!f.isServer){const x=Ki();Promise.resolve().then(()=>{f.updateMatch(d.id,w=>({...w,minPendingPromise:x}))}),setTimeout(()=>{x.resolve(),f.updateMatch(d.id,w=>({...w,minPendingPromise:void 0}))},b)}throw(c=f.getMatch(d.id))==null?void 0:c.loadPromise}return m}),eh=Ln.memo(function(){const l=sn(),r=Ln.useContext(Mo),s=xt({select:v=>{var m;return(m=v.matches.find(g=>g.id===r))==null?void 0:m.routeId}}),c=l.routesById[s],f=xt({select:v=>{const g=v.matches.find(b=>b.id===r);return ia(g),g.globalNotFound}}),d=xt({select:v=>{var m;const g=v.matches,b=g.findIndex(x=>x.id===r);return(m=g[b+1])==null?void 0:m.id}}),h=l.options.defaultPendingComponent?S.jsx(l.options.defaultPendingComponent,{}):null;if(l.isShell)return S.jsx(Ln.Suspense,{fallback:h,children:S.jsx(hx,{})});if(f)return P0(l,c,void 0);if(!d)return null;const p=S.jsx(V0,{matchId:d});return r===pn?S.jsx(Ln.Suspense,{fallback:h,children:p}):p});function hx(){throw new Error("ShellBoundaryError")}const Dv=await ne("react");function px(a){return typeof a?.message!="string"?!1:a.message.startsWith("Failed to fetch dynamically imported module")||a.message.startsWith("error loading dynamically imported module")||a.message.startsWith("Importing a module script failed")}function ze(a,l,r){let s,c,f,d;const h=()=>typeof document>"u"&&r?.()===!1?(c=()=>null,Promise.resolve()):(s||(s=a().then(v=>{s=void 0,c=v[l??"default"]}).catch(v=>{if(f=v,px(f)&&f instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const m=`tanstack_router_reload:${f.message}`;sessionStorage.getItem(m)||(sessionStorage.setItem(m,"1"),d=!0)}})),s),p=function(m){if(d)throw window.location.reload(),new Promise(()=>{});if(f)throw f;if(!c)throw h();return r?.()===!1?S.jsx(NR,{fallback:S.jsx(eh,{}),children:Dv.createElement(c,m)}):Dv.createElement(c,m)};return p.preload=h,p}const Qs=await ne("react");function mx(){const a=sn(),l=Qs.useRef({router:a,mounted:!1}),r=xt({select:({isLoading:g})=>g}),[s,c]=Qs.useState(!1),f=xt({select:g=>g.matches.some(b=>b.status==="pending"),structuralSharing:!0}),d=df(r),h=r||s||f,p=df(h),v=r||f,m=df(v);return a.isServer||(a.startTransition=g=>{c(!0),Qs.startTransition(()=>{g(),c(!1)})}),Qs.useEffect(()=>{const g=a.history.subscribe(a.load),b=a.buildLocation({to:a.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return tr(a.latestLocation.href)!==tr(b.href)&&a.commitLocation({...b,replace:!0}),()=>{g()}},[a,a.history]),fl(()=>{if(typeof window<"u"&&a.clientSsr||l.current.router===a&&l.current.mounted)return;l.current={router:a,mounted:!0},(async()=>{try{await a.load()}catch(b){console.error(b)}})()},[a]),fl(()=>{d&&!r&&a.emit({type:"onLoad",...ii(a.state)})},[d,a,r]),fl(()=>{m&&!v&&a.emit({type:"onBeforeRouteMount",...ii(a.state)})},[v,m,a]),fl(()=>{p&&!h&&(a.emit({type:"onResolved",...ii(a.state)}),a.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),yR(a))},[h,p,a]),null}const gx=await ne("react");function vx(){const a=sn(),l=a.options.defaultPendingComponent?S.jsx(a.options.defaultPendingComponent,{}):null,r=a.isServer||typeof document<"u"&&a.clientSsr?Qi:gx.Suspense,s=S.jsxs(r,{fallback:l,children:[S.jsx(mx,{}),S.jsx(yx,{})]});return a.options.InnerWrap?S.jsx(a.options.InnerWrap,{children:s}):s}function yx(){const a=xt({select:r=>{var s;return(s=r.matches[0])==null?void 0:s.id}}),l=xt({select:r=>r.loadedAt});return S.jsx(Mo.Provider,{value:a,children:S.jsx(Qd,{getResetKey:()=>l,errorComponent:jo,onCatch:r=>{r.message||r.toString()},children:a?S.jsx(V0,{matchId:a}):null})})}const bx=a=>new Sx(a);class Sx extends TR{constructor(l){super(l)}}typeof globalThis<"u"?(globalThis.createFileRoute=we,globalThis.createLazyFileRoute=_v):typeof window<"u"&&(window.createFileRoute=we,window.createFileRoute=_v);function Ex({router:a,children:l,...r}){Object.keys(r).length>0&&a.update({...a.options,...r,context:{...a.options.context,...r.context}});const s=B0(),c=S.jsx(s.Provider,{value:a,children:l});return a.options.Wrap?S.jsx(a.options.Wrap,{children:c}):c}function Rx({router:a,...l}){return S.jsx(Ex,{router:a,...l,children:S.jsx(vx,{})})}const Av=await ne("react");function xx(a,l){if(a===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in a)return a;if(typeof a=="function")return{shouldBlockFn:async()=>await a(),enableBeforeUnload:!0,withResolver:!1};const r=!!(a.condition??!0),s=a.blockerFn;return{shouldBlockFn:async()=>r&&s!==void 0?await s():r,enableBeforeUnload:r,withResolver:s===void 0}}function wx(a,l){const{shouldBlockFn:r,enableBeforeUnload:s=!0,disabled:c=!1,withResolver:f=!1}=xx(a),d=sn(),{history:h}=d,[p,v]=Av.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return Av.useEffect(()=>{const m=async g=>{function b(U){const N=d.parseLocation(void 0,U),V=d.getMatchedRoutes(N.pathname,void 0);if(V.foundRoute===void 0)throw new Error(`No route found for location ${U.href}`);return{routeId:V.foundRoute.id,fullPath:V.foundRoute.fullPath,pathname:N.pathname,params:V.routeParams,search:N.search}}const x=b(g.currentLocation),w=b(g.nextLocation),R=await r({action:g.action,current:x,next:w});if(!f)return R;if(!R)return!1;const C=await new Promise(U=>{v({status:"blocked",current:x,next:w,action:g.action,proceed:()=>U(!1),reset:()=>U(!0)})});return v({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),C};return c?void 0:h.block({blockerFn:m,enableBeforeUnload:s})},[r,s,c,f,h,d]),p}var pf,Ov;function Tx(){if(Ov)return pf;Ov=1;var a=function(){function f(d,h){for(var p=0;p<h.length;p++){var v=h[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(d,v.key,v)}}return function(d,h,p){return h&&f(d.prototype,h),p&&f(d,p),d}}();function l(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}var r=[[{color:"0, 0, 0",class:"ansi-black"},{color:"187, 0, 0",class:"ansi-red"},{color:"0, 187, 0",class:"ansi-green"},{color:"187, 187, 0",class:"ansi-yellow"},{color:"0, 0, 187",class:"ansi-blue"},{color:"187, 0, 187",class:"ansi-magenta"},{color:"0, 187, 187",class:"ansi-cyan"},{color:"255,255,255",class:"ansi-white"}],[{color:"85, 85, 85",class:"ansi-bright-black"},{color:"255, 85, 85",class:"ansi-bright-red"},{color:"0, 255, 0",class:"ansi-bright-green"},{color:"255, 255, 85",class:"ansi-bright-yellow"},{color:"85, 85, 255",class:"ansi-bright-blue"},{color:"255, 85, 255",class:"ansi-bright-magenta"},{color:"85, 255, 255",class:"ansi-bright-cyan"},{color:"255, 255, 255",class:"ansi-bright-white"}]],s=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&|%[A-Fa-f0-9]{2})+)/gm,c=function(){a(f,null,[{key:"escapeForHtml",value:function(h){return new f().escapeForHtml(h)}},{key:"linkify",value:function(h){return new f().linkify(h)}},{key:"ansiToHtml",value:function(h,p){return new f().ansiToHtml(h,p)}},{key:"ansiToJson",value:function(h,p){return new f().ansiToJson(h,p)}},{key:"ansiToText",value:function(h){return new f().ansiToText(h)}}]);function f(){l(this,f),this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}return a(f,[{key:"setupPalette",value:function(){this.PALETTE_COLORS=[];for(var h=0;h<2;++h)for(var p=0;p<8;++p)this.PALETTE_COLORS.push(r[h][p].color);for(var v=[0,95,135,175,215,255],m=function(C,U,N){return v[C]+", "+v[U]+", "+v[N]},g=0;g<6;++g)for(var b=0;b<6;++b)for(var x=0;x<6;++x)this.PALETTE_COLORS.push(m(g,b,x));for(var w=8,R=0;R<24;++R,w+=10)this.PALETTE_COLORS.push(m(w,w,w))}},{key:"escapeForHtml",value:function(h){return h.replace(/[&<>\"]/gm,function(p){return p=="&"?"&":p=='"'?""":p=="<"?"<":p==">"?">":""})}},{key:"linkify",value:function(h){return h.replace(s,function(p){return'<a href="'+p+'">'+p+"</a>"})}},{key:"ansiToHtml",value:function(h,p){return this.process(h,p,!0)}},{key:"ansiToJson",value:function(h,p){return p=p||{},p.json=!0,p.clearLine=!1,this.process(h,p,!0)}},{key:"ansiToText",value:function(h){return this.process(h,{},!1)}},{key:"process",value:function(h,p,v){var m=this,g=this,b=h.split(/\033\[/),x=b.shift();p==null&&(p={}),p.clearLine=/\r/.test(h);var w=b.map(function(_){return m.processChunk(_,p,v)});if(p&&p.json){var R=g.processChunkJson("");return R.content=x,R.clearLine=p.clearLine,w.unshift(R),p.remove_empty&&(w=w.filter(function(_){return!_.isEmpty()})),w}else w.unshift(x);return w.join("")}},{key:"processChunkJson",value:function(h,p,v){p=typeof p>"u"?{}:p;var m=p.use_classes=typeof p.use_classes<"u"&&p.use_classes,g=p.key=m?"class":"color",b={content:h,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:p.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:function(){return!b.content}},x=h.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!x)return b;b.content=x[4];var w=x[2].split(";");if(x[1]!==""||x[3]!=="m"||!v)return b;for(var R=this;w.length>0;){var _=w.shift(),C=parseInt(_);if(isNaN(C)||C===0)R.fg=R.bg=null,R.decorations=[];else if(C===1)R.decorations.push("bold");else if(C===2)R.decorations.push("dim");else if(C===3)R.decorations.push("italic");else if(C===4)R.decorations.push("underline");else if(C===5)R.decorations.push("blink");else if(C===7)R.decorations.push("reverse");else if(C===8)R.decorations.push("hidden");else if(C===9)R.decorations.push("strikethrough");else if(C===21)R.removeDecoration("bold");else if(C===22)R.removeDecoration("bold"),R.removeDecoration("dim");else if(C===23)R.removeDecoration("italic");else if(C===24)R.removeDecoration("underline");else if(C===25)R.removeDecoration("blink");else if(C===27)R.removeDecoration("reverse");else if(C===28)R.removeDecoration("hidden");else if(C===29)R.removeDecoration("strikethrough");else if(C===39)R.fg=null;else if(C===49)R.bg=null;else if(C>=30&&C<38)R.fg=r[0][C%10][g];else if(C>=90&&C<98)R.fg=r[1][C%10][g];else if(C>=40&&C<48)R.bg=r[0][C%10][g];else if(C>=100&&C<108)R.bg=r[1][C%10][g];else if(C===38||C===48){var U=C===38;if(w.length>=1){var N=w.shift();if(N==="5"&&w.length>=1){var V=parseInt(w.shift());if(V>=0&&V<=255)if(!m)this.PALETTE_COLORS||R.setupPalette(),U?R.fg=this.PALETTE_COLORS[V]:R.bg=this.PALETTE_COLORS[V];else{var Z=V>=16?"ansi-palette-"+V:r[V>7?1:0][V%8].class;U?R.fg=Z:R.bg=Z}}else if(N==="2"&&w.length>=3){var $=parseInt(w.shift()),H=parseInt(w.shift()),O=parseInt(w.shift());if($>=0&&$<=255&&H>=0&&H<=255&&O>=0&&O<=255){var P=$+", "+H+", "+O;m?U?(R.fg="ansi-truecolor",R.fg_truecolor=P):(R.bg="ansi-truecolor",R.bg_truecolor=P):U?R.fg=P:R.bg=P}}}}}return R.fg===null&&R.bg===null&&R.decorations.length===0||(b.fg=R.fg,b.bg=R.bg,b.fg_truecolor=R.fg_truecolor,b.bg_truecolor=R.bg_truecolor,b.decorations=R.decorations,b.decoration=R.decorations.slice(-1).pop()||null,b.was_processed=!0),b}},{key:"processChunk",value:function(h,p,v){var m=this;p=p||{};var g=this.processChunkJson(h,p,v),b=p.use_classes;if(g.decorations=g.decorations.filter(function(U){if(U==="reverse"){g.fg||(g.fg=r[0][7][b?"class":"color"]),g.bg||(g.bg=r[0][0][b?"class":"color"]);var N=g.fg;g.fg=g.bg,g.bg=N;var V=g.fg_truecolor;return g.fg_truecolor=g.bg_truecolor,g.bg_truecolor=V,g.isInverted=!0,!1}return!0}),p.json)return g;if(g.isEmpty())return"";if(!g.was_processed)return g.content;var x=[],w=[],R=[],_={},C=function(N){var V=[],Z=void 0;for(Z in N)N.hasOwnProperty(Z)&&V.push("data-"+Z+'="'+m.escapeForHtml(N[Z])+'"');return V.length>0?" "+V.join(" "):""};return g.isInverted&&(_["ansi-is-inverted"]="true"),g.fg&&(b?(x.push(g.fg+"-fg"),g.fg_truecolor!==null&&(_["ansi-truecolor-fg"]=g.fg_truecolor,g.fg_truecolor=null)):x.push("color:rgb("+g.fg+")")),g.bg&&(b?(x.push(g.bg+"-bg"),g.bg_truecolor!==null&&(_["ansi-truecolor-bg"]=g.bg_truecolor,g.bg_truecolor=null)):x.push("background-color:rgb("+g.bg+")")),g.decorations.forEach(function(U){if(b){w.push("ansi-"+U);return}U==="bold"?w.push("font-weight:bold"):U==="dim"?w.push("opacity:0.5"):U==="italic"?w.push("font-style:italic"):U==="hidden"?w.push("visibility:hidden"):U==="strikethrough"?R.push("line-through"):R.push(U)}),R.length&&w.push("text-decoration:"+R.join(" ")),b?'<span class="'+x.concat(w).join(" ")+'"'+C(_)+">"+g.content+"</span>":'<span style="'+x.concat(w).join(";")+'"'+C(_)+">"+g.content+"</span>"}},{key:"removeDecoration",value:function(h){var p=this.decorations.indexOf(h);p>=0&&this.decorations.splice(p,1)}}]),f}();return pf=c,pf}var _x=Tx();const Cx=Xd(_x);function Dx({text:a}){const l=a.split(`
|
|
45
|
+
`).map((r,s)=>{const c=Cx.ansiToJson(r,{use_classes:!1});return S.jsx("div",{children:c.map((f,d)=>{const{decorations:h}=f,p={};f.fg&&(p.color=`rgb(${f.fg})`),f.bg&&(p.backgroundColor=`rgb(${f.bg})`),h.includes("bold")&&(p.fontWeight="bold"),h.includes("italic")&&(p.fontStyle="italic"),h.includes("dim")&&(p.opacity=.5),h.includes("hidden")&&(p.visibility="hidden");const v=[];return h.includes("underline")&&v.push("underline"),h.includes("strikethrough")&&v.push("line-through"),h.includes("blink")&&v.push("blink"),v.length>0&&(p.textDecoration=v.join(" ")),S.jsx("span",{style:p,children:f.content},d)})},s)});return S.jsx(S.Fragment,{children:l})}var uo={exports:{}},Ax=uo.exports,jv;function Ox(){return jv||(jv=1,function(a){(function(l,r){a.exports?a.exports=r():l.log=r()})(Ax,function(){var l=function(){},r="undefined",s=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),c=["trace","debug","info","warn","error"],f={},d=null;function h(R,_){var C=R[_];if(typeof C.bind=="function")return C.bind(R);try{return Function.prototype.bind.call(C,R)}catch{return function(){return Function.prototype.apply.apply(C,[R,arguments])}}}function p(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function v(R){return R==="debug"&&(R="log"),typeof console===r?!1:R==="trace"&&s?p:console[R]!==void 0?h(console,R):console.log!==void 0?h(console,"log"):l}function m(){for(var R=this.getLevel(),_=0;_<c.length;_++){var C=c[_];this[C]=_<R?l:this.methodFactory(C,R,this.name)}if(this.log=this.debug,typeof console===r&&R<this.levels.SILENT)return"No console available for logging"}function g(R){return function(){typeof console!==r&&(m.call(this),this[R].apply(this,arguments))}}function b(R,_,C){return v(R)||g.apply(this,arguments)}function x(R,_){var C=this,U,N,V,Z="loglevel";typeof R=="string"?Z+=":"+R:typeof R=="symbol"&&(Z=void 0);function $(I){var W=(c[I]||"silent").toUpperCase();if(!(typeof window===r||!Z)){try{window.localStorage[Z]=W;return}catch{}try{window.document.cookie=encodeURIComponent(Z)+"="+W+";"}catch{}}}function H(){var I;if(!(typeof window===r||!Z)){try{I=window.localStorage[Z]}catch{}if(typeof I===r)try{var W=window.document.cookie,re=encodeURIComponent(Z),X=W.indexOf(re+"=");X!==-1&&(I=/^([^;]+)/.exec(W.slice(X+re.length+1))[1])}catch{}return C.levels[I]===void 0&&(I=void 0),I}}function O(){if(!(typeof window===r||!Z)){try{window.localStorage.removeItem(Z)}catch{}try{window.document.cookie=encodeURIComponent(Z)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function P(I){var W=I;if(typeof W=="string"&&C.levels[W.toUpperCase()]!==void 0&&(W=C.levels[W.toUpperCase()]),typeof W=="number"&&W>=0&&W<=C.levels.SILENT)return W;throw new TypeError("log.setLevel() called with invalid level: "+I)}C.name=R,C.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},C.methodFactory=_||b,C.getLevel=function(){return V??N??U},C.setLevel=function(I,W){return V=P(I),W!==!1&&$(V),m.call(C)},C.setDefaultLevel=function(I){N=P(I),H()||C.setLevel(I,!1)},C.resetLevel=function(){V=null,O(),m.call(C)},C.enableAll=function(I){C.setLevel(C.levels.TRACE,I)},C.disableAll=function(I){C.setLevel(C.levels.SILENT,I)},C.rebuild=function(){if(d!==C&&(U=P(d.getLevel())),m.call(C),d===C)for(var I in f)f[I].rebuild()},U=P(d?d.getLevel():"WARN");var K=H();K!=null&&(V=P(K)),m.call(C)}d=new x,d.getLogger=function(_){if(typeof _!="symbol"&&typeof _!="string"||_==="")throw new TypeError("You must supply a name when creating a logger.");var C=f[_];return C||(C=f[_]=new x(_,d.methodFactory)),C};var w=typeof window!==r?window.log:void 0;return d.noConflict=function(){return typeof window!==r&&window.log===d&&(window.log=w),d},d.getLoggers=function(){return f},d.default=d,d})}(uo)),uo.exports}var jx=Ox();const Mx=Xd(jx),k0=Mx;k0.enableAll();function bl(a){k0.error(a)}const{useBlockerDialogState:Fs}=await ne("@baseplate-dev/project-builder-lib/web"),{Button:mf,Dialog:Lx,DialogContent:Nx,DialogDescription:zx,DialogFooter:$x,DialogHeader:Bx,DialogTitle:Ux}=await ne("@baseplate-dev/ui-components"),{useCallback:Mv,useEffect:qx,useState:Hx}=await ne("react");function Px(){const a=Fs(w=>w.activeBlockers.length>0?w.activeBlockers[0]:null),l=Fs(w=>w.requestedBlockers),r=Fs(w=>w.clearRequestedBlockers),{proceed:s,reset:c,status:f}=wx({enableBeforeUnload:!1,shouldBlockFn:()=>Fs.getState().activeBlockers.length>0,withResolver:!0,disabled:!a}),[d,h]=Hx(!1),p=Mv(()=>{r(),c?.()},[c,r]),v=Mv(async w=>{h(!0);try{if(w&&!await w()){p();return}f==="blocked"&&s();for(const R of l)R.onContinue();r()}finally{h(!1)}},[f,s,l,r,p]),m=f==="blocked"||l.length>0;qx(()=>{m&&!a&&!d&&s?.()},[m,s,a,d]);const g=S.jsx(mf,{onClick:p,variant:"secondary",children:"Cancel"}),b=a?.buttonContinueWithoutSaveText&&S.jsx(mf,{onClick:()=>v(a.onContinueWithoutSave).catch(bl),disabled:d,variant:"secondary",children:a.buttonContinueWithoutSaveText??"Continue without saving"}),x=S.jsx(mf,{disabled:d,onClick:()=>{v(a?.onContinue).catch(w=>{bl(w)})},children:a?.buttonContinueText??"Continue"});return S.jsx(Lx,{open:m,onOpenChange:w=>{w||p()},children:S.jsx(Nx,{children:S.jsxs("div",{className:"space-y-4",children:[S.jsx(Bx,{children:S.jsx(Ux,{children:a?.title})}),S.jsx(zx,{children:a?.content}),S.jsx($x,{children:b?S.jsxs("div",{className:"flex w-full justify-between",children:[b,S.jsxs("div",{className:"space-x-2",children:[g,x]})]}):S.jsxs(S.Fragment,{children:[g,x]})})]})})})}const{Button:Zs}=await ne("@baseplate-dev/ui-components"),{useState:Vx}=await ne("react");function qj({className:a,defaultOpen:l,children:r,collapsedContents:s,onRemove:c}){const[f,d]=Vx(l);return S.jsx("div",{className:zn("",a),children:f?S.jsxs("div",{className:"border-gray-200 space-y-4 border",children:[S.jsxs("div",{className:"flex flex-row space-x-4",children:[S.jsx(Zs,{variant:"link",size:"none",onClick:()=>{d(!1)},children:"Close"}),S.jsx(Zs,{variant:"link",size:"none",onClick:c,children:"Remove"})]}),r]}):S.jsxs("div",{className:"flex flex-row items-center space-x-4",children:[S.jsx(Zs,{variant:"link",size:"none",onClick:()=>{d(!0)},children:"Edit"}),s,S.jsx(Zs,{variant:"link",size:"none",onClick:c,children:"Remove"})]})})}function G0(a){a?localStorage.setItem("projectId",a):localStorage.removeItem("projectId")}function kx(){const a=localStorage.getItem("projectId");if(a)return a;if(globalThis.location.search.includes("projectId=")){const r=new URLSearchParams(globalThis.location.search).get("projectId");if(r)return G0(r),r}return null}const vn=kd(a=>({projects:[],projectsLoaded:!1,setProjects:l=>{a(r=>({projects:l,projectsLoaded:!0,...l.some(s=>s.id===r.currentProjectId)?void 0:{currentProjectId:l.length===1?l[0].id:null}}))},currentProjectId:kx(),setCurrentProjectId:l=>{a(r=>({currentProjectId:r.projects.some(s=>s.id===l)?l:null}))},resetCurrentProjectId:()=>{a(l=>({currentProjectId:l.projects.length===1?l.projects[0].id:null}))}})),Gx={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{z:gf}=await ne("zod"),Xx=gf.object({VITE_PREVIEW_MODE:gf.enum(["true","false"]).nullish().transform(a=>a==="true"),VITE_ENABLE_TEMPLATE_EXTRACTOR:gf.enum(["true","false"]).nullish().transform(a=>a==="true")}),X0=Xx.parse(Gx),Sn=X0.VITE_PREVIEW_MODE,Hj=X0.VITE_ENABLE_TEMPLATE_EXTRACTOR;function Bn(a){const l={subscribe(r){let s=null,c=!1,f=!1,d=!1;function h(){if(s===null){d=!0;return}f||(f=!0,typeof s=="function"?s():s&&s.unsubscribe())}return s=a({next(p){c||r.next?.(p)},error(p){c||(c=!0,r.error?.(p),h())},complete(){c||(c=!0,r.complete?.(),h())}}),d&&h(),{unsubscribe:h}},pipe(...r){return r.reduce(Ix,l)}};return l}function Ix(a,l){return l(a)}function Yx(a){const l=new AbortController;return new Promise((s,c)=>{let f=!1;function d(){f||(f=!0,h.unsubscribe())}l.signal.addEventListener("abort",()=>{c(l.signal.reason)});const h=a.subscribe({next(p){f=!0,s(p),d()},error(p){c(p)},complete(){l.abort(),d()}})})}function Kx(a){return l=>{let r=0,s=null;const c=[];function f(){s||(s=l.subscribe({next(h){for(const p of c)p.next?.(h)},error(h){for(const p of c)p.error?.(h)},complete(){for(const h of c)h.complete?.()}}))}function d(){if(r===0&&s){const h=s;s=null,h.unsubscribe()}}return Bn(h=>(r++,c.push(h),f(),{unsubscribe(){r--,d();const p=c.findIndex(v=>v===h);p>-1&&c.splice(p,1)}}))}}function Qx(a){return l=>Bn(r=>l.subscribe({next(s){a.next?.(s),r.next(s)},error(s){a.error?.(s),r.error(s)},complete(){a.complete?.(),r.complete()}}))}function I0(a){let l=a;const r=[],s=d=>{l!==void 0&&d.next(l),r.push(d)},c=d=>{r.splice(r.indexOf(d),1)},f=Bn(d=>(s(d),()=>{c(d)}));return f.next=d=>{if(l!==d){l=d;for(const h of r)h.next(d)}},f.get=()=>l,f}function Y0(a){return Bn(l=>{function r(c=0,f=a.op){const d=a.links[c];if(!d)throw new Error("No more links to execute - did you forget to add an ending link?");return d({op:f,next(p){return r(c+1,p)}})}return r().subscribe(l)})}const K0=()=>{},Lv=a=>{Object.freeze&&Object.freeze(a)};function Q0(a,l,r){var s,c;const f=l.join(".");return(s=r)[c=f]??(s[c]=new Proxy(K0,{get(d,h){if(!(typeof h!="string"||h==="then"))return Q0(a,[...l,h],r)},apply(d,h,p){const v=l[l.length-1];let m={args:p,path:l};return v==="call"?m={args:p.length>=2?[p[1]]:[],path:l.slice(0,-1)}:v==="apply"&&(m={args:p.length>=2?p[1]:[],path:l.slice(0,-1)}),Lv(m.args),Lv(m.path),a(m)}})),r[f]}const Fx=a=>Q0(a,[],Object.create(null)),Zx=a=>new Proxy(K0,{get(l,r){if(r!=="then")return a(r)}});function Sl(a){return!!a&&!Array.isArray(a)&&typeof a=="object"}const Nv=a=>a();function zv(a=0){return new Promise(l=>setTimeout(l,a))}function Jx(a,l){if("error"in a){const s=l.deserialize(a.error);return{ok:!1,error:{...a,error:s}}}return{ok:!0,result:{...a.result,...(!a.result.type||a.result.type==="data")&&{type:"data",data:l.deserialize(a.result.data)}}}}class vf extends Error{constructor(){super("Unable to transform response from server")}}function F0(a,l){let r;try{r=Jx(a,l)}catch{throw new vf}if(!r.ok&&(!Sl(r.error.error)||typeof r.error.error.code!="number"))throw new vf;if(r.ok&&!Sl(r.result))throw new vf;return r}var $v,Bv;($v=Symbol).dispose??($v.dispose=Symbol());(Bv=Symbol).asyncDispose??(Bv.asyncDispose=Symbol());typeof window>"u"||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||globalThis.process?.env?.JEST_WORKER_ID||globalThis.process?.env?.VITEST_WORKER_ID;function Js(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}function Wx(a){return a instanceof At||a instanceof Error&&a.name==="TRPCClientError"}function ew(a){return Sl(a)&&Sl(a.error)&&typeof a.error.code=="number"&&typeof a.error.message=="string"}function tw(a,l){return typeof a=="string"?a:Sl(a)&&typeof a.message=="string"?a.message:l}class At extends Error{static from(l,r={}){const s=l;return Wx(s)?(r.meta&&(s.meta={...s.meta,...r.meta}),s):ew(s)?new At(s.error.message,{...r,result:s}):new At(tw(s,"Unknown error"),{...r,cause:s})}constructor(l,r){const s=r?.cause;super(l,{cause:s}),Js(this,"cause",void 0),Js(this,"shape",void 0),Js(this,"data",void 0),Js(this,"meta",void 0),this.meta=r?.meta,this.cause=s,this.shape=r?.result?.error,this.data=r?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,At.prototype)}}function yf(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}class nw{$request(l){return Y0({links:this.links,op:{...l,context:l.context??{},id:++this.requestId}}).pipe(Kx())}async requestAsPromise(l){try{const r=this.$request(l);return(await Yx(r)).result.data}catch(r){throw At.from(r)}}query(l,r,s){return this.requestAsPromise({type:"query",path:l,input:r,context:s?.context,signal:s?.signal})}mutation(l,r,s){return this.requestAsPromise({type:"mutation",path:l,input:r,context:s?.context,signal:s?.signal})}subscription(l,r,s){return this.$request({type:"subscription",path:l,input:r,context:s.context,signal:s.signal}).subscribe({next(f){switch(f.result.type){case"state":{s.onConnectionStateChange?.(f.result);break}case"started":{s.onStarted?.({context:f.context});break}case"stopped":{s.onStopped?.();break}case"data":case void 0:{s.onData?.(f.result.data);break}}},error(f){s.onError?.(f)},complete(){s.onComplete?.()}})}constructor(l){yf(this,"links",void 0),yf(this,"runtime",void 0),yf(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=l.links.map(r=>r(this.runtime))}}const aw=Symbol.for("trpc_untypedClient"),iw={query:"query",mutate:"mutation",subscribe:"subscription"},rw=a=>iw[a];function lw(a){const l=Fx(({path:r,args:s})=>{const c=[...r],f=rw(c.pop()),d=c.join(".");return a[f](d,...s)});return Zx(r=>r===aw?a:l[r])}function sw(a){const l=new nw(a);return lw(l)}const Uv=a=>typeof a=="function";function ow(a){if(a)return a;if(typeof window<"u"&&Uv(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Uv(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const qv=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function Hv(a){let l=null,r=null;const s=()=>{clearTimeout(r),r=null,l=null};function c(h){const p=[[]];let v=0;for(;;){const m=h[v];if(!m)break;const g=p[p.length-1];if(m.aborted){m.reject?.(new Error("Aborted")),v++;continue}if(a.validate(g.concat(m).map(x=>x.key))){g.push(m),v++;continue}if(g.length===0){m.reject?.(new Error("Input is too big for a single dispatch")),v++;continue}p.push([])}return p}function f(){const h=c(l);s();for(const p of h){if(!p.length)continue;const v={items:p};for(const g of p)g.batch=v;a.fetch(v.items.map(g=>g.key)).then(async g=>{await Promise.all(g.map(async(b,x)=>{const w=v.items[x];try{const R=await Promise.resolve(b);w.resolve?.(R)}catch(R){w.reject?.(R)}w.batch=null,w.reject=null,w.resolve=null}));for(const b of v.items)b.reject?.(new Error("Missing result")),b.batch=null}).catch(g=>{for(const b of v.items)b.reject?.(g),b.batch=null})}}function d(h){const p={aborted:!1,key:h,batch:null,resolve:qv,reject:qv},v=new Promise((m,g)=>{p.reject=g,p.resolve=m,l||(l=[]),l.push(p)});return r||(r=setTimeout(f)),v}return{load:d}}function cw(...a){const l=new AbortController,r=a.length;let s=0;const c=()=>{++s===r&&l.abort()};for(const f of a)f?.aborted?c():f?.addEventListener("abort",c,{once:!0});return l.signal}function Z0(a){const l=a;return l?"input"in l?l:{input:l,output:l}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}function uw(a){return{url:a.url.toString(),fetch:a.fetch,transformer:Z0(a.transformer),methodOverride:a.methodOverride}}function fw(a){const l={};for(let r=0;r<a.length;r++){const s=a[r];l[r]=s}return l}const dw={query:"GET",mutation:"POST",subscription:"PATCH"};function J0(a){return"input"in a?a.transformer.input.serialize(a.input):fw(a.inputs.map(l=>a.transformer.input.serialize(l)))}const W0=a=>{const l=a.url.split("?");let s=l[0].replace(/\/$/,"")+"/"+a.path;const c=[];if(l[1]&&c.push(l[1]),"inputs"in a&&c.push("batch=1"),a.type==="query"||a.type==="subscription"){const f=J0(a);f!==void 0&&a.methodOverride!=="POST"&&c.push(`input=${encodeURIComponent(JSON.stringify(f))}`)}return c.length&&(s+="?"+c.join("&")),s},hw=a=>{if(a.type==="query"&&a.methodOverride!=="POST")return;const l=J0(a);return l!==void 0?JSON.stringify(l):void 0},pw=a=>yw({...a,contentTypeHeader:"application/json",getUrl:W0,getBody:hw});class mw extends Error{constructor(){const l="AbortError";super(l),this.name=l,this.message=l}}const gw=a=>{if(a?.aborted)throw a.throwIfAborted?.(),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new mw};async function vw(a){gw(a.signal);const l=a.getUrl(a),r=a.getBody(a),{type:s}=a,c=await(async()=>{const d=await a.headers();return Symbol.iterator in d?Object.fromEntries(d):d})(),f={...a.contentTypeHeader?{"content-type":a.contentTypeHeader}:{},...a.trpcAcceptHeader?{"trpc-accept":a.trpcAcceptHeader}:void 0,...c};return ow(a.fetch)(l,{method:a.methodOverride??dw[s],signal:a.signal,body:r,headers:f})}async function yw(a){const l={},r=await vw(a);l.response=r;const s=await r.json();return l.responseJSON=s,{json:s,meta:l}}function bw(a){const l=uw(a),r=a.maxURLLength??1/0,s=a.maxItems??1/0;return()=>{const c=p=>({validate(v){if(r===1/0&&s===1/0)return!0;if(v.length>s)return!1;const m=v.map(x=>x.path).join(","),g=v.map(x=>x.input);return W0({...l,type:p,path:m,inputs:g,signal:null}).length<=r},async fetch(v){const m=v.map(_=>_.path).join(","),g=v.map(_=>_.input),b=cw(...v.map(_=>_.signal)),x=await pw({...l,path:m,inputs:g,type:p,headers(){return a.headers?typeof a.headers=="function"?a.headers({opList:v}):a.headers:{}},signal:b});return(Array.isArray(x.json)?x.json:v.map(()=>x.json)).map(_=>({meta:x.meta,json:_}))}}),f=Hv(c("query")),d=Hv(c("mutation")),h={query:f,mutation:d};return({op:p})=>Bn(v=>{/* istanbul ignore if -- @preserve */if(p.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const g=h[p.type].load(p);let b;return g.then(x=>{b=x;const w=F0(x.json,l.transformer.output);if(!w.ok){v.error(At.from(w.error,{meta:x.meta}));return}v.next({context:x.meta,result:w.result}),v.complete()}).catch(x=>{v.error(At.from(x,{meta:b?.meta}))}),()=>{}})}}function Sw(a){return typeof FormData>"u"?!1:a instanceof FormData}const bf={css:{query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},ansi:{regular:{query:["\x1B[30;46m","\x1B[97;46m"],mutation:["\x1B[30;45m","\x1B[97;45m"],subscription:["\x1B[30;42m","\x1B[97;42m"]},bold:{query:["\x1B[1;30;46m","\x1B[1;97;46m"],mutation:["\x1B[1;30;45m","\x1B[1;97;45m"],subscription:["\x1B[1;30;42m","\x1B[1;97;42m"]}}};function Ew(a){const{direction:l,type:r,withContext:s,path:c,id:f,input:d}=a,h=[],p=[];if(a.colorMode==="none")h.push(l==="up"?">>":"<<",r,`#${f}`,c);else if(a.colorMode==="ansi"){const[v,m]=bf.ansi.regular[r],[g,b]=bf.ansi.bold[r];h.push(l==="up"?v:m,l==="up"?">>":"<<",r,l==="up"?g:b,`#${f}`,c,"\x1B[0m")}else{const[v,m]=bf.css[r],g=`
|
|
46
|
+
background-color: #${l==="up"?v:m};
|
|
47
|
+
color: ${l==="up"?"black":"white"};
|
|
48
|
+
padding: 2px;
|
|
49
|
+
`;h.push("%c",l==="up"?">>":"<<",r,`#${f}`,`%c${c}%c`,"%O"),p.push(g,`${g}; font-weight: bold;`,`${g}; font-weight: normal;`)}return l==="up"?p.push(s?{input:d,context:a.context}:{input:d}):p.push({input:d,result:a.result,elapsedMs:a.elapsedMs,...s&&{context:a.context}}),{parts:h,args:p}}const Rw=({c:a=console,colorMode:l="css",withContext:r})=>s=>{const c=s.input,f=Sw(c)?Object.fromEntries(c):c,{parts:d,args:h}=Ew({...s,colorMode:l,input:f,withContext:r}),p=s.direction==="down"&&s.result&&(s.result instanceof Error||"error"in s.result.result&&s.result.result.error)?"error":"log";a[p].apply(null,[d.join(" ")].concat(h))};function xw(a={}){const{enabled:l=()=>!0}=a,r=a.colorMode??(typeof window>"u"?"ansi":"css"),s=a.withContext??r==="css",{logger:c=Rw({c:a.console,colorMode:r,withContext:s})}=a;return()=>({op:f,next:d})=>Bn(h=>{l({...f,direction:"up"})&&c({...f,direction:"up"});const p=Date.now();function v(m){const g=Date.now()-p;l({...f,direction:"down",result:m})&&c({...f,direction:"down",elapsedMs:g,result:m})}return d(f).pipe(Qx({next(m){v(m)},error(m){v(m)}})).subscribe(h)})}function Pv(a){return Array.isArray(a)?a:[a]}function ww(a){return l=>{const r=Pv(a.true).map(c=>c(l)),s=Pv(a.false).map(c=>c(l));return c=>Bn(f=>{const d=a.condition(c.op)?r:s;return Y0({op:c.op,links:d}).subscribe(f)})}}const Tw={enabled:!1,closeMs:0},_w={enabled:!1,pongTimeoutMs:1e3,intervalMs:5e3},Cw=a=>a===0?0:Math.min(1e3*2**a,3e4),eb=(a,...l)=>typeof a=="function"?a(...l):a;function Sf(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}class Oa extends Error{constructor(l){super(l.message,{cause:l.cause}),this.name="TRPCWebSocketClosedError",Object.setPrototypeOf(this,Oa.prototype)}}class Dw{reset(){this.timeout&&(clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs))}start(){clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs)}stop(){clearTimeout(this.timeout),this.timeout=void 0}constructor(l,r){Sf(this,"onTimeout",void 0),Sf(this,"timeoutMs",void 0),Sf(this,"timeout",void 0),this.onTimeout=l,this.timeoutMs=r}}function tb(){let a,l;return{promise:new Promise((s,c)=>{a=s,l=c}),resolve:a,reject:l}}async function Aw(a){const l=await eb(a.url);if(!a.connectionParams)return l;const s=`${l.includes("?")?"&":"?"}connectionParams=1`;return l+s}async function Ow(a){const l={method:"connectionParams",data:await eb(a)};return JSON.stringify(l)}function Vv(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}class jw{register(l,r){const{promise:s,resolve:c}=tb();return this.outgoingRequests.push({id:String(l.id),message:l,end:s,callbacks:{next:r.next,complete:()=>{r.complete(),c()},error:f=>{r.error(f),c()}}}),()=>{this.delete(l.id),r.complete(),c()}}delete(l){l!==null&&(this.outgoingRequests=this.outgoingRequests.filter(({id:r})=>r!==String(l)),delete this.pendingRequests[String(l)])}flush(){const l=this.outgoingRequests;this.outgoingRequests=[];for(const r of l)this.pendingRequests[r.id]=r;return l}getPendingRequests(){return Object.values(this.pendingRequests)}getPendingRequest(l){return l===null?null:this.pendingRequests[String(l)]}getOutgoingRequests(){return this.outgoingRequests}getRequests(){return[...this.getOutgoingRequests().map(l=>({state:"outgoing",message:l.message,end:l.end,callbacks:l.callbacks})),...this.getPendingRequests().map(l=>({state:"pending",message:l.message,end:l.end,callbacks:l.callbacks}))]}hasPendingRequests(){return this.getPendingRequests().length>0}hasOutgoingRequests(){return this.outgoingRequests.length>0}constructor(){Vv(this,"outgoingRequests",new Array),Vv(this,"pendingRequests",{})}}function ni(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}function Mw(a){const{promise:l,resolve:r,reject:s}=tb();return a.addEventListener("open",()=>{a.removeEventListener("error",s),r()}),a.addEventListener("error",s),l}function Lw(a,{intervalMs:l,pongTimeoutMs:r}){let s,c;function f(){s=setTimeout(()=>{a.send("PING"),c=setTimeout(()=>{a.close()},r)},l)}function d(){clearTimeout(s),f()}function h(){clearTimeout(c),d()}a.addEventListener("open",f),a.addEventListener("message",({data:p})=>{clearTimeout(s),f(),p==="PONG"&&h()}),a.addEventListener("close",()=>{clearTimeout(s),clearTimeout(c)})}class El{get ws(){return this.wsObservable.get()}set ws(l){this.wsObservable.next(l)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++El.connectCount;const l=Aw(this.urlOptions).then(r=>new this.WebSocketPonyfill(r));this.openPromise=l.then(async r=>{this.ws=r,r.addEventListener("message",function({data:s}){s==="PING"&&this.send("PONG")}),this.keepAliveOpts.enabled&&Lw(r,this.keepAliveOpts),r.addEventListener("close",()=>{this.ws===r&&(this.ws=null)}),await Mw(r),this.urlOptions.connectionParams&&r.send(await Ow(this.urlOptions.connectionParams))});try{await this.openPromise}finally{this.openPromise=null}}async close(){try{await this.openPromise}finally{this.ws?.close()}}constructor(l){if(ni(this,"id",++El.connectCount),ni(this,"WebSocketPonyfill",void 0),ni(this,"urlOptions",void 0),ni(this,"keepAliveOpts",void 0),ni(this,"wsObservable",I0(null)),ni(this,"openPromise",null),this.WebSocketPonyfill=l.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=l.urlOptions,this.keepAliveOpts=l.keepAlive}}ni(El,"connectCount",0);function Nw(a){return a.isOpen()?{id:a.id,state:"open",ws:a.ws}:a.isClosed()?{id:a.id,state:"closed",ws:a.ws}:a.ws?{id:a.id,state:"connecting",ws:a.ws}:null}function na(a,l,r){return l in a?Object.defineProperty(a,l,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[l]=r,a}class zw{async open(){this.allowReconnect=!0,this.connectionState.get().state!=="connecting"&&this.connectionState.next({type:"state",state:"connecting",error:null});try{await this.activeConnection.open()}catch(l){return this.reconnect(new Oa({message:"Initialization error",cause:l})),this.reconnecting}}async close(){this.allowReconnect=!1,this.inactivityTimeout.stop();const l=[];for(const r of this.requestManager.getRequests())r.message.method==="subscription"?r.callbacks.complete():r.state==="outgoing"?r.callbacks.error(At.from(new Oa({message:"Closed before connection was established"}))):l.push(r.end);await Promise.all(l).catch(()=>null),await this.activeConnection.close().catch(()=>null),this.connectionState.next({type:"state",state:"idle",error:null})}request({op:{id:l,type:r,path:s,input:c,signal:f},transformer:d,lastEventId:h}){return Bn(p=>{const v=this.batchSend({id:l,method:r,params:{input:d.input.serialize(c),path:s,lastEventId:h}},{...p,next(m){const g=F0(m,d.output);if(!g.ok){p.error(At.from(g.error));return}p.next({result:g.result})}});return()=>{v(),r==="subscription"&&this.activeConnection.isOpen()&&this.send({id:l,method:"subscription.stop"}),f?.removeEventListener("abort",v)}})}get connection(){return Nw(this.activeConnection)}reconnect(l){if(this.connectionState.next({type:"state",state:"connecting",error:At.from(l)}),this.reconnecting)return;const r=async s=>{try{await zv(this.reconnectRetryDelay(s)),this.allowReconnect&&(await this.activeConnection.close(),await this.activeConnection.open(),this.requestManager.hasPendingRequests()&&this.send(this.requestManager.getPendingRequests().map(({message:c})=>c))),this.reconnecting=null}catch{await r(s+1)}};this.reconnecting=r(0)}setupWebSocketListeners(l){const r=s=>{const c=this.requestManager.getPendingRequests();for(const{message:f,callbacks:d}of c)f.method!=="subscription"&&(d.error(At.from(s??new Oa({message:"WebSocket closed",cause:s}))),this.requestManager.delete(f.id))};l.addEventListener("open",()=>{Nv(async()=>{this.lazyMode&&this.inactivityTimeout.start(),this.callbacks.onOpen?.(),this.connectionState.next({type:"state",state:"pending",error:null})}).catch(s=>{l.close(3e3),r(s)})}),l.addEventListener("message",({data:s})=>{if(this.inactivityTimeout.reset(),typeof s!="string"||["PING","PONG"].includes(s))return;const c=JSON.parse(s);if("method"in c){this.handleIncomingRequest(c);return}this.handleResponseMessage(c)}),l.addEventListener("close",s=>{r(s),this.callbacks.onClose?.(s),this.lazyMode||this.reconnect(new Oa({message:"WebSocket closed",cause:s}))}),l.addEventListener("error",s=>{r(s),this.callbacks.onError?.(s),this.reconnect(new Oa({message:"WebSocket closed",cause:s}))})}handleResponseMessage(l){const r=this.requestManager.getPendingRequest(l.id);if(!r)return;r.callbacks.next(l);let s=!0;"result"in l&&r.message.method==="subscription"&&(l.result.type==="data"&&(r.message.params.lastEventId=l.result.id),l.result.type!=="stopped"&&(s=!1)),s&&(r.callbacks.complete(),this.requestManager.delete(l.id))}handleIncomingRequest(l){l.method==="reconnect"&&this.reconnect(new Oa({message:"Server requested reconnect"}))}send(l){if(!this.activeConnection.isOpen())throw new Error("Active connection is not open");const r=l instanceof Array?l:[l];this.activeConnection.ws.send(JSON.stringify(r.length===1?r[0]:r))}batchSend(l,r){return this.inactivityTimeout.reset(),Nv(async()=>{this.activeConnection.isOpen()||await this.open(),await zv(0),this.requestManager.hasOutgoingRequests()&&this.send(this.requestManager.flush().map(({message:s})=>s))}).catch(s=>{this.requestManager.delete(l.id),r.error(At.from(s))}),this.requestManager.register(l,r)}constructor(l){na(this,"connectionState",void 0),na(this,"allowReconnect",!1),na(this,"requestManager",new jw),na(this,"activeConnection",void 0),na(this,"reconnectRetryDelay",void 0),na(this,"inactivityTimeout",void 0),na(this,"callbacks",void 0),na(this,"lazyMode",void 0),na(this,"reconnecting",null),this.callbacks={onOpen:l.onOpen,onClose:l.onClose,onError:l.onError};const r={...Tw,...l.lazy};this.inactivityTimeout=new Dw(()=>{if(this.requestManager.hasOutgoingRequests()||this.requestManager.hasPendingRequests()){this.inactivityTimeout.reset();return}this.close().catch(()=>null)},r.closeMs),this.activeConnection=new El({WebSocketPonyfill:l.WebSocket,urlOptions:l,keepAlive:{..._w,...l.keepAlive}}),this.activeConnection.wsObservable.subscribe({next:s=>{s&&this.setupWebSocketListeners(s)}}),this.reconnectRetryDelay=l.retryDelayMs??Cw,this.lazyMode=r.enabled,this.connectionState=I0({type:"state",state:r.enabled?"idle":"connecting",error:null}),this.lazyMode||this.open().catch(()=>null)}}function $w(a){return new zw(a)}function Bw(a){const{client:l}=a,r=Z0(a.transformer);return()=>({op:s})=>Bn(c=>{const f=s.type==="subscription"?l.connectionState.subscribe({next(h){c.next({result:h,context:s.context})}}):null,d=l.request({op:s,transformer:r}).subscribe(c);return()=>{d.unsubscribe(),f?.unsubscribe()}})}class aa extends Error{constructor(l,r){super(l),this.title=r,this.name="UserVisibleError"}}class kv extends aa{constructor(l){super(`Cannot delete because of references: ${l.map(r=>r.ref.path.join(".")).join(", ")}`),this.issues=l}}class Pj extends aa{constructor(l="The item you are looking for could not be found"){super(l,"Not found")}}function Uw(a){return a.issues.map(r=>{const{path:s,message:c}=r;return`${s.join(".")}: ${c}`}).join("; ")}function qw(a){if(a instanceof At){const l=a;if(l.data?.isUserVisible&&l.message)return[l.message,l.data.descriptionText].filter(Boolean).join(`
|
|
50
|
+
`);if(l.message.includes("Failed to fetch"))return"Could not connect to the server. Please start the server and try again."}return a instanceof aa?a.message:"Check console logs for more details."}function ir(a,l="Sorry, something went wrong."){const r=qw(a);return`${l} ${r}`}function $t(a,l){return bl(a),ir(a,l)}function Hw(a){return typeof a=="string"?new TextEncoder().encode(a):a}async function nb(a){const l=Hw(a),r=await crypto.subtle.digest("SHA-256",l);return[...new Uint8Array(r)].map(c=>c.toString(16).padStart(2,"0")).join("")}class Pw{listenerMap=new Map;eventEmitterAbortController=new AbortController;on(l,r,s){const{signal:c}=s??{},f=this.listenerMap.get(l)??[];this.listenerMap.set(l,[...f,r]);const d=()=>{const h=(this.listenerMap.get(l)??[]).filter(p=>p!==r);h.length>0?this.listenerMap.set(l,h):this.listenerMap.delete(l)};return c?.addEventListener("abort",d,{once:!0}),d}async*onAsync(l,r){const s=[];let c,f=!1;const d=this.eventEmitterAbortController.signal;if(r.signal?.aborted||d.aborted)return;function h(){f=!0,c?.(void 0)}for(r.signal?.addEventListener("abort",h,{once:!0}),d.addEventListener("abort",h,{once:!0}),this.on(l,p=>{c?(c(p),c=void 0):s.push(p)},{signal:r.signal});!f;){const p=s.shift()??await new Promise(v=>{c=v});if(f)break;yield p}}emit(l,r){const s=this.listenerMap.get(l)??[];for(const c of s)c(r)}clearListeners(){this.listenerMap.clear(),this.eventEmitterAbortController.abort()}abortEventEmitter(){this.eventEmitterAbortController.abort()}}function Vw(){return new Pw}function Gv(a){return a.substring(0,1).toUpperCase()+a.substring(1)}function kw(a){return a instanceof At}function Xv({maxAttempts:a=5}){return()=>({op:l,next:r})=>Bn(s=>{let c=null,f=a,d=!1;function h(){c?.unsubscribe(),c=r(l).subscribe({error(p){p.message.includes("Failed to execute")&&f!==0?(f--,setTimeout(h,500)):s.error(p)},next(p){s.next(p)},complete(){d&&s.complete()}})}return h(),()=>{d=!0,c?.unsubscribe()}})}const th=Vw(),Gw=$w({url:`${globalThis.location.origin.replace(/^http/,"ws")}/trpc`,onOpen(){th.emit("open",void 0)}}),yt=sw({links:[ww({condition:a=>a.type==="subscription",true:[xw({enabled:a=>a.direction==="down"&&a.result instanceof Error}),Xv({}),Bw({client:Gw})],false:[Xv({maxAttempts:10}),bw({url:"/trpc"})]})]}),{toast:Xw}=await ne("@baseplate-dev/ui-components"),{useEffect:Ef,useRef:Ws,useState:Iw}=await ne("react"),ab=({className:a})=>{const[l,r]=Iw(""),s=Ws(!0),c=Ws(null),f=Ws(null),{currentProjectId:d}=vn();Ef(()=>{d&&(Sn||yt.sync.getCurrentSyncConsoleOutput.query({id:d}).then(v=>{r(m=>{const g=v.join(`
|
|
51
|
+
`);return m===g?m:m?`${g}
|
|
52
|
+
${m}`:g})}).catch(v=>{Xw.error(ir(v,"Error loading sync console output"))}))},[d]),Ef(()=>{if(!d)return;const v=yt.sync.onConsoleEmitted.subscribe({id:d},{onData:g=>{r(b=>b?`${b}
|
|
53
|
+
${g.message}`:g.message)}}),m=yt.sync.onSyncStarted.subscribe({id:d},{onData:()=>{r("")}});return()=>{v.unsubscribe(),m.unsubscribe()}},[d]),Ef(()=>{s.current&&f.current?.scrollIntoView({behavior:"smooth"})},[l]);const h=Ws(0),p=v=>{const m=c.current;h.current>v.currentTarget.scrollTop?s.current=!1:m&&m.scrollHeight-m.scrollTop-m.clientHeight<1&&(s.current=!0),h.current=v.currentTarget.scrollTop};return S.jsxs("code",{className:zn("border-gray-200 bg-slate-900 text-neutral-400 block h-72 w-full overflow-y-scroll border p-4 text-sm break-words whitespace-pre-wrap shadow-inner",a),ref:c,onScroll:p,children:[S.jsx(Dx,{text:l}),S.jsx("div",{ref:f})]})};ab.displayName="Console";const{Alert:Yw,Button:Kw,Dialog:Qw,DialogContent:Fw,DialogHeader:Zw,DialogTitle:Jw,FormItem:Ww,FormLabel:eT,FormMessage:tT}=await ne("@baseplate-dev/ui-components"),{useState:nT}=await ne("react");function bo({className:a,onChange:l,renderTable:r,renderForm:s,value:c,itemName:f,defaultValue:d={}}){const[h,p]=nT(),v=c??[],m=g=>{h?.idx===void 0?l([...v,g]):l(v.map((b,x)=>x===h.idx?g:b)),p(void 0)};return S.jsxs("div",{className:zn("space-y-2",a),children:[S.jsx(Kw,{size:"sm",onClick:()=>{p({data:d})},children:"Add Item"}),v.length>0?r({items:v,edit:g=>{p({idx:g,data:v[g]})},remove:g=>{l(v.filter((b,x)=>x!==g))}}):S.jsx(Yw,{variant:"default",children:"No items currently"}),S.jsx(Qw,{open:!!h,onOpenChange:g=>{g||p(void 0)},children:S.jsxs(Fw,{"aria-describedby":void 0,children:[S.jsx(Zw,{children:S.jsxs(Jw,{children:["Edit ",f??"Item"]})}),s({initialData:h?.data,onSubmit:m})]})})]})}bo.Labelled=function({label:l,className:r,error:s,...c}){return S.jsx("div",{className:zn("",r),children:S.jsxs(Ww,{className:r,children:[l&&S.jsx(eT,{children:l}),S.jsx(bo,{...c}),S.jsx(tT,{children:s})]})})};bo.LabelledController=function({control:l,name:r,...s}){const{field:c,fieldState:{error:f}}=LE({name:r,control:l});return S.jsx(bo.Labelled,{...s,error:f?.message,onChange:d=>{c.onChange(d)},value:c.value})};const{createContext:aT,Component:iT,createElement:Iv,useContext:Vj,useState:kj,useMemo:Gj,forwardRef:Xj}=await ne("react"),ib=aT(null),Rf={didCatch:!1,error:null};let rT=class extends iT{constructor(l){super(l),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Rf}static getDerivedStateFromError(l){return{didCatch:!0,error:l}}resetErrorBoundary(){const{error:l}=this.state;if(l!==null){for(var r,s,c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];(r=(s=this.props).onReset)===null||r===void 0||r.call(s,{args:f,reason:"imperative-api"}),this.setState(Rf)}}componentDidCatch(l,r){var s,c;(s=(c=this.props).onError)===null||s===void 0||s.call(c,l,r)}componentDidUpdate(l,r){const{didCatch:s}=this.state,{resetKeys:c}=this.props;if(s&&r.error!==null&&lT(l.resetKeys,c)){var f,d;(f=(d=this.props).onReset)===null||f===void 0||f.call(d,{next:c,prev:l.resetKeys,reason:"keys"}),this.setState(Rf)}}render(){const{children:l,fallbackRender:r,FallbackComponent:s,fallback:c}=this.props,{didCatch:f,error:d}=this.state;let h=l;if(f){const p={error:d,resetErrorBoundary:this.resetErrorBoundary};if(typeof r=="function")h=r(p);else if(s)h=Iv(s,p);else if(c!==void 0)h=c;else throw d}return Iv(ib.Provider,{value:{didCatch:f,error:d,resetErrorBoundary:this.resetErrorBoundary}},h)}};function lT(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((r,s)=>!Object.is(r,l[s]))}const{Button:sT,ErrorDisplay:oT}=await ne("@baseplate-dev/ui-components"),{useContext:cT}=await ne("react");function uT({resetButtonLabel:a}){const{resetErrorBoundary:l,error:r}=cT(ib)??{resetErrorBoundary:()=>{},error:void 0},s=r instanceof aa?r.title:void 0,c=!(r instanceof aa),f=ir(r,"");return S.jsx(oT,{header:s,error:f,actions:c&&S.jsx(sT,{onClick:l,children:a})})}function rb({children:a,resetButtonLabel:l,onReset:r}){return S.jsx(rT,{fallback:S.jsx(uT,{resetButtonLabel:l??"Reload Page"}),onError:s=>{bl(s)},onReset:()=>{r?r():globalThis.location.reload()},children:a})}const{Button:fT,ErrorDisplay:dT}=await ne("@baseplate-dev/ui-components");function hT(){return S.jsx(dT,{className:"flex-1",header:"Page not found",error:"Sorry, we were unable to find the page you were looking for.",actions:S.jsx(ri,{to:"/",from:"/",children:S.jsx(fT,{children:"Back to Home"})})})}const{useMemo:pT}=await ne("react"),lb=kd(a=>({dialogOptions:void 0,setDialogOptions:l=>{a({dialogOptions:l})}}));function mT(){const a=lb(l=>l.setDialogOptions);return pT(()=>({showRefIssues:l=>{a(l)},clearRefIssues:()=>{a(void 0)}}),[a])}const{useEffect:gT,useRef:vT}=await ne("react");function sb(a){const l=vT(void 0);return gT(()=>{l.current=a},[a]),l.current}const ob={};function yT(a,l){const r=ob[l.type.name];if(!r)return;const s=l.parentPath?.join("."),c=s?a.entities.find(f=>f.idPath.join(".")===s):void 0;return r.replace("{id}",l.id).replace("{key}",l.type.keyFromId(l.id)).replace("{parentId}",c?.id??"").replace("{parentKey}",c?.type.keyFromId(c.id)??"")}function Tl(a,l){ob[a.name]=l}const{useProjectDefinition:bT}=await ne("@baseplate-dev/project-builder-lib/web"),{Button:ST,Dialog:ET,DialogContent:RT,DialogDescription:xT,DialogFooter:wT,DialogHeader:TT,DialogTitle:_T,Table:CT,TableBody:DT,TableCell:xf,TableHead:wf,TableHeader:AT,TableRow:Yv}=await ne("@baseplate-dev/ui-components");function OT(){const{dialogOptions:a,setDialogOptions:l}=lb(),{definitionContainer:r}=bT(),{entities:s}=r,c=sb(a),{issues:f}=a??c??{};return S.jsx(ET,{open:!!a,onOpenChange:()=>{l(void 0)},children:S.jsxs(RT,{width:"lg",children:[S.jsx(TT,{children:S.jsx(_T,{children:"Unable to delete"})}),S.jsx(xT,{children:"There were other references that needed to be fixed before you could delete this item."}),S.jsxs(CT,{children:[S.jsx(AT,{children:S.jsxs(Yv,{children:[S.jsx(wf,{children:"Entity"}),S.jsx(wf,{children:"Path"}),S.jsx(wf,{children:"Referenced Entity"})]})}),S.jsx(DT,{children:f?.map(d=>{const h=s.find(b=>b.id===d.entityId),p=d.ref.path.join(".");let v;for(const b of s){const x=b.path.join(".");p.startsWith(x)&&(!v||v.path.length<x.length)&&(v=b)}const m=v?p.slice(Math.max(0,v.path.join(".").length+1)):p,g=v?yT(r,v):void 0;return S.jsxs(Yv,{children:[S.jsx(xf,{children:v?S.jsxs("div",{className:"text-style-prose",children:[S.jsx("div",{children:g?S.jsx(ri,{to:g,from:"/",onClick:()=>{l(void 0)},children:S.jsx("strong",{children:v.name})}):S.jsx("strong",{children:v.name})}),S.jsx("div",{className:"text-muted-foreground",children:v.type.name})]}):S.jsx("strong",{children:"Root"})}),S.jsx(xf,{children:m}),S.jsx(xf,{children:h?S.jsxs("div",{children:[S.jsx("div",{children:h.name}),S.jsx("div",{className:"text-muted-foreground",children:h.type.name})]}):""})]},p)})})]}),S.jsx(wT,{children:S.jsx(ST,{onClick:()=>{l(void 0)},children:"OK"})})]})})}const{useMemo:nh,useLayoutEffect:jT,useEffect:cb,useRef:rr,useCallback:So}=await ne("react");function MT(){for(var a=arguments.length,l=new Array(a),r=0;r<a;r++)l[r]=arguments[r];return nh(()=>s=>{l.forEach(c=>c(s))},l)}const No=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lr(a){const l=Object.prototype.toString.call(a);return l==="[object Window]"||l==="[object global]"}function ah(a){return"nodeType"in a}function Bt(a){var l,r;return a?lr(a)?a:ah(a)&&(l=(r=a.ownerDocument)==null?void 0:r.defaultView)!=null?l:window:window}function ih(a){const{Document:l}=Bt(a);return a instanceof l}function _l(a){return lr(a)?!1:a instanceof Bt(a).HTMLElement}function ub(a){return a instanceof Bt(a).SVGElement}function sr(a){return a?lr(a)?a.document:ah(a)?ih(a)?a:_l(a)||ub(a)?a.ownerDocument:document:document:document}const $n=No?jT:cb;function rh(a){const l=rr(a);return $n(()=>{l.current=a}),So(function(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return l.current==null?void 0:l.current(...s)},[])}function LT(){const a=rr(null),l=So((s,c)=>{a.current=setInterval(s,c)},[]),r=So(()=>{a.current!==null&&(clearInterval(a.current),a.current=null)},[]);return[l,r]}function Rl(a,l){l===void 0&&(l=[a]);const r=rr(a);return $n(()=>{r.current!==a&&(r.current=a)},l),r}function Cl(a,l){const r=rr();return nh(()=>{const s=a(r.current);return r.current=s,s},[...l])}function Eo(a){const l=rh(a),r=rr(null),s=So(c=>{c!==r.current&&l?.(c,r.current),r.current=c},[]);return[r,s]}function Bd(a){const l=rr();return cb(()=>{l.current=a},[a]),l.current}let Tf={};function Dl(a,l){return nh(()=>{if(l)return l;const r=Tf[a]==null?0:Tf[a]+1;return Tf[a]=r,a+"-"+r},[a,l])}function fb(a){return function(l){for(var r=arguments.length,s=new Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return s.reduce((f,d)=>{const h=Object.entries(d);for(const[p,v]of h){const m=f[p];m!=null&&(f[p]=m+a*v)}return f},{...l})}}const Wi=fb(1),Ro=fb(-1);function NT(a){return"clientX"in a&&"clientY"in a}function lh(a){if(!a)return!1;const{KeyboardEvent:l}=Bt(a.target);return l&&a instanceof l}function zT(a){if(!a)return!1;const{TouchEvent:l}=Bt(a.target);return l&&a instanceof l}function Ud(a){if(zT(a)){if(a.touches&&a.touches.length){const{clientX:l,clientY:r}=a.touches[0];return{x:l,y:r}}else if(a.changedTouches&&a.changedTouches.length){const{clientX:l,clientY:r}=a.changedTouches[0];return{x:l,y:r}}}return NT(a)?{x:a.clientX,y:a.clientY}:null}const xl=Object.freeze({Translate:{toString(a){if(!a)return;const{x:l,y:r}=a;return"translate3d("+(l?Math.round(l):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(a){if(!a)return;const{scaleX:l,scaleY:r}=a;return"scaleX("+l+") scaleY("+r+")"}},Transform:{toString(a){if(a)return[xl.Translate.toString(a),xl.Scale.toString(a)].join(" ")}},Transition:{toString(a){let{property:l,duration:r,easing:s}=a;return l+" "+r+"ms "+s}}}),Kv="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $T(a){return a.matches(Kv)?a:a.querySelector(Kv)}const sh=await ne("react"),{useState:BT,useCallback:UT}=sh,qT={display:"none"};function HT(a){let{id:l,value:r}=a;return sh.createElement("div",{id:l,style:qT},r)}function PT(a){let{id:l,announcement:r,ariaLiveType:s="assertive"}=a;const c={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return sh.createElement("div",{id:l,style:c,role:"status","aria-live":s,"aria-atomic":!0},r)}function VT(){const[a,l]=BT("");return{announce:UT(s=>{s!=null&&l(s)},[]),announcement:a}}const mn=await ne("react"),{createContext:Al,useContext:ar,useEffect:nt,useState:gn,useCallback:yn,useMemo:gt,useRef:vt,memo:kT,useReducer:GT,cloneElement:Yj,forwardRef:Kj}=mn,{createPortal:XT,unstable_batchedUpdates:eo}=await ne("react-dom"),db=Al(null);function IT(a){const l=ar(db);nt(()=>{if(!l)throw new Error("useDndMonitor must be used within a children of <DndContext>");return l(a)},[a,l])}function YT(){const[a]=gn(()=>new Set),l=yn(s=>(a.add(s),()=>a.delete(s)),[a]);return[yn(s=>{let{type:c,event:f}=s;a.forEach(d=>{var h;return(h=d[c])==null?void 0:h.call(d,f)})},[a]),l]}const KT={draggable:`
|
|
54
|
+
To pick up a draggable item, press the space bar.
|
|
55
|
+
While dragging, use the arrow keys to move the item.
|
|
56
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
57
|
+
`},QT={onDragStart(a){let{active:l}=a;return"Picked up draggable item "+l.id+"."},onDragOver(a){let{active:l,over:r}=a;return r?"Draggable item "+l.id+" was moved over droppable area "+r.id+".":"Draggable item "+l.id+" is no longer over a droppable area."},onDragEnd(a){let{active:l,over:r}=a;return r?"Draggable item "+l.id+" was dropped over droppable area "+r.id:"Draggable item "+l.id+" was dropped."},onDragCancel(a){let{active:l}=a;return"Dragging was cancelled. Draggable item "+l.id+" was dropped."}};function FT(a){let{announcements:l=QT,container:r,hiddenTextDescribedById:s,screenReaderInstructions:c=KT}=a;const{announce:f,announcement:d}=VT(),h=Dl("DndLiveRegion"),[p,v]=gn(!1);if(nt(()=>{v(!0)},[]),IT(gt(()=>({onDragStart(g){let{active:b}=g;f(l.onDragStart({active:b}))},onDragMove(g){let{active:b,over:x}=g;l.onDragMove&&f(l.onDragMove({active:b,over:x}))},onDragOver(g){let{active:b,over:x}=g;f(l.onDragOver({active:b,over:x}))},onDragEnd(g){let{active:b,over:x}=g;f(l.onDragEnd({active:b,over:x}))},onDragCancel(g){let{active:b,over:x}=g;f(l.onDragCancel({active:b,over:x}))}}),[f,l])),!p)return null;const m=mn.createElement(mn.Fragment,null,mn.createElement(HT,{id:s,value:c.draggable}),mn.createElement(PT,{id:h,announcement:d}));return r?XT(m,r):m}var lt;(function(a){a.DragStart="dragStart",a.DragMove="dragMove",a.DragEnd="dragEnd",a.DragCancel="dragCancel",a.DragOver="dragOver",a.RegisterDroppable="registerDroppable",a.SetDroppableDisabled="setDroppableDisabled",a.UnregisterDroppable="unregisterDroppable"})(lt||(lt={}));function xo(){}const bn=Object.freeze({x:0,y:0});function ZT(a,l){return Math.sqrt(Math.pow(a.x-l.x,2)+Math.pow(a.y-l.y,2))}function JT(a,l){let{data:{value:r}}=a,{data:{value:s}}=l;return r-s}function WT(a,l){let{data:{value:r}}=a,{data:{value:s}}=l;return s-r}function e_(a,l){if(!a||a.length===0)return null;const[r]=a;return r[l]}function Qv(a,l,r){return l===void 0&&(l=a.left),r===void 0&&(r=a.top),{x:l+a.width*.5,y:r+a.height*.5}}const t_=a=>{let{collisionRect:l,droppableRects:r,droppableContainers:s}=a;const c=Qv(l,l.left,l.top),f=[];for(const d of s){const{id:h}=d,p=r.get(h);if(p){const v=ZT(Qv(p),c);f.push({id:h,data:{droppableContainer:d,value:v}})}}return f.sort(JT)};function n_(a,l){const r=Math.max(l.top,a.top),s=Math.max(l.left,a.left),c=Math.min(l.left+l.width,a.left+a.width),f=Math.min(l.top+l.height,a.top+a.height),d=c-s,h=f-r;if(s<c&&r<f){const p=l.width*l.height,v=a.width*a.height,m=d*h,g=m/(p+v-m);return Number(g.toFixed(4))}return 0}const a_=a=>{let{collisionRect:l,droppableRects:r,droppableContainers:s}=a;const c=[];for(const f of s){const{id:d}=f,h=r.get(d);if(h){const p=n_(h,l);p>0&&c.push({id:d,data:{droppableContainer:f,value:p}})}}return c.sort(WT)};function i_(a,l,r){return{...a,scaleX:l&&r?l.width/r.width:1,scaleY:l&&r?l.height/r.height:1}}function hb(a,l){return a&&l?{x:a.left-l.left,y:a.top-l.top}:bn}function r_(a){return function(r){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return c.reduce((d,h)=>({...d,top:d.top+a*h.y,bottom:d.bottom+a*h.y,left:d.left+a*h.x,right:d.right+a*h.x}),{...r})}}const l_=r_(1);function s_(a){if(a.startsWith("matrix3d(")){const l=a.slice(9,-1).split(/, /);return{x:+l[12],y:+l[13],scaleX:+l[0],scaleY:+l[5]}}else if(a.startsWith("matrix(")){const l=a.slice(7,-1).split(/, /);return{x:+l[4],y:+l[5],scaleX:+l[0],scaleY:+l[3]}}return null}function o_(a,l,r){const s=s_(l);if(!s)return a;const{scaleX:c,scaleY:f,x:d,y:h}=s,p=a.left-d-(1-c)*parseFloat(r),v=a.top-h-(1-f)*parseFloat(r.slice(r.indexOf(" ")+1)),m=c?a.width/c:a.width,g=f?a.height/f:a.height;return{width:m,height:g,top:v,right:p+m,bottom:v+g,left:p}}const c_={ignoreTransform:!1};function or(a,l){l===void 0&&(l=c_);let r=a.getBoundingClientRect();if(l.ignoreTransform){const{transform:v,transformOrigin:m}=Bt(a).getComputedStyle(a);v&&(r=o_(r,v,m))}const{top:s,left:c,width:f,height:d,bottom:h,right:p}=r;return{top:s,left:c,width:f,height:d,bottom:h,right:p}}function Fv(a){return or(a,{ignoreTransform:!0})}function u_(a){const l=a.innerWidth,r=a.innerHeight;return{top:0,left:0,right:l,bottom:r,width:l,height:r}}function f_(a,l){return l===void 0&&(l=Bt(a).getComputedStyle(a)),l.position==="fixed"}function d_(a,l){l===void 0&&(l=Bt(a).getComputedStyle(a));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(c=>{const f=l[c];return typeof f=="string"?r.test(f):!1})}function oh(a,l){const r=[];function s(c){if(l!=null&&r.length>=l||!c)return r;if(ih(c)&&c.scrollingElement!=null&&!r.includes(c.scrollingElement))return r.push(c.scrollingElement),r;if(!_l(c)||ub(c)||r.includes(c))return r;const f=Bt(a).getComputedStyle(c);return c!==a&&d_(c,f)&&r.push(c),f_(c,f)?r:s(c.parentNode)}return a?s(a):r}function pb(a){const[l]=oh(a,1);return l??null}function _f(a){return!No||!a?null:lr(a)?a:ah(a)?ih(a)||a===sr(a).scrollingElement?window:_l(a)?a:null:null}function mb(a){return lr(a)?a.scrollX:a.scrollLeft}function gb(a){return lr(a)?a.scrollY:a.scrollTop}function qd(a){return{x:mb(a),y:gb(a)}}var ft;(function(a){a[a.Forward=1]="Forward",a[a.Backward=-1]="Backward"})(ft||(ft={}));function vb(a){return!No||!a?!1:a===document.scrollingElement}function yb(a){const l={x:0,y:0},r=vb(a)?{height:window.innerHeight,width:window.innerWidth}:{height:a.clientHeight,width:a.clientWidth},s={x:a.scrollWidth-r.width,y:a.scrollHeight-r.height},c=a.scrollTop<=l.y,f=a.scrollLeft<=l.x,d=a.scrollTop>=s.y,h=a.scrollLeft>=s.x;return{isTop:c,isLeft:f,isBottom:d,isRight:h,maxScroll:s,minScroll:l}}const h_={x:.2,y:.2};function p_(a,l,r,s,c){let{top:f,left:d,right:h,bottom:p}=r;s===void 0&&(s=10),c===void 0&&(c=h_);const{isTop:v,isBottom:m,isLeft:g,isRight:b}=yb(a),x={x:0,y:0},w={x:0,y:0},R={height:l.height*c.y,width:l.width*c.x};return!v&&f<=l.top+R.height?(x.y=ft.Backward,w.y=s*Math.abs((l.top+R.height-f)/R.height)):!m&&p>=l.bottom-R.height&&(x.y=ft.Forward,w.y=s*Math.abs((l.bottom-R.height-p)/R.height)),!b&&h>=l.right-R.width?(x.x=ft.Forward,w.x=s*Math.abs((l.right-R.width-h)/R.width)):!g&&d<=l.left+R.width&&(x.x=ft.Backward,w.x=s*Math.abs((l.left+R.width-d)/R.width)),{direction:x,speed:w}}function m_(a){if(a===document.scrollingElement){const{innerWidth:f,innerHeight:d}=window;return{top:0,left:0,right:f,bottom:d,width:f,height:d}}const{top:l,left:r,right:s,bottom:c}=a.getBoundingClientRect();return{top:l,left:r,right:s,bottom:c,width:a.clientWidth,height:a.clientHeight}}function bb(a){return a.reduce((l,r)=>Wi(l,qd(r)),bn)}function g_(a){return a.reduce((l,r)=>l+mb(r),0)}function v_(a){return a.reduce((l,r)=>l+gb(r),0)}function y_(a,l){if(l===void 0&&(l=or),!a)return;const{top:r,left:s,bottom:c,right:f}=l(a);pb(a)&&(c<=0||f<=0||r>=window.innerHeight||s>=window.innerWidth)&&a.scrollIntoView({block:"center",inline:"center"})}const b_=[["x",["left","right"],g_],["y",["top","bottom"],v_]];class ch{constructor(l,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=oh(r),c=bb(s);this.rect={...l},this.width=l.width,this.height=l.height;for(const[f,d,h]of b_)for(const p of d)Object.defineProperty(this,p,{get:()=>{const v=h(s),m=c[f]-v;return this.rect[p]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ml{constructor(l){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...r)})},this.target=l}add(l,r,s){var c;(c=this.target)==null||c.addEventListener(l,r,s),this.listeners.push([l,r,s])}}function S_(a){const{EventTarget:l}=Bt(a);return a instanceof l?a:sr(a)}function Cf(a,l){const r=Math.abs(a.x),s=Math.abs(a.y);return typeof l=="number"?Math.sqrt(r**2+s**2)>l:"x"in l&&"y"in l?r>l.x&&s>l.y:"x"in l?r>l.x:"y"in l?s>l.y:!1}var rn;(function(a){a.Click="click",a.DragStart="dragstart",a.Keydown="keydown",a.ContextMenu="contextmenu",a.Resize="resize",a.SelectionChange="selectionchange",a.VisibilityChange="visibilitychange"})(rn||(rn={}));function Zv(a){a.preventDefault()}function E_(a){a.stopPropagation()}var De;(function(a){a.Space="Space",a.Down="ArrowDown",a.Right="ArrowRight",a.Left="ArrowLeft",a.Up="ArrowUp",a.Esc="Escape",a.Enter="Enter",a.Tab="Tab"})(De||(De={}));const Sb={start:[De.Space,De.Enter],cancel:[De.Esc],end:[De.Space,De.Enter,De.Tab]},R_=(a,l)=>{let{currentCoordinates:r}=l;switch(a.code){case De.Right:return{...r,x:r.x+25};case De.Left:return{...r,x:r.x-25};case De.Down:return{...r,y:r.y+25};case De.Up:return{...r,y:r.y-25}}};class Eb{constructor(l){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=l;const{event:{target:r}}=l;this.props=l,this.listeners=new ml(sr(r)),this.windowListeners=new ml(Bt(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(rn.Resize,this.handleCancel),this.windowListeners.add(rn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(rn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:l,onStart:r}=this.props,s=l.node.current;s&&y_(s),r(bn)}handleKeyDown(l){if(lh(l)){const{active:r,context:s,options:c}=this.props,{keyboardCodes:f=Sb,coordinateGetter:d=R_,scrollBehavior:h="smooth"}=c,{code:p}=l;if(f.end.includes(p)){this.handleEnd(l);return}if(f.cancel.includes(p)){this.handleCancel(l);return}const{collisionRect:v}=s.current,m=v?{x:v.left,y:v.top}:bn;this.referenceCoordinates||(this.referenceCoordinates=m);const g=d(l,{active:r,context:s.current,currentCoordinates:m});if(g){const b=Ro(g,m),x={x:0,y:0},{scrollableAncestors:w}=s.current;for(const R of w){const _=l.code,{isTop:C,isRight:U,isLeft:N,isBottom:V,maxScroll:Z,minScroll:$}=yb(R),H=m_(R),O={x:Math.min(_===De.Right?H.right-H.width/2:H.right,Math.max(_===De.Right?H.left:H.left+H.width/2,g.x)),y:Math.min(_===De.Down?H.bottom-H.height/2:H.bottom,Math.max(_===De.Down?H.top:H.top+H.height/2,g.y))},P=_===De.Right&&!U||_===De.Left&&!N,K=_===De.Down&&!V||_===De.Up&&!C;if(P&&O.x!==g.x){const I=R.scrollLeft+b.x,W=_===De.Right&&I<=Z.x||_===De.Left&&I>=$.x;if(W&&!b.y){R.scrollTo({left:I,behavior:h});return}W?x.x=R.scrollLeft-I:x.x=_===De.Right?R.scrollLeft-Z.x:R.scrollLeft-$.x,x.x&&R.scrollBy({left:-x.x,behavior:h});break}else if(K&&O.y!==g.y){const I=R.scrollTop+b.y,W=_===De.Down&&I<=Z.y||_===De.Up&&I>=$.y;if(W&&!b.x){R.scrollTo({top:I,behavior:h});return}W?x.y=R.scrollTop-I:x.y=_===De.Down?R.scrollTop-Z.y:R.scrollTop-$.y,x.y&&R.scrollBy({top:-x.y,behavior:h});break}}this.handleMove(l,Wi(Ro(g,this.referenceCoordinates),x))}}}handleMove(l,r){const{onMove:s}=this.props;l.preventDefault(),s(r)}handleEnd(l){const{onEnd:r}=this.props;l.preventDefault(),this.detach(),r()}handleCancel(l){const{onCancel:r}=this.props;l.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Eb.activators=[{eventName:"onKeyDown",handler:(a,l,r)=>{let{keyboardCodes:s=Sb,onActivation:c}=l,{active:f}=r;const{code:d}=a.nativeEvent;if(s.start.includes(d)){const h=f.activatorNode.current;return h&&a.target!==h?!1:(a.preventDefault(),c?.({event:a.nativeEvent}),!0)}return!1}}];function Jv(a){return!!(a&&"distance"in a)}function Wv(a){return!!(a&&"delay"in a)}class uh{constructor(l,r,s){var c;s===void 0&&(s=S_(l.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=l,this.events=r;const{event:f}=l,{target:d}=f;this.props=l,this.events=r,this.document=sr(d),this.documentListeners=new ml(this.document),this.listeners=new ml(s),this.windowListeners=new ml(Bt(d)),this.initialCoordinates=(c=Ud(f))!=null?c:bn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:l,props:{options:{activationConstraint:r,bypassActivationConstraint:s}}}=this;if(this.listeners.add(l.move.name,this.handleMove,{passive:!1}),this.listeners.add(l.end.name,this.handleEnd),l.cancel&&this.listeners.add(l.cancel.name,this.handleCancel),this.windowListeners.add(rn.Resize,this.handleCancel),this.windowListeners.add(rn.DragStart,Zv),this.windowListeners.add(rn.VisibilityChange,this.handleCancel),this.windowListeners.add(rn.ContextMenu,Zv),this.documentListeners.add(rn.Keydown,this.handleKeydown),r){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Wv(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Jv(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(l,r){const{active:s,onPending:c}=this.props;c(s,l,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:l}=this,{onStart:r}=this.props;l&&(this.activated=!0,this.documentListeners.add(rn.Click,E_,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(rn.SelectionChange,this.removeTextSelection),r(l))}handleMove(l){var r;const{activated:s,initialCoordinates:c,props:f}=this,{onMove:d,options:{activationConstraint:h}}=f;if(!c)return;const p=(r=Ud(l))!=null?r:bn,v=Ro(c,p);if(!s&&h){if(Jv(h)){if(h.tolerance!=null&&Cf(v,h.tolerance))return this.handleCancel();if(Cf(v,h.distance))return this.handleStart()}if(Wv(h)&&Cf(v,h.tolerance))return this.handleCancel();this.handlePending(h,v);return}l.cancelable&&l.preventDefault(),d(p)}handleEnd(){const{onAbort:l,onEnd:r}=this.props;this.detach(),this.activated||l(this.props.active),r()}handleCancel(){const{onAbort:l,onCancel:r}=this.props;this.detach(),this.activated||l(this.props.active),r()}handleKeydown(l){l.code===De.Esc&&this.handleCancel()}removeTextSelection(){var l;(l=this.document.getSelection())==null||l.removeAllRanges()}}const x_={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Rb extends uh{constructor(l){const{event:r}=l,s=sr(r.target);super(l,x_,s)}}Rb.activators=[{eventName:"onPointerDown",handler:(a,l)=>{let{nativeEvent:r}=a,{onActivation:s}=l;return!r.isPrimary||r.button!==0?!1:(s?.({event:r}),!0)}}];const w_={move:{name:"mousemove"},end:{name:"mouseup"}};var Hd;(function(a){a[a.RightClick=2]="RightClick"})(Hd||(Hd={}));class T_ extends uh{constructor(l){super(l,w_,sr(l.event.target))}}T_.activators=[{eventName:"onMouseDown",handler:(a,l)=>{let{nativeEvent:r}=a,{onActivation:s}=l;return r.button===Hd.RightClick?!1:(s?.({event:r}),!0)}}];const Df={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class __ extends uh{constructor(l){super(l,Df)}static setup(){return window.addEventListener(Df.move.name,l,{capture:!1,passive:!1}),function(){window.removeEventListener(Df.move.name,l)};function l(){}}}__.activators=[{eventName:"onTouchStart",handler:(a,l)=>{let{nativeEvent:r}=a,{onActivation:s}=l;const{touches:c}=r;return c.length>1?!1:(s?.({event:r}),!0)}}];var gl;(function(a){a[a.Pointer=0]="Pointer",a[a.DraggableRect=1]="DraggableRect"})(gl||(gl={}));var wo;(function(a){a[a.TreeOrder=0]="TreeOrder",a[a.ReversedTreeOrder=1]="ReversedTreeOrder"})(wo||(wo={}));function C_(a){let{acceleration:l,activator:r=gl.Pointer,canScroll:s,draggingRect:c,enabled:f,interval:d=5,order:h=wo.TreeOrder,pointerCoordinates:p,scrollableAncestors:v,scrollableAncestorRects:m,delta:g,threshold:b}=a;const x=A_({delta:g,disabled:!f}),[w,R]=LT(),_=vt({x:0,y:0}),C=vt({x:0,y:0}),U=gt(()=>{switch(r){case gl.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case gl.DraggableRect:return c}},[r,c,p]),N=vt(null),V=yn(()=>{const $=N.current;if(!$)return;const H=_.current.x*C.current.x,O=_.current.y*C.current.y;$.scrollBy(H,O)},[]),Z=gt(()=>h===wo.TreeOrder?[...v].reverse():v,[h,v]);nt(()=>{if(!f||!v.length||!U){R();return}for(const $ of Z){if(s?.($)===!1)continue;const H=v.indexOf($),O=m[H];if(!O)continue;const{direction:P,speed:K}=p_($,O,U,l,b);for(const I of["x","y"])x[I][P[I]]||(K[I]=0,P[I]=0);if(K.x>0||K.y>0){R(),N.current=$,w(V,d),_.current=K,C.current=P;return}}_.current={x:0,y:0},C.current={x:0,y:0},R()},[l,V,s,R,f,d,JSON.stringify(U),JSON.stringify(x),w,v,Z,m,JSON.stringify(b)])}const D_={x:{[ft.Backward]:!1,[ft.Forward]:!1},y:{[ft.Backward]:!1,[ft.Forward]:!1}};function A_(a){let{delta:l,disabled:r}=a;const s=Bd(l);return Cl(c=>{if(r||!s||!c)return D_;const f={x:Math.sign(l.x-s.x),y:Math.sign(l.y-s.y)};return{x:{[ft.Backward]:c.x[ft.Backward]||f.x===-1,[ft.Forward]:c.x[ft.Forward]||f.x===1},y:{[ft.Backward]:c.y[ft.Backward]||f.y===-1,[ft.Forward]:c.y[ft.Forward]||f.y===1}}},[r,l,s])}function O_(a,l){const r=l!=null?a.get(l):void 0,s=r?r.node.current:null;return Cl(c=>{var f;return l==null?null:(f=s??c)!=null?f:null},[s,l])}function j_(a,l){return gt(()=>a.reduce((r,s)=>{const{sensor:c}=s,f=c.activators.map(d=>({eventName:d.eventName,handler:l(d.handler,s)}));return[...r,...f]},[]),[a,l])}var wl;(function(a){a[a.Always=0]="Always",a[a.BeforeDragging=1]="BeforeDragging",a[a.WhileDragging=2]="WhileDragging"})(wl||(wl={}));var Pd;(function(a){a.Optimized="optimized"})(Pd||(Pd={}));const ey=new Map;function M_(a,l){let{dragging:r,dependencies:s,config:c}=l;const[f,d]=gn(null),{frequency:h,measure:p,strategy:v}=c,m=vt(a),g=_(),b=Rl(g),x=yn(function(C){C===void 0&&(C=[]),!b.current&&d(U=>U===null?C:U.concat(C.filter(N=>!U.includes(N))))},[b]),w=vt(null),R=Cl(C=>{if(g&&!r)return ey;if(!C||C===ey||m.current!==a||f!=null){const U=new Map;for(let N of a){if(!N)continue;if(f&&f.length>0&&!f.includes(N.id)&&N.rect.current){U.set(N.id,N.rect.current);continue}const V=N.node.current,Z=V?new ch(p(V),V):null;N.rect.current=Z,Z&&U.set(N.id,Z)}return U}return C},[a,f,r,g,p]);return nt(()=>{m.current=a},[a]),nt(()=>{g||x()},[r,g]),nt(()=>{f&&f.length>0&&d(null)},[JSON.stringify(f)]),nt(()=>{g||typeof h!="number"||w.current!==null||(w.current=setTimeout(()=>{x(),w.current=null},h))},[h,g,x,...s]),{droppableRects:R,measureDroppableContainers:x,measuringScheduled:f!=null};function _(){switch(v){case wl.Always:return!1;case wl.BeforeDragging:return r;default:return!r}}}function xb(a,l){return Cl(r=>a?r||(typeof l=="function"?l(a):a):null,[l,a])}function L_(a,l){return xb(a,l)}function N_(a){let{callback:l,disabled:r}=a;const s=rh(l),c=gt(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:f}=window;return new f(s)},[s,r]);return nt(()=>()=>c?.disconnect(),[c]),c}function zo(a){let{callback:l,disabled:r}=a;const s=rh(l),c=gt(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:f}=window;return new f(s)},[r]);return nt(()=>()=>c?.disconnect(),[c]),c}function z_(a){return new ch(or(a),a)}function ty(a,l,r){l===void 0&&(l=z_);const[s,c]=gn(null);function f(){c(p=>{if(!a)return null;if(a.isConnected===!1){var v;return(v=p??r)!=null?v:null}const m=l(a);return JSON.stringify(p)===JSON.stringify(m)?p:m})}const d=N_({callback(p){if(a)for(const v of p){const{type:m,target:g}=v;if(m==="childList"&&g instanceof HTMLElement&&g.contains(a)){f();break}}}}),h=zo({callback:f});return $n(()=>{f(),a?(h?.observe(a),d?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),d?.disconnect())},[a]),s}function $_(a){const l=xb(a);return hb(a,l)}const ny=[];function B_(a){const l=vt(a),r=Cl(s=>a?s&&s!==ny&&a&&l.current&&a.parentNode===l.current.parentNode?s:oh(a):ny,[a]);return nt(()=>{l.current=a},[a]),r}function U_(a){const[l,r]=gn(null),s=vt(a),c=yn(f=>{const d=_f(f.target);d&&r(h=>h?(h.set(d,qd(d)),new Map(h)):null)},[]);return nt(()=>{const f=s.current;if(a!==f){d(f);const h=a.map(p=>{const v=_f(p);return v?(v.addEventListener("scroll",c,{passive:!0}),[v,qd(v)]):null}).filter(p=>p!=null);r(h.length?new Map(h):null),s.current=a}return()=>{d(a),d(f)};function d(h){h.forEach(p=>{const v=_f(p);v?.removeEventListener("scroll",c)})}},[c,a]),gt(()=>a.length?l?Array.from(l.values()).reduce((f,d)=>Wi(f,d),bn):bb(a):bn,[a,l])}function ay(a,l){l===void 0&&(l=[]);const r=vt(null);return nt(()=>{r.current=null},l),nt(()=>{const s=a!==bn;s&&!r.current&&(r.current=a),!s&&r.current&&(r.current=null)},[a]),r.current?Ro(a,r.current):bn}function q_(a){nt(()=>{if(!No)return;const l=a.map(r=>{let{sensor:s}=r;return s.setup==null?void 0:s.setup()});return()=>{for(const r of l)r?.()}},a.map(l=>{let{sensor:r}=l;return r}))}function H_(a,l){return gt(()=>a.reduce((r,s)=>{let{eventName:c,handler:f}=s;return r[c]=d=>{f(d,l)},r},{}),[a,l])}function wb(a){return gt(()=>a?u_(a):null,[a])}const iy=[];function P_(a,l){l===void 0&&(l=or);const[r]=a,s=wb(r?Bt(r):null),[c,f]=gn(iy);function d(){f(()=>a.length?a.map(p=>vb(p)?s:new ch(l(p),p)):iy)}const h=zo({callback:d});return $n(()=>{h?.disconnect(),d(),a.forEach(p=>h?.observe(p))},[a]),c}function V_(a){if(!a)return null;if(a.children.length>1)return a;const l=a.children[0];return _l(l)?l:a}function k_(a){let{measure:l}=a;const[r,s]=gn(null),c=yn(v=>{for(const{target:m}of v)if(_l(m)){s(g=>{const b=l(m);return g?{...g,width:b.width,height:b.height}:b});break}},[l]),f=zo({callback:c}),d=yn(v=>{const m=V_(v);f?.disconnect(),m&&f?.observe(m),s(m?l(m):null)},[l,f]),[h,p]=Eo(d);return gt(()=>({nodeRef:h,rect:r,setRef:p}),[r,h,p])}const G_=[{sensor:Rb,options:{}},{sensor:Eb,options:{}}],X_={current:{}},fo={draggable:{measure:Fv},droppable:{measure:Fv,strategy:wl.WhileDragging,frequency:Pd.Optimized},dragOverlay:{measure:or}};class vl extends Map{get(l){var r;return l!=null&&(r=super.get(l))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(l=>{let{disabled:r}=l;return!r})}getNodeFor(l){var r,s;return(r=(s=this.get(l))==null?void 0:s.node.current)!=null?r:void 0}}const I_={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new vl,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:fo,measureDroppableContainers:xo,windowRect:null,measuringScheduled:!1},Y_={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xo,draggableNodes:new Map,over:null,measureDroppableContainers:xo},$o=Al(Y_),Tb=Al(I_);function K_(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new vl}}}function Q_(a,l){switch(l.type){case lt.DragStart:return{...a,draggable:{...a.draggable,initialCoordinates:l.initialCoordinates,active:l.active}};case lt.DragMove:return a.draggable.active==null?a:{...a,draggable:{...a.draggable,translate:{x:l.coordinates.x-a.draggable.initialCoordinates.x,y:l.coordinates.y-a.draggable.initialCoordinates.y}}};case lt.DragEnd:case lt.DragCancel:return{...a,draggable:{...a.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case lt.RegisterDroppable:{const{element:r}=l,{id:s}=r,c=new vl(a.droppable.containers);return c.set(s,r),{...a,droppable:{...a.droppable,containers:c}}}case lt.SetDroppableDisabled:{const{id:r,key:s,disabled:c}=l,f=a.droppable.containers.get(r);if(!f||s!==f.key)return a;const d=new vl(a.droppable.containers);return d.set(r,{...f,disabled:c}),{...a,droppable:{...a.droppable,containers:d}}}case lt.UnregisterDroppable:{const{id:r,key:s}=l,c=a.droppable.containers.get(r);if(!c||s!==c.key)return a;const f=new vl(a.droppable.containers);return f.delete(r),{...a,droppable:{...a.droppable,containers:f}}}default:return a}}function F_(a){let{disabled:l}=a;const{active:r,activatorEvent:s,draggableNodes:c}=ar($o),f=Bd(s),d=Bd(r?.id);return nt(()=>{if(!l&&!s&&f&&d!=null){if(!lh(f)||document.activeElement===f.target)return;const h=c.get(d);if(!h)return;const{activatorNode:p,node:v}=h;if(!p.current&&!v.current)return;requestAnimationFrame(()=>{for(const m of[p.current,v.current]){if(!m)continue;const g=$T(m);if(g){g.focus();break}}})}},[s,l,c,d,f]),null}function Z_(a,l){let{transform:r,...s}=l;return a!=null&&a.length?a.reduce((c,f)=>f({transform:c,...s}),r):r}function J_(a){return gt(()=>({draggable:{...fo.draggable,...a?.draggable},droppable:{...fo.droppable,...a?.droppable},dragOverlay:{...fo.dragOverlay,...a?.dragOverlay}}),[a?.draggable,a?.droppable,a?.dragOverlay])}function W_(a){let{activeNode:l,measure:r,initialRect:s,config:c=!0}=a;const f=vt(!1),{x:d,y:h}=typeof c=="boolean"?{x:c,y:c}:c;$n(()=>{if(!d&&!h||!l){f.current=!1;return}if(f.current||!s)return;const v=l?.node.current;if(!v||v.isConnected===!1)return;const m=r(v),g=hb(m,s);if(d||(g.x=0),h||(g.y=0),f.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const b=pb(v);b&&b.scrollBy({top:g.y,left:g.x})}},[l,d,h,s,r])}const _b=Al({...bn,scaleX:1,scaleY:1});var ja;(function(a){a[a.Uninitialized=0]="Uninitialized",a[a.Initializing=1]="Initializing",a[a.Initialized=2]="Initialized"})(ja||(ja={}));const eC=kT(function(l){var r,s,c,f;let{id:d,accessibility:h,autoScroll:p=!0,children:v,sensors:m=G_,collisionDetection:g=a_,measuring:b,modifiers:x,...w}=l;const R=GT(Q_,void 0,K_),[_,C]=R,[U,N]=YT(),[V,Z]=gn(ja.Uninitialized),$=V===ja.Initialized,{draggable:{active:H,nodes:O,translate:P},droppable:{containers:K}}=_,I=H!=null?O.get(H):null,W=vt({initial:null,translated:null}),re=gt(()=>{var Ke;return H!=null?{id:H,data:(Ke=I?.data)!=null?Ke:X_,rect:W}:null},[H,I]),X=vt(null),[k,D]=gn(null),[z,Q]=gn(null),J=Rl(w,Object.values(w)),te=Dl("DndDescribedBy",d),ae=gt(()=>K.getEnabled(),[K]),ee=J_(b),{droppableRects:ie,measureDroppableContainers:le,measuringScheduled:ce}=M_(ae,{dragging:$,dependencies:[P.x,P.y],config:ee.droppable}),fe=O_(O,H),be=gt(()=>z?Ud(z):null,[z]),me=dr(),ge=L_(fe,ee.draggable.measure);W_({activeNode:H!=null?O.get(H):null,config:me.layoutShiftCompensation,initialRect:ge,measure:ee.draggable.measure});const oe=ty(fe,ee.draggable.measure,ge),je=ty(fe?fe.parentElement:null),Re=vt({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:ie,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ie=K.getNodeFor((r=Re.current.over)==null?void 0:r.id),Ze=k_({measure:ee.dragOverlay.measure}),wt=(s=Ze.nodeRef.current)!=null?s:fe,Tt=$?(c=Ze.rect)!=null?c:oe:null,Ge=!!(Ze.nodeRef.current&&Ze.rect),on=$_(Ge?null:oe),xn=wb(wt?Bt(wt):null),jt=B_($?Ie??fe:null),It=P_(jt),Te=Z_(x,{transform:{x:P.x-on.x,y:P.y-on.y,scaleX:1,scaleY:1},activatorEvent:z,active:re,activeNodeRect:oe,containerNodeRect:je,draggingNodeRect:Tt,over:Re.current.over,overlayNodeRect:Ze.rect,scrollableAncestors:jt,scrollableAncestorRects:It,windowRect:xn}),Ve=be?Wi(be,P):null,ra=U_(jt),li=ay(ra),Un=ay(ra,[oe]),Ye=Wi(Te,li),_t=Tt?l_(Tt,Te):null,at=re&&_t?g({active:re,collisionRect:_t,droppableRects:ie,droppableContainers:ae,pointerCoordinates:Ve}):null,Ll=e_(at,"id"),[wn,Nl]=gn(null),si=Ge?Te:Wi(Te,Un),oi=i_(si,(f=wn?.rect)!=null?f:null,oe),cn=vt(null),$a=yn((Ke,Ct)=>{let{sensor:bt,options:un}=Ct;if(X.current==null)return;const St=O.get(X.current);if(!St)return;const dt=Ke.nativeEvent,Ut=new bt({active:X.current,activeNode:St,event:dt,options:un,context:Re,onAbort(Ue){if(!O.get(Ue))return;const{onDragAbort:Pe}=J.current,Et={id:Ue};Pe?.(Et),U({type:"onDragAbort",event:Et})},onPending(Ue,He,Pe,Et){if(!O.get(Ue))return;const{onDragPending:Ua}=J.current,Tn={id:Ue,constraint:He,initialCoordinates:Pe,offset:Et};Ua?.(Tn),U({type:"onDragPending",event:Tn})},onStart(Ue){const He=X.current;if(He==null)return;const Pe=O.get(He);if(!Pe)return;const{onDragStart:Et}=J.current,qn={activatorEvent:dt,active:{id:He,data:Pe.data,rect:W}};eo(()=>{Et?.(qn),Z(ja.Initializing),C({type:lt.DragStart,initialCoordinates:Ue,active:He}),U({type:"onDragStart",event:qn}),D(cn.current),Q(dt)})},onMove(Ue){C({type:lt.DragMove,coordinates:Ue})},onEnd:la(lt.DragEnd),onCancel:la(lt.DragCancel)});cn.current=Ut;function la(Ue){return async function(){const{active:Pe,collisions:Et,over:qn,scrollAdjustedTranslate:Ua}=Re.current;let Tn=null;if(Pe&&Ua){const{cancelDrop:sa}=J.current;Tn={activatorEvent:dt,active:Pe,collisions:Et,delta:Ua,over:qn},Ue===lt.DragEnd&&typeof sa=="function"&&await Promise.resolve(sa(Tn))&&(Ue=lt.DragCancel)}X.current=null,eo(()=>{C({type:Ue}),Z(ja.Uninitialized),Nl(null),D(null),Q(null),cn.current=null;const sa=Ue===lt.DragEnd?"onDragEnd":"onDragCancel";if(Tn){const Hn=J.current[sa];Hn?.(Tn),U({type:sa,event:Tn})}})}}},[O]),Ba=yn((Ke,Ct)=>(bt,un)=>{const St=bt.nativeEvent,dt=O.get(un);if(X.current!==null||!dt||St.dndKit||St.defaultPrevented)return;const Ut={active:dt};Ke(bt,Ct.options,Ut)===!0&&(St.dndKit={capturedBy:Ct.sensor},X.current=un,$a(bt,Ct))},[O,$a]),zl=j_(m,Ba);q_(m),$n(()=>{oe&&V===ja.Initializing&&Z(ja.Initialized)},[oe,V]),nt(()=>{const{onDragMove:Ke}=J.current,{active:Ct,activatorEvent:bt,collisions:un,over:St}=Re.current;if(!Ct||!bt)return;const dt={active:Ct,activatorEvent:bt,collisions:un,delta:{x:Ye.x,y:Ye.y},over:St};eo(()=>{Ke?.(dt),U({type:"onDragMove",event:dt})})},[Ye.x,Ye.y]),nt(()=>{const{active:Ke,activatorEvent:Ct,collisions:bt,droppableContainers:un,scrollAdjustedTranslate:St}=Re.current;if(!Ke||X.current==null||!Ct||!St)return;const{onDragOver:dt}=J.current,Ut=un.get(Ll),la=Ut&&Ut.rect.current?{id:Ut.id,rect:Ut.rect.current,data:Ut.data,disabled:Ut.disabled}:null,Ue={active:Ke,activatorEvent:Ct,collisions:bt,delta:{x:St.x,y:St.y},over:la};eo(()=>{Nl(la),dt?.(Ue),U({type:"onDragOver",event:Ue})})},[Ll]),$n(()=>{Re.current={activatorEvent:z,active:re,activeNode:fe,collisionRect:_t,collisions:at,droppableRects:ie,draggableNodes:O,draggingNode:wt,draggingNodeRect:Tt,droppableContainers:K,over:wn,scrollableAncestors:jt,scrollAdjustedTranslate:Ye},W.current={initial:Tt,translated:_t}},[re,fe,at,_t,O,wt,Tt,ie,K,wn,jt,Ye]),C_({...me,delta:P,draggingRect:_t,pointerCoordinates:Ve,scrollableAncestors:jt,scrollableAncestorRects:It});const $l=gt(()=>({active:re,activeNode:fe,activeNodeRect:oe,activatorEvent:z,collisions:at,containerNodeRect:je,dragOverlay:Ze,draggableNodes:O,droppableContainers:K,droppableRects:ie,over:wn,measureDroppableContainers:le,scrollableAncestors:jt,scrollableAncestorRects:It,measuringConfiguration:ee,measuringScheduled:ce,windowRect:xn}),[re,fe,oe,z,at,je,Ze,O,K,ie,wn,le,jt,It,ee,ce,xn]),Bl=gt(()=>({activatorEvent:z,activators:zl,active:re,activeNodeRect:oe,ariaDescribedById:{draggable:te},dispatch:C,draggableNodes:O,over:wn,measureDroppableContainers:le}),[z,zl,re,oe,C,te,O,wn,le]);return mn.createElement(db.Provider,{value:N},mn.createElement($o.Provider,{value:Bl},mn.createElement(Tb.Provider,{value:$l},mn.createElement(_b.Provider,{value:oi},v)),mn.createElement(F_,{disabled:h?.restoreFocus===!1})),mn.createElement(FT,{...h,hiddenTextDescribedById:te}));function dr(){const Ke=k?.autoScrollEnabled===!1,Ct=typeof p=="object"?p.enabled===!1:p===!1,bt=$&&!Ke&&!Ct;return typeof p=="object"?{...p,enabled:bt}:{enabled:bt}}}),tC=Al(null),ry="button",nC="Draggable";function aC(a){let{id:l,data:r,disabled:s=!1,attributes:c}=a;const f=Dl(nC),{activators:d,activatorEvent:h,active:p,activeNodeRect:v,ariaDescribedById:m,draggableNodes:g,over:b}=ar($o),{role:x=ry,roleDescription:w="draggable",tabIndex:R=0}=c??{},_=p?.id===l,C=ar(_?_b:tC),[U,N]=Eo(),[V,Z]=Eo(),$=H_(d,l),H=Rl(r);$n(()=>(g.set(l,{id:l,key:f,node:U,activatorNode:V,data:H}),()=>{const P=g.get(l);P&&P.key===f&&g.delete(l)}),[g,l]);const O=gt(()=>({role:x,tabIndex:R,"aria-disabled":s,"aria-pressed":_&&x===ry?!0:void 0,"aria-roledescription":w,"aria-describedby":m.draggable}),[s,x,R,_,w,m.draggable]);return{active:p,activatorEvent:h,activeNodeRect:v,attributes:O,isDragging:_,listeners:s?void 0:$,node:U,over:b,setNodeRef:N,setActivatorNodeRef:Z,transform:C}}function iC(){return ar(Tb)}const rC="Droppable",lC={timeout:25};function sC(a){let{data:l,disabled:r=!1,id:s,resizeObserverConfig:c}=a;const f=Dl(rC),{active:d,dispatch:h,over:p,measureDroppableContainers:v}=ar($o),m=vt({disabled:r}),g=vt(!1),b=vt(null),x=vt(null),{disabled:w,updateMeasurementsFor:R,timeout:_}={...lC,...c},C=Rl(R??s),U=yn(()=>{if(!g.current){g.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{v(Array.isArray(C.current)?C.current:[C.current]),x.current=null},_)},[_]),N=zo({callback:U,disabled:w||!d}),V=yn((O,P)=>{N&&(P&&(N.unobserve(P),g.current=!1),O&&N.observe(O))},[N]),[Z,$]=Eo(V),H=Rl(l);return nt(()=>{!N||!Z.current||(N.disconnect(),g.current=!1,N.observe(Z.current))},[Z,N]),nt(()=>(h({type:lt.RegisterDroppable,element:{id:s,key:f,disabled:r,node:Z,rect:b,data:H}}),()=>h({type:lt.UnregisterDroppable,key:f,id:s})),[s]),nt(()=>{r!==m.current.disabled&&(h({type:lt.SetDroppableDisabled,id:s,key:f,disabled:r}),m.current.disabled=r)},[s,f,r,h]),{active:d,rect:b,isOver:p?.id===s,node:Z,over:p,setNodeRef:$}}const oC=a=>{let{transform:l}=a;return{...l,x:0}},fh=await ne("react"),{useMemo:To,useRef:dh,useEffect:_o,useState:cC,useContext:uC}=fh;function Cb(a,l,r){const s=a.slice();return s.splice(r<0?s.length+r:r,0,s.splice(l,1)[0]),s}function fC(a,l){return a.reduce((r,s,c)=>{const f=l.get(s);return f&&(r[c]=f),r},Array(a.length))}function to(a){return a!==null&&a>=0}function dC(a,l){if(a===l)return!0;if(a.length!==l.length)return!1;for(let r=0;r<a.length;r++)if(a[r]!==l[r])return!1;return!0}function hC(a){return typeof a=="boolean"?{draggable:a,droppable:a}:a}const Db=a=>{let{rects:l,activeIndex:r,overIndex:s,index:c}=a;const f=Cb(l,s,r),d=l[c],h=f[c];return!h||!d?null:{x:h.left-d.left,y:h.top-d.top,scaleX:h.width/d.width,scaleY:h.height/d.height}},no={scaleX:1,scaleY:1},pC=a=>{var l;let{activeIndex:r,activeNodeRect:s,index:c,rects:f,overIndex:d}=a;const h=(l=f[r])!=null?l:s;if(!h)return null;if(c===r){const v=f[d];return v?{x:0,y:r<d?v.top+v.height-(h.top+h.height):v.top-h.top,...no}:null}const p=mC(f,c,r);return c>r&&c<=d?{x:0,y:-h.height-p,...no}:c<r&&c>=d?{x:0,y:h.height+p,...no}:{x:0,y:0,...no}};function mC(a,l,r){const s=a[l],c=a[l-1],f=a[l+1];return s?r<l?c?s.top-(c.top+c.height):f?f.top-(s.top+s.height):0:f?f.top-(s.top+s.height):c?s.top-(c.top+c.height):0:0}const Ab="Sortable",Ob=fh.createContext({activeIndex:-1,containerId:Ab,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Db,disabled:{draggable:!1,droppable:!1}});function gC(a){let{children:l,id:r,items:s,strategy:c=Db,disabled:f=!1}=a;const{active:d,dragOverlay:h,droppableRects:p,over:v,measureDroppableContainers:m}=iC(),g=Dl(Ab,r),b=h.rect!==null,x=To(()=>s.map($=>typeof $=="object"&&"id"in $?$.id:$),[s]),w=d!=null,R=d?x.indexOf(d.id):-1,_=v?x.indexOf(v.id):-1,C=dh(x),U=!dC(x,C.current),N=_!==-1&&R===-1||U,V=hC(f);$n(()=>{U&&w&&m(x)},[U,x,w,m]),_o(()=>{C.current=x},[x]);const Z=To(()=>({activeIndex:R,containerId:g,disabled:V,disableTransforms:N,items:x,overIndex:_,useDragOverlay:b,sortedRects:fC(x,p),strategy:c}),[R,g,V.draggable,V.droppable,N,x,_,p,b,c]);return fh.createElement(Ob.Provider,{value:Z},l)}const vC=a=>{let{id:l,items:r,activeIndex:s,overIndex:c}=a;return Cb(r,s,c).indexOf(l)},yC=a=>{let{containerId:l,isSorting:r,wasDragging:s,index:c,items:f,newIndex:d,previousItems:h,previousContainerId:p,transition:v}=a;return!v||!s||h!==f&&c===d?!1:r?!0:d!==c&&l===p},bC={duration:200,easing:"ease"},jb="transform",SC=xl.Transition.toString({property:jb,duration:0,easing:"linear"}),EC={roleDescription:"sortable"};function RC(a){let{disabled:l,index:r,node:s,rect:c}=a;const[f,d]=cC(null),h=dh(r);return $n(()=>{if(!l&&r!==h.current&&s.current){const p=c.current;if(p){const v=or(s.current,{ignoreTransform:!0}),m={x:p.left-v.left,y:p.top-v.top,scaleX:p.width/v.width,scaleY:p.height/v.height};(m.x||m.y)&&d(m)}}r!==h.current&&(h.current=r)},[l,r,s,c]),_o(()=>{f&&d(null)},[f]),f}function xC(a){let{animateLayoutChanges:l=yC,attributes:r,disabled:s,data:c,getNewIndex:f=vC,id:d,strategy:h,resizeObserverConfig:p,transition:v=bC}=a;const{items:m,containerId:g,activeIndex:b,disabled:x,disableTransforms:w,sortedRects:R,overIndex:_,useDragOverlay:C,strategy:U}=uC(Ob),N=wC(s,x),V=m.indexOf(d),Z=To(()=>({sortable:{containerId:g,index:V,items:m},...c}),[g,c,V,m]),$=To(()=>m.slice(m.indexOf(d)),[m,d]),{rect:H,node:O,isOver:P,setNodeRef:K}=sC({id:d,data:Z,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:$,...p}}),{active:I,activatorEvent:W,activeNodeRect:re,attributes:X,setNodeRef:k,listeners:D,isDragging:z,over:Q,setActivatorNodeRef:J,transform:te}=aC({id:d,data:Z,attributes:{...EC,...r},disabled:N.draggable}),ae=MT(K,k),ee=!!I,ie=ee&&!w&&to(b)&&to(_),le=!C&&z,ce=le&&ie?te:null,be=ie?ce??(h??U)({rects:R,activeNodeRect:re,activeIndex:b,overIndex:_,index:V}):null,me=to(b)&&to(_)?f({id:d,items:m,activeIndex:b,overIndex:_}):V,ge=I?.id,oe=dh({activeId:ge,items:m,newIndex:me,containerId:g}),je=m!==oe.current.items,Re=l({active:I,containerId:g,isDragging:z,isSorting:ee,id:d,index:V,items:m,newIndex:oe.current.newIndex,previousItems:oe.current.items,previousContainerId:oe.current.containerId,transition:v,wasDragging:oe.current.activeId!=null}),Ie=RC({disabled:!Re,index:V,node:O,rect:H});return _o(()=>{ee&&oe.current.newIndex!==me&&(oe.current.newIndex=me),g!==oe.current.containerId&&(oe.current.containerId=g),m!==oe.current.items&&(oe.current.items=m)},[ee,me,g,m]),_o(()=>{if(ge===oe.current.activeId)return;if(ge!=null&&oe.current.activeId==null){oe.current.activeId=ge;return}const wt=setTimeout(()=>{oe.current.activeId=ge},50);return()=>clearTimeout(wt)},[ge]),{active:I,activeIndex:b,attributes:X,data:Z,rect:H,index:V,newIndex:me,items:m,isOver:P,isSorting:ee,isDragging:z,listeners:D,node:O,overIndex:_,over:Q,setNodeRef:ae,setActivatorNodeRef:J,setDroppableNodeRef:K,setDraggableNodeRef:k,transform:Ie??be,transition:Ze()};function Ze(){if(Ie||je&&oe.current.newIndex===V)return SC;if(!(le&&!lh(W)||!v)&&(ee||Re))return xl.Transition.toString({...v,property:jb})}}function wC(a,l){var r,s;return typeof a=="boolean"?{draggable:a,droppable:!1}:{draggable:(r=a?.draggable)!=null?r:l.draggable,droppable:(s=a?.droppable)!=null?s:l.droppable}}De.Down,De.Right,De.Up,De.Left;function TC(a){return Ao({attr:{viewBox:"0 0 15 15",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M2.49998 4.09998C2.27906 4.09998 2.09998 4.27906 2.09998 4.49998C2.09998 4.72089 2.27906 4.89998 2.49998 4.89998H12.5C12.7209 4.89998 12.9 4.72089 12.9 4.49998C12.9 4.27906 12.7209 4.09998 12.5 4.09998H2.49998ZM2.49998 6.09998C2.27906 6.09998 2.09998 6.27906 2.09998 6.49998C2.09998 6.72089 2.27906 6.89998 2.49998 6.89998H12.5C12.7209 6.89998 12.9 6.72089 12.9 6.49998C12.9 6.27906 12.7209 6.09998 12.5 6.09998H2.49998ZM2.09998 8.49998C2.09998 8.27906 2.27906 8.09998 2.49998 8.09998H12.5C12.7209 8.09998 12.9 8.27906 12.9 8.49998C12.9 8.72089 12.7209 8.89998 12.5 8.89998H2.49998C2.27906 8.89998 2.09998 8.72089 2.09998 8.49998ZM2.49998 10.1C2.27906 10.1 2.09998 10.2791 2.09998 10.5C2.09998 10.7209 2.27906 10.9 2.49998 10.9H12.5C12.7209 10.9 12.9 10.7209 12.9 10.5C12.9 10.2791 12.7209 10.1 12.5 10.1H2.49998Z",fill:"currentColor"},child:[]}]})(a)}const{Button:_C}=await ne("@baseplate-dev/ui-components");function CC({id:a,children:l}){const{attributes:r,listeners:s,setNodeRef:c,transform:f,transition:d}=xC({id:a}),h={transform:xl.Transform.toString(f),transition:d};return S.jsxs("div",{className:"flex w-full items-center gap-2",ref:c,style:h,children:[S.jsx("div",{className:"flex w-10 items-center justify-center",...r,...s,children:S.jsx(_C,{className:"cursor-grab",variant:"ghost",size:"icon",children:S.jsx(TC,{})})}),S.jsx("div",{className:"flex-1",children:l})]})}function Qj({listItems:a,sortItems:l}){const r=({active:s,over:c})=>{if(c&&s.id!==c.id){const f=a.findIndex(h=>h.id===s.id),d=a.findIndex(h=>h.id===c.id);l(f,d)}};return S.jsx(eC,{collisionDetection:t_,onDragEnd:r,modifiers:[oC],children:S.jsx("div",{className:"flex w-full flex-col gap-4",children:S.jsx(gC,{items:a.map(({id:s})=>s),strategy:pC,children:a.map(s=>S.jsx(CC,{id:s.id,children:s.element},s.id))})})})}const ly=a=>Symbol.iterator in a,sy=a=>"entries"in a,oy=(a,l)=>{const r=a instanceof Map?a:new Map(a.entries()),s=l instanceof Map?l:new Map(l.entries());if(r.size!==s.size)return!1;for(const[c,f]of r)if(!Object.is(f,s.get(c)))return!1;return!0},DC=(a,l)=>{const r=a[Symbol.iterator](),s=l[Symbol.iterator]();let c=r.next(),f=s.next();for(;!c.done&&!f.done;){if(!Object.is(c.value,f.value))return!1;c=r.next(),f=s.next()}return!!c.done&&!!f.done};function AC(a,l){return Object.is(a,l)?!0:typeof a!="object"||a===null||typeof l!="object"||l===null?!1:!ly(a)||!ly(l)?oy({entries:()=>Object.entries(a)},{entries:()=>Object.entries(l)}):sy(a)&&sy(l)?oy(a,l):DC(a,l)}const OC=await ne("react");function jC(a){const l=OC.useRef(void 0);return r=>{const s=a(r);return AC(l.current,s)?l.current:l.current=s}}class Co extends Error{constructor(l){super(`Project not found for project ID: ${l}`),this.name="ProjectNotFoundError"}}function cr(a){return l=>{throw kw(l)&&l.data?.code==="NOT_FOUND"?new Co(a):l}}async function MC(a){return Sn?[]:yt.plugins.getAvailablePlugins.mutate({projectId:a}).catch(cr(a))}async function LC(a){if(Sn){const s=await(await fetch("/preview-app.json")).text();return{contents:s,hash:await nb(s)}}return(await yt.projects.readDefinition.query({id:a}).catch(cr(a))).contents}async function NC(a,l,r){return Sn?{type:"success"}:(await yt.projects.writeDefinition.mutate({id:a,newContents:l,oldContentsHash:r}).catch(cr(a))).result}function zC(a,l){if(Sn)return()=>{};const r=yt.projects.onProjectJsonChanged.subscribe({id:a},{onData:l});return()=>{r.unsubscribe()}}async function $C(){return Sn?[{id:"preview-project",name:"Preview Project",directory:"~/preview-project"}]:yt.projects.list.query()}async function BC(a){Sn||await yt.sync.startSync.mutate({id:a}).catch(cr(a))}async function UC(a){return Sn?{status:"success",startedAt:new Date().toISOString(),packages:{"app:NmEolDU3Iggt":{status:"not-synced",path:"packages/admin",name:"admin",order:0}}}:yt.sync.getSyncMetadata.query({id:a}).catch(cr(a))}async function qC(a){Sn||await yt.sync.cancelSync.mutate({id:a}).catch(cr(a))}async function HC(){return Sn?{version:"preview",featureFlags:[],userConfig:{}}:yt.version.get.query()}const{toast:ao}=await ne("@baseplate-dev/ui-components"),{useEffect:PC}=await ne("react"),Mb={status:"not-started",packages:{}},Lb=kd(a=>({metadata:Mb,setMetadata:l=>{a({metadata:l})}}));function VC(){const{currentProjectId:a}=vn(),{setMetadata:l}=Lb();PC(()=>{if(l(Mb),!a)return;let r=!1;const s=()=>{UC(a).then(h=>{r||l(h)}).catch(h=>{h instanceof Co||ao.error($t(h,"Failed to fetch sync metadata."))})};if(s(),Sn)return;const c=th.on("open",s),f=yt.sync.onSyncMetadataChanged.subscribe({id:a},{onData:h=>{l(h.syncMetadata)}}),d=yt.sync.onSyncCompleted.subscribe({id:a},{onData:h=>{const{status:p}=h.syncMetadata;Object.values(h.syncMetadata.packages).some(m=>m.status==="conflicts")?ao.warning("Sync completed with conflicts! Please review."):p==="success"?ao.success("Sync completed successfully!"):p==="error"&&ao.error("Sync failed with errors!")}});return()=>{f.unsubscribe(),d.unsubscribe(),c(),r=!0}},[a,l])}function Do(a){return Lb(jC(l=>a?a(l.metadata):l.metadata))}function io(a){const l=new Date(a);if(!Number.isNaN(l.valueOf()))return l;const r=String(a).match(/\d+/g);if(r==null||r.length<=2)return l;{const[s,c,...f]=r.map(p=>parseInt(p)),d=[s,c-1,...f];return new Date(Date.UTC(...d))}}const sl=(a,l,r)=>{const s=a!==1?l+"s":l;return a+" "+s+" "+r},kC=({locale:a,...l})=>(r,s,c)=>{const f=Intl.RelativeTimeFormat;if(!f)throw new Error("Intl.RelativeTimeFormat is not supported");return new f(a,{style:"long",numeric:"auto",...l}).format(c==="ago"?-r:r,s)};function Vd(){return Vd=Object.assign?Object.assign.bind():function(a){for(var l=1;l<arguments.length;l++){var r=arguments[l];for(var s in r)({}).hasOwnProperty.call(r,s)&&(a[s]=r[s])}return a},Vd.apply(null,arguments)}const GC=await ne("react"),{useEffect:cy,useState:XC}=await ne("react"),dl=60,hl=dl*60,er=hl*24,ro=er*7,uy=er*30,fy=er*365,IC=()=>Date.now();function Nb({date:a,formatter:l,component:r="time",live:s=!0,minPeriod:c=0,maxPeriod:f=ro,title:d,now:h=IC,...p}){const[v,m]=XC(h());cy(()=>{if(!s)return;const H=(()=>{const O=io(a).valueOf();if(!O)return console.warn("[react-timeago] Invalid Date provided"),0;const P=Math.round(Math.abs(v-O)/1e3),K=P<dl?1e3:P<hl?1e3*dl:P<er?1e3*hl:1e3*ro,I=Math.min(Math.max(K,c*1e3),f*1e3);return I?setTimeout(()=>{m(h())},I):0})();return()=>{H&&clearTimeout(H)}},[a,s,f,c,h,v]),cy(()=>{m(h())},[a]);const g=r,b=io(a).valueOf();if(!b)return null;const x=Math.round(Math.abs(v-b)/1e3),w=b<v?"ago":"from now",[R,_]=x<dl?[Math.round(x),"second"]:x<hl?[Math.round(x/dl),"minute"]:x<er?[Math.round(x/hl),"hour"]:x<ro?[Math.round(x/er),"day"]:x<uy?[Math.round(x/ro),"week"]:x<fy?[Math.round(x/uy),"month"]:[Math.round(x/fy),"year"],C=typeof d>"u"?typeof a=="string"?a:io(a).toISOString().substring(0,16).replace("T"," "):d,U=g==="time"?{...p,dateTime:io(a).toISOString()}:p,N=($=$,H=H,O=O,P=b,K=sl,I=I)=>sl($,H,O),V=l||sl;let Z;try{Z=V(R,_,w,b,N,h),Z||(Z=sl(R,_,w,b,N,h))}catch($){console.error("[react-timeago] Formatter threw an error:",$),Z=sl(R,_,w)}return GC.createElement(g,Vd({},U,{title:C}),Z)}const zb=await ne("react"),$b=zb.createContext(null);function Bb(){const a=zb.useContext($b);if(!a)throw new Error("useClientVersion must be used within a <ClientVersionContext.Provider>");return a}const YC=kC({locale:"en"}),Ub=(...a)=>a[1]==="second"?"Just now":YC(...a),{Badge:KC,Button:Af,Table:QC,TableBody:FC,TableCell:Of,TableHead:jf,TableHeader:ZC,TableRow:dy,toast:ol,Tooltip:JC,TooltipContent:WC,TooltipTrigger:eD}=await ne("@baseplate-dev/ui-components");function tD(a){switch(a){case"success":return S.jsx(qE,{className:"text-success-foreground"});case"unknown-error":case"command-error":return S.jsx(UE,{className:"text-error-foreground"});case"conflicts":return S.jsx(C0,{className:"text-warning-foreground"});case"cancelled":return S.jsx(BE,{className:"text-secondary-foreground"});case"not-synced":return S.jsx(sv,{className:"text-secondary-foreground"});case"in-progress":return S.jsx(_0,{className:"text-secondary-foreground"});default:return S.jsx(sv,{className:"text-secondary-foreground"})}}function nD(a){switch(a){case"success":return"Synced";case"unknown-error":return"Sync error";case"command-error":return"Command error";case"conflicts":return"Conflicts";case"cancelled":return"Cancelled";case"not-synced":return"Not Synced";case"in-progress":return"Syncing...";default:return"Unknown"}}function aD(a){switch(a){case"merge-conflict":return"Merge Conflict";case"working-deleted":return"Deleted by User";case"generated-deleted":return"Deleted in Generated";default:return"Unknown"}}function iD(a){switch(a){case"merge-conflict":return"This file was modified in both the working codebase and the generated codebase. Please resolve the conflicts manually.";case"working-deleted":return"This file was deleted in the working codebase but modified in the generated codebase. Choose whether to keep or delete it.";case"generated-deleted":return"This file was deleted in the generated codebase but modified in the working codebase. Choose whether to keep or delete it.";default:return"Unknown conflict type"}}function rD({packageId:a,filesWithConflicts:l}){const r=Bb(),{currentProjectId:s}=vn();if(l.length===0)return null;const c=h=>{s&&yt.sync.openEditor.mutate({id:s,packageId:a,relativePath:h}).catch(p=>{ol.error($t(p,"Failed to open editor"))})},f=h=>{s&&yt.sync.keepConflictFile.mutate({id:s,packageId:a,relativePath:h.relativePath}).then(()=>{ol.success(`File ${h.relativePath} was kept!`)}).catch(p=>{ol.error($t(p,"Failed to keep file"))})},d=h=>{s&&yt.sync.deleteConflictFile.mutate({id:s,packageId:a,relativePath:h.relativePath}).then(()=>{ol.success(`File ${h.relativePath} was deleted!`)}).catch(p=>{ol.error($t(p,"Failed to delete file"))})};return S.jsxs("div",{children:[S.jsx("h4",{className:"font-medium",children:"Merge Conflicts"}),S.jsxs(QC,{children:[S.jsx(ZC,{children:S.jsxs(dy,{children:[S.jsx(jf,{className:"w-3/5",children:"Name"}),S.jsx(jf,{className:"w-1/5",children:S.jsx("div",{className:"flex items-center gap-2",children:"Type"})}),S.jsx(jf,{className:"w-1/5",children:"Actions"})]})}),S.jsx(FC,{children:l.map(h=>S.jsxs(dy,{children:[S.jsx(Of,{children:r.userConfig.sync?.editor?S.jsx("button",{className:"hover:underline",onClick:()=>{c(h.generatedConflictRelativePath??h.relativePath)},children:S.jsx("div",{className:"w-full text-start",children:h.generatedConflictRelativePath??h.relativePath})}):S.jsx("span",{children:h.generatedConflictRelativePath??h.relativePath})}),S.jsx(Of,{children:S.jsxs(JC,{children:[S.jsx(eD,{children:S.jsx("span",{children:aD(h.conflictType)})}),S.jsx(WC,{side:"left",className:"max-w-sm",children:iD(h.conflictType)})]})}),S.jsxs(Of,{children:[h.conflictType==="merge-conflict"&&r.userConfig.sync?.editor&&S.jsx(Af,{variant:"outline",size:"sm",onClick:()=>{c(h.generatedConflictRelativePath??h.relativePath)},children:"View"}),h.conflictType!=="merge-conflict"&&S.jsxs("div",{className:"flex gap-2",children:[S.jsx(Af,{variant:"outline",size:"sm",onClick:()=>{f(h)},children:"Keep"}),S.jsx(Af,{variant:"destructive",size:"sm",onClick:()=>{d(h)},children:"Delete"})]})]})]},h.relativePath))})]})]})}function lD({packageId:a,packageInfo:l,className:r}){const s=l.status==="unknown-error"||l.status==="command-error"||l.status==="conflicts",c=l.result?.filesWithConflicts??[];return S.jsxs("div",{className:zn("w-full rounded-md border",r),children:[S.jsxs("div",{className:"flex w-full items-center justify-between px-4 py-3",children:[S.jsx("span",{className:"font-medium",children:l.name}),S.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[S.jsx("span",{children:l.result?.completedAt?S.jsx(Nb,{date:new Date(l.result.completedAt),formatter:Ub}):"-"}),S.jsxs(KC,{variant:l.status==="unknown-error"||l.status==="command-error"?"destructive":"secondary",className:"flex items-center gap-1",children:[tD(l.status),nD(l.status)]})]})]}),s&&S.jsxs("div",{className:"space-y-4 border-t p-4",children:[l.result?.errors&&l.result.errors.length>0&&S.jsxs("div",{className:"mt-2 space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"Errors:"}),S.jsx("ul",{className:"list-disc pl-5 text-sm text-destructive",children:l.result.errors.map((f,d)=>S.jsx("li",{className:"font-mono whitespace-pre-wrap",children:f.message},d))})]}),S.jsx(rD,{packageId:a,filesWithConflicts:c}),l.result?.failedCommands&&l.result.failedCommands.length>0&&S.jsxs("div",{className:"mt-2 space-y-1",children:[S.jsx("h4",{className:"font-medium",children:"Failed Commands:"}),S.jsx("ul",{className:"list-disc pl-5 text-sm text-destructive",children:l.result.failedCommands.map((f,d)=>S.jsx("li",{children:S.jsx("code",{children:f.command})},d))})]})]})]})}const{Alert:hy,AlertDescription:py,AlertTitle:my}=await ne("@baseplate-dev/ui-components");function sD({className:a}){const l=Do();if(l.globalErrors?.length)return S.jsxs(hy,{variant:"error",children:[S.jsx(my,{children:"Error compiling project."}),S.jsx(py,{children:l.globalErrors.map(f=>S.jsx("div",{className:"font-mono whitespace-pre-wrap",children:f},f))})]});if(!(Object.keys(l.packages).length>0))return l.status==="not-started"||l.status==="in-progress"?S.jsx("div",{className:zn("flex h-40 items-center justify-center text-muted-foreground",a),children:S.jsx("span",{children:"Waiting for sync to start..."})}):S.jsxs(hy,{variant:"default",children:[S.jsx(my,{children:"No packages found to be synced."}),S.jsx(py,{children:"Sync status will appear here once packages have been added."})]});const s=Object.entries(l.packages),c=GE(s,[([,f])=>f.order]);return S.jsx("div",{className:zn("space-y-3",a),children:c.map(([f,d])=>S.jsx(lD,{packageId:f,packageInfo:d},f))})}const{useBlockBeforeContinue:oD,useProjectDefinition:cD}=await ne("@baseplate-dev/project-builder-lib/web"),{Button:lo,Dialog:uD,DialogContent:fD,DialogDescription:dD,DialogFooter:hD,DialogHeader:pD,DialogTitle:mD,DialogTrigger:gD,Tabs:vD,TabsContent:gy,TabsList:yD,TabsTrigger:vy,toast:Mf}=await ne("@baseplate-dev/ui-components"),{useRef:bD,useState:SD}=await ne("react");function ED({className:a}){const[l,r]=SD(!1),{definitionContainer:s}=cD(),{currentProjectId:c}=vn(),f=oD(),d=bD(s);d.current=s;const h=Do(g=>g.status==="in-progress"),p=Do(g=>Object.values(g.packages).some(b=>b.status==="conflicts")),v=()=>{if(c){if(p){Mf.warning("Conflicts must be resolved before syncing");return}BC(c).catch(g=>Mf.error($t(g))),r(!0)}},m=()=>{c&&qC(c).catch(g=>Mf.error(ir(g)))};return S.jsx("div",{className:zn(a),children:S.jsxs(uD,{open:l,onOpenChange:g=>{r(g)},children:[S.jsx(gD,{asChild:!0,children:S.jsxs(lo,{onClick:g=>{!h&&!p&&(f({onContinue:v}),g.preventDefault())},size:"sm","data-testid":"sync-button",children:[p?S.jsx(C0,{}):S.jsx(_0,{}),h?"Syncing...":p?"Resolve conflicts":"Sync"]})}),S.jsxs(fD,{width:"lg","aria-description":"Sync project dialog",children:[S.jsxs(pD,{children:[S.jsx(mD,{children:"Sync Project"}),S.jsx(dD,{children:"Sync the project configuration to the codebase of your project."})]}),S.jsxs(vD,{defaultValue:"packages",className:"mt-4 min-w-0",children:[S.jsxs(yD,{className:"grid w-full grid-cols-2",children:[S.jsx(vy,{value:"packages",children:"Packages"}),S.jsx(vy,{value:"console-log",children:"Console log"})]}),S.jsx(gy,{value:"packages",className:"mt-4",children:S.jsx(sD,{})}),S.jsx(gy,{value:"console-log",className:"mt-4",children:S.jsx(ab,{})})]}),S.jsxs(hD,{children:[h?S.jsx(lo,{variant:"destructive",onClick:m,children:"Stop"}):S.jsx(lo,{variant:"secondary",onClick:v,children:"Sync Again"}),S.jsx(lo,{variant:"outline",onClick:()=>{r(!1)},children:"Close"})]})]})]})})}const{useProjectDefinition:RD}=await ne("@baseplate-dev/project-builder-lib/web"),{Breadcrumb:xD,BreadcrumbItem:yy,BreadcrumbLink:wD,BreadcrumbList:TD,BreadcrumbPage:_D,BreadcrumbSeparator:by,Button:CD,DropdownMenu:DD,DropdownMenuContent:AD,DropdownMenuGroup:OD,DropdownMenuItem:jD,DropdownMenuTrigger:MD}=await ne("@baseplate-dev/ui-components"),{Fragment:LD}=await ne("react");function ND(){const{definitionContainer:a}=RD(),l=xt({select:v=>v.matches});let r;const s=l.map(v=>{const{getTitle:m}=v.context;if(!m||r===m)return null;const g=typeof m=="function"?m():m;return r=m,{id:v.id,label:g,url:v.pathname}}).filter(HE),c=vn(v=>v.projects),f=vn(v=>v.setCurrentProjectId),d=Lo(),h=XE(c,["name"],["asc"]),p=a.definition.settings.general.name;return S.jsxs("div",{className:"flex items-center space-x-2",children:[c.length>1&&S.jsxs(DD,{children:[S.jsx(MD,{asChild:!0,children:S.jsxs(CD,{variant:"ghost",size:"none",className:"-ml-2 h-8 px-2 text-muted-foreground",children:[S.jsxs("div",{className:"flex items-center text-sm",children:[Gv(p)," project"]}),S.jsx(PE,{})]})}),S.jsx(AD,{children:S.jsx(OD,{children:h.map(v=>S.jsx(jD,{onSelect:()=>{f(v.id),d({to:"/"}).catch($t)},children:S.jsxs("div",{className:"flex flex-col space-y-1",children:[S.jsx("div",{children:S.jsx("strong",{children:v.name})}),S.jsx("div",{className:"text-xs text-muted-foreground",children:v.directory})]})},v.id))})})]}),S.jsx(xD,{children:S.jsxs(TD,{children:[c.length<=1&&S.jsxs(S.Fragment,{children:[S.jsxs(yy,{children:[Gv(p)," project"]}),s.length>0&&S.jsx(by,{})]}),s.map((v,m)=>S.jsxs(LD,{children:[m!==0&&S.jsx(by,{className:"hidden sm:block"}),m===s.length-1?S.jsx(_D,{children:v.label}):S.jsx(yy,{className:"hidden sm:block",children:S.jsx(wD,{asChild:!0,children:S.jsx(ri,{to:v.url,children:v.label})})})]},v.id))]})})]})}function qb(a){return Ao({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M3 12v3c0 1.657 3.134 3 7 3s7-1.343 7-3v-3c0 1.657-3.134 3-7 3s-7-1.343-7-3z"},child:[]},{tag:"path",attr:{d:"M3 7v3c0 1.657 3.134 3 7 3s7-1.343 7-3V7c0 1.657-3.134 3-7 3S3 8.657 3 7z"},child:[]},{tag:"path",attr:{d:"M17 5c0 1.657-3.134 3-7 3S3 6.657 3 5s3.134-3 7-3 7 1.343 7 3z"},child:[]}]})(a)}function Fj(a){return Ao({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"},child:[]}]})(a)}function Zj(a){return Ao({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"},child:[]}]})(a)}const{cn:zD}=await ne("@baseplate-dev/ui-components");function $D({icon:a,label:l,...r}){return S.jsx("a",{...r,className:zD('flex h-12 w-[50px] items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground aria-[current="page"]:bg-accent/80 aria-[current="page"]:text-accent-foreground aria-[current="page"]:hover:bg-accent',r.className),children:S.jsxs("div",{className:"flex flex-col items-center space-y-1",children:[S.jsx(a,{className:"size-5"}),S.jsx("div",{className:"text-xs font-medium",children:l})]})})}const so=q0($D);function BD(){return S.jsx("nav",{className:"flex h-full flex-col items-center justify-between px-2 pt-2.5 pb-4",children:S.jsxs("div",{className:"space-y-8",children:[S.jsx(ri,{to:"/",from:"/",className:"group flex shrink-0 items-center justify-center",children:S.jsx("img",{src:"/images/logo.png",className:"size-8 transition-all group-hover:scale-110",alt:"Baseplate Home"})}),S.jsxs("div",{className:"space-y-2",children:[S.jsx(so,{to:"/apps",from:"/",icon:D0,label:"Apps"}),S.jsx(so,{to:"/data",from:"/",icon:qb,label:"Data"}),S.jsx(so,{to:"/plugins",from:"/",icon:A0,label:"Plugins"}),S.jsx(so,{to:"/settings",from:"/",icon:O0,label:"Settings"})]})]})})}const{cn:UD,SheetClose:qD}=await ne("@baseplate-dev/ui-components");function HD({icon:a,label:l,...r}){return S.jsx(qD,{asChild:!0,children:S.jsxs("a",{...r,className:UD('flex items-center gap-4 px-2.5 py-4 text-muted-foreground transition-colors hover:text-accent-foreground aria-[current="page"]:bg-accent/80 aria-[current="page"]:text-accent-foreground',r.className),children:[S.jsx(a,{className:"size-5 transition-all group-hover:scale-110"}),l]})})}const cl=q0(HD);function PD(){return S.jsxs("nav",{className:"grid gap-6 text-lg font-medium",children:[S.jsxs("div",{className:"flex items-center space-x-2",children:[S.jsx("img",{src:"/images/logo.png",alt:"logo",className:"size-12"}),S.jsx("h3",{children:"Baseplate"})]}),S.jsxs("div",{children:[S.jsx(cl,{to:"/",from:"/",icon:VE,label:"Home",activeOptions:{exact:!0}}),S.jsx(cl,{to:"/apps",icon:D0,label:"Apps"}),S.jsx(cl,{to:"/data/models",from:"/",icon:qb,label:"Models"}),S.jsx(cl,{to:"/plugins",from:"/",icon:A0,label:"Plugins"}),S.jsx(cl,{to:"/settings",from:"/",icon:O0,label:"Settings"})]})]})}function VD({className:a}){const l=Do(r=>r.completedAt);return l?S.jsxs("div",{className:zn("text-style-muted",a),children:["Last Sync: ",S.jsx(Nb,{date:l,formatter:Ub})]}):null}const{Button:kD,Sheet:GD,SheetContent:XD,SheetTrigger:ID}=await ne("@baseplate-dev/ui-components");function YD({className:a}){return S.jsxs("div",{className:zn("flex h-screen w-full min-w-(--min-app-width) flex-col bg-background",a),style:{"--sidebar-width":"70px","--topbar-height":"52px","--action-bar-height":"52px","--min-app-width":"800px"},children:[S.jsx("aside",{className:"fixed inset-y-0 left-0 z-10 hidden w-(--sidebar-width) flex-col border-r bg-background sm:flex",children:S.jsx(BD,{})}),S.jsxs("div",{className:"flex h-full flex-col pt-(--topbar-height) sm:pl-(--sidebar-width)",children:[S.jsxs("header",{className:"fixed inset-x-0 top-0 z-30 flex h-(--topbar-height) items-center gap-4 border-b bg-background px-4 sm:left-(--sidebar-width) sm:px-4",children:[S.jsxs(GD,{children:[S.jsx(ID,{asChild:!0,children:S.jsxs(kD,{size:"icon",variant:"outline",className:"sm:hidden",children:[S.jsx(kE,{className:"size-5"}),S.jsx("span",{className:"sr-only",children:"Toggle Menu"})]})}),S.jsx(XD,{side:"left",className:"max-w-xs",children:S.jsx(PD,{})})]}),S.jsxs("div",{className:"flex w-full items-center justify-between py-3",children:[S.jsx(ND,{}),S.jsxs("div",{className:"flex items-center gap-4",children:[S.jsx(VD,{}),S.jsx(ED,{})]})]})]}),S.jsx("main",{className:"h-[calc(100vh-var(--topbar-height)-1px)] overflow-auto",children:S.jsx(rb,{children:S.jsx(eh,{})})})]}),S.jsx(Px,{})]})}const ur=ax()({component:YD}),KD="modulepreload",QD=function(a){return"/"+a},Sy={},$e=function(l,r,s){let c=Promise.resolve();if(r&&r.length>0){let d=function(v){return Promise.all(v.map(m=>Promise.resolve(m).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=h?.nonce||h?.getAttribute("nonce");c=d(r.map(v=>{if(v=QD(v),v in Sy)return;Sy[v]=!0;const m=v.endsWith(".css"),g=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${g}`))return;const b=document.createElement("link");if(b.rel=m?"stylesheet":KD,m||(b.as="script"),b.crossOrigin="",b.href=v,p&&b.setAttribute("nonce",p),document.head.appendChild(b),m)return new Promise((x,w)=>{b.addEventListener("load",x),b.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${v}`)))})}))}function f(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return c.then(d=>{for(const h of d||[])h.status==="rejected"&&f(h.reason);return l().catch(f)})},FD=()=>$e(()=>import("./route-C0DpSC86.js"),__vite__mapDeps([0,1,2])),Hb=we("/settings")({component:ze(FD,"component",()=>Hb.ssr),beforeLoad:()=>({getTitle:()=>"Settings"})}),ZD=()=>$e(()=>import("./route-CmgYcJT_.js"),__vite__mapDeps([3,1,2,4])),Pb=we("/plugins")({component:ze(ZD,"component",()=>Pb.ssr),beforeLoad:()=>({getTitle:()=>"Plugins"})}),JD=()=>$e(()=>import("./route-De01FR6I.js"),__vite__mapDeps([5,1,2,4,6,7,8,9,10,11,12])),Vb=we("/data")({component:ze(JD,"component",()=>Vb.ssr)}),WD=()=>$e(()=>import("./route-DwYLJh1Z.js"),__vite__mapDeps([13,1,2,4,14,8])),kb=we("/apps")({component:ze(WD,"component",()=>kb.ssr),beforeLoad:()=>({getTitle:()=>"Apps"})}),e2=()=>$e(()=>import("./index-DbPo0KMc.js"),__vite__mapDeps([15,1,2])),Gb=we("/")({component:ze(e2,"component",()=>Gb.ssr)}),t2=()=>$e(()=>import("./index-ghp0h4jr.js"),__vite__mapDeps([16,1,2])),Xb=we("/settings/")({component:ze(t2,"component",()=>Xb.ssr),beforeLoad:()=>({getTitle:()=>"Project Settings"})}),n2=()=>$e(()=>import("./index-B5VAZnNv.js"),__vite__mapDeps([17,1,2,4,18])),Ib=we("/plugins/")({component:ze(n2,"component",()=>Ib.ssr)}),a2=we("/data/")({beforeLoad:()=>{La({to:"/data/models",throw:!0})}}),i2=()=>$e(()=>import("./index-Lx-c3w3C.js"),__vite__mapDeps([19,1,2,4,14,8])),Yb=we("/apps/")({component:ze(i2,"component",()=>Yb.ssr)}),r2=()=>$e(()=>import("./theme-builder-LEW3UAWc.js"),__vite__mapDeps([20,1,2,4,21,22])),Kb=we("/settings/theme-builder")({component:ze(r2,"component",()=>Kb.ssr),beforeLoad:()=>({getTitle:()=>"Theme Builder"})}),l2=()=>$e(()=>import("./template-extractor-_5pq8PSE.js"),__vite__mapDeps([23,1,2])),Qb=we("/settings/template-extractor")({component:ze(l2,"component",()=>Qb.ssr),beforeLoad:()=>({getTitle:()=>"Template Extractor"})}),s2=()=>$e(()=>import("./hierarchy-CDgBahPq.js"),__vite__mapDeps([24,1,2,4,8])),Fb=we("/settings/hierarchy")({component:ze(s2,"component",()=>Fb.ssr),beforeLoad:()=>({getTitle:()=>"Hierarchy"})}),o2=()=>$e(()=>import("./route-cP4l-WDl.js"),__vite__mapDeps([25,2,1])),c2=we("/data/models")({beforeLoad:()=>({getTitle:()=>"Models"}),notFoundComponent:ze(o2,"notFoundComponent")}),u2=we("/data/enums")({beforeLoad:()=>({getTitle:()=>"Enums"})}),f2=()=>$e(()=>import("./index-CJO9KLcs.js"),__vite__mapDeps([26,1,2,10,11,8,12,4])),Zb=we("/data/models/")({component:ze(f2,"component",()=>Zb.ssr)}),d2=()=>$e(()=>import("./index-HA6UU1kS.js"),__vite__mapDeps([27,1,2,6,7,8,9,4])),Jb=we("/data/enums/")({component:ze(d2,"component",()=>Jb.ssr)}),h2=()=>$e(()=>import("./edit._id-BzfH4jc0.js"),__vite__mapDeps([28,1,2,18])),Wb=we("/plugins/edit/$id")({component:ze(h2,"component",()=>Wb.ssr),beforeLoad:({params:{id:a},context:{schemaParserContext:l}})=>{const{availablePlugins:r}=l.pluginStore,s=r.find(c=>c.metadata.id===a);return s?{getTitle:()=>s.metadata.displayName,plugin:s}:{}},loader:({context:{plugin:a}})=>{if(!a)throw za();return{plugin:a}}}),p2=()=>$e(()=>import("./route-D9aGR6_H.js"),__vite__mapDeps([29,1,2])),{appEntityType:m2}=await ne("@baseplate-dev/project-builder-lib"),eS=we("/apps/edit/$key")({component:ze(p2,"component",()=>eS.ssr),beforeLoad:({params:{key:a},context:{projectDefinition:l}})=>{const r=m2.idFromKey(a),s=r&&l.apps.find(c=>c.id===r);return s?{getTitle:()=>s.name,app:s}:{}},loader:({context:{app:a}})=>{if(!a)throw za();return{app:a}}}),g2=we("/apps/edit/$key/")({loader:({params:{key:a},context:{app:l}})=>{if(!l)throw za();const r=l.type;throw r==="admin"?La({to:"/apps/edit/$key/admin",params:{key:a}}):r==="backend"?La({to:"/apps/edit/$key/backend",params:{key:a}}):r==="web"?La({to:"/apps/edit/$key/web",params:{key:a}}):new Error(`Unknown app type: ${l.type}`)}}),v2=()=>$e(()=>import("./web-BRltYNcY.js"),__vite__mapDeps([30,1,2])),tS=we("/apps/edit/$key/web")({component:ze(v2,"component",()=>tS.ssr),loader:({context:{app:a},params:{key:l}})=>{if(!a)throw za();if(a.type!=="web")throw La({to:"/apps/edit/$key",params:{key:l}});return{appConfig:a}}}),y2=()=>$e(()=>import("./backend-CoTpyUcx.js"),__vite__mapDeps([31,1,2,32])),nS=we("/apps/edit/$key/backend")({component:ze(y2,"component",()=>nS.ssr),loader:({context:{app:a},params:{key:l}})=>{if(!a)throw za();if(a.type!=="backend")throw La({to:"/apps/edit/$key",params:{key:l}});return{backendDefinition:a}}}),b2=()=>$e(()=>import("./route-DzDATEIF.js"),__vite__mapDeps([33,1,2,4,11,8,12])),{modelEntityType:S2,ModelUtils:E2}=await ne("@baseplate-dev/project-builder-lib"),aS=we("/data/models/edit/$key")({component:ze(b2,"component",()=>aS.ssr),beforeLoad:({params:{key:a},context:{projectDefinition:l}})=>{const r=S2.idFromKey(a),s=E2.byId(l,r);return s?{getTitle:()=>s.name,model:s}:{}},loader:({context:{model:a}})=>{if(!a)throw za();return{model:a}}}),R2=()=>$e(()=>import("./route-Ofm_Xk4Q.js"),__vite__mapDeps([34,2,1,4,9,7,8])),{EnumUtils:x2,modelEnumEntityType:w2}=await ne("@baseplate-dev/project-builder-lib"),iS=we("/data/enums/edit/$key")({component:ze(R2,"component",()=>iS.ssr),beforeLoad:({params:{key:a},context:{projectDefinition:l}})=>{const r=w2.idFromKey(a),s=x2.byId(l,r);return s?{getTitle:()=>s.name,enumDefinition:s}:{}},loader:({context:{enumDefinition:a}})=>{if(!a)throw za();return{enumDefinition:a}}}),T2=()=>$e(()=>import("./route-xrfcRWC7.js"),__vite__mapDeps([35,1,2])),rS=we("/apps/edit/$key/admin")({component:ze(T2,"component",()=>rS.ssr),beforeLoad:({context:{app:a},params:{key:l}})=>{if(a?.type!=="admin")throw La({to:"/apps/edit/$key",params:{key:l}});return{adminDefinition:a}}}),_2=()=>$e(()=>import("./index-y6w6FRv9.js"),__vite__mapDeps([36,1,2,37,38,11,8,4,21,39])),{modelEntityType:C2,modelLocalRelationEntityType:D2,modelScalarFieldEntityType:A2}=await ne("@baseplate-dev/project-builder-lib");Tl(C2,"/data/models/edit/{key}");Tl(A2,"/data/models/edit/{parentKey}");Tl(D2,"/data/models/edit/{parentKey}");const lS=we("/data/models/edit/$key/")({component:ze(_2,"component",()=>lS.ssr)}),O2=()=>$e(()=>import("./index-CJK2iGtK.js"),__vite__mapDeps([40,1,2,7,8,4])),sS=we("/data/enums/edit/$key/")({component:ze(O2,"component",()=>sS.ssr)}),j2=()=>$e(()=>import("./index-BYcSgAsc.js"),__vite__mapDeps([41,1,2,32])),oS=we("/apps/edit/$key/admin/")({component:ze(j2,"component",()=>oS.ssr)}),M2=()=>$e(()=>import("./service-CH1p5s9d.js"),__vite__mapDeps([42,1,2,37,38,11,8,43,4])),{modelTransformerEntityType:L2}=await ne("@baseplate-dev/project-builder-lib");Tl(L2,"/data/models/edit/{parentKey}");const cS=we("/data/models/edit/$key/service")({component:ze(M2,"component",()=>cS.ssr),beforeLoad:()=>({getTitle:()=>"Service"})}),N2=()=>$e(()=>import("./graphql-D5k81FHL.js"),__vite__mapDeps([44,1,2,37,38,11,8,4,43])),uS=we("/data/models/edit/$key/graphql")({component:ze(N2,"component",()=>uS.ssr),beforeLoad:()=>({getTitle:()=>"GraphQL"})}),z2=()=>$e(()=>import("./sections-Bl6CBMqu.js"),__vite__mapDeps([45,1,2,8])),{adminSectionEntityType:$2}=await ne("@baseplate-dev/project-builder-lib");Tl($2,"/apps/edit/{parentKey}/sections/edit/{key}");const fS=we("/apps/edit/$key/admin/sections")({component:ze(z2,"component",()=>fS.ssr)}),B2=()=>$e(()=>import("./sections._sectionKey-lnWxksec.js"),__vite__mapDeps([46,1,2,4,8])),{adminSectionEntityType:U2}=await ne("@baseplate-dev/project-builder-lib"),dS=we("/apps/edit/$key/admin/sections/$sectionKey")({component:ze(B2,"component",()=>dS.ssr),loader:({context:{adminDefinition:a},params:{sectionKey:l}})=>{const r=l==="new"?void 0:U2.idFromKey(l),s=r?a.sections?.find(c=>c.id===r):void 0;if(r&&!s)throw za();return{adminDefinition:a,sectionId:r,existingSection:s}}}),Ol=Hb.update({id:"/settings",path:"/settings",getParentRoute:()=>ur}),hh=Pb.update({id:"/plugins",path:"/plugins",getParentRoute:()=>ur}),Bo=Vb.update({id:"/data",path:"/data",getParentRoute:()=>ur}),ph=kb.update({id:"/apps",path:"/apps",getParentRoute:()=>ur}),q2=Gb.update({id:"/",path:"/",getParentRoute:()=>ur}),H2=Xb.update({id:"/",path:"/",getParentRoute:()=>Ol}),P2=Ib.update({id:"/",path:"/",getParentRoute:()=>hh}),V2=a2.update({id:"/",path:"/",getParentRoute:()=>Bo}),k2=Yb.update({id:"/",path:"/",getParentRoute:()=>ph}),G2=Kb.update({id:"/theme-builder",path:"/theme-builder",getParentRoute:()=>Ol}),X2=Qb.update({id:"/template-extractor",path:"/template-extractor",getParentRoute:()=>Ol}),I2=Fb.update({id:"/hierarchy",path:"/hierarchy",getParentRoute:()=>Ol}),mh=c2.update({id:"/models",path:"/models",getParentRoute:()=>Bo}),gh=u2.update({id:"/enums",path:"/enums",getParentRoute:()=>Bo}),Y2=Zb.update({id:"/",path:"/",getParentRoute:()=>mh}),K2=Jb.update({id:"/",path:"/",getParentRoute:()=>gh}),Q2=Wb.update({id:"/edit/$id",path:"/edit/$id",getParentRoute:()=>hh}),jl=eS.update({id:"/edit/$key",path:"/edit/$key",getParentRoute:()=>ph}),F2=g2.update({id:"/",path:"/",getParentRoute:()=>jl}),Z2=tS.update({id:"/web",path:"/web",getParentRoute:()=>jl}),J2=nS.update({id:"/backend",path:"/backend",getParentRoute:()=>jl}),Uo=aS.update({id:"/edit/$key",path:"/edit/$key",getParentRoute:()=>mh}),hS=iS.update({id:"/edit/$key",path:"/edit/$key",getParentRoute:()=>gh}),vh=rS.update({id:"/admin",path:"/admin",getParentRoute:()=>jl}),W2=lS.update({id:"/",path:"/",getParentRoute:()=>Uo}),eA=sS.update({id:"/",path:"/",getParentRoute:()=>hS}),tA=oS.update({id:"/",path:"/",getParentRoute:()=>vh}),nA=cS.update({id:"/service",path:"/service",getParentRoute:()=>Uo}),aA=uS.update({id:"/graphql",path:"/graphql",getParentRoute:()=>Uo}),pS=fS.update({id:"/sections",path:"/sections",getParentRoute:()=>vh}),iA=dS.update({id:"/$sectionKey",path:"/$sectionKey",getParentRoute:()=>pS}),rA={AppsEditKeyAdminSectionsSectionKeyRoute:iA},lA=pS._addFileChildren(rA),sA={AppsEditKeyAdminSectionsRoute:lA,AppsEditKeyAdminIndexRoute:tA},oA=vh._addFileChildren(sA),cA={AppsEditKeyAdminRouteRoute:oA,AppsEditKeyBackendRoute:J2,AppsEditKeyWebRoute:Z2,AppsEditKeyIndexRoute:F2},uA=jl._addFileChildren(cA),fA={AppsIndexRoute:k2,AppsEditKeyRouteRoute:uA},dA=ph._addFileChildren(fA),hA={DataEnumsEditKeyIndexRoute:eA},pA=hS._addFileChildren(hA),mA={DataEnumsIndexRoute:K2,DataEnumsEditKeyRouteRoute:pA},gA=gh._addFileChildren(mA),vA={DataModelsEditKeyGraphqlRoute:aA,DataModelsEditKeyServiceRoute:nA,DataModelsEditKeyIndexRoute:W2},yA=Uo._addFileChildren(vA),bA={DataModelsIndexRoute:Y2,DataModelsEditKeyRouteRoute:yA},SA=mh._addFileChildren(bA),EA={DataEnumsRouteRoute:gA,DataModelsRouteRoute:SA,DataIndexRoute:V2},RA=Bo._addFileChildren(EA),xA={PluginsIndexRoute:P2,PluginsEditIdRoute:Q2},wA=hh._addFileChildren(xA),TA={SettingsHierarchyRoute:I2,SettingsTemplateExtractorRoute:X2,SettingsThemeBuilderRoute:G2,SettingsIndexRoute:H2},_A=Ol._addFileChildren(TA),CA={IndexRoute:q2,AppsRouteRoute:dA,DataRouteRoute:RA,PluginsRouteRoute:wA,SettingsRouteRoute:_A},DA=ur._addFileChildren(CA)._addFileTypes(),{Button:AA,ErrorDisplay:OA}=await ne("@baseplate-dev/ui-components"),jA=({error:a,reset:l})=>S.jsx(OA,{error:a,actions:S.jsx(AA,{onClick:l,children:"Reset"})}),mS=bx({routeTree:DA,defaultNotFoundComponent:hT,defaultErrorComponent:jA,context:{projectDefinition:void 0,schemaParserContext:void 0}}),{ErrorableLoader:MA}=await ne("@baseplate-dev/ui-components"),{useCallback:LA,useEffect:Ey,useMemo:NA,useState:Ry}=await ne("react");function zA({children:a}){const[l,r]=Ry(),[s,c]=Ry(),f=LA(()=>{HC().then(p=>{r(p)}).catch(p=>{c($t(p,"Failed to fetch version info."))})},[]);Ey(()=>(f(),th.on("open",f)),[f]);const d=sb(l?.version);Ey(()=>{l&&d&&d!==l.version&&globalThis.location.reload()},[l,d]);const h=NA(()=>l?{version:l.version,featureFlags:l.featureFlags,userConfig:l.userConfig}:void 0,[l]);return h?S.jsx($b.Provider,{value:h,children:a}):S.jsx(MA,{error:s})}var oo={exports:{}},Lf,xy;function qo(){if(xy)return Lf;xy=1;const a="2.0.0",l=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,s=16,c=l-6;return Lf={MAX_LENGTH:l,MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:a,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Lf}var Nf,wy;function Ho(){if(wy)return Nf;wy=1;var a={};return Nf=typeof process=="object"&&a&&a.NODE_DEBUG&&/\bsemver\b/i.test(a.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{},Nf}var Ty;function Ml(){return Ty||(Ty=1,function(a,l){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:s,MAX_LENGTH:c}=qo(),f=Ho();l=a.exports={};const d=l.re=[],h=l.safeRe=[],p=l.src=[],v=l.safeSrc=[],m=l.t={};let g=0;const b="[a-zA-Z0-9-]",x=[["\\s",1],["\\d",c],[b,s]],w=_=>{for(const[C,U]of x)_=_.split(`${C}*`).join(`${C}{0,${U}}`).split(`${C}+`).join(`${C}{1,${U}}`);return _},R=(_,C,U)=>{const N=w(C),V=g++;f(_,V,C),m[_]=V,p[V]=C,v[V]=N,d[V]=new RegExp(C,U?"g":void 0),h[V]=new RegExp(N,U?"g":void 0)};R("NUMERICIDENTIFIER","0|[1-9]\\d*"),R("NUMERICIDENTIFIERLOOSE","\\d+"),R("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b}*`),R("MAINVERSION",`(${p[m.NUMERICIDENTIFIER]})\\.(${p[m.NUMERICIDENTIFIER]})\\.(${p[m.NUMERICIDENTIFIER]})`),R("MAINVERSIONLOOSE",`(${p[m.NUMERICIDENTIFIERLOOSE]})\\.(${p[m.NUMERICIDENTIFIERLOOSE]})\\.(${p[m.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASEIDENTIFIER",`(?:${p[m.NONNUMERICIDENTIFIER]}|${p[m.NUMERICIDENTIFIER]})`),R("PRERELEASEIDENTIFIERLOOSE",`(?:${p[m.NONNUMERICIDENTIFIER]}|${p[m.NUMERICIDENTIFIERLOOSE]})`),R("PRERELEASE",`(?:-(${p[m.PRERELEASEIDENTIFIER]}(?:\\.${p[m.PRERELEASEIDENTIFIER]})*))`),R("PRERELEASELOOSE",`(?:-?(${p[m.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[m.PRERELEASEIDENTIFIERLOOSE]})*))`),R("BUILDIDENTIFIER",`${b}+`),R("BUILD",`(?:\\+(${p[m.BUILDIDENTIFIER]}(?:\\.${p[m.BUILDIDENTIFIER]})*))`),R("FULLPLAIN",`v?${p[m.MAINVERSION]}${p[m.PRERELEASE]}?${p[m.BUILD]}?`),R("FULL",`^${p[m.FULLPLAIN]}$`),R("LOOSEPLAIN",`[v=\\s]*${p[m.MAINVERSIONLOOSE]}${p[m.PRERELEASELOOSE]}?${p[m.BUILD]}?`),R("LOOSE",`^${p[m.LOOSEPLAIN]}$`),R("GTLT","((?:<|>)?=?)"),R("XRANGEIDENTIFIERLOOSE",`${p[m.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),R("XRANGEIDENTIFIER",`${p[m.NUMERICIDENTIFIER]}|x|X|\\*`),R("XRANGEPLAIN",`[v=\\s]*(${p[m.XRANGEIDENTIFIER]})(?:\\.(${p[m.XRANGEIDENTIFIER]})(?:\\.(${p[m.XRANGEIDENTIFIER]})(?:${p[m.PRERELEASE]})?${p[m.BUILD]}?)?)?`),R("XRANGEPLAINLOOSE",`[v=\\s]*(${p[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[m.XRANGEIDENTIFIERLOOSE]})(?:${p[m.PRERELEASELOOSE]})?${p[m.BUILD]}?)?)?`),R("XRANGE",`^${p[m.GTLT]}\\s*${p[m.XRANGEPLAIN]}$`),R("XRANGELOOSE",`^${p[m.GTLT]}\\s*${p[m.XRANGEPLAINLOOSE]}$`),R("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),R("COERCE",`${p[m.COERCEPLAIN]}(?:$|[^\\d])`),R("COERCEFULL",p[m.COERCEPLAIN]+`(?:${p[m.PRERELEASE]})?(?:${p[m.BUILD]})?(?:$|[^\\d])`),R("COERCERTL",p[m.COERCE],!0),R("COERCERTLFULL",p[m.COERCEFULL],!0),R("LONETILDE","(?:~>?)"),R("TILDETRIM",`(\\s*)${p[m.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",R("TILDE",`^${p[m.LONETILDE]}${p[m.XRANGEPLAIN]}$`),R("TILDELOOSE",`^${p[m.LONETILDE]}${p[m.XRANGEPLAINLOOSE]}$`),R("LONECARET","(?:\\^)"),R("CARETTRIM",`(\\s*)${p[m.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",R("CARET",`^${p[m.LONECARET]}${p[m.XRANGEPLAIN]}$`),R("CARETLOOSE",`^${p[m.LONECARET]}${p[m.XRANGEPLAINLOOSE]}$`),R("COMPARATORLOOSE",`^${p[m.GTLT]}\\s*(${p[m.LOOSEPLAIN]})$|^$`),R("COMPARATOR",`^${p[m.GTLT]}\\s*(${p[m.FULLPLAIN]})$|^$`),R("COMPARATORTRIM",`(\\s*)${p[m.GTLT]}\\s*(${p[m.LOOSEPLAIN]}|${p[m.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",R("HYPHENRANGE",`^\\s*(${p[m.XRANGEPLAIN]})\\s+-\\s+(${p[m.XRANGEPLAIN]})\\s*$`),R("HYPHENRANGELOOSE",`^\\s*(${p[m.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[m.XRANGEPLAINLOOSE]})\\s*$`),R("STAR","(<|>)?=?\\s*\\*"),R("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),R("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(oo,oo.exports)),oo.exports}var zf,_y;function yh(){if(_y)return zf;_y=1;const a=Object.freeze({loose:!0}),l=Object.freeze({});return zf=s=>s?typeof s!="object"?a:s:l,zf}var $f,Cy;function gS(){if(Cy)return $f;Cy=1;const a=/^[0-9]+$/,l=(s,c)=>{const f=a.test(s),d=a.test(c);return f&&d&&(s=+s,c=+c),s===c?0:f&&!d?-1:d&&!f?1:s<c?-1:1};return $f={compareIdentifiers:l,rcompareIdentifiers:(s,c)=>l(c,s)},$f}var Bf,Dy;function Ot(){if(Dy)return Bf;Dy=1;const a=Ho(),{MAX_LENGTH:l,MAX_SAFE_INTEGER:r}=qo(),{safeRe:s,t:c}=Ml(),f=yh(),{compareIdentifiers:d}=gS();class h{constructor(v,m){if(m=f(m),v instanceof h){if(v.loose===!!m.loose&&v.includePrerelease===!!m.includePrerelease)return v;v=v.version}else if(typeof v!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof v}".`);if(v.length>l)throw new TypeError(`version is longer than ${l} characters`);a("SemVer",v,m),this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease;const g=v.trim().match(m.loose?s[c.LOOSE]:s[c.FULL]);if(!g)throw new TypeError(`Invalid Version: ${v}`);if(this.raw=v,this.major=+g[1],this.minor=+g[2],this.patch=+g[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");g[4]?this.prerelease=g[4].split(".").map(b=>{if(/^[0-9]+$/.test(b)){const x=+b;if(x>=0&&x<r)return x}return b}):this.prerelease=[],this.build=g[5]?g[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(v){if(a("SemVer.compare",this.version,this.options,v),!(v instanceof h)){if(typeof v=="string"&&v===this.version)return 0;v=new h(v,this.options)}return v.version===this.version?0:this.compareMain(v)||this.comparePre(v)}compareMain(v){return v instanceof h||(v=new h(v,this.options)),d(this.major,v.major)||d(this.minor,v.minor)||d(this.patch,v.patch)}comparePre(v){if(v instanceof h||(v=new h(v,this.options)),this.prerelease.length&&!v.prerelease.length)return-1;if(!this.prerelease.length&&v.prerelease.length)return 1;if(!this.prerelease.length&&!v.prerelease.length)return 0;let m=0;do{const g=this.prerelease[m],b=v.prerelease[m];if(a("prerelease compare",m,g,b),g===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(g===void 0)return-1;if(g===b)continue;return d(g,b)}while(++m)}compareBuild(v){v instanceof h||(v=new h(v,this.options));let m=0;do{const g=this.build[m],b=v.build[m];if(a("build compare",m,g,b),g===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(g===void 0)return-1;if(g===b)continue;return d(g,b)}while(++m)}inc(v,m,g){if(v.startsWith("pre")){if(!m&&g===!1)throw new Error("invalid increment argument: identifier is empty");if(m){const b=`-${m}`.match(this.options.loose?s[c.PRERELEASELOOSE]:s[c.PRERELEASE]);if(!b||b[1]!==m)throw new Error(`invalid identifier: ${m}`)}}switch(v){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",m,g);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",m,g);break;case"prepatch":this.prerelease.length=0,this.inc("patch",m,g),this.inc("pre",m,g);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",m,g),this.inc("pre",m,g);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const b=Number(g)?1:0;if(this.prerelease.length===0)this.prerelease=[b];else{let x=this.prerelease.length;for(;--x>=0;)typeof this.prerelease[x]=="number"&&(this.prerelease[x]++,x=-2);if(x===-1){if(m===this.prerelease.join(".")&&g===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(b)}}if(m){let x=[m,b];g===!1&&(x=[m]),d(this.prerelease[0],m)===0?isNaN(this.prerelease[1])&&(this.prerelease=x):this.prerelease=x}break}default:throw new Error(`invalid increment argument: ${v}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Bf=h,Bf}var Uf,Ay;function fr(){if(Ay)return Uf;Ay=1;const a=Ot();return Uf=(r,s,c=!1)=>{if(r instanceof a)return r;try{return new a(r,s)}catch(f){if(!c)return null;throw f}},Uf}var qf,Oy;function $A(){if(Oy)return qf;Oy=1;const a=fr();return qf=(r,s)=>{const c=a(r,s);return c?c.version:null},qf}var Hf,jy;function BA(){if(jy)return Hf;jy=1;const a=fr();return Hf=(r,s)=>{const c=a(r.trim().replace(/^[=v]+/,""),s);return c?c.version:null},Hf}var Pf,My;function UA(){if(My)return Pf;My=1;const a=Ot();return Pf=(r,s,c,f,d)=>{typeof c=="string"&&(d=f,f=c,c=void 0);try{return new a(r instanceof a?r.version:r,c).inc(s,f,d).version}catch{return null}},Pf}var Vf,Ly;function qA(){if(Ly)return Vf;Ly=1;const a=fr();return Vf=(r,s)=>{const c=a(r,null,!0),f=a(s,null,!0),d=c.compare(f);if(d===0)return null;const h=d>0,p=h?c:f,v=h?f:c,m=!!p.prerelease.length;if(!!v.prerelease.length&&!m){if(!v.patch&&!v.minor)return"major";if(v.compareMain(p)===0)return v.minor&&!v.patch?"minor":"patch"}const b=m?"pre":"";return c.major!==f.major?b+"major":c.minor!==f.minor?b+"minor":c.patch!==f.patch?b+"patch":"prerelease"},Vf}var kf,Ny;function HA(){if(Ny)return kf;Ny=1;const a=Ot();return kf=(r,s)=>new a(r,s).major,kf}var Gf,zy;function PA(){if(zy)return Gf;zy=1;const a=Ot();return Gf=(r,s)=>new a(r,s).minor,Gf}var Xf,$y;function VA(){if($y)return Xf;$y=1;const a=Ot();return Xf=(r,s)=>new a(r,s).patch,Xf}var If,By;function kA(){if(By)return If;By=1;const a=fr();return If=(r,s)=>{const c=a(r,s);return c&&c.prerelease.length?c.prerelease:null},If}var Yf,Uy;function En(){if(Uy)return Yf;Uy=1;const a=Ot();return Yf=(r,s,c)=>new a(r,c).compare(new a(s,c)),Yf}var Kf,qy;function GA(){if(qy)return Kf;qy=1;const a=En();return Kf=(r,s,c)=>a(s,r,c),Kf}var Qf,Hy;function XA(){if(Hy)return Qf;Hy=1;const a=En();return Qf=(r,s)=>a(r,s,!0),Qf}var Ff,Py;function bh(){if(Py)return Ff;Py=1;const a=Ot();return Ff=(r,s,c)=>{const f=new a(r,c),d=new a(s,c);return f.compare(d)||f.compareBuild(d)},Ff}var Zf,Vy;function IA(){if(Vy)return Zf;Vy=1;const a=bh();return Zf=(r,s)=>r.sort((c,f)=>a(c,f,s)),Zf}var Jf,ky;function YA(){if(ky)return Jf;ky=1;const a=bh();return Jf=(r,s)=>r.sort((c,f)=>a(f,c,s)),Jf}var Wf,Gy;function Po(){if(Gy)return Wf;Gy=1;const a=En();return Wf=(r,s,c)=>a(r,s,c)>0,Wf}var ed,Xy;function Sh(){if(Xy)return ed;Xy=1;const a=En();return ed=(r,s,c)=>a(r,s,c)<0,ed}var td,Iy;function vS(){if(Iy)return td;Iy=1;const a=En();return td=(r,s,c)=>a(r,s,c)===0,td}var nd,Yy;function yS(){if(Yy)return nd;Yy=1;const a=En();return nd=(r,s,c)=>a(r,s,c)!==0,nd}var ad,Ky;function Eh(){if(Ky)return ad;Ky=1;const a=En();return ad=(r,s,c)=>a(r,s,c)>=0,ad}var id,Qy;function Rh(){if(Qy)return id;Qy=1;const a=En();return id=(r,s,c)=>a(r,s,c)<=0,id}var rd,Fy;function bS(){if(Fy)return rd;Fy=1;const a=vS(),l=yS(),r=Po(),s=Eh(),c=Sh(),f=Rh();return rd=(h,p,v,m)=>{switch(p){case"===":return typeof h=="object"&&(h=h.version),typeof v=="object"&&(v=v.version),h===v;case"!==":return typeof h=="object"&&(h=h.version),typeof v=="object"&&(v=v.version),h!==v;case"":case"=":case"==":return a(h,v,m);case"!=":return l(h,v,m);case">":return r(h,v,m);case">=":return s(h,v,m);case"<":return c(h,v,m);case"<=":return f(h,v,m);default:throw new TypeError(`Invalid operator: ${p}`)}},rd}var ld,Zy;function KA(){if(Zy)return ld;Zy=1;const a=Ot(),l=fr(),{safeRe:r,t:s}=Ml();return ld=(f,d)=>{if(f instanceof a)return f;if(typeof f=="number"&&(f=String(f)),typeof f!="string")return null;d=d||{};let h=null;if(!d.rtl)h=f.match(d.includePrerelease?r[s.COERCEFULL]:r[s.COERCE]);else{const x=d.includePrerelease?r[s.COERCERTLFULL]:r[s.COERCERTL];let w;for(;(w=x.exec(f))&&(!h||h.index+h[0].length!==f.length);)(!h||w.index+w[0].length!==h.index+h[0].length)&&(h=w),x.lastIndex=w.index+w[1].length+w[2].length;x.lastIndex=-1}if(h===null)return null;const p=h[2],v=h[3]||"0",m=h[4]||"0",g=d.includePrerelease&&h[5]?`-${h[5]}`:"",b=d.includePrerelease&&h[6]?`+${h[6]}`:"";return l(`${p}.${v}.${m}${g}${b}`,d)},ld}var sd,Jy;function QA(){if(Jy)return sd;Jy=1;class a{constructor(){this.max=1e3,this.map=new Map}get(r){const s=this.map.get(r);if(s!==void 0)return this.map.delete(r),this.map.set(r,s),s}delete(r){return this.map.delete(r)}set(r,s){if(!this.delete(r)&&s!==void 0){if(this.map.size>=this.max){const f=this.map.keys().next().value;this.delete(f)}this.map.set(r,s)}return this}}return sd=a,sd}var od,Wy;function Rn(){if(Wy)return od;Wy=1;const a=/\s+/g;class l{constructor(k,D){if(D=c(D),k instanceof l)return k.loose===!!D.loose&&k.includePrerelease===!!D.includePrerelease?k:new l(k.raw,D);if(k instanceof f)return this.raw=k.value,this.set=[[k]],this.formatted=void 0,this;if(this.options=D,this.loose=!!D.loose,this.includePrerelease=!!D.includePrerelease,this.raw=k.trim().replace(a," "),this.set=this.raw.split("||").map(z=>this.parseRange(z.trim())).filter(z=>z.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const z=this.set[0];if(this.set=this.set.filter(Q=>!R(Q[0])),this.set.length===0)this.set=[z];else if(this.set.length>1){for(const Q of this.set)if(Q.length===1&&_(Q[0])){this.set=[Q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let k=0;k<this.set.length;k++){k>0&&(this.formatted+="||");const D=this.set[k];for(let z=0;z<D.length;z++)z>0&&(this.formatted+=" "),this.formatted+=D[z].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(k){const z=((this.options.includePrerelease&&x)|(this.options.loose&&w))+":"+k,Q=s.get(z);if(Q)return Q;const J=this.options.loose,te=J?p[v.HYPHENRANGELOOSE]:p[v.HYPHENRANGE];k=k.replace(te,W(this.options.includePrerelease)),d("hyphen replace",k),k=k.replace(p[v.COMPARATORTRIM],m),d("comparator trim",k),k=k.replace(p[v.TILDETRIM],g),d("tilde trim",k),k=k.replace(p[v.CARETTRIM],b),d("caret trim",k);let ae=k.split(" ").map(ce=>U(ce,this.options)).join(" ").split(/\s+/).map(ce=>I(ce,this.options));J&&(ae=ae.filter(ce=>(d("loose invalid filter",ce,this.options),!!ce.match(p[v.COMPARATORLOOSE])))),d("range list",ae);const ee=new Map,ie=ae.map(ce=>new f(ce,this.options));for(const ce of ie){if(R(ce))return[ce];ee.set(ce.value,ce)}ee.size>1&&ee.has("")&&ee.delete("");const le=[...ee.values()];return s.set(z,le),le}intersects(k,D){if(!(k instanceof l))throw new TypeError("a Range is required");return this.set.some(z=>C(z,D)&&k.set.some(Q=>C(Q,D)&&z.every(J=>Q.every(te=>J.intersects(te,D)))))}test(k){if(!k)return!1;if(typeof k=="string")try{k=new h(k,this.options)}catch{return!1}for(let D=0;D<this.set.length;D++)if(re(this.set[D],k,this.options))return!0;return!1}}od=l;const r=QA(),s=new r,c=yh(),f=Vo(),d=Ho(),h=Ot(),{safeRe:p,t:v,comparatorTrimReplace:m,tildeTrimReplace:g,caretTrimReplace:b}=Ml(),{FLAG_INCLUDE_PRERELEASE:x,FLAG_LOOSE:w}=qo(),R=X=>X.value==="<0.0.0-0",_=X=>X.value==="",C=(X,k)=>{let D=!0;const z=X.slice();let Q=z.pop();for(;D&&z.length;)D=z.every(J=>Q.intersects(J,k)),Q=z.pop();return D},U=(X,k)=>(d("comp",X,k),X=$(X,k),d("caret",X),X=V(X,k),d("tildes",X),X=O(X,k),d("xrange",X),X=K(X,k),d("stars",X),X),N=X=>!X||X.toLowerCase()==="x"||X==="*",V=(X,k)=>X.trim().split(/\s+/).map(D=>Z(D,k)).join(" "),Z=(X,k)=>{const D=k.loose?p[v.TILDELOOSE]:p[v.TILDE];return X.replace(D,(z,Q,J,te,ae)=>{d("tilde",X,z,Q,J,te,ae);let ee;return N(Q)?ee="":N(J)?ee=`>=${Q}.0.0 <${+Q+1}.0.0-0`:N(te)?ee=`>=${Q}.${J}.0 <${Q}.${+J+1}.0-0`:ae?(d("replaceTilde pr",ae),ee=`>=${Q}.${J}.${te}-${ae} <${Q}.${+J+1}.0-0`):ee=`>=${Q}.${J}.${te} <${Q}.${+J+1}.0-0`,d("tilde return",ee),ee})},$=(X,k)=>X.trim().split(/\s+/).map(D=>H(D,k)).join(" "),H=(X,k)=>{d("caret",X,k);const D=k.loose?p[v.CARETLOOSE]:p[v.CARET],z=k.includePrerelease?"-0":"";return X.replace(D,(Q,J,te,ae,ee)=>{d("caret",X,Q,J,te,ae,ee);let ie;return N(J)?ie="":N(te)?ie=`>=${J}.0.0${z} <${+J+1}.0.0-0`:N(ae)?J==="0"?ie=`>=${J}.${te}.0${z} <${J}.${+te+1}.0-0`:ie=`>=${J}.${te}.0${z} <${+J+1}.0.0-0`:ee?(d("replaceCaret pr",ee),J==="0"?te==="0"?ie=`>=${J}.${te}.${ae}-${ee} <${J}.${te}.${+ae+1}-0`:ie=`>=${J}.${te}.${ae}-${ee} <${J}.${+te+1}.0-0`:ie=`>=${J}.${te}.${ae}-${ee} <${+J+1}.0.0-0`):(d("no pr"),J==="0"?te==="0"?ie=`>=${J}.${te}.${ae}${z} <${J}.${te}.${+ae+1}-0`:ie=`>=${J}.${te}.${ae}${z} <${J}.${+te+1}.0-0`:ie=`>=${J}.${te}.${ae} <${+J+1}.0.0-0`),d("caret return",ie),ie})},O=(X,k)=>(d("replaceXRanges",X,k),X.split(/\s+/).map(D=>P(D,k)).join(" ")),P=(X,k)=>{X=X.trim();const D=k.loose?p[v.XRANGELOOSE]:p[v.XRANGE];return X.replace(D,(z,Q,J,te,ae,ee)=>{d("xRange",X,z,Q,J,te,ae,ee);const ie=N(J),le=ie||N(te),ce=le||N(ae),fe=ce;return Q==="="&&fe&&(Q=""),ee=k.includePrerelease?"-0":"",ie?Q===">"||Q==="<"?z="<0.0.0-0":z="*":Q&&fe?(le&&(te=0),ae=0,Q===">"?(Q=">=",le?(J=+J+1,te=0,ae=0):(te=+te+1,ae=0)):Q==="<="&&(Q="<",le?J=+J+1:te=+te+1),Q==="<"&&(ee="-0"),z=`${Q+J}.${te}.${ae}${ee}`):le?z=`>=${J}.0.0${ee} <${+J+1}.0.0-0`:ce&&(z=`>=${J}.${te}.0${ee} <${J}.${+te+1}.0-0`),d("xRange return",z),z})},K=(X,k)=>(d("replaceStars",X,k),X.trim().replace(p[v.STAR],"")),I=(X,k)=>(d("replaceGTE0",X,k),X.trim().replace(p[k.includePrerelease?v.GTE0PRE:v.GTE0],"")),W=X=>(k,D,z,Q,J,te,ae,ee,ie,le,ce,fe)=>(N(z)?D="":N(Q)?D=`>=${z}.0.0${X?"-0":""}`:N(J)?D=`>=${z}.${Q}.0${X?"-0":""}`:te?D=`>=${D}`:D=`>=${D}${X?"-0":""}`,N(ie)?ee="":N(le)?ee=`<${+ie+1}.0.0-0`:N(ce)?ee=`<${ie}.${+le+1}.0-0`:fe?ee=`<=${ie}.${le}.${ce}-${fe}`:X?ee=`<${ie}.${le}.${+ce+1}-0`:ee=`<=${ee}`,`${D} ${ee}`.trim()),re=(X,k,D)=>{for(let z=0;z<X.length;z++)if(!X[z].test(k))return!1;if(k.prerelease.length&&!D.includePrerelease){for(let z=0;z<X.length;z++)if(d(X[z].semver),X[z].semver!==f.ANY&&X[z].semver.prerelease.length>0){const Q=X[z].semver;if(Q.major===k.major&&Q.minor===k.minor&&Q.patch===k.patch)return!0}return!1}return!0};return od}var cd,e0;function Vo(){if(e0)return cd;e0=1;const a=Symbol("SemVer ANY");class l{static get ANY(){return a}constructor(m,g){if(g=r(g),m instanceof l){if(m.loose===!!g.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),d("comparator",m,g),this.options=g,this.loose=!!g.loose,this.parse(m),this.semver===a?this.value="":this.value=this.operator+this.semver.version,d("comp",this)}parse(m){const g=this.options.loose?s[c.COMPARATORLOOSE]:s[c.COMPARATOR],b=m.match(g);if(!b)throw new TypeError(`Invalid comparator: ${m}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new h(b[2],this.options.loose):this.semver=a}toString(){return this.value}test(m){if(d("Comparator.test",m,this.options.loose),this.semver===a||m===a)return!0;if(typeof m=="string")try{m=new h(m,this.options)}catch{return!1}return f(m,this.operator,this.semver,this.options)}intersects(m,g){if(!(m instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,g).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,g).test(m.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||f(this.semver,"<",m.semver,g)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||f(this.semver,">",m.semver,g)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}cd=l;const r=yh(),{safeRe:s,t:c}=Ml(),f=bS(),d=Ho(),h=Ot(),p=Rn();return cd}var ud,t0;function ko(){if(t0)return ud;t0=1;const a=Rn();return ud=(r,s,c)=>{try{s=new a(s,c)}catch{return!1}return s.test(r)},ud}var fd,n0;function FA(){if(n0)return fd;n0=1;const a=Rn();return fd=(r,s)=>new a(r,s).set.map(c=>c.map(f=>f.value).join(" ").trim().split(" ")),fd}var dd,a0;function ZA(){if(a0)return dd;a0=1;const a=Ot(),l=Rn();return dd=(s,c,f)=>{let d=null,h=null,p=null;try{p=new l(c,f)}catch{return null}return s.forEach(v=>{p.test(v)&&(!d||h.compare(v)===-1)&&(d=v,h=new a(d,f))}),d},dd}var hd,i0;function JA(){if(i0)return hd;i0=1;const a=Ot(),l=Rn();return hd=(s,c,f)=>{let d=null,h=null,p=null;try{p=new l(c,f)}catch{return null}return s.forEach(v=>{p.test(v)&&(!d||h.compare(v)===1)&&(d=v,h=new a(d,f))}),d},hd}var pd,r0;function WA(){if(r0)return pd;r0=1;const a=Ot(),l=Rn(),r=Po();return pd=(c,f)=>{c=new l(c,f);let d=new a("0.0.0");if(c.test(d)||(d=new a("0.0.0-0"),c.test(d)))return d;d=null;for(let h=0;h<c.set.length;++h){const p=c.set[h];let v=null;p.forEach(m=>{const g=new a(m.semver.version);switch(m.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!v||r(g,v))&&(v=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${m.operator}`)}}),v&&(!d||r(d,v))&&(d=v)}return d&&c.test(d)?d:null},pd}var md,l0;function eO(){if(l0)return md;l0=1;const a=Rn();return md=(r,s)=>{try{return new a(r,s).range||"*"}catch{return null}},md}var gd,s0;function xh(){if(s0)return gd;s0=1;const a=Ot(),l=Vo(),{ANY:r}=l,s=Rn(),c=ko(),f=Po(),d=Sh(),h=Rh(),p=Eh();return gd=(m,g,b,x)=>{m=new a(m,x),g=new s(g,x);let w,R,_,C,U;switch(b){case">":w=f,R=h,_=d,C=">",U=">=";break;case"<":w=d,R=p,_=f,C="<",U="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(m,g,x))return!1;for(let N=0;N<g.set.length;++N){const V=g.set[N];let Z=null,$=null;if(V.forEach(H=>{H.semver===r&&(H=new l(">=0.0.0")),Z=Z||H,$=$||H,w(H.semver,Z.semver,x)?Z=H:_(H.semver,$.semver,x)&&($=H)}),Z.operator===C||Z.operator===U||(!$.operator||$.operator===C)&&R(m,$.semver))return!1;if($.operator===U&&_(m,$.semver))return!1}return!0},gd}var vd,o0;function tO(){if(o0)return vd;o0=1;const a=xh();return vd=(r,s,c)=>a(r,s,">",c),vd}var yd,c0;function nO(){if(c0)return yd;c0=1;const a=xh();return yd=(r,s,c)=>a(r,s,"<",c),yd}var bd,u0;function aO(){if(u0)return bd;u0=1;const a=Rn();return bd=(r,s,c)=>(r=new a(r,c),s=new a(s,c),r.intersects(s,c)),bd}var Sd,f0;function iO(){if(f0)return Sd;f0=1;const a=ko(),l=En();return Sd=(r,s,c)=>{const f=[];let d=null,h=null;const p=r.sort((b,x)=>l(b,x,c));for(const b of p)a(b,s,c)?(h=b,d||(d=b)):(h&&f.push([d,h]),h=null,d=null);d&&f.push([d,null]);const v=[];for(const[b,x]of f)b===x?v.push(b):!x&&b===p[0]?v.push("*"):x?b===p[0]?v.push(`<=${x}`):v.push(`${b} - ${x}`):v.push(`>=${b}`);const m=v.join(" || "),g=typeof s.raw=="string"?s.raw:String(s);return m.length<g.length?m:s},Sd}var Ed,d0;function rO(){if(d0)return Ed;d0=1;const a=Rn(),l=Vo(),{ANY:r}=l,s=ko(),c=En(),f=(g,b,x={})=>{if(g===b)return!0;g=new a(g,x),b=new a(b,x);let w=!1;e:for(const R of g.set){for(const _ of b.set){const C=p(R,_,x);if(w=w||C!==null,C)continue e}if(w)return!1}return!0},d=[new l(">=0.0.0-0")],h=[new l(">=0.0.0")],p=(g,b,x)=>{if(g===b)return!0;if(g.length===1&&g[0].semver===r){if(b.length===1&&b[0].semver===r)return!0;x.includePrerelease?g=d:g=h}if(b.length===1&&b[0].semver===r){if(x.includePrerelease)return!0;b=h}const w=new Set;let R,_;for(const O of g)O.operator===">"||O.operator===">="?R=v(R,O,x):O.operator==="<"||O.operator==="<="?_=m(_,O,x):w.add(O.semver);if(w.size>1)return null;let C;if(R&&_){if(C=c(R.semver,_.semver,x),C>0)return null;if(C===0&&(R.operator!==">="||_.operator!=="<="))return null}for(const O of w){if(R&&!s(O,String(R),x)||_&&!s(O,String(_),x))return null;for(const P of b)if(!s(O,String(P),x))return!1;return!0}let U,N,V,Z,$=_&&!x.includePrerelease&&_.semver.prerelease.length?_.semver:!1,H=R&&!x.includePrerelease&&R.semver.prerelease.length?R.semver:!1;$&&$.prerelease.length===1&&_.operator==="<"&&$.prerelease[0]===0&&($=!1);for(const O of b){if(Z=Z||O.operator===">"||O.operator===">=",V=V||O.operator==="<"||O.operator==="<=",R){if(H&&O.semver.prerelease&&O.semver.prerelease.length&&O.semver.major===H.major&&O.semver.minor===H.minor&&O.semver.patch===H.patch&&(H=!1),O.operator===">"||O.operator===">="){if(U=v(R,O,x),U===O&&U!==R)return!1}else if(R.operator===">="&&!s(R.semver,String(O),x))return!1}if(_){if($&&O.semver.prerelease&&O.semver.prerelease.length&&O.semver.major===$.major&&O.semver.minor===$.minor&&O.semver.patch===$.patch&&($=!1),O.operator==="<"||O.operator==="<="){if(N=m(_,O,x),N===O&&N!==_)return!1}else if(_.operator==="<="&&!s(_.semver,String(O),x))return!1}if(!O.operator&&(_||R)&&C!==0)return!1}return!(R&&V&&!_&&C!==0||_&&Z&&!R&&C!==0||H||$)},v=(g,b,x)=>{if(!g)return b;const w=c(g.semver,b.semver,x);return w>0?g:w<0||b.operator===">"&&g.operator===">="?b:g},m=(g,b,x)=>{if(!g)return b;const w=c(g.semver,b.semver,x);return w<0?g:w>0||b.operator==="<"&&g.operator==="<="?b:g};return Ed=f,Ed}var Rd,h0;function lO(){if(h0)return Rd;h0=1;const a=Ml(),l=qo(),r=Ot(),s=gS(),c=fr(),f=$A(),d=BA(),h=UA(),p=qA(),v=HA(),m=PA(),g=VA(),b=kA(),x=En(),w=GA(),R=XA(),_=bh(),C=IA(),U=YA(),N=Po(),V=Sh(),Z=vS(),$=yS(),H=Eh(),O=Rh(),P=bS(),K=KA(),I=Vo(),W=Rn(),re=ko(),X=FA(),k=ZA(),D=JA(),z=WA(),Q=eO(),J=xh(),te=tO(),ae=nO(),ee=aO(),ie=iO(),le=rO();return Rd={parse:c,valid:f,clean:d,inc:h,diff:p,major:v,minor:m,patch:g,prerelease:b,compare:x,rcompare:w,compareLoose:R,compareBuild:_,sort:C,rsort:U,gt:N,lt:V,eq:Z,neq:$,gte:H,lte:O,cmp:P,coerce:K,Comparator:I,Range:W,satisfies:re,toComparators:X,maxSatisfying:k,minSatisfying:D,minVersion:z,validRange:Q,outside:J,gtr:te,ltr:ae,intersects:ee,simplifyRange:ie,subset:le,SemVer:r,re:a.re,src:a.src,tokens:a.t,SEMVER_SPEC_VERSION:l.SEMVER_SPEC_VERSION,RELEASE_TYPES:l.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers},Rd}var sO=lO();const oO=Xd(sO),{createPluginImplementationStore:cO,isMigrateableProjectDefinition:uO,ProjectDefinitionContainer:fO,runPluginMigrations:dO,runSchemaMigrations:hO,SchemaMigrationError:pO}=await ne("@baseplate-dev/project-builder-lib"),{ZodError:mO}=await ne("zod");function gO(a,l){try{const r=JSON.parse(a);if(!uO(r))throw new aa("The project configuration is not valid project definition with a schemaVersion property. Please check the file and try again.");const{migratedDefinition:s}=hO(r),c=cO(l.pluginStore,s),f=dO(s,c);return fO.fromSerializedConfig(f,l)}catch(r){throw r instanceof SyntaxError?new aa("The project configuration is not a valid JSON file. Please check the file and try again."):r instanceof mO?new aa(`The project configuration is not valid: ${Uw(r)}`):r instanceof pO?new aa(r.message):r}}const{useCallback:vO,useEffect:yO,useMemo:bO,useRef:SO}=await ne("react");function EO({schemaParserContext:a,projectDefinitionFilePayload:l}){const r=SO(void 0),{projectDefinitionContainer:s,error:c}=bO(()=>{try{return!a||!l?{projectDefinitionContainer:void 0,error:void 0}:r.current?.contents===l.contents?{projectDefinitionContainer:{container:r.current.container,hash:l.hash},error:void 0}:{projectDefinitionContainer:{container:gO(l.contents,a),hash:l.hash},error:void 0}}catch(f){return{projectDefinitionContainer:void 0,error:f}}},[a,l]);return yO(()=>{c&&console.error(c)},[c]),{projectDefinitionContainer:s?.container,cacheProjectDefinitionContainer:vO((f,d)=>{r.current={container:f,contents:d}},[]),error:c}}class RO{projectId;_definitionFileContentsHash;_pendingDefinitionFileContentsHash;constructor(l){this.projectId=l}async downloadDefinitionContents(){const{contents:l,hash:r}=await LC(this.projectId),s=this._pendingDefinitionFileContentsHash!==r&&this._definitionFileContentsHash!==r;return this._definitionFileContentsHash=r,{contents:l,hash:r,updatedExternally:s}}async uploadDefinitionContents(l){if(!this._definitionFileContentsHash)throw new Error("Definition file must be downloaded before uploading");if(this._pendingDefinitionFileContentsHash)throw new Error("Only one upload can be pending at a time. Please wait for the current upload to complete before uploading again.");try{this._pendingDefinitionFileContentsHash=await nb(l);const r=await NC(this.projectId,l,this._definitionFileContentsHash);return r.type==="original-contents-mismatch"?(this._definitionFileContentsHash=r.currentPayload.hash,{contents:r.currentPayload.contents,hash:r.currentPayload.hash,updatedExternally:!0}):(this._definitionFileContentsHash=this._pendingDefinitionFileContentsHash,{contents:l,hash:this._pendingDefinitionFileContentsHash,updatedExternally:!1})}finally{this._pendingDefinitionFileContentsHash=void 0}}listenForDefinitionFileChanges(l){return zC(this.projectId,r=>{this._definitionFileContentsHash!==r.hash&&(this._definitionFileContentsHash=r.hash,l({contents:r.contents,hash:r.hash,updatedExternally:this._pendingDefinitionFileContentsHash!==r.hash}))})}}const{useCallback:xO,useEffect:wO,useState:xd}=await ne("react");function TO(){const[a,l]=xd(),[r,s]=xd(),[c,f]=xd(),{currentProjectId:d,projectsLoaded:h,resetCurrentProjectId:p}=vn();wO(()=>{if(l(void 0),s(void 0),!d||!h){f(void 0);return}const m=new RO(d);return f(m),m.downloadDefinitionContents().then(g=>{l(g)}).catch(g=>{g instanceof Co?p():s(g)}),m.listenForDefinitionFileChanges(g=>{l(g)})},[d,h,p]);const v=xO(async m=>{if(!c)throw new Error("Project definition file manager not found");await c.uploadDefinitionContents(m).then(g=>{l(g)}).catch(g=>{throw g instanceof Co&&p(),g})},[c,p]);return{projectDefinitionFilePayload:a,uploadProjectDefinitionContents:v,error:r}}function _O(a,l){return()=>{}}const SS={placeholder:{url:"http://localhost:3001/remoteEntry.js",format:"esm",from:"vite"}},p0={},CO=async(a,l)=>{const r=typeof a=="function"?await a():a,s=document.createElement("script");s.type="text/javascript",s.onload=l,s.src=r,document.getElementsByTagName("head")[0].appendChild(s)};function Yi(a,l){return DO(a).then(r=>()=>l==="webpack"&&Object.prototype.toString.call(r).indexOf("Module")>-1&&r.default?r.default:r)}function ES(a,l){const r=Object.assign(a,l);for(const s of Object.keys(r))typeof r[s]=="object"&&typeof l[s]=="object"&&(r[s]=ES(r[s],l[s]));return r}const m0=a=>ES({react:{"19.1.0":{get:()=>Yi(new URL("__federation_shared_react-CTQ9xfiH.js",import.meta.url).href,a),loaded:1}},"react-dom":{"19.1.0":{get:()=>Yi(new URL("__federation_shared_react-dom-DPv53nVg.js",import.meta.url).href,a),loaded:1}},zod:{"3.24.1":{get:()=>Yi(new URL("__federation_shared_zod-DQ8g46gT.js",import.meta.url).href,a),loaded:1}},"@baseplate-dev/project-builder-lib":{"*":{get:()=>Yi(new URL("__federation_shared_@baseplate-dev/project-builder-lib-ByoEPRxY.js",import.meta.url).href,a),loaded:1}},"@baseplate-dev/project-builder-lib/web":{"*":{get:()=>Yi(new URL("__federation_shared_@baseplate-dev/project-builder-lib/web-BEiksgOM.js",import.meta.url).href,a),loaded:1}},"@baseplate-dev/ui-components":{"*":{get:()=>Yi(new URL("__federation_shared_@baseplate-dev/ui-components-2ByEN20H.js",import.meta.url).href,a),loaded:1}}},(globalThis.__federation_shared__||{}).default||{});async function DO(a){return p0[a]??=import(a),p0[a]}async function AO(a){const l=SS[a];if(l.inited)return l.lib;if(l.format==="var")return new Promise(r=>{const s=()=>{l.inited||(l.lib=window[a],l.lib.init(m0(l.from)),l.inited=!0),r(l.lib)};return CO(l.url,s)});if(["esm","systemjs"].includes(l.format))return new Promise((r,s)=>{(typeof l.url=="function"?l.url:()=>Promise.resolve(l.url))().then(f=>{import(f).then(d=>{if(!l.inited){const h=m0(l.from);d.init(h),l.lib=d,l.lib.init(h),l.inited=!0}r(l.lib)}).catch(s)})})}function OO(a){return a?.__esModule||a?.[Symbol.toStringTag]==="Module"?a.default:a}function jO(a,l){return AO(a).then(r=>r.get(l).then(s=>s()))}function MO(a,l){SS[a]=l}let RS=Math.random();function LO(){RS=Math.random()}async function NO(a,l){const r=`${a}/${l.id}`,s=`/api/plugins/${a}/${l.id}/web/assets/remoteEntry.js?rnd=${RS}`;return MO(r,{url:s,externalType:"url",format:"esm",from:"vite"}),(await Promise.all(l.webModulePaths.map(h=>jO(r,h)))).map(h=>OO(h)).map((h,p)=>({key:l.webModulePaths[p],module:h}))}const{webConfigSpec:zO}=await ne("@baseplate-dev/project-builder-lib"),{adminCrudInputWebSpec:$O,modelTransformerWebSpec:BO}=await ne("@baseplate-dev/project-builder-lib/web");async function UO(a,l){return{pluginStore:{availablePlugins:await Promise.all(l.map(async r=>{const s=await NO(a,r);return{metadata:r,modules:s}})),builtinSpecImplementations:[zO,BO,$O]}}}class qO{projectId;_pluginsMetadata;_schemaParserContext;constructor(l){this.projectId=l}async loadSchemaParserContext(){return this._pluginsMetadata??=await MC(this.projectId),LO(),this._schemaParserContext=await UO(this.projectId,this._pluginsMetadata),this._schemaParserContext}listenForPluginAssetsChanges(l,r){return _O()}}const{toast:g0}=await ne("@baseplate-dev/ui-components"),{useEffect:HO,useState:v0}=await ne("react");function PO(){const{currentProjectId:a,projectsLoaded:l}=vn(),[r,s]=v0(void 0),[c,f]=v0();return HO(()=>{if(s(void 0),f(void 0),!a||!l)return;const d=new qO(a);return d.loadSchemaParserContext().then(h=>{s(h)}).catch(h=>{g0.error($t(h)),f(h)}),d.listenForPluginAssetsChanges(h=>{s(h)},h=>{g0.error($t(h))})},[a,l]),{schemaParserContext:r,error:c}}const y0=(a,l,r)=>{if(a&&"reportValidity"in a){const s=Cd(r,l);a.setCustomValidity(s&&s.message||""),a.reportValidity()}},xS=(a,l)=>{for(const r in l.fields){const s=l.fields[r];s&&s.ref&&"reportValidity"in s.ref?y0(s.ref,r,a):s&&s.refs&&s.refs.forEach(c=>y0(c,r,a))}},VO=(a,l)=>{l.shouldUseNativeValidation&&xS(a,l);const r={};for(const s in a){const c=Cd(l.fields,s),f=Object.assign(a[s]||{},{ref:c&&c.ref});if(kO(l.names||Object.keys(a),s)){const d=Object.assign({},Cd(r,s));Zu(d,"root",f),Zu(r,s,d)}else Zu(r,s,f)}return r},kO=(a,l)=>{const r=b0(l);return a.some(s=>b0(s).match(`^${r}\\.\\d+`))};function b0(a){return a.replace(/\]|\[/g,"")}function GO(a,l){for(var r={};a.length;){var s=a[0],c=s.code,f=s.message,d=s.path.join(".");if(!r[d])if("unionErrors"in s){var h=s.unionErrors[0].errors[0];r[d]={message:h.message,type:h.code}}else r[d]={message:f,type:c};if("unionErrors"in s&&s.unionErrors.forEach(function(m){return m.errors.forEach(function(g){return a.push(g)})}),l){var p=r[d].types,v=p&&p[s.code];r[d]=NE(d,l,r,c,v?[].concat(v,s.message):s.message)}a.shift()}return r}function XO(a,l,r){return r===void 0&&(r={}),function(s,c,f){try{return Promise.resolve(function(d,h){try{var p=Promise.resolve(a[r.mode==="sync"?"parse":"parseAsync"](s,l)).then(function(v){return f.shouldUseNativeValidation&&xS({},f),{errors:{},values:r.raw?Object.assign({},s):v}})}catch(v){return h(v)}return p&&p.then?p.then(void 0,h):p}(0,function(d){if(function(h){return Array.isArray(h?.errors)}(d))return{values:{},errors:VO(GO(d.errors,!f.shouldUseNativeValidation&&f.criteriaMode==="all"),f)};throw d}))}catch(d){return Promise.reject(d)}}}const{generalSettingsSchema:IO}=await ne("@baseplate-dev/project-builder-lib"),{Button:YO,Card:KO,CardContent:QO,InputFieldController:S0,toast:FO}=await ne("@baseplate-dev/ui-components");function ZO({existingProject:a,saveProject:l}){const{control:r,handleSubmit:s,formState:{isSubmitting:c}}=zE({defaultValues:a?.settings.general,resolver:XO(IO)}),f=s(d=>{l(d).catch(h=>{FO.error($t(h,"Failed to save project"))})});return S.jsx(KO,{className:"w-80 animate-in fade-in zoom-in-70 sm:w-120",children:S.jsxs(QO,{className:"flex flex-col space-y-4",children:[S.jsx("img",{className:"mx-auto w-16",src:"/images/logo.png",alt:"Baseplate Logo"}),S.jsxs("div",{className:"space-y-2",children:[S.jsx("h1",{className:"text-center",children:"Welcome to Baseplate"}),S.jsx("p",{className:"text-center text-style-lead",children:"Let's get you set up!"})]}),S.jsxs("form",{onSubmit:f,className:"flex flex-col space-y-4",children:[S.jsx(S0,{name:"name",label:"Project Name",description:"Lowercase letters and dashes, e.g. my-project",control:r,placeholder:"e.g. my-project"}),S.jsx(S0,{name:"portOffset",label:"Port Offset",description:"Multiple of 1000, e.g. 4000. This will offset the ports used by the project, e.g. API at 4001, database at 4432, to avoid conflicts with other projects.",control:r,registerOptions:{valueAsNumber:!0}}),S.jsx(YO,{className:"mx-auto",type:"submit",disabled:c,children:"Initialize Project"})]})]})})}const{createDefinitionSchemaParserContext:JO,createPluginImplementationStore:E0,createProjectDefinitionSchema:WO,fixRefDeletions:ej,ProjectDefinitionContainer:tj}=await ne("@baseplate-dev/project-builder-lib"),{ProjectDefinitionContext:nj}=await ne("@baseplate-dev/project-builder-lib/web"),{Button:wd,ErrorableLoader:aj,ErrorDisplay:ij,toast:R0}=await ne("@baseplate-dev/ui-components"),{useEffect:rj,useMemo:lj,useRef:sj,useState:oj}=await ne("react");function cj({children:a}){const{schemaParserContext:l,error:r}=PO(),{projectDefinitionFilePayload:s,uploadProjectDefinitionContents:c,error:f}=TO(),{projectDefinitionContainer:d,error:h,cacheProjectDefinitionContainer:p}=EO({schemaParserContext:l,projectDefinitionFilePayload:s}),{projects:v,resetCurrentProjectId:m}=vn(),{version:g}=Bb(),{showRefIssues:b}=mT(),[x,w]=oj(!1);VC();const R=!!s?.updatedExternally,_=lj(()=>{if(!d||!l)return;const{definition:N}=d,V=l;async function Z(H){w(!0);try{const O=IE(N,H),P=E0(V.pluginStore,O),K=ej(WO,O,{plugins:P});if(K.type==="failure")throw new kv(K.issues);const I=K.value;I.cliVersion=g;const W=new tj(K.refPayload,V,P),re=W.toSerializedContents();p(W,re),await c(re)}finally{w(!1)}}async function $(H,O={}){return Z(H).then(()=>(R0.success(O.successMessage??"Successfully saved!"),O.onSuccess?.(),{success:!0})).catch(P=>(P instanceof kv&&!O.disableDeleteRefDialog?b({issues:P.issues}):R0.error($t(P,"Failed to save project definition.")),{success:!1}))}return{definition:N,definitionContainer:d,saveDefinition:Z,saveDefinitionWithFeedback:$,saveDefinitionWithFeedbackSync:(H,O)=>{$(H,O)},isSavingDefinition:x,pluginContainer:d.pluginStore,schemaParserContext:l,updatedExternally:R,definitionSchemaParserContext:JO({plugins:E0(l.pluginStore,N)})}},[g,d,x,l,R,c,b,p]),C=sj(_?.definition);rj(()=>{_?.definition&&(C.current!==_.definition&&mS.invalidate().catch($t),C.current=_.definition)},[_?.definition]);const U=r??f??h;return _?_.definition.isInitialized?_.definition.cliVersion&&g&&g!=="preview"&&oO.gt(_.definition.cliVersion,g)?S.jsx(ij,{header:"Upgrade your Baseplate client",actions:S.jsxs("div",{className:"flex flex-col space-y-4",children:[S.jsx(wd,{onClick:()=>{globalThis.location.reload()},children:"Refresh Page"}),v.length>1&&S.jsx(wd,{variant:"secondary",onClick:()=>{m()},children:"Switch Project"})]}),error:S.jsxs(S.Fragment,{children:["This project requires a newer version of the client (",_.definition.cliVersion,"). Please upgrade your client by running ",S.jsx("strong",{children:"pnpm install"}),"."]})}):S.jsx(nj.Provider,{value:_,children:a}):S.jsx("div",{className:"flex h-full items-center justify-center",children:S.jsx(ZO,{existingProject:_.definition,saveProject:async N=>{await _.saveDefinition(V=>{V.settings.general={...N,packageScope:""},V.isInitialized=!0})}})}):S.jsx(aj,{error:U&&ir(U,""),header:"Failed to load project config",actions:S.jsx("div",{className:"flex flex-col space-y-4",children:v.length>1&&S.jsx(wd,{variant:"secondary",onClick:()=>{m()},children:"Switch Project"})})})}const{Button:x0,Dialog:uj,DialogContent:fj,DialogDescription:dj,DialogHeader:hj,DialogTitle:pj,Table:mj,TableBody:gj,TableCell:Td,TableHead:_d,TableHeader:vj,TableRow:w0}=await ne("@baseplate-dev/ui-components");function yj({onClose:a,isOpen:l}){const{currentProjectId:r,setCurrentProjectId:s,projects:c}=vn();return S.jsx(uj,{onOpenChange:a??(()=>{}),open:l,children:S.jsxs(fj,{width:"lg",children:[S.jsxs(hj,{children:[S.jsx(pj,{children:"Pick Project"}),S.jsx(dj,{children:"Select a project to continue."})]}),S.jsxs(mj,{children:[S.jsx(vj,{children:S.jsxs(w0,{children:[S.jsx(_d,{children:"Name"}),S.jsx(_d,{children:"Directory"}),S.jsx(_d,{})]})}),S.jsx(gj,{children:c.map(f=>S.jsxs(w0,{children:[S.jsx(Td,{children:S.jsx("strong",{children:f.name})}),S.jsx(Td,{children:f.directory}),S.jsx(Td,{children:r===f.id?S.jsx(x0,{variant:"link",disabled:!0,children:"Selected"}):S.jsx(x0,{variant:"link",onClick:()=>{s(f.id),history.pushState(null,"","/"),a&&a()},children:"Select"})})]},f.id))})]})]})})}const{ErrorableLoader:bj}=await ne("@baseplate-dev/ui-components"),{useEffect:T0,useState:Sj}=await ne("react");function Ej({children:a}){const[l,r]=Sj(),{currentProjectId:s,projectsLoaded:c,setProjects:f}=vn();return T0(()=>{$C().then(d=>{f(d)}).catch(d=>{r($t(d,"Failed to fetch projects."))})},[f]),T0(()=>{G0(s)},[s]),c?s?S.jsx(S.Fragment,{children:a}):S.jsx(yj,{isOpen:!0}):S.jsx(bj,{error:l})}const{ErrorHandlerContext:Rj,useProjectDefinition:xj}=await ne("@baseplate-dev/project-builder-lib/web"),{ConfirmDialog:wj,Toaster:Tj,TooltipProvider:_j}=await ne("@baseplate-dev/ui-components"),{useMemo:Cj}=await ne("react");function Dj(){const{definition:a,schemaParserContext:l}=xj();return S.jsx(Rx,{router:mS,context:{projectDefinition:a,schemaParserContext:l}})}function Aj(){const a=Cj(()=>({formatError:ir,logAndFormatError:$t,logError:bl}),[]);return S.jsx(rb,{children:S.jsx(Rj.Provider,{value:a,children:S.jsxs(_j,{children:[S.jsx(zA,{children:S.jsx(Ej,{children:S.jsxs(cj,{children:[S.jsx(Dj,{}),S.jsx(OT,{})]})})}),S.jsx(Tj,{}),S.jsx(wj,{})]})})})}const Oj=await ne("react"),wS=document.querySelector("#root");if(!wS)throw new Error("Failed to find root element");const jj=ZE.createRoot(wS);jj.render(S.jsx(Oj.StrictMode,{children:S.jsx(Aj,{})}));export{dS as A,qj as C,Hj as E,qb as H,Sn as I,ri as L,hT as N,eh as O,Wb as R,Qj as S,aa as U,rb as a,vn as b,Lo as c,mT as d,Fj as e,eS as f,tS as g,nS as h,aS as i,iS as j,rS as k,$t as l,Zj as m,lS as n,sS as o,Pj as p,oS as q,Tl as r,XO as s,yt as t,xt as u,cS as v,sb as w,uS as x,fS as y,bo as z};
|
|
58
|
+
//# sourceMappingURL=index-VsI1zxbc.js.map
|