@praudent/dagma 0.0.0-stage → 0.1.0

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.
Files changed (177) hide show
  1. package/dist/admin-ui/assets/index-CHJ8lsZp.js +120 -0
  2. package/dist/admin-ui/assets/index-XyqtD-IA.css +1 -0
  3. package/dist/admin-ui/index.html +12 -0
  4. package/dist/blueprint/agent.d.ts +148 -0
  5. package/dist/blueprint/agent.js +1 -0
  6. package/dist/blueprint/declaration-site.d.ts +7 -0
  7. package/dist/blueprint/declaration-site.js +8 -0
  8. package/dist/blueprint/declared-structure.d.ts +145 -0
  9. package/dist/blueprint/declared-structure.js +213 -0
  10. package/dist/blueprint/define-run-state.d.ts +79 -0
  11. package/dist/blueprint/define-run-state.js +89 -0
  12. package/dist/blueprint/load-blueprint.d.ts +28 -0
  13. package/dist/blueprint/load-blueprint.js +85 -0
  14. package/dist/blueprint/outcomes.d.ts +76 -0
  15. package/dist/blueprint/outcomes.js +10 -0
  16. package/dist/blueprint/phase.d.ts +153 -0
  17. package/dist/blueprint/phase.js +1 -0
  18. package/dist/blueprint/places.d.ts +26 -0
  19. package/dist/blueprint/places.js +37 -0
  20. package/dist/blueprint/prompt-file.d.ts +81 -0
  21. package/dist/blueprint/prompt-file.js +131 -0
  22. package/dist/blueprint/reply-reader.d.ts +36 -0
  23. package/dist/blueprint/reply-reader.js +38 -0
  24. package/dist/blueprint/run-settings.d.ts +38 -0
  25. package/dist/blueprint/run-settings.js +1 -0
  26. package/dist/blueprint/serializer.d.ts +14 -0
  27. package/dist/blueprint/serializer.js +4 -0
  28. package/dist/blueprint/write-scope.d.ts +39 -0
  29. package/dist/blueprint/write-scope.js +106 -0
  30. package/dist/command.d.ts +2 -0
  31. package/dist/command.js +148 -0
  32. package/dist/commands/calls-answering.d.ts +16 -0
  33. package/dist/commands/calls-answering.js +63 -0
  34. package/dist/commands/json-file.d.ts +6 -0
  35. package/dist/commands/json-file.js +19 -0
  36. package/dist/commands/run-command.d.ts +23 -0
  37. package/dist/commands/run-command.js +172 -0
  38. package/dist/commands/typed-answers.d.ts +10 -0
  39. package/dist/commands/typed-answers.js +43 -0
  40. package/dist/config.d.ts +27 -0
  41. package/dist/config.js +20 -0
  42. package/dist/devtool-server/app-pages.d.ts +12 -0
  43. package/dist/devtool-server/app-pages.js +68 -0
  44. package/dist/devtool-server/blueprint-description.d.ts +21 -0
  45. package/dist/devtool-server/blueprint-description.js +27 -0
  46. package/dist/devtool-server/connected-runs.d.ts +36 -0
  47. package/dist/devtool-server/connected-runs.js +201 -0
  48. package/dist/devtool-server/devtool-server.d.ts +17 -0
  49. package/dist/devtool-server/devtool-server.js +294 -0
  50. package/dist/devtool-server/devtool-shapes.d.ts +312 -0
  51. package/dist/devtool-server/devtool-shapes.js +24 -0
  52. package/dist/devtool-server/listed-runs.d.ts +17 -0
  53. package/dist/devtool-server/listed-runs.js +42 -0
  54. package/dist/devtool-server/print-blueprint.d.ts +1 -0
  55. package/dist/devtool-server/print-blueprint.js +36 -0
  56. package/dist/example/added-species.d.ts +21 -0
  57. package/dist/example/added-species.js +19 -0
  58. package/dist/example/cover.d.ts +21 -0
  59. package/dist/example/cover.js +67 -0
  60. package/dist/example/cross-references.d.ts +21 -0
  61. package/dist/example/cross-references.js +77 -0
  62. package/dist/example/entry-drafts.d.ts +21 -0
  63. package/dist/example/entry-drafts.js +63 -0
  64. package/dist/example/entry-merge.d.ts +108 -0
  65. package/dist/example/entry-merge.js +284 -0
  66. package/dist/example/field-guide.d.ts +26 -0
  67. package/dist/example/field-guide.js +40 -0
  68. package/dist/example/guide-page.d.ts +21 -0
  69. package/dist/example/guide-page.js +15 -0
  70. package/dist/example/missing-species.d.ts +21 -0
  71. package/dist/example/missing-species.js +59 -0
  72. package/dist/example/run-state.d.ts +803 -0
  73. package/dist/example/run-state.js +58 -0
  74. package/dist/example/serializers.d.ts +32 -0
  75. package/dist/example/serializers.js +42 -0
  76. package/dist/example/species-list.d.ts +47 -0
  77. package/dist/example/species-list.js +93 -0
  78. package/dist/index.d.ts +35 -0
  79. package/dist/index.js +25 -0
  80. package/dist/inference/anthropic-api.d.ts +37 -0
  81. package/dist/inference/anthropic-api.js +197 -0
  82. package/dist/inference/anthropic-prices.d.ts +18 -0
  83. package/dist/inference/anthropic-prices.js +39 -0
  84. package/dist/inference/anthropic-request.d.ts +51 -0
  85. package/dist/inference/anthropic-request.js +208 -0
  86. package/dist/inference/bedrock-api.d.ts +45 -0
  87. package/dist/inference/bedrock-api.js +242 -0
  88. package/dist/inference/bedrock-prices.d.ts +22 -0
  89. package/dist/inference/bedrock-prices.js +79 -0
  90. package/dist/inference/bedrock-request.d.ts +27 -0
  91. package/dist/inference/bedrock-request.js +193 -0
  92. package/dist/inference/call-queue-shapes.d.ts +273 -0
  93. package/dist/inference/call-queue-shapes.js +82 -0
  94. package/dist/inference/call-queue.d.ts +109 -0
  95. package/dist/inference/call-queue.js +408 -0
  96. package/dist/inference/gemini-api.d.ts +44 -0
  97. package/dist/inference/gemini-api.js +191 -0
  98. package/dist/inference/gemini-prices.d.ts +19 -0
  99. package/dist/inference/gemini-prices.js +33 -0
  100. package/dist/inference/gemini-request.d.ts +25 -0
  101. package/dist/inference/gemini-request.js +126 -0
  102. package/dist/inference/inference.d.ts +84 -0
  103. package/dist/inference/inference.js +9 -0
  104. package/dist/inference/openai-api.d.ts +29 -0
  105. package/dist/inference/openai-api.js +138 -0
  106. package/dist/inference/openai-prices.d.ts +12 -0
  107. package/dist/inference/openai-prices.js +25 -0
  108. package/dist/inference/openai-request.d.ts +50 -0
  109. package/dist/inference/openai-request.js +100 -0
  110. package/dist/inference/own-worker.d.ts +6 -0
  111. package/dist/inference/own-worker.js +16 -0
  112. package/dist/inference/scripted.d.ts +146 -0
  113. package/dist/inference/scripted.js +67 -0
  114. package/dist/run/assignments/agent-call.d.ts +32 -0
  115. package/dist/run/assignments/agent-call.js +218 -0
  116. package/dist/run/assignments/agent-phase.d.ts +14 -0
  117. package/dist/run/assignments/agent-phase.js +243 -0
  118. package/dist/run/assignments/assignment-memory.d.ts +42 -0
  119. package/dist/run/assignments/assignment-memory.js +52 -0
  120. package/dist/run/assignments/assignment.d.ts +17 -0
  121. package/dist/run/assignments/assignment.js +252 -0
  122. package/dist/run/assignments/model-settings.d.ts +39 -0
  123. package/dist/run/assignments/model-settings.js +57 -0
  124. package/dist/run/assignments/prepared-call.d.ts +28 -0
  125. package/dist/run/assignments/prepared-call.js +115 -0
  126. package/dist/run/assignments/tool-call.d.ts +26 -0
  127. package/dist/run/assignments/tool-call.js +108 -0
  128. package/dist/run/blueprint-mistake.d.ts +8 -0
  129. package/dist/run/blueprint-mistake.js +14 -0
  130. package/dist/run/code-phase.d.ts +11 -0
  131. package/dist/run/code-phase.js +59 -0
  132. package/dist/run/create-run.d.ts +36 -0
  133. package/dist/run/create-run.js +119 -0
  134. package/dist/run/execute-run.d.ts +7 -0
  135. package/dist/run/execute-run.js +158 -0
  136. package/dist/run/record/apply-event.d.ts +13 -0
  137. package/dist/run/record/apply-event.js +256 -0
  138. package/dist/run/record/events.d.ts +187 -0
  139. package/dist/run/record/events.js +1 -0
  140. package/dist/run/record/postgres-run-store.d.ts +13 -0
  141. package/dist/run/record/postgres-run-store.js +189 -0
  142. package/dist/run/record/progress-projection.d.ts +83 -0
  143. package/dist/run/record/progress-projection.js +167 -0
  144. package/dist/run/record/progress.d.ts +207 -0
  145. package/dist/run/record/progress.js +63 -0
  146. package/dist/run/record/run-store.d.ts +74 -0
  147. package/dist/run/record/run-store.js +1 -0
  148. package/dist/run/record/run-summary.d.ts +8 -0
  149. package/dist/run/record/run-summary.js +19 -0
  150. package/dist/run/record/run-types.d.ts +95 -0
  151. package/dist/run/record/run-types.js +1 -0
  152. package/dist/run/record/state-changes.d.ts +42 -0
  153. package/dist/run/record/state-changes.js +157 -0
  154. package/dist/run/resume-run.d.ts +25 -0
  155. package/dist/run/resume-run.js +99 -0
  156. package/dist/run/run-endings.d.ts +20 -0
  157. package/dist/run/run-endings.js +20 -0
  158. package/dist/run/run-option-shapes.d.ts +176 -0
  159. package/dist/run/run-option-shapes.js +47 -0
  160. package/dist/run/run-session.d.ts +144 -0
  161. package/dist/run/run-session.js +278 -0
  162. package/dist/worker/answer-queued-call.d.ts +19 -0
  163. package/dist/worker/answer-queued-call.js +100 -0
  164. package/dist/worker/launchers/claude-code.d.ts +7 -0
  165. package/dist/worker/launchers/claude-code.js +156 -0
  166. package/dist/worker/launchers/codex.d.ts +6 -0
  167. package/dist/worker/launchers/codex.js +141 -0
  168. package/dist/worker/launchers/launch.d.ts +31 -0
  169. package/dist/worker/launchers/launch.js +6 -0
  170. package/dist/worker/launchers/program-run.d.ts +30 -0
  171. package/dist/worker/launchers/program-run.js +92 -0
  172. package/dist/worker/launchers/tool-server.d.ts +26 -0
  173. package/dist/worker/launchers/tool-server.js +90 -0
  174. package/dist/worker/worker.d.ts +13 -0
  175. package/dist/worker/worker.js +170 -0
  176. package/package.json +43 -4
  177. package/README.md +0 -3
@@ -0,0 +1,120 @@
1
+ var W0=a=>{throw TypeError(a)};var Zd=(a,s,i)=>s.has(a)||W0("Cannot "+i);var _=(a,s,i)=>(Zd(a,s,"read from private field"),i?i.call(a):s.get(a)),ue=(a,s,i)=>s.has(a)?W0("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(a):s.set(a,i),ee=(a,s,i,c)=>(Zd(a,s,"write to private field"),c?c.call(a,i):s.set(a,i),i),be=(a,s,i)=>(Zd(a,s,"access private method"),i);var _r=(a,s,i,c)=>({set _(f){ee(a,s,f,i)},get _(){return _(a,s,c)}});(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const m of d.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&c(m)}).observe(document,{childList:!0,subtree:!0});function i(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=i(f);fetch(f.href,d)}})();function Yj(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Fd={exports:{}},xc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ev;function Ij(){if(ev)return xc;ev=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(c,f,d){var m=null;if(d!==void 0&&(m=""+d),f.key!==void 0&&(m=""+f.key),"key"in f){d={};for(var h in f)h!=="key"&&(d[h]=f[h])}else d=f;return f=d.ref,{$$typeof:a,type:c,key:m,ref:f!==void 0?f:null,props:d}}return xc.Fragment=s,xc.jsx=i,xc.jsxs=i,xc}var tv;function Gj(){return tv||(tv=1,Fd.exports=Ij()),Fd.exports}var r=Gj(),$d={exports:{}},pe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var nv;function Vj(){if(nv)return pe;nv=1;var a=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),S=Symbol.iterator;function j(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,q={};function O(R,V,le){this.props=R,this.context=V,this.refs=q,this.updater=le||T}O.prototype.isReactComponent={},O.prototype.setState=function(R,V){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,V,"setState")},O.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function C(){}C.prototype=O.prototype;function H(R,V,le){this.props=R,this.context=V,this.refs=q,this.updater=le||T}var K=H.prototype=new C;K.constructor=H,E(K,O.prototype),K.isPureReactComponent=!0;var k=Array.isArray;function Q(){}var F={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function $(R,V,le){var se=le.ref;return{$$typeof:a,type:R,key:V,ref:se!==void 0?se:null,props:le}}function re(R,V){return $(R.type,V,R.props)}function oe(R){return typeof R=="object"&&R!==null&&R.$$typeof===a}function xe(R){var V={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(le){return V[le]})}var me=/\/+/g;function ie(R,V){return typeof R=="object"&&R!==null&&R.key!=null?xe(""+R.key):V.toString(36)}function Z(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(Q,Q):(R.status="pending",R.then(function(V){R.status==="pending"&&(R.status="fulfilled",R.value=V)},function(V){R.status==="pending"&&(R.status="rejected",R.reason=V)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function W(R,V,le,se,_e){var Ce=typeof R;(Ce==="undefined"||Ce==="boolean")&&(R=null);var ge=!1;if(R===null)ge=!0;else switch(Ce){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(R.$$typeof){case a:case s:ge=!0;break;case x:return ge=R._init,W(ge(R._payload),V,le,se,_e)}}if(ge)return _e=_e(R),ge=se===""?"."+ie(R,0):se,k(_e)?(le="",ge!=null&&(le=ge.replace(me,"$&/")+"/"),W(_e,V,le,"",function(nn){return nn})):_e!=null&&(oe(_e)&&(_e=re(_e,le+(_e.key==null||R&&R.key===_e.key?"":(""+_e.key).replace(me,"$&/")+"/")+ge)),V.push(_e)),1;ge=0;var ae=se===""?".":se+":";if(k(R))for(var fe=0;fe<R.length;fe++)se=R[fe],Ce=ae+ie(se,fe),ge+=W(se,V,le,Ce,_e);else if(fe=j(R),typeof fe=="function")for(R=fe.call(R),fe=0;!(se=R.next()).done;)se=se.value,Ce=ae+ie(se,fe++),ge+=W(se,V,le,Ce,_e);else if(Ce==="object"){if(typeof R.then=="function")return W(Z(R),V,le,se,_e);throw V=String(R),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ge}function J(R,V,le){if(R==null)return R;var se=[],_e=0;return W(R,se,"","",function(Ce){return V.call(le,Ce,_e++)}),se}function we(R){if(R._status===-1){var V=R._result,le=V();le.then(function(se){(R._status===0||R._status===-1)&&(R._status=1,R._result=se,le.status===void 0&&(le.status="fulfilled",le.value=se))},function(se){(R._status===0||R._status===-1)&&(R._status=2,R._result=se,le.status===void 0&&(le.status="rejected",le.reason=se))}),R._status===-1&&(R._status=0,R._result=le)}if(R._status===1)return R._result.default;throw R._result}var Me=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)};function Ot(R){var V=F.T,le={};le.types=V!==null?V.types:null,F.T=le;try{var se=R(),_e=F.S;_e!==null&&_e(le,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(Q,Me)}catch(Ce){Me(Ce)}finally{V!==null&&le.types!==null&&(V.types=le.types),F.T=V}}function tn(R){var V=F.T;if(V!==null){var le=V.types;le===null?V.types=[R]:le.indexOf(R)===-1&&le.push(R)}else Ot(tn.bind(null,R))}var En={map:J,forEach:function(R,V,le){J(R,function(){V.apply(this,arguments)},le)},count:function(R){var V=0;return J(R,function(){V++}),V},toArray:function(R){return J(R,function(V){return V})||[]},only:function(R){if(!oe(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return pe.Activity=g,pe.Children=En,pe.Component=O,pe.Fragment=i,pe.Profiler=f,pe.PureComponent=H,pe.StrictMode=c,pe.Suspense=p,pe.ViewTransition=b,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,pe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return F.H.useMemoCache(R)}},pe.addTransitionType=tn,pe.cache=function(R){return function(){return R.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(R,V,le){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var se=E({},R.props),_e=R.key;if(V!=null)for(Ce in V.key!==void 0&&(_e=""+V.key),V)!Y.call(V,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&V.ref===void 0||(se[Ce]=V[Ce]);var Ce=arguments.length-2;if(Ce===1)se.children=le;else if(1<Ce){for(var ge=Array(Ce),ae=0;ae<Ce;ae++)ge[ae]=arguments[ae+2];se.children=ge}return $(R.type,_e,se)},pe.createContext=function(R){return R={$$typeof:m,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:d,_context:R},R},pe.createElement=function(R,V,le){var se,_e={},Ce=null;if(V!=null)for(se in V.key!==void 0&&(Ce=""+V.key),V)Y.call(V,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(_e[se]=V[se]);var ge=arguments.length-2;if(ge===1)_e.children=le;else if(1<ge){for(var ae=Array(ge),fe=0;fe<ge;fe++)ae[fe]=arguments[fe+2];_e.children=ae}if(R&&R.defaultProps)for(se in ge=R.defaultProps,ge)_e[se]===void 0&&(_e[se]=ge[se]);return $(R,Ce,_e)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(R){return{$$typeof:h,render:R}},pe.isValidElement=oe,pe.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:we}},pe.memo=function(R,V){return{$$typeof:y,type:R,compare:V===void 0?null:V}},pe.startTransition=Ot,pe.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},pe.use=function(R){return F.H.use(R)},pe.useActionState=function(R,V,le){return F.H.useActionState(R,V,le)},pe.useCallback=function(R,V){return F.H.useCallback(R,V)},pe.useContext=function(R){return F.H.useContext(R)},pe.useDebugValue=function(){},pe.useDeferredValue=function(R,V){return F.H.useDeferredValue(R,V)},pe.useEffect=function(R,V){return F.H.useEffect(R,V)},pe.useEffectEvent=function(R){return F.H.useEffectEvent(R)},pe.useId=function(){return F.H.useId()},pe.useImperativeHandle=function(R,V,le){return F.H.useImperativeHandle(R,V,le)},pe.useInsertionEffect=function(R,V){return F.H.useInsertionEffect(R,V)},pe.useLayoutEffect=function(R,V){return F.H.useLayoutEffect(R,V)},pe.useMemo=function(R,V){return F.H.useMemo(R,V)},pe.useOptimistic=function(R,V){return F.H.useOptimistic(R,V)},pe.useReducer=function(R,V,le){return F.H.useReducer(R,V,le)},pe.useRef=function(R){return F.H.useRef(R)},pe.useState=function(R){return F.H.useState(R)},pe.useSyncExternalStore=function(R,V,le){return F.H.useSyncExternalStore(R,V,le)},pe.useTransition=function(){return F.H.useTransition()},pe.version="19.3.1",pe}var av;function Vc(){return av||(av=1,$d.exports=Vj()),$d.exports}var X=Vc();const Kc=Yj(X),_b=X.createContext(void 0),Gh=a=>{const s=X.useContext(_b);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},Kj=({client:a,children:s})=>(X.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),r.jsx(_b.Provider,{value:a,children:s})),Xj={setTimeout:(a,s)=>setTimeout(a,s),clearTimeout:a=>clearTimeout(a),setInterval:(a,s)=>setInterval(a,s),clearInterval:a=>clearInterval(a)};var Fa,Ih,gb,Zj=(gb=class{constructor(){ue(this,Fa,Xj);ue(this,Ih,!1)}setTimeoutProvider(a){ee(this,Fa,a)}setTimeout(a,s){return _(this,Fa).setTimeout(a,s)}clearTimeout(a){_(this,Fa).clearTimeout(a)}setInterval(a,s){return _(this,Fa).setInterval(a,s)}clearInterval(a){_(this,Fa).clearInterval(a)}},Fa=new WeakMap,Ih=new WeakMap,gb);const Hs=new Zj;function Fj(a){setTimeout(a,0)}const $j=typeof window>"u"||"Deno"in globalThis;function Rt(){}function Jj(a,s){return typeof a=="function"?a(s):a}function Cb(a){return typeof a=="number"&&a>=0&&a!==1/0}function Rb(a,s){return Math.max(a+(s||0)-Date.now(),0)}function Ke(a,s){return typeof a=="function"?a(s):a}function sv(a,s){const{type:i="all",exact:c,fetchStatus:f,predicate:d,queryKey:m,stale:h}=a;if(m){if(c){if(s.queryHash!==Vh(m,s.options))return!1}else if(!bi(s.queryKey,m))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&s.isStale()!==h||f&&f!==s.state.fetchStatus||d&&!d(s))}function lv(a,s){const{exact:i,status:c,predicate:f,mutationKey:d}=a;if(d){if(!s.options.mutationKey)return!1;if(i){if(Ws(s.options.mutationKey)!==Ws(d))return!1}else if(!bi(s.options.mutationKey,d))return!1}return!(c&&s.state.status!==c||f&&!f(s))}function Vh(a,s){return((s==null?void 0:s.queryKeyHashFn)||Ws)(a)}function Ws(a){return JSON.stringify(a,(s,i)=>ph(i)?Object.keys(i).sort().reduce((c,f)=>(c[f]=i[f],c),{}):i)}function bi(a,s){if(a===s)return!0;if(typeof a!=typeof s)return!1;if(a&&s&&typeof a=="object"&&typeof s=="object"){if(Array.isArray(a)&&Array.isArray(s)){if(s.length>a.length)return!1;for(let c=0;c<s.length;c++)if(!bi(a[c],s[c]))return!1;return!0}const i=Object.keys(s);for(const c of i)if(!bi(a[c],s[c]))return!1;return!0}return!1}const Ab=Object.prototype.hasOwnProperty;function Ob(a,s,i=0){if(a===s)return a;if(i>500)return s;const c=iv(a)&&iv(s);if(!c&&!(ph(a)&&ph(s)))return s;const f=(c?a:Object.keys(a)).length,d=c?s:Object.keys(s),m=d.length,h=c?new Array(m):{};let p=0;for(let y=0;y<m;y++){const x=c?y:d[y],g=a[x],b=s[x];if(g===b){h[x]=g,(c?y<f:Ab.call(a,x))&&p++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){h[x]=b;continue}const S=Ob(g,b,i+1);h[x]=S,S===g&&p++}return f===m&&p===f?a:h}function Qr(a,s){if(!s||Object.keys(a).length!==Object.keys(s).length)return!1;for(const i of Object.keys(a))if(!Ab.call(s,i)||a[i]!==s[i])return!1;return!0}function iv(a){return Array.isArray(a)&&a.length===Object.keys(a).length}function ph(a){if(!cv(a))return!1;const s=Object.getPrototypeOf(a),i=s==null?void 0:s.constructor;if(i===void 0)return!0;if(typeof i!="function")return!1;const c=i.prototype;return!(!cv(c)||!c.hasOwnProperty("isPrototypeOf")||s!==Object.prototype)}function cv(a){return Object.prototype.toString.call(a)==="[object Object]"}function Pj(a){return new Promise(s=>{Hs.setTimeout(s,a)})}function gh(a,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(a,s):i.structuralSharing!==!1?Ob(a,s):s}function Wj(a,s,i=0){const c=[...a,s];return i&&c.length>i?c.slice(-i):c}function eN(a,s,i=0){const c=[s,...a];return i&&c.length>i?c.slice(0,i):c}const Kh=Symbol();function Mb(a,s){return!a.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!a.queryFn||a.queryFn===Kh?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}function Xh(a,s){return typeof a=="function"?a(...s):!!a}const Zh=Symbol();function tN(a,s,i,c){let f=!1,d;return Object.defineProperties(a,{[Zh]:{value:c},signal:{enumerable:!0,get:()=>(d??(d=s()),f||(f=!0,d.aborted?i():d.addEventListener("abort",i,{once:!0})),d)}}),a}let nN=()=>$j;const Fh=()=>nN();var Ti=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(a){return this.listeners.add(a),this.onSubscribe(),()=>{this.listeners.delete(a),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ys,$a,ii,yb,aN=(yb=class extends Ti{constructor(){super();ue(this,Ys);ue(this,$a);ue(this,ii);ee(this,ii,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){_(this,$a)||this.setEventListener(_(this,ii))}onUnsubscribe(){var s;this.hasListeners()||((s=_(this,$a))==null||s.call(this),ee(this,$a,void 0))}setEventListener(s){var i;ee(this,ii,s),(i=_(this,$a))==null||i.call(this),ee(this,$a,s(c=>{typeof c=="boolean"?this.setFocused(c):this.onFocus()}))}setFocused(s){_(this,Ys)!==s&&(ee(this,Ys,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof _(this,Ys)=="boolean"?_(this,Ys):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},Ys=new WeakMap,$a=new WeakMap,ii=new WeakMap,yb);const $h=new aN,sN=Fj;function lN(){let a=[],s=0,i=h=>{h()},c=h=>{h()},f=sN;const d=h=>{s?a.push(h):f(()=>{i(h)})},m=()=>{const h=a;a=[],h.length&&f(()=>{c(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;s++;try{p=h()}finally{s--,s||m()}return p},batchCalls:h=>(...p)=>{d(()=>{h(...p)})},schedule:d,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{c=h},setScheduler:h=>{f=h}}}const lt=lN();var ci,Ja,ui,vb,iN=(vb=class extends Ti{constructor(){super();ue(this,ci,!0);ue(this,Ja);ue(this,ui);ee(this,ui,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),c=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",c,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",c)}}})}onSubscribe(){_(this,Ja)||this.setEventListener(_(this,ui))}onUnsubscribe(){var s;this.hasListeners()||((s=_(this,Ja))==null||s.call(this),ee(this,Ja,void 0))}setEventListener(s){var i;ee(this,ui,s),(i=_(this,Ja))==null||i.call(this),ee(this,Ja,s(this.setOnline.bind(this)))}setOnline(s){_(this,ci)!==s&&(ee(this,ci,s),this.listeners.forEach(i=>{i(s)}))}isOnline(){return _(this,ci)}},ci=new WeakMap,Ja=new WeakMap,ui=new WeakMap,vb);const Jr=new iN;function cN(a){return Math.min(1e3*2**a,3e4)}function Db(a){return(a??"online")==="online"?Jr.isOnline():!0}var yh=class extends Error{constructor(a){super("CancelledError"),this.revert=a==null?void 0:a.revert,this.silent=a==null?void 0:a.silent}};function zb(a){let s=!1,i=0,c,f="pending",d,m;const h=new Promise((O,C)=>{d=O,m=C});h.catch(Rt);const p=()=>f!=="pending",y=O=>{var C;if(!p()){const H=new yh(O);T(H),(C=a.onCancel)==null||C.call(a,H)}},x=()=>{s=!0},g=()=>{s=!1},b=()=>$h.isFocused()&&(a.networkMode==="always"||Jr.isOnline())&&a.canRun(),S=()=>Db(a.networkMode)&&a.canRun(),j=O=>{p()||(c==null||c(),f="resolved",d(O))},T=O=>{p()||(c==null||c(),f="rejected",m(O))},E=O=>new Promise(C=>{var H;c=K=>{(p()||O())&&C(K)},(H=a.onPause)==null||H.call(a)}).then(()=>{var C;c=void 0,p()||(C=a.onContinue)==null||C.call(a)}),q=()=>{if(p())return;let O;const C=i===0?a.initialPromise:void 0;try{O=C??a.fn()}catch(H){O=Promise.reject(H)}Promise.resolve(O).then(j).catch(H=>{var Y;if(p())return;const K=a.retry??(Fh()?0:3),k=a.retryDelay??cN,Q=typeof k=="function"?k(i,H):k,F=K===!0||typeof K=="number"&&i<K||typeof K=="function"&&K(i,H);if(s||!F){T(H);return}i++,(Y=a.onFail)==null||Y.call(a,i,H),Pj(Q).then(()=>p()||b()?void 0:E(b)).then(()=>{s?T(H):q()})})};return{promise:h,status:()=>f,cancel:y,continue:()=>(c==null||c(),h),cancelRetry:x,continueRetry:g,canStart:S,start:()=>(S()?q():E(S).then(q),h)}}var Is,bb,Ub=(bb=class{constructor(){ue(this,Is)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cb(this.gcTime)&&ee(this,Is,Hs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??(Fh()?1/0:3e5))}clearGcTimeout(){_(this,Is)!==void 0&&(Hs.clearTimeout(_(this,Is)),ee(this,Is,void 0))}},Is=new WeakMap,bb);function uN(a){return{onFetch:(s,i)=>{var x,g,b,S,j;const c=s.options,f=(b=(g=(x=s.fetchOptions)==null?void 0:x.meta)==null?void 0:g.fetchMore)==null?void 0:b.direction,d=((S=s.state.data)==null?void 0:S.pages)||[],m=((j=s.state.data)==null?void 0:j.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const y=async()=>{let T=!1;const E=s,q=H=>{tN(H,()=>s.signal,()=>T=!0,E[Zh])},O=Mb(s.options,s.fetchOptions),C=async(H,K,k)=>{if(T)return Promise.reject(s.signal.reason);if(K==null&&H.pages.length)return Promise.resolve(H);const F=(()=>{const oe={client:s.client,queryKey:s.queryKey,pageParam:K,direction:k?"backward":"forward",meta:s.options.meta};return q(oe),oe})(),Y=await O(F),{maxPages:$}=s.options,re=k?eN:Wj;return{pages:re(H.pages,Y,$),pageParams:re(H.pageParams,K,$)}};if(f&&d.length){const H=f==="backward",K=H?rN:uv,k={pages:d,pageParams:m};h=await C(k,K(c,k),H)}else{const H=a??d.length;do{const K=p===0?m[0]===void 0?c.initialPageParam:m[0]:uv(c,h);if(p>0&&K==null)break;h=await C(h,K),p++}while(p<H)}return h};s.options.persister?s.fetchFn=()=>{var T,E;return(E=(T=s.options).persister)==null?void 0:E.call(T,y,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=y}}}function uv(a,{pages:s,pageParams:i}){const c=s.length-1;return s.length>0?a.getNextPageParam(s[c],s,i[c],i):void 0}function rN(a,{pages:s,pageParams:i}){var c;return s.length>0?(c=a.getPreviousPageParam)==null?void 0:c.call(a,s[0],s,i[0],i):void 0}var ri,Gs,oi,hn,Vs,ot,fa,Hc,Ks,Sn,oa,xb,oN=(xb=class extends Ub{constructor(s){super();ue(this,Sn);ue(this,ri);ue(this,Gs);ue(this,oi);ue(this,hn);ue(this,Vs);ue(this,ot);ue(this,fa);ue(this,Hc);ue(this,Ks);ee(this,Ks,!1),ee(this,Hc,s.defaultOptions),this.setOptions(s.options),this.observers=[],ee(this,Vs,s.client),ee(this,hn,_(this,Vs).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,ee(this,Gs,ov(this.options)),this.state=s.state??_(this,Gs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return _(this,ri)}get promise(){var s;return(s=_(this,ot))==null?void 0:s.promise}setOptions(s){if(this.options={..._(this,Hc),...s},s!=null&&s._type&&ee(this,ri,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=ov(this.options);i.data!==void 0&&(this.setState(rv(i.data,i.dataUpdatedAt)),ee(this,Gs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,hn).remove(this)}setData(s,i){const c=gh(this.state.data,s,this.options);return be(this,Sn,oa).call(this,{data:c,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),c}setState(s){be(this,Sn,oa).call(this,{type:"setState",state:s})}cancel(s){var c,f;const i=(c=_(this,ot))==null?void 0:c.promise;return(f=_(this,ot))==null||f.cancel(s),i?i.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return _(this,Gs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>Ke(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(s=>Ke(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Rb(this.state.dataUpdatedAt,s)}onFocus(){var s,i;(s=this.observers.find(c=>c.shouldFetchOnWindowFocus()))==null||s.refetch({cancelRefetch:!1}),(i=_(this,ot))==null||i.continue()}onOnline(){var s,i;(s=this.observers.find(c=>c.shouldFetchOnReconnect()))==null||s.refetch({cancelRefetch:!1}),(i=_(this,ot))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),_(this,hn).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){const i=this.observers.indexOf(s);i!==-1&&(this.observers.splice(i,1),this.observers.length||(_(this,ot)&&(_(this,Ks)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?_(this,ot).cancel({revert:!0}):_(this,ot).cancelRetry()),this.scheduleGc()),_(this,hn).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,Sn,oa).call(this,{type:"invalidate"})}async fetch(s,i){var x,g,b,S;if(this.state.fetchStatus!=="idle"&&((x=_(this,ot))==null?void 0:x.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(_(this,ot)&&_(this,fa))return _(this,ot).continueRetry(),_(this,fa)}if(s&&this.setOptions(s),!this.options.queryFn){const j=this.observers.find(T=>T.options.queryFn);j&&this.setOptions(j.options)}const c=new AbortController,f=j=>{Object.defineProperties(j,{[Zh]:{value:c.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(ee(this,Ks,!0),c.signal)}})},d=()=>{const j=Mb(this.options,i),E=(()=>{const q={client:_(this,Vs),queryKey:this.queryKey,meta:this.meta};return f(q),q})();return ee(this,Ks,!1),this.options.persister?this.options.persister(j,E,this):j(E)},h=(()=>{const j={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:_(this,Vs),state:this.state,fetchFn:d};return f(j),j})();(g=_(this,ri)==="infinite"?uN(this.options.pages):this.options.behavior)==null||g.onFetch(h,this),ee(this,oi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=h.fetchOptions)==null?void 0:b.meta))&&be(this,Sn,oa).call(this,{type:"fetch",meta:(S=h.fetchOptions)==null?void 0:S.meta});const p=ee(this,ot,zb({initialPromise:i==null?void 0:i.initialPromise,fn:h.fetchFn,onCancel:j=>{j instanceof yh&&j.revert&&this.setState({..._(this,oi),fetchStatus:"idle"}),c.abort()},onFail:(j,T)=>{be(this,Sn,oa).call(this,{type:"failed",failureCount:j,error:T})},onPause:()=>{be(this,Sn,oa).call(this,{type:"pause"})},onContinue:()=>{be(this,Sn,oa).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),y=(async()=>{var j,T,E,q,O,C,H,K;try{const k=await p.promise;if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(T=(j=_(this,hn).config).onSuccess)==null||T.call(j,k,this),(q=(E=_(this,hn).config).onSettled)==null||q.call(E,k,this.state.error,this),k}catch(k){if(k instanceof yh){if(k.silent){if(_(this,ot)!==p&&_(this,fa))return _(this,fa);throw k}else if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw be(this,Sn,oa).call(this,{type:"error",error:k}),(C=(O=_(this,hn).config).onError)==null||C.call(O,k,this),(K=(H=_(this,hn).config).onSettled)==null||K.call(H,this.state.data,k,this),k}finally{_(this,ot)===p&&(ee(this,ot,void 0),ee(this,fa,void 0)),this.scheduleGc()}})();return ee(this,fa,y),p.start(),y}},ri=new WeakMap,Gs=new WeakMap,oi=new WeakMap,hn=new WeakMap,Vs=new WeakMap,ot=new WeakMap,fa=new WeakMap,Hc=new WeakMap,Ks=new WeakMap,Sn=new WeakSet,oa=function(s){const i=c=>{switch(s.type){case"failed":return{...c,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...c,fetchStatus:"paused"};case"continue":return{...c,fetchStatus:"fetching"};case"fetch":return{...c,...Lb(c.data,this.options),fetchMeta:s.meta??null};case"success":const f={...c,...rv(s.data,s.dataUpdatedAt),dataUpdateCount:c.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,oi,s.manual?f:void 0),f;case"error":const d=s.error;return{...c,error:d,errorUpdateCount:c.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:c.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...c,isInvalidated:!0};case"setState":return{...c,...s.state}}};this.state=i(this.state),lt.batch(()=>{this.observers.slice().forEach(c=>{c.onQueryUpdate()}),_(this,hn).notify({query:this,type:"updated",action:s})})},xb);function Lb(a,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Db(s.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function rv(a,s){return{data:a,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ov(a){const s=typeof a.initialData=="function"?a.initialData():a.initialData,i=s!==void 0,c=i?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?c??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var _t,Re,kc,Ct,Xs,fi,da,Qc,di,hi,Zs,Fs,Pa,mi,Ue,wc,vh,bh,xh,Sh,jh,Nh,Th,Eh,Sb,fN=(Sb=class extends Ti{constructor(s,i){super();ue(this,Ue);ue(this,_t);ue(this,Re);ue(this,kc);ue(this,Ct);ue(this,Xs);ue(this,fi);ue(this,da);ue(this,Qc);ue(this,di);ue(this,hi);ue(this,Zs);ue(this,Fs);ue(this,Pa);ue(this,mi,new Set);this.options=i,ee(this,_t,s),ee(this,da,null),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,Re).addObserver(this),fv(_(this,Re),this.options)?be(this,Ue,wc).call(this):this.updateResult(),be(this,Ue,jh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wh(_(this,Re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wh(_(this,Re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Ue,Nh).call(this),be(this,Ue,Th).call(this),_(this,Re).removeObserver(this)}setOptions(s){const i=this.options,c=_(this,Re);if(this.options=_(this,_t).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ke(this.options.enabled,_(this,Re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Ue,Eh).call(this),_(this,Re).setOptions(this.options),i._defaulted&&!Qr(this.options,i)&&_(this,_t).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,Re),observer:this});const f=this.hasListeners();f&&dv(_(this,Re),c,this.options,i)&&be(this,Ue,wc).call(this),this.updateResult(),f&&(_(this,Re)!==c||Ke(this.options.enabled,_(this,Re))!==Ke(i.enabled,_(this,Re))||Ke(this.options.staleTime,_(this,Re))!==Ke(i.staleTime,_(this,Re)))&&be(this,Ue,bh).call(this);const d=be(this,Ue,xh).call(this);f&&(_(this,Re)!==c||Ke(this.options.enabled,_(this,Re))!==Ke(i.enabled,_(this,Re))||d!==_(this,Pa))&&be(this,Ue,Sh).call(this,d)}getOptimisticResult(s){const i=_(this,_t).getQueryCache().build(_(this,_t),s),c=this.createResult(i,s);return Qr(this.getCurrentResult(),c)||(ee(this,Ct,c),ee(this,fi,this.options),ee(this,Xs,_(this,Re).state)),c}getCurrentResult(){return _(this,Ct)}trackResult(s,i){return new Proxy(s,{get:(c,f)=>(this.trackProp(f),i==null||i(f),Reflect.get(c,f))})}trackProp(s){_(this,mi).add(s)}getCurrentQuery(){return _(this,Re)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=_(this,_t).defaultQueryOptions(s),c=_(this,_t).getQueryCache().build(_(this,_t),i);let f=()=>{},d;const m=new Promise(h=>{d=h,f=_(this,_t).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===c.queryHash&&c.state.data!==void 0&&(f(),h(this.createResult(c,i)))})});return Promise.race([c.fetch(i).then(()=>{const h=this.createResult(c,i);return d==null||d(h),h}).finally(()=>{f()}),m])}fetch(s){return be(this,Ue,wc).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,Ct)))}createResult(s,i){var k;const c=_(this,Re),f=this.options,d=_(this,Ct),m=_(this,Xs),h=_(this,fi),p=s!==c?s.state:_(this,kc),{state:y}=s;let x={...y},g=!1,b;if(i._optimisticResults){const Q=this.hasListeners(),F=!Q&&fv(s,i),Y=Q&&dv(s,c,i,f);(F||Y)&&(x={...x,...Lb(y.data,s.options)}),i._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:S,errorUpdatedAt:j,status:T}=x;b=x.data;let E=!1;if(i.placeholderData!==void 0&&b===void 0&&T==="pending"){let Q;d!=null&&d.isPlaceholderData&&i.placeholderData===(h==null?void 0:h.placeholderData)?(Q=d.data,E=!0):Q=typeof i.placeholderData=="function"?i.placeholderData((k=_(this,hi))==null?void 0:k.state.data,_(this,hi)):i.placeholderData,Q!==void 0&&(T="success",b=gh(d==null?void 0:d.data,Q,i),g=!0)}if(i.select&&b!==void 0&&!E)if(d&&b===(m==null?void 0:m.data)&&i.select===_(this,Qc))b=_(this,di);else try{ee(this,Qc,i.select),b=i.select(b),b=gh(d==null?void 0:d.data,b,i),ee(this,di,b),ee(this,da,null)}catch(Q){ee(this,da,Q)}else b===void 0&&ee(this,da,null);_(this,da)&&(S=_(this,da),b=_(this,di),j=(d==null?void 0:d.error)===S?d.errorUpdatedAt:Date.now(),T="error",g=!1);const q=x.fetchStatus==="fetching",O=T==="pending",C=T==="error",H=O&&q,K=b!==void 0;return{status:T,fetchStatus:x.fetchStatus,isPending:O,isSuccess:T==="success",isError:C,isInitialLoading:H,isLoading:H,data:b,dataUpdatedAt:x.dataUpdatedAt,error:S,errorUpdatedAt:j,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:x.dataUpdateCount>p.dataUpdateCount||x.errorUpdateCount>p.errorUpdateCount,isFetching:q,isRefetching:q&&!O,isLoadingError:C&&!K,isPaused:x.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:C&&K,isStale:Jh(s,i),refetch:this.refetch,isEnabled:Ke(i.enabled,s)!==!1}}updateResult(){const s=_(this,Ct),i=this.createResult(_(this,Re),this.options);if(ee(this,Xs,_(this,Re).state),ee(this,fi,this.options),_(this,Xs).data!==void 0&&ee(this,hi,_(this,Re)),Qr(i,s))return;ee(this,Ct,i);const f=(()=>{if(!s)return!0;const{notifyOnChangeProps:d}=this.options,m=typeof d=="function"?d():d;if(m==="all"||!m&&!_(this,mi).size||this.options.throwOnError&&_(this,Ct).error!==s.error)return!0;for(const h of m??_(this,mi))if(_(this,Ct)[h]!==s[h])return!0;return!1})();lt.batch(()=>{f&&this.listeners.forEach(d=>{d(_(this,Ct))}),_(this,_t).getQueryCache().notify({query:_(this,Re),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Ue,jh).call(this)}},_t=new WeakMap,Re=new WeakMap,kc=new WeakMap,Ct=new WeakMap,Xs=new WeakMap,fi=new WeakMap,da=new WeakMap,Qc=new WeakMap,di=new WeakMap,hi=new WeakMap,Zs=new WeakMap,Fs=new WeakMap,Pa=new WeakMap,mi=new WeakMap,Ue=new WeakSet,wc=function(s){be(this,Ue,Eh).call(this);let i=_(this,Re).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(Rt)),i},vh=function(s){return!Fh()&&Ke(this.options.enabled,_(this,Re))!==!1&&Cb(s)},bh=function(){be(this,Ue,Nh).call(this);const s=Ke(this.options.staleTime,_(this,Re));if(_(this,Ct).isStale||!be(this,Ue,vh).call(this,s))return;const i=Rb(_(this,Ct).dataUpdatedAt,s)+1;ee(this,Zs,Hs.setTimeout(()=>{_(this,Ct).isStale||this.updateResult()},i))},xh=function(){return Ke(this.options.refetchInterval,_(this,Re))??!1},Sh=function(s){be(this,Ue,Th).call(this),ee(this,Pa,s),!(_(this,Pa)===0||!be(this,Ue,vh).call(this,_(this,Pa)))&&ee(this,Fs,Hs.setInterval(()=>{(this.options.refetchIntervalInBackground||$h.isFocused())&&be(this,Ue,wc).call(this)},_(this,Pa)))},jh=function(){be(this,Ue,bh).call(this),be(this,Ue,Sh).call(this,be(this,Ue,xh).call(this))},Nh=function(){_(this,Zs)!==void 0&&(Hs.clearTimeout(_(this,Zs)),ee(this,Zs,void 0))},Th=function(){_(this,Fs)!==void 0&&(Hs.clearInterval(_(this,Fs)),ee(this,Fs,void 0))},Eh=function(){const s=_(this,_t).getQueryCache().build(_(this,_t),this.options);if(s===_(this,Re))return;const i=_(this,Re);ee(this,Re,s),ee(this,kc,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},Sb);function dN(a,s){return Ke(s.enabled,a)!==!1&&a.state.data===void 0&&!(a.state.status==="error"&&Ke(s.retryOnMount,a)===!1)}function fv(a,s){return dN(a,s)||a.state.data!==void 0&&wh(a,s,s.refetchOnMount)}function wh(a,s,i){if(Ke(s.enabled,a)!==!1&&Ke(s.staleTime,a)!=="static"){const c=Ke(i,a);return c==="always"||c!==!1&&Jh(a,s)}return!1}function dv(a,s,i,c){return(a!==s||Ke(c.enabled,a)===!1)&&(!i.suspense||a.state.status!=="error")&&Jh(a,i)}function Jh(a,s){return Ke(s.enabled,a)!==!1&&a.isStaleByTime(Ke(s.staleTime,a))}var Yc,Qn,xt,$s,Yn,Xa,jb,hN=(jb=class extends Ub{constructor(s){super();ue(this,Yn);ue(this,Yc);ue(this,Qn);ue(this,xt);ue(this,$s);ee(this,Yc,s.client),this.mutationId=s.mutationId,ee(this,xt,s.mutationCache),ee(this,Qn,[]),this.state=s.state||Bb(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){_(this,Qn).includes(s)||(_(this,Qn).push(s),this.clearGcTimeout(),_(this,xt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){ee(this,Qn,_(this,Qn).filter(i=>i!==s)),this.scheduleGc(),_(this,xt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){_(this,Qn).length||(this.state.status==="pending"?this.scheduleGc():_(this,xt).remove(this))}continue(){var s;return((s=_(this,$s))==null?void 0:s.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(s){var h,p,y,x,g,b,S,j,T,E,q,O,C,H,K,k,Q,F;const i=()=>{be(this,Yn,Xa).call(this,{type:"continue"})},c={client:_(this,Yc),meta:this.options.meta,mutationKey:this.options.mutationKey},f=ee(this,$s,zb({fn:()=>this.options.mutationFn?this.options.mutationFn(s,c):Promise.reject(new Error("No mutationFn found")),onFail:(Y,$)=>{be(this,Yn,Xa).call(this,{type:"failed",failureCount:Y,error:$})},onPause:()=>{be(this,Yn,Xa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,xt).canRun(this)})),d=this.state.status==="pending",m=!f.canStart();try{if(d)i();else{be(this,Yn,Xa).call(this,{type:"pending",variables:s,isPaused:m}),_(this,xt).config.onMutate&&await _(this,xt).config.onMutate(s,this,c);const $=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,s,c));$!==this.state.context&&be(this,Yn,Xa).call(this,{type:"pending",context:$,variables:s,isPaused:m})}this.state.isPaused&&f.canStart()&&i();const Y=await f.start();return await((x=(y=_(this,xt).config).onSuccess)==null?void 0:x.call(y,Y,s,this.state.context,this,c)),await((b=(g=this.options).onSuccess)==null?void 0:b.call(g,Y,s,this.state.context,c)),await((j=(S=_(this,xt).config).onSettled)==null?void 0:j.call(S,Y,null,this.state.variables,this.state.context,this,c)),await((E=(T=this.options).onSettled)==null?void 0:E.call(T,Y,null,s,this.state.context,c)),be(this,Yn,Xa).call(this,{type:"success",data:Y}),Y}catch(Y){try{await((O=(q=_(this,xt).config).onError)==null?void 0:O.call(q,Y,s,this.state.context,this,c))}catch($){Promise.reject($)}try{await((H=(C=this.options).onError)==null?void 0:H.call(C,Y,s,this.state.context,c))}catch($){Promise.reject($)}try{await((k=(K=_(this,xt).config).onSettled)==null?void 0:k.call(K,void 0,Y,this.state.variables,this.state.context,this,c))}catch($){Promise.reject($)}try{await((F=(Q=this.options).onSettled)==null?void 0:F.call(Q,void 0,Y,s,this.state.context,c))}catch($){Promise.reject($)}throw be(this,Yn,Xa).call(this,{type:"error",error:Y}),Y}finally{_(this,$s)===f&&ee(this,$s,void 0),_(this,xt).runNext(this)}}},Yc=new WeakMap,Qn=new WeakMap,xt=new WeakMap,$s=new WeakMap,Yn=new WeakSet,Xa=function(s){const i=c=>{switch(s.type){case"failed":return{...c,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...c,isPaused:!0};case"continue":return{...c,isPaused:!1};case"pending":return{...c,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...c,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...c,data:void 0,error:s.error,failureCount:c.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),lt.batch(()=>{_(this,Qn).forEach(c=>{c.onMutationUpdate(s)}),_(this,xt).notify({mutation:this,type:"updated",action:s})})},jb);function Bb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wa,jn,Ic,Nb,mN=(Nb=class extends Ti{constructor(s={}){super();ue(this,Wa);ue(this,jn);ue(this,Ic);this.config=s,ee(this,Wa,new Set),ee(this,jn,new Map),ee(this,Ic,0)}build(s,i,c){const f=new hN({client:s,mutationCache:this,mutationId:++_r(this,Ic)._,options:s.defaultMutationOptions(i),state:c});return this.add(f),f}add(s){_(this,Wa).add(s);const i=Cr(s);if(typeof i=="string"){const c=_(this,jn).get(i);c?c.push(s):_(this,jn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(_(this,Wa).delete(s)){const i=Cr(s);if(typeof i=="string"){const c=_(this,jn).get(i);if(c)if(c.length>1){const f=c.indexOf(s);f!==-1&&c.splice(f,1)}else c[0]===s&&_(this,jn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){var c;const i=Cr(s);if(typeof i=="string"){const f=(c=_(this,jn).get(i))==null?void 0:c.find(d=>d.state.status==="pending");return!f||f===s}else return!0}runNext(s){var c,f;const i=Cr(s);return typeof i=="string"?((f=(c=_(this,jn).get(i))==null?void 0:c.find(d=>d!==s&&d.state.isPaused))==null?void 0:f.continue())??Promise.resolve():Promise.resolve()}clear(){lt.batch(()=>{const s=this.getAll();_(this,Wa).clear(),_(this,jn).clear(),s.forEach(i=>{this.notify({type:"removed",mutation:i})})})}getAll(){return Array.from(_(this,Wa))}find(s){const i={exact:!0,...s};return this.getAll().find(c=>lv(i,c))}findAll(s={}){return this.getAll().filter(i=>lv(s,i))}notify(s){lt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return lt.batch(()=>Promise.all(s.map(i=>i.continue().catch(Rt))))}},Wa=new WeakMap,jn=new WeakMap,Ic=new WeakMap,Nb);function Cr(a){var s;return(s=a.options.scope)==null?void 0:s.id}var ha,es,St,Gc,Vn,_c,_h,Tb,pN=(Tb=class extends Ti{constructor(i,c){super();ue(this,Vn);ue(this,ha);ue(this,es);ue(this,St);ue(this,Gc);ee(this,ha,i),this.setOptions(c),this.bindMethods(),be(this,Vn,_c).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var f;const c=this.options;this.options=_(this,ha).defaultMutationOptions(i),Qr(this.options,c)||_(this,ha).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,St),observer:this}),c!=null&&c.mutationKey&&this.options.mutationKey&&Ws(c.mutationKey)!==Ws(this.options.mutationKey)?this.reset():((f=_(this,St))==null?void 0:f.state.status)==="pending"&&_(this,St).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&_(this,St)&&(_(this,St).addObserver(this),be(this,Vn,_c).call(this))}onUnsubscribe(){var i;this.hasListeners()||(i=_(this,St))==null||i.removeObserver(this)}onMutationUpdate(i){be(this,Vn,_c).call(this),be(this,Vn,_h).call(this,i)}getCurrentResult(){return _(this,es)}reset(){var i;(i=_(this,St))==null||i.removeObserver(this),ee(this,St,void 0),be(this,Vn,_c).call(this),be(this,Vn,_h).call(this)}mutate(i,c){var f;return ee(this,Gc,c),(f=_(this,St))==null||f.removeObserver(this),ee(this,St,_(this,ha).getMutationCache().build(_(this,ha),this.options)),_(this,St).addObserver(this),_(this,St).execute(i)}},ha=new WeakMap,es=new WeakMap,St=new WeakMap,Gc=new WeakMap,Vn=new WeakSet,_c=function(){var c;const i=((c=_(this,St))==null?void 0:c.state)??Bb();ee(this,es,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},_h=function(i){lt.batch(()=>{var f,d,m,h;const c=_(this,Gc);if(c&&this.hasListeners()){const p=_(this,es).variables,y=_(this,es).context,x={client:_(this,ha),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(f=c.onSuccess)==null||f.call(c,i.data,p,y,x)}catch(g){Promise.reject(g)}try{(d=c.onSettled)==null||d.call(c,i.data,null,p,y,x)}catch(g){Promise.reject(g)}}else if((i==null?void 0:i.type)==="error"){try{(m=c.onError)==null||m.call(c,i.error,p,y,x)}catch(g){Promise.reject(g)}try{(h=c.onSettled)==null||h.call(c,void 0,i.error,p,y,x)}catch(g){Promise.reject(g)}}}this.listeners.forEach(p=>{p(_(this,es))})})},Tb),In,Eb,gN=(Eb=class extends Ti{constructor(s={}){super();ue(this,In);this.config=s,ee(this,In,new Map)}build(s,i,c){const f=i.queryKey,d=i.queryHash??Vh(f,i);let m=this.get(d);return m||(m=new oN({client:s,queryKey:f,queryHash:d,options:s.defaultQueryOptions(i),state:c,defaultOptions:s.getQueryDefaults(f)}),this.add(m)),m}add(s){_(this,In).has(s.queryHash)||(_(this,In).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){_(this,In).get(s.queryHash)===s&&(s.destroy(),_(this,In).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){lt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return _(this,In).get(s)}getAll(){return[..._(this,In).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(c=>sv(i,c))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(c=>sv(s,c)):i}notify(s){lt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){lt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){lt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},In=new WeakMap,Eb),Ze,ts,ns,pi,gi,as,yi,vi,wb,yN=(wb=class{constructor(a={}){ue(this,Ze);ue(this,ts);ue(this,ns);ue(this,pi);ue(this,gi);ue(this,as);ue(this,yi);ue(this,vi);ee(this,Ze,a.queryCache||new gN),ee(this,ts,a.mutationCache||new mN),ee(this,ns,a.defaultOptions||{}),ee(this,pi,new Map),ee(this,gi,new Map),ee(this,as,0)}mount(){_r(this,as)._++,_(this,as)===1&&(ee(this,yi,$h.subscribe(async a=>{a&&(await this.resumePausedMutations(),_(this,Ze).onFocus())})),ee(this,vi,Jr.subscribe(async a=>{a&&(await this.resumePausedMutations(),_(this,Ze).onOnline())})))}unmount(){var a,s;_r(this,as)._--,_(this,as)===0&&((a=_(this,yi))==null||a.call(this),ee(this,yi,void 0),(s=_(this,vi))==null||s.call(this),ee(this,vi,void 0))}isFetching(a){return _(this,Ze).findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return _(this,ts).findAll({...a,status:"pending"}).length}getQueryData(a){var i;const s=this.defaultQueryOptions({queryKey:a});return(i=_(this,Ze).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(a){const s=this.defaultQueryOptions(a),i=_(this,Ze).build(this,s),c=i.state.data;return c===void 0?this.fetchQuery(a):(a.revalidateIfStale&&i.isStaleByTime(Ke(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(c))}getQueriesData(a){return _(this,Ze).findAll(a).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(a,s,i){var m;const c=this.defaultQueryOptions({queryKey:a}),f=(m=_(this,Ze).get(c.queryHash))==null?void 0:m.state.data,d=Jj(s,f);if(d!==void 0)return _(this,Ze).build(this,c).setData(d,{...i,manual:!0})}setQueriesData(a,s,i){return lt.batch(()=>_(this,Ze).findAll(a).map(({queryKey:c})=>[c,this.setQueryData(c,s,i)]))}getQueryState(a){var i;const s=this.defaultQueryOptions({queryKey:a});return(i=_(this,Ze).get(s.queryHash))==null?void 0:i.state}removeQueries(a){const s=_(this,Ze);lt.batch(()=>{s.findAll(a).forEach(i=>{s.remove(i)})})}resetQueries(a,s){const i=_(this,Ze);return lt.batch(()=>{const c=i.findAll(a),f=new Set(c);return c.forEach(d=>{d.reset()}),this.refetchQueries({type:"active",predicate:d=>f.has(d)},s)})}cancelQueries(a,s={}){const i={revert:!0,...s},c=lt.batch(()=>_(this,Ze).findAll(a).map(f=>f.cancel(i)));return Promise.all(c).then(Rt).catch(Rt)}invalidateQueries(a,s={}){return lt.batch(()=>(_(this,Ze).findAll(a).forEach(i=>{i.invalidate()}),(a==null?void 0:a.refetchType)==="none"?Promise.resolve():this.refetchQueries({...a,type:(a==null?void 0:a.refetchType)??(a==null?void 0:a.type)??"active"},s)))}refetchQueries(a,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},c=lt.batch(()=>_(this,Ze).findAll(a).filter(f=>!f.isDisabled()&&!f.isStatic()).map(f=>{let d=f.fetch(void 0,i);const m=f.state.fetchStatus==="paused";return(!i.throwOnError||m)&&(d=d.catch(Rt)),m?Promise.resolve():d}));return Promise.all(c).then(Rt)}async query(a){const s=this.defaultQueryOptions(a);s.retry===void 0&&(s.retry=!1);const i=_(this,Ze).build(this,s),c=i.isStaleByTime(Ke(s.staleTime,i))?await i.fetch(s):i.state.data,f=s.select;return f?f(c):c}fetchQuery(a){const s=this.defaultQueryOptions(a);s.retry===void 0&&(s.retry=!1);const i=_(this,Ze).build(this,s);return i.isStaleByTime(Ke(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(Rt).catch(Rt)}infiniteQuery(a){return a._type="infinite",this.query(a)}fetchInfiniteQuery(a){return a._type="infinite",this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(Rt).catch(Rt)}ensureInfiniteQueryData(a){return a._type="infinite",this.ensureQueryData(a)}resumePausedMutations(){return Jr.isOnline()?_(this,ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,Ze)}getMutationCache(){return _(this,ts)}getDefaultOptions(){return _(this,ns)}setDefaultOptions(a){ee(this,ns,a)}setQueryDefaults(a,s){_(this,pi).set(Ws(a),{queryKey:a,defaultOptions:s})}getQueryDefaults(a){const s=[..._(this,pi).values()],i={};return s.forEach(c=>{bi(a,c.queryKey)&&Object.assign(i,c.defaultOptions)}),i}setMutationDefaults(a,s){_(this,gi).set(Ws(a),{mutationKey:a,defaultOptions:s})}getMutationDefaults(a){const s=[..._(this,gi).values()],i={};return s.forEach(c=>{bi(a,c.mutationKey)&&Object.assign(i,c.defaultOptions)}),i}defaultQueryOptions(a){if(a._defaulted)return a;const s={..._(this,ns).queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return s.queryHash||(s.queryHash=Vh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Kh&&(s.enabled=!1),s}defaultMutationOptions(a){return a!=null&&a._defaulted?a:{..._(this,ns).mutations,...(a==null?void 0:a.mutationKey)&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){_(this,Ze).clear(),_(this,ts).clear()}},Ze=new WeakMap,ts=new WeakMap,ns=new WeakMap,pi=new WeakMap,gi=new WeakMap,as=new WeakMap,yi=new WeakMap,vi=new WeakMap,wb);const qb=X.createContext(!1),vN=()=>X.useContext(qb);qb.Provider;function bN(){let a=!1;return{clearReset:()=>{a=!1},reset:()=>{a=!0},isReset:()=>a}}const xN=X.createContext(bN()),SN=()=>X.useContext(xN),jN=(a,s,i)=>{const c=(i==null?void 0:i.state.status)==="error"&&typeof a.throwOnError=="function"?Xh(a.throwOnError,[i.state.error,i]):a.throwOnError;(a.suspense||c)&&(s.isReset()||(a.retryOnMount=!1))},NN=a=>{X.useEffect(()=>{a.clearReset()},[a])},TN=({result:a,errorResetBoundary:s,throwOnError:i,query:c,suspense:f})=>a.isError&&!s.isReset()&&!a.isFetching&&c&&(f&&a.data===void 0||Xh(i,[a.error,c])),EN=a=>{if(a.suspense){const i=f=>f==="static"?f:Math.max(f??1e3,1e3),c=a.staleTime;a.staleTime=typeof c=="function"?(...f)=>i(c(...f)):i(c),typeof a.gcTime=="number"&&(a.gcTime=Math.max(a.gcTime,1e3))}},wN=(a,s)=>(a==null?void 0:a.suspense)&&s.isPending,_N=(a,s,i)=>s.fetchOptimistic(a).catch(()=>{i.clearReset()});function CN(a,s,i){const c=vN(),f=SN(),d=Gh(),m=d.defaultQueryOptions(a),h=d.getQueryCache().get(m.queryHash),p=a.subscribed!==!1;m._optimisticResults=c?"isRestoring":p?"optimistic":void 0,EN(m),jN(m,f,h),NN(f);const[y]=X.useState(()=>new s(d,m)),x=y.getOptimisticResult(m);X.useEffect(()=>{y.setOptions(m)},[m,y]);const g=!c&&p;if(X.useSyncExternalStore(X.useCallback(b=>{const S=g?y.subscribe(lt.batchCalls(b)):Rt;return y.updateResult(),S},[y,g]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),wN(m,x))throw _N(m,y,f);if(TN({result:x,errorResetBoundary:f,throwOnError:m.throwOnError,query:h,suspense:m.suspense}))throw x.error;return m.notifyOnChangeProps?x:y.trackResult(x)}function ds(a,s){return CN(a,fN)}function Pr(a,s){const i=Gh(),[c]=X.useState(()=>new pN(i,a));X.useEffect(()=>{c.setOptions(a)},[c,a]);const f=X.useSyncExternalStore(X.useCallback(m=>c.subscribe(lt.batchCalls(m)),[c]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),d=X.useCallback((...m)=>{c.mutate(m[0],m[1]).catch(Rt)},[c]);if(f.error&&Xh(c.options.throwOnError,[f.error]))throw f.error;return{...f,mutate:d,mutateAsync:f.mutate}}const hv=!1;var Hb=X.useLayoutEffect;function us(a){return a[a.length-1]}function kb(a,s){return typeof a=="function"?a(s):a}const Ph=Object.prototype.hasOwnProperty;function Qb(a){for(const s in a)if(Ph.call(a,s))return!0;return!1}const Yr=()=>Object.create(null),Jl=(a,s)=>is(a,s,!0);function is(a,s,i,c=0){if(a===s)return a;if(c++>500)return s;const f=Array.isArray(a)&&Array.isArray(s);if(!f&&!(Wr(a)&&Wr(s)))return s;const d=Object.keys(a),m=d.length,h=Object.keys(s),p=h.length;if(f?m!==a.length||p!==s.length||m&&us(d)!==`${m-1}`||p&&us(h)!==`${p-1}`:m!==Object.getOwnPropertyNames(a).length||p!==Object.getOwnPropertyNames(s).length||Object.getOwnPropertySymbols(s).length)return s;let y=0,x,g,b;if(f){for(;y<p&&(b=y,g=a[b],x=s[b],x=g===x?g:typeof g=="object"?is(g,x,i,c):x,x===g);y++);if(y===p&&m===p)return a}else{let j=m===p,T=!0;for(;y<p;y++){b=h[y],g=a[b];const E=s[b];x=g===E?g:typeof g=="object"?is(g,E,i,c):E,j&&(j=x===g&&(d[y]===b||Ph.call(a,b))),T&&(T=Object.is(x,E)),d[y]=x}if(j)return Object.getOwnPropertySymbols(a).length?s:a;if(T)return s}const S=f?h.fill(0):i?Yr():{};for(let j=0;j<p;j++)b=f?j:h[j],f?(g=a[b],j>y&&(x=s[b],x=g===x?g:typeof g=="object"?is(g,x,i,c):x),S[b]=j<y?g:x):S[b]=d[j];return S}function Wr(a){var s;return!a||typeof a!="object"?!1:(((s=Object.getPrototypeOf(a))==null?void 0:s.constructor)??Object)===Object}function pa(a,s,i,c){if(a===s)return!0;if(Array.isArray(a)&&Array.isArray(s)){if(a.length!==s.length)return!1;for(let f=0,d=a.length;f<d;f++){const m=a[f],h=s[f];if(m!==h&&!pa(m,h,i,c))return!1}return!0}if(Wr(a)&&Wr(s)){if(i){for(const d in s)if((c||s[d]!==void 0)&&!pa(a[d],s[d],i,c))return!1;return!0}let f=0;if(c)f=Object.keys(a).length;else for(const d in a)a[d]!==void 0&&f++;for(const d in s)if((c||s[d]!==void 0)&&(f--===0||!pa(a[d],s[d],i,c)))return!1;return f===0}return!1}const RN=/[\x00-\x1f\x7f"<>`{}]/g;function AN(a){return a.replace(RN,s=>"%"+s.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function mv(a){let s;try{s=decodeURI(a)}catch{s=a.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return AN(s)}const ON=["http:","https:","mailto:","tel:"];function Ac(a){var s,i;if(a[0]!=="/"&&a.includes(":"))return(i=(s=/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(a))==null?void 0:s[1])==null?void 0:i.replace(/[\t\n\r]/g,"").toLowerCase()}const Yb=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ib(a,s){if(!a)return!1;if(Yb.test(a))return!0;const i=Ac(a);return i?!s.has(i):!1}function Sc(a){if(!a)return a;let s=a;if(/[%\\\x00-\x1f\x7f]/.test(a)){const i=/%25|%5C/gi;let c=0,f;for(s="";(f=i.exec(a))!==null;)s+=mv(a.slice(c,f.index))+f[0],c=i.lastIndex;s+=mv(c?a.slice(c):a)}return s}function MN(a){return/[\s\u0080-\uFFFF]/.test(a)?a.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):a}function DN(a,s){if(a===s)return!0;if(a.length!==s.length)return!1;for(let i=0;i<a.length;i++)if(a[i]!==s[i])return!1;return!0}function Wh(){throw new Error("Invariant failed")}function ti(a){return a.replace(/\/{2,}/g,"/")}function Gb(a){return a==="/"?a:a.replace(/^\/+/,"")}function Gn(a){const s=a.length;return s>1&&a[s-1]==="/"?a.replace(/\/+$/,""):a}function Vb(a){return Gn(Gb(a))}function pv(a,s){return a!=null&&a.endsWith("/")&&a!=="/"&&a!==`${s}/`?a.slice(0,-1):a}function gv(a,s,i="never",c){if(s.includes("//")&&(s=ti(s)),s.startsWith("/"))return s.length===1||i==="preserve"?s:i==="always"?s.endsWith("/")?s:`${s}/`:s.endsWith("/")?s.slice(0,-1):s;const f=s===".";let d;if(c){d=f?a:a+"\0"+s;const y=c.get(d);if(y)return y}let m;if(f)m=a.split("/");else{for(a.includes("//")&&(a=ti(a)),m=a.split("/");m.length>1&&us(m)==="";)m.pop();const y=s.split("/");for(let x=0,g=y.length;x<g;x++){const b=y[x];b===""?x?x===g-1&&m.push(b):m=[b]:b===".."?m.length>1?m.pop():m=[""]:b==="."||m.push(b)}}m.length>1&&(us(m)===""?i==="never"&&m.pop():i==="always"&&m.push(""));const h=m.join("/"),p=(f?ti(h):h)||"/";return d&&c&&c.set(d,p),p}function zN(a){const s=new Map(a.map(c=>[encodeURIComponent(c),c])),i=new RegExp([...s.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return c=>c.replace(i,f=>s.get(f)??f)}function UN(a){return a==null||a===""}function LN(a,s,i){if(typeof s!="string")return""+(s??void 0);const c=a==="_splat";if(c&&(!s||/^[a-zA-Z0-9\-._~!/]*$/.test(s)))return s;let f=encodeURIComponent(s);return c&&(f=f.replaceAll("%2F","/")),i?i(f):f}function yv(a,s,i,c,f){const d=a.endsWith("/")?"/":"";let m="";for(const h of s){if(typeof h=="string"){m+=h;continue}const[p,y,x,g]=h,b=p===2,S=b&&g!==void 0?g+d:g;let j=i[y];if(!(p===3&&j==null)){if(f&&(f[y]=j,b&&(f["*"]=j)),b&&UN(j)){if(x==="/"&&!S)continue;j=""}m+=x+LN(y,j,c)+(S||"")}}return m+d||"/"}function Kb(a={}){if(a.isNotFound=!0,a.throw)throw a;return a}function xi(a){return(a==null?void 0:a.isNotFound)===!0}function BN(){try{return sessionStorage}catch{return}}const qN="tsr-scroll-restoration-v1_3",ni=BN();function HN(){try{return JSON.parse((ni==null?void 0:ni.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}const Ka=HN(),vv="data-scroll-restoration-id",kN=a=>a.state.__TSR_key||a.href;function QN(a){const s=a.getAttribute(vv);if(s)return`[${vv}="${s}"]`;let i="",c=a,f;for(;f=c.parentNode;){let d=1,m=c;for(;m=m.previousElementSibling;)d++;const h=`${c.localName}:nth-child(${d})`;i=i?`${h} > ${i}`:h,c=f}return i}let Rr=!1;const Ir="window";function Ch(a){try{return typeof a=="function"?a():document.querySelector(a)}catch{}}function bv(a){const s=new Set;for(const i of a){if(i===Ir)continue;const c=Ch(i);c&&s.add(c)}return s}function YN(a,s){const i=a.options.scrollRestoration,c=a._scroll;i&&(c.e=!0);const f=a.options.getScrollRestorationKey||kN,d=new Set,m=h=>{const p=Ka[h]||(Ka[h]={});for(const y of d)y===document?p[Ir]={scrollX,scrollY}:y.isConnected&&(p[QN(y)]={scrollX:y.scrollLeft,scrollY:y.scrollTop})};i&&!c.s&&(c.s=!0,Rr=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Rr||d.add(h.target)},!0),a.subscribe("onBeforeLoad",h=>{h.fromLocation&&m(f(h.fromLocation)),d.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",m(f(a.stores.resolvedLocation.get()??a.stores.location.get()));try{ni==null||ni.setItem(qN,JSON.stringify(Ka))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!c.r&&(c.r=!0,a.subscribe("onRendered",h=>{var T;const p=a.options.scrollRestorationBehavior,y=a.options.scrollToTopSelectors,x=c.n,g=c.h;let b;if(d.clear(),c.n=!0,c.h=!1,typeof a.options.scrollRestoration=="function"&&!a.options.scrollRestoration({location:a.latestLocation}))return;const S=f(h.toLocation),j=h.fromLocation&&f(h.fromLocation);if(c.e&&j&&j!==S){const E=Ka[j];if(E){let q=Ka[S];for(const O in E){if(O===Ir){if(x)continue}else{const C=Ch(O);if(!C||x&&y&&(b??(b=bv(y)),b.has(C)))continue}q||(q=Ka[S]={}),q[O]??(q[O]=E[O])}}}Rr=!0;try{const E=h.toLocation.hash,q=h.toLocation.state.__hashScrollIntoViewOptions??!0;let O=!1;if(x){!E&&y&&(b??(b=bv(y)));const C=E&&q&&g,H=c.e?Ka[S]:void 0;if(H)for(const K in H){const{scrollX:k,scrollY:Q}=H[K];if(K===Ir){if(C)continue;scrollTo({top:Q,left:k,behavior:p}),O=!0}else{const F=Ch(K);F&&(F.scrollLeft=k,F.scrollTop=Q,b==null||b.delete(F))}}if(!E){const K={top:0,left:0,behavior:p};if(O||scrollTo(K),b)for(const k of b)k.scrollTo(K)}}!O&&E&&q&&((T=document.getElementById(E))==null||T.scrollIntoView(q))}finally{Rr=!1}}))}function IN(a,s=String){let i;for(const c in a){const f=a[c];f!==void 0&&(i||(i=new URLSearchParams)).set(c,s(f))}return i?i.toString():""}function Jd(a){return a?a==="false"?!1:a==="true"?!0:+a*0===0&&+a+""===a?+a:a:""}function GN(a){const s=new URLSearchParams(a),i=Object.create(null);for(const[c,f]of s.entries()){const d=i[c];d==null?i[c]=Jd(f):Array.isArray(d)?d.push(Jd(f)):i[c]=[d,Jd(f)]}return i}const Xb=/^(?:\s|["[{\d-]|fa|nu|tr)/,VN=XN(JSON.parse),KN=ZN(JSON.stringify,JSON.parse);function XN(a){const s=a===JSON.parse;return i=>{i[0]==="?"&&(i=i.slice(1));const c=GN(i);for(const f in c){const d=c[f];if(typeof d=="string"){if(s&&!Xb.test(d))continue;try{c[f]=a(d)}catch{}}}return c}}function ZN(a,s){const i=s===JSON.parse;function c(f){if(f&&typeof f=="object")try{return a(f)}catch{}else if(s&&typeof f=="string"){if(i&&!Xb.test(f))return f;try{return s(f),a(f)}catch{}}return f}return f=>{const d=IN(f,c);return d?`?${d}`:""}}const ai="__root__";function em(a){a.statusCode=a.statusCode||a.code||307;const s=new Headers(a.headers);a.href&&s.get("Location")===null&&s.set("Location",a.href);const i=new Response(null,{status:a.statusCode,headers:s});if(i.options=a,a.throw)throw i;return i}function Zb(a){return a instanceof Response&&!!a.options}function eo(a){const s=new Map;let i,c;return{get(f){const d=s.get(f);if(d)return d.visited=!0,d.value},set(f,d){const m=s.get(f);if(m){m.value=d;return}if(s.size>=a){let p=i==null?void 0:i.next().value;for(;!p||p.visited;)p?p.visited=!1:i=s.values(),p=i.next().value;p===c&&(i=void 0),s.delete(p.key)}const h={key:f,value:d,visited:!1};c=h,s.set(f,h)},clear(){s.clear(),i=void 0,c=void 0}}}const ss=4,Fb=5;function FN(a){const s=a.names;if(s)return s;const i=[];for(const c of a)typeof c!="string"&&i.push(c[1]);return a.names=i}function $N(a,s,i){const c=a.slice(s,i);if(c.charCodeAt(0)===36)return c.length===1?[2,"_splat","",void 0]:[1,c.slice(1),"",""];const f=c.indexOf("{");if(f>=0){const d=c.indexOf("}",f),m=c.charCodeAt(f+1)===45,h=f+(m?3:2);if(d>=0&&c.charCodeAt(h-1)===36&&(!m||h<d)){const p=c.slice(h,d);return[m?3:p?1:2,p||"_splat",c.slice(0,f),a.slice(s+d+1,p?i:a.length)]}}return c}function Oc(a,s,i,c,f,d){var q,O;let m=i;const h=s.fullPath??s.from,p=s.options,y=h.length,x=h.endsWith("/")?y-1:y,g=(p==null?void 0:p.caseSensitive)??a,b=((q=p==null?void 0:p.params)==null?void 0:q.parse)??(p==null?void 0:p.parseParams);let S,j=d?i-1:0;if(!c||h.includes("$")){S=(d==null?void 0:d.slice())??[];const C=us(S);C&&typeof C!="string"&&C[0]===2&&(S[S.length-1]=[C[0],C[1],C[2],C[3]===void 0?void 0:C[3]+h.substring(i-(h[i-2]==="/"?2:1),x)],j=y)}for(;m<y;){const C=m,H=h.indexOf("/",C);let K=H===-1?y:H;const k=$N(h,C,K);m=K+1;let Q;if(typeof k=="string"){if(!c)continue;let F=k,Y;g?Y=c.static??(c.static=new Map):(F=k.toLowerCase(),Y=c.staticInsensitive??(c.staticInsensitive=new Map));const $=Y.get(F);if($)Q=$;else{const re=ks(c);Q=re,Y.set(F,re)}}else{const F=k[0];let Y=k[2],$=k[3]??"";if(F===2&&(K=y,m=K+1),S&&j<K&&(j<C-1&&S.push(h.slice(j,C-1)),k[2]="/"+Y,F===2&&k[3]!==void 0&&x<y&&(k[3]=$.slice(0,-1)),S.push(k),j=K),!c)continue;const re=g&&!!(Y||$);g||(Y=Y.toLowerCase(),$=$.toLowerCase());const oe=F===1?c.dynamic??(c.dynamic=[]):F===3?c.optional??(c.optional=[]):c.wildcard??(c.wildcard=[]),xe=F!==2&&!b&&oe.find(me=>!me.parse&&me.caseSensitive===re&&me.prefix===Y&&me.suffix===$);if(xe)Q=xe;else{const me=ks(c,F,re,Y,$);Q=me,oe.push(me),oe.length===2&&(f==null||f.push(oe))}}c=Q}S&&j<x&&S.push(h.slice(j,x));const T=S==null?void 0:S.slice();if(!c)return T;if(b&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const C=ks(c,Fb);(c.pathless??(c.pathless=[])).push(C),c=C}const E=(s.path||!s.children)&&!s.isRoot;if(E&&x<y){const C=ks(c,ss);c.index=C,c=C}return c.parse=b??null,c.priority=((O=p==null?void 0:p.params)==null?void 0:O.priority)??0,c.route||(c.data=T,E&&(c.route=s)),[c,m,T]}function $b(a,s){if(a.parse&&!s.parse)return-1;if(!a.parse&&s.parse)return 1;if(a.parse&&s.parse&&(a.priority||s.priority))return s.priority-a.priority;if(a.prefix&&s.prefix&&a.prefix!==s.prefix){if(a.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(a.prefix))return 1}if(a.suffix&&s.suffix&&a.suffix!==s.suffix){if(a.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(a.suffix))return 1}return a.prefix&&!s.prefix?-1:!a.prefix&&s.prefix?1:a.suffix&&!s.suffix?-1:!a.suffix&&s.suffix?1:a.caseSensitive&&!s.caseSensitive?-1:!a.caseSensitive&&s.caseSensitive?1:0}function ks(a,s=0,i,c,f){return{kind:s,depth:a?a.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:a,parse:null,priority:0,caseSensitive:i,prefix:c,suffix:f}}function JN(a,s){const i=ks(),c=[];function f(d,m,h,p){const[y,x,g]=Oc(!1,d,m,h,c,p);if(d.children)for(const b of d.children)f(b,x,y,g)}for(const d of a)f(d,1,i);for(const d of c)d.sort($b);s.masksTree=i,s.flatCache=eo(1e3)}function PN(a,s){a||(a="/");const i=s.flatCache.get(a);if(i!==void 0)return i;const c=tm(a,s.masksTree);return s.flatCache.set(a,c),c}function WN(a,s,i,c,f){a||(a="/"),c||(c="/");const d=s?`case\0${a}`:a;let m=f.singleCache.get(d);return m||(m=ks(),Oc(s,{from:a},1,m),f.singleCache.set(d,m)),tm(c,m,i)}function eT(a,s,i=!1){const c=i?a:`nofuzz\0${a}`,f=s.matchCache.get(c);if(f!==void 0)return f;a||(a="/");let d;try{d=tm(a,s.segmentTree,i)}catch(m){if(m instanceof URIError)d=null;else throw m}return d&&(d.branch=Pb(d.route)),s.matchCache.set(c,d),d}function tT(a,s=!1){const i=ks(),c=[],f={},d={};let m=0;function h(p,y,x,g){if(p.init(m),p.id in f&&Wh(),f[p.id]=p,m!==0&&p.path){const T=Gn(p.fullPath);(!d[T]||p.fullPath.endsWith("/"))&&(d[T]=p)}m++;const[b,S,j]=Oc(s,p,y,x,c,g);if(p._interpolation=j,p.children)for(const T of p.children)h(T,S,b,j)}h(a,1,i);for(const p of c)p.sort($b);return{processedTree:{segmentTree:i,singleCache:eo(1e3),matchCache:eo(1e3),flatCache:null,masksTree:null},routesById:f,routesByPath:d}}function tm(a,s,i=!1){const c=a.split("/"),f=aT(a,c,s,i);if(!f)return null;const[d]=Jb(a,c,f);return{route:f.node.route,rawParams:d}}function Jb(a,s,i){var x,g,b,S;const c=nT(i.node),f=i.node.data&&FN(i.node.data),d=Object.create(null);let m=((x=i.extract)==null?void 0:x.part)??0,h=((g=i.extract)==null?void 0:g.node)??0,p=((b=i.extract)==null?void 0:b.path)??0,y=((S=i.extract)==null?void 0:S.param)??0;for(;h<c.length;m++,h++,p++){const j=c[h];if(j.kind===ss)break;if(j.kind===Fb){m--,p--;continue}const T=s[m],E=p;if(T&&(p+=T.length),j.kind===1||j.kind===3){const q=f[y++];if(j.kind===3&&i.skipped&1<<h){m--,p=E-1;continue}const O=j.suffix||j.prefix?T.substring(j.prefix.length,T.length-j.suffix.length):T;(O||j.kind===1)&&(d[q]=decodeURIComponent(O))}else if(j.kind===2){const q=j,O=a.substring(E+q.prefix.length,a.length-q.suffix.length),C=decodeURIComponent(O);d["*"]=C,d._splat=C;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:m,node:h,path:p,param:y}]}function Pb(a){const s=[a];for(;a.parentRoute;)a=a.parentRoute,s.push(a);return s.reverse(),s}function nT(a){const s=Array(a.depth+1);do s[a.depth]=a,a=a.parent;while(a);return s}function aT(a,s,i,c){if(a==="/"&&i.index)return{node:i.index,skipped:0};const f=!us(s),d=f&&a!=="/",m=s.length-(f?1:0),h=[{node:i,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,y=null;for(;h.length;){const x=h.pop(),{node:g,index:b,skipped:S,statics:j,dynamics:T,optionals:E}=x;let{extract:q,rawParams:O}=x;if(g.kind===2&&g.route&&!Or(y,x))continue;if(g.parse){if(!xv(a,s,x))continue;O=x.rawParams,q=x.extract}c&&g.route&&g.kind!==ss&&Or(p,x)&&(p=x);const C=b===m;if(C&&(g.route&&(!d||g.kind===ss||g.kind===2)&&Or(y,x)&&(y=x),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const H=C?void 0:s[b];let K;if(C&&g.index){const k={node:g.index,index:b,skipped:S,statics:j,dynamics:T,optionals:E,extract:q,rawParams:O};let Q=!0;if(g.index.parse&&(xv(a,s,k)||(Q=!1)),Q){if(!T&&!E&&!S&&sT(j,m))return k;Or(y,k)&&(y=k)}}if(g.wildcard)for(let k=g.wildcard.length-1;k>=0;k--){const Q=g.wildcard[k],{prefix:F,suffix:Y}=Q;if(!(F&&(C||!(Q.caseSensitive?H:K??(K=H.toLowerCase())).startsWith(F)))){if(Y){if(C)continue;const $=s.slice(b).join("/"),re=$.slice(-Y.length);if((Q.caseSensitive?re:re.toLowerCase())!==Y||$.length-Y.length<F.length)continue}h.push({node:Q,index:m,skipped:S,statics:j,dynamics:T,optionals:E,extract:q,rawParams:O})}}if(g.optional){const k=S|1<<g.depth+1;for(let Q=g.optional.length-1;Q>=0;Q--){const F=g.optional[Q];h.push({node:F,index:b,skipped:k,statics:j,dynamics:T,optionals:E,extract:q,rawParams:O})}if(!C)for(let Q=g.optional.length-1;Q>=0;Q--){const F=g.optional[Q],{prefix:Y,suffix:$}=F;if(Y||$){const re=F.caseSensitive?H:K??(K=H.toLowerCase());if(Y&&!re.startsWith(Y)||$&&re.indexOf($,re.length-$.length)<Y.length)continue}h.push({node:F,index:b+1,skipped:S,statics:j,dynamics:T,optionals:E+Ar(m,b),extract:q,rawParams:O})}}if(!C&&g.dynamic&&H)for(let k=g.dynamic.length-1;k>=0;k--){const Q=g.dynamic[k],{prefix:F,suffix:Y}=Q;if(F||Y){const $=Q.caseSensitive?H:K??(K=H.toLowerCase());if(F&&!$.startsWith(F)||Y&&$.indexOf(Y,$.length-Y.length)<F.length)continue}h.push({node:Q,index:b+1,skipped:S,statics:j,dynamics:T+Ar(m,b),optionals:E,extract:q,rawParams:O})}if(!C&&g.staticInsensitive){const k=g.staticInsensitive.get(K??(K=H.toLowerCase()));k&&h.push({node:k,index:b+1,skipped:S,statics:j+Ar(m,b),dynamics:T,optionals:E,extract:q,rawParams:O})}if(!C&&g.static){const k=g.static.get(H);k&&h.push({node:k,index:b+1,skipped:S,statics:j+Ar(m,b),dynamics:T,optionals:E,extract:q,rawParams:O})}if(g.pathless)for(let k=g.pathless.length-1;k>=0;k--){const Q=g.pathless[k];h.push({node:Q,index:b,skipped:S,statics:j,dynamics:T,optionals:E,extract:q,rawParams:O})}}if(y)return y;if(c&&p){let x=p.index;for(let b=0;b<p.index;b++)x+=s[b].length;const g=x===a.length?"/":a.slice(x);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(g),p}return null}function Ar(a,s){return 2**(a-s-1)}function sT(a,s){return a===2**(s-1)-1}function xv(a,s,i){let c,f;try{[c,f]=Jb(a,s,i)}catch{return null}if(i.rawParams=c,i.extract=f,!i.node.parse)return!0;try{if(i.node.parse(c)===!1)return null}catch{}return!0}function Or(a,s){return a?s.statics>a.statics||s.statics===a.statics&&(s.dynamics>a.dynamics||s.dynamics===a.dynamics&&(s.optionals>a.optionals||s.optionals===a.optionals&&((s.node.kind===ss)>(a.node.kind===ss)||s.node.kind===ss==(a.node.kind===ss)&&s.node.depth>a.node.depth))):!0}function lT(a,s,i){const c=Vb(a),f=`/${c}`,d=s?f:f.toLowerCase(),m=`${d}/`,h={input:({url:p})=>{const y=s?p.pathname:p.pathname.toLowerCase();return y===d?p.pathname="/":y.startsWith(m)&&(p.pathname=p.pathname.slice(f.length)),p},output:({url:p})=>(p.pathname=ti(`/${c}${p.pathname}`),p)};return i?{input:({url:p})=>Rh(i,h.input({url:p})),output:({url:p})=>h.output({url:Wb(i,p)})}:h}function Rh(a,s){var c;const i=(c=a==null?void 0:a.input)==null?void 0:c.call(a,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function Wb(a,s){var c;const i=(c=a==null?void 0:a.output)==null?void 0:c.call(a,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function iT(a,s){const{createMutableStore:i,createReadonlyStore:c,batch:f}=s,d=new Map,m=i("idle"),h=i(a),p=i(void 0),y=i([]),x=c(()=>y.get().map(T=>d.get(T).get())),g=c(()=>({status:m.get(),isLoading:m.get()==="pending",matches:x.get(),location:h.get(),resolvedLocation:p.get()}));function b(T){let E=d.get(T);return E||(E=i(void 0),d.set(T,E)),E}const S={status:m,location:h,resolvedLocation:p,ids:y,matches:x,byRoute:d,__store:g,getMatchStore:b,setMatches:j};function j(T){const E=y.get(),q=T.map(O=>O.routeId);f(()=>{DN(E,q)||y.set(q);for(const O of E)q.includes(O)||d.get(O).set(()=>{});for(const O of T){const C=b(O.routeId);C.get()!==O&&C.set(O)}})}return S}var cs="__TSR_index",Sv="popstate",jv="beforeunload",cT=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Gr(a){const s=cT.exec(a);return s?"/"+a.slice(s[0].length):a}function ex(a){return/[\x00-\x1f\x7f]/.test(a)&&(a=a.replace(/[\x00-\x1f\x7f]/g,s=>`
18
+ \r`.includes(s)?"":encodeURIComponent(s))),Gr(a)}function uT(a){let s=a.getLocation();const i=new Set,c=m=>{s=a.getLocation(),i.forEach(h=>h({location:s,action:m}))},f=m=>{a.notifyOnIndexChange??!0?c(m):s=a.getLocation()},d=async m=>{var p,y,x;const h=(p=m.navigateOpts)!=null&&p.ignoreBlocker||(y=a.getBlockers)==null?void 0:y.call(a);if(typeof document<"u"&&(h!=null&&h.length)&&(m.type==="PUSH"||m.type==="REPLACE"))for(const g of h){const b=to(m.path,m.state);if(await g.blockerFn({currentLocation:s,nextLocation:b,action:m.type})){(x=a.onBlocked)==null||x.call(a);return}}m.task()};return{get location(){return s},get length(){return a.getLength()},subscribers:i,subscribe:m=>(i.add(m),()=>{i.delete(m)}),push:(m,h,p)=>{const y=s.state[cs];h=Nv(y+1,h),d({task:()=>{a.pushState(m,h),c({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:m,state:h})},replace:(m,h,p)=>{const y=s.state[cs];h=Nv(y,h),d({task:()=>{a.replaceState(m,h),c({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:m,state:h})},go:(m,h)=>{d({task:()=>{a.go(m,(h==null?void 0:h.ignoreBlocker)??!1),f({type:"GO",index:m})},navigateOpts:h,type:"GO"})},back:m=>{d({task:()=>{a.back((m==null?void 0:m.ignoreBlocker)??!1),f({type:"BACK"})},navigateOpts:m,type:"BACK"})},forward:m=>{d({task:()=>{a.forward((m==null?void 0:m.ignoreBlocker)??!1),f({type:"FORWARD"})},navigateOpts:m,type:"FORWARD"})},canGoBack:()=>s.state[cs]!==0,createHref:m=>a.createHref(m),block:m=>{var p;if(!a.setBlockers)return()=>{};const h=((p=a.getBlockers)==null?void 0:p.call(a))??[];return a.setBlockers([...h,m]),()=>{var x,g;const y=((x=a.getBlockers)==null?void 0:x.call(a))??[];(g=a.setBlockers)==null||g.call(a,y.filter(b=>b!==m))}},flush:()=>{var m;return(m=a.flush)==null?void 0:m.call(a)},destroy:()=>{var m;return(m=a.destroy)==null?void 0:m.call(a)},notify:c,_getBlockers:()=>{var m;return((m=a.getBlockers)==null?void 0:m.call(a))??[]}}}function Nv(a,s){const i=nm();return{...s,key:i,__TSR_key:i,[cs]:a}}function rT(a){var Q,F;const s=typeof document<"u"?window:void 0,i=s.history.pushState,c=s.history.replaceState;let f=[];const d=()=>f,m=Y=>f=Y,h=Y=>ex(Y),p=(()=>to(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((Q=s.history.state)!=null&&Q.__TSR_key)&&!((F=s.history.state)!=null&&F.key)){const Y=nm();s.history.replaceState({[cs]:0,key:Y,__TSR_key:Y},"")}let y=p(),x,g=!1,b=!1,S=!1,j=!1;const T=()=>y;let E;const q=()=>{E&&(k._ignoreSubscribers=!0,(E[2]?s.history.pushState:s.history.replaceState)(E[1],"",E[0]),k._ignoreSubscribers=!1,E=void 0,x=void 0)},O=(Y,$,re)=>{const oe=!!E;oe||(x=y),y=to($,re),E=[y.href,re,(E==null?void 0:E[2])||Y],oe||queueMicrotask(()=>q())},C=Y=>{y=p(),k.notify({type:Y})},H=async()=>{if(j=!1,b){b=!1;return}const Y=p(),$=Y.state[cs]-y.state[cs],re=$===1,oe=$===-1,xe=!re&&!oe||g;g=!1;const me=xe?"GO":oe?"BACK":"FORWARD",ie=xe?{type:"GO",index:$}:{type:oe?"BACK":"FORWARD"};if(S)S=!1;else{const Z=d();if(typeof document<"u"&&Z.length){for(const W of Z)if(await W.blockerFn({currentLocation:y,nextLocation:Y,action:me})){b=!0,s.history.go(-$),k.notify(ie);return}}}y=p(),k.notify(ie)},K=Y=>{if(j){j=!1;return}let $=!1;const re=d();if(typeof document<"u"&&re.length)for(const oe of re){const xe=oe.enableBeforeUnload??!0;if(xe===!0){$=!0;break}if(typeof xe=="function"&&xe()===!0){$=!0;break}}if($)return Y.preventDefault(),Y.returnValue=""},k=uT({getLocation:T,getLength:()=>s.history.length,pushState:(Y,$)=>O(!0,Y,$),replaceState:(Y,$)=>O(!1,Y,$),back:Y=>(Y&&(S=!0,j=!0),s.history.back()),forward:Y=>{Y&&(S=!0,j=!0),s.history.forward()},go:(Y,$)=>{g=!0,$&&(S=!0,j=!0),s.history.go(Y)},createHref:h,flush:q,destroy:()=>{s.history.pushState=i,s.history.replaceState=c,s.removeEventListener(jv,K,{capture:!0}),s.removeEventListener(Sv,H)},onBlocked:()=>{x&&y!==x&&(y=x)},getBlockers:d,setBlockers:m,notifyOnIndexChange:!1});return k._ignoreNextBeforeUnload=Y=>{j=!1;try{Y=new URL(Y,s.document.baseURI).href,j=/^https?:/.test(Y)&&(!Y.includes("#")||Y.split("#")[0]!==s.location.href.split("#")[0])}catch{}},s.addEventListener(jv,K,{capture:!0}),s.addEventListener(Sv,H),s.history.pushState=function(...Y){const $=i.apply(s.history,Y);return k._ignoreSubscribers||C("PUSH"),$},s.history.replaceState=function(...Y){const $=c.apply(s.history,Y);return k._ignoreSubscribers||C("REPLACE"),$},k}function to(a,s){const i=ex(a),c=i.indexOf("#"),f=i.indexOf("?");if(!s){const d=nm();s={[cs]:0,key:d,__TSR_key:d}}return{href:i,pathname:i.slice(0,c>-1?f>-1?Math.min(c,f):c:f>-1?f:i.length),hash:c>-1?i.slice(c):"",search:f>-1?i.slice(f,c===-1?void 0:c):"",state:s}}function nm(){return(Math.random()+1).toString(36).slice(7)}function Pd(a,s){return a.protocol!=="http:"&&a.protocol!=="https:"||a.origin!==s||!!a.username||!!a.password}function Wd(a){return a.pathname+a.search+a.hash}function Tv(a){var s,i;return a.options.loader||a.options.beforeLoad||a.lazyFn||((s=a.options.component)==null?void 0:s.preload)||((i=a.options.pendingComponent)==null?void 0:i.preload)}function lo(a,s){return{fromLocation:s,toLocation:a,pathChanged:(s==null?void 0:s.pathname)!==a.pathname,hrefChanged:(s==null?void 0:s.href)!==a.href,hashChanged:(s==null?void 0:s.hash)!==a.hash}}function Ev({key:a,__TSR_key:s,__TSR_index:i,__hashScrollIntoViewOptions:c,...f}){return f}function oT(a){return a.findIndex(s=>s.status==="error"||s.status==="notFound"||s._notFound)+1}function fT(a,s,i,c,f,d){var m,h,p,y;c&&(s=s.slice(0,c)),f&&(i=i.slice(0,f));for(const x of s){if(d&&a._tx!==d)return;i.some(g=>g.routeId===x.routeId)||(h=(m=a.routesById[x.routeId].options).onLeave)==null||h.call(m,x)}for(const x of i){if(d&&a._tx!==d)return;(y=(p=a.routesById[x.routeId].options)[s.some(g=>g.routeId===x.routeId)?"onStay":"onEnter"])==null||y.call(p,x)}}var dT=class{constructor(a,s){var i;this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async c=>(c(),!1),this.update=c=>{const f=this.options;this.options={...f,...c},this.isServer=this.options.isServer??hv??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=rT()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const d=this.options.basepath??"/",m=this.options.rewrite,h=this.basepath!==d||(f==null?void 0:f.rewrite)!==m||(f==null?void 0:f.caseSensitive)!==this.options.caseSensitive;if(h&&(this.basepath=d,this.rewrite=d!=="/"&&Vb(d)?lT(d,this.options.caseSensitive,m):m),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||hv){this.routeTree=this.options.routeTree;let p;p=this.buildRouteTree(),this.setRoutes(p)}if(this.stores)h&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=iT(this.latestLocation,p),YN(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const c=tT(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&JN(this.options.routeMasks,c.processedTree),{...c,resolvePathCache:eo(1e3)}},this.subscribe=(c,f)=>{const d={eventType:c,fn:f};return this.subscribers.add(d),()=>{this.subscribers.delete(d)}},this.emit=c=>{for(const f of this.subscribers)if(f.eventType===c.type)try{f.fn(c)}catch(d){console.error(d)}},this.parseLocation=(c,f)=>{const d=({pathname:y,search:x,hash:g,href:b},S)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(y)){const q=this.options.parseSearch(x),O=this.options.stringifySearch(q);return{href:y+O+g,publicHref:y+O+g,pathname:Sc(y),external:!1,searchStr:O,search:Jl(f==null?void 0:f.search,q),hash:Sc(g.slice(1)),state:is(f==null?void 0:f.state,S)}}const j=Rh(this.rewrite,new URL(b,this.origin)),T=this.options.parseSearch(j.search),E=this.options.stringifySearch(T);return j.search=E,{href:j.href.replace(j.origin,""),publicHref:b,pathname:Sc(Gr(j.pathname)),external:!!this.rewrite&&Pd(j,this.origin),searchStr:E,search:Jl(f==null?void 0:f.search,T),hash:Sc(j.hash.slice(1)),state:is(f==null?void 0:f.state,S)}},m=d(c,c.state),{__tempLocation:h,__tempKey:p}=m.state;if(h&&(!p||p===this.tempLocationKey)){const y=d(h,{...h.state,__tempLocation:void 0,key:m.state.key,__TSR_key:m.state.__TSR_key});return y.maskedLocation=m,y}return m},this.matchRoutes=(c,f,d)=>typeof c=="string"?this.matchRoutesInternal({pathname:c,search:f},d):this.matchRoutesInternal(c,f),this.getMatchedRoutes=c=>{const f=Object.create(null),d=eT(Gn(c),this.processedTree,!0);return d&&Object.assign(f,d.rawParams),[(d==null?void 0:d.branch)||[this.routesById.__root__],f,d==null?void 0:d.route]},this.buildLocation=c=>{{const h=this.staticLocations.get(c);if(h)return h}let f=!1;const d=(h={})=>{var ie;if(h.href){const Z=to(h.href,{});h={...h,to:Rh(this.rewrite,new URL(Z.pathname,this.origin)).pathname,search:this.options.parseSearch(Z.search),hash:Z.hash.slice(1)}}const p=c._fromLocation||this._pendingLocation||this.latestLocation;let y;const x=()=>(f=!0,p),g=()=>y??(y=this.matchRoutesLightweight(x())),b=h.to?`${h.to}`:".",S=gv(b[0]==="/"?"":h.unsafeRelative==="path"?x().pathname:h.from??g()[1],b,this.options.trailingSlash,this.resolvePathCache),j=this.routesByPath[Gn(S)],T=S.includes("$");let E;if(j)E=j._branch??(j._branch=Pb(j));else if(T)E=[];else{const[Z,W,J]=this.getMatchedRoutes(S);E=Z,this.options.notFoundRoute&&(!J||J.path!=="/"&&W["**"])&&(E=[...E,this.options.notFoundRoute])}const q=T?(j==null?void 0:j._interpolation)??Oc(!1,{fullPath:S},0):void 0;let O;for(const Z of E){const W=((ie=Z.options.params)==null?void 0:ie.stringify)??Z.options.stringifyParams;if(W){const J=g()[3];if(O??(O=eh(h.params,J)),!Qb(O))break;O===J&&(O=Object.assign(Yr(),O));try{Object.assign(O,W(O))}catch{}}}O??(O=eh(h.params,mT(h.params,q)?g()[3]:th));const C=c.leaveParams?S:Gr(Sc(q?yv(S,q,O,this.pathParamsDecoder):S)),H=pT(E,c._includeValidateSearch),K=()=>{var W;let Z=g()[2];if(c._includeValidateSearch&&((W=this.options.search)!=null&&W.strict)){const J={};E.forEach(we=>{if(we.options.validateSearch)try{Object.assign(J,Vr(we.options.validateSearch,{...J,...Z}))}catch{}}),Z=J}return Z},k=H.length?gT(H,K(),h):h.search===!0?K():typeof h.search=="function"?h.search(K()):h.search||th,Q=this.options.stringifySearch(k),F=h.hash===!0?x().hash:typeof h.hash=="function"?h.hash(x().hash):h.hash||void 0,Y=F?`#${F}`:"",$=h.state?h.state===!0?x().state:typeof h.state=="function"?h.state(x().state):h.state:th,re=`${C}${Q}${Y}`;let oe,xe,me=!1;if(this.rewrite){const Z=new URL(re,this.origin),W=Z.origin,J=Wb(this.rewrite,Z);oe=Wd(Z),Pd(J,W)?(xe=J.href,me=!0):xe=Gr(Wd(J))}else oe=MN(re),xe=oe;return{publicHref:xe,href:oe,pathname:C,search:k,searchStr:Q,state:$,hash:F??"",external:me,unmaskOnReload:h.unmaskOnReload}},m=d(c);if(c.mask)m.maskedLocation=d({from:c.from,...c.mask});else if(this.options.routeMasks){const h=PN(m.pathname,this.processedTree);if(h){const p=Object.assign(Yr(),h.rawParams),{from:y,params:x,...g}=h.route,b=eh(x,p);m.maskedLocation=d({from:c.from,...g,params:b})}}return!f&&c._fromLocation&&this.staticLocations.set(c,m),m},this.commitLocation=async({viewTransition:c,ignoreBlocker:f,...d})=>{const m=d.maskedLocation??d;if(m.external)return wv(this,m.publicHref,{replace:d.replace,ignoreBlocker:f});let h;const p=Gn(this.latestLocation.href)===Gn(d.href)&&pa(Ev(d.state),Ev(this.latestLocation.state)),y=this._commitPromise;let x;const g=new Promise(b=>{x=b});if(g.resolve=()=>{x(),y==null||y.resolve()},this._commitPromise=g,p)this.load();else{let{maskedLocation:b,hashScrollIntoView:S,...j}=d;b&&(j={...b,state:{...b.state,__tempKey:void 0,__tempLocation:{...j,search:j.searchStr,state:{...j.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(j.unmaskOnReload??this.options.unmaskOnReload??!1)&&(j.state.__tempKey=this.tempLocationKey)),j.state={...j.state,__hashScrollIntoViewOptions:S??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=c,h=d.replace?"REPLACE":"PUSH",this.history[h==="REPLACE"?"replace":"push"](j.publicHref,j.state,{ignoreBlocker:f}),this.history.subscribers.size||this.load({action:{type:h}})}return this._scroll.n=d.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:c,resetScroll:f,hashScrollIntoView:d,viewTransition:m,ignoreBlocker:h,...p}={})=>{const y=this.buildLocation({...p,_includeValidateSearch:!0});this._pendingLocation=y;const x=this.commitLocation({...y,viewTransition:m,replace:c,resetScroll:f,hashScrollIntoView:d,ignoreBlocker:h});return queueMicrotask(()=>{this._pendingLocation===y&&(this._pendingLocation=void 0)}),x},this.navigate=async({to:c,reloadDocument:f,href:d,publicHref:m,...h})=>{const p=d?Ac(d):void 0;if(p||f){if(c!==void 0||!d){const x=this.buildLocation({to:c,...h}),g=x.maskedLocation??x;d??(d=g.publicHref),m??(m=g.publicHref)}return wv(this,!p&&m?m:d,h)}return this.buildAndCommitLocation({...h,href:d,to:c,_isNavigate:!0})},this.load=async c=>{this.updateLatestLocation(),c!=null&&c.action&&(this._scroll.h=c.action.type==="PUSH"||c.action.type==="REPLACE"),await wT(this,c)},this.startViewTransition=c=>{var d,m;const f=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,f&&typeof document.startViewTransition=="function"){let h;if(typeof f=="object"&&((m=(d=window.CSS)==null?void 0:d.supports)!=null&&m.call(d,"selector(:active-view-transition-type(a))"))){const p=this.latestLocation,y=this.stores.resolvedLocation.get(),x=typeof f.types=="function"?f.types(lo(p,y)):f.types;if(x===!1)return c();h={update:c,types:x}}else h=c;return document.startViewTransition(h).updateCallbackDone}return c()},this.invalidate=c=>{var g,b,S;const f=this._committed,d=c==null?void 0:c.filter,m=this._preloads,h=new Set,p=j=>{(!d||d(j))&&h.add(j.id)};f.forEach(p),this._cache.forEach(p),m==null||m.forEach(j=>j.forEach(p)),(g=this._tx)==null||g[3].forEach(p);const y=[];for(const[j,T]of m??[])T.some(E=>h.has(E.id))&&(m.delete(j),y.push(j));const x=j=>{if(h.has(j.id)){const T=this.routesById[j.routeId],E={...j,invalid:!0,...(c!=null&&c.forcePending||j.status==="error"||j.status==="notFound")&&Tv(T)?{status:"pending",error:void 0}:void 0};return j._flight=void 0,E}return j};this._committed=f.map(x);for(const[j,T]of this._cache)h.has(j)&&(T.invalid=!0,c!=null&&c.forcePending&&(T.status="pending"));for(const j of h){const T=(b=this._flights)==null?void 0:b.get(j);(S=this._flights)==null||S.delete(j),T&&!T[2]&&y.push(T[1])}for(const j of y)j.abort();return this.shouldViewTransition=!1,this.load({sync:c==null?void 0:c.sync})},this.resolveRedirect=c=>{const f=c.options;let d=c.headers.get("Location")||f.href;if(!d){const h=this.buildLocation(f);d=(h.maskedLocation??h).publicHref||"/"}let m;if(Yb.test(d)||(m=Ac(d))&&!this.protocolAllowlist.has(m))throw new Error("Redirect blocked: unsafe protocol");if(m==="http:"||m==="https:"){const h=new URL(d);h.pathname.startsWith("//")?d=h.href:Pd(h,this.origin)||(d=Wd(h),m=void 0)}return m&&(f.reloadDocument=!0),f.href=d,c.headers.set("Location",d),c},this.clearCache=c=>{var x;const f=this._cache,d=this._preloads,m=c==null?void 0:c.filter,h=[],p=[];for(const[g,b]of f)(!m||m(b))&&(p.push(g),h.push(b));const y=[];for(const[g,b]of d??[])(!m||b.some(m))&&(y.push(g),h.push(...b));for(const g of p)f.delete(g);for(const g of y)d.delete(g);for(const g of h){const b=g._flight;g._flight=void 0,b&&!--b[2]&&(((x=this._flights)==null?void 0:x.get(g.id))===b&&this._flights.delete(g.id),y.push(b[1]))}for(const g of y)g.abort()},this.loadRouteChunk=si,this.preloadRoute=c=>_T(this,c),this.matchRoute=(c,f)=>{const d={...c,to:c.to?gv(c.from||"",c.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:c.params||{},leaveParams:!0},m=this.buildLocation(d),h=this.stores.status.get()==="pending";if(f!=null&&f.pending&&!h)return!1;const p=(f==null?void 0:f.pending)??!h?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),y=WN(m.pathname,(f==null?void 0:f.caseSensitive)??!1,(f==null?void 0:f.fuzzy)??!1,p.pathname,this.processedTree);return!y||c.params&&!pa(y.rawParams,c.params,!0)?!1:(f==null?void 0:f.includeSearch)??!0?pa(p.search,m.search,!0)?y.rawParams:!1:y.rawParams},this.getStoreConfig=s,(i=a.pathParamsAllowedCharacters)!=null&&i.length&&(this.pathParamsDecoder=zN(a.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...a,caseSensitive:a.caseSensitive??!1,notFoundMode:a.notFoundMode??"fuzzy",stringifySearch:a.stringifySearch??KN,parseSearch:a.parseSearch??VN,protocolAllowlist:a.protocolAllowlist??ON}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(a){Object.assign(this,a),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const s=this.options.notFoundRoute;s&&(s.init(99999999999),this.routesById[s.id]!==s&&(s._interpolation=Oc(!1,s,0)),this.routesById[s.id]=s)}matchRoutesInternal(a,s){var b,S;const[i,c,f]=this.getMatchedRoutes(a.pathname);let d=i,m=!1;(f?f.path!=="/"&&c["**"]:Gn(a.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:m=!0);const h=m?yT(this.options.notFoundMode,d):void 0,p=new Array(d.length),y=this._committed,x=(j,T)=>{const E=y[T];return(E==null?void 0:E.routeId)===j.id?E:j===this.options.notFoundRoute?y.find(q=>q.routeId===j.id):void 0};let g;for(let j=0;j<d.length;j++){const T=d[j],E=p[j-1];let q,O,C;{const ie=(E==null?void 0:E.search)??a.search,Z=(E==null?void 0:E._strictSearch)??void 0;try{const W=Vr(T.options.validateSearch,{...ie})??void 0;q={...ie,...W},O={...Z,...W}}catch(W){let J=W;if(W instanceof no||(J=new no(W.message,{cause:W})),s!=null&&s.throwOnError)throw J;q=ie,O={},C=J}}let H="",K="";try{H=((S=(b=T.options).loaderDeps)==null?void 0:S.call(b,{search:q}))??"",K=H&&JSON.stringify(H)||""}catch(ie){if(s!=null&&s.throwOnError)throw ie;C??(C=ie)}const k=Yr(),Q=T._interpolation?yv(T.fullPath,T._interpolation,c,this.pathParamsDecoder,k):T.fullPath,F=T.id+Q+K,Y=x(T,j),$=this._cache.get(F)??((Y==null?void 0:Y.id)===F?Y:void 0);g=($==null?void 0:$._strictParams)??Object.assign(k,g);let re;if(!$)try{_v(T,g)}catch(ie){if(xi(ie)||Zb(ie)?re=ie:re=new hT(ie.message,{cause:ie}),s!=null&&s.throwOnError)throw re}const oe=Y?"stay":"enter";let xe;if($)xe={...$,cause:oe,search:Jl(Y?Y.search:$.search,q),_strictSearch:O,searchError:C};else{const ie=Tv(T)?"pending":"success";xe={id:F,ssr:T.options.ssr,index:j,routeId:T.id,params:(Y==null?void 0:Y.params)??g,_strictParams:g,pathname:Q,updatedAt:Date.now(),search:Y?Jl(Y.search,q):q,_strictSearch:O,searchError:C,status:ie,isFetching:!1,error:void 0,paramsError:re,context:{},abortController:(s==null?void 0:s._controller)??new AbortController,cause:oe,loaderDeps:Y?is(Y.loaderDeps,H):H,invalid:!1,preload:!1,staticData:T.options.staticData||{},fullPath:T.fullPath}}const me=h===T.id;xe._notFound&&!me&&(xe.error=void 0),xe._notFound=me,p[j]=xe}for(let j=0;j<p.length;j++){const T=p[j];T.params=T.cause==="stay"?Jl(T.params,g):g,s!=null&&s._controller&&(T.context={})}return p}matchRoutesLightweight(a){const s=us(this.stores.ids.get()),i=s?this.stores.byRoute.get(s).get():void 0,c=i==null?void 0:i.id,f=this.lightweightCache.get(a);if(f&&f[0]===c)return f[1];const[d,m]=this.getMatchedRoutes(a.pathname),h=us(d),p={...a.search};for(const b of d)try{Object.assign(p,Vr(b.options.validateSearch,p))}catch{}const y=i&&i.routeId===h.id&&i.pathname===a.pathname;let x;if(y)x=i.params;else{const b=m;for(const S of d)try{_v(S,b)}catch{}x=b}const g=[d,h.fullPath,p,x];return this.lightweightCache.set(a,[c,g]),g}};async function wv(a,s,{replace:i,ignoreBlocker:c}){var f,d;if(!Ib(s,a.protocolAllowlist)){if(!c){const m=a.history._getBlockers();for(const h of m)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:a.history.location,nextLocation:a.history.location,action:i?"REPLACE":"PUSH"}))return}(d=(f=a.history)._ignoreNextBeforeUnload)==null||d.call(f,s),i?window.location.replace(s):window.location.href=s}}var no=class extends Error{},hT=class extends Error{};function Vr(a,s){if(a==null)return{};if("~standard"in a){const i=a["~standard"].validate(s);if(i instanceof Promise)throw new no("Async validation not supported");if(i.issues)throw new no(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in a?a.parse(s):typeof a=="function"?a(s):{}}function eh(a,s){if(a===void 0||a===!0)return s;const i=Object.create(null);return a===!1||a===null?i:typeof a=="function"?(Object.assign(i,s),Object.assign(i,a(i))):Object.assign(i,s,a)}function mT(a,s){return typeof a=="function"?!0:!s||a===!1||a===null?!1:a===void 0||a===!0||s.some(i=>typeof i!="string"&&!Ph.call(a,i[1]))}const th=Object.freeze({});function pT(a,s){var c;const i=[];for(let f=0;f<a.length;f++){const d=a[f].options;if("search"in d)(c=d.search)!=null&&c.middlewares&&i.push(...d.search.middlewares);else if(d.preSearchFilters||d.postSearchFilters){const h=({search:p,next:y})=>{const x=y(d.preSearchFilters?d.preSearchFilters.reduce((g,b)=>b(g),p):p);return d.postSearchFilters?d.postSearchFilters.reduce((g,b)=>b(g),x):x};i.push(h)}const m=d.validateSearch;if(s&&m){const h=({search:p,next:y,meta:x})=>{const g=y(p);try{const b=Vr(m,g);if(x&&b)for(const S in b)S in g||(x.defaulted||(x.defaulted=new Map)).set(S,b[S]);return{...g,...b}}catch{}return g};i.push(h)}}return i}function gT(a,s,i){const c=(f,d,m)=>{if(f>=a.length){if(!i.search)return{};if(i.search===!0)return d;const p=kb(i.search,d);return m&&(m.explicit=p),p}const h=(p,y)=>{if(y){const x=m||{};return{search:c(f+1,p,x),meta:x}}return c(f+1,p,m)};return a[f]({search:d,next:h,meta:m})};return c(0,s)}function yT(a,s){if(a!=="root"){let i;for(let c=s.length-1;c>=0;c--){const f=s[c];if(f.options.notFoundComponent)return f.id;i||(i=f.children&&f.id)}if(i)return i}return ai}function _v(a,s){var c;const i=((c=a.options.params)==null?void 0:c.parse)??a.options.parseParams;i&&Object.assign(s,i(s))}function Ah(a,s){var i,c;return(c=(i=a.options[s])==null?void 0:i.preload)==null?void 0:c.call(i)}function vT(a,s){const i=Ah(a,"component");let c=Ah(a,"pendingComponent");return s&&(c?c=c.then(s):s()),i&&c?Promise.all([i,c]).then(()=>{}):i??c}function si(a,s,i){const c=()=>s===!1?void 0:s?Ah(a,s):vT(a,i),f=a._lazy;if(f)return f===!0?c():f.then(c);if(!a.lazyFn)return c();const d=a.lazyFn().then(m=>{{const{id:h,...p}=m.options;Object.assign(a.options,p),a._lazy=!0}},m=>{throw a._lazy=void 0,m});return a._lazy=d,d.then(c)}function am(a){const s=a.findIndex(i=>i.status!=="success"||i._notFound)+1;return s&&s<a.length?a.slice(0,s):a}function bT(a,s,i){const c=a._tx;return s&&(c==null?void 0:c[2])===i&&!c[3].some(f=>f.routeId===s)}const Kn=0,ga=1,io=2,At=3,rs=[4];function Mc(a){return typeof a[0]=="number"}function nl(a,s){return s.aborted?Promise.race([Promise.reject(s),a]):new Promise((i,c)=>{const f=()=>c(s);s.addEventListener("abort",f,{once:!0}),Promise.resolve(a).then(i,c).then(()=>s.removeEventListener("abort",f))})}function al(a,s){return a.routesById[s.routeId]}function Dc(a,s,i){return Zb(a)?[At,a]:xi(a)?(a.routeId||(a.routeId=i),[io,a]):s?(typeof(a==null?void 0:a.then)=="function"&&(a=new Error("A Promise was thrown",{cause:a})),[ga,a]):[Kn,a]}function sm(a,s){var c,f;let i=Dc(s,!0,a.id);if(i[0]!==ga)return i;try{(f=(c=a.options).onError)==null||f.call(c,i[1])}catch(d){i=Dc(d,!0,a.id)}return i}function Cc(a,s,i,c,f){return f[0].signal.aborted?rs:cm(a,s,i,sm(i,c),f)}async function xT(a,s,i,c,f,d){var x,g;const[m,h]=s,p=i[0].signal,y=!!i[3];for(let b=i[6]??0;b<c;b++){const S=h[b],j=al(a,S);S.abortController=i[0];const T=((x=h[b-1])==null?void 0:x.context)??a.options.context??{},E={params:S.params,location:m,navigate:H=>a.navigate({...H,_fromLocation:m}),buildLocation:a.buildLocation,cause:y?"preload":S.cause,abortController:i[0],preload:y,matches:h,routeId:j.id};try{const H=S._ctx||(S._ctx=j.options.context?j.options.context({...E,deps:S.loaderDeps,context:T})||{}:void 0);S.context={...T,...H}}catch(H){return ma(a,S),[b,Cc(a,s,j,H,i)]}if(p.aborted)return[b,rs];const q=S.paramsError??S.searchError;if(q!==void 0)return ma(a,S),[b,Cc(a,s,j,q,i)];const O=j.options.beforeLoad;if(!O)continue;const C=S.status;b>=d&&(S.status="pending",(g=i[7])==null||g.call(i));try{zc(a,S,"beforeLoad",i[0]);const H=O({...E,search:S.search,context:S.context,...a.options.additionalContext}),K=await(typeof(H==null?void 0:H.then)=="function"?nl(H,p):H);if(p.aborted)return[b,rs];const k=cm(a,s,j,Dc(K,!1,j.id),i);if(k[0]!==Kn)return ma(a,S),[b,k];S.context={...S.context,...K}}catch(H){return ma(a,S),[b,Cc(a,s,j,H,i)]}finally{S.status=C,zc(a,S,!1,i[0])}}f()}function lm(a,s,i){var c;if(!(!i||--i[2])){if(((c=a._flights)==null?void 0:c.get(s.id))===i){const f=a._tx;if(f&&!f[0].signal.aborted&&!f[3].includes(s)&&f[3].some(d=>d.id===s.id)&&f[3].some(d=>d.isFetching==="beforeLoad"))return;a._flights.delete(s.id)}return i[1]}}function ma(a,s){var c;const i=s._flight;s._flight=void 0,(c=lm(a,s,i))==null||c.abort()}function qt(a,s,i,c){var d;const f=[];for(const m of s)if(!(i!=null&&i.includes(m))){const h=m._flight;if(m._flight=void 0,c&&(h==null?void 0:h[2])===1&&((d=a._flights)==null?void 0:d.get(m.id))===h&&(i!=null&&i.some(p=>p.id===m.id)))h[2]=0;else{const p=lm(a,m,h);p&&f.push(p)}}for(const m of f)m.abort()}function im(a){for(const s of a){const i=s._flight;i&&i[2]++}}function zc(a,s,i,c){var m;if(s.isFetching=i,c&&((m=a._tx)==null?void 0:m[0])!==c)return;const f=a.stores.byRoute.get(s.routeId),d=f==null?void 0:f.get();(d==null?void 0:d.id)===s.id&&f.set({...d,isFetching:i})}function tx(a,s,i,c,f,d,m){const h=s[0];return{params:i.params,location:h,navigate:p=>a.navigate({...p,_fromLocation:h}),cause:m?"preload":i.cause,abortController:f,preload:m,deps:i.loaderDeps,parentMatchPromise:d,context:i.context,route:c,...a.options.additionalContext}}async function Cv(a,s,i,c,f,d,m){const h=m[0],p=h.signal;if(p.aborted)return rs;if(!f)return[Kn,void 0];let y=i._flight;zc(a,i,"loader",h);try{if(!y){const x=new AbortController;y=[Promise.resolve().then(()=>f(tx(a,s,i,c,x,d,!!m[3]))).then(g=>Dc(g,!1,c.id),g=>Dc(g,!0,c.id)).then(g=>{var b;return g[0]!==Kn&&((b=a._flights)==null?void 0:b.get(i.id))===y&&(a._flights.delete(i.id),y[2]||x.abort()),g[0]===ga&&y[2]?sm(c,g[1]):g}),x,1],(a._flights??(a._flights=new Map)).set(i.id,y)}return i._flight=y,i.abortController=y[1],cm(a,s,c,await nl(y[0],p),m)}catch(x){if(x!==p||!p.aborted)throw x;return ma(a,i),rs}finally{zc(a,i,!1,h)}}function Rv(a,s,i){s[0]!==At&&(a.status="success",a.error=void 0,s[0]===Kn?(a.loaderData=s[1],a.invalid=!1,a.updatedAt=Date.now(),a.preload=i):a.invalid=!0)}function ST(a,s,i){const c=a._cache.get(s.id);if(c!==i||a._committed.some(d=>d.id===s.id&&d._flight===s._flight))return;const f={...s,_notFound:void 0,context:{}};f._flight&&f._flight[2]++,a._cache.set(s.id,f),c&&ma(a,c)}function Av(a,s){return s[0]===ga||s[0]===io?{...a,status:s[0]===ga?"error":"notFound",error:s[1],_flight:void 0}:a}function jT(a,s,i,c,f,d,m){var oe,xe;const h=s[1][i],p=al(a,h),y=!!d[3],x=a._cache.get(h.id);let g,b=!1,S;try{if(h.status==="success"&&(g=p.options.shouldReload,typeof g=="function"&&(g=g(tx(a,s,h,p,d[0],f,y))),d[0].signal.aborted&&(S=rs)),!S)if(h.status!=="success")b=!0;else{const me=y||h.preload?p.options.preloadStaleTime??a.options.defaultPreloadStaleTime??3e4:p.options.staleTime??a.options.defaultStaleTime??0;b=!!(h.invalid||g||g===void 0&&Date.now()-h.updatedAt>=me&&(d[5]||h.cause==="enter"||d[2].some(ie=>ie.routeId===h.routeId&&ie.id!==h.id)))}}catch(me){h.invalid=!0,ma(a,h),S=Cc(a,s,p,me,d)}const j=p.options.loader,T=typeof j=="function",E=T?j:j==null?void 0:j.handler,q=!y||p.options.preload!==!1;let O=q&&j?(oe=a._flights)==null?void 0:oe.get(h.id):void 0;O===h._flight||S?O=void 0:O&&!b&&!y&&g===void 0?b=!0:b||(O=void 0);const C=!!(j&&b&&h.status==="success"&&!y&&!d[4]&&((T?void 0:j.staleReloadMode)??a.options.defaultStaleReloadMode)!=="blocking"),H=b&&q,K=H&&!C&&(h.status!=="success"||!!j),k=i>=m?d[7]:void 0,Q=p.lazyFn&&p._lazy!==!0?k:void 0;if(H&&!j&&(h.invalid=!1,h.updatedAt=Date.now()),O&&O[2]++,K){const me=h._flight;h._flight=O,(xe=lm(a,h,me))==null||xe.abort(),i>=m&&(h.status="pending"),k==null||k()}H||(h.isFetching=!1);const F=!S&&K?Cv(a,s,h,p,E,f,d).then(me=>(Rv(h,me,y),me[0]===Kn&&(j&&!d[0].signal.aborted&&ST(a,h,x),i>=m&&(h.status="pending")),me)):Promise.resolve(S??[Kn,h.loaderData]),Y=(async()=>{try{const ie=si(p,void 0,Q);ie&&await nl(ie,d[0].signal)}catch(ie){if(!s[1].some((Z,W)=>W<=i&&(Z.status==="error"||Z.status==="notFound"||Z._notFound)))return[i,Cc(a,s,p,ie,d)]}const me=await F;K&&me[0]===Kn&&h.status==="pending"&&!d[0].signal.aborted&&(h.status="success",k==null||k())})();if(c.push([i,F,Y]),!C)return F.then(me=>Av(h,me));const $={...h,status:"pending",preload:!1,_flight:O};h.invalid=!1,h.isFetching="loader";const re=Cv(a,s,$,p,E,f,d).then(me=>(h.isFetching=!1,Rv($,me,!1),me));return(s[2]??(s[2]=[])).push([i,re,Y,$]),re.then(me=>Av($,me))}async function Oh(a,s,i,c,f=0){const d=i==null?void 0:i[1][1];let m=d!=null&&d.routeId?s.findIndex(h=>h.routeId===d.routeId):(i==null?void 0:i[0])??s.length-1;m<0&&(m=0);for(let h=m;h>=0;h--){const p=al(a,s[h]);try{const y=si(p,!1);y&&await nl(y,c)}catch(y){if(y===c&&c.aborted)throw y}if(p.options.notFoundComponent)return h}return d!=null&&d.routeId?m:f}function Js(a,s){s[2]&&(qt(a,s[2].map(i=>i[3])),s[2]=void 0)}async function Ov(a,s,i,c){let f;try{await Promise.all(a.map(d=>d[1].then(async m=>{const h=d[0];if(!(c&&h>=await c)){if(m[0]>=At)throw[h,m];!f&&m[0]!==Kn&&(f=[h,m],await Promise.all((i??[]).map(p=>{if(!(p[0]<=h))return p[1].then(y=>{if(y[0]===At)throw[p[0],y]})})))}})))}catch(d){return d}return s??f}function cm(a,s,i,c,f,d){for(;c[0]===At;){const m=c[1],h=m.options;try{if((h.href||m.headers.has("Location"))&&(a.resolveRedirect(m),h.reloadDocument)||(h.reloadDocument?f[3]:f[1]>=20))return c;const p=a.buildLocation({...h,_fromLocation:s[0],_includeValidateSearch:!0}),y=p.maskedLocation??p;if(y.external){const x=m.clone();return x.options={...h},x.headers.set("Location",y.publicHref),a.resolveRedirect(x),f[3]?[At,x]:[At,x,y]}return[At,m,p]}catch(p){c=d?[ga,p]:sm(i,p),d=!0}}return c}async function nx(a,s,i,c,f,d){const m=s[1];let h=await f,p=!1;const y=m.findIndex(S=>S._notFound),x=S=>S[1][0]===io?Oh(a,m,S,c.signal):S[0];let g=y<0?m.length:y;if(((h==null?void 0:h[1][0])??0)>=At)g=0;else if(h){g=h[2]??(h[2]=await x(h));for(const S of i){if(S[0]>=g)break;const j=await S[1];if(j[0]!==Kn&&j[0]<At&&!("loaderData"in m[S[0]])){h=[S[0],j],g=h[2]=await x(h);break}}}for(const S of i){if(S[0]>=g)break;const j=await S[2];if(j){h=j;break}}if(((h==null?void 0:h[1][0])??0)>=At){const S=h[1];if(S[0]!==At||S[1].options.reloadDocument||S[2])return Js(a,s),S;p=!0,h=[0,[ga,new Error("Too many redirects")]]}const b=h?h[2]??await x(h):y;if(b>=0){const S=h==null?void 0:h[1],j=S==null?void 0:S[0],T=m[b],E=S==null?void 0:S[1],q=()=>{S&&(T._notFound=void 0,j===ga?T.status="error":(E.routeId=T.routeId,T.routeId===a.routeTree.id?(T.status="success",T._notFound=!0):T.status="notFound"),T.error=E,T.isFetching=!1)};q(),S||d==null||d();const O=al(a,T);try{await nl(S?Promise.resolve().then(()=>si(O,j===ga?"errorComponent":"notFoundComponent")):Promise.all([si(O),si(O,"notFoundComponent")]),c.signal)}catch(C){if(C===c.signal&&c.signal.aborted)return Js(a,s),rs}S?p&&(c.abort(),await Promise.all([...i.map(C=>C[1]),...i.map(C=>C[2]),...(s[2]??[]).map(C=>C[1])]),Js(a,s),qt(a,m),q()):T.status="success"}return s}async function ax(a,s,i,c=0,f=s[1].length){var m,h;const d=s[1];for(let p=c;p<f;p++){const y=d[p],x=al(a,y).options;if(x.head||x.scripts)try{const g={ssr:a.options.ssr,matches:d,match:y,params:y.params,loaderData:y.loaderData},[b,S]=await nl(Promise.all([(m=x.head)==null?void 0:m.call(x,g),(h=x.scripts)==null?void 0:h.call(x,g)]),i);y.meta=b==null?void 0:b.meta,y.links=b==null?void 0:b.links,y.headScripts=b==null?void 0:b.scripts,y.styles=b==null?void 0:b.styles,y.scripts=S}catch(g){if(g===i&&i.aborted)break;console.error(g)}if(y.status!=="success"||y._notFound)break}return s}async function sx(a,s,i,c){var h;const f=[s,i],d=c[0].signal;let m;try{const p=a.stores.matches.get();let y=i.findIndex(O=>O._notFound);if(a.options.notFoundMode!=="root"&&y>=0){const O=await Oh(a,i,void 0,d,y);i[y]._notFound=void 0,i[O]._notFound=!0,y=O}let x=y<0?i.length:y+1,g=0;for(;g<x&&g!==y;){const O=i[g],C=c[2][g],H=p[g];if((C==null?void 0:C.id)!==O.id||C.status!=="success"||O.preload||(H==null?void 0:H.id)!==O.id||H.status!=="success"||(g++,C._notFound||H._notFound))break}const b=[],S=c[6]??0;let j=S?Promise.resolve(i[S-1]):void 0;const T=()=>{for(let O=S;O<x&&!d.aborted;O++)j=jT(a,f,O,b,j,c,g)},E=await xT(a,f,c,x,T,g);if(E){if(c[4]=!0,x=E[0],E[1][0]===io){const O=await Oh(a,i,E,d);E[2]=O,x=Math.min(x,O+1)}else E[1][0]>=At&&(x=0);T()}if(!d.aborted&&!c[3]){const O=[];for(const[C,H]of a._flights??[])H[2]||(a._flights.delete(C),O.push(H[1]));for(const C of O)C.abort()}const q=nx(a,f,b,c[0],Ov(b,E,f[2]),c[7]);(h=f[2])!=null&&h.length&&(f[3]=Ov(f[2],void 0,void 0,q.then(O=>Mc(O)?0:am(i).length,()=>0))),m=await q}catch(p){if(Js(a,f),p===d&&d.aborted)return rs;throw p}return Mc(m)?m:ax(a,m,d,c[6]===i.length?c[6]:0)}function Mh(a,s){var d,m;if(a._tx!==s)return;const i=s[3],c=a.stores.matches.get();let f=a._pending;for(let h=0;h<i.length;h++){const p=i[h],y=p.status==="success"&&!p._notFound,x=((d=c[h])==null?void 0:d.id)===p.id&&((m=c[h])==null?void 0:m.status)==="pending";if(y&&!x)continue;const g=al(a,p),b=y||p.invalid?0:g.options.pendingMs??a.options.defaultPendingMs,S=g.options.pendingComponent??a.options.defaultPendingComponent;if(!S||typeof b!="number"||b===1/0){f&&(f[0]=s,f[2]=0,f[4]=!0);return}const j=g.options.pendingMinMs??a.options.defaultPendingMinMs??0;let T=!1;if((f==null?void 0:f[1])===p.id?(T=f[0]!==s,f[0]=s):(clearTimeout(f==null?void 0:f[3]),a._pending=f=void 0),f||(a._pending=f=[s,p.id,x?Date.now()+j:s[4]+b,void 0,x||void 0,S]),f[4]&&!T&&f[5]===S)return;if(f[5]=S,!f[4]){clearTimeout(f[3]);const O=f[2]-Date.now();if(O>0){f[3]=setTimeout(()=>Mh(a,s),O);return}f[2]=0}const E=i.map(O=>({...O,_flight:void 0}));E[h].status="pending";const q=f[4]=a.startTransition(()=>a.stores.setMatches(E),E).then(O=>(O&&a._pending===f&&f[4]===q&&!f[2]&&(f[2]=Date.now()+j),O));return}}function jc(a,s){var c;const i=a._pending;(a._tx===s||!((c=a._tx)!=null&&c[3].some(f=>f.id===(i==null?void 0:i[1]))))&&(clearTimeout(i==null?void 0:i[3]),a._pending=void 0)}async function Mv(a,s){const i=a._pending;if(!i)return;clearTimeout(i[3]);const c=i[2]-Date.now();if(!i[4]||c<=0||!am(s[3]).some(d=>d.id===i[1]))return;let f;try{await nl(new Promise(d=>{f=setTimeout(d,c)}),s[0].signal)}catch{}clearTimeout(f)}function lx(a,s){a._committed=s,a.stores.setMatches(s)}function NT(a,s,i,c){const f=a._committed,d=a._lifecycleEnd,m=a._cache;for(const x of i)x.preload=!1,c&&(x._assetEnd=void 0);const h=am(i).length,p=new Map;{const x=Date.now(),g=new Set;for(let b=0;b<i.length;b++){const S=i[b];(b<h||S.status==="success")&&g.add(S.id)}for(const b of[...f,...m.values()]){if(b.status!=="success"||g.has(b.id))continue;const S=al(a,b);!S.options.loader||x-b.updatedAt>=(b.preload?S.options.preloadGcTime??a.options.defaultPreloadGcTime??3e5:S.options.gcTime??a.options.defaultGcTime??3e5)||p.set(b.id,m.get(b.id)===b?b:{...b,_flight:void 0,isFetching:!1,context:{}})}}s[3]=[],a._cache=p;const y=a._lifecycleEnd=oT(i);lx(a,i),qt(a,[...m.values(),...f].filter(x=>x._flight&&p.get(x.id)!==x),i),fT(a,f,i,d,y,s)}async function Mr(a,s){let i=a._tx;for(;i&&i!==s;)s=i,await i[5],i=a._tx}function ix(a,s,i){const c=i[1].options,f=i[2];if(!f)return a.navigate({...c,replace:!0,ignoreBlocker:!0});if(c.reloadDocument)return a.navigate({href:(f.maskedLocation??f).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});f._redirects=s[1]+1,a._pendingLocation=f;const d=a.commitLocation({...f,viewTransition:c.viewTransition,replace:!0,resetScroll:c.resetScroll,hashScrollIntoView:c.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{a._pendingLocation===f&&(a._pendingLocation=void 0)}),d}async function TT(a,s,i,c,f){const d=i.map(p=>({...p}));im(d);for(const p of c)ma(a,d[p[0]]),d[p[0]]=p[3];const m=[s[2],d];let h;try{h=await nx(a,m,c,s[0],f)}catch(p){throw qt(a,d),p}if(Mc(h)){qt(a,d),h[0]===At&&a._tx===s&&a._committed===i&&await ix(a,s,h);return}if(await ax(a,h,s[0].signal),a._tx!==s||a._committed!==i){qt(a,d);return}for(const p of d){const y=a._cache.get(p.id);y!=null&&y._flight&&y._flight===p._flight&&(a._cache.delete(p.id),ma(a,y))}lx(a,d),qt(a,i,d)}async function ET(a,s,i,c,f,d){const m=await sx(a,s[2],s[3],[s[0],s[1],a._committed,void 0,f,i,d,c]);if(Mc(m)){const g=m[0]===At&&a._tx===s;if((!g||m[1].options.reloadDocument)&&jc(a,s),qt(a,s[3]),s[3]=[],!g)return;if(a._tx!==s){jc(a,s);return}await ix(a,s,m);return}const h=m[1];if(a._tx===s&&await Mv(a,s),a._tx!==s){jc(a,s),qt(a,h),Js(a,m);return}const p=s[2],y=lo(p,a.stores.resolvedLocation.get()),x=m[2];await a.startViewTransition(async()=>{var S;if(a._tx===s&&await Mv(a,s),a._tx!==s){jc(a,s),qt(a,h),Js(a,m);return}const g=()=>{jc(a,s),NT(a,s,h,d),a._tx===s&&(a.emit({type:"onLoad",...y}),a._tx===s&&a.emit({type:"onBeforeRouteMount",...y}))},b=await a.startTransition(g,h);if(a._tx!==s){Js(a,m);return}x!=null&&x.length&&TT(a,s,h,x,m[3]).catch(console.error),a.batch(()=>{a.stores.resolvedLocation.set(p),a.stores.status.set("idle"),a._tx===s&&a.emit({type:"onResolved",...y}),b&&a._tx===s&&a.emit({type:"onRendered",...y})}),a._tx===s&&((S=a._commitPromise)==null||S.resolve(),a._commitPromise=void 0)})}async function wT(a,s){var H;const i=a._tx,c=a.stores.resolvedLocation.get(),f=c??a.stores.location.get(),d=a.latestLocation,m=a._pendingLocation,h=(m==null?void 0:m.href)===d.href?m._redirects??0:0,p=a._handoff,y=p==null?void 0:p[0](),x=new AbortController,g=a._preflight;if(a._preflight=x,y||p==null||p[1](),g==null||g.abort(),!x.signal.aborted){const K=lo(d,c);a.emit({type:"onBeforeNavigate",...K}),x.signal.aborted||a.emit({type:"onBeforeLoad",...K})}if(x.signal.aborted){await Mr(a,i);return}const b=f.href===d.href;let S=x;const j=a.matchRoutes(d,{_controller:x});im(j);const T=y?p[1](j):void 0;if(T?S=y:y==null||y.abort(),x.signal.aborted){qt(a,j),await Mr(a,i);return}a._preflight=void 0;let E;const q=()=>ET(a,C,b,()=>Mh(a,C),s==null?void 0:s.sync,T),O=s!=null&&s.sync?new Promise(K=>E=K):Promise.resolve().then(q),C=[S,h,d,j,Date.now(),O.then(()=>Mr(a,C))];if(a._tx=C,i){for(const K of a.stores.matches.get()){if(a._tx!==C)break;K.isFetching&&zc(a,K,!1)}i[0].abort(),qt(a,i[3],C[3],!0)}if(a._tx!==C){qt(a,C[3]),C[3]=[],E==null||E(),await Mr(a,C);return}a.batch(()=>{a.stores.status.set("pending"),a.stores.location.set(d)}),(T||!a._committed.length&&((H=j[0])==null?void 0:H.status)!=="success"&&!j.some(K=>K._notFound))&&Mh(a,C),E==null||E(q()),await C[5]}async function _T(a,s){let i=a.buildLocation(s);for(let c=0;;c++){const f=a._committed,d=new AbortController;let m,h,p;try{try{m=a.matchRoutes(i,{_controller:d}),im(m),h=(a._preloads??(a._preloads=new Map)).set(d,m),p=await sx(a,i,m,[d,c,f,!0])}finally{h&&(h=h.delete(d),qt(a,m)),d.abort()}if(!Mc(p))return p[1];if(!h||p.length<3)return;i=p[2]}catch(y){xi(y)||console.error(y);return}}}const CT="Error preloading route! ☝️";var cx=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(a){if(this.init=s=>{var p,y;this.originalIndex=s,this._branch=void 0;const i=this.options,c=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(y=(p=this.options).getParentRoute)==null?void 0:y.call(p),c?this._path=ai:this.parentRoute||Wh();let f=c?ai:i==null?void 0:i.path;f&&f!=="/"&&(f=Gb(f));const d=(i==null?void 0:i.id)||f,m=c?ai:ti((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(d??""));f==="__root__"&&(f="/");const h=m==="__root__"?"/":f===void 0?this.parentRoute.fullPath:ti(this.parentRoute.fullPath+"/"+f);this._path=f,this._id=m,this._fullPath=h,this._to=Gn(h)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>em({from:this.fullPath,...s}),this.options=a||{},this.isRoot=!(a!=null&&a.getParentRoute),a!=null&&a.id&&(a!=null&&a.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},RT=class{constructor({id:a}){this.notFound=s=>Kb({routeId:this.id,...s}),this.redirect=s=>em({from:this.id,...s}),this.id=a}},AT=class extends cx{constructor(a){super(a)}},um=class extends X.Component{constructor(...a){super(...a),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(a,s){const i=a.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:0}:{resetKey:i}}static getDerivedStateFromError(a){return{error:[a]}}componentDidCatch(a,s){var i,c;(c=(i=this.props).onCatch)==null||c.call(i,a,s)}render(){const a=this.state.error;return a?X.createElement(this.props.errorComponent??OT,{error:a[0],reset:this.reset}):this.props.children}};function OT({error:a}){const[s,i]=X.useState(!1);return r.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[r.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[r.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),r.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(c=>!c),children:s?"Hide Error":"Show Error"})]}),r.jsx("div",{style:{height:".25rem"}}),s?r.jsx("div",{children:r.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a!=null&&a.message?r.jsx("code",{children:a.message}):null})}):null]})}var Dv=()=>!0,MT=()=>!1;function DT({children:a,fallback:s=null}){return r.jsx(Kc.Fragment,{children:zT()?a:s})}function zT(a=!0){return Kc.useSyncExternalStore(UT,Dv,a?MT:Dv)}function UT(){return()=>{}}var ux=X.createContext(null);function Pt(a){return X.useContext(ux)}function LT(a,s){const i=a.stores.location,c=new Set;let f,d;const m=h=>{bT(a,s,h)||(f=h,c.forEach(p=>p()))};return[()=>f??i.get(),h=>(c.size||(f=i.get(),d=i.subscribe(m).unsubscribe),c.add(h),()=>{c.delete(h),c.size||(d(),f=void 0)})]}var Uc=X.createContext(void 0),BT=X.createContext(void 0);function qT({update:a,notify:s,unwatched:i}){return{link:c,unlink:f,propagate:d,checkDirty:m,shallowPropagate:h};function c(y,x,g){const b=x.depsTail;if(b!==void 0&&b.dep===y)return;const S=b!==void 0?b.nextDep:x.deps;if(S!==void 0&&S.dep===y){S.version=g,x.depsTail=S;return}const j=y.subsTail;if(j!==void 0&&j.version===g&&j.sub===x)return;const T=x.depsTail=y.subsTail={version:g,dep:y,sub:x,prevDep:b,nextDep:S,prevSub:j,nextSub:void 0};S!==void 0&&(S.prevDep=T),b!==void 0?b.nextDep=T:x.deps=T,j!==void 0?j.nextSub=T:y.subs=T}function f(y,x=y.sub){const g=y.dep,b=y.prevDep,S=y.nextDep,j=y.nextSub,T=y.prevSub;return S!==void 0?S.prevDep=b:x.depsTail=b,b!==void 0?b.nextDep=S:x.deps=S,j!==void 0?j.prevSub=T:g.subsTail=T,T!==void 0?T.nextSub=j:(g.subs=j)===void 0&&i(g),S}function d(y){let x=y.nextSub,g;e:do{const b=y.sub;let S=b.flags;if(S&60?S&12?S&4?!(S&48)&&p(y,b)?(b.flags=S|40,S&=1):S=0:b.flags=S&-9|32:S=0:b.flags=S|32,S&2&&s(b),S&1){const j=b.subs;if(j!==void 0){const T=(y=j).nextSub;T!==void 0&&(g={value:x,prev:g},x=T);continue}}if((y=x)!==void 0){x=y.nextSub;continue}for(;g!==void 0;)if(y=g.value,g=g.prev,y!==void 0){x=y.nextSub;continue e}break}while(!0)}function m(y,x){let g,b=0,S=!1;e:do{const j=y.dep,T=j.flags;if(x.flags&16)S=!0;else if((T&17)===17){if(a(j)){const E=j.subs;E.nextSub!==void 0&&h(E),S=!0}}else if((T&33)===33){(y.nextSub!==void 0||y.prevSub!==void 0)&&(g={value:y,prev:g}),y=j.deps,x=j,++b;continue}if(!S){const E=y.nextDep;if(E!==void 0){y=E;continue}}for(;b--;){const E=x.subs,q=E.nextSub!==void 0;if(q?(y=g.value,g=g.prev):y=E,S){if(a(x)){q&&h(E),x=y.sub;continue}S=!1}else x.flags&=-33;x=y.sub;const O=y.nextDep;if(O!==void 0){y=O;continue e}}return S}while(!0)}function h(y){do{const x=y.sub,g=x.flags;(g&48)===32&&(x.flags=g|16,(g&6)===2&&s(x))}while((y=y.nextSub)!==void 0)}function p(y,x){let g=x.depsTail;for(;g!==void 0;){if(g===y)return!0;g=g.prevDep}return!1}}function HT(a,s,i){var d,m,h;const c=typeof a=="object",f=c?a:void 0;return{next:(d=c?a.next:a)==null?void 0:d.bind(f),error:(m=c?a.error:s)==null?void 0:m.bind(f),complete:(h=c?a.complete:i)==null?void 0:h.bind(f)}}const Dh=[];let Kr=0;const{link:zv,unlink:kT,propagate:QT,checkDirty:rx,shallowPropagate:Uv}=qT({update(a){return a._update()},notify(a){Dh[zh++]=a,a.flags&=-3},unwatched(a){a.depsTail!==void 0&&(a.depsTail=void 0,a.flags=17,ao(a))}});let Dr=0,zh=0,xn,Uh=0;function YT(a){try{++Uh,a()}finally{--Uh||ox()}}function ao(a){const s=a.depsTail;let i=s!==void 0?s.nextDep:a.deps;for(;i!==void 0;)i=kT(i,a)}function ox(){if(!(Uh>0)){for(;Dr<zh;){const a=Dh[Dr];Dh[Dr++]=void 0,a.notify()}Dr=0,zh=0}}function Lv(a,s){const i=typeof a=="function",c=a,f={_snapshot:i?void 0:a,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?0:1,get(){return xn!==void 0&&zv(f,xn,Kr),f._snapshot},subscribe(d){const m=HT(d),h={current:!1},p=IT(()=>{var y;f.get(),h.current?(xn=void 0,(y=m.next)==null||y.call(m,f._snapshot)):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const m=xn,h=(s==null?void 0:s.compare)??Object.is;if(i)xn=f,++Kr,f.depsTail=void 0;else if(d===void 0)return!1;i&&(f.flags=5);try{const p=f._snapshot,y=typeof d=="function"?d(p):d===void 0&&i?c(p):d;return p===void 0||!h(p,y)?(f._snapshot=y,!0):!1}finally{xn=m,i&&(f.flags&=-5),ao(f)}}};return i?(f.flags=17,f.get=function(){const d=f.flags;if(d&16||d&32&&rx(f.deps,f)){if(f._update()){const m=f.subs;m!==void 0&&Uv(m)}}else d&32&&(f.flags=d&-33);return xn!==void 0&&zv(f,xn,Kr),f._snapshot}):f.set=function(d){if(f._update(d)){const m=f.subs;m!==void 0&&(QT(m),Uv(m),ox())}},f}function IT(a){const s=()=>{const c=xn;xn=i,++Kr,i.depsTail=void 0,i.flags=6;try{return a()}finally{xn=c,i.flags&=-5,ao(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const c=this.flags;c&16||c&32&&rx(this.deps,this)?s():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ao(this)}};return s(),i}var nh={exports:{}},ah={},sh={exports:{}},lh={};/**
19
+ * @license React
20
+ * use-sync-external-store-shim.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Bv;function GT(){if(Bv)return lh;Bv=1;var a=Vc();function s(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var i=typeof Object.is=="function"?Object.is:s,c=a.useState,f=a.useEffect,d=a.useLayoutEffect,m=a.useDebugValue;function h(g,b){var S=b(),j=c({inst:{value:S,getSnapshot:b}}),T=j[0].inst,E=j[1];return d(function(){T.value=S,T.getSnapshot=b,p(T)&&E({inst:T})},[g,S,b]),f(function(){return p(T)&&E({inst:T}),g(function(){p(T)&&E({inst:T})})},[g]),m(S),S}function p(g){var b=g.getSnapshot;g=g.value;try{var S=b();return!i(g,S)}catch{return!0}}function y(g,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:h;return lh.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:x,lh}var qv;function VT(){return qv||(qv=1,sh.exports=GT()),sh.exports}/**
27
+ * @license React
28
+ * use-sync-external-store-shim/with-selector.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 Hv;function KT(){if(Hv)return ah;Hv=1;var a=Vc(),s=VT();function i(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var c=typeof Object.is=="function"?Object.is:i,f=s.useSyncExternalStore,d=a.useRef,m=a.useEffect,h=a.useMemo,p=a.useDebugValue;return ah.useSyncExternalStoreWithSelector=function(y,x,g,b,S){var j=d(null);if(j.current===null){var T={hasValue:!1,value:null};j.current=T}else T=j.current;j=h(function(){function q(k){if(!O){if(O=!0,C=k,k=b(k),S!==void 0&&T.hasValue){var Q=T.value;if(S(Q,k))return H=Q}return H=k}if(Q=H,c(C,k))return Q;var F=b(k);return S!==void 0&&S(Q,F)?(C=k,Q):(C=k,H=F)}var O=!1,C,H,K=g===void 0?null:g;return[function(){return q(x())},K===null?void 0:function(){return q(K())}]},[x,g,b,S]);var E=f(y,j[0],j[1]);return m(function(){T.hasValue=!0,T.value=E},[E]),p(E),E},ah}var kv;function XT(){return kv||(kv=1,nh.exports=KT()),nh.exports}var ZT=XT();function FT(a,s){return a===s}function os(a,s=c=>c,i){const c=(i==null?void 0:i.compare)??FT,f=X.useCallback(m=>{const{unsubscribe:h}=a.subscribe(m);return h},[a]),d=X.useCallback(()=>a.get(),[a]);return ZT.useSyncExternalStoreWithSelector(f,d,d,s,c)}var Qv={};function fx(a,s){const i=X.useRef();return c=>{const f=a!=null&&a.select?a.select(c):c;return(a==null?void 0:a.structuralSharing)??s.options.defaultStructuralSharing?i.current=is(i.current,f):f}}function hs(a){const s=Pt(),i=X.useContext(a.from?BT:Uc),c=a.from??i,f=s.stores.getMatchStore(c),d=fx(a,s),m=os(f,h=>h?d(h):Qv);if(m!==Qv)return m;(a.shouldThrow??!0)&&Wh()}function rm(a){return hs({from:a.from,strict:a.strict,structuralSharing:a.structuralSharing,select:s=>a.select?a.select(s.loaderData):s.loaderData})}function om(a){const{select:s,...i}=a;return hs({...i,select:c=>s?s(c.loaderDeps):c.loaderDeps})}function co(a){return hs({from:a.from,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,strict:a.strict,select:s=>{const i=a.strict===!1?s.params:s._strictParams;return a.select?a.select(i):i}})}function Xc(a){return hs({from:a.from,strict:a.strict,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,select:s=>a.select?a.select(s.search):s.search})}function jt(a){const s=Pt();return X.useCallback(i=>s.navigate({...i,from:i.from??(a==null?void 0:a.from)}),[a==null?void 0:a.from,s])}function fm(a){return hs({...a,select:s=>a.select?a.select(s.context):s.context})}function $T(...a){const s=X.useRef(a),i=s.current;return a.forEach((c,f)=>{pa(i[f],c,!1,!0)||(i[f]=c)}),s.current}function zr(a,s){a.preloadRoute(s).catch(i=>{console.warn(i),console.warn(CT)})}function JT(a,s){const i=typeof a=="string"&&Ac(a);if(i)return s.has(i)?a:null}function PT(a,s,i,c){const f=pv(a.pathname,c),d=pv(s.pathname,c);return(i!=null&&i.exact?f!==d:!(f.startsWith(d)&&(f.length===d.length||f[d.length]==="/")))||((i==null?void 0:i.includeSearch)??!0)&&!pa(a.search,s.search,!(i!=null&&i.exact),i==null?void 0:i.explicitUndefined)?!1:!(i!=null&&i.includeHash)||a.hash===s.hash}function WT(a,s,i){var tn,En;const c=Pt(),f=X.useRef(null),d=X.useCallback(R=>{if(f.current=R,typeof s=="function")return s(R);s&&(s.current=R)},[s]),{activeOptions:m,to:h,preload:p,preloadDelay:y,disabled:x,target:g,onClick:b,onBlur:S,onFocus:j,onMouseEnter:T,onMouseLeave:E,onTouchStart:q}=a,[O,C,H]=$T(a.search,a.params,m),K=X.useContext(Uc),k=(En=(tn=c.stores)._linkScopes??(tn._linkScopes={}))[K]??(En[K]=LT(c,K)),[Q,F,Y]=X.useMemo(()=>{const R=JT(h,c.protocolAllowlist);if(R!==void 0){const ge=[R??void 0];return[a,()=>ge]}const V={...a};let le,se,_e;const Ce=()=>{const ge=k[0]();if(ge!==le){V._fromLocation=ge;const ae=c.buildLocation(V),fe=s2(ae,c,x),nn=x||fe&&!Ac(fe)?PT(ge,ae,H,c.basepath):void 0;(!se||se[0]!==fe||se[1]!==nn)&&(se=[fe,nn]),le=ge}return se};return[V,Ce,(H==null?void 0:H.includeHash)&&(()=>{const ge=Ce();return ge[1]?_e??(_e=[ge[0],!1]):ge})]},[c,k,a.from,a.hash,a.href,h,O,C,a.state,a.mask,a.unsafeRelative,H,x]),[$,re]=X.useSyncExternalStore(k[1],F,Y||F),oe=re===void 0&&$,xe=x||$===void 0,me=X.useRef(!1),ie=a.reloadDocument||oe||xe?!1:p??c.options.defaultPreload,Z=y??c.options.defaultPreloadDelay??0,W=X.useCallback(R=>{const V=R==null?void 0:R.isIntersecting;if(!(V??ie==="intent")){V===!1&&Ur(f);return}if(!Z){zr(c,Q);return}f.t??(f.t=setTimeout(()=>{f.t=void 0,zr(c,Q)},Z))},[c,Q,f,ie,Z]);X.useEffect(()=>{if(!ie)return;ie==="render"&&!me.current&&(me.current=!0,zr(c,Q));let R=!0,V;return ie==="viewport"&&f.current&&typeof IntersectionObserver=="function"&&(V=new IntersectionObserver(le=>{R&&W(le.pop())},{rootMargin:"100px"}),V.observe(f.current)),()=>{R=!1,V==null||V.disconnect(),Ur(f)}},[c,Q,ie,W,f]);const J=n2(a,i);if(J.ref=s?d:f,oe)return J.href=oe,J;const we=R=>{const V=g??R.currentTarget.getAttribute("target");!xe&&!(R.metaKey||R.altKey||R.ctrlKey||R.shiftKey)&&!R.defaultPrevented&&(!V||V==="_self")&&R.button===0&&(R.preventDefault(),Ur(f),c.navigate({...a,_fromLocation:Q._fromLocation}))},Me=()=>{ie==="intent"&&zr(c,Q)},Ot=()=>{ie==="intent"&&Ur(f)};return J.onClick=Pl(b,we),J.onBlur=Pl(S,Ot),J.onFocus=Pl(j,W),J.onMouseEnter=Pl(T,W),J.onMouseLeave=Pl(E,Ot),J.onTouchStart=Pl(q,Me),a2(J,a,re,$,xe,i)}var e2={},t2={className:"active"},dx=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function n2(a,s){const i={};for(const c in a)dx.has(c)||c==="type"&&s!==void 0||c==="disabled"&&s==="a"||(i[c]=a[c]);return i}function a2(a,s,i,c,f,d){const{activeProps:m,inactiveProps:h,className:p,style:y,target:x}=s,g=kb(i?m:h,{})??(i?t2:e2);Object.assign(a,g),a.href=c,d!=="a"&&(a.disabled=f),a.target=x;const b=g.style;(y||b)&&(a.style=y&&b?{...y,...b}:y||b);const S=g.className;return(p||S)&&(a.className=p?S?`${p} ${S}`:p:S),f&&(a.role="link",a["aria-disabled"]=!0),i&&(a["data-status"]="active",a["aria-current"]="page"),a}var Ur=a=>{clearTimeout(a.t),a.t=void 0},Pl=(a,s)=>a?i=>i.defaultPrevented||(a(i),i.defaultPrevented||s(i)):s;function s2(a,s,i){if(i)return;const c=a.maskedLocation??a,f=c.external?c.publicHref:s.history.createHref(c.publicHref)||"/";if(!((c.external||f!==c.publicHref)&&Ib(f,s.protocolAllowlist)))return f}var at=X.memo(X.forwardRef((a,s)=>{const i=a._asChild||"a",c=WT(a,s,i),f=typeof a.children=="function"?a.children({isActive:c["data-status"]==="active"}):a.children;return X.createElement(i,c,f)}),l2);function l2(a,s){let i=0;for(const c in s)if(i++,a[c]!==s[c]&&(!dx.has(c)||!pa(a[c],s[c],!1,!0)))return!1;for(const c in a)i--;return i===0}function dm(a){return new i2({id:a})}var i2=class extends RT{constructor({id:a}){super({id:a}),this.useMatch=s=>hs({...s,from:this.id}),this.useRouteContext=s=>fm({...s,from:this.id}),this.useSearch=s=>Xc({...s,from:this.id}),this.useParams=s=>co({...s,from:this.id}),this.useLoaderDeps=s=>om({...s,from:this.id,strict:!1}),this.useLoaderData=s=>rm({...s,from:this.id,strict:!1}),this.useNavigate=()=>{const s=Pt();return jt({from:s.routesById[this.id].fullPath})},this.notFound=s=>Kb({routeId:this.id,...s}),this.Link=Kc.forwardRef((s,i)=>{const c=Pt().routesById[this.id].fullPath;return r.jsx(at,{ref:i,from:c,...s})})}},c2=class extends cx{constructor(a){super(a),this.useMatch=s=>hs({...s,from:this.id}),this.useRouteContext=s=>fm({...s,from:this.id}),this.useSearch=s=>Xc({...s,from:this.id}),this.useParams=s=>co({...s,from:this.id}),this.useLoaderDeps=s=>om({...s,from:this.id}),this.useLoaderData=s=>rm({...s,from:this.id}),this.useNavigate=()=>jt({from:this.fullPath}),this.Link=Kc.forwardRef((s,i)=>r.jsx(at,{ref:i,from:this.fullPath,...s}))}};function sl(a){return new c2(a)}var u2=class extends AT{constructor(a){super(a),this.useMatch=s=>hs({...s,from:this.id}),this.useRouteContext=s=>fm({...s,from:this.id}),this.useSearch=s=>Xc({...s,from:this.id}),this.useParams=s=>co({...s,from:this.id}),this.useLoaderDeps=s=>om({...s,from:this.id}),this.useLoaderData=s=>rm({...s,from:this.id}),this.useNavigate=()=>jt({from:this.fullPath}),this.Link=Kc.forwardRef((s,i)=>r.jsx(at,{ref:i,from:this.fullPath,...s}))}};function r2(a){return new u2(a)}function o2(a){const s=Pt(),i=`not-found-${os(s.stores.location,c=>c.pathname)}-${os(s.stores.status)}`;return r.jsx(um,{getResetKey:()=>i,onCatch:(c,f)=>{var d;if(xi(c))(d=a.onCatch)==null||d.call(a,c,f);else throw c},errorComponent:({error:c})=>{var f;if(xi(c))return(f=a.fallback)==null?void 0:f.call(a,c);throw c},children:a.children})}function f2(){return r.jsx("p",{children:"Not Found"})}function hx(a,s,i){return s.options.notFoundComponent?r.jsx(s.options.notFoundComponent,{...i}):a.options.defaultNotFoundComponent?r.jsx(a.options.defaultNotFoundComponent,{...i}):r.jsx(f2,{})}function uo(a,s){const i=(s==null?void 0:s.options.pendingComponent)??a.options.defaultPendingComponent;return i?r.jsx(i,{}):null}var d2=(a,s)=>a[0]===s[0]&&a[1]===s[1],mx=(a,s,i)=>!s.isRoot||s.options.shellComponent||s.options.wrapInSuspense||i===!1||i==="data-only"||!a.ssr,px=X.memo(function({routeId:s}){const i=Pt(),c=i.stores.getMatchStore(s);return h2(i,os(c))});function h2(a,s){var b,S;const i=a.routesById[s.routeId],c=uo(a,i),f=i.options.errorComponent??a.options.defaultErrorComponent,d=i.options.onCatch??a.options.defaultOnCatch,m=i.isRoot?i.options.notFoundComponent??((b=a.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,h=s.ssr===!1||s.ssr==="data-only",p=mx(a,i,s.ssr)&&(i.options.wrapInSuspense??c??(((S=i.options.errorComponent)==null?void 0:S.preload)||h));let y=r.jsx(m2,{match:s});h&&(y=r.jsx(DT,{fallback:c,children:y})),m&&(y=r.jsx(o2,{fallback:j=>{if(j.routeId??(j.routeId=s.routeId),j.routeId!==s.routeId)throw j;return X.createElement(m,j)},children:y})),f&&(y=r.jsx(um,{getResetKey:()=>s,errorComponent:f,onCatch:(j,T)=>{if(xi(j))throw j.routeId??(j.routeId=s.routeId),j;d==null||d(j,T)},children:y})),p&&(y=r.jsx(X.Suspense,{fallback:c,children:y}));const x=null,g=i.isRoot&&i.options.shellComponent;return g?r.jsx(Uc.Provider,{value:s.routeId,children:r.jsxs(g,{children:[y,x]})}):r.jsxs(Uc.Provider,{value:s.routeId,children:[y,x]})}var m2=X.memo(function({match:s}){const i=Pt(),c=s.routeId,f=i.routesById[c],d=X.useMemo(()=>{var p;const h=(p=f.options.remountDeps??i.options.defaultRemountDeps)==null?void 0:p({routeId:c,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return h?JSON.stringify(h):void 0},[c,s.loaderDeps,s._strictParams,s._strictSearch,f.options.remountDeps,i.options.defaultRemountDeps]),m=X.useMemo(()=>{const h=f.options.component??i.options.defaultComponent;return h?r.jsx(h,{},d):r.jsx(gx,{})},[d,f.options.component,i.options.defaultComponent]);if(s.status==="pending"){if(i.ssr&&!mx(i,f,s.ssr))return m;if(i._tx)throw i._tx[5];return uo(i,f)}if(s.status==="notFound")return hx(i,f,s.error);if(s.status==="error")throw s.error;return m}),gx=X.memo(function(){const s=Pt(),i=X.useContext(Uc);let c,f,d;{const h=s.stores.getMatchStore(i);[c,f]=os(h,p=>[!!p._notFound,p.error],{compare:d2}),d=os(s.stores.ids,p=>p[p.indexOf(i)+1])}if(c)return hx(s,s.routesById[i],f);if(!d)return null;const m=r.jsx(px,{routeId:d});return i===ai?r.jsx(X.Suspense,{fallback:uo(s),children:m}):m});function yx(a,s){const i=a[1];a.length=0,i==null||i(s)}function p2({t:a}){const s=Pt(),i=s._rendered??(s._rendered=[]);return s.startTransition=(c,f)=>new Promise(d=>{yx(i,!1),i.push(f,d),a(s),X.startTransition(c)}),Hb(()=>{const c=s.history.subscribe(s.load);s.updateLatestLocation();const f=s.latestLocation,d=s.buildLocation({to:f.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(Gn(f.publicHref)!==Gn(d.publicHref))return s.commitLocation({...d,replace:!0,ignoreBlocker:!0}),c;const m=s.stores.resolvedLocation.get();return(m==null?void 0:m.href)===f.href&&m.state.__TSR_key===f.state.__TSR_key?i.push(s.stores.matches.get(),h=>{h&&s.emit({type:"onRendered",...lo(m,m)})}):s._tx||s.load({sync:!0}).catch(console.error),c},[s,s.history]),null}function g2(){const a=Pt(),s=a.routesById[ai],i=uo(a,s),c=r.jsxs(r.Fragment,{children:[r.jsx(p2,{t:X.useState()[1]}),a.ssr?r.jsx(Yv,{}):r.jsx(X.Suspense,{fallback:i,children:r.jsx(Yv,{})})]});return a.options.InnerWrap?r.jsx(a.options.InnerWrap,{children:c}):c}function Yv(){const a=Pt(),s=a._rendered,i=os(a.stores.matches,m=>s[0]??m),c=i[0],f=c==null?void 0:c.routeId;Hb(()=>{s[0]===i&&yx(s,!0)},[s,i]);const d=f?r.jsx(px,{routeId:f}):null;return a.options.disableGlobalCatchBoundary?d:r.jsx(um,{getResetKey:()=>c,onCatch:void 0,children:d})}var y2=a=>({createMutableStore:Lv,createReadonlyStore:Lv,batch:YT}),v2=a=>new b2(a),b2=class extends dT{constructor(a){super(a,y2)}};function x2({router:a,children:s,...i}){Qb(i)&&a.update({...a.options,...i,context:{...a.options.context,...i.context}});const c=r.jsx(ux.Provider,{value:a,children:s});return a.options.Wrap?r.jsx(a.options.Wrap,{children:c}):c}function S2({router:a,...s}){return r.jsx(x2,{router:a,...s,children:r.jsx(g2,{})})}function vx(a){const s=Pt({warn:(a==null?void 0:a.router)===void 0}),i=(a==null?void 0:a.router)||s;return os(i.stores.__store,fx(a,i))}var ih={exports:{}},Nc={},ch={exports:{}},uh={};/**
35
+ * @license React
36
+ * scheduler.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 Iv;function j2(){return Iv||(Iv=1,(function(a){function s(Z,W){var J=Z.length;Z.push(W);e:for(;0<J;){var we=J-1>>>1,Me=Z[we];if(0<f(Me,W))Z[we]=W,Z[J]=Me,J=we;else break e}}function i(Z){return Z.length===0?null:Z[0]}function c(Z){if(Z.length===0)return null;var W=Z[0],J=Z.pop();if(J!==W){Z[0]=J;e:for(var we=0,Me=Z.length,Ot=Me>>>1;we<Ot;){var tn=2*(we+1)-1,En=Z[tn],R=tn+1,V=Z[R];if(0>f(En,J))R<Me&&0>f(V,En)?(Z[we]=V,Z[R]=J,we=R):(Z[we]=En,Z[tn]=J,we=tn);else if(R<Me&&0>f(V,J))Z[we]=V,Z[R]=J,we=R;else break e}}return W}function f(Z,W){var J=Z.sortIndex-W.sortIndex;return J!==0?J:Z.id-W.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;a.unstable_now=function(){return d.now()}}else{var m=Date,h=m.now();a.unstable_now=function(){return m.now()-h}}var p=[],y=[],x=1,g=null,b=3,S=!1,j=!1,T=!1,E=!1,q=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function H(Z){for(var W=i(y);W!==null;){if(W.callback===null)c(y);else if(W.startTime<=Z)c(y),W.sortIndex=W.expirationTime,s(p,W);else break;W=i(y)}}function K(Z){if(T=!1,H(Z),!j)if(i(p)!==null)j=!0,k||(k=!0,oe());else{var W=i(y);W!==null&&ie(K,W.startTime-Z)}}var k=!1,Q=-1,F=5,Y=-1;function $(){return E?!0:!(a.unstable_now()-Y<F)}function re(){if(E=!1,k){var Z=a.unstable_now();Y=Z;var W=!0;try{e:{j=!1,T&&(T=!1,O(Q),Q=-1),S=!0;var J=b;try{t:{for(H(Z),g=i(p);g!==null&&!(g.expirationTime>Z&&$());){var we=g.callback;if(typeof we=="function"){g.callback=null,b=g.priorityLevel;var Me=we(g.expirationTime<=Z);if(Z=a.unstable_now(),typeof Me=="function"){g.callback=Me,H(Z),W=!0;break t}g===i(p)&&c(p),H(Z)}else c(p);g=i(p)}if(g!==null)W=!0;else{var Ot=i(y);Ot!==null&&ie(K,Ot.startTime-Z),W=!1}}break e}finally{g=null,b=J,S=!1}W=void 0}}finally{W?oe():k=!1}}}var oe;if(typeof C=="function")oe=function(){C(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,me=xe.port2;xe.port1.onmessage=re,oe=function(){me.postMessage(null)}}else oe=function(){q(re,0)};function ie(Z,W){Q=q(function(){Z(a.unstable_now())},W)}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(Z){Z.callback=null},a.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Z?Math.floor(1e3/Z):5},a.unstable_getCurrentPriorityLevel=function(){return b},a.unstable_next=function(Z){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var J=b;b=W;try{return Z()}finally{b=J}},a.unstable_requestPaint=function(){E=!0},a.unstable_runWithPriority=function(Z,W){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var J=b;b=Z;try{return W()}finally{b=J}},a.unstable_scheduleCallback=function(Z,W,J){var we=a.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?we+J:we):J=we,Z){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=J+Me,Z={id:x++,callback:W,priorityLevel:Z,startTime:J,expirationTime:Me,sortIndex:-1},J>we?(Z.sortIndex=J,s(y,Z),i(p)===null&&Z===i(y)&&(T?(O(Q),Q=-1):T=!0,ie(K,J-we))):(Z.sortIndex=Me,s(p,Z),j||S||(j=!0,k||(k=!0,oe()))),Z},a.unstable_shouldYield=$,a.unstable_wrapCallback=function(Z){var W=b;return function(){var J=b;b=W;try{return Z.apply(this,arguments)}finally{b=J}}}})(uh)),uh}var Gv;function N2(){return Gv||(Gv=1,ch.exports=j2()),ch.exports}var rh={exports:{}},vt={};/**
43
+ * @license React
44
+ * react-dom.production.js
45
+ *
46
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
47
+ *
48
+ * This source code is licensed under the MIT license found in the
49
+ * LICENSE file in the root directory of this source tree.
50
+ */var Vv;function T2(){if(Vv)return vt;Vv=1;var a=Vc();function s(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var c={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},f=Symbol.for("react.portal"),d=Symbol.for("react.recoverable"),m=Symbol.for("react.optimistic_key");function h(x,g,b){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:S===m?m:""+S,children:x,containerInfo:g,implementation:b}}var p=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,vt.browser=function(x){return{$$typeof:d,_reason:x}},vt.createPortal=function(x,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return h(x,g,null,b)},vt.flushSync=function(x){var g=p.T,b=c.p;try{if(p.T=null,c.p=2,x)return x()}finally{p.T=g,c.p=b,c.d.f()}},vt.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,c.d.C(x,g))},vt.prefetchDNS=function(x){typeof x=="string"&&c.d.D(x)},vt.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var b=g.as,S=y(b,g.crossOrigin),j=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?c.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:j,fetchPriority:T}):b==="script"&&c.d.X(x,{crossOrigin:S,integrity:j,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},vt.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);c.d.M(x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&c.d.M(x)},vt.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,S=y(b,g.crossOrigin);c.d.L(x,b,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},vt.preloadModule=function(x,g){if(typeof x=="string")if(g){var b=y(g.as,g.crossOrigin);c.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else c.d.m(x)},vt.requestFormReset=function(x){c.d.r(x)},vt.unstable_batchedUpdates=function(x,g){return x(g)},vt.useFormState=function(x,g,b){return p.H.useFormState(x,g,b)},vt.useFormStatus=function(){return p.H.useHostTransitionStatus()},vt.version="19.3.1",vt}var Kv;function E2(){if(Kv)return rh.exports;Kv=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(s){console.error(s)}}return a(),rh.exports=T2(),rh.exports}/**
51
+ * @license React
52
+ * react-dom-client.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var Xv;function w2(){if(Xv)return Nc;Xv=1;var a=N2(),s=Vc(),i=E2();function c(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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function m(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(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(c(188))}function y(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,l=t;;){var u=n.return;if(u===null)break;var o=u.alternate;if(o===null){if(l=u.return,l!==null){n=l;continue}break}if(u.child===o.child){for(o=u.child;o;){if(o===n)return p(u),e;if(o===l)return p(u),t;o=o.sibling}throw Error(c(188))}if(n.return!==l.return)n=u,l=o;else{for(var v=!1,N=u.child;N;){if(N===n){v=!0,n=u,l=o;break}if(N===l){v=!0,l=u,n=o;break}N=N.sibling}if(!v){for(N=o.child;N;){if(N===n){v=!0,n=o,l=u;break}if(N===l){v=!0,l=o,n=u;break}N=N.sibling}if(!v)throw Error(c(189))}}if(n.alternate!==l)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}function g(e,t,n,l,u,o){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,l,u,o)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&g(e.child,t,n,l,u,o))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function S(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function j(e){var t=[null,null],n=b(e);return n===null||T(t,e,n.child,{foundSelf:!1}),t}function T(e,t,n,l){for(;n!==null;){if(n===t)l.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(l.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&T(e,t,n.child,l))return!0;n=n.sibling}return!1}function E(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(c(559))}}var q=null,O=null;function C(e,t,n){return e===n?!0:e===t?(q=e,!0):!1}function H(e,t,n){return e===n?(O=e,!1):e===t?(O!==null&&(q=e),!0):!1}function K(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function k(e,t,n){for(var l=0,u=e;u;u=n(u))l++;u=0;for(var o=t;o;o=n(o))u++;for(;0<l-u;)e=n(e),l--;for(;0<u-l;)t=n(t),u--;for(;l--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Q=Object.assign,F=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),$=Symbol.for("react.portal"),re=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),me=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),we=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),Ot=Symbol.for("react.activity"),tn=Symbol.for("react.legacy_hidden"),En=Symbol.for("react.memo_cache_sentinel"),R=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),le=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Symbol.for("react.client.reference");function Ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case re:return"Fragment";case xe:return"Profiler";case oe:return"StrictMode";case W:return"Suspense";case J:return"SuspenseList";case Ot:return"Activity";case R:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case $:return"Portal";case ie:return e.displayName||"Context";case me:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case we:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case Me:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}var ge=Array.isArray,ae=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,nn={pending:!1,data:null,method:null,action:null},fo=[],il=-1;function wn(e){return{current:e}}function ft(e){0>il||(e.current=fo[il],fo[il]=null,il--)}function Ye(e,t){il++,fo[il]=e.current,e.current=t}var _n=wn(null),wi=wn(null),ya=wn(null),Jc=wn(null);function Pc(e,t){switch(Ye(ya,t),Ye(wi,e),Ye(_n,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?u0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=u0(t),e=r0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ft(_n),Ye(_n,e)}function cl(){ft(_n),ft(wi),ft(ya)}function ho(e){var t=e.memoizedState;t!==null&&(Zl._currentValue=t.memoizedState,Ye(Jc,e)),t=_n.current;var n=r0(t,e.type);t!==n&&(Ye(wi,e),Ye(_n,n))}function Wc(e){wi.current===e&&(ft(_n),ft(wi)),Jc.current===e&&(ft(Jc),Zl._currentValue=nn)}var mo,Rm;function va(e){if(mo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);mo=t&&t[1]||"",Rm=-1<n.stack.indexOf(`
59
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
60
+ `+mo+e+Rm}var po=!1;function go(e,t){if(!e||po)return"";po=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(P){var M=P}Reflect.construct(e,[],G)}else{try{G.call()}catch(P){M=P}G=!1;try{var L=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),G=!0,new e}finally{G&&(L!==void 0?Object.defineProperty(e.prototype,"props",L):delete e.prototype.props)}}}else{try{throw Error()}catch(P){M=P}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(P){if(P&&M&&typeof P.stack=="string")return[P.stack,M.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=l.DetermineComponentFrameRoot(),v=o[0],N=o[1];if(v&&N){var w=v.split(`
61
+ `),z=N.split(`
62
+ `);for(u=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;if(l===w.length||u===z.length)for(l=w.length-1,u=z.length-1;1<=l&&0<=u&&w[l]!==z[u];)u--;for(;1<=l&&0<=u;l--,u--)if(w[l]!==z[u]){if(l!==1||u!==1)do if(l--,u--,0>u||w[l]!==z[u]){var B=`
63
+ `+w[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=u);break}}}finally{po=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?va(n):""}function Kx(e,t){switch(e.tag){case 26:case 27:case 5:return va(e.type);case 16:return va("Lazy");case 13:return e.child!==t&&t!==null?va("Suspense Fallback"):va("Suspense");case 19:return va("SuspenseList");case 0:case 15:return go(e.type,!1);case 11:return go(e.type.render,!1);case 1:return go(e.type,!0);case 31:return va("Activity");case 30:return va("ViewTransition");default:return""}}function Am(e){try{var t="",n=null;do t+=Kx(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
64
+ Error generating stack: `+l.message+`
65
+ `+l.stack}}var yo=Object.prototype.hasOwnProperty,vo=a.unstable_scheduleCallback,bo=a.unstable_cancelCallback,Xx=a.unstable_shouldYield,Zx=a.unstable_requestPaint,Qt=a.unstable_now,Fx=a.unstable_getCurrentPriorityLevel,Om=a.unstable_ImmediatePriority,Mm=a.unstable_UserBlockingPriority,eu=a.unstable_NormalPriority,$x=a.unstable_LowPriority,Dm=a.unstable_IdlePriority,Jx=a.log,Px=a.unstable_setDisableYieldValue,_i=null,Yt=null;function ba(e){if(typeof Jx=="function"&&Px(e),Yt&&typeof Yt.setStrictMode=="function")try{Yt.setStrictMode(_i,e)}catch{}}var It=Math.clz32?Math.clz32:t1,Wx=Math.log,e1=Math.LN2;function t1(e){return e>>>=0,e===0?32:31-(Wx(e)/e1|0)|0}var tu=256,nu=262144,au=4194304;function gs(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:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;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 su(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var u=0,o=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var N=l&134217727;return N!==0?(l=N&~o,l!==0?u=gs(l):(v&=N,v!==0?u=gs(v):n||(n=N&~e,n!==0&&(u=gs(n))))):(N=l&~o,N!==0?u=gs(N):v!==0?u=gs(v):n||(n=l&~e,n!==0&&(u=gs(n)))),u===0?0:t!==0&&t!==u&&(t&o)===0&&(o=u&-u,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:u}function Ci(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function zm(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-It(n),u=1<<l;t|=e[l],n&=~u}return t}function n1(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 Um(){var e=au;return au<<=1,(au&62914560)===0&&(au=4194304),e}function xo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ri(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function a1(e,t,n,l,u,o){var v=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 N=e.entanglements,w=e.expirationTimes,z=e.hiddenUpdates;for(n=v&~n;0<n;){var B=31-It(n),G=1<<B;N[B]=0,w[B]=-1;var M=z[B];if(M!==null)for(z[B]=null,B=0;B<M.length;B++){var L=M[B];L!==null&&(L.lane&=-536870913)}n&=~G}l!==0&&Lm(e,l,0),o!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=o&~(v&~t))}function Lm(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-It(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Bm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-It(n),u=1<<l;u&t|e[l]&t&&(e[l]|=t),n&=~u}}function qm(e,t){var n=t&-t;return n=(n&42)!==0?1:So(n),(n&(e.suspendedLanes|t))!==0?0:n}function So(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 jo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hm(){var e=fe.p;return e!==0?e:(e=window.event,e===void 0?32:K0(e.type))}function km(e,t){var n=fe.p;try{return fe.p=e,t()}finally{fe.p=n}}var Fn=Math.random().toString(36).slice(2),dt="__reactFiber$"+Fn,Mt="__reactProps$"+Fn,ul="__reactContainer$"+Fn,Qm="__reactEvents$"+Fn,s1="__reactListeners$"+Fn,l1="__reactHandles$"+Fn,Ym="__reactResources$"+Fn,Ai="__reactMarker$"+Fn,lu="__reactLoad$"+Fn;function iu(e){delete e[dt],delete e[Mt],delete e[s1],delete e[l1]}function ys(e){var t;if(t=e[dt])return t;for(var n=e.parentNode;n;){if(t=n[ul]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=w0(e);e!==null;){if(n=e[dt])return n;e=w0(e)}return t}e=n,n=e.parentNode}return null}function rl(e){if(e=e[dt]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Oi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function ol(e){var t=e[Ym];return t||(t=e[Ym]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function it(e){e[Ai]=!0}function Im(e){e[lu]=void 0}var Gm=new Set,Vm={};function vs(e,t){fl(e,t),fl(e+"Capture",t)}function fl(e,t){for(Vm[e]=t,e=0;e<t.length;e++)Gm.add(t[e])}var i1=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]*$"),Km={},Xm={};function c1(e){return yo.call(Xm,e)?!0:yo.call(Km,e)?!1:i1.test(e)?Xm[e]=!0:(Km[e]=!0,!1)}var De=!1;function Zm(){var e=De;return De=!1,e}function cu(e,t,n){if(c1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function uu(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 $n(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function u1(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,o=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(v){n=""+v,o.call(this,v)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(v){n=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function No(e){if(!e._valueTracker){var t=Fm(e)?"checked":"value";e._valueTracker=u1(e,t,""+e[t])}}function $m(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Fm(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}var r1=/[\n"\\]/g;function an(e){return e.replace(r1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function To(e,t,n,l,u,o,v,N){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Gt(t)):e.value!==""+Gt(t)&&(e.value=""+Gt(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?v==="number"&&e.value==t?Eo(e,Gt(e.value)):Eo(e,Gt(t)):n!=null?Eo(e,Gt(n)):l!=null&&e.removeAttribute("value"),u==null&&o!=null&&(e.defaultChecked=!!o),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+Gt(N):e.removeAttribute("name")}function Jm(e,t,n,l,u,o,v,N){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){No(e);return}n=n!=null?""+Gt(n):"",t=t!=null?""+Gt(t):n,N||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=N?e.checked:!!l,e.defaultChecked=!!l,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),No(e)}function Eo(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function dl(e,t,n,l){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Gt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Pm(e,t,n){if(t!=null&&(t=""+Gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Gt(n):""}function Wm(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(c(92));if(ge(l)){if(1<l.length)throw Error(c(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Gt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),No(e)}function hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var o1=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 ep(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||o1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function tp(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="",De=!0);for(var u in t)l=t[u],t.hasOwnProperty(u)&&n[u]!==l&&(ep(e,u,l),De=!0)}else for(var o in t)t.hasOwnProperty(o)&&ep(e,o,t[o])}function wo(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 f1=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"],["maskType","mask-type"],["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"]]),d1=/^[\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 ru(e){return d1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cn(){}var _o=null;function Co(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,pl=null;function np(e){var t=rl(e);if(t&&(e=t.stateNode)){var n=e[Mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(To(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="'+an(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var u=l[Mt]||null;if(!u)throw Error(c(90));To(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&$m(l)}break e;case"textarea":Pm(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&dl(e,!!n.multiple,t,!1)}}}var Ro=!1;function ap(e,t,n){if(Ro)return e(t,n);Ro=!0;try{var l=e(t);return l}finally{if(Ro=!1,(ml!==null||pl!==null)&&(rr(),ml&&(t=ml,e=pl,pl=ml=null,np(t),e)))for(t=0;t<e.length;t++)np(e[t])}}function Mi(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Mt]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ao=!1;if(Jn)try{var Di={};Object.defineProperty(Di,"passive",{get:function(){Ao=!0}}),window.addEventListener("test",Di,Di),window.removeEventListener("test",Di,Di)}catch{Ao=!1}var xa=null,Oo=null,ou=null;function sp(){if(ou)return ou;var e,t=Oo,n=t.length,l,u="value"in xa?xa.value:xa.textContent,o=u.length;for(e=0;e<n&&t[e]===u[e];e++);var v=n-e;for(l=1;l<=v&&t[n-l]===u[o-l];l++);return ou=u.slice(e,1<l?1-l:void 0)}function fu(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 du(){return!0}function lp(){return!1}function Nt(e){function t(n,l,u,o,v){this._reactName=n,this._targetInst=u,this.type=l,this.nativeEvent=o,this.target=v,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(n=e[N],this[N]=n?n(o):o[N]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?du:lp,this.isPropagationStopped=lp,this}return Q(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=du)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=du)},persist:function(){},isPersistent:du}),t}var Sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hu=Nt(Sa),zi=Q({},Sa,{view:0,detail:0}),h1=Nt(zi),Mo,Do,Ui,mu=Q({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uo,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!==Ui&&(Ui&&e.type==="mousemove"?(Mo=e.screenX-Ui.screenX,Do=e.screenY-Ui.screenY):Do=Mo=0,Ui=e),Mo)},movementY:function(e){return"movementY"in e?e.movementY:Do}}),ip=Nt(mu),m1=Q({},mu,{dataTransfer:0}),p1=Nt(m1),g1=Q({},zi,{relatedTarget:0}),zo=Nt(g1),y1=Q({},Sa,{animationName:0,elapsedTime:0,pseudoElement:0}),v1=Nt(y1),b1=Q({},Sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),x1=Nt(b1),S1=Q({},Sa,{data:0}),cp=Nt(S1),j1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N1={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"},T1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T1[e])?!!t[e]:!1}function Uo(){return E1}var w1=Q({},zi,{key:function(e){if(e.key){var t=j1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uo,charCode:function(e){return e.type==="keypress"?fu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_1=Nt(w1),C1=Q({},mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),up=Nt(C1),R1=Q({},Sa,{submitter:0}),A1=Nt(R1),O1=Q({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uo}),M1=Nt(O1),D1=Q({},Sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),z1=Nt(D1),U1=Q({},mu,{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}),L1=Nt(U1),B1=Q({},Sa,{newState:0,oldState:0,source:0}),q1=Nt(B1),H1=[9,13,27,32],Lo=Jn&&"CompositionEvent"in window,Li=null;Jn&&"documentMode"in document&&(Li=document.documentMode);var k1=Jn&&"TextEvent"in window&&!Li,rp=Jn&&(!Lo||Li&&8<Li&&11>=Li),op=" ",fp=!1;function dp(e,t){switch(e){case"keyup":return H1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function Q1(e,t){switch(e){case"compositionend":return hp(t);case"keypress":return t.which!==32?null:(fp=!0,op);case"textInput":return e=t.data,e===op&&fp?null:e;default:return null}}function Y1(e,t){if(gl)return e==="compositionend"||!Lo&&dp(e,t)?(e=sp(),ou=Oo=xa=null,gl=!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 rp&&t.locale!=="ko"?null:t.data;default:return null}}var I1={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 mp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I1[e.type]:t==="textarea"}function pp(e,t,n,l){ml?pl?pl.push(l):pl=[l]:ml=l,t=pr(t,"onChange"),0<t.length&&(n=new hu("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Bi=null,qi=null;function G1(e){n0(e,0)}function pu(e){var t=Oi(e);if($m(t))return e}function gp(e,t){if(e==="change")return t}var yp=!1;if(Jn){var Bo;if(Jn){var qo="oninput"in document;if(!qo){var vp=document.createElement("div");vp.setAttribute("oninput","return;"),qo=typeof vp.oninput=="function"}Bo=qo}else Bo=!1;yp=Bo&&(!document.documentMode||9<document.documentMode)}function bp(){Bi&&(Bi.detachEvent("onpropertychange",xp),qi=Bi=null)}function xp(e){if(e.propertyName==="value"&&pu(qi)){var t=[];pp(t,qi,e,Co(e)),ap(G1,t)}}function V1(e,t,n){e==="focusin"?(bp(),Bi=t,qi=n,Bi.attachEvent("onpropertychange",xp)):e==="focusout"&&bp()}function K1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pu(qi)}function X1(e,t){if(e==="click")return pu(t)}function Z1(e,t){if(e==="input"||e==="change")return pu(t)}function F1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Vt=typeof Object.is=="function"?Object.is:F1;function Hi(e,t){if(Vt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var u=n[l];if(!yo.call(t,u)||!Vt(e[u],t[u]))return!1}return!0}function Ho(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Sp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jp(e,t){var n=Sp(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sp(n)}}function Np(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Np(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ho(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=Ho(e.document)}return t}function ko(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 $1=Jn&&"documentMode"in document&&11>=document.documentMode,yl=null,Qo=null,ki=null,Yo=!1;function Ep(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yo||yl==null||yl!==Ho(l)||(l=yl,"selectionStart"in l&&ko(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ki&&Hi(ki,l)||(ki=l,l=pr(Qo,"onSelect"),0<l.length&&(t=new hu("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=yl)))}function bs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vl={animationend:bs("Animation","AnimationEnd"),animationiteration:bs("Animation","AnimationIteration"),animationstart:bs("Animation","AnimationStart"),transitionrun:bs("Transition","TransitionRun"),transitionstart:bs("Transition","TransitionStart"),transitioncancel:bs("Transition","TransitionCancel"),transitionend:bs("Transition","TransitionEnd")},Io={},wp={};Jn&&(wp=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function xs(e){if(Io[e])return Io[e];if(!vl[e])return e;var t=vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wp)return Io[e]=t[n];return e}var _p=xs("animationend"),Cp=xs("animationiteration"),Rp=xs("animationstart"),J1=xs("transitionrun"),P1=xs("transitionstart"),W1=xs("transitioncancel"),Ap=xs("transitionend"),Op=new Map,Go="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Go.push("scrollEnd");function mn(e,t){Op.set(e,t),vs(t,[e])}var eS=0;function Pn(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=vn.identifierPrefix;var n=eS++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Mp(e){if(e==null||typeof e=="string")return e;var t=null,n=ql;if(n!==null)for(var l=0;l<n.length;l++){var u=e[n[l]];if(u!=null){if(u==="none")return"none";t=t==null?u:t+(" "+u)}}return t??e.default}function Wn(e,t){return e=Mp(e),t=Mp(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var gu=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)},sn=[],bl=0,Vo=0;function yu(){for(var e=bl,t=Vo=bl=0;t<e;){var n=sn[t];sn[t++]=null;var l=sn[t];sn[t++]=null;var u=sn[t];sn[t++]=null;var o=sn[t];if(sn[t++]=null,l!==null&&u!==null){var v=l.pending;v===null?u.next=u:(u.next=v.next,v.next=u),l.pending=u}o!==0&&Dp(n,u,o)}}function vu(e,t,n,l){sn[bl++]=e,sn[bl++]=t,sn[bl++]=n,sn[bl++]=l,Vo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ko(e,t,n,l){return vu(e,t,n,l),bu(e)}function Ss(e,t){return vu(e,null,null,t),bu(e)}function Dp(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var u=!1,o=e.return;o!==null;)o.childLanes|=n,l=o.alternate,l!==null&&(l.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(u=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,u&&t!==null&&(u=31-It(n),e=o.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=n|536870912),o):null}function bu(e){if(50<uc)throw uc=0,ur=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xl={};function tS(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dt(e,t,n,l){return new tS(e,t,n,l)}function Xo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ea(e,t){var n=e.alternate;return n===null?(n=Dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,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 zp(e,t){e.flags&=1206910978;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 xu(e,t,n,l,u,o){var v=0;if(l=e,typeof l=="function")Xo(l)&&(v=1);else if(typeof l=="string")v=Rj(e,n,_n.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(l){case Ot:return e=Dt(31,n,t,u),e.elementType=Ot,e.lanes=o,e;case re:return js(n.children,u,o,t);case oe:v=8,u|=24;break;case xe:return e=Dt(12,n,t,u|2),e.elementType=xe,e.lanes=o,e;case W:return e=Dt(13,n,t,u),e.elementType=W,e.lanes=o,e;case J:return e=Dt(19,n,t,u),e.elementType=J,e.lanes=o,e;case tn:case R:return e=u|32,e=Dt(30,n,t,e),e.elementType=R,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case ie:v=10;break e;case me:v=9;break e;case Z:v=11;break e;case we:v=14;break e;case Me:v=16,l=null;break e}v=29,n=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=Dt(v,n,t,u),t.elementType=e,t.type=l,t.lanes=o,t}function js(e,t,n,l){return e=Dt(7,e,l,t),e.lanes=n,e}function Zo(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function Up(e){var t=Dt(18,null,null,0);return t.stateNode=e,t}function Fo(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Lp=new WeakMap;function ln(e,t){if(typeof e=="object"&&e!==null){var n=Lp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Am(t)},Lp.set(e,t),t)}return{value:e,source:t,stack:Am(t)}}var Sl=[],jl=0,Su=null,Qi=0,cn=[],un=0,ja=null,Rn=1,An="";function ta(e,t){Sl[jl++]=Qi,Sl[jl++]=Su,Su=e,Qi=t}function Bp(e,t,n){cn[un++]=Rn,cn[un++]=An,cn[un++]=ja,ja=e;var l=Rn;e=An;var u=32-It(l)-1;l&=~(1<<u),n+=1;var o=32-It(t)+u;if(30<o){var v=u-u%5;o=(l&(1<<v)-1).toString(32),l>>=v,u-=v,Rn=1<<32-It(t)+u|n<<u|l,An=o+e}else Rn=1<<o|n<<u|l,An=e}function ju(e){e.return!==null&&(ta(e,1),Bp(e,1,0))}function $o(e){for(;e===Su;)Su=Sl[--jl],Sl[jl]=null,Qi=Sl[--jl],Sl[jl]=null;for(;e===ja;)ja=cn[--un],cn[un]=null,An=cn[--un],cn[un]=null,Rn=cn[--un],cn[un]=null}function qp(e,t){cn[un++]=Rn,cn[un++]=An,cn[un++]=ja,Rn=t.id,An=t.overflow,ja=e}var ct=null,Ie=null,Se=!1,Na=null,rn=!1,Jo=Error(c(519));function Ta(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yi(ln(t,e)),Jo}function Hp(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[dt]=e,t[Mt]=l,n){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(n=0;n<oc.length;n++)Ne(oc[n],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),Jm(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),Wm(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||i0(t.textContent,n)?(l.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),l.onScroll!=null&&Ne("scroll",t),l.onScrollEnd!=null&&Ne("scrollend",t),l.onClick!=null&&(t.onclick=Cn),t=!0):t=!1,t||Ta(e,!0)}function Nu(e){for(ct=e.return;ct;)switch(ct.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:ct=ct.return}}function Nl(e){if(e!==ct)return!1;if(!Se)return Nu(e),Se=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Cd(e.type,e.memoizedProps)),n=!n),n&&Ie&&Ta(e),Nu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=E0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=E0(e)}else t===27?(t=Ie,ka(e.type)?(e=Bd,Bd=null,Ie=e):Ie=t):Ie=ct?fn(e.stateNode.nextSibling):null;return!0}function Ns(){Ie=ct=null,Se=!1}function Po(){var e=Na;return e!==null&&(Lt===null?Lt=e:Lt.push.apply(Lt,e),Na=null),e}function Yi(e){Na===null?Na=[e]:Na.push(e)}var Wo=wn(null),Ts=null,na=null;function Ea(e,t,n){Ye(Wo,t._currentValue),t._currentValue=n}function aa(e){e._currentValue=Wo.current,ft(Wo)}function Tu(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function ef(e,t,n,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var o=u.dependencies;if(o!==null){var v=u.child;o=o.firstContext;e:for(;o!==null;){var N=o;o=u;for(var w=0;w<t.length;w++)if(N.context===t[w]){o.lanes|=n,N=o.alternate,N!==null&&(N.lanes|=n),Tu(o.return,n,e),l||(v=null);break e}o=N.next}}else if(u.tag===18){if(v=u.return,v===null)throw Error(c(341));v.lanes|=n,o=v.alternate,o!==null&&(o.lanes|=n),Tu(v,n,e),v=null}else u.tag===13&&u.memoizedState!==null&&u.memoizedState.dehydrated===null?(u.lanes|=n,v=u.alternate,v!==null&&(v.lanes|=n),Tu(u.return,n,e),v=u.child,v=v!==null?v.sibling:null):v=u.child;if(v!==null)v.return=u;else for(v=u;v!==null;){if(v===e){v=null;break}if(u=v.sibling,u!==null){u.return=v.return,v=u;break}v=v.return}u=v}}function Es(e,t,n,l){e=null;for(var u=t,o=!1;u!==null;){if(!o){if((u.flags&524288)!==0)o=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var v=u.alternate;if(v===null)throw Error(c(387));if(v=v.memoizedProps,v!==null){var N=u.type;Vt(u.pendingProps.value,v.value)||(e!==null?e.push(N):e=[N])}}else if(u===Jc.current){if(v=u.alternate,v===null)throw Error(c(387));v.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Zl):e=[Zl])}u=u.return}return e!==null&&ef(t,e,n,l),t.flags|=262144,e!==null}function Eu(e){for(e=e.firstContext;e!==null;){if(!Vt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ws(e){Ts=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ht(e){return kp(Ts,e)}function wu(e,t){return Ts===null&&ws(e),kp(e,t)}function kp(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(c(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var nS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},aS=a.unstable_scheduleCallback,sS=a.unstable_NormalPriority,We={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tf(){return{controller:new nS,data:new Map,refCount:0}}function Ii(e){e.refCount--,e.refCount===0&&aS(sS,function(){e.controller.abort()})}function Qp(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var l=t[e];n.indexOf(l)===-1&&n.push(l)}}}var Gi=null;function lS(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Vi=null,nf=0,_s=0,Tl=null;function iS(e,t){if(Vi===null){var n=Vi=[];nf=0,_s=bd(),Tl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return nf++,t.then(Yp,Yp),t}function Yp(){if(--nf===0&&(Gi=null,Vi!==null)){Tl!==null&&(Tl.status="fulfilled");var e=Vi;Vi=null,_s=0,Tl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cS(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),l}var Ip=ae.S;ae.S=function(e,t){if(Uy=Qt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iS(e,t),Gi!==null)for(var n=Yl;n!==null;)Qp(n,Gi),n=n.next;if(n=e.types,n!==null){for(var l=Yl;l!==null;)Qp(l,n),l=l.next;if(_s!==0){l=Gi,l===null&&(l=Gi=[]);for(var u=0;u<n.length;u++){var o=n[u];l.indexOf(o)===-1&&l.push(o)}}}Ip!==null&&Ip(e,t)};var Cs=wn(null);function af(){var e=Cs.current;return e!==null?e:Qe.pooledCache}function _u(e,t){t===null?Ye(Cs,Cs.current):Ye(Cs,t.pool)}function Gp(){var e=af();return e===null?null:{parent:We._currentValue,pool:e}}var El=Error(c(460)),sf=Error(c(474)),Cu=Error(c(542)),Ru={then:function(){}};function Vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kp(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Cn,Cn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zp(e),e===void 0&&!("reason"in t)?Error(c(600)):e;default:if(typeof t.status=="string")t.then(Cn,Cn);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zp(e),e}throw As=t,El}}function Rs(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(As=n,El):n}}var As=null;function Xp(){if(As===null)throw Error(c(459));var e=As;return As=null,e}function Zp(e){if(e===El||e===Cu)throw Error(c(483))}var wl=null,Ki=0;function Au(e){var t=Ki;return Ki+=1,wl===null&&(wl=[]),Kp(wl,e,t)}function wa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ou(e,t){throw t.$$typeof===F?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Fp(e){function t(D,A){if(e){var U=D.deletions;U===null?(D.deletions=[A],D.flags|=16):U.push(A)}}function n(D,A){if(!e)return null;for(;A!==null;)t(D,A),A=A.sibling;return null}function l(D){for(var A=new Map;D!==null;)D.key===null?A.set(D.index,D):A.set(D.key,D),D=D.sibling;return A}function u(D,A){return D=ea(D,A),D.index=0,D.sibling=null,D}function o(D,A,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<A?(D.flags|=2,A):U):(D.flags|=134217730,A)):(D.flags|=1048576,A)}function v(D){return e&&D.alternate===null&&(D.flags|=134217730),D}function N(D,A,U,I){return A===null||A.tag!==6?(A=Zo(U,D.mode,I),A.return=D,A):(A=u(A,U),A.return=D,A)}function w(D,A,U,I){var te=U.type;return te===re?(D=B(D,A,U.props.children,I,U.key),wa(D,U),D):A!==null&&(A.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===Me&&Rs(te)===A.type)?(A=u(A,U.props),wa(A,U),A.return=D,A):(A=xu(U.type,U.key,U.props,null,D.mode,I),wa(A,U),A.return=D,A)}function z(D,A,U,I){return A===null||A.tag!==4||A.stateNode.containerInfo!==U.containerInfo||A.stateNode.implementation!==U.implementation?(A=Fo(U,D.mode,I),A.return=D,A):(A=u(A,U.children||[]),A.return=D,A)}function B(D,A,U,I,te){return A===null||A.tag!==7?(A=js(U,D.mode,I,te),A.return=D,A):(A=u(A,U),A.return=D,A)}function G(D,A,U){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Zo(""+A,D.mode,U),A.return=D,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:return U=xu(A.type,A.key,A.props,null,D.mode,U),wa(U,A),U.return=D,U;case $:return A=Fo(A,D.mode,U),A.return=D,A;case Me:return A=Rs(A),G(D,A,U)}if(ge(A)||se(A))return A=js(A,D.mode,U,null),A.return=D,A;if(typeof A.then=="function")return G(D,Au(A),U);if(A.$$typeof===ie)return G(D,wu(D,A),U);Ou(D,A)}return null}function M(D,A,U,I){var te=A!==null?A.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return te!==null?null:N(D,A,""+U,I);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case Y:return U.key===te?w(D,A,U,I):null;case $:return U.key===te?z(D,A,U,I):null;case Me:return U=Rs(U),M(D,A,U,I)}if(ge(U)||se(U))return te!==null?null:B(D,A,U,I,null);if(typeof U.then=="function")return M(D,A,Au(U),I);if(U.$$typeof===ie)return M(D,A,wu(D,U),I);Ou(D,U)}return null}function L(D,A,U,I,te){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return D=D.get(U)||null,N(A,D,""+I,te);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Y:return D=D.get(I.key===null?U:I.key)||null,w(A,D,I,te);case $:return D=D.get(I.key===null?U:I.key)||null,z(A,D,I,te);case Me:return I=Rs(I),L(D,A,U,I,te)}if(ge(I)||se(I))return D=D.get(U)||null,B(A,D,I,te,null);if(typeof I.then=="function")return L(D,A,U,Au(I),te);if(I.$$typeof===ie)return L(D,A,U,wu(A,I),te);Ou(A,I)}return null}function P(D,A,U,I){for(var te=null,Ee=null,ce=A,de=A=0,nt=null;ce!==null&&de<U.length;de++){ce.index>de?(nt=ce,ce=null):nt=ce.sibling;var Ae=M(D,ce,U[de],I);if(Ae===null){ce===null&&(ce=nt);break}e&&ce&&Ae.alternate===null&&t(D,ce),A=o(Ae,A,de),Ee===null?te=Ae:Ee.sibling=Ae,Ee=Ae,ce=nt}if(de===U.length)return n(D,ce),Se&&ta(D,de),te;if(ce===null){for(;de<U.length;de++)ce=G(D,U[de],I),ce!==null&&(A=o(ce,A,de),Ee===null?te=ce:Ee.sibling=ce,Ee=ce);return Se&&ta(D,de),te}for(ce=l(ce);de<U.length;de++)nt=L(ce,D,de,U[de],I),nt!==null&&(e&&(Ae=nt.alternate,Ae!==null&&ce.delete(Ae.key===null?de:Ae.key)),A=o(nt,A,de),Ee===null?te=nt:Ee.sibling=nt,Ee=nt);return e&&ce.forEach(function(Va){return t(D,Va)}),Se&&ta(D,de),te}function ne(D,A,U,I){if(U==null)throw Error(c(151));for(var te=null,Ee=null,ce=A,de=A=0,nt=null,Ae=U.next();ce!==null&&!Ae.done;de++,Ae=U.next()){ce.index>de?(nt=ce,ce=null):nt=ce.sibling;var Va=M(D,ce,Ae.value,I);if(Va===null){ce===null&&(ce=nt);break}e&&ce&&Va.alternate===null&&t(D,ce),A=o(Va,A,de),Ee===null?te=Va:Ee.sibling=Va,Ee=Va,ce=nt}if(Ae.done)return n(D,ce),Se&&ta(D,de),te;if(ce===null){for(;!Ae.done;de++,Ae=U.next())Ae=G(D,Ae.value,I),Ae!==null&&(A=o(Ae,A,de),Ee===null?te=Ae:Ee.sibling=Ae,Ee=Ae);return Se&&ta(D,de),te}for(ce=l(ce);!Ae.done;de++,Ae=U.next())Ae=L(ce,D,de,Ae.value,I),Ae!==null&&(e&&(nt=Ae.alternate,nt!==null&&ce.delete(nt.key===null?de:nt.key)),A=o(Ae,A,de),Ee===null?te=Ae:Ee.sibling=Ae,Ee=Ae);return e&&ce.forEach(function(Qj){return t(D,Qj)}),Se&&ta(D,de),te}function ve(D,A,U,I){if(typeof U=="object"&&U!==null&&U.type===re&&U.key===null&&U.props.ref===void 0&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case Y:e:{for(var te=U.key;A!==null;){if(A.key===te){if(te=U.type,te===re){if(A.tag===7){n(D,A.sibling),I=u(A,U.props.children),wa(I,U),I.return=D,D=I;break e}}else if(A.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===Me&&Rs(te)===A.type){n(D,A.sibling),I=u(A,U.props),wa(I,U),I.return=D,D=I;break e}n(D,A);break}else t(D,A);A=A.sibling}U.type===re?(I=js(U.props.children,D.mode,I,U.key),wa(I,U),I.return=D,D=I):(I=xu(U.type,U.key,U.props,null,D.mode,I),wa(I,U),I.return=D,D=I)}return v(D);case $:e:{for(te=U.key;A!==null;){if(A.key===te)if(A.tag===4&&A.stateNode.containerInfo===U.containerInfo&&A.stateNode.implementation===U.implementation){n(D,A.sibling),I=u(A,U.children||[]),I.return=D,D=I;break e}else{n(D,A);break}else t(D,A);A=A.sibling}I=Fo(U,D.mode,I),I.return=D,D=I}return v(D);case Me:return U=Rs(U),ve(D,A,U,I)}if(ge(U))return P(D,A,U,I);if(se(U)){if(te=se(U),typeof te!="function")throw Error(c(150));return U=te.call(U),ne(D,A,U,I)}if(typeof U.then=="function")return ve(D,A,Au(U),I);if(U.$$typeof===ie)return ve(D,A,wu(D,U),I);Ou(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,A!==null&&A.tag===6?(n(D,A.sibling),I=u(A,U),I.return=D,D=I):(n(D,A),I=Zo(U,D.mode,I),I.return=D,D=I),v(D)):n(D,A)}return function(D,A,U,I){try{Ki=0;var te=ve(D,A,U,I);return wl=null,te}catch(ce){if(ce===El||ce===Cu)throw ce;var Ee=Dt(29,ce,null,D.mode);return Ee.lanes=I,Ee.return=D,Ee}finally{}}}var Os=Fp(!0),$p=Fp(!1),_a=!1;function lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cf(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 Ca(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ze&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=bu(e),Dp(e,null,n),t}return vu(e,l,t,n),bu(e)}function Xi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Bm(e,n)}}function uf(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var u=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var v={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?u=o=v:o=o.next=v,n=n.next}while(n!==null);o===null?u=o=t:o=o.next=t}else u=o=t;n={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:o,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var rf=!1;function Zi(){if(rf){var e=Tl;if(e!==null)throw e}}function Fi(e,t,n,l){rf=!1;var u=e.updateQueue;_a=!1;var o=u.firstBaseUpdate,v=u.lastBaseUpdate,N=u.shared.pending;if(N!==null){u.shared.pending=null;var w=N,z=w.next;w.next=null,v===null?o=z:v.next=z,v=w;var B=e.alternate;B!==null&&(B=B.updateQueue,N=B.lastBaseUpdate,N!==v&&(N===null?B.firstBaseUpdate=z:N.next=z,B.lastBaseUpdate=w))}if(o!==null){var G=u.baseState;v=0,B=z=w=null,N=o;do{var M=N.lane&-536870913,L=M!==N.lane;if(L?(Te&M)===M:(l&M)===M){M!==0&&M===_s&&(rf=!0),B!==null&&(B=B.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var P=e,ne=N;M=t;var ve=n;switch(ne.tag){case 1:if(P=ne.payload,typeof P=="function"){G=P.call(ve,G,M);break e}G=P;break e;case 3:P.flags=P.flags&-65537|128;case 0:if(P=ne.payload,M=typeof P=="function"?P.call(ve,G,M):P,M==null)break e;G=Q({},G,M);break e;case 2:_a=!0}}M=N.callback,M!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[M]:L.push(M))}else L={lane:M,tag:N.tag,payload:N.payload,callback:N.callback,next:null},B===null?(z=B=L,w=G):B=B.next=L,v|=M;if(N=N.next,N===null){if(N=u.shared.pending,N===null)break;L=N,N=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);B===null&&(w=G),u.baseState=w,u.firstBaseUpdate=z,u.lastBaseUpdate=B,o===null&&(u.shared.lanes=0),La|=v,e.lanes=v,e.memoizedState=G}}function Jp(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Pp(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Jp(n[e],t)}var Aa=wn(null),Mu=wn(0);function Wp(e,t){e=ua,Ye(Mu,e),Ye(Aa,t),ua=e|t.baseLanes}function of(){Ye(Mu,ua),Ye(Aa,Aa.current)}function ff(){ua=Mu.current,ft(Aa),ft(Mu)}var mt=wn(null),bt=null;function Oa(e){var t=e.alternate;Ye(pt,pt.current&1),Ye(mt,e),bt===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(bt=e)}function df(e){Ye(pt,pt.current),Ye(mt,e),bt===null&&(bt=e)}function eg(e){e.tag===22?(Ye(pt,pt.current),Ye(mt,e),bt===null&&(bt=e)):Ma()}function Ma(){Ye(pt,pt.current),Ye(mt,mt.current)}function Kt(e){ft(mt),bt===e&&(bt=null),ft(pt)}var pt=wn(0);function $i(e,t){Ye(mt,mt.current),Ye(pt,t)}function hf(e){ft(pt),ft(mt),bt===e&&(bt=null)}function Du(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ud(n)||Ld(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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}var sa=0,ye=null,ke=null,et=null,zu=!1,_l=!1,Ms=!1,Uu=0,Ji=0,Cl=null,uS=0;function Fe(){throw Error(c(321))}function mf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vt(e[n],t[n]))return!1;return!0}function pf(e,t,n,l,u,o){return sa=o,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ae.H=e===null||e.memoizedState===null?Bg:qg,Ms=!1,o=n(l,u),Ms=!1,_l&&(o=ng(t,n,l,u)),tg(e),o}function tg(e){ae.H=Yu;var t=ke!==null&&ke.next!==null;if(sa=0,et=ke=ye=null,zu=!1,Ji=0,Cl=null,t)throw Error(c(300));e===null||tt||(e=e.dependencies,e!==null&&Eu(e)&&(tt=!0))}function ng(e,t,n,l){ye=e;var u=0;do{if(_l&&(Cl=null),Ji=0,_l=!1,25<=u)throw Error(c(301));if(u+=1,et=ke=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}ae.H=gS,o=t(n,l)}while(_l);return o}function rS(){var e=ae.H,t=e.useState()[0];return t=typeof t.then=="function"?Pi(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ye.flags|=1024),t}function gf(){var e=Uu!==0;return Uu=0,e}function yf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function vf(e){if(zu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zu=!1}sa=0,et=ke=ye=null,_l=!1,Ji=Uu=0,Cl=null}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?ye.memoizedState=et=e:et=et.next=e,et}function Pe(){if(ke===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=et===null?ye.memoizedState:et.next;if(t!==null)et=t,ke=e;else{if(e===null)throw ye.alternate===null?Error(c(467)):Error(c(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},et===null?ye.memoizedState=et=e:et=et.next=e}return et}function Lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pi(e){var t=Ji;return Ji+=1,Cl===null&&(Cl=[]),e=Kp(Cl,e,t),t=ye,(et===null?t.memoizedState:et.next)===null&&(t=t.alternate,ae.H=t===null||t.memoizedState===null?Bg:qg),e}function Bu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pi(e);if(e.$$typeof===V)return;if(e.$$typeof===ie)return ht(e)}throw Error(c(438,String(e)))}function bf(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ye.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Lu(),ye.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=En;return t.index++,n}function la(e,t){return typeof t=="function"?t(e):t}function qu(e){var t=Pe();return xf(t,ke,e)}function xf(e,t,n){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=n;var u=e.baseQueue,o=l.pending;if(o!==null){if(u!==null){var v=u.next;u.next=o.next,o.next=v}t.baseQueue=u=o,l.pending=null}if(o=e.baseState,u===null)e.memoizedState=o;else{t=u.next;var N=v=null,w=null,z=t,B=!1;do{var G=z.lane&-536870913;if(G!==z.lane?(Te&G)===G:(sa&G)===G){var M=z.revertLane;if(M===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),G===_s&&(B=!0);else if((sa&M)===M){z=z.next,M===_s&&(B=!0);continue}else G={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},w===null?(N=w=G,v=o):w=w.next=G,ye.lanes|=M,La|=M;G=z.action,Ms&&n(o,G),o=z.hasEagerState?z.eagerState:n(o,G)}else M={lane:G,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},w===null?(N=w=M,v=o):w=w.next=M,ye.lanes|=G,La|=G;z=z.next}while(z!==null&&z!==t);if(w===null?v=o:w.next=N,!Vt(o,e.memoizedState)&&(tt=!0,B&&(n=Tl,n!==null)))throw n;e.memoizedState=o,e.baseState=v,e.baseQueue=w,l.lastRenderedState=o}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Sf(e){var t=Pe(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var l=n.dispatch,u=n.pending,o=t.memoizedState;if(u!==null){n.pending=null;var v=u=u.next;do o=e(o,v.action),v=v.next;while(v!==u);Vt(o,t.memoizedState)||(tt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,l]}function ag(e,t,n){var l=ye,u=Pe(),o=Se;if(o){if(n===void 0)throw Error(c(407));n=n()}else n=t();var v=!Vt((ke||u).memoizedState,n);if(v&&(u.memoizedState=n,tt=!0),u=u.queue,Tf(ig.bind(null,l,u,e),[e]),e=u.getSnapshot!==t||v||et!==null&&(et.memoizedState.tag&1)!==0,Rl(e?9:8,{destroy:void 0},lg.bind(null,l,u,n,t),null),e){if(l.flags|=2048,Qe===null)throw Error(c(349));o||(sa&127)!==0||sg(l,t,n)}return n}function sg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=Lu(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lg(e,t,n,l){t.value=n,t.getSnapshot=l,cg(t)&&ug(e)}function ig(e,t,n){return n(function(){cg(t)&&ug(e)})}function cg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vt(e,n)}catch{return!0}}function ug(e){var t=Ss(e,2);t!==null&&Bt(t,e,2)}function jf(e){var t=Tt();if(typeof e=="function"){var n=e;if(e=n(),Ms){ba(!0);try{n()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},t}function rg(e,t,n,l){return e.baseState=n,xf(e,ke,typeof l=="function"?l:la)}function oS(e,t,n,l,u){if(Qu(e))throw Error(c(485));if(e=t.action,e!==null){var o={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){o.listeners.push(v)}};ae.T!==null?n(!0):o.isTransition=!1,l(o),n=t.pending,n===null?(o.next=t.pending=o,og(t,o)):(o.next=n.next,t.pending=n.next=o)}}function og(e,t){var n=t.action,l=t.payload,u=e.state;if(t.isTransition){var o=ae.T,v={};v.types=o!==null?o.types:null,ae.T=v;try{var N=n(u,l),w=ae.S;w!==null&&w(v,N),fg(e,t,N)}catch(z){Nf(e,t,z)}finally{o!==null&&v.types!==null&&(o.types=v.types),ae.T=o}}else try{o=n(u,l),fg(e,t,o)}catch(z){Nf(e,t,z)}}function fg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){dg(e,t,l)},function(l){return Nf(e,t,l)}):dg(e,t,n)}function dg(e,t,n){t.status="fulfilled",t.value=n,hg(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,og(e,n)))}function Nf(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,hg(t),t=t.next;while(t!==l)}e.action=null}function hg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mg(e,t){return t}function pg(e,t){if(Se){var n=Qe.formState;if(n!==null){e:{var l=ye;if(Se){if(Ie){t:{for(var u=Ie,o=rn;u.nodeType!==8;){if(!o){u=null;break t}if(u=fn(u.nextSibling),u===null){u=null;break t}}o=u.data,u=o==="F!"||o==="F"?u:null}if(u){Ie=fn(u.nextSibling),l=u.data==="F!";break e}}Ta(l)}l=!1}l&&(t=n[0])}}return n=Tt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mg,lastRenderedState:t},n.queue=l,n=zg.bind(null,ye,l),l.dispatch=n,l=jf(!1),o=Rf.bind(null,ye,!1,l.queue),l=Tt(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,n=oS.bind(null,ye,u,o,n),u.dispatch=n,l.memoizedState=e,[t,n,!1]}function gg(e){var t=Pe();return yg(t,ke,e)}function yg(e,t,n){if(t=xf(e,t,mg)[0],e=qu(la)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Pi(t)}catch(v){throw v===El?Cu:v}else l=t;t=Pe();var u=t.queue,o=u.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,Rl(9,{destroy:void 0},fS.bind(null,u,n),null)),[l,o,e]}function fS(e,t){e.action=t}function vg(e){var t=Pe(),n=ke;if(n!==null)return yg(t,n,e);Pe(),t=t.memoizedState,n=Pe();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Rl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ye.updateQueue,t===null&&(t=Lu(),ye.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function bg(){return Pe().memoizedState}function Hu(e,t,n,l){var u=Tt();ye.flags|=e,u.memoizedState=Rl(1|t,{destroy:void 0},n,l===void 0?null:l)}function ku(e,t,n,l){var u=Pe();l=l===void 0?null:l;var o=u.memoizedState.inst;ke!==null&&l!==null&&mf(l,ke.memoizedState.deps)?u.memoizedState=Rl(t,o,n,l):(ye.flags|=e,u.memoizedState=Rl(1|t,o,n,l))}function xg(e,t){Hu(8390656,8,e,t)}function Tf(e,t){ku(2048,8,e,t)}function dS(e){ye.flags|=4;var t=ye.updateQueue;if(t===null)t=Lu(),ye.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Sg(e){var t=Pe().memoizedState;return dS({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function jg(e,t){return ku(4,2,e,t)}function Ng(e,t){return ku(4,4,e,t)}function Tg(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 Eg(e,t,n){n=n!=null?n.concat([e]):null,ku(4,4,Tg.bind(null,t,e),n)}function Ef(){}function wg(e,t){var n=Pe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&mf(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function _g(e,t){var n=Pe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&mf(t,l[1]))return l[0];if(l=e(),Ms){ba(!0);try{e()}finally{ba(!1)}}return n.memoizedState=[l,t],l}function wf(e,t,n){return n===void 0||(sa&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=By(),ye.lanes|=e,La|=e,n)}function Cg(e,t,n,l){return Vt(n,t)?n:Aa.current!==null?(e=wf(e,n,l),Vt(e,t)||(tt=!0),e):(sa&106)===0||(sa&1073741824)!==0&&(Te&261930)===0?(tt=!0,e.memoizedState=n):(e=By(),ye.lanes|=e,La|=e,t)}function Rg(e,t,n,l,u){var o=fe.p;fe.p=o!==0&&8>o?o:8;var v=ae.T,N={};N.types=v!==null?v.types:null,ae.T=N,Rf(e,!1,t,n);try{var w=u(),z=ae.S;if(z!==null&&z(N,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var B=cS(w,l);Wi(e,t,B,$t(e))}else Wi(e,t,l,$t(e))}catch(G){Wi(e,t,{then:function(){},status:"rejected",reason:G},$t())}finally{fe.p=o,v!==null&&N.types!==null&&(v.types=N.types),ae.T=v}}function hS(){}function _f(e,t,n,l){if(e.tag!==5)throw Error(c(476));var u=Ag(e).queue;Rg(e,u,t,nn,n===null?hS:function(){return Og(e),n(l)})}function Ag(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:nn,baseState:nn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:nn},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Og(e){var t=Ag(e);t.next===null&&(t=e.alternate.memoizedState),Wi(e,t.next.queue,{},$t())}function Cf(){return ht(Zl)}function Mg(){return Pe().memoizedState}function Dg(){return Pe().memoizedState}function mS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=$t();e=Ca(n);var l=Ra(t,e,n);l!==null&&(Bt(l,t,n),Xi(l,t,n)),t={cache:tf()},e.payload=t;return}t=t.return}}function pS(e,t,n){var l=$t();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qu(e)?Ug(t,n):(n=Ko(e,t,n,l),n!==null&&(Bt(n,e,l),Lg(n,t,l)))}function zg(e,t,n){var l=$t();Wi(e,t,n,l)}function Wi(e,t,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qu(e))Ug(t,u);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var v=t.lastRenderedState,N=o(v,n);if(u.hasEagerState=!0,u.eagerState=N,Vt(N,v))return vu(e,t,u,0),Qe===null&&yu(),!1}catch{}finally{}if(n=Ko(e,t,u,l),n!==null)return Bt(n,e,l),Lg(n,t,l),!0}return!1}function Rf(e,t,n,l){if(l={lane:2,revertLane:bd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Qu(e)){if(t)throw Error(c(479))}else t=Ko(e,n,l,2),t!==null&&Bt(t,e,2)}function Qu(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Ug(e,t){_l=zu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lg(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Bm(e,n)}}var Yu={readContext:ht,use:Bu,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe,useEffectEvent:Fe},Bg={readContext:ht,use:Bu,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:xg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hu(4194308,4,Tg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hu(4194308,4,e,t)},useInsertionEffect:function(e,t){Hu(4,2,e,t)},useMemo:function(e,t){var n=Tt();t=t===void 0?null:t;var l=e();if(Ms){ba(!0);try{e()}finally{ba(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Tt();if(n!==void 0){var u=n(t);if(Ms){ba(!0);try{n(t)}finally{ba(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=pS.bind(null,ye,e),[l.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:function(e){e=jf(e);var t=e.queue,n=zg.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ef,useDeferredValue:function(e,t){var n=Tt();return wf(n,e,t)},useTransition:function(){var e=jf(!1);return e=Rg.bind(null,ye,e.queue,!0,!1),Tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ye,u=Tt();if(Se){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Qe===null)throw Error(c(349));(Te&127)!==0||sg(l,t,n)}u.memoizedState=n;var o={value:n,getSnapshot:t};return u.queue=o,xg(ig.bind(null,l,o,e),[e]),l.flags|=2048,Rl(9,{destroy:void 0},lg.bind(null,l,o,n,t),null),n},useId:function(){var e=Tt(),t=Qe.identifierPrefix;if(Se){var n=An,l=Rn;n=(l&~(1<<32-It(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Uu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=uS++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Cf,useFormState:pg,useActionState:pg,useOptimistic:function(e){var t=Tt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rf.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:bf,useCacheRefresh:function(){return Tt().memoizedState=mS.bind(null,ye)},useEffectEvent:function(e){var t=Tt(),n={impl:e};return t.memoizedState=n,function(){if((ze&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},qg={readContext:ht,use:Bu,useCallback:wg,useContext:ht,useEffect:Tf,useImperativeHandle:Eg,useInsertionEffect:jg,useLayoutEffect:Ng,useMemo:_g,useReducer:qu,useRef:bg,useState:function(){return qu(la)},useDebugValue:Ef,useDeferredValue:function(e,t){var n=Pe();return Cg(n,ke.memoizedState,e,t)},useTransition:function(){var e=qu(la)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:Pi(e),t]},useSyncExternalStore:ag,useId:Mg,useHostTransitionStatus:Cf,useFormState:gg,useActionState:gg,useOptimistic:function(e,t){var n=Pe();return rg(n,ke,e,t)},useMemoCache:bf,useCacheRefresh:Dg,useEffectEvent:Sg},gS={readContext:ht,use:Bu,useCallback:wg,useContext:ht,useEffect:Tf,useImperativeHandle:Eg,useInsertionEffect:jg,useLayoutEffect:Ng,useMemo:_g,useReducer:Sf,useRef:bg,useState:function(){return Sf(la)},useDebugValue:Ef,useDeferredValue:function(e,t){var n=Pe();return ke===null?wf(n,e,t):Cg(n,ke.memoizedState,e,t)},useTransition:function(){var e=Sf(la)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:Pi(e),t]},useSyncExternalStore:ag,useId:Mg,useHostTransitionStatus:Cf,useFormState:vg,useActionState:vg,useOptimistic:function(e,t){var n=Pe();return ke!==null?rg(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:bf,useCacheRefresh:Dg,useEffectEvent:Sg};function Af(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:Q({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Of={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=$t(),u=Ca(l);u.payload=t,n!=null&&(u.callback=n),t=Ra(e,u,l),t!==null&&(Bt(t,e,l),Xi(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=$t(),u=Ca(l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=Ra(e,u,l),t!==null&&(Bt(t,e,l),Xi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$t(),l=Ca(n);l.tag=2,t!=null&&(l.callback=t),t=Ra(e,l,n),t!==null&&(Bt(t,e,n),Xi(t,e,n))}};function Hg(e,t,n,l,u,o,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,o,v):t.prototype&&t.prototype.isPureReactComponent?!Hi(n,l)||!Hi(u,o):!0}function kg(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Of.enqueueReplaceState(t,t.state,null)}function Ds(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=Q({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Qg(e){gu(e)}function Yg(e){console.error(e)}function Ig(e){gu(e)}function Iu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Gg(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Mf(e,t,n){return n=Ca(n),n.tag=3,n.payload={element:null},n.callback=function(){Iu(e,t)},n}function Vg(e){return e=Ca(e),e.tag=3,e}function Kg(e,t,n,l){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var o=l.value;e.payload=function(){return u(o)},e.callback=function(){Gg(t,n,l)}}var v=n.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Gg(t,n,l),typeof u!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var N=l.stack;this.componentDidCatch(l.value,{componentStack:N!==null?N:""})})}function yS(e,t,n,l,u){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Es(t,n,u,!0),n=mt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return bt===null?or():n.alternate===null&&$e===0&&($e=3),n.flags&=-257,n.flags|=65536,n.lanes=u,l===Ru?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),gd(e,l,u)),!1;case 22:return n.flags|=65536,l===Ru?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),gd(e,l,u)),!1}throw Error(c(435,n.tag))}return gd(e,l,u),or(),!1}if(Se)return t=mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,l!==Jo&&(e=Error(c(422),{cause:l}),Yi(ln(e,n)))):(l!==Jo&&(t=Error(c(423),{cause:l}),Yi(ln(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=ln(l,n),u=Mf(e.stateNode,l,u),uf(e,u),$e!==4&&($e=2)),!1;var o=Error(c(520),{cause:l});if(o=ln(o,n),cc===null?cc=[o]:cc.push(o),$e!==4&&($e=2),t===null)return!0;l=ln(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=Mf(n.stateNode,l,e),uf(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(Ba===null||!Ba.has(o))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Vg(u),Kg(u,e,n,l),uf(n,u),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Df=Error(c(461)),tt=!1;function st(e,t,n,l){t.child=e===null?$p(t,null,n,l):Os(t,e.child,n,l)}function Xg(e,t,n,l,u){n=n.render;var o=t.ref;if("ref"in l){var v={};for(var N in l)N!=="ref"&&(v[N]=l[N])}else v=l;return ws(t),l=pf(e,t,n,v,o,u),N=gf(),e!==null&&!tt?(yf(e,t,u),ia(e,t,u)):(Se&&N&&ju(t),t.flags|=1,st(e,t,l,u),t.child)}function Zg(e,t,n,l,u){if(e===null){var o=n.type;return typeof o=="function"&&!Xo(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,Fg(e,t,o,l,u)):(e=xu(n.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!Qf(e,u)){var v=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hi,n(v,l)&&e.ref===t.ref)return ia(e,t,u)}return t.flags|=1,e=ea(o,l),e.ref=t.ref,e.return=t,t.child=e}function Fg(e,t,n,l,u){if(e!==null){var o=e.memoizedProps;if(Hi(o,l)&&e.ref===t.ref)if(tt=!1,t.pendingProps=l=o,Qf(e,u))(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,ia(e,t,u)}return zf(e,t,n,l,u)}function $g(e,t,n,l){var u=l.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(l=t.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~o}else l=0,t.child=null;return Jg(e,t,o,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_u(t,o!==null?o.cachePool:null),o!==null?Wp(t,o):of(),eg(t);else return l=t.lanes=536870912,Jg(e,t,o!==null?o.baseLanes|n:n,n,l)}else o!==null?(_u(t,o.cachePool),Wp(t,o),Ma(),t.memoizedState=null):(e!==null&&_u(t,null),of(),Ma());return st(e,t,u,n),t.child}function ec(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Jg(e,t,n,l,u){var o=af();return o=o===null?null:{parent:We._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&_u(t,null),of(),eg(t),e!==null&&Es(e,t,l,!0),t.childLanes=u,null}function Gu(e,t){return t=Vu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pg(e,t,n){return Os(t,e.child,null,n),e=Gu(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function vS(e,t,n){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(l.mode==="hidden")return e=Gu(t,l),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},ec(null,e);if(df(t),(e=Ie)?(e=T0(e,rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Rn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=Up(e),n.return=t,t.child=n,ct=t,Ie=null)):e=null,e===null)throw Ta(t);return t.lanes=536870912,null}return Gu(t,l)}var o=e.memoizedState;if(o!==null){var v=o.dehydrated;if(df(t),u)if(t.flags&256)t.flags&=-257,t=Pg(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(tt||Es(e,t,n,!1),u=(n&e.childLanes)!==0,tt||u){if(Aa.current===null){if(l=Qe,l!==null&&(v=qm(l,n),v!==0&&v!==o.retryLane))throw o.retryLane=v,Ss(e,v),Bt(l,e,v),Df;or()}t=Pg(e,t,n)}else e=o.treeContext,Ie=fn(v.nextSibling),ct=t,Se=!0,Na=null,rn=!1,e!==null&&qp(t,e),t=Gu(t,l),t.flags|=134221824;return t}return e=ea(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Al(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(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zf(e,t,n,l,u){return ws(t),n=pf(e,t,n,l,void 0,u),l=gf(),e!==null&&!tt?(yf(e,t,u),ia(e,t,u)):(Se&&l&&ju(t),t.flags|=1,st(e,t,n,u),t.child)}function Wg(e,t,n,l,u,o){return ws(t),t.updateQueue=null,n=ng(t,l,n,u),tg(e),l=gf(),e!==null&&!tt?(yf(e,t,o),ia(e,t,o)):(Se&&l&&ju(t),t.flags|=1,st(e,t,n,o),t.child)}function ey(e,t,n,l,u){if(ws(t),t.stateNode===null){var o=xl,v=n.contextType;typeof v=="object"&&v!==null&&(o=ht(v)),o=new n(l,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Of,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=l,o.state=t.memoizedState,o.refs={},lf(t),v=n.contextType,o.context=typeof v=="object"&&v!==null?ht(v):xl,o.state=t.memoizedState,v=n.getDerivedStateFromProps,typeof v=="function"&&(Af(t,n,v,l),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(v=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),v!==o.state&&Of.enqueueReplaceState(o,o.state,null),Fi(t,l,o,u),Zi(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){o=t.stateNode;var N=t.memoizedProps,w=Ds(n,N);o.props=w;var z=o.context,B=n.contextType;v=xl,typeof B=="object"&&B!==null&&(v=ht(B));var G=n.getDerivedStateFromProps;B=typeof G=="function"||typeof o.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,B||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(N||z!==v)&&kg(t,o,l,v),_a=!1;var M=t.memoizedState;o.state=M,Fi(t,l,o,u),Zi(),z=t.memoizedState,N||M!==z||_a?(typeof G=="function"&&(Af(t,n,G,l),z=t.memoizedState),(w=_a||Hg(t,n,w,l,M,z,v))?(B||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),o.props=l,o.state=z,o.context=v,l=w):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{o=t.stateNode,cf(e,t),v=t.memoizedProps,B=Ds(n,v),o.props=B,G=t.pendingProps,M=o.context,z=n.contextType,w=xl,typeof z=="object"&&z!==null&&(w=ht(z)),N=n.getDerivedStateFromProps,(z=typeof N=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(v!==G||M!==w)&&kg(t,o,l,w),_a=!1,M=t.memoizedState,o.state=M,Fi(t,l,o,u),Zi();var L=t.memoizedState;v!==G||M!==L||_a||e!==null&&e.dependencies!==null&&Eu(e.dependencies)?(typeof N=="function"&&(Af(t,n,N,l),L=t.memoizedState),(B=_a||Hg(t,n,B,l,M,L,w)||e!==null&&e.dependencies!==null&&Eu(e.dependencies))?(z||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(l,L,w),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(l,L,w)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||v===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),o.props=l,o.state=L,o.context=w,l=B):(typeof o.componentDidUpdate!="function"||v===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),l=!1)}return o=l,Al(e,t),l=(t.flags&128)!==0,o||l?(o=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&l?(t.child=Os(t,e.child,null,u),t.child=Os(t,null,n,u)):st(e,t,n,u),t.memoizedState=o.state,e=t.child):e=ia(e,t,u),e}function ty(e,t,n,l){return Ns(),t.flags|=256,st(e,t,n,l),t.child}var Uf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lf(e){return{baseLanes:e,cachePool:Gp()}}function Bf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ft),e}function ny(e,t,n){var l=t.pendingProps,u=!1,o=(t.flags&128)!==0,v;if((v=o)||(v=e!==null&&e.memoizedState===null?!1:(pt.current&2)!==0),v&&(u=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(u?Oa(t):Ma(),(e=Ie)?(e=T0(e,rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Rn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=Up(e),n.return=t,t.child=n,ct=t,Ie=null)):e=null,e===null)throw Ta(t);return Ld(e)?t.lanes=32:t.lanes=536870912,null}return o=l.children,l=l.fallback,u?(Ma(),u=t.mode,o=Vu({mode:"hidden",children:o},u),l=js(l,u,n,null),o.return=t,l.return=t,o.sibling=l,t.child=o,l=t.child,l.memoizedState=Lf(n),l.childLanes=Bf(e,v,n),t.memoizedState=Uf,ec(null,l)):(Oa(t),qf(t,o))}var N=e.memoizedState;if(N!==null){var w=N.dehydrated;if(w!==null)return bS(e,t,o,v,l,w,N,n)}return u?(Ma(),u=l.fallback,o=t.mode,N=e.child,w=N.sibling,l=ea(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&1206910976,w!==null?u=ea(w,u):(u=js(u,o,n,null),u.flags|=2),u.return=t,l.return=t,l.sibling=u,t.child=l,ec(null,l),l=t.child,u=e.child.memoizedState,u===null?u=Lf(n):(o=u.cachePool,o!==null?(N=We._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=Gp(),u={baseLanes:u.baseLanes|n,cachePool:o}),l.memoizedState=u,l.childLanes=Bf(e,v,n),t.memoizedState=Uf,ec(e.child,l)):(Oa(t),n=e.child,e=n.sibling,n=ea(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=n,t.memoizedState=null,n)}function qf(e,t){return t=Vu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vu(e,t){return e=Dt(22,e,null,t),e.lanes=0,e}function Ku(e,t,n){return Os(t,e.child,null,n),e=qf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bS(e,t,n,l,u,o,v,N){if(n)return t.flags&256?(Oa(t),t.flags&=-257,Ku(e,t,N)):t.memoizedState!==null?(Ma(),t.child=e.child,t.flags|=128,null):(Ma(),o=u.fallback,v=t.mode,u=Vu({mode:"visible",children:u.children},v),o=js(o,v,N,null),o.flags|=2,u.return=t,o.return=t,u.sibling=o,t.child=u,Os(t,e.child,null,N),u=t.child,u.memoizedState=Lf(N),u.childLanes=Bf(e,l,N),t.memoizedState=Uf,ec(null,u));if(Oa(t),Ld(o)){if(l=o.nextSibling&&o.nextSibling.dataset,l)var w=l.dgst;return l=w,l!==""&&(u=Error(c(419)),u.stack="",u.digest=l,Yi({value:u,source:null,stack:null})),Ku(e,t,N)}if(tt||Es(e,t,N,!1),l=(N&e.childLanes)!==0,tt||l){if(Aa.current!==null)return Ku(e,t,N);if(l=Qe,l!==null&&(u=qm(l,N),u!==0&&u!==v.retryLane))throw v.retryLane=u,Ss(e,u),Bt(l,e,u),Df;return Ud(o)||or(),Ku(e,t,N)}return Ud(o)?(t.flags|=192,t.child=e.child,null):(e=v.treeContext,Ie=fn(o.nextSibling),ct=t,Se=!0,Na=null,rn=!1,e!==null&&qp(t,e),t=qf(t,u.children),t.flags|=134221824,t)}function ay(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Tu(e.return,t,n)}function sy(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Du(n)===null&&(t=e),e=e.sibling}return t}function Xu(e,t,n,l,u,o){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:u,treeForkCount:o}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=l,v.tail=n,v.tailMode=u,v.treeForkCount=o)}function Hf(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function kf(e,t,n){var l=t.pendingProps,u=l.revealOrder,o=l.tail;l=l.children;var v=pt.current;if(t.flags&128)return $i(t,v),null;var N=(v&2)!==0;if(N?(v=v&1|2,t.flags|=128):v&=1,$i(t,v),u==="backwards"&&e!==null?(Hf(e),st(e,t,l,n),Hf(e)):st(e,t,l,n),l=Se?Qi:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ay(e,n,t);else if(e.tag===19)ay(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}switch(u){case"backwards":n=sy(t.child),n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null,Hf(t)),Xu(t,!0,u,null,o,l);break;case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Du(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Xu(t,!0,n,null,o,l);break;case"together":Xu(t,!1,null,null,void 0,l);break;case"independent":t.memoizedState=null;break;default:n=sy(t.child),n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Xu(t,!1,u,n,o,l)}return t.child}function ly(e,t,n){var l=t.pendingProps;return Ea(t,t.type,l.value),st(e,t,l.children,n),t.child}function ia(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),La|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Es(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=ea(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ea(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Qf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Eu(e)))}function xS(e,t,n){switch(t.tag){case 3:Pc(t,t.stateNode.containerInfo),Ea(t,We,e.memoizedState.cache),Ns();break;case 27:case 5:ho(t);break;case 4:Pc(t,t.stateNode.containerInfo);break;case 10:Ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,df(t),null;break;case 13:var l=t.memoizedState;if(l!==null){if(l.dehydrated!==null)return Oa(t),t.flags|=128,null;l=Es(e,t,n,!1);var u=t.child.childLanes;return l||(n&u)!==0?ny(e,t,n):(Oa(t),e=ia(e,t,n),e!==null?e.sibling:null)}Oa(t);break;case 19:if(t.flags&128)return kf(e,t,n);if(u=(e.flags&128)!==0,l=(n&t.childLanes)!==0,l||(Es(e,t,n,!1),l=(n&t.childLanes)!==0),u){if(l)return kf(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),$i(t,pt.current),l)break;return null;case 22:return t.lanes=0,$g(e,t,n,t.pendingProps);case 24:Ea(t,We,e.memoizedState.cache)}return ia(e,t,n)}function iy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tt=!0;else{if(!Qf(e,n)&&(t.flags&128)===0)return tt=!1,xS(e,t,n);tt=(e.flags&131072)!==0}else tt=!1,Se&&(t.flags&1048576)!==0&&Bp(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Rs(t.elementType),t.type=e,typeof e=="function")Xo(e)?(l=Ds(e,l),t.tag=1,t=ey(null,t,e,l,n)):(t.tag=0,t=zf(null,t,e,l,n));else{if(e!=null){var u=e.$$typeof;if(u===Z){t.tag=11,t=Xg(null,t,e,l,n);break e}else if(u===we){t.tag=14,t=Zg(null,t,e,l,n);break e}else if(u===ie){t.tag=10,t.type=e,t=ly(null,t,n);break e}}throw t=Ce(e)||e,Error(c(306,t,""))}}return t;case 0:return zf(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,u=Ds(l,t.pendingProps),ey(e,t,l,u,n);case 3:e:{if(Pc(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var o=t.memoizedState;u=o.element,cf(e,t),Fi(t,l,null,n);var v=t.memoizedState;if(l=v.cache,Ea(t,We,l),l!==o.cache&&ef(t,[We],n,!0),Zi(),l=v.element,o.isDehydrated)if(o={element:l,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=ty(e,t,l,n);break e}else if(l!==u){u=ln(Error(c(424)),t),Yi(u),t=ty(e,t,l,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(Ie=fn(e.firstChild),ct=t,Se=!0,Na=null,rn=!0,n=$p(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ns(),l===u){t=ia(e,t,n);break e}st(e,t,l,n)}t=t.child}return t;case 26:return Al(e,t),e===null?(n=O0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Se||(t.stateNode=o0(t.type,t.pendingProps,ya.current,t)):t.memoizedState=O0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ho(t),e===null&&Se&&(l=t.stateNode=_0(t.type,t.pendingProps,ya.current),ct=t,rn=!0,u=Ie,ka(t.type)?(Bd=u,Ie=fn(l.firstChild)):Ie=u),st(e,t,t.pendingProps.children,n),Al(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((u=l=Ie)&&(l=mj(l,t.type,t.pendingProps,rn),l!==null?(t.stateNode=l,ct=t,Ie=fn(l.firstChild),rn=!1,u=!0):u=!1),u||Ta(t)),ho(t),u=t.type,o=t.pendingProps,v=e!==null?e.memoizedProps:null,l=o.children,Cd(u,o)?l=null:v!==null&&Cd(u,v)&&(t.flags|=32),t.memoizedState!==null&&(u=pf(e,t,rS,null,null,n),Zl._currentValue=u),Al(e,t),st(e,t,l,n),t.child;case 6:return e===null&&Se&&((e=n=Ie)&&(n=pj(n,t.pendingProps,rn),n!==null?(t.stateNode=n,ct=t,Ie=null,e=!0):e=!1),e||Ta(t)),null;case 13:return ny(e,t,n);case 4:return Pc(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Os(t,null,l,n):st(e,t,l,n),t.child;case 11:return Xg(e,t,t.type,t.pendingProps,n);case 7:return l=t.pendingProps,Al(e,t),st(e,t,l,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(e,t,t.pendingProps.children,n),t.child;case 10:return ly(e,t,n);case 9:return u=t.type._context,l=t.pendingProps.children,ws(t),u=ht(u),l=l(u),t.flags|=1,st(e,t,l,n),t.child;case 14:return Zg(e,t,t.type,t.pendingProps,n);case 15:return Fg(e,t,t.type,t.pendingProps,n);case 19:return kf(e,t,n);case 31:return vS(e,t,n);case 22:return $g(e,t,n,t.pendingProps);case 24:return ws(t),l=ht(We),e===null?(u=af(),u===null&&(u=Qe,o=tf(),u.pooledCache=o,o.refCount++,o!==null&&(u.pooledCacheLanes|=n),u=o),t.memoizedState={parent:l,cache:u},lf(t),Ea(t,We,u)):((e.lanes&n)!==0&&(cf(e,t),Fi(t,null,null,n),Zi()),u=e.memoizedState,o=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Ea(t,We,l)):(l=o.cache,Ea(t,We,l),l!==u.cache&&ef(t,[We],n,!0))),st(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=t.pendingProps,l.name!=null&&l.name!=="auto"?t.flags|=e===null?18882560:18874368:Se&&ju(t),e!==null&&e.memoizedProps.name!==l.name?t.flags|=4194816:Al(e,t),st(e,t,l.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ca(e){e.flags|=4}function Yf(e,t,n,l,u){var o;if((o=(e.mode&32)!==0)&&(o=n===null?U0(t,l):U0(t,l)&&(l.src!==n.src||l.srcSet!==n.srcSet)),o){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Qy())e.flags|=8192;else throw As=Ru,sf}else e.flags&=-16777217}function cy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!L0(t))if(Qy())e.flags|=8192;else throw As=Ru,sf}function Zu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Um():536870912,e.lanes|=t,Ul|=t)}function tc(e,t){if(!Se)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags&1206910976,l|=u.flags&1206910976,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function SS(e,t,n){var l=t.pendingProps;switch($o(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return Ge(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),aa(We),cl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Po())),Ge(t),null;case 26:var u=t.type,o=t.memoizedState;return e===null?(ca(t),o!==null?(Ge(t),cy(t,o)):(Ge(t),Yf(t,u,null,l,n))):o?o!==e.memoizedState?(ca(t),Ge(t),cy(t,o)):(Ge(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ca(t),Ge(t),Yf(t,u,e,l,n)),null;case 27:if(Wc(t),n=ya.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ge(t),t.subtreeFlags&=-33554433,null}e=_n.current,Nl(t)?Hp(t):(e=_0(u,l,n),t.stateNode=e,ca(t))}return Ge(t),t.subtreeFlags&=-33554433,null;case 5:if(Wc(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Ge(t),t.subtreeFlags&=-33554433,null}if(o=_n.current,Nl(t))Hp(t);else{var v=dc(ya.current);switch(o){case 1:o=v.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:o=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":o=v.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":o=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":o=v.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof l.is=="string"?v.createElement("select",{is:l.is}):v.createElement("select"),l.multiple?o.multiple=!0:l.size&&(o.size=l.size);break;default:o=typeof l.is=="string"?v.createElement(u,{is:l.is}):v.createElement(u)}}o[dt]=t,o[Mt]=l;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)o.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=o;e:switch(yt(o,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ca(t)}}return Ge(t),t.subtreeFlags&=-33554433,Yf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ca(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=ya.current,Nl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,u=ct,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||i0(e.nodeValue,n)),e||Ta(t,!0)}else e=dc(e).createTextNode(l),e[dt]=t,t.stateNode=e}return Ge(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Nl(t),n!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[dt]=t}else Ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),e=!1}else n=Po(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ge(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Nl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[dt]=t}else Ns(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ge(t),u=!1}else u=Po(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==u&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Zu(t,t.updateQueue),Ge(t),null);case 4:return cl(),e===null&&Nd(t.stateNode.containerInfo),t.flags|=67108864,Ge(t),null;case 10:return aa(t.type),Ge(t),null;case 19:if(hf(t),l=t.memoizedState,l===null)return Ge(t),null;if(u=(t.flags&128)!==0,o=l.rendering,o===null)if(u)tc(l,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Du(e),o!==null){for(t.flags|=128,tc(l,!1),e=o.updateQueue,t.updateQueue=e,Zu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)zp(n,e),n=n.sibling;return $i(t,pt.current&1|2),Se&&ta(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Qt()>ir&&(t.flags|=128,u=!0,tc(l,!1),t.lanes=4194304)}else{if(!u)if(e=Du(o),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Zu(t,e),tc(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!o.alternate&&!Se)return Ge(t),null}else 2*Qt()-l.renderingStartTime>ir&&n!==536870912&&(t.flags|=128,u=!0,tc(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(e=l.last,e!==null?e.sibling=o:t.child=o,l.last=o)}if(l.tail!==null){e=l.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Qt(),e.sibling=null,o=pt.current,o=u?o&1|2:o&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||Se?$i(t,o):(n=o,Ye(mt,t),Ye(pt,n),bt===null&&(bt=t)),Se&&ta(t,l.treeForkCount),e}return Ge(t),null;case 22:case 23:return Kt(t),ff(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),n=t.updateQueue,n!==null&&Zu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&ft(Cs),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),aa(We),Ge(t),null;case 25:return null;case 30:return t.flags|=33554432,Ge(t),null}throw Error(c(156,t.tag))}function jS(e,t){switch($o(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return aa(We),cl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wc(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(c(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hf(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return cl(),null;case 10:return aa(t.type),null;case 22:case 23:return Kt(t),ff(),e!==null&&ft(Cs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return aa(We),null;case 25:return null;default:return null}}function uy(e,t){switch($o(t),t.tag){case 3:aa(We),cl();break;case 26:case 27:case 5:Wc(t);break;case 4:cl();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:hf(t);break;case 10:aa(t.type);break;case 22:case 23:Kt(t),ff(),e!==null&&ft(Cs);break;case 24:aa(We)}}function nc(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;do{if((n.tag&e)===e){l=void 0;var o=n.create,v=n.inst;l=o(),v.destroy=l}n=n.next}while(n!==u)}}catch(N){qe(t,t.return,N)}}function Da(e,t,n){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var o=u.next;l=o;do{if((l.tag&e)===e){var v=l.inst,N=v.destroy;if(N!==void 0){v.destroy=void 0,u=t;var w=n,z=N;try{z()}catch(B){qe(u,w,B)}}}l=l.next}while(l!==o)}}catch(B){qe(t,t.return,B)}}function ry(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Pp(t,n)}catch(l){qe(e,e.return,l)}}}function oy(e,t,n){n.props=Ds(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){qe(e,t,l)}}function On(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var u=e.stateNode,o=Pn(e.memoizedProps,u);(u.ref===null||u.ref.name!==o)&&(u.ref=y0(o)),l=u.ref;break;case 7:if(e.stateNode===null){var v=new Jt(e);g(e.child,!1,dj,v,void 0,void 0),e.stateNode=v}l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(N){qe(e,t,N)}}function gt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){qe(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){qe(e,t,u)}else n.current=null}function Fu(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)N0(e.stateNode,t[n])}function fy(e){for(var t=e.return;t!==null&&(Gf(t)&&N0(e.stateNode,t.stateNode),!If(t));)t=t.return}function ac(e){for(var t=e.return;t!==null&&(Gf(t)&&hj(e.stateNode,t.stateNode),!If(t));)t=t.return}function If(e){return e.tag===5||e.tag===3||e.tag===27}function Gf(e){return e&&e.tag===7&&e.stateNode!==null}function Vf(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(u){qe(e,e.return,u)}}function Kf(e,t,n){try{var l=e.stateNode;ZS(l,e.type,n,t),l[Mt]=t}catch(u){qe(e,e.return,u)}}function dy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function Xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dy(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&&ka(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 Zf(e,t,n,l){var u=e.tag;if(u===5||u===6)u=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(u,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(u),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cn)),Fu(e,l),De=!0;else if(u!==4&&(u===27&&(Fu(e,l),l=null,ka(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Zf(e,t,n,l),e=e.sibling;e!==null;)Zf(e,t,n,l),e=e.sibling}function $u(e,t,n,l){var u=e.tag;if(u===5||u===6)u=e.stateNode,t?n.insertBefore(u,t):n.appendChild(u),Fu(e,l),De=!0;else if(u!==4&&(u===27&&(Fu(e,l),l=null,ka(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for($u(e,t,n,l),e=e.sibling;e!==null;)$u(e,t,n,l),e=e.sibling}function hy(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);yt(t,l,n),t[dt]=e,t[Mt]=n}catch(o){qe(e,e.return,o)}}var Ju=!1,Xt=null;function my(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Ju=!0)}var Mn=null;function py(){var e=Mn;return Mn=null,e}var zt=0;function Ol(e,t,n,l,u){return zt=0,gy(e.child,t,n,l,u)}function gy(e,t,n,l,u){for(var o=!1;e!==null;){if(e.tag===5){var v=e.stateNode;if(l!==null){var N=Od(v);l.push(N),N.view&&(o=!0)}else o||Od(v).view&&(o=!0);Ju=!0,p0(v,zt===0?t:t+"_"+zt,n),zt++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&u||gy(e.child,t,n,l,u)&&(o=!0));e=e.sibling}return o}function Dn(e,t){for(;e!==null;)e.tag===5?g0(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Dn(e.child,t)),e=e.sibling}function Pu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Pu(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(c(544));var n=t.name;t=Wn(t.default,t.share),t!=="none"&&(Ol(e,n,t,null,!1)||Dn(e.child,!1))}e=e.sibling}}function Ff(e,t){if(e.tag===30){var n=e.stateNode,l=e.memoizedProps,u=Pn(l,n),o=Wn(l.default,n.paired?l.share:l.enter);o!=="none"?Ol(e,u,o,null,!1)?(Pu(e),n.paired||t||Hl(e,l.onEnter)):Dn(e.child,!1):Pu(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Ff(e,t),e=e.sibling;else Pu(e)}function $f(e){if(Xt!==null&&Xt.size!==0){var t=Xt;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,l=n.name;if(l!=null&&l!=="auto"){var u=t.get(l);if(u!==void 0){var o=Wn(n.default,n.share);if(o!=="none"&&(Ol(e,l,o,null,!1)?(o=e.stateNode,u.paired=o,o.paired=u,Hl(e,n.onShare)):Dn(e.child,!1)),t.delete(l),t.size===0)break}}}$f(e)}e=e.sibling}}}function Jf(e){if(e.tag===30){var t=e.memoizedProps,n=Pn(t,e.stateNode),l=Xt!==null?Xt.get(n):void 0,u=Wn(t.default,l!==void 0?t.share:t.exit);u!=="none"&&(Ol(e,n,u,null,!1)?l!==void 0?(u=e.stateNode,l.paired=u,u.paired=l,Xt.delete(n),Hl(e,t.onShare)):Hl(e,t.onExit):Dn(e.child,!1)),Xt!==null&&$f(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Jf(e),e=e.sibling;else Xt!==null&&$f(e)}function yy(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Pn(t,e.stateNode);t=Wn(t.default,t.update),e.flags&=-5,t!=="none"&&Ol(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&yy(e);e=e.sibling}}function Pf(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Dn(e.child,!1))}Pf(e)}e=e.sibling}}function Wu(e){if(e.tag===30)e.stateNode.paired=null,Dn(e.child,!1),Pf(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Wu(e),e=e.sibling;else Pf(e)}function vy(e){for(e=e.child;e!==null;)e.tag===30?Dn(e.child,!1):(e.subtreeFlags&33554432)!==0&&vy(e),e=e.sibling}function Wf(e,t,n,l,u,o,v){for(var N=!1;t!==null;){if(t.tag===5){var w=t.stateNode;if(o!==null&&zt<o.length){var z=o[zt],B=Od(w);(z.view||B.view)&&(N=!0);var G;if(G=(e.flags&4)===0)if(B.clip)G=!0;else{G=z.rect;var M=B.rect;G=G.y!==M.y||G.x!==M.x||G.height!==M.height||G.width!==M.width}G&&(e.flags|=4),B.abs?B=!z.abs:(z=z.rect,B=B.rect,B=z.height!==B.height||z.width!==B.width),B&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&p0(w,zt===0?n:n+"_"+zt,u),N&&(e.flags&4)!==0||(Mn===null&&(Mn=[]),Mn.push(w,zt===0?l:l+"_"+zt,t.memoizedProps)),zt++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&v?e.flags|=t.flags&32:Wf(e,t.child,n,l,u,o,v)&&(N=!0));t=t.sibling}return N}function by(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,l=e.stateNode,u=Pn(n,l),o=Wn(n.default,n.update),v;v=e.memoizedState,e.memoizedState=null,l=e;var N=e.child;zt=0,u=Wf(l,N,u,u,o,v,!1),(e.flags&4)!==0&&u&&Hl(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&by(e);e=e.sibling}}var ut=!1,Le=!1,zn=!1,ed=!1,xy=typeof WeakSet=="function"?WeakSet:Set,rt=null,Un=!1,sc=!1,er=!1,td=!1;function NS(e,t,n){if(e=e.containerInfo,wd=Fl,e=Tp(e),ko(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var o=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var N=0,w=-1,z=-1,B=0,G=0,M=e,L=null;t:for(;;){for(var P;M!==l||o!==0&&M.nodeType!==3||(w=N+o),M!==v||u!==0&&M.nodeType!==3||(z=N+u),M.nodeType===3&&(N+=M.nodeValue.length),(P=M.firstChild)!==null;)L=M,M=P;for(;;){if(M===e)break t;if(L===l&&++B===o&&(w=N),L===v&&++G===u&&(z=N),(P=M.nextSibling)!==null)break;M=L,L=M.parentNode}M=P}l=w===-1||z===-1?null:{start:w,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(_d={focusedElem:e,selectionRange:l},Fl=!1,n=(n&335544064)===n,rt=t,t=n?9270:1024;rt!==null;){if(e=rt,n&&(l=e.deletions,l!==null))for(o=0;o<l.length;o++)n&&Jf(l[o]);if(e.alternate===null&&(e.flags&2)!==0)n&&my(e),tr(n);else{if(e.tag===22){if(l=e.alternate,e.memoizedState!==null){l!==null&&l.memoizedState===null&&n&&Jf(l),tr(n);continue}else if(l!==null&&l.memoizedState!==null){n&&my(e),tr(n);continue}}l=e.child,(e.subtreeFlags&t)!==0&&l!==null?(l.return=e,rt=l):(n&&yy(e),tr(n))}}Xt=null}function tr(e){for(;rt!==null;){var t=rt,n=e,l=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((u&1024)!==0&&l!==null){n=void 0,u=l.memoizedProps,l=l.memoizedState;var o=t.stateNode;try{var v=Ds(t.type,u);n=o.getSnapshotBeforeUpdate(v,l),o.__reactInternalSnapshotBeforeUpdate=n}catch(N){qe(t,t.return,N)}}break;case 3:if((u&1024)!==0){if(l=t.stateNode.containerInfo,n=l.nodeType,n===9)zd(l);else if(n===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":zd(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&l!==null&&(n=Pn(l.memoizedProps,l.stateNode),u=t.memoizedProps,u=Wn(u.default,u.update),u!=="none"&&Ol(l,n,u,l.memoizedState=[],!0));break;default:if((u&1024)!==0)throw Error(c(163))}if(l=t.sibling,l!==null){l.return=t.return,rt=l;break}rt=t.return}}function Sy(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:Ln(e,n),l&4&&nc(5,n);break;case 1:if(Ln(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(v){qe(n,n.return,v)}else{var u=Ds(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){qe(n,n.return,v)}}l&64&&ry(n),l&512&&On(n,n.return);break;case 3:if(Ln(e,n),l&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{Pp(e,t)}catch(v){qe(n,n.return,v)}}break;case 27:t===null&&l&4&&hy(n);case 26:case 5:Ln(e,n),t===null&&l&4&&Vf(n),l&512&&On(n,n.return);break;case 12:Ln(e,n);break;case 31:Ln(e,n),l&4&&Ey(e,n);break;case 13:Ln(e,n),l&4&&wy(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=US.bind(null,n),gj(e,n))));break;case 22:if(l=n.memoizedState!==null||ut,!l){var o=t!==null&&t.memoizedState!==null||Le;t=ut,u=Le,ut=l,(Le=o)&&!u?(l=2,(n.subtreeFlags&8772)!==0&&(l|=1),yn(e,n,l)):Ln(e,n),ut=t,Le=u}break;case 30:Ln(e,n),l&512&&On(n,n.return);break;case 7:l&512&&On(n,n.return);default:Ln(e,n)}}function nd(e,t){for(e=e.child;e!==null;)jy(e,t),e=e.sibling}function jy(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var l=n.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var u=e.stateNode,o=e.memoizedProps.style,v=o!=null&&o.hasOwnProperty("display")?o.display:null;u.style.display=v==null||typeof v=="boolean"?"":(""+v).trim()}}catch(w){qe(e,e.return,w)}ad(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,De=!0}catch(w){qe(e,e.return,w)}break;case 18:try{var N=e.stateNode;t?m0(N,!0):m0(e.stateNode,!1)}catch(w){qe(e,e.return,w)}break;case 22:case 23:e.memoizedState===null&&nd(e,t);break;default:nd(e,t)}}function ad(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,l=t;switch(n.tag){case 4:jy(n,l);break e;case 22:n.memoizedState===null&&ad(n,l);break e;default:ad(n,l)}}e=e.sibling}}function Ny(e){var t=e.alternate;t!==null&&(e.alternate=null,Ny(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&iu(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 Ve=null,Ut=!1;function pn(e,t,n){for(n=n.child;n!==null;)Ty(e,t,n),n=n.sibling}function Ty(e,t,n){if(Yt&&typeof Yt.onCommitFiberUnmount=="function")try{Yt.onCommitFiberUnmount(_i,n)}catch{}switch(n.tag){case 26:Le||gt(n,t),pn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Le&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Le||gt(n,t),ac(n);var l=Ve,u=Ut;ka(n.type)&&(Ve=n.stateNode,Ut=!1),pn(e,t,n),C0(n.stateNode,n.type,n.memoizedProps),Ve=l,Ut=u;break;case 5:Le||gt(n,t),ac(n);case 6:if(n.tag===6&&ac(n),l=Ve,u=Ut,Ve=null,pn(e,t,n),Ve=l,Ut=u,Ve!==null)if(Ut)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(n.stateNode),De=!0}catch(o){qe(n,t,o)}else try{Ve.removeChild(n.stateNode),De=!0}catch(o){qe(n,t,o)}break;case 18:Ve!==null&&(Ut?(e=Ve,h0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),$l(e)):h0(Ve,n.stateNode));break;case 4:l=Ve,u=Ut,Ve=n.stateNode.containerInfo,Ut=!0,pn(e,t,n),Ve=l,Ut=u;break;case 0:case 11:case 14:case 15:Da(2,n,t),Le||Da(4,n,t),pn(e,t,n);break;case 1:Le||(gt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&oy(n,t,l)),pn(e,t,n);break;case 21:pn(e,t,n);break;case 22:Le=(l=Le)||n.memoizedState!==null,pn(e,t,n),Le=l;break;case 30:gt(n,t),pn(e,t,n);break;case 7:Le||gt(n,t),pn(e,t,n);break;default:pn(e,t,n)}}function Ey(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$l(e)}catch(n){qe(t,t.return,n)}}}function wy(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$l(e)}catch(n){qe(t,t.return,n)}}function TS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xy),t;default:throw Error(c(435,e.tag))}}function nr(e,t){var n=TS(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var u=LS.bind(null,e,l);l.then(u,u)}})}function Et(e,t,n){var l=t.deletions;if(l!==null)for(var u=0;u<l.length;u++){var o=l[u],v=e,N=t,w=N;e:for(;w!==null;){switch(w.tag){case 27:if(ka(w.type)){Ve=w.stateNode,Ut=!1;break e}break;case 5:Ve=w.stateNode,Ut=!1;break e;case 3:case 4:Ve=w.stateNode.containerInfo,Ut=!0;break e}w=w.return}if(Ve===null)throw Error(c(160));Ty(v,N,o),Ve=null,Ut=!1,v=o.alternate,v!==null&&(v.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_y(t,e,n),t=t.sibling}var gn=null;function _y(e,t,n){var l=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(u&4&&(l=e.updateQueue,l=l!==null?l.events:null,l!==null))for(var o=0;o<l.length;o++){var v=l[o];v.ref.impl=v.nextImpl}Et(t,e,n),wt(e),u&4&&(Da(3,e,e.return),nc(3,e),Da(5,e,e.return));break;case 1:Et(t,e,n),wt(e),u&512&&(Le||l===null||gt(l,l.return)),u&64&&ut&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=gn,Et(t,e,n),wt(e),u&512&&(Le||l===null||gt(l,l.return)),u&4)if(u=l!==null?l.memoizedState:null,n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null)if(ut)e.stateNode=o0(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,u=o.ownerDocument||o;t:switch(t){case"title":l=u.getElementsByTagName("title")[0],(!l||l[Ai]||l[dt]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=u.createElement(t),u.head.insertBefore(l,u.querySelector("head > title"))),yt(l,t,n),l[dt]=e,it(l),t=l;break e;case"link":if(o=z0("link","href",u).get(t+(n.href||""))){for(v=0;v<o.length;v++)if(l=o[v],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(v,1);break t}}l=u.createElement(t),yt(l,t,n),u.head.appendChild(l);break;case"meta":if(o=z0("meta","content",u).get(t+(n.content||""))){for(v=0;v<o.length;v++)if(l=o[v],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(v,1);break t}}l=u.createElement(t),yt(l,t,n),u.head.appendChild(l);break;default:throw Error(c(468,t))}l[dt]=e,it(l),t=l}e.stateNode=t}else ut||Qd(o,e.type,e.stateNode);else e.stateNode=D0(o,n,e.memoizedProps);else u!==n?(u===null?(t=l.stateNode,t===null||Le||t.parentNode.removeChild(t)):u.count--,n===null?ut||Qd(o,e.type,e.stateNode):D0(o,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Kf(e,e.memoizedProps,l.memoizedProps);break;case 27:Et(t,e,n),wt(e),u&512&&(Le||l===null||gt(l,l.return)),l!==null&&u&4&&Kf(e,e.memoizedProps,l.memoizedProps);break;case 5:if(o=zn,zn=!1,Et(t,e,n),zn=o,wt(e),u&512&&(Le||l===null||gt(l,l.return)),e.flags&32){t=e.stateNode;try{hl(t,""),De=!0}catch(B){qe(e,e.return,B)}}u&4&&e.stateNode!=null&&(t=e.memoizedProps,Kf(e,t,l!==null?l.memoizedProps:t)),u&1024&&(ed=!0);break;case 6:if(Et(t,e,n),wt(e),u&4){if(e.stateNode===null)throw Error(c(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,De=!0}catch(B){qe(e,e.return,B)}}break;case 3:if(De=!1,yr=null,o=gn,gn=hc(t.containerInfo),Et(t,e,n),gn=o,wt(e),u&4&&l!==null&&l.memoizedState.isDehydrated)try{$l(t.containerInfo)}catch(B){qe(e,e.return,B)}ed&&(ed=!1,Cy(e)),De=!1;break;case 4:u=zn,zn=ut,l=Zm(),o=gn,gn=hc(e.stateNode.containerInfo),Et(t,e,n),wt(e),gn=o,De&&sc&&(er=!0),De=l,zn=u;break;case 12:Et(t,e,n),wt(e);break;case 31:Et(t,e,n),wt(e),u&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,nr(e,t)));break;case 13:Et(t,e,n),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(lr=Qt()),u&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,nr(e,t)));break;case 22:o=e.memoizedState!==null,v=l!==null&&l.memoizedState!==null;var N=ut,w=Le,z=zn;ut=N||o,zn=z||o,Le=w||v,Et(t,e,n),Le=w,zn=z,ut=N,wt(e),u&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||l===null||v||ut||Le||(t=v||Le,n=ut,l=Le,ut=o||ut,Le=t,za(e,2),ut=n,Le=l),!o&&zn||nd(e,o)),u&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,nr(e,n))));break;case 19:Et(t,e,n),wt(e),u&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,nr(e,t)));break;case 30:u&512&&(Le||l===null||gt(l,l.return)),u=Zm(),o=sc,v=(n&335544064)===n,N=e.memoizedProps,sc=v&&Wn(N.default,N.update)!=="none",Et(t,e,n),wt(e),v&&l!==null&&De&&(e.flags|=4),sc=o,De=u;break;case 21:break;case 7:u&512&&(Le||l===null||gt(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=e);default:Et(t,e,n),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(dy(l)){n=l;break}l=l.return}l=null;for(var u=e.return;u!==null;){if(Gf(u)){var o=u.stateNode;l===null?l=[o]:l.push(o)}if(If(u))break;u=u.return}var v=l;if(n==null)throw Error(c(160));switch(n.tag){case 27:var N=n.stateNode,w=Xf(e);$u(e,w,N,v);break;case 5:var z=n.stateNode;n.flags&32&&(hl(z,""),n.flags&=-33);var B=Xf(e);$u(e,B,z,v);break;case 3:case 4:var G=n.stateNode.containerInfo,M=Xf(e);Zf(e,M,G,v);break;default:throw Error(c(161))}}catch(L){qe(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cy(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cy(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Fl=!0,t.reset(),Fl=!1),e=e.sibling}}function Ml(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Ry(t,e),t=t.sibling;else by(t)}function Ry(e,t){var n=e.alternate;if(n===null)Ff(e,!1);else switch(e.tag){case 3:if(td=Un=!1,py(),Ml(t,e),!Un&&!er){if(e=Mn,e!==null)for(var l=0;l<e.length;l+=3){n=e[l];var u=e[l+1];g0(n,e[l+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+u+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),td=!0}Mn=null;break;case 5:Ml(t,e);break;case 4:l=Un,Un=!1,Ml(t,e),Un&&(er=!0),Un=l;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Ff(e,!1):Ml(t,e));break;case 30:l=Un,u=py(),Un=!1,Ml(t,e),Un&&(e.flags|=4);var o=e.memoizedProps,v=e.stateNode;t=Pn(o,v),v=Pn(n.memoizedProps,v);var N=Wn(o.default,o.update);N==="none"?t=!1:(o=n.memoizedState,n.memoizedState=null,n=e.child,zt=0,t=Wf(e,n,t,v,N,o,!0),zt!==(o===null?0:o.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Hl(e,e.memoizedProps.onUpdate),Mn=u):u!==null&&(u.push.apply(u,Mn),Mn=u),Un=(e.flags&32)!==0?!0:l;break;default:Ml(t,e)}}function Ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sy(e,t.alternate,t),t=t.sibling}function za(e,t){for(e=e.child;e!==null;){var n=e,l=t;switch(n.tag){case 0:case 11:case 14:case 15:Da(4,n,n.return),za(n,l);break;case 1:gt(n,n.return);var u=n.stateNode;typeof u.componentWillUnmount=="function"&&oy(n,n.return,u),za(n,l);break;case 27:(l&2)!==0&&C0(n.stateNode,n.type,n.memoizedProps);case 5:gt(n,n.return),n.tag!==5&&n.tag!==27||ac(n),za(n,l);break;case 6:ac(n);break;case 26:gt(n,n.return),u=n.stateNode,n.memoizedState!==null||u===null||Le||u.parentNode.removeChild(u),za(n,l);break;case 22:n.memoizedState===null&&za(n,l);break;case 30:gt(n,n.return),za(n,l);break;case 7:gt(n,n.return);default:za(n,l)}e=e.sibling}}function yn(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var l=t.alternate,u=e,o=t,v=o.flags,N=(n&1)!==0;switch(o.tag){case 0:case 11:case 15:yn(u,o,n),nc(4,o);break;case 1:if(yn(u,o,n),l=o,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(B){qe(l,l.return,B)}if(l=o,u=l.updateQueue,u!==null){var w=l.stateNode;try{var z=u.shared.hiddenCallbacks;if(z!==null)for(u.shared.hiddenCallbacks=null,u=0;u<z.length;u++)Jp(z[u],w)}catch(B){qe(l,l.return,B)}}N&&v&64&&ry(o),On(o,o.return);break;case 27:(n&2)!==0&&hy(o);case 5:o.tag!==5&&o.tag!==27||fy(o),yn(u,o,n),N&&l===null&&v&4&&Vf(o),On(o,o.return);break;case 6:fy(o);break;case 26:w=o.stateNode,o.memoizedState!==null||w===null||ut||Qd(hc(w.ownerDocument),o.type,w),yn(u,o,n),N&&l===null&&v&4&&Vf(o),On(o,o.return);break;case 12:yn(u,o,n);break;case 31:yn(u,o,n),N&&v&4&&Ey(u,o);break;case 13:yn(u,o,n),N&&v&4&&wy(u,o);break;case 22:o.memoizedState===null&&yn(u,o,n),On(o,o.return);break;case 30:yn(u,o,n),On(o,o.return);break;case 7:On(o,o.return);default:yn(u,o,n)}t=t.sibling}}function sd(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&&Ii(n))}function ld(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ii(e))}function on(e,t,n,l){var u=(n&335544064)===n;if(t.subtreeFlags&(u?10262:10256))for(t=t.child;t!==null;)Ay(e,t,n,l),t=t.sibling;else u&&vy(t)}function Ay(e,t,n,l){var u=(n&335544064)===n;u&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Wu(t);var o=t.flags;switch(t.tag){case 0:case 11:case 15:on(e,t,n,l),o&2048&&nc(9,t);break;case 1:on(e,t,n,l);break;case 3:on(e,t,n,l),u&&td&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),o&2048&&(o=null,t.alternate!==null&&(o=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==o&&(t.refCount++,o!=null&&Ii(o)));break;case 12:if(o&2048){on(e,t,n,l),o=t.stateNode;try{var v=t.memoizedProps,N=v.id,w=v.onPostCommit;typeof w=="function"&&w(N,t.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(z){qe(t,t.return,z)}}else on(e,t,n,l);break;case 31:on(e,t,n,l);break;case 13:on(e,t,n,l);break;case 23:break;case 22:v=t.stateNode,N=t.alternate,t.memoizedState!==null?(u&&N!==null&&N.memoizedState===null&&Wu(N),v._visibility&2?on(e,t,n,l):lc(e,t)):(u&&N!==null&&N.memoizedState!==null&&Wu(t),v._visibility&2?on(e,t,n,l):(v._visibility|=2,Dl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1))),o&2048&&sd(N,t);break;case 24:on(e,t,n,l),o&2048&&ld(t.alternate,t);break;case 30:u&&(o=t.alternate,o!==null&&(Dn(o.child,!0),Dn(t.child,!0))),on(e,t,n,l);break;default:on(e,t,n,l)}}function Dl(e,t,n,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,v=t,N=n,w=l,z=v.flags;switch(v.tag){case 0:case 11:case 15:Dl(o,v,N,w,u),nc(8,v);break;case 23:break;case 22:var B=v.stateNode;v.memoizedState!==null?B._visibility&2?Dl(o,v,N,w,u):lc(o,v):(B._visibility|=2,Dl(o,v,N,w,u)),u&&z&2048&&sd(v.alternate,v);break;case 24:Dl(o,v,N,w,u),u&&z&2048&&ld(v.alternate,v);break;default:Dl(o,v,N,w,u)}t=t.sibling}}function lc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,u=l.flags;switch(l.tag){case 22:lc(n,l),u&2048&&sd(l.alternate,l);break;case 24:lc(n,l),u&2048&&ld(l.alternate,l);break;default:lc(n,l)}t=t.sibling}}var zs=8192;function Us(e,t,n){if(e.subtreeFlags&zs)for(e=e.child;e!==null;)Oy(e,t,n),e=e.sibling}function Oy(e,t,n){switch(e.tag){case 26:Us(e,t,n),e.flags&zs&&(e.memoizedState!==null?Aj(n,gn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&q0(n,e)));break;case 5:Us(e,t,n),e.flags&zs&&(e=e.stateNode,(t&335544128)===t&&q0(n,e));break;case 3:case 4:var l=gn;gn=hc(e.stateNode.containerInfo),Us(e,t,n),gn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zs,zs=16777216,Us(e,t,n),zs=l):Us(e,t,n));break;case 30:if((e.flags&zs)!==0&&(l=e.memoizedProps.name,l!=null&&l!=="auto")){var u=e.stateNode;u.paired=null,Xt===null&&(Xt=new Map),Xt.set(l,u)}Us(e,t,n);break;default:Us(e,t,n)}}function My(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 ic(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];rt=l,zy(l,e)}My(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dy(e),e=e.sibling}function Dy(e){switch(e.tag){case 0:case 11:case 15:ic(e),e.flags&2048&&Da(9,e,e.return);break;case 3:ic(e);break;case 12:ic(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ar(e)):ic(e);break;default:ic(e)}}function ar(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];rt=l,zy(l,e)}My(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Da(8,t,t.return),ar(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ar(t));break;default:ar(t)}e=e.sibling}}function zy(e,t){for(;rt!==null;){var n=rt;switch(n.tag){case 0:case 11:case 15:Da(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ii(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,rt=l;else e:for(n=e;rt!==null;){l=rt;var u=l.sibling,o=l.return;if(Ny(l),l===n){rt=null;break e}if(u!==null){u.return=o,rt=u;break e}rt=o}}}var ES={getCacheForType:function(e){var t=ht(We),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ht(We).controller.signal}},wS=typeof WeakMap=="function"?WeakMap:Map,ze=0,Qe=null,je=null,Te=0,Be=0,Zt=null,Ua=!1,zl=!1,id=!1,ua=0,$e=0,La=0,Ls=0,sr=0,Ft=0,Ul=0,cc=null,Lt=null,cd=!1,lr=0,Uy=0,ir=1/0,cr=null,Ba=null,Xe=0,vn=null,Bs=null,Bn=0,ud=0,rd=null,Ly=null,Ll=null,Bl=null,ql=null,uc=0,ur=null;function $t(){return(ze&2)!==0&&Te!==0?Te&-Te:ae.T!==null?bd():Hm()}function By(){if(Ft===0)if((Te&536870912)===0||Se){var e=nu;nu<<=1,(nu&3932160)===0&&(nu=262144),Ft=e}else Ft=536870912;return e=mt.current,e!==null&&(e.flags|=32),Ft}function Hl(e,t){if(t!=null){var n=e.stateNode,l=n.ref;l===null&&(l=n.ref=y0(Pn(e.memoizedProps,n))),Bl===null&&(Bl=[]),Bl.push(t.bind(null,l))}}function Bt(e,t,n){(e===Qe&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(kl(e,0),qa(e,Te,Ft,!1)),Ri(e,n),((ze&2)===0||e!==Qe)&&(e===Qe&&((ze&2)===0&&(Ls|=n),$e===4&&qa(e,Te,Ft,!1)),qn(e))}function qy(e,t,n){if((ze&6)!==0)throw Error(c(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ci(e,t),u=l?RS(e,t):fd(e,t,!0),o=l;do{if(u===0){zl&&!l&&qa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_S(n)){u=fd(e,t,!1),o=!1;continue}if(u===2){if(o=t,e.errorRecoveryDisabledLanes&o)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var N=e;u=cc;var w=N.current.memoizedState.isDehydrated;if(w&&(kl(N,v).flags|=256),v=fd(N,v,!1),v!==2&&v!==6){if(id&&!w){N.errorRecoveryDisabledLanes|=o,Ls|=o,u=4;break e}o=Lt,Lt=u,o!==null&&(Lt===null?Lt=o:Lt.push.apply(Lt,o))}u=v}if(o=!1,u!==2)continue}}if(u===1){kl(e,0),qa(e,t,0,!0);break}e:{switch(l=e,o=u,o){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:qa(l,t,Ft,!Ua);break e;case 2:Lt=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=lr+300-Qt(),10<u)){if(qa(l,t,Ft,!Ua),su(l,0,!0)!==0)break e;Bn=t,l.timeoutHandle=Ad(Hy.bind(null,l,n,Lt,cr,cd,t,Ft,Ls,Ul,Ua,o,"Throttled",-0,0),u);break e}Hy(l,n,Lt,cr,cd,t,Ft,Ls,Ul,Ua,o,null,-0,0)}}break}while(!0);qn(e)}function Hy(e,t,n,l,u,o,v,N,w,z,B,G,M,L){e.timeoutHandle=-1;var P=t.subtreeFlags,ne=(o&335544064)===o;if(G=null,(ne||P&8192||(P&16785408)===16785408)&&(G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},Xt=null,Oy(t,o,G),ne&&(P=G,ne=e.containerInfo,ne=(ne.nodeType===9?ne:ne.ownerDocument).__reactViewTransition,ne!=null&&(P.count++,P.waitingForViewTransition=!0,P=gc.bind(P),ne.finished.then(P,P))),P=(o&62914560)===o?lr-Qt():(o&4194048)===o?Uy-Qt():0,P=Oj(G,P),P!==null)){Bn=o,e.cancelPendingCommit=P(Xy.bind(null,e,t,o,n,l,u,v,N,w,z,B,G,null,M,L)),qa(e,o,v,!z);return}Xy(e,t,o,n,l,u,v,N,w,z,B,G)}function _S(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 l=0;l<n.length;l++){var u=n[l],o=u.getSnapshot;u=u.value;try{if(!Vt(o(),u))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 qa(e,t,n,l){t=zm(e,t),t&=~sr,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var o=31-It(u),v=1<<o;l[o]=-1,u&=~v}n!==0&&Lm(e,n,t)}function rr(){return(ze&6)===0?(rc(0),!1):!0}function od(){if(je!==null){if(Be===0)var e=je.return;else e=je,na=Ts=null,vf(e),wl=null,Ki=0,e=je;for(;e!==null;)uy(e.alternate,e),e=e.return;je=null}}function kl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,JS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Bn=0,od(),Qe=e,je=n=ea(e.current,null),Te=t,Be=0,Zt=null,Ua=!1,zl=Ci(e,t),id=!1,Ul=Ft=sr=Ls=La=$e=0,Lt=cc=null,cd=!1,ua=zm(e,t),yu(),n}function ky(e,t){ye=null,ae.H=Yu,t===El||t===Cu?(t=Xp(),Be=3):t===sf?(t=Xp(),Be=4):Be=t===Df?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Zt=t,je===null&&($e=1,Iu(e,ln(t,e.current)))}function Qy(){var e=mt.current;return e===null?!0:(Te&4194048)===Te?bt===null:(Te&62914560)===Te||(Te&536870912)!==0?e===bt:!1}function Yy(){var e=ae.H;return ae.H=Yu,e===null?Yu:e}function Iy(){var e=ae.A;return ae.A=ES,e}function or(){$e=4,Ua||(Te&4194048)!==Te&&mt.current!==null||(zl=!0),(La&134217727)===0&&(Ls&134217727)===0||Qe===null||qa(Qe,Te,Ft,!1)}function fd(e,t,n){var l=ze;ze|=2;var u=Yy(),o=Iy();(Qe!==e||Te!==t)&&(cr=null,kl(e,t)),t=!1;var v=$e;e:do try{if(Be!==0&&je!==null){var N=je,w=Zt;switch(Be){case 8:od(),v=6;break e;case 3:case 2:case 9:case 6:mt.current===null&&(t=!0);var z=Be;if(Be=0,Zt=null,Ql(e,N,w,z),n&&zl){v=0;break e}break;default:z=Be,Be=0,Zt=null,Ql(e,N,w,z)}}CS(),v=$e;break}catch(B){ky(e,B)}while(!0);return t&&e.shellSuspendCounter++,na=Ts=null,ze=l,ae.H=u,ae.A=o,je===null&&(Qe=null,Te=0,yu()),v}function CS(){for(;je!==null;)Gy(je)}function RS(e,t){var n=ze;ze|=2;var l=Yy(),u=Iy();Qe!==e||Te!==t?(cr=null,ir=Qt()+500,kl(e,t)):zl=Ci(e,t);e:do try{if(Be!==0&&je!==null){t=je;var o=Zt;t:switch(Be){case 1:Be=0,Zt=null,Ql(e,t,o,1);break;case 2:case 9:if(Vp(o)){Be=0,Zt=null,Vy(t);break}t=function(){Be!==2&&Be!==9||Qe!==e||(Be=7),qn(e)},o.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Vp(o)?(Be=0,Zt=null,Vy(t)):(Be=0,Zt=null,Ql(e,t,o,7));break;case 5:var v=null;switch(je.tag){case 26:v=je.memoizedState;case 5:case 27:var N=je;if(v?L0(v):N.stateNode.complete){Be=0,Zt=null;var w=N.sibling;if(w!==null)je=w;else{var z=N.return;z!==null?(je=z,fr(z)):je=null}break t}}Be=0,Zt=null,Ql(e,t,o,5);break;case 6:Be=0,Zt=null,Ql(e,t,o,6);break;case 8:od(),$e=6;break e;default:throw Error(c(462))}}AS();break}catch(B){ky(e,B)}while(!0);return na=Ts=null,ae.H=l,ae.A=u,ze=n,je!==null?0:(Qe=null,Te=0,yu(),$e)}function AS(){for(;je!==null&&!Xx();)Gy(je)}function Gy(e){var t=iy(e.alternate,e,ua);e.memoizedProps=e.pendingProps,t===null?fr(e):je=t}function Vy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wg(n,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Wg(n,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:vf(t);var l=t;l===ct&&(Se?(Nu(l),l.tag===5&&l.stateNode!=null&&(Ie=l.stateNode)):(Nu(l),Se=!0));default:uy(n,t),t=je=zp(t,ua),t=iy(n,t,ua)}e.memoizedProps=e.pendingProps,t===null?fr(e):je=t}function Ql(e,t,n,l){na=Ts=null,vf(t),wl=null,Ki=0;var u=t.return;try{if(yS(e,u,t,n,Te)){$e=1,Iu(e,ln(n,e.current)),je=null;return}}catch(o){if(u!==null)throw je=u,o;$e=1,Iu(e,ln(n,e.current)),je=null;return}t.flags&32768?(Se||l===1?e=!0:zl||(Te&536870912)!==0?e=!1:(Ua=e=!0,(l===2||l===9||l===3||l===6)&&(l=mt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Ky(t,e)):fr(t)}function fr(e){var t=e;do{if((t.flags&32768)!==0){Ky(t,Ua);return}e=t.return;var n=SS(t.alternate,t,ua);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);$e===0&&($e=5)}function Ky(e,t){do{var n=jS(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);$e=6,je=null}function Xy(e,t,n,l,u,o,v,N,w,z,B,G){e.cancelPendingCommit=null;do dr();while(Xe!==0);if((ze&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));e===Qe&&(je=Qe=null,Te=0),Bs=t,vn=e,Bn=n,rd=u,Ly=l,OS(e,t,n,v,N,w,G)}}function OS(e,t,n,l,u,o,v){var N=t.lanes|t.childLanes;if(ud=N,N|=Vo,a1(e,n,N,l,u,o),Bl=null,(n&335544064)===n?(ql=lS(e),l=10262):(ql=null,l=10256),(t.subtreeFlags&l)!==0||(t.flags&l)!==0?(e.callbackNode=null,e.callbackPriority=0,BS(eu,function(){return pd(),null})):(e.callbackNode=null,e.callbackPriority=0),Ju=!1,l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=ae.T,ae.T=null,u=fe.p,fe.p=2,o=ze,ze|=4;try{NS(e,t,n)}finally{ze=o,fe.p=u,ae.T=l}}Xe=1,Ju?Ll=aj(v,e.containerInfo,ql,dd,hd,DS,md,pd,MS):(dd(),hd(),md())}function MS(e){if(Xe!==0){var t=vn.onRecoverableError;t(e,{componentStack:null})}}function DS(){Xe===3&&(Xe=0,Ry(Bs,vn),Xe=4)}function dd(){if(Xe===1){Xe=0;var e=vn,t=Bs,n=Bn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=ae.T,ae.T=null;var u=fe.p;fe.p=2;var o=ze;ze|=4;try{sc=er=!1,_y(t,e,n),n=_d;var v=Tp(e.containerInfo),N=n.focusedElem,w=n.selectionRange;if(v!==N&&N&&N.ownerDocument&&Np(N.ownerDocument.documentElement,N)){if(w!==null&&ko(N)){var z=w.start,B=w.end;if(B===void 0&&(B=z),"selectionStart"in N)N.selectionStart=z,N.selectionEnd=Math.min(B,N.value.length);else{var G=N.ownerDocument||document,M=G&&G.defaultView||window;if(M.getSelection){var L=M.getSelection(),P=N.textContent.length,ne=Math.min(w.start,P),ve=w.end===void 0?ne:Math.min(w.end,P);!L.extend&&ne>ve&&(v=ve,ve=ne,ne=v);var D=jp(N,ne),A=jp(N,ve);if(D&&A&&(L.rangeCount!==1||L.anchorNode!==D.node||L.anchorOffset!==D.offset||L.focusNode!==A.node||L.focusOffset!==A.offset)){var U=G.createRange();U.setStart(D.node,D.offset),L.removeAllRanges(),ne>ve?(L.addRange(U),L.extend(A.node,A.offset)):(U.setEnd(A.node,A.offset),L.addRange(U))}}}}for(G=[],L=N;L=L.parentNode;)L.nodeType===1&&G.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<G.length;N++){var I=G[N];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Fl=!!wd,_d=wd=null}finally{ze=o,fe.p=u,ae.T=l}}e.current=t,Xe=2}}function hd(){if(Xe===2){Xe=0;var e=vn,t=Bs,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ae.T,ae.T=null;var l=fe.p;fe.p=2;var u=ze;ze|=4;try{Sy(e,t.alternate,t)}finally{ze=u,fe.p=l,ae.T=n}}Xe=3}}function md(){if(Xe===4||Xe===3){Xe=0;var e=Ll;Ll=null,Zx();var t=vn,n=Bs,l=Bn,u=Ly,o=(l&335544064)===l?10262:10256;if((n.subtreeFlags&o)!==0||(n.flags&o)!==0?Xe=5:(Xe=0,Bs=vn=null,Zy(t,t.pendingLanes)),o=t.pendingLanes,o===0&&(Ba=null),jo(l),n=n.stateNode,Yt&&typeof Yt.onCommitFiberRoot=="function")try{Yt.onCommitFiberRoot(_i,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=ae.T,o=fe.p,fe.p=2,ae.T=null;try{for(var v=t.onRecoverableError,N=0;N<u.length;N++){var w=u[N];v(w.value,{componentStack:w.stack})}}finally{ae.T=n,fe.p=o}}if(u=Bl,v=ql,ql=null,u!==null&&(Bl=null,v===null&&(v=[]),e!==null))for(w=0;w<u.length;w++)n=(0,u[w])(v),n!==void 0&&e.finished.finally(n);(Bn&3)!==0&&dr(),qn(t),o=t.pendingLanes,(l&261930)!==0&&(o&42)!==0?t===ur?uc++:(uc=0,ur=t):(uc=0,ur=null),rc(0)}}function Zy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ii(t)))}function dr(){return Ll!==null&&(Ll.skipTransition(),Ll=null),dd(),hd(),md(),pd()}function pd(){if(Xe!==5)return!1;var e=vn,t=ud;ud=0;var n=jo(Bn),l=ae.T,u=fe.p;try{fe.p=32>n?32:n,ae.T=null,n=rd,rd=null;var o=vn,v=Bn;if(Xe=0,Bs=vn=null,Bn=0,(ze&6)!==0)throw Error(c(331));var N=ze;if(ze|=4,Dy(o.current),Ay(o,o.current,v,n),ze=N,rc(0,!1),Yt&&typeof Yt.onPostCommitFiberRoot=="function")try{Yt.onPostCommitFiberRoot(_i,o)}catch{}return!0}finally{fe.p=u,ae.T=l,Zy(e,t)}}function Fy(e,t,n){t=ln(n,t),t=Mf(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(Ri(e,2),qn(e))}function qe(e,t,n){if(e.tag===3)Fy(e,e,n);else for(;t!==null;){if(t.tag===3){Fy(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ba===null||!Ba.has(l))){e=ln(n,e),n=Vg(2),l=Ra(t,n,2),l!==null&&(Kg(n,l,t,e),Ri(l,2),qn(l));break}}t=t.return}}function gd(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new wS;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(n)||(id=!0,u.add(n),e=zS.bind(null,e,t,n),t.then(e,e))}function zS(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Qe===e&&(Te&n)===n&&(($e===4||$e===3&&(Te&62914560)===Te&&300>Qt()-lr)&&(ze&2)===0?kl(e,0):sr|=n,Ul===Te&&(Ul=0)),qn(e)}function $y(e,t){t===0&&(t=Um()),e=Ss(e,t),e!==null&&(Ri(e,t),qn(e))}function US(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$y(e,n)}function LS(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),$y(e,n)}function BS(e,t){return vo(e,t)}var Yl=null,Il=null,yd=!1,hr=!1,vd=!1,Ha=0;function qn(e){e!==Il&&e.next===null&&(Il===null?Yl=Il=e:Il=Il.next=e),hr=!0,yd||(yd=!0,HS())}function rc(e,t){if(!vd&&hr){vd=!0;do for(var n=!1,l=Yl;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var o=0;else{var v=l.suspendedLanes,N=l.pingedLanes;o=(1<<31-It(42|e)+1)-1,o&=u&~(v&~N),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,e0(l,o))}else o=Te,o=su(l,l===Qe?o:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(o&3)===0||Ci(l,o)||(n=!0,e0(l,o));l=l.next}while(n);vd=!1}}function qS(){Jy()}function Jy(){hr=yd=!1;var e=0;Ha!==0&&$S()&&(e=Ha);for(var t=Qt(),n=null,l=Yl;l!==null;){var u=l.next,o=Py(l,t);o===0?(l.next=null,n===null?Yl=u:n.next=u,u===null&&(Il=n)):(n=l,(e!==0||(o&3)!==0)&&(hr=!0)),l=u}Xe!==0&&Xe!==5||rc(e),Ha!==0&&(Ha=0)}function Py(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var v=31-It(o),N=1<<v,w=u[v];w===-1?((N&n)===0||(N&l)!==0)&&(u[v]=n1(N,t)):w<=t&&(e.expiredLanes|=N),o&=~N}if(t=Qe,n=Te,n=su(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&bo(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ci(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&bo(l),jo(n)){case 2:case 8:n=Mm;break;case 32:n=eu;break;case 268435456:n=Dm;break;default:n=eu}return l=Wy.bind(null,e),n=vo(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&bo(l),e.callbackPriority=2,e.callbackNode=null,2}function Wy(e,t){if(Xe!==0&&Xe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(dr()&&e.callbackNode!==n)return null;var l=Te;return l=su(e,e===Qe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(qy(e,l,t),Py(e,Qt()),e.callbackNode!=null&&e.callbackNode===n?Wy.bind(null,e):null)}function e0(e,t){if(dr())return null;qy(e,t,!0)}function HS(){PS(function(){(ze&6)!==0?vo(Om,qS):Jy()})}function bd(){if(Ha===0){var e=_s;e===0&&(e=tu,tu<<=1,(tu&261888)===0&&(tu=256)),Ha=e}return Ha}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ru(e)}function kS(e,t,n,l,u){if(t==="submit"&&n&&n.stateNode===u){var o=t0((u[Mt]||null).action),v=l.submitter;v&&(t=(t=v[Mt]||null)?t0(t.formAction):v.getAttribute("formAction"),t!==null&&(o=t,v=null));var N=new hu("action","action",null,l,u);e.push({event:N,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ha!==0){var w=new FormData(u,v);_f(n,{pending:!0,data:w,method:u.method,action:o},null,w)}}else typeof o=="function"&&(N.preventDefault(),w=new FormData(u,v),_f(n,{pending:!0,data:w,method:u.method,action:o},o,w))},currentTarget:u}]})}}for(var xd=0;xd<Go.length;xd++){var Sd=Go[xd],QS=Sd.toLowerCase(),YS=Sd[0].toUpperCase()+Sd.slice(1);mn(QS,"on"+YS)}mn(_p,"onAnimationEnd"),mn(Cp,"onAnimationIteration"),mn(Rp,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(J1,"onTransitionRun"),mn(P1,"onTransitionStart"),mn(W1,"onTransitionCancel"),mn(Ap,"onTransitionEnd"),fl("onMouseEnter",["mouseout","mouseover"]),fl("onMouseLeave",["mouseout","mouseover"]),fl("onPointerEnter",["pointerout","pointerover"]),fl("onPointerLeave",["pointerout","pointerover"]),vs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vs("onBeforeInput",["compositionend","keypress","textInput","paste"]),vs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oc="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(" "),IS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oc));function n0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],u=l.event;l=l.listeners;e:{var o=void 0;if(t)for(var v=l.length-1;0<=v;v--){var N=l[v],w=N.instance,z=N.currentTarget;if(N=N.listener,w!==o&&u.isPropagationStopped())break e;o=N,u.currentTarget=z;try{o(u)}catch(B){gu(B)}u.currentTarget=null,o=w}else for(v=0;v<l.length;v++){if(N=l[v],w=N.instance,z=N.currentTarget,N=N.listener,w!==o&&u.isPropagationStopped())break e;o=N,u.currentTarget=z;try{o(u)}catch(B){gu(B)}u.currentTarget=null,o=w}}}}function Ne(e,t){var n=t[Qm];n===void 0&&(n=t[Qm]=new Set);var l=e+"__bubble";n.has(l)||(a0(t,e,2,!1),n.add(l))}function jd(e,t,n){var l=0;t&&(l|=4),a0(n,e,l,t)}var mr="_reactListening"+Math.random().toString(36).slice(2);function Nd(e){if(!e[mr]){e[mr]=!0,Gm.forEach(function(n){n!=="selectionchange"&&(IS.has(n)||jd(n,!1,e),jd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mr]||(t[mr]=!0,jd("selectionchange",!1,t))}}function a0(e,t,n,l){switch(K0(t)){case 2:var u=Uj;break;case 8:u=Lj;break;default:u=Id}n=u.bind(null,t,n,e),u=void 0,!Ao||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function Td(e,t,n,l,u){var o=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var v=l.tag;if(v===3||v===4){var N=l.stateNode.containerInfo;if(N===u)break;if(v===4)for(v=l.return;v!==null;){var w=v.tag;if((w===3||w===4)&&v.stateNode.containerInfo===u)return;v=v.return}for(;N!==null;){if(v=ys(N),v===null)return;if(w=v.tag,w===5||w===6||w===26||w===27){l=o=v;continue e}N=N.parentNode}}l=l.return}ap(function(){var z=o,B=Co(n),G=[];e:{var M=Op.get(e);if(M!==void 0){var L=hu,P=e;switch(e){case"keypress":if(fu(n)===0)break e;case"keydown":case"keyup":L=_1;break;case"focusin":P="focus",L=zo;break;case"focusout":P="blur",L=zo;break;case"beforeblur":case"afterblur":L=zo;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":L=ip;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=p1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=M1;break;case _p:case Cp:case Rp:L=v1;break;case Ap:L=z1;break;case"scroll":case"scrollend":L=h1;break;case"wheel":L=L1;break;case"copy":case"cut":case"paste":L=x1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=up;break;case"submit":L=A1;break;case"toggle":case"beforetoggle":L=q1}var ne=(t&4)!==0,ve=!ne&&(e==="scroll"||e==="scrollend"),D=ne?M!==null?M+"Capture":null:M;ne=[];for(var A=z,U;A!==null;){var I=A;if(U=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||U===null||D===null||(I=Mi(A,D),I!=null&&ne.push(fc(A,I,U))),ve)break;A=A.return}0<ne.length&&(M=new L(M,P,null,n,B),G.push({event:M,listeners:ne}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",L&&n!==_o&&(P=n.relatedTarget||n.fromElement)&&(ys(P)||P[ul]))break e;(M||L)&&(P=B.window===B?B:(L=B.ownerDocument)?L.defaultView||L.parentWindow:window,M?(L=n.relatedTarget||n.toElement,M=z,L=L?ys(L):null,L!==null&&(ve=d(L),ne=L.tag,L!==ve||ne!==5&&ne!==27&&ne!==6)&&(L=null)):(M=null,L=z),M!==L&&(ne=ip,I="onMouseLeave",D="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(ne=up,I="onPointerLeave",D="onPointerEnter",A="pointer"),ve=M==null?P:Oi(M),U=L==null?P:Oi(L),P=new ne(I,A+"leave",M,n,B),P.target=ve,P.relatedTarget=U,I=null,ys(B)===z&&(ne=new ne(D,A+"enter",L,n,B),ne.target=U,ne.relatedTarget=ve,I=ne),ve=I,ne=M&&L?k(M,L,GS):null,M!==null&&s0(G,P,M,ne,!1),L!==null&&ve!==null&&s0(G,ve,L,ne,!0)))}e:{if(M=z?Oi(z):window,L=M.nodeName&&M.nodeName.toLowerCase(),L==="select"||L==="input"&&M.type==="file")var te=gp;else if(mp(M))if(yp)te=Z1;else{te=K1;var Ee=V1}else L=M.nodeName,!L||L.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?z&&wo(z.elementType)&&(te=gp):te=X1;if(te&&(te=te(e,z))){pp(G,te,n,B);break e}Ee&&Ee(e,M,z)}switch(Ee=z?Oi(z):window,e){case"focusin":(mp(Ee)||Ee.contentEditable==="true")&&(yl=Ee,Qo=z,ki=null);break;case"focusout":ki=Qo=yl=null;break;case"mousedown":Yo=!0;break;case"contextmenu":case"mouseup":case"dragend":Yo=!1,Ep(G,n,B);break;case"selectionchange":if($1)break;case"keydown":case"keyup":Ep(G,n,B)}var ce;if(Lo)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else gl?dp(e,n)&&(de="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(de="onCompositionStart");de&&(rp&&n.locale!=="ko"&&(gl||de!=="onCompositionStart"?de==="onCompositionEnd"&&gl&&(ce=sp()):(xa=B,Oo="value"in xa?xa.value:xa.textContent,gl=!0)),Ee=pr(z,de),0<Ee.length&&(de=new cp(de,e,null,n,B),G.push({event:de,listeners:Ee}),ce?de.data=ce:(ce=hp(n),ce!==null&&(de.data=ce)))),(ce=k1?Q1(e,n):Y1(e,n))&&(de=pr(z,"onBeforeInput"),0<de.length&&(Ee=new cp("onBeforeInput","beforeinput",null,n,B),G.push({event:Ee,listeners:de}),Ee.data=ce)),kS(G,e,z,n,B)}n0(G,t)})}function fc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function pr(e,t){for(var n=t+"Capture",l=[];e!==null;){var u=e,o=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||o===null||(u=Mi(e,n),u!=null&&l.unshift(fc(e,u,o)),u=Mi(e,t),u!=null&&l.push(fc(e,u,o))),e.tag===3)return l;e=e.return}return[]}function GS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,n,l,u){for(var o=t._reactName,v=[];n!==null&&n!==l;){var N=n,w=N.alternate,z=N.stateNode;if(N=N.tag,w!==null&&w===l)break;N!==5&&N!==26&&N!==27||z===null||(w=z,u?(z=Mi(n,o),z!=null&&v.unshift(fc(n,z,w))):u||(z=Mi(n,o),z!=null&&v.push(fc(n,z,w)))),n=n.return}v.length!==0&&e.push({event:t,listeners:v})}var VS=/\r\n?/g,KS=/\u0000|\uFFFD/g;function l0(e){return(typeof e=="string"?e:""+e).replace(VS,`
66
+ `).replace(KS,"")}function i0(e,t){return t=l0(t),l0(e)===t}function He(e,t,n,l,u,o){switch(n){case"children":if(typeof l=="string")t==="body"||t==="textarea"&&l===""||hl(e,l);else if(typeof l=="number"||typeof l=="bigint")t!=="body"&&hl(e,""+l);else return;break;case"className":uu(e,"class",l);break;case"tabIndex":uu(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":uu(e,n,l);break;case"style":tp(e,l,o);return;case"data":if(t!=="object"){uu(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ru(l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="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 o=="function"&&(n==="formAction"?(t!=="input"&&He(e,t,"name",u.name,u,null),He(e,t,"formEncType",u.formEncType,u,null),He(e,t,"formMethod",u.formMethod,u,null),He(e,t,"formTarget",u.formTarget,u,null)):(He(e,t,"encType",u.encType,u,null),He(e,t,"method",u.method,u,null),He(e,t,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ru(l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Cn);return;case"onScroll":l!=null&&Ne("scroll",e);return;case"onScrollEnd":l!=null&&Ne("scrollend",e);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(c(60));(o!=null?o.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ru(l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),cu(e,"popover",l);break;case"xlinkActuate":$n(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$n(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$n(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$n(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$n(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$n(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$n(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":cu(e,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=f1.get(n)||n,cu(e,n,l);else return}De=!0}function Ed(e,t,n,l,u,o){switch(n){case"style":tp(e,l,o);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(c(60));(o!=null?o.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof l=="string")hl(e,l);else if(typeof l=="number"||typeof l=="bigint")hl(e,""+l);else return;break;case"onScroll":l!=null&&Ne("scroll",e);return;case"onScrollEnd":l!=null&&Ne("scrollend",e);return;case"onClick":l!=null&&(e.onclick=Cn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Vm.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),o=n.slice(2,u?n.length-7:void 0),t=e[Mt]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(o,t,u),typeof l=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,l,u);break e}De=!0,n in e?e[n]=l:l===!0?e.setAttribute(n,""):cu(e,n,l)}return}De=!0}function yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var l=!1,u=!1,o;for(o in n)if(n.hasOwnProperty(o)){var v=n[o];if(v!=null)switch(o){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:He(e,t,o,v,n,null)}}u&&He(e,t,"srcSet",n.srcSet,n,null),l&&He(e,t,"src",n.src,n,null);return;case"input":Ne("invalid",e);var N=o=v=u=null,w=null,z=null;for(l in n)if(n.hasOwnProperty(l)){var B=n[l];if(B!=null)switch(l){case"name":u=B;break;case"type":v=B;break;case"checked":w=B;break;case"defaultChecked":z=B;break;case"value":o=B;break;case"defaultValue":N=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(c(137,t));break;default:He(e,t,l,B,n,null)}}Jm(e,o,N,w,z,v,u,!1);return;case"select":Ne("invalid",e),l=v=o=null;for(u in n)if(n.hasOwnProperty(u)&&(N=n[u],N!=null))switch(u){case"value":o=N;break;case"defaultValue":v=N;break;case"multiple":l=N;default:He(e,t,u,N,n,null)}t=o,n=v,e.multiple=!!l,t!=null?dl(e,!!l,t,!1):n!=null&&dl(e,!!l,n,!0);return;case"textarea":Ne("invalid",e),o=u=l=null;for(v in n)if(n.hasOwnProperty(v)&&(N=n[v],N!=null))switch(v){case"value":l=N;break;case"defaultValue":u=N;break;case"children":o=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(c(91));break;default:He(e,t,v,N,n,null)}Wm(e,l,u,o);return;case"option":for(w in n)if(n.hasOwnProperty(w)&&(l=n[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:He(e,t,w,l,n,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(l=0;l<oc.length;l++)Ne(oc[l],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(z in n)if(n.hasOwnProperty(z)&&(l=n[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:He(e,t,z,l,n,null)}return;default:if(wo(t)){for(B in n)n.hasOwnProperty(B)&&(l=n[B],l!==void 0&&Ed(e,t,B,l,n,void 0));return}}for(N in n)n.hasOwnProperty(N)&&(l=n[N],l!=null&&He(e,t,N,l,n,null))}var XS={};function ZS(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,o=null,v=null,N=null,w=null,z=null,B=null;for(L in n){var G=n[L];if(n.hasOwnProperty(L)&&G!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":w=G;default:l.hasOwnProperty(L)||He(e,t,L,null,l,G)}}for(var M in l){var L=l[M];if(G=n[M],l.hasOwnProperty(M)&&(L!=null||G!=null))switch(M){case"type":L!==G&&(De=!0),o=L;break;case"name":L!==G&&(De=!0),u=L;break;case"checked":L!==G&&(De=!0),z=L;break;case"defaultChecked":L!==G&&(De=!0),B=L;break;case"value":L!==G&&(De=!0),v=L;break;case"defaultValue":L!==G&&(De=!0),N=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(c(137,t));break;default:L!==G&&He(e,t,M,L,l,G)}}To(e,v,N,w,z,B,o,u);return;case"select":L=v=N=M=null;for(o in n)if(w=n[o],n.hasOwnProperty(o)&&w!=null)switch(o){case"value":break;case"multiple":L=w;default:l.hasOwnProperty(o)||He(e,t,o,null,l,w)}for(u in l)if(o=l[u],w=n[u],l.hasOwnProperty(u)&&(o!=null||w!=null))switch(u){case"value":o!==w&&(De=!0),M=o;break;case"defaultValue":o!==w&&(De=!0),N=o;break;case"multiple":o!==w&&(De=!0),v=o;default:o!==w&&He(e,t,u,o,l,w)}t=N,n=v,l=L,M!=null?dl(e,!!n,M,!1):!!l!=!!n&&(t!=null?dl(e,!!n,t,!0):dl(e,!!n,n?[]:"",!1));return;case"textarea":L=M=null;for(N in n)if(u=n[N],n.hasOwnProperty(N)&&u!=null&&!l.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:He(e,t,N,null,l,u)}for(v in l)if(u=l[v],o=n[v],l.hasOwnProperty(v)&&(u!=null||o!=null))switch(v){case"value":u!==o&&(De=!0),M=u;break;case"defaultValue":u!==o&&(De=!0),L=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==o&&He(e,t,v,u,l,o)}Pm(e,M,L);return;case"option":for(var P in n)if(M=n[P],n.hasOwnProperty(P)&&M!=null&&!l.hasOwnProperty(P))switch(P){case"selected":e.selected=!1;break;default:He(e,t,P,null,l,M)}for(w in l)if(M=l[w],L=n[w],l.hasOwnProperty(w)&&M!==L&&(M!=null||L!=null))switch(w){case"selected":M!==L&&(De=!0),e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:He(e,t,w,M,l,L)}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 ne in n)M=n[ne],n.hasOwnProperty(ne)&&M!=null&&!l.hasOwnProperty(ne)&&He(e,t,ne,null,l,M);for(z in l)if(M=l[z],L=n[z],l.hasOwnProperty(z)&&M!==L&&(M!=null||L!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(c(137,t));break;default:He(e,t,z,M,l,L)}return;default:if(wo(t)){for(var ve in n)M=n[ve],n.hasOwnProperty(ve)&&M!==void 0&&!l.hasOwnProperty(ve)&&Ed(e,t,ve,void 0,l,M);for(B in l)M=l[B],L=n[B],!l.hasOwnProperty(B)||M===L||M===void 0&&L===void 0||Ed(e,t,B,M,l,L);return}}for(var D in n)M=n[D],n.hasOwnProperty(D)&&M!=null&&!l.hasOwnProperty(D)&&He(e,t,D,null,l,M);for(G in l)M=l[G],L=n[G],!l.hasOwnProperty(G)||M===L||M==null&&L==null||He(e,t,G,M,l,L)}function c0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function FS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var u=n[l],o=u.transferSize,v=u.initiatorType,N=u.duration;if(o&&N&&c0(v)){for(v=0,N=u.responseEnd,l+=1;l<n.length;l++){var w=n[l],z=w.startTime;if(z>N)break;var B=w.transferSize,G=w.initiatorType;B&&c0(G)&&(w=w.responseEnd,v+=B*(w<N?1:(N-z)/(w-z)))}if(--l,t+=8*(o+v)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var wd=null,_d=null;function dc(e){return e.nodeType===9?e:e.ownerDocument}function u0(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 r0(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 o0(e,t,n,l){return n=dc(n).createElement(e),n[dt]=l,n[Mt]=t,yt(n,e,t),it(n),n}function Cd(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 Rd=null;function $S(){var e=window.event;return e&&e.type==="popstate"?e===Rd?!1:(Rd=e,!0):(Rd=null,!1)}var Ad=typeof setTimeout=="function"?setTimeout:void 0,JS=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,d0=typeof requestAnimationFrame=="function"?requestAnimationFrame:Ad,PS=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(WS)}:Ad;function WS(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function h0(e,t){var n=t,l=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(u),$l(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")qd(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,qd(n);for(var o=n.firstChild;o;){var v=o.nextSibling,N=o.nodeName;o[Ai]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=v}}else n==="body"&&qd(e.ownerDocument.body);n=u}while(n);$l(t)}function m0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function p0(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var l=1;else for(var u=l=0;u<t.length;u++){var o=t[u];0<o.width&&0<o.height&&l++}l===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function g0(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function ej(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Od(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return ej(t,n,e)}function tj(e){return e.documentElement.clientHeight}function nj(e){this.addEventListener("load",e),this.addEventListener("error",e)}function aj(e,t,n,l,u,o,v,N,w){var z=t.nodeType===9?t:t.ownerDocument;try{var B=z.startViewTransition({update:function(){var M=z.defaultView,L=M.navigation&&M.navigation.transition,P=z.fonts.status;l();var ne=[];if(P==="loaded"&&(tj(z),z.fonts.status==="loading"&&ne.push(z.fonts.ready)),P=ne.length,e!==null)for(var ve=e.suspenseyImages,D=0,A=0;A<ve.length;A++){var U=ve[A];if(!U.complete){var I=U.getBoundingClientRect();if(0<I.bottom&&0<I.right&&I.top<M.innerHeight&&I.left<M.innerWidth){if(D+=B0(U),D>vr){ne.length=P;break}U=new Promise(nj.bind(U)),ne.push(U)}}}if(0<ne.length)return M=Promise.race([Promise.all(ne),new Promise(function(te){return setTimeout(te,500)})]).then(u,u),(L?Promise.allSettled([L.finished,M]):M).then(o,o);if(u(),L)return L.finished.then(o,o);o()},types:n});z.__reactViewTransition=B;var G=[];return B.ready.then(function(){for(var M=z.documentElement.getAnimations({subtree:!0}),L=0;L<M.length;L++){var P=M[L],ne=P.effect,ve=ne.pseudoElement;if(ve!=null&&ve.startsWith("::view-transition")){G.push(P),P=ne.getKeyframes();for(var D=ve=void 0,A=!0,U=0;U<P.length;U++){var I=P[U],te=I.width;if(ve===void 0)ve=te;else if(ve!==te){A=!1;break}if(te=I.height,D===void 0)D=te;else if(D!==te){A=!1;break}delete I.width,delete I.height,I.transform==="none"&&delete I.transform}A&&ve!==void 0&&D!==void 0&&(ne.setKeyframes(P),A=getComputedStyle(ne.target,ne.pseudoElement),A.width!==ve||A.height!==D)&&(A=P[0],A.width=ve,A.height=D,A=P[P.length-1],A.width=ve,A.height=D,ne.setKeyframes(P))}}v()},function(M){z.__reactViewTransition===B&&(z.__reactViewTransition=null);try{if(typeof M=="object"&&M!==null)switch(M.name){case"InvalidStateError":(M.message==="View transition was skipped because document visibility state is hidden."||M.message==="Skipping view transition because document visibility state has become hidden."||M.message==="Skipping view transition because viewport size changed."||M.message==="Transition was aborted because of invalid state")&&(M=null)}M!==null&&w(M)}finally{l(),u(),v()}}),B.finished.finally(function(){for(var M=0;M<G.length;M++)G[M].cancel();z.__reactViewTransition===B&&(z.__reactViewTransition=null),N()}),B}catch{return l(),u(),v(),null}}function qs(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}qs.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Q({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},qs.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),l=[],u=0;u<n.length;u++){var o=n[u].effect;o!==null&&o.target===e&&o.pseudoElement===t&&l.push(n[u])}return l},qs.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function y0(e){return{name:e,group:new qs("group",e),imagePair:new qs("image-pair",e),old:new qs("old",e),new:new qs("new",e)}}function Jt(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Jt.prototype.addEventListener=function(e,t,n){var l=null,u=null;if(!(n!=null&&typeof n!="boolean"&&(l=n.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var o=this._eventListeners;if(b0(o,e,t,n)===-1){var v=this,N=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(N=function(w){v.removeEventListener(e,t,n),typeof t=="function"?t.call(this,w):t.handleEvent(w)}),l!==null&&(u=v.removeEventListener.bind(v,e,t,n),l.addEventListener("abort",u,{once:!0}),u=l.removeEventListener.bind(l,"abort",u)),l=Gl(n),o.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:N,cleanup:u}),g(this._fragmentFiber.child,!1,sj,e,N,l)}this._eventListeners=o}};function sj(e,t,n,l){return E(e).addEventListener(t,n,l),!1}Jt.prototype.removeEventListener=function(e,t,n){var l=this._eventListeners;if(l!==null&&(t=b0(l,e,t,n),t!==-1)){var u=l[t];n=u.attachedListener;var o=u.cleanup;u=Gl(u.optionsOrUseCapture),g(this._fragmentFiber.child,!1,lj,e,n,u),l.splice(t,1),o!==null&&o()}};function lj(e,t,n,l){return E(e).removeEventListener(t,n,l),!1}function Gl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function v0(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function b0(e,t,n,l){if(e.length===0)return-1;l=v0(l);for(var u=0;u<e.length;u++){var o=e[u];if(o.type===t&&o.listener===n&&v0(o.optionsOrUseCapture)===l)return u}return-1}Jt.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=E(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var l=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var u=0;u<n.length;u++){var o=n[u];l.addEventListener(o.type,o.attachedListener,Gl(o.optionsOrUseCapture))}if(t.appendChild(l),e=l.dispatchEvent(e),n)for(u=0;u<n.length;u++)o=n[u],l.removeEventListener(o.type,o.attachedListener,Gl(o.optionsOrUseCapture));return t.removeChild(l),e}return t.dispatchEvent(e)},Jt.prototype.focus=function(e){g(this._fragmentFiber.child,!0,x0,e,void 0,void 0)};function x0(e,t){return e.tag===6?!1:(e=E(e),yj(e,t))}Jt.prototype.focusLast=function(e){var t=[];g(this._fragmentFiber.child,!0,Md,t,void 0,void 0);for(var n=t.length-1;0<=n&&!x0(t[n],e);n--);};function Md(e,t){return t.push(e),!1}Jt.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=E(e),e=dc(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,ij,e,void 0,void 0))};function ij(e,t){return e.tag===6?!1:(e=E(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Jt.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,cj,e,void 0,void 0)};function cj(e,t){return e.tag===6||(e=E(e),t.observe(e)),!1}Jt.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),g(this._fragmentFiber.child,!1,uj,e,void 0,void 0);for(var n=t=0;n<bn.length;n++){var l=bn[n];l.fragmentInstance===this&&l.observer===e?e.unobserve(l.instance):bn[t++]=l}bn.length=t}};function uj(e,t){return e.tag===6||(e=E(e),t.unobserve(e)),!1}var bn=[],Dd=!1;function rj(e,t,n){bn.push({fragmentInstance:e,observer:t,instance:n}),Dd||(Dd=!0,vj(function(){Dd=!1;var l=bn;bn=[];for(var u=0;u<l.length;u++){var o=l[u];o.observer.unobserve(o.instance)}}))}Jt.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,oj,e,void 0,void 0),e};function oj(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=E(e),t.push.apply(t,e.getClientRects());return!1}Jt.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:E(t).getRootNode(e)},Jt.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];g(this._fragmentFiber.child,!1,Md,n,void 0,void 0);var l=E(t);if(n.length===0){if(n=l,S(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var u=l=n.compareDocumentPosition(e);return n===e?u=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=j(t)[1],n===null?u=Node.DOCUMENT_POSITION_PRECEDING:(e=E(n).compareDocumentPosition(e),u=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),u|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=E(n[0]),u=E(n[n.length-1]);var o=S(this._fragmentFiber)?t.parentElement:l;if(o==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=o.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,o=o.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY;var v=t.compareDocumentPosition(e),N=u.compareDocumentPosition(e),w=v&Node.DOCUMENT_POSITION_CONTAINED_BY||N&Node.DOCUMENT_POSITION_CONTAINED_BY;return N=l&&o&&v&Node.DOCUMENT_POSITION_FOLLOWING&&N&Node.DOCUMENT_POSITION_PRECEDING,t=l&&t===e||o&&u===e||w||N?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&t===e||!o&&u===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:v,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||fj(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function fj(e,t,n,l,u){var o=ys(u);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!o)e:{for(;o!==null;){if(o.tag===7&&(o===t||o.alternate===t)){n=!0;break e}o=o.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(o===null)return o=u.ownerDocument,u===o||u===o.documentElement||u===o.body;e:{for(o=t,t=b(t);o!==null;){if(!(o.tag!==5&&o.tag!==3&&o.tag!==27||o!==t&&o.alternate!==t)){o=!0;break e}o=o.return}o=!1}return o}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!o)&&!(t=o===n)&&(t=k(n,o,K),t===null?t=!1:(g(t,!0,C,o,n),o=q,q=null,t=o!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!o)&&!(t=o===l)&&(t=k(l,o,K),t===null?t=!1:(g(t,!0,H,o,l),o=q,O=q=null,t=o!==null)),t):!1}function S0(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Jt.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(c(566));var t=[];g(this._fragmentFiber.child,!1,Md,t,void 0,void 0);var n=e!==!1;if(t.length===0){var l=j(this._fragmentFiber);if(l=n?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){e=E(l),S0(e,n);return}if(l=E(l),l.nodeType!==9){if(l.nodeType===11){n="host"in l?l.host:null,n!==null&&n.scrollIntoView(e);return}l.scrollIntoView(e)}}for(l=n?t.length-1:0;l!==(n?-1:t.length);){var u=t[l];u.tag===6?(u=E(u),S0(u,n)):E(u).scrollIntoView(e),l+=n?-1:1}};function dj(e,t){return e=E(e),j0(e,t),!1}function j0(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function N0(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];e.addEventListener(u.type,u.attachedListener,Gl(u.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(o){for(var v=0,N=0;N<bn.length;N++){var w=bn[N];(w.fragmentInstance!==t||w.observer!==o||w.instance!==e)&&(bn[v++]=w)}bn.length=v,o.observe(e)}),j0(e,t))}function hj(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l];e.removeEventListener(u.type,u.attachedListener,Gl(u.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(o){typeof o.rootMargin=="string"?rj(t,o,e):o.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function zd(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":zd(n),iu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function mj(e,t,n,l){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ai])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=fn(e.nextSibling),e===null)break}return null}function pj(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=fn(e.nextSibling),e===null))return null;return e}function T0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=fn(e.nextSibling),e===null))return null;return e}function Ud(e){return e.data==="$?"||e.data==="$~"}function Ld(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function gj(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function fn(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==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Bd=null;function E0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return fn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function w0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function yj(e,t){function n(){l=!0}if(e.ownerDocument.activeElement===e)return!0;var l=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return l}function vj(e){d0(function(){d0(function(t){return e(t)})})}function _0(e,t,n){switch(t=dc(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function C0(e,t,n){for(var l in n){var u=n[l];n.hasOwnProperty(l)&&u!=null&&He(e,t,l,null,XS,u)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Cn&&(e.onclick=null),iu(e)}function qd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);iu(e)}var dn=new Map,R0=new Set;function hc(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ra=fe.d;fe.d={f:bj,r:xj,D:Sj,C:jj,L:Nj,m:Tj,X:wj,S:Ej,M:_j};function bj(){var e=ra.f(),t=rr();return e||t}function xj(e){var t=rl(e);t!==null&&t.tag===5&&t.type==="form"?Og(t):ra.r(e)}var Vl=typeof document>"u"?null:document;function A0(e,t,n){var l=Vl;if(l&&typeof t=="string"&&t){var u=an(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),R0.has(u)||(R0.add(u),e={rel:e,crossOrigin:n,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),yt(t,"link",e),it(t),l.head.appendChild(t)))}}function Sj(e){ra.D(e),A0("dns-prefetch",e,null)}function jj(e,t){ra.C(e,t),A0("preconnect",e,t)}function Nj(e,t,n){ra.L(e,t,n);var l=Vl;if(l&&e&&t){var u='link[rel="preload"][as="'+an(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+an(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+an(n.imageSizes)+'"]')):u+='[href="'+an(e)+'"]';var o=u;switch(t){case"style":o=Kl(e);break;case"script":o=Xl(e)}if(!(dn.has(o)||(e=Q({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),dn.set(o,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(mc(o))||t==="script"&&l.querySelector(pc(o))))){var v=l.createElement("link");yt(v,"link",e),t==="style"&&(v[lu]=!0,v.onload=v.onerror=function(){Im(v)}),it(v),l.head.appendChild(v)}}}function Tj(e,t){ra.m(e,t);var n=Vl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+an(l)+'"][href="'+an(e)+'"]',o=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Xl(e)}if(!dn.has(o)&&(e=Q({rel:"modulepreload",href:e},t),dn.set(o,e),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(pc(o)))return}l=n.createElement("link"),yt(l,"link",e),it(l),n.head.appendChild(l)}}}function Ej(e,t,n){ra.S(e,t,n);var l=Vl;if(l&&e){var u=ol(l).hoistableStyles,o=Kl(e);t=t||"default";var v=u.get(o);if(!v){var N={loading:0,preload:null};if(v=l.querySelector(mc(o)))N.loading=5;else{e=Q({rel:"stylesheet",href:e,"data-precedence":t},n),(n=dn.get(o))&&Hd(e,n);var w=v=l.createElement("link");it(w),yt(w,"link",e),w._p=new Promise(function(z,B){w.onload=z,w.onerror=B}),w.addEventListener("load",function(){N.loading|=1}),w.addEventListener("error",function(){N.loading|=2}),N.loading|=4,gr(v,t,l)}v={type:"stylesheet",instance:v,count:1,state:N},u.set(o,v)}}}function wj(e,t){ra.X(e,t);var n=Vl;if(n&&e){var l=ol(n).hoistableScripts,u=Xl(e),o=l.get(u);o||(o=n.querySelector(pc(u)),o||(e=Q({src:e,async:!0},t),(t=dn.get(u))&&kd(e,t),o=n.createElement("script"),it(o),yt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(u,o))}}function _j(e,t){ra.M(e,t);var n=Vl;if(n&&e){var l=ol(n).hoistableScripts,u=Xl(e),o=l.get(u);o||(o=n.querySelector(pc(u)),o||(e=Q({src:e,async:!0,type:"module"},t),(t=dn.get(u))&&kd(e,t),o=n.createElement("script"),it(o),yt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},l.set(u,o))}}function O0(e,t,n,l){var u=(u=ya.current)?hc(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Kl(n.href),t=ol(u).hoistableStyles,l=t.get(n),l||(l={type:"style",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Kl(n.href);var o=ol(u).hoistableStyles,v=o.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,v),(o=u.querySelector(mc(e)))?o._p||(v.instance=o,v.state.loading=5):(o=dn.get(e),o||(o={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},dn.set(e,o)),Cj(u,e,o,v.state))),t&&l===null)throw Error(c(528,""));return v}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Xl(n),t=ol(u).hoistableScripts,l=t.get(n),l||(l={type:"script",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Kl(e){return'href="'+an(e)+'"'}function mc(e){return'link[rel="stylesheet"]['+e+"]"}function M0(e){return Q({},e,{"data-precedence":e.precedence,precedence:null})}function Cj(e,t,n,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[lu]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[lu]=!0,t.onload=t.onerror=Im.bind(null,t),yt(t,"link",n),it(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function Xl(e){return'[src="'+an(e)+'"]'}function pc(e){return"script[async]"+e}function D0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+an(n.href)+'"]');if(l)return t.instance=l,it(l),l;var u=Q({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),it(l),yt(l,"style",u),gr(l,n.precedence,e),t.instance=l;case"stylesheet":u=Kl(n.href);var o=e.querySelector(mc(u));if(o)return t.state.loading|=4,t.instance=o,it(o),o;l=M0(n),(u=dn.get(u))&&Hd(l,u),o=(e.ownerDocument||e).createElement("link"),it(o);var v=o;return v._p=new Promise(function(N,w){v.onload=N,v.onerror=w}),yt(o,"link",l),t.state.loading|=4,gr(o,n.precedence,e),t.instance=o;case"script":return o=Xl(n.src),(u=e.querySelector(pc(o)))?(t.instance=u,it(u),u):(l=n,(u=dn.get(o))&&(l=Q({},n),kd(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),it(u),yt(u,"link",l),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,gr(l,n.precedence,e));return t.instance}function gr(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,o=u,v=0;v<l.length;v++){var N=l[v];if(N.dataset.precedence===t)o=N;else if(o!==u)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yr=null;function z0(e,t,n){if(yr===null){var l=new Map,u=yr=new Map;u.set(n,l)}else u=yr,l=u.get(n),l||(l=new Map,u.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var o=n[u];if(!(o[Ai]||o[dt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var v=o.getAttribute(t)||"";v=e+v;var N=l.get(v);N?N.push(o):l.set(v,[o])}}return l}function Qd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Rj(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 U0(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function L0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function B0(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function q0(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=B0(t),e.suspenseyImages.push(t)),e=Mj.bind(e),t.decode().then(e,e))}function Aj(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Kl(l.href),o=t.querySelector(mc(u));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=gc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,it(o);return}o=t.ownerDocument||t,l=M0(l),(u=dn.get(u))&&Hd(l,u),o=o.createElement("link"),it(o);var v=o;v._p=new Promise(function(N,w){v.onload=N,v.onerror=w}),yt(o,"link",l),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=gc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vr=0;function Oj(e,t){return e.stylesheets&&e.count===0&&xr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&vr===0&&(vr=62500*FS());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>vr?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function H0(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)xr(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function gc(){this.count--,H0(this)}function Mj(){this.imgCount--,H0(this)}var br=null;function xr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,br=new Map,t.forEach(Dj,e),br=null,gc.call(e))}function Dj(e,t){if(!(t.state.loading&4)){var n=br.get(e);if(n)var l=n.get(null);else{n=new Map,br.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<u.length;o++){var v=u[o];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(n.set(v.dataset.precedence,v),l=v)}l&&n.set(null,l)}u=t.instance,v=u.getAttribute("data-precedence"),o=n.get(v)||l,o===l&&n.set(null,u),n.set(v,u),this.count++,l=gc.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),o?o.parentNode.insertBefore(u,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Zl={$$typeof:ie,Provider:null,Consumer:null,_currentValue:nn,_currentValue2:nn,_threadCount:0};function zj(e,t,n,l,u,o,v,N,w){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=xo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xo(0),this.hiddenUpdates=xo(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=o,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.transitionTypes=null,this.incompleteTransitions=new Map}function k0(e,t,n,l,u,o,v,N,w,z,B,G){return e=new zj(e,t,n,v,w,z,B,G,N),t=1,o===!0&&(t|=24),o=Dt(3,null,null,t),e.current=o,o.stateNode=e,t=tf(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:l,isDehydrated:n,cache:t},lf(o),e}function Q0(e){return e?(e=xl,e):xl}function Y0(e,t,n,l,u,o){u=Q0(u),l.context===null?l.context=u:l.pendingContext=u,l=Ca(t),l.payload={element:n},o=o===void 0?null:o,o!==null&&(l.callback=o),n=Ra(e,l,t),n!==null&&(Bt(n,e,t),Xi(n,e,t))}function I0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yd(e,t){I0(e,t),(e=e.alternate)&&I0(e,t)}function G0(e){if(e.tag===13||e.tag===31){var t=Ss(e,67108864);t!==null&&Bt(t,e,67108864),Yd(e,67108864)}}function V0(e){if(e.tag===13||e.tag===31){var t=$t();t=So(t);var n=Ss(e,t);n!==null&&Bt(n,e,t),Yd(e,t)}}var Fl=!0;function Uj(e,t,n,l){var u=ae.T;ae.T=null;var o=fe.p;try{fe.p=2,Id(e,t,n,l)}finally{fe.p=o,ae.T=u}}function Lj(e,t,n,l){var u=ae.T;ae.T=null;var o=fe.p;try{fe.p=8,Id(e,t,n,l)}finally{fe.p=o,ae.T=u}}function Id(e,t,n,l){if(Fl){var u=Gd(l);if(u===null)Td(e,t,l,Sr,n),X0(e,l);else if(qj(u,e,t,n,l))l.stopPropagation();else if(X0(e,l),t&4&&-1<Bj.indexOf(e)){for(;u!==null;){var o=rl(u);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var v=gs(o.pendingLanes);if(v!==0){var N=o;for(N.pendingLanes|=2,N.entangledLanes|=2;v;){var w=1<<31-It(v);N.entanglements[1]|=w,v&=~w}qn(o),(ze&6)===0&&(ir=Qt()+500,rc(0))}}break;case 31:case 13:N=Ss(o,2),N!==null&&Bt(N,o,2),rr(),Yd(o,2)}if(o=Gd(l),o===null&&Td(e,t,l,Sr,n),o===u)break;u=o}u!==null&&l.stopPropagation()}else Td(e,t,l,null,n)}}function Gd(e){return e=Co(e),Vd(e)}var Sr=null;function Vd(e){if(Sr=null,e=ys(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=h(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 Sr=e,null}function K0(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Fx()){case Om:return 2;case Mm:return 8;case eu:case $x:return 32;case Dm:return 268435456;default:return 32}default:return 32}}var Kd=!1,Qa=null,Ya=null,Ia=null,yc=new Map,vc=new Map,Ga=[],Bj="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 X0(e,t){switch(e){case"focusin":case"focusout":Qa=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":yc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vc.delete(t.pointerId)}}function bc(e,t,n,l,u,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:o,targetContainers:[u]},t!==null&&(t=rl(t),t!==null&&G0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function qj(e,t,n,l,u){switch(t){case"focusin":return Qa=bc(Qa,e,t,n,l,u),!0;case"dragenter":return Ya=bc(Ya,e,t,n,l,u),!0;case"mouseover":return Ia=bc(Ia,e,t,n,l,u),!0;case"pointerover":var o=u.pointerId;return yc.set(o,bc(yc.get(o)||null,e,t,n,l,u)),!0;case"gotpointercapture":return o=u.pointerId,vc.set(o,bc(vc.get(o)||null,e,t,n,l,u)),!0}return!1}function Z0(e){var t=ys(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,km(e.priority,function(){V0(n)});return}}else if(t===31){if(t=h(n),t!==null){e.blockedOn=t,km(e.priority,function(){V0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Gd(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);_o=l,n.target.dispatchEvent(l),_o=null}else return t=rl(n),t!==null&&G0(t),e.blockedOn=n,!1;t.shift()}return!0}function F0(e,t,n){jr(e)&&n.delete(t)}function Hj(){Kd=!1,Qa!==null&&jr(Qa)&&(Qa=null),Ya!==null&&jr(Ya)&&(Ya=null),Ia!==null&&jr(Ia)&&(Ia=null),yc.forEach(F0),vc.forEach(F0)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Hj)))}var Tr=null;function $0(e){Tr!==e&&(Tr=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){Tr===e&&(Tr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(Vd(l||n)===null)continue;break}var o=rl(n);o!==null&&(e.splice(t,3),t-=3,_f(o,{pending:!0,data:u,method:n.method,action:l},l,u))}}))}function $l(e){function t(w){return Nr(w,e)}Qa!==null&&Nr(Qa,e),Ya!==null&&Nr(Ya,e),Ia!==null&&Nr(Ia,e),yc.forEach(t),vc.forEach(t);for(var n=0;n<Ga.length;n++){var l=Ga[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ga.length&&(n=Ga[0],n.blockedOn===null);)Z0(n),n.blockedOn===null&&Ga.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var u=n[l],o=n[l+1],v=u[Mt]||null;if(typeof o=="function")v||$0(n);else if(v){var N=null;if(o&&o.hasAttribute("formAction")){if(u=o,v=o[Mt]||null)N=v.formAction;else if(Vd(u)!==null)continue}else N=v.action;typeof N=="function"?n[l+1]=N:(n.splice(l,3),l-=3),$0(n)}}}function J0(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(v){return u=v})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Xd(e){this._internalRoot=e}Er.prototype.render=Xd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,l=$t();Y0(n,l,e,t,null,null)},Er.prototype.unmount=Xd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Y0(e.current,2,null,e,null,null),rr(),t[ul]=null}};function Er(e){this._internalRoot=e}Er.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ga.length&&t!==0&&t<Ga[n].priority;n++);Ga.splice(n,0,e),n===0&&Z0(e)}};var P0=s.version;if(P0!=="19.3.1")throw Error(c(527,P0,"19.3.1"));fe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=y(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var kj={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ae,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wr.isDisabled&&wr.supportsFiber)try{_i=wr.inject(kj),Yt=wr}catch{}}return Nc.createRoot=function(e,t){if(!f(e))throw Error(c(299));var n=!1,l="",u=Qg,o=Yg,v=Ig;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=k0(e,1,!1,null,null,n,l,null,u,o,v,J0),e[ul]=t.current,Nd(e),new Xd(t)},Nc.hydrateRoot=function(e,t,n){if(!f(e))throw Error(c(299));var l=!1,u="",o=Qg,v=Yg,N=Ig,w=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(v=n.onCaughtError),n.onRecoverableError!==void 0&&(N=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=k0(e,1,!0,t,n??null,l,u,w,o,v,N,J0),t.context=Q0(null),n=t.current,l=$t(),l=So(l),u=Ca(l),u.callback=null,Ra(n,u,l),n=l,t.current.lanes=n,Ri(t,n),qn(t),e[ul]=t.current,Nd(e),new Er(t)},Nc.version="19.3.1",Nc}var Zv;function _2(){if(Zv)return ih.exports;Zv=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(s){console.error(s)}}return a(),ih.exports=w2(),ih.exports}var C2=_2();const R2=`<svg class="icon-symbols" width="0" height="0" aria-hidden="true">
67
+ <defs>
68
+ <symbol id="i-chevron-down" viewBox="0 0 16 16"><path d="M4 6l4 4 4-4"/></symbol>
69
+ <symbol id="i-chevron-up" viewBox="0 0 16 16"><path d="M4 10l4-4 4 4"/></symbol>
70
+ <symbol id="i-chevron-left" viewBox="0 0 16 16"><path d="M10 4L6 8l4 4"/></symbol>
71
+ <symbol id="i-chevron-right" viewBox="0 0 16 16"><path d="M6 4l4 4-4 4"/></symbol>
72
+ <symbol id="i-check" viewBox="0 0 16 16"><path d="M3 8.5l3.25 3.25L13 4.5"/></symbol>
73
+ <symbol id="i-x" viewBox="0 0 16 16"><path d="M4 4l8 8M12 4l-8 8"/></symbol>
74
+ <symbol id="i-search" viewBox="0 0 16 16"><circle cx="7" cy="7" r="4.5"/><path d="M10.25 10.25L13.5 13.5"/></symbol>
75
+ <symbol id="i-play" viewBox="0 0 16 16"><path d="M5 3.25v9.5L12.5 8 5 3.25z"/></symbol>
76
+ <symbol id="i-stop" viewBox="0 0 16 16"><rect x="3.5" y="3.5" width="9" height="9" rx="1.5"/></symbol>
77
+ <symbol id="i-resume" viewBox="0 0 16 16"><path d="M3.5 3.5v9"/><path d="M6.75 3.5v9L13 8 6.75 3.5z"/></symbol>
78
+ <symbol id="i-person" viewBox="0 0 16 16"><circle cx="8" cy="5.25" r="2.75"/><path d="M2.75 13.5a5.25 5.25 0 0 1 10.5 0"/></symbol>
79
+ <symbol id="i-tool" viewBox="0 0 16 16"><path d="M9.8 4.2a.67.67 0 0 0 0 .93l1.07 1.07a.67.67 0 0 0 .93 0l2.51-2.51a4 4 0 0 1-5.29 5.29l-4.61 4.61a1.41 1.41 0 0 1-2-2l4.61-4.61a4 4 0 0 1 5.29-5.29z"/></symbol>
80
+ <symbol id="i-reasoning" viewBox="0 0 16 16"><path d="M8 2a4 4 0 0 0-2.5 7.1c.35.3.5.75.5 1.4h4c0-.65.15-1.1.5-1.4A4 4 0 0 0 8 2z"/><path d="M6.25 12.5h3.5M7 14.25h2"/></symbol>
81
+ <symbol id="i-code-phase" viewBox="0 0 16 16"><path d="M5.25 4.5L1.75 8l3.5 3.5M10.75 4.5L14.25 8l-3.5 3.5M9.25 3l-2.5 10"/></symbol>
82
+ <symbol id="i-agent" viewBox="0 0 16 16"><rect x="2.75" y="5.5" width="10.5" height="8" rx="2"/><path d="M8 5.5V3"/><path d="M8 2.5v.1"/><path d="M6 8.75v1.5M10 8.75v1.5"/></symbol>
83
+ <symbol id="i-return" viewBox="0 0 16 16"><path d="M5.75 3.5L2.5 6.75 5.75 10"/><path d="M2.5 6.75h7a3.5 3.5 0 0 1 0 7H7.5"/></symbol>
84
+ <symbol id="i-repeat" viewBox="0 0 16 16"><path d="M11 2l2.5 2.5L11 7"/><path d="M13.5 4.5h-8a3 3 0 0 0-3 3V8"/><path d="M5 14l-2.5-2.5L5 9"/><path d="M2.5 11.5h8a3 3 0 0 0 3-3V8"/></symbol>
85
+ <symbol id="i-wait" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 4.75V8l2.25 1.5"/></symbol>
86
+ <symbol id="i-file" viewBox="0 0 16 16"><path d="M9 2H4.5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5L9 2z"/><path d="M9 2v3.5h3.5"/></symbol>
87
+ <symbol id="i-image" viewBox="0 0 16 16"><rect x="2" y="3" width="12" height="10" rx="1.5"/><circle cx="5.75" cy="6.5" r="1"/><path d="M14 10.25l-3-3L4.75 13"/></symbol>
88
+ <symbol id="i-link-out" viewBox="0 0 16 16"><path d="M9.5 2.5h4v4"/><path d="M13.5 2.5L7.5 8.5"/><path d="M11.5 9.5v3a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h3"/></symbol>
89
+ <symbol id="i-copy" viewBox="0 0 16 16"><rect x="5.5" y="5.5" width="8" height="8" rx="1.5"/><path d="M10.5 5.5v-2a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2"/></symbol>
90
+ <symbol id="i-warning" viewBox="0 0 16 16"><path d="M8 2.5L1.75 13.25h12.5L8 2.5z"/><path d="M8 6.75v3"/><path d="M8 11.4v.1"/></symbol>
91
+ <symbol id="i-error" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 5v3.5"/><path d="M8 10.9v.1"/></symbol>
92
+ <symbol id="i-info" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 7.5V11"/><path d="M8 5.1v.1"/></symbol>
93
+ <symbol id="i-keyboard" viewBox="0 0 16 16"><rect x="1.5" y="4" width="13" height="8.5" rx="1.5"/><path d="M4.25 6.75v.1M6.75 6.75v.1M9.25 6.75v.1M11.75 6.75v.1"/><path d="M5 9.75h6"/></symbol>
94
+ <symbol id="i-spinner" viewBox="0 0 16 16"><circle class="spinner-track" cx="8" cy="8" r="5.5"/><path d="M8 2.5A5.5 5.5 0 0 1 13.5 8"/></symbol>
95
+ <symbol id="i-nothing-to-do" viewBox="0 0 16 16"><path d="M4.5 8h7"/></symbol>
96
+ <symbol id="i-not-reached" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5"/></symbol>
97
+ <symbol id="i-free-slot" viewBox="0 0 16 16"><circle cx="3.5" cy="8" r=".6"/><circle cx="8" cy="8" r=".6"/><circle cx="12.5" cy="8" r=".6"/></symbol>
98
+ <symbol id="i-dropped" viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.5"/><path d="M4.1 11.9l7.8-7.8"/></symbol>
99
+ <symbol id="n-once" viewBox="0 0 16 16"><circle class="notation-solid" cx="8" cy="8" r="3"/></symbol>
100
+ <symbol id="n-per-subject" viewBox="0 0 16 16"><path d="M3.5 8L12 3.5M3.5 8H12M3.5 8L12 12.5"/><circle class="notation-solid" cx="3" cy="8" r="1.75"/><circle class="notation-solid" cx="13" cy="3.25" r="1.25"/><circle class="notation-solid" cx="13" cy="8" r="1.25"/><circle class="notation-solid" cx="13" cy="12.75" r="1.25"/></symbol>
101
+ <symbol id="n-repeats" viewBox="0 0 16 16"><rect x="1.5" y="6.5" width="9" height="7.5" rx="1"/><path d="M4.5 4.25h7a1.5 1.5 0 0 1 1.5 1.5V11"/><path d="M7.5 2h6a1.5 1.5 0 0 1 1.5 1.5v5"/></symbol>
102
+ <symbol id="n-wait" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6"/><path d="M8 4.75V8l2.25 1.5"/></symbol>
103
+ <symbol id="n-at-once" viewBox="0 0 16 16"><path d="M2.5 3v10M13.5 3v10M2.5 5h11M2.5 8h11M2.5 11h11"/></symbol>
104
+ <symbol id="n-only-when" viewBox="0 0 16 16"><path d="M8 2.5l5.5 5.5L8 13.5 2.5 8z"/></symbol>
105
+ <symbol id="n-lane" viewBox="0 0 16 16"><path d="M13.5 4.5h-8a2.5 2.5 0 0 0-2.5 2.5v2a2.5 2.5 0 0 0 2.5 2.5h8"/></symbol>
106
+ <symbol id="n-code-phase" viewBox="0 0 16 16"><rect x="1.5" y="3.5" width="13" height="9" rx="1"/><rect class="notation-fine" x="4" y="6" width="8" height="4"/></symbol>
107
+ <symbol id="n-call-fails" viewBox="0 0 16 16"><path class="notation-strong" d="M1.25 4.75l6.5 6.5M7.75 4.75l-6.5 6.5"/><path d="M9.75 8h2"/><path class="notation-solid" d="M15.5 8l-4.25-2.5v5z"/></symbol>
108
+ <symbol id="n-return" viewBox="0 0 16 16"><path d="M8.5 12.5H5.5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h4"/><path class="notation-solid" d="M13.5 3.5l-4.5-2.5v5z"/></symbol>
109
+ </defs>
110
+ </svg>
111
+ `;function Oe({name:a,className:s}){return r.jsx("svg",{className:s?`icon ${s}`:"icon","aria-hidden":"true",children:r.jsx("use",{href:`#i-${a}`})})}function A2(){return r.jsx("svg",{className:"spinner","aria-hidden":"true",children:r.jsx("use",{href:"#i-spinner"})})}function O2(){return r.jsx("div",{hidden:!0,dangerouslySetInnerHTML:{__html:R2}})}const Rc={running:{glyph:"spinner",word:"Running"},"waiting-person":{glyph:"person",word:"Waiting for the person"},stopped:{glyph:"stop",word:"Stopped"},failed:{glyph:"x",word:"Failed"},finished:{glyph:"check",word:"Finished"},"nothing-to-do":{glyph:"nothing-to-do",word:"Nothing to do"},"not-reached":{glyph:"not-reached",word:"Not reached"},"from-run":{glyph:"link-out",word:"From an earlier run"},"waiting-condition":{glyph:"wait",word:"Waiting for its condition"},"waiting-slot":{glyph:"free-slot",word:"Waiting for a free slot"},dropped:{glyph:"dropped",word:"Dropped"},"in-progress":{glyph:"spinner",word:"In progress"},accepted:{glyph:"check",word:"Accepted"},"sent-back":{glyph:"return",word:"Sent back"},asked:{glyph:"person",word:"Asked"},"failed-made-again":{glyph:"x",word:"Failed, made again"},"failed-accepted":{glyph:"x",word:"Failed, accepted"},"returned-error":{glyph:"x",word:"Returned an error"}},Si=({kind:a})=>Rc[a].word;function Xn({kind:a,alone:s=!1}){return r.jsx("span",{className:`status-mark status-mark--${a}`,...s?{role:"img","aria-label":Rc[a].word,title:Rc[a].word}:{},children:r.jsx("svg",{className:"status-glyph","aria-hidden":"true",children:r.jsx("use",{href:`#i-${Rc[a].glyph}`})})})}function Tn({kind:a,label:s}){return r.jsxs("span",{className:"status",children:[r.jsx(Xn,{kind:a}),r.jsx("span",{className:"status-label",children:s??Rc[a].word})]})}function M2({label:a,name:s,options:i,value:c,onChoose:f}){return r.jsxs("div",{className:"radio-group",role:"radiogroup","aria-label":a,children:[r.jsx("span",{className:"field-label",children:a}),i.map(d=>r.jsxs("label",{className:"choice",children:[r.jsx("input",{className:"visually-hidden",type:"radio",name:s,checked:d.value===c,onChange:()=>f(d.value)}),r.jsx("span",{className:d.value===c?"radio is-on":"radio"}),r.jsx("span",{className:"choice-label",children:d.label})]},d.value))]})}function Zc({label:a,options:s,value:i,onChoose:c}){return r.jsx("span",{className:"segmented",role:"radiogroup","aria-label":a,children:s.map(f=>r.jsx("button",{type:"button",role:"radio","aria-checked":f.value===i,className:f.value===i?"segmented-option is-selected":"segmented-option",onClick:()=>c(f.value),children:f.label},f.value))})}function hm({label:a,tabs:s,value:i,onChoose:c}){return r.jsx("div",{className:"tabs",role:"tablist","aria-label":a,children:s.map(f=>r.jsxs("button",{type:"button",role:"tab","aria-selected":f.value===i,className:f.value===i?"tab is-selected":"tab",onClick:()=>c(f.value),children:[f.icon&&r.jsx(Oe,{name:f.icon}),f.label,f.count!==void 0&&r.jsx("span",{className:"tab-count",children:f.count})]},f.value))})}function D2({label:a,counts:s,value:i,onChoose:c}){return r.jsx("div",{className:"count-filter",role:"radiogroup","aria-label":a,children:s.map(f=>r.jsxs("button",{type:"button",role:"radio","aria-checked":f.value===i,className:f.value===i?"count-filter-item is-selected":"count-filter-item",onClick:()=>c(f.value),children:[f.status&&r.jsx(Xn,{kind:f.status}),r.jsx("span",{className:"count-filter-count",children:f.count}),r.jsx("span",{className:"count-filter-label",children:f.label})]},f.value??""))})}function he({name:a}){const s=a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").split(/[-_\s]+/).filter(Boolean).join(" ").toLowerCase();return s.charAt(0).toUpperCase()+s.slice(1)}function Zn({tone:a,marked:s=!1,title:i,children:c}){return r.jsxs("div",{className:`notice notice--${a}${s?" notice--marked":""}`,role:a==="error"?"alert":"status",children:[r.jsx(Oe,{name:a,className:"notice-icon"}),r.jsxs("div",{className:"notice-body",children:[r.jsx("h3",{className:"notice-title",children:i}),c!==void 0&&r.jsx("p",{className:"notice-text",children:c})]})]})}function Je({children:a}){return r.jsx("div",{className:"empty-state",children:r.jsx("p",{className:"empty-state-text",children:a})})}function z2({columns:a}){return r.jsx("tbody",{children:[0,1,2].map(s=>r.jsx("tr",{className:"table-row",children:a.map((i,c)=>r.jsx("td",{className:i==="number"?"table-cell table-cell--number":"table-cell",children:r.jsx("span",{className:`skeleton skeleton--${i==="number"?"short":(c+s)%2?"long":"medium"}`})},c))},s))})}function mm({label:a,value:s,matches:i,onChange:c,onStep:f}){return r.jsxs("div",{className:"search-field",children:[r.jsx(Oe,{name:"search",className:"search-field-icon"}),r.jsx("input",{className:"field-value","aria-label":a,placeholder:a,value:s,onChange:d=>c(d.target.value),onKeyDown:d=>{d.key==="Escape"&&c(""),d.key==="Enter"&&(f==null||f(d.shiftKey?-1:1))}}),s?r.jsxs(r.Fragment,{children:[i!==void 0&&r.jsxs("span",{className:"search-field-count",children:[i.at!==void 0&&i.total>0&&`${i.at+1} of `,i.total===1?"1 match":`${i.total} matches`]}),r.jsx("button",{type:"button",className:"search-field-clear","aria-label":"Clear the search",onClick:()=>c(""),children:r.jsx(Oe,{name:"x"})})]}):null]})}const Fv=({record:a,key:s,value:i})=>Object.defineProperty(a,s,{value:i,enumerable:!0,writable:!0,configurable:!0});function pm(a){if(typeof a!="object"||a===null||Object.isFrozen(a))return a;Object.freeze(a);for(const s of Object.values(a))pm(s);return a}function U2({state:a,entries:s}){const i=({value:f,path:d,entry:m})=>{if(!d.length)return m.after;const[h,...p]=d;if(Array.isArray(f)){const g=[...f],b=h;return p.length?g[b]=i({value:g[b],path:p,entry:m}):m.kind==="removed"?g.splice(b,1):g[b]=m.after,g}const y={...f},x=h;return p.length?Fv({record:y,key:x,value:i({value:y[x],path:p,entry:m})}):m.kind==="removed"?delete y[x]:Fv({record:y,key:x,value:m.after}),y};let c=a;for(const f of s)c=i({value:c,path:f.path,entry:f});return pm(c)}const L2="0-start",B2=({lane:a,key:s,repeat:i})=>JSON.stringify([a,s,i]),Lr=a=>Object.assign(Object.create(null),a);function q2({start:a}){const s=Lr({});for(const[c,f]of Object.entries(a.finishedAssignments))s[c]=Lr(f);const i=()=>{if(!a.phase)return{};const c={stage:"finished",fromCheckpoint:!0};return a.openVisit?{phasePosition:{phase:a.openVisit.during,stage:"running"},openVisit:{...a.openVisit,position:{place:a.phase,...c}}}:{phasePosition:{phase:a.phase,...c}}};return{seq:0,status:"running",state:pm(a.state),overrides:[],stoppedAfterPhase:!1,sideLineVisits:Lr(a.sideLineVisits),...i(),assignments:Object.create(null),assignmentIds:[],finishedAssignments:s,questions:Object.create(null),questionIds:[],codePhases:Object.create(null),artifacts:Lr(a.artifacts),calls:Object.create(null),checkpointsSaved:0,totals:{calls:0,corrections:0,tokens:{input:0,cached:0,output:0,reasoning:0},callsNotReporting:{input:0,cached:0,output:0,reasoning:0},durationMs:0,costUsd:0,programCostUsd:0}}}function H2({progress:a,questionIds:s}){return s.every(i=>{var c;return((c=a.questions[i])==null?void 0:c.answer)!==void 0})}async function gm({path:a}){return ym(await fetch(a))}async function Lc({path:a,body:s={}}){return ym(await fetch(a,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)}))}async function ym(a){if(a.ok)return await a.json();const s=await a.json().catch(()=>{});throw new Error((s==null?void 0:s.message)??`The devtool answered ${a.status}.`)}function vm({runId:a,file:s}){return`/api/runs/${a}/files/${s.split("/").map(encodeURIComponent).join("/")}`}async function Bc({runId:a,file:s}){const i=await fetch(vm({runId:a,file:s}));return i.ok?i.text():ym(i)}const Xr=[],Zr=[];let ei,Lh=!1;const $v=a=>{if(Lh!==a){Lh=a;for(const s of Zr)s(a)}};function bx(){ei=new EventSource("/api/stream"),ei.onopen=()=>$v(!0),ei.onerror=()=>$v(!1),ei.onmessage=({data:a})=>{const s=JSON.parse(a);for(const i of[...Xr])i(s)}}function xx({onMessage:a}){return ei||bx(),Xr.push(a),()=>void Xr.splice(Xr.indexOf(a),1)}function bm({onChange:a}){return ei||bx(),Zr.push(a),()=>void Zr.splice(Zr.indexOf(a),1)}const k2=()=>Lh;function Q2({phase:a,sideLine:s}){return s?s.visit===1?`${s.name}.${a}`:`${s.name}.${s.visit}.${a}`:a}function ll({name:a}){const s=a.split(".");return s.length===1?{phase:a}:{phase:s.at(-1),sideLine:{name:s[0],visit:s.length===3?Number(s[1]):1}}}function Y2({progress:a,event:s}){var h,p,y,x,g;a.lastLineAt&&s.kind!=="run-started"&&s.kind!=="run-resumed"&&(a.totals.durationMs+=Date.parse(s.at)-Date.parse(a.lastLineAt)),a.seq=s.seq,a.lastLineAt=s.at;const i=b=>a.assignments[a.calls[b].assignmentId],c=({writes:b,assignment:S})=>{var j;(j=b.change)!=null&&j.length&&(S&&(S.firstChangeSeq??(S.firstChangeSeq=s.seq-1)),a.state=U2({state:a.state,entries:b.change}));for(const T of b.artifacts??[])a.artifacts[T.name]=T},f=({questions:b,owner:S})=>{for(const j of b)a.questions[j.id]={...j,owner:S},a.questionIds.push(j.id);return b.map(j=>j.id)},d=({assignment:b,callId:S,callFailed:j})=>{b.finishedPlaces.push({agent:a.calls[S].agent,callId:S,callFailed:j,stateBeforeSeq:b.firstChangeSeq??s.seq-1,stateAfterSeq:s.seq}),b.placeInChain+=1,b.correctionsInARow=0,delete b.lastCorrection,delete b.pendingAsk,delete b.firstChangeSeq},m=b=>{a.openVisit&&ll({name:b.place}).sideLine?a.openVisit.position=b:a.phasePosition={phase:b.place,stage:b.stage}};switch(s.kind){case"run-started":a.status="running",a.createdAt=s.at,a.blueprintHash=s.blueprintHash,a.callsAnsweredBy=s.callsAnsweredBy,a.questionsAnsweredBy=s.questionsAnsweredBy,a.overrides=s.overrides,a.stopAfter=s.stopAfter,a.startedFrom=s.startedFrom;break;case"run-resumed":a.status="running",a.blueprintHash=s.blueprintHash,delete a.reason,c({writes:s}),s.overrides&&(a.overrides=s.overrides);for(const b of Object.values(a.calls)){if(b.status!=="in-progress")continue;const S=a.assignments[b.assignmentId],{pendingAsk:j}=S,T=(j==null?void 0:j.by)==="tool"&&!H2({progress:a,questionIds:j.questionIds});b.status=T?"asked":"stopped",T&&(S.status="waiting-for-person")}for(const b of Object.values(a.assignments))b.correctionsInARow=0;break;case"side-line-checked":if(s.entered&&s.visit!==void 0){const{sideLine:b,visit:S,during:j}=s;a.sideLineVisits[b]=S,a.openVisit={sideLine:b,visit:S,during:j}}break;case"side-line-left":delete a.openVisit;break;case"phase-started":m({place:s.phase,stage:"running"}),a.codePhases[s.phase]={questionIds:[],accepted:!1};break;case"assignment-added":a.assignments[s.assignmentId]={id:s.assignmentId,phase:s.phase,lane:s.lane,key:s.key,label:s.label,repeat:s.repeat,status:"waiting-to-start",mayStart:!1,placeInChain:0,finishedPlaces:[],attempts:Object.create(null),correctionsInARow:0,questionIds:[]},a.assignmentIds.push(s.assignmentId);break;case"assignment-may-start":a.assignments[s.assignmentId].mayStart=!0;break;case"assignment-dropped":a.assignments[s.assignmentId].status="dropped";break;case"assignment-started":{const b=a.assignments[s.assignmentId];b.status="running",b.subject=s.subject,b.agents=s.agents;break}case"call-started":{const b=a.assignments[s.assignmentId];b.attempts[s.agent]=s.attempt,b.status="running",delete b.pendingAsk,a.calls[s.callId]={assignmentId:s.assignmentId,agent:s.agent,stateSeq:s.stateSeq,status:"in-progress"};break}case"tool-call-finished":{const b=i(s.callId);if(c({writes:s,assignment:b}),(h=s.questions)!=null&&h.length){const S=f({questions:s.questions,owner:{assignmentId:b.id}});b.questionIds.push(...S),b.pendingAsk={by:"tool",callId:s.callId,questionIds:S}}break}case"call-ended":{const{totals:b}=a;a.calls[s.callId].status=s.status,b.calls+=1,b.costUsd+=s.costUsd??0,b.programCostUsd+=s.programCostUsd??0;for(const S of["input","cached","output","reasoning"])s.tokens[S]===void 0?b.callsNotReporting[S]+=1:b.tokens[S]+=s.tokens[S];s.status==="asked"&&(i(s.callId).status="waiting-for-person");break}case"reply-judged":{const b=a.assignments[s.assignmentId];if(a.calls[s.callId].outcome=s.outcome,c({writes:s,assignment:b}),s.outcome==="sent-back"){b.correctionsInARow+=1,b.lastCorrection={callId:s.callId,text:s.correction??""},a.totals.corrections+=1,delete b.pendingAsk;break}if(s.outcome==="asked"){const S=f({questions:s.questions??[],owner:{assignmentId:b.id}});b.questionIds.push(...S),b.pendingAsk={by:"outcome",callId:s.callId,questionIds:S},b.status="waiting-for-person";break}d({assignment:b,callId:s.callId,callFailed:!1});break}case"failed-call-accepted":{const b=a.assignments[s.assignmentId];c({writes:s,assignment:b}),d({assignment:b,callId:s.callId,callFailed:!0});break}case"question-answered":{const b=a.questions[s.questionId];b.answer=s.answer,b.answeredBy=s.answeredBy,"assignmentId"in b.owner&&(a.assignments[b.owner.assignmentId].correctionsInARow=0);break}case"assignment-finished":{const b=a.assignments[s.assignmentId];b.status="finished",(p=a.finishedAssignments)[y=b.phase]??(p[y]=Object.create(null)),a.finishedAssignments[b.phase][B2(b)]=!0;break}case"code-phase-ended":c({writes:s}),(x=a.codePhases)[g=s.phase]??(x[g]={questionIds:[],accepted:!1}),a.codePhases[s.phase].accepted=s.outcome==="accepted",a.codePhases[s.phase].questionIds.push(...f({questions:s.questions??[],owner:{phase:s.phase}}));break;case"phase-finished":m({place:s.phase,stage:"finished"}),a.checkpointsSaved+=1;break;case"run-waiting":a.status="waiting";break;case"run-stopped":a.status="stopped",a.reason=s.reason,s.afterPhase&&(a.stoppedAfterPhase=!0);break;case"run-failed":a.status="failed",a.reason=s.reason;break;case"run-finished":a.status="finished";break}}function I2({start:a}){return{start:a,progress:q2({start:a}),calls:Object.create(null),callIds:[],callIdsOfAssignment:Object.create(null),assignmentTimes:Object.create(null),phases:[],visits:[],sideLinesNotNeeded:Object.create(null),changes:[],artifacts:[],answeredAt:Object.create(null)}}function xm({record:a,event:s}){var p,y;if(s.seq!==a.progress.seq+1)return!1;const i=x=>{const g=a.phases.find(S=>S.phase===x);if(g)return g;const b={phase:x,startedSeq:s.seq,startedAt:s.at,clockMs:0,assignmentIds:[],callIds:[]};return a.phases.push(b),b},c=s.kind!=="run-started"&&s.kind!=="run-resumed",{phasePosition:f,openVisit:d}=a.progress,m=((p=d==null?void 0:d.position)==null?void 0:p.stage)==="running"?d.position.place:(f==null?void 0:f.stage)==="running"?f.phase:void 0;m&&a.lastLineAt&&c&&(i(m).clockMs+=Date.parse(s.at)-Date.parse(a.lastLineAt)),a.lastLineAt=s.at,Y2({progress:a.progress,event:s});const h=({madeBy:x})=>{var T;const g=s,b="callId"in x?a.calls[x.callId]:void 0,S=(b==null?void 0:b.phase)??("codePhase"in x?x.codePhase:void 0),j=S?{phase:S}:{};(T=g.change)!=null&&T.length&&(a.changes.push({seq:s.seq,at:s.at,...j,madeBy:x,entries:g.change}),b==null||b.change.push(...g.change));for(const E of g.artifacts??[])a.artifacts.push({artifact:E,seq:s.seq,...j,madeBy:x}),b==null||b.artifacts.push(E)};switch(s.kind){case"run-started":a.structureFile=s.structureFile;break;case"run-resumed":a.structureFile=s.structureFile,delete a.failedAssignmentId,h({madeBy:{resume:!0}});break;case"side-line-checked":if(s.entered&&s.visit!==void 0){const{sideLine:x,visit:g,during:b}=s;a.visits.push({sideLine:x,visit:g,during:b,enteredAt:s.at}),delete a.sideLinesNotNeeded[x]}else a.visits.some(x=>x.sideLine===s.sideLine)||(a.sideLinesNotNeeded[s.sideLine]=!0);break;case"side-line-left":{const x=a.visits.find(g=>g.sideLine===s.sideLine&&g.visit===s.visit);x&&(x.leftAt=s.at);break}case"phase-started":i(s.phase);break;case"assignment-added":i(s.phase).assignmentIds.push(s.assignmentId),a.callIdsOfAssignment[s.assignmentId]=[],a.assignmentTimes[s.assignmentId]={};break;case"assignment-started":a.assignmentTimes[s.assignmentId].startedAt=s.at;break;case"assignment-finished":a.assignmentTimes[s.assignmentId].finishedAt=s.at;break;case"call-started":{const{kind:x,seq:g,at:b,stateSeq:S,...j}=s;a.calls[s.callId]={...j,startedSeq:g,startedAt:b,failedAccepted:!1,retried:!1,toolCalls:0,change:[],artifacts:[],questionIds:[]},a.callIds.push(s.callId),a.callIdsOfAssignment[s.assignmentId].push(s.callId),i(s.phase).callIds.push(s.callId);break}case"tool-call-finished":{const x=a.calls[s.callId];x.toolCalls+=1,x.questionIds.push(...(s.questions??[]).map(g=>g.id)),h({madeBy:{callId:s.callId}});break}case"call-ended":{const x=a.calls[s.callId];x.ended=s.status,x.durationMs=s.durationMs,x.tokens=s.tokens,x.costUsd=s.costUsd,x.programCostUsd=s.programCostUsd,x.failure=s.failure,x.retried=!!s.retried;break}case"reply-judged":{const x=a.calls[s.callId];x.outcome=s.outcome,x.correction=s.correction,x.questionIds.push(...(s.questions??[]).map(g=>g.id)),h({madeBy:{callId:s.callId}});break}case"failed-call-accepted":a.calls[s.callId].failedAccepted=!0,h({madeBy:{callId:s.callId}});break;case"code-phase-ended":{const x=i(s.phase);x.codePhase={outcome:s.outcome,durationMs:s.durationMs,questionIds:[...((y=x.codePhase)==null?void 0:y.questionIds)??[],...(s.questions??[]).map(g=>g.id)]},h({madeBy:{codePhase:s.phase}});break}case"phase-finished":{const x=i(s.phase);x.finishedAt=s.at,x.checkpoint=s.checkpoint;break}case"question-answered":a.answeredAt[s.questionId]=s.at;break;case"run-failed":a.failedAssignmentId=s.assignmentId;break}return!0}function G2({start:a,events:s}){const i=I2({start:a});for(const c of s)xm({record:i,event:c});return i}const Za=Object.create(null);function Bh({holder:a,change:s}){a.held={...a.held,...s,version:a.held.version+1};for(const i of[...a.listeners])i()}async function Sx({runId:a,record:s}){const i=await Bc({runId:a,file:s.structureFile});return JSON.parse(i)}async function Fr({runId:a,holder:s}){if(!s.arrivedWhileReading){s.arrivedWhileReading=[];try{const[i,c]=await Promise.all([Bc({runId:a,file:`checkpoints/${L2}.json`}),Bc({runId:a,file:"events.jsonl"})]),f=c.slice(0,c.lastIndexOf(`
112
+ `)+1),d=G2({start:JSON.parse(i),events:f.split(`
113
+ `).filter(Boolean).map(h=>JSON.parse(h))});for(const h of s.arrivedWhileReading)xm({record:d,event:h});const m=await Sx({runId:a,record:d});Bh({holder:s,change:{record:d,structure:m,problem:void 0}})}catch(i){Bh({holder:s,change:{problem:i instanceof Error?i.message:String(i)}})}finally{delete s.arrivedWhileReading}}}async function V2({runId:a,holder:s,event:i}){if(s.arrivedWhileReading)return void s.arrivedWhileReading.push(i);const{record:c}=s.held;if(!c||i.seq<=c.progress.seq)return;if(!xm({record:c,event:i}))return Fr({runId:a,holder:s});const d=i.kind==="run-resumed"?await Sx({runId:a,record:c}).catch(()=>s.held.structure):s.held.structure;Bh({holder:s,change:{structure:d}})}function K2({runId:a,onChange:s}){let i=Za[a];if(!i){const c=xx({onMessage:m=>{m.kind==="run-event"&&m.runId===a&&V2({runId:a,holder:Za[a],event:m.event})}}),f=bm({onChange:m=>{m&&Fr({runId:a,holder:Za[a]})}}),d=()=>void Fr({runId:a,holder:Za[a]});window.addEventListener("focus",d),i=Za[a]={held:{version:0},listeners:[],stopListening:()=>{c(),f(),window.removeEventListener("focus",d)}},Fr({runId:a,holder:i})}return i.listeners.push(s),()=>{const c=Za[a];c.listeners.splice(c.listeners.indexOf(s),1),!c.listeners.length&&(c.stopListening(),delete Za[a])}}const X2={version:0},Z2=({runId:a})=>{var s;return((s=Za[a])==null?void 0:s.held)??X2},Sm=["runs"];function Fc(){return ds({queryKey:["blueprint"],queryFn:()=>gm({path:"/api/blueprint"}),staleTime:0,retry:!1})}function F2(){return ds({queryKey:["settings"],queryFn:()=>gm({path:"/api/settings"})})}function $c(){return ds({queryKey:Sm,queryFn:()=>gm({path:"/api/runs"}),staleTime:0,retry:!1})}function jx({runId:a}){var s;return(s=$c().data)==null?void 0:s.find(i=>i.summary.runId===a)}function $2({queryClient:a,row:s}){a.setQueryData(Sm,i=>{if(!i)return i;const c=f=>f.summary.runId===s.summary.runId;return i.some(c)?i.map(f=>c(f)?s:f):[s,...i]})}function J2(){const a=Gh();X.useEffect(()=>{const s=xx({onMessage:c=>{c.kind==="run-row"&&$2({queryClient:a,row:c.row})}}),i=bm({onChange:c=>{c&&a.invalidateQueries({queryKey:Sm})}});return()=>{s(),i()}},[a])}const P2=a=>bm({onChange:a});function W2(){return X.useSyncExternalStore(P2,k2)}function jm({runId:a}){const s=X.useCallback(i=>K2({runId:a,onChange:i}),[a]);return X.useSyncExternalStore(s,()=>Z2({runId:a}))}async function Nm({runId:a,file:s}){return JSON.parse(await Bc({runId:a,file:s}))}function eE({runId:a,callId:s,savedTimes:i}){return ds({queryKey:["call",a,s,i],queryFn:()=>Nm({runId:a,file:`calls/${s}.json`}),placeholderData:c=>c,retry:!1})}function tE({runId:a,name:s}){return ds({queryKey:["checkpoint",a,s],queryFn:()=>Nm({runId:a,file:`checkpoints/${s}.json`}),enabled:s!==void 0,staleTime:1/0,retry:!1})}function nE({runId:a}){return ds({queryKey:["input",a],queryFn:()=>Nm({runId:a,file:"input.json"}),enabled:a!==void 0,staleTime:1/0,retry:!1})}function aE({file:a,blueprintFile:s}){const i=s.slice(0,s.lastIndexOf("/")+1);return a.startsWith(i)?a.slice(i.length):a}function qc({site:a,blueprintFile:s}){const[i,c]=X.useState(!1),f=a.line===void 0?a.file:`${a.file}:${a.line}`,d=aE({file:f,blueprintFile:s});return r.jsxs("button",{type:"button",className:"source-location",title:"Copy this path",onClick:()=>void navigator.clipboard.writeText(f).then(()=>{c(!0),setTimeout(()=>c(!1),1500)}),children:[r.jsx(Oe,{name:"file"}),i?"Copied":d]})}const sE=/\{\{([A-Za-z_]\w*)\}\}/g,lE=a=>a.charAt(0).toUpperCase()+a.slice(1);function Hn({title:a,mark:s,children:i}){return r.jsxs("section",{className:"piece-section",children:[r.jsxs("h4",{className:"piece-section-title",children:[s,a]}),i]})}function iE({agent:a,structure:s}){return r.jsx("div",{className:"code-block",children:a.prompt.text.split(`
114
+ `).map((i,c)=>{const f=[];let d=0;for(const m of i.matchAll(sE)){const h=s.templates.find(p=>p.name===m[1]);f.push(i.slice(d,m.index),r.jsx("mark",{className:h?"template-include":"placeholder",children:m[0]},m.index),h&&r.jsxs("span",{className:"template-include-name",children:["template · ",h.path]},`name ${m.index}`)),d=m.index+m[0].length}return r.jsxs("div",{className:"code-line",children:[f,i.slice(d)]},c)})})}function cE({agent:a,phase:s,structure:i}){const c=[["set on this agent",a.modelSettings],["set on its phase",s.kind==="agents"?s.modelSettings:void 0],["from the blueprint",i.modelSettings]],f=m=>{for(const[h,p]of c){const y=p&&m(p);if(y!==void 0)return{value:y,source:h}}},d=[["Effort",f(({effort:m})=>m&&lE(m))],["Model on Codex",f(({model:m})=>m==null?void 0:m.codex)],["Model on Claude Code",f(({model:m})=>m==null?void 0:m["claude-code"])],["Model on the OpenAI API",f(({model:m})=>m==null?void 0:m["openai-api"])],["Model on the Anthropic API",f(({model:m})=>m==null?void 0:m["anthropic-api"])],["Model on AWS Bedrock",f(({model:m})=>m==null?void 0:m["bedrock-api"])],["Model on the Gemini API",f(({model:m})=>m==null?void 0:m["gemini-api"])]];return r.jsx("dl",{className:"setting-list",children:d.map(([m,h])=>h&&r.jsxs(X.Fragment,{children:[r.jsx("dt",{className:"setting-name",children:m}),r.jsx("dd",{className:"setting-value",children:h.value}),r.jsx("dd",{className:"setting-source",children:h.source})]},m))})}function uE({agent:a,phase:s,structure:i,blueprintFile:c}){const f=s.kind==="agents"?s.lanes.find(m=>m.chain.includes(a.name)):void 0,d=f==null?void 0:f.chain[f.chain.indexOf(a.name)+1];return r.jsxs("article",{className:"piece",children:[r.jsxs("header",{className:"piece-header",children:[r.jsx("p",{className:"text-body",children:a.description}),r.jsx(qc,{site:a.declaredAt,blueprintFile:c})]}),r.jsxs("div",{className:"piece-columns",children:[r.jsxs("section",{className:"piece-section",children:[r.jsxs("div",{className:"piece-section-heading",children:[r.jsx("h4",{className:"piece-section-title",children:"Prompt file"}),r.jsxs("span",{className:"source-location",children:[r.jsx(Oe,{name:"file"}),a.prompt.path]})]}),r.jsx(iE,{agent:a,structure:i})]}),r.jsxs("div",{className:"piece-column",children:[r.jsx(Hn,{title:"Inputs",children:a.inputs.length?r.jsx("ul",{className:"input-rows",children:a.inputs.map(m=>{var h;return r.jsxs("li",{className:"input-row",children:[r.jsx("code",{className:"input-placeholder",children:r.jsx("mark",{className:"placeholder",children:`{{${m.placeholder}}}`})}),r.jsxs("div",{className:"input-row-body",children:[r.jsx("p",{className:"input-description",children:m.description}),r.jsxs("p",{className:"input-serializer",children:["Serializer"," ",r.jsx("span",{className:"input-serializer-name",children:he({name:m.serializer})})," ","·"," ",(h=i.serializers.find(p=>p.name===m.serializer))==null?void 0:h.description]})]})]},m.placeholder)})}):r.jsx("p",{className:"text-secondary",children:"None: every call is sent the prompt file as written."})}),a.attachedImagesDescription&&r.jsx(Hn,{title:"Attached images",mark:r.jsx(Oe,{name:"image"}),children:r.jsx("p",{className:"text-body",children:a.attachedImagesDescription})}),r.jsxs(Hn,{title:"How the reply is read",children:[r.jsx("p",{className:"text-body",children:a.replyReaderDescription}),a.replySchema&&r.jsxs("details",{children:[r.jsx("summary",{className:"text-secondary",children:"Expected JSON schema"}),r.jsx("pre",{className:"code-block",children:JSON.stringify(a.replySchema,null,2)})]})]}),a.checks.length>0&&r.jsx(Hn,{title:"Checks",children:r.jsx("ul",{className:"input-rows",children:a.checks.map(m=>r.jsxs("li",{className:"input-row",children:[r.jsx("span",{className:"input-serializer-name",children:he({name:m.name})}),r.jsx("div",{className:"input-row-body",children:r.jsx("p",{className:"input-description",children:m.description})})]},m.name))})}),a.mayChange.length>0&&r.jsx(Hn,{title:"May change",children:r.jsx("ul",{className:"input-rows",children:a.mayChange.map((m,h)=>r.jsxs("li",{className:"input-row",children:[r.jsx("code",{className:"input-placeholder",children:m.path}),r.jsx("div",{className:"input-row-body",children:r.jsx("p",{className:"input-description",children:m.description})})]},`${m.path}-${h}`))})}),r.jsxs(Hn,{title:"Outcome",children:[r.jsx("p",{className:"text-body",children:a.replyOutcomeDescription}),r.jsx("p",{className:"text-secondary",children:a.maxCorrections?`A reply may be sent back up to ${a.maxCorrections} ${a.maxCorrections===1?"time":"times"}.`:"A reply is never sent back: the first reply that does not pass fails the run."})]}),a.asks&&r.jsx(Hn,{title:"Asks the person",mark:r.jsx(Oe,{name:"person"}),children:r.jsx("p",{className:"text-body",children:a.asks})}),r.jsx(Hn,{title:"When the call fails",mark:r.jsx("svg",{className:"notation-mark","aria-hidden":"true",children:r.jsx("use",{href:"#n-call-fails"})}),children:a.whenCallFailsDescription?r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-body",children:a.whenCallFailsDescription}),r.jsxs("p",{className:"text-secondary",children:["The call is saved as failed, accepted, and the assignment",d?` goes on to its next agent, ${he({name:d})}.`:" finishes."]})]}):r.jsx("p",{className:"text-secondary",children:"Nothing is declared, so a call that fails for good fails the run."})}),a.tools.length>0&&r.jsx(Hn,{title:"Tools",children:a.tools.map(m=>{var p;const h=i.tools.find(y=>y.name===m);return r.jsxs("div",{className:"tool-summary",children:[r.jsx(Oe,{name:"tool",className:"tool-summary-icon"}),r.jsxs("div",{className:"tool-summary-body",children:[r.jsxs("div",{className:"piece-title-line",children:[r.jsx("span",{className:"tool-summary-name",children:m}),r.jsx(qc,{site:h.declaredAt,blueprintFile:c})]}),r.jsxs("p",{className:"text-secondary",children:[h.description,((p=h.annotations)==null?void 0:p.readOnlyHint)===!0&&" Marked as only reading.",h.asks&&` It may ask the person: ${h.asks}`]})]})]},m)})}),r.jsx(Hn,{title:"Model settings",children:r.jsx(cE,{agent:a,phase:s,structure:i})})]})]})]})}function Nx({agents:a,structure:s}){const i=c=>{var f;return(f=s.phases.find(d=>d.kind==="agents"&&d.lanes.some(m=>m.chain.includes(c))))==null?void 0:f.name};return r.jsx("span",{className:"used-by",children:a.map((c,f)=>r.jsxs(X.Fragment,{children:[f>0&&", ",r.jsx(at,{className:"link",to:"/blueprint",search:{phase:i(c),agent:c},children:he({name:c})})]},c))})}function rE({structure:a,blueprintFile:s}){return a.serializers.length?r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Serializer"}),r.jsx("th",{className:"table-heading",children:"Description"}),r.jsx("th",{className:"table-heading",children:"File and line"}),r.jsx("th",{className:"table-heading",children:"Used by"})]})}),r.jsx("tbody",{children:a.serializers.map(i=>r.jsxs("tr",{className:"table-row",children:[r.jsx("td",{className:"table-cell",children:r.jsx("span",{className:"list-name",children:he({name:i.name})})}),r.jsx("td",{className:"table-cell table-cell--wrap",children:i.description}),r.jsx("td",{className:"table-cell",children:r.jsx(qc,{site:i.declaredAt,blueprintFile:s})}),r.jsx("td",{className:"table-cell table-cell--wrap",children:r.jsx(Nx,{agents:i.usedBy,structure:a})})]},i.name))})]}):r.jsx(Je,{children:"This blueprint declares no serializers: none of its agents has an input."})}function oE({structure:a}){return a.templates.length?r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Template"}),r.jsx("th",{className:"table-heading",children:"Placed as"}),r.jsx("th",{className:"table-heading",children:"Its text begins"}),r.jsx("th",{className:"table-heading",children:"File"}),r.jsx("th",{className:"table-heading",children:"Used by"})]})}),r.jsx("tbody",{children:a.templates.map(s=>r.jsxs("tr",{className:"table-row",children:[r.jsx("td",{className:"table-cell",children:r.jsx("span",{className:"list-name",children:he({name:s.name})})}),r.jsx("td",{className:"table-cell",children:r.jsx("code",{className:"code",children:r.jsx("mark",{className:"template-include",children:`{{${s.name}}}`})})}),r.jsx("td",{className:"table-cell table-cell--cut",children:r.jsx("code",{className:"code",children:s.text.split(`
115
+ `)[0]})}),r.jsx("td",{className:"table-cell",children:r.jsxs("span",{className:"source-location",children:[r.jsx(Oe,{name:"file"}),s.path]})}),r.jsx("td",{className:"table-cell",children:s.usedBy.length?r.jsx(Nx,{agents:s.usedBy,structure:a}):r.jsx("span",{className:"used-by",children:"No prompt places it"})})]},s.name))})]}):r.jsx(Je,{children:"This blueprint declares no templates."})}const kn=184,Br=56,Jv=28,Pv=24,Tx=17,fE=(a,s)=>`${a} ${s}${a===1?"":"s"}`;function dE({lane:a}){const{assignments:s}=a;return s.kind==="once"?[{text:"once"},...s.onlyWhenDescription?[{text:"only when its condition holds",explained:[s.onlyWhenDescription]}]:[]]:[{text:`each ${s.subjectName}`,explained:[s.description]},...s.repeats>1?[{text:`${s.repeats} times each`}]:[],{text:`${s.concurrency} at once`},...s.startsWhenDescription?[{text:"waits for its condition",explained:[s.startsWhenDescription]}]:[]]}function hE({words:a,x:s,axis:i,width:c}){return{kind:"group",className:a.explained?"drawing-words drawing-explained":"drawing-words",...a.explained?{label:a.text,explained:a.explained}:{},shapes:[{kind:"rect",className:"drawing-words-box",x:s,y:i-Pv/2,width:c,height:Pv},{kind:"text",className:"drawing-words-text",x:s+c/2,y:i+4.5,text:a.text}]}}function Ex({agent:a}){return[a.maxCorrections?`up to ${fE(a.maxCorrections,"correction")}`:"no corrections",...a.tools.map(s=>`tool: ${s}`),...a.asks?["asks the person"]:[],...a.whenCallFailsDescription?["saves a result if its call fails"]:[]]}const qh=({lines:a})=>30+Tx*a+6;function mE({agent:a,x:s,axis:i}){const c=Ex({agent:a}),f=i-qh({lines:c.length})/2,d=he({name:a.name});return{kind:"group",className:"drawing-agent",opensAgent:a.name,label:`Open the agent ${d}`,explained:[a.description,`Its reply is accepted when: ${a.replyOutcomeDescription}`,...a.asks?[`It asks the person: ${a.asks}`]:[],...a.whenCallFailsDescription?[`If its call fails: ${a.whenCallFailsDescription}`]:[]],shapes:[{kind:"rect",className:"drawing-agent-box",x:s,y:f,width:kn,height:qh({lines:c.length})},{kind:"text",className:"drawing-agent-name",x:s+kn/2,y:f+22,text:d},...c.map((m,h)=>({kind:"text",className:"drawing-agent-note",x:s+kn/2,y:f+22+Tx*(h+1),text:m}))]}}const Wl=a=>({kind:"path",className:"drawing-flow",d:a}),pE=({x:a,y:s})=>({kind:"path",className:"drawing-arrowhead",d:`M${a} ${s}l-9-3.5v7z`});function gE({phase:a,structure:s,measure:i}){const c=p=>Math.ceil(i({text:p,weight:"plain"}))+20,f=[];let d,m,h;if(a.kind==="code"){const p=he({name:a.name});m=26,h=52,d=1+kn+30,f.push({kind:"group",className:"drawing-code",...a.asks?{label:p,explained:[`It asks the person: ${a.asks}`]}:{},shapes:[{kind:"rect",className:"drawing-code-box",x:1,y:1,width:kn,height:50},{kind:"text",className:"drawing-agent-name",x:1+kn/2,y:23,text:p},{kind:"text",className:"drawing-agent-note",x:1+kn/2,y:40,text:a.asks?"code, asks the person":"code"}]},Wl(`M${kn+2} ${m}H${d-1}`))}else{const p=a.lanes.map(E=>({name:a.lanes.length>1?he({name:E.name}):"",words:dE({lane:E}),agents:E.chain.map(q=>s.agents.find(O=>O.name===q))})),y=Math.max(0,...p.map(({name:E})=>E?i({text:E,weight:"strong"}):0))+(a.lanes.length>1?16:14),x=y+Math.max(...p.map(({words:E})=>E.reduce((q,O)=>q+c(O.text)+12,20)))+16,g=[];let b=1;for(const E of p){const q=Math.max(...E.agents.map(H=>qh({lines:Ex({agent:H}).length}))),O=b+Math.round(q/2)+.5;let C=y+20;f.push(E.name?{kind:"text",className:"drawing-lane-name",x:0,y:O+4.5,text:E.name}:{kind:"circle",className:"drawing-once",cx:5,cy:O,r:4.5},Wl(`M${y} ${O}H${x-9}`));for(const H of E.words){const K=c(H.text);f.push(hE({words:H,x:C,axis:O,width:K})),C+=K+12}E.agents.forEach((H,K)=>{const k=x+K*(kn+Br);K>0&&f.push(Wl(`M${k-Br+1} ${O}H${k-9}`)),f.push(pE({x:k-1,y:O}),mE({agent:H,x:k,axis:O}))}),g.push({axis:O,right:x+E.agents.length*(kn+Br)-Br}),b+=q+Jv}const S=g[0],j=g.at(-1),T=Math.max(...g.map(E=>E.right));if(h=b-Jv,g.length>1){const E=T+32.5;m=Math.round((S.axis+j.axis)/2)+.5,d=E+29,f.push({kind:"path",className:"drawing-rail",d:`M${S.right+1} ${S.axis}H${E-8}a8 8 0 0 1 8 8V${j.axis-8}a8 8 0 0 1-8 8H${j.right+1}`},...g.slice(1,-1).map(q=>Wl(`M${q.right+1} ${q.axis}H${E}`)),Wl(`M${E} ${m}h28`))}else m=S.axis,d=T+40,f.push(Wl(`M${T+1} ${m}H${d-1}`))}return f.push({kind:"path",className:"drawing-end",d:`M${d} ${m-10}v20`}),{width:Math.ceil(d+3),height:Math.ceil(h+1),shapes:f}}const Wv="'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif",yE={plain:`400 13px ${Wv}`,strong:`600 13px ${Wv}`};let qr;const vE=({text:a,weight:s})=>(qr??(qr=document.createElement("canvas").getContext("2d")),qr?(qr.font=yE[s],qr.measureText(a).width):a.length*6.5);function bE(){const[a,s]=X.useState(0);return X.useEffect(()=>{document.fonts.ready.then(()=>s(1))},[]),a}function wx({shape:a,onOpenAgent:s,onExplain:i}){switch(a.kind){case"path":return r.jsx("path",{className:a.className,d:a.d});case"circle":return r.jsx("circle",{className:a.className,cx:a.cx,cy:a.cy,r:a.r});case"rect":{const{kind:p,className:y,...x}=a;return r.jsx("rect",{className:y,...x})}case"text":return r.jsx("text",{className:a.className,x:a.x,y:a.y,children:a.text})}const{opensAgent:c,explained:f}=a,d=c?()=>s(c):void 0,m=a.shapes.map((p,y)=>r.jsx(wx,{shape:p,onOpenAgent:s,onExplain:i},y));if(!d&&!f)return r.jsx("g",{className:a.className,children:m});const h=p=>{if(!f)return;const{left:y,bottom:x}=p.getBoundingClientRect();i({lines:f,left:y,top:x+8})};return r.jsx("g",{className:a.className,role:d?"link":"note",tabIndex:0,"aria-label":[a.label,...f??[]].join(". "),onClick:d,onKeyDown:p=>{!d||p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),d())},onMouseEnter:p=>h(p.currentTarget),onMouseLeave:()=>i(void 0),onFocus:p=>h(p.currentTarget),onBlur:()=>i(void 0),children:m})}function xE({phase:a,structure:s,onOpenAgent:i}){const c=bE(),[f,d]=X.useState(),m=X.useMemo(()=>gE({phase:a,structure:s,measure:vE}),[a,s,c]),h=he({name:a.name});return r.jsxs("div",{className:"sideways-scroll",tabIndex:0,"aria-label":`The structure of ${h}`,children:[r.jsx("svg",{className:"drawing",viewBox:`0 0 ${m.width} ${m.height}`,width:m.width,height:m.height,role:"group","aria-label":`How ${h} runs`,children:m.shapes.map((p,y)=>r.jsx(wx,{shape:p,onOpenAgent:i,onExplain:d},y))}),f&&r.jsx("div",{className:"tooltip drawing-tooltip",role:"tooltip",style:{left:f.left,top:f.top},children:f.lines.map(p=>r.jsx("p",{children:p},p))})]})}function fs(a){var f;const s=a.target.closest("[data-row]");if(!s||a.target.closest("input, textarea"))return;const i=[...a.currentTarget.querySelectorAll("[data-row]")],c=a.key==="ArrowDown"?1:a.key==="ArrowUp"?-1:0;c&&(a.preventDefault(),(f=i[i.indexOf(s)+c])==null||f.focus()),a.key==="Enter"&&a.target===s&&s.click()}const SE=a=>a.map(s=>he({name:s})).join(" or ");function eb({phase:a,structure:s,selected:i,onSelect:c}){const f=he({name:a.name}),d=s.trunk.indexOf(a.name)+1,m=s.sideLines.filter(h=>h.beside.includes(a.name));return r.jsxs("div",{className:i?"phase-row is-selected":"phase-row",tabIndex:0,"data-row":!0,"aria-current":i?"true":void 0,onClick:c,children:[r.jsx("span",{className:"phase-number",children:d>0&&d}),r.jsx("span",{className:"phase-name",title:f,children:f}),m.map(h=>r.jsxs("span",{className:"phase-enters",children:["→ ",he({name:h.name})]},h.name))]})}function jE({structure:a,listed:s,selectedPhase:i,selectedSideLine:c,onSelectPhase:f,onSelectSideLine:d}){const m=y=>a.phases.find(x=>x.name===y);if(s.length!==a.phases.length)return r.jsx("ol",{className:"phase-rows",onKeyDown:fs,children:s.map(y=>r.jsx("li",{children:r.jsx(eb,{phase:y,structure:a,selected:y.name===i,onSelect:()=>f(y.name)})},y.name))});const{trunk:h,sideLines:p}=a;return r.jsxs("div",{className:"lanes",onKeyDown:fs,children:[r.jsxs("section",{className:"lane lane--trunk","aria-label":"Trunk",children:[r.jsx("h3",{className:"lane-title",children:"Trunk"}),r.jsx("ol",{className:"phase-rows",children:h.map((y,x)=>r.jsx("li",{className:["trunk-stop",x===0?"trunk-stop--first":"",x===h.length-1?"trunk-stop--last":""].filter(Boolean).join(" "),children:r.jsx(eb,{phase:m(y),structure:a,selected:!c&&y===i,onSelect:()=>f(y)})},y))})]}),p.map(y=>{const x=y.name===c,g=he({name:y.name});return r.jsxs("section",{className:"lane","aria-label":g,children:[r.jsx("h3",{className:x?"lane-title lane-title--opens is-selected":"lane-title lane-title--opens",tabIndex:0,"data-row":!0,"aria-current":x?"true":void 0,title:y.description,onClick:()=>d(y.name),children:g}),r.jsxs("p",{className:"lane-words",children:["Entered from"," ",y.beside.map((b,S)=>r.jsxs(X.Fragment,{children:[S>0&&" or ",r.jsx("button",{className:"link",type:"button",onClick:()=>f(b),children:he({name:b})})]},b)),", only when: ",y.entersWhenDescription]}),r.jsx("ol",{className:"lane-stops",children:y.phases.map(b=>{const S=!c&&b===i;return r.jsx("li",{className:S?"lane-stop is-selected":"lane-stop",tabIndex:0,"data-row":!0,"aria-current":S?"true":void 0,onClick:()=>f(b),children:r.jsx("span",{className:"lane-stop-name",children:he({name:b})})},b)})}),r.jsxs("p",{className:"lane-words",children:["Then back into"," ",y.beside.length===1?SE(y.beside):"the phase it was entered from","."]})]},y.name)})]})}const NE=a=>a.map(s=>he({name:s})).join(" or ");function TE({sideLine:a,structure:s,blueprintFile:i,onOpenPhase:c}){const f=he({name:a.name}),d=NE(a.beside);return r.jsxs("div",{className:"pane",children:[r.jsxs("header",{className:"pane-heading",children:[r.jsx("h2",{className:"text-heading",children:f}),r.jsx("p",{className:"text-secondary",children:a.description}),r.jsx(qc,{site:a.declaredAt,blueprintFile:i})]}),r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":`The side line ${f}`,children:r.jsxs("article",{className:"piece piece--under-heading",children:[r.jsxs("section",{className:"piece-section",children:[r.jsx("h4",{className:"piece-section-title",children:"When a run goes onto it"}),r.jsx("p",{className:"text-body",children:a.entersWhenDescription}),r.jsxs("p",{className:"text-secondary",children:["This is checked during ",d,", each time that phase has nothing left it can do."," ",a.atMost===1?"A run goes onto the side line at most once.":`A run goes onto the side line at most ${a.atMost} times.`]})]}),r.jsxs("section",{className:"piece-section",children:[r.jsx("h4",{className:"piece-section-title",children:"Its phases, in order"}),r.jsx("ol",{className:"side-line-phases",children:a.phases.map(m=>{var h;return r.jsxs("li",{children:[r.jsx("button",{className:"link",type:"button",onClick:()=>c(m),children:he({name:m})}),r.jsx("span",{className:"text-secondary",children:(h=s.phases.find(p=>p.name===m))==null?void 0:h.description})]},m)})})]}),r.jsxs("section",{className:"piece-section",children:[r.jsx("h4",{className:"piece-section-title",children:"Where the run comes back"}),r.jsxs("p",{className:"text-body",children:["Into ",a.beside.length===1?d:"the trunk phase it left",", which goes on with whatever the side line made possible and then finishes."]})]})]})})]})}const EE=dm("/blueprint"),oh="structure",tb=a=>a.kind==="agents"?[...new Set(a.lanes.flatMap(s=>s.chain))]:[];function wE(){const a=jt(),{view:s="phases",phase:i,agent:c,sideLine:f,search:d=""}=EE.useSearch(),m=Fc(),h=(C,{addsStep:H=!0}={})=>void a({from:"/blueprint",to:"/blueprint",search:K=>({...K,...C}),replace:!H}),p=r.jsxs("header",{className:"screen-header",children:[r.jsx("h1",{className:"text-title",children:"Blueprint"}),r.jsxs("div",{className:"screen-toolbar",children:[r.jsx(Zc,{label:"What of the blueprint is shown",options:[{value:"phases",label:"Phases"},{value:"serializers",label:"Serializers"},{value:"templates",label:"Templates"}],value:s,onChoose:C=>h({view:C})}),s==="phases"&&r.jsx(mm,{label:"Search phases and agents",value:d,onChange:C=>h({search:C||void 0},{addsStep:!1})})]})]});if(m.isError)return r.jsxs(r.Fragment,{children:[p,r.jsx(Zn,{tone:"error",title:"The blueprint cannot be used as its files are now",children:"It is read again when you return to this window."}),r.jsx("div",{className:"code-block",children:m.error.message.split(`
116
+ `).map((C,H)=>r.jsx("div",{className:"code-line",children:C},H))})]});if(!m.data)return r.jsxs(r.Fragment,{children:[p,r.jsx(Je,{children:"Reading the blueprint."})]});const{structure:y}=m.data,x=y.declaredAt.file;if(s!=="phases")return r.jsxs(r.Fragment,{children:[p,r.jsx("div",{className:"panes panes--one",children:r.jsx("div",{className:"pane",children:r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":s,children:s==="serializers"?r.jsx(rE,{structure:y,blueprintFile:x}):r.jsx(oE,{structure:y})})})})]});const g=d.trim().toLowerCase(),b=C=>C.toLowerCase().includes(g)||he({name:C}).toLowerCase().includes(g),S=y.phases.filter(C=>!g||b(C.name)||tb(C).some(b)),j=y.phases.find(C=>C.name===i)??y.phases[0],T=j?tb(j):[],E=y.sideLines.find(C=>C.name===f),q=y.sideLines.filter(C=>j&&C.phases.includes(j.name)),O=y.agents.find(C=>C.name===c&&T.includes(C.name));return r.jsxs(r.Fragment,{children:[p,r.jsxs("div",{className:y.sideLines.length?"panes panes--lanes":"panes",children:[r.jsx("div",{className:"pane",children:r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Phases",children:S.length?r.jsx(jE,{structure:y,listed:S,selectedPhase:j==null?void 0:j.name,selectedSideLine:E==null?void 0:E.name,onSelectPhase:C=>h({phase:C,agent:void 0,sideLine:void 0}),onSelectSideLine:C=>h({sideLine:C,agent:void 0})}):r.jsx(Je,{children:y.phases.length?`No phase or agent is named “${d.trim()}”.`:"This blueprint declares no phases."})})}),E&&r.jsx(TE,{sideLine:E,structure:y,blueprintFile:x,onOpenPhase:C=>h({phase:C,agent:void 0,sideLine:void 0})}),j&&!E&&r.jsxs("div",{className:"pane",children:[r.jsxs("header",{className:"pane-heading",children:[r.jsx("h2",{className:"text-heading",children:he({name:j.name})}),r.jsx("p",{className:"text-secondary",children:j.description}),q.map(C=>r.jsxs("p",{className:"text-secondary",children:[y.trunk.includes(j.name)?"Also stands":"Stands"," on the side line"," ",r.jsx("button",{className:"link",type:"button",onClick:()=>h({sideLine:C.name,agent:void 0}),children:he({name:C.name})}),"."]},C.name)),r.jsx(qc,{site:j.declaredAt,blueprintFile:x})]}),T.length>0&&r.jsx(hm,{label:`What is shown of ${he({name:j.name})}`,tabs:[{value:oh,label:"Structure"},...T.map(C=>({value:`agent:${C}`,label:he({name:C}),icon:"agent"}))],value:O?`agent:${O.name}`:oh,onChoose:C=>h({agent:C===oh?void 0:C.slice(6)})}),r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":O?`The agent ${he({name:O.name})}`:`The structure of ${he({name:j.name})}`,children:O?r.jsx(uE,{agent:O,phase:j,structure:y,blueprintFile:x}):r.jsx(xE,{phase:j,structure:y,onOpenAgent:C=>h({agent:C})})})]})]})]})}const _x=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),Hh=new Intl.NumberFormat("en-US",{minimumFractionDigits:1,maximumFractionDigits:1}),nb=a=>String(a).padStart(2,"0");function ls({count:a}){return _x.format(a)}function Ht({bytes:a}){if(a<1024)return`${a} B`;const s=a/1024;return s<100?`${Hh.format(s)} KB`:s<1024?`${_x.format(s)} KB`:`${Hh.format(s/1024)} MB`}function Wt({ms:a}){if(a<1e3)return`${Math.round(a)} ms`;const s=a/1e3;if(s<60)return`${Hh.format(s)} s`;const i=Math.floor(s/60);return i<60?`${i} min ${nb(Math.floor(s%60))} s`:`${Math.floor(i/60)} h ${nb(i%60)} min`}function ji({usd:a}){return`$${a.toFixed(4)}`}const Cx=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!1}),_E=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"});function CE({at:a}){return Cx.format(new Date(a))}function Tm({at:a,now:s}){const i=new Date(a),c=m=>new Date(m.getFullYear(),m.getMonth(),m.getDate()),f=Math.round((c(s).getTime()-c(i).getTime())/(1440*60*1e3));return`${f===0?"Today":f===1?"Yesterday":_E.format(i)} ${Cx.format(i)}`}function RE({call:a,runStatus:s}){return a.failedAccepted?"failed-accepted":a.outcome==="accepted"||a.outcome==="sent-back"?a.outcome:a.outcome==="asked"||a.ended==="asked"?"asked":a.ended==="failed"||a.ended==="stopped"?a.ended:s==="running"?"in-progress":"stopped"}function AE({assignment:a,record:s,runStatus:i}){return a.status==="waiting-to-start"?a.mayStart?"waiting-for-slot":"waiting-for-condition":a.status!=="running"?a.status:i==="running"?"running":s.failedAssignmentId===a.id?"failed":"stopped"}function Rx({shownPhase:a,record:s,runStatus:i}){return a.finishedAt?a.codePhase||a.assignmentIds.some(f=>s.progress.assignments[f].status!=="dropped")?"finished":"nothing-to-do":i==="waiting"?"waiting-for-person":i}function Ax({record:a}){var c;const{openVisit:s,phasePosition:i}=a.progress;return((c=s==null?void 0:s.position)==null?void 0:c.place)??(i==null?void 0:i.phase)}function OE({record:a,structure:s,runStatus:i}){const{startedFrom:c}=a.progress,f=(c==null?void 0:c.runId)??"",d=a.start.phase?ll({name:a.start.phase}):void 0,m=a.start.openVisit,h=d?s.trunk.indexOf((m==null?void 0:m.during)??d.phase)-(m?1:0):-1,p=[...m?[m]:[],...a.visits],y=({place:g,fromRun:b})=>{const S=a.phases.find(j=>j.phase===g);return S?{kind:"ran",shownPhase:S,status:Rx({shownPhase:S,record:a,runStatus:i})}:b?{kind:"from-run",phase:g,runId:f}:{kind:"not-reached",phase:g}},x=g=>{var b;return i==="finished"||!!((b=a.phases.find(S=>S.phase===g))!=null&&b.finishedAt)};return{trunk:s.trunk.map((g,b)=>({name:g,row:y({place:g,fromRun:b<=h}),entered:s.sideLines.filter(S=>p.some(j=>j.sideLine===S.name&&j.during===g))})),sideLanes:s.sideLines.map(g=>{const b=p.filter(S=>S.sideLine===g.name);return{sideLine:g,standing:b.length?"entered":x(g.beside.at(-1))?"not-needed":"not-reached",visits:b.map(({visit:S,during:j})=>{var q;const E=((q=d==null?void 0:d.sideLine)==null?void 0:q.name)===g.name&&d.sideLine.visit===S?g.phases.indexOf(d.phase):-1;return{visit:S,during:j,rows:g.phases.map((O,C)=>y({place:Q2({phase:O,sideLine:{name:g.name,visit:S}}),fromRun:C<=E}))}})}})}}const ME=["input","cached","output","reasoning"];function li({calls:a}){const s={calls:0,sentBack:0,tokens:{input:0,cached:0,output:0,reasoning:0},callsNotReporting:{input:0,cached:0,output:0,reasoning:0},durationMs:0,promptSizeInBytes:0,costUsd:0,programCostUsd:0};for(const i of a)if(i.outcome==="sent-back"&&(s.sentBack+=1),s.promptSizeInBytes+=i.promptSizeInBytes,!!i.tokens){s.calls+=1,s.durationMs+=i.durationMs??0,s.costUsd+=i.costUsd??0,s.programCostUsd+=i.programCostUsd??0;for(const c of ME)i.tokens[c]===void 0?s.callsNotReporting[c]+=1:s.tokens[c]+=i.tokens[c]}return s}function DE({record:a}){const s=a.callIds.map(c=>a.calls[c]),i=c=>[...new Set(s.map(c))];return{whole:li({calls:s}),byPhase:i(c=>c.phase).map(c=>{var f;return{phase:c,clockMs:((f=a.phases.find(d=>d.phase===c))==null?void 0:f.clockMs)??0,sums:li({calls:s.filter(d=>d.phase===c)})}}),byAgent:i(c=>c.agent).map(c=>({agent:c,sums:li({calls:s.filter(f=>f.agent===c)})}))}}function zE({record:a,questionId:s}){var i;return(i=a.callIds.map(c=>a.calls[c]).find(c=>c.questionIds.includes(s)))==null?void 0:i.agent}function UE({record:a,questionId:s}){const{owner:i}=a.progress.questions[s];return"phase"in i?i.phase:a.progress.assignments[i.assignmentId].phase}function ms({call:a,runStatus:s}){const i=RE({call:a,runStatus:s});return i==="failed"&&a.retried?"failed-made-again":i}function en({place:a}){const{phase:s,sideLine:i}=ll({name:a});if(!i)return he({name:s});const c=i.visit>1?`, visit ${i.visit}`:"";return`${he({name:s})} on ${he({name:i.name})}${c}`}function kt({look:a,small:s=!1,destructive:i=!1,icon:c,loading:f=!1,disabled:d=!1,className:m,label:h,onPress:p,children:y}){const x=["button",`button--${a}`,s&&"button--small",i&&"button--destructive",h&&!y&&"button--icon",f&&"is-loading",d&&"is-disabled",m];return r.jsxs("button",{type:"button",className:x.filter(Boolean).join(" "),disabled:d||f,"aria-label":h,title:h,onClick:p,children:[f?r.jsx(A2,{}):c&&r.jsx(Oe,{name:c}),y]})}const fh=200,dh=4e3,LE={added:{sign:"+",word:"Added"},changed:{sign:"±",word:"Changed"},removed:{sign:"−",word:"Removed"}};function BE({path:a}){return a.map((s,i)=>typeof s=="number"?`[${s}]`:i?`.${s}`:s).join("")}function kh(a){return Array.isArray(a)?`[${a.map(kh).join(", ")}]`:a!==null&&typeof a=="object"?`{${Object.entries(a).map(([s,i])=>`${JSON.stringify(s)}: ${kh(i)}`).join(", ")}}`:JSON.stringify(a)??"undefined"}function ab({label:a,value:s}){const i=kh(s);return r.jsxs("div",{className:`change-value change-value--${a}`,children:[r.jsx("span",{className:"change-value-label",children:a}),r.jsx("code",{className:"code",children:i.length>dh?`${i.slice(0,dh)}… (${i.length-dh} more characters)`:i})]})}function Ox({runId:a,record:s,madeBy:i,place:c=""}){if("resume"in i)return r.jsx("span",{className:c,children:"Resume · defaults the run state’s shape had gained"});if("codePhase"in i)return r.jsxs(at,{className:`link ${c}`,to:"/runs/$runId/phases/$phase",params:{runId:a,phase:i.codePhase},children:[en({place:i.codePhase})," · code phase"]});const f=s.calls[i.callId],d=s.progress.assignments[f.assignmentId],m=d.key==="once"?void 0:d.label;return r.jsx(at,{className:`link ${c}`,to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:f.phase,assignmentId:f.assignmentId,callId:f.callId},search:{tab:"changes"},children:[he({name:f.agent}),m,`attempt ${f.attempt}`].filter(Boolean).join(" · ")})}function Mx({entry:a,source:s}){const{sign:i,word:c}=LE[a.kind];return r.jsxs("li",{className:"change-row",children:[r.jsxs("span",{className:`change-kind change-kind--${a.kind}`,children:[r.jsx("span",{className:"change-sign",children:i}),c]}),r.jsx("code",{className:"change-place",children:BE({path:a.path})||"the whole state"}),s,r.jsxs("div",{className:"change-values",children:[a.kind!=="added"&&r.jsx(ab,{label:"before",value:a.before}),a.kind!=="removed"&&r.jsx(ab,{label:"after",value:a.after})]})]})}function qE({runId:a,record:s,changes:i}){const[c,f]=X.useState(fh),d=i.flatMap(m=>m.entries.map(h=>({change:m,entry:h})));return r.jsxs(r.Fragment,{children:[r.jsx("ol",{className:"change-list",children:d.slice(0,c).map(({change:m,entry:h},p)=>r.jsx(Mx,{entry:h,source:r.jsx(Ox,{runId:a,record:s,madeBy:m.madeBy,place:"change-source"})},p))}),d.length>c&&r.jsxs(kt,{look:"outline",small:!0,onPress:()=>f(c+fh),children:["Show ",Math.min(fh,d.length-c)," more of ",d.length-c]})]})}function HE({runId:a,call:s,runStatus:i}){const c=ms({call:s,runStatus:i});return r.jsxs(r.Fragment,{children:[s.change.length?r.jsx("ol",{className:"change-list",children:s.change.map((f,d)=>r.jsx(Mx,{entry:f},d))}):r.jsx("p",{className:"text-secondary",children:c==="sent-back"?"Nothing was saved. This reply was sent back.":c==="in-progress"?"This call has changed nothing in the run state so far.":"This call changed nothing in the run state."}),s.artifacts.length?r.jsx("ul",{className:"text-body",children:s.artifacts.map(f=>r.jsxs("li",{children:["Wrote"," ",r.jsx(at,{className:"link",to:"/runs/$runId/phases/$phase",params:{runId:a,phase:s.phase},search:{tab:"artifacts",artifact:f.id},children:f.name})," ",r.jsx("span",{className:"table-cell-detail",children:Ht({bytes:f.sizeInBytes})})]},f.id))}):r.jsx("p",{className:"text-secondary",children:"This call wrote no artifacts."})]})}function Ni(){return r.jsx("span",{className:"not-reported","aria-label":"Not reported",children:"—"})}function el(){return r.jsx("span",{className:"pending",children:"not yet"})}function Em(){return r.jsx("span",{className:"no-charge",children:"No charge"})}const Ei={codex:"Codex","claude-code":"Claude Code","openai-api":"OpenAI API","anthropic-api":"Anthropic API","bedrock-api":"AWS Bedrock","gemini-api":"Gemini API",scripted:"Scripted replies",custom:"Host inference"},wm={running:"running",waiting:"waiting-person",stopped:"stopped",failed:"failed",finished:"finished"},_m=({answeredBy:a})=>a==="openai-api"||a==="anthropic-api"||a==="bedrock-api"||a==="gemini-api",kE=({checkpoint:a})=>a.slice(a.indexOf("-")+1),QE=a=>a.charAt(0).toUpperCase()+a.slice(1);function YE({startedAt:a}){const[s,i]=X.useState(()=>Date.now());return X.useEffect(()=>{const c=setInterval(()=>i(Date.now()),1e3);return()=>clearInterval(c)},[]),`${Math.max(0,Math.round((s-Date.parse(a))/1e3))} s so far`}function IE({call:a,record:s,runStatus:i}){const c=ms({call:a,runStatus:i}),f=a.change.length,d=a.questionIds.map(m=>s.progress.questions[m].question.text);switch(c){case"accepted":return f?`Accepted by the outcome. It changed ${f} ${f===1?"place":"places"} in the run state.`:"Accepted by the outcome. It changed nothing in the run state.";case"sent-back":return r.jsxs(r.Fragment,{children:["Sent back by the outcome: ",r.jsx("code",{className:"code",children:a.correction})]});case"asked":return`${a.outcome==="asked"?"The outcome":"A tool"} asked the person: ${d.join(" ")}`;case"in-progress":return a.ended?"The reply has arrived and is being judged.":`Waiting for ${Ei[a.answeredBy]} to reply.`;case"failed-made-again":return`The call failed and was made again as attempt ${a.attempt+1}.`;case"failed-accepted":return"The call failed for good. The agent’s rule for a failed call saved something in its place, and the assignment went on.";case"failed":return"The call failed for good, so the run failed.";default:return"The call was cut off when the run stopped, before it was judged."}}function GE({runId:a,call:s,record:i,structure:c,runStatus:f}){const d=i.progress.assignments[s.assignmentId],m=c.phases.find(T=>T.name===ll({name:s.phase}).phase),h=(m==null?void 0:m.kind)==="agents"?m.lanes.find(T=>T.name===d.lane):void 0,p=(h==null?void 0:h.assignments.kind)==="forEach"?h.assignments.repeats:1,y=ms({call:s,runStatus:f}),x=s.ended!==void 0,g={runId:a,phase:s.phase},{tokens:b}=s,S=(T,E)=>T!==void 0?E(T):x||y==="stopped"?r.jsx(Ni,{}):r.jsx(el,{}),j=[["Model",s.model??"None"],["Effort",s.effort?QE(s.effort):"None"],["Answered by",Ei[s.answeredBy]],["Duration",s.durationMs!==void 0?Wt({ms:s.durationMs}):y==="in-progress"?r.jsx(YE,{startedAt:s.startedAt}):r.jsx(Ni,{})],["Cost",_m({answeredBy:s.answeredBy})?S(s.costUsd,T=>ji({usd:T})):r.jsx(Em,{})],["Program’s estimate",S(s.programCostUsd,T=>ji({usd:T}))],["Input tokens",S(b==null?void 0:b.input,T=>ls({count:T}))],["of which cached",S(b==null?void 0:b.cached,T=>ls({count:T}))],["Output tokens",S(b==null?void 0:b.output,T=>ls({count:T}))],["of which reasoning",S(b==null?void 0:b.reasoning,T=>ls({count:T}))],["Prompt size",Ht({bytes:s.promptSizeInBytes})]];return r.jsxs("header",{className:"call-header",children:[r.jsxs("div",{className:"call-title-line",children:[r.jsxs("nav",{className:"path","aria-label":"Where this call belongs",children:[r.jsxs(at,{className:"path-item",to:"/runs/$runId",params:{runId:a},search:{tab:"state"},children:["Run ",a]}),r.jsx(Oe,{name:"chevron-right",className:"path-separator"}),r.jsx(at,{className:"path-item",to:"/runs/$runId/phases/$phase",params:g,children:en({place:s.phase})}),r.jsx(Oe,{name:"chevron-right",className:"path-separator"}),d.key!=="once"&&r.jsxs(r.Fragment,{children:[r.jsxs(at,{className:"path-item",to:"/runs/$runId/phases/$phase",params:g,children:[d.label,p>1&&r.jsxs("span",{className:"path-detail",children:[" ","repeat ",d.repeat," of ",p]})]}),r.jsx(Oe,{name:"chevron-right",className:"path-separator"})]})]}),r.jsxs("h1",{className:"text-title",children:[he({name:s.agent}),", attempt ",s.attempt]}),r.jsx(Tn,{kind:y})]}),r.jsx("p",{className:"call-outcome-line",children:r.jsx(IE,{call:s,record:i,runStatus:f})}),r.jsx("dl",{className:"facts",children:j.map(([T,E])=>r.jsxs("div",{className:"fact",children:[r.jsx("dt",{className:"fact-label",children:T}),r.jsx("dd",{className:"fact-value",children:E})]},T))})]})}function VE({runId:a,record:s,runStatus:i,current:c}){const f=jt(),d=s.callIdsOfAssignment[c.assignmentId].map(h=>s.calls[h]),m=h=>{h&&f({to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:h.phase,assignmentId:h.assignmentId,callId:h.callId},search:p=>p})};return r.jsx("ol",{className:"call-sequence",children:d.map(h=>{const p=ms({call:h,runStatus:i});return r.jsxs("li",{className:h===c?"call-sequence-item is-current":"call-sequence-item",role:"link",tabIndex:0,"aria-current":h===c?"page":void 0,onClick:()=>m(h),onKeyDown:y=>{y.key==="Enter"&&m(h)},children:[r.jsx(Xn,{kind:p}),r.jsxs("span",{className:"call-sequence-name",children:[he({name:h.agent})," ",r.jsxs("span",{className:"call-sequence-attempt",children:["attempt ",h.attempt]})]}),r.jsx("span",{className:"call-sequence-outcome",children:Si({kind:p})}),r.jsx("span",{className:"call-sequence-duration",children:h.durationMs!==void 0?Wt({ms:h.durationMs}):p==="in-progress"&&r.jsx(el,{})})]},h.callId)})})}const sb=a=>new TextEncoder().encode(a).length;function KE({callFile:a,structure:s}){const{inputs:i,templates:c,prompt:f}=a,d=i.reduce((h,p)=>h+p.sizeInBytes,0),m=c.map(({template:h,ranges:p})=>{const y=p.reduce((x,{start:g,end:b})=>x+sb(f.slice(g,b)),0);return`${h}, ${Ht({bytes:y})}`});return i.length?r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Placeholder"}),r.jsx("th",{className:"table-heading",children:"Description"}),r.jsx("th",{className:"table-heading",children:"Serializer"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Size"})]})}),r.jsx("tbody",{children:i.map(h=>{const p=s.serializers.find(y=>y.name===h.serializer);return r.jsxs("tr",{className:"table-row",children:[r.jsx("td",{className:"table-cell",children:r.jsx("code",{className:"code",children:r.jsx("mark",{className:"placeholder",children:`{{${h.placeholder}}}`})})}),r.jsx("td",{className:"table-cell table-cell--wrap",children:h.description}),r.jsxs("td",{className:"table-cell table-cell--wrap",children:[h.serializer," ",p&&r.jsx("span",{className:"table-cell-detail",children:p.description})]}),r.jsx("td",{className:"table-cell table-cell--number",children:Ht({bytes:h.sizeInBytes})})]},h.placeholder)})}),r.jsx("tfoot",{children:r.jsxs("tr",{className:"table-row table-row--totals",children:[r.jsxs("td",{className:"table-cell",colSpan:3,children:[i.length," ",i.length===1?"input":"inputs"," ",r.jsxs("span",{className:"table-cell-detail",children:["of a prompt of ",Ht({bytes:sb(f)}),m.length>0&&`, which also places the ${m.length===1?"template":"templates"} ${m.join(" and ")}`]})]}),r.jsx("td",{className:"table-cell table-cell--number",children:Ht({bytes:d})})]})})]}):r.jsx(Je,{children:"This agent’s prompt has no inputs: every call is sent the prompt file as written."})}function Ps({text:a}){return a.split(`
117
+ `).map((s,i)=>r.jsx("div",{className:"code-line",children:s},i))}function lb({value:a}){return r.jsx(Ps,{text:JSON.stringify(a,null,2)??"undefined"})}function Dx({text:a,className:s}){const[i,c]=X.useState(!1),f=()=>void navigator.clipboard.writeText(a).then(()=>{c(!0),setTimeout(()=>c(!1),1500)});return r.jsxs(r.Fragment,{children:[r.jsx(kt,{look:"quiet",small:!0,icon:"copy",className:s,onPress:f,children:"Copy"}),i&&r.jsx("div",{className:"toasts",role:"status",children:r.jsxs("div",{className:"toast",children:[r.jsx(Oe,{name:"check",className:"toast-icon"}),"Copied"]})})]})}function XE({call:a}){const s=[...a.inputs.flatMap(({placeholder:f,ranges:d})=>d.map(m=>({kind:"input",name:f,...m}))),...a.templates.flatMap(({template:f,ranges:d})=>d.map(m=>({kind:"template",name:f,...m})))].sort((f,d)=>f.start-d.start),i=[];let c=0;for(const f of s)f.start>c&&i.push({kind:"file-text",start:c,end:f.start}),i.push(f),c=f.end;return c<a.prompt.length&&i.push({kind:"file-text",start:c,end:a.prompt.length}),i}const ZE=a=>new TextEncoder().encode(a).length,FE=/\{\{([A-Za-z_]\w*)\}\}/g;function $E({promptFile:a}){return r.jsx("div",{className:"code-block code-block--reading",children:a.text.split(`
118
+ `).map((s,i)=>{const c=[];let f=0;for(const d of s.matchAll(FE))c.push(s.slice(f,d.index),r.jsx("mark",{className:a.templates.includes(d[1])?"template-include":"placeholder",children:d[0]},d.index)),f=d.index+d[0].length;return r.jsxs("div",{className:"code-line",children:[c,s.slice(f)]},i)})})}function JE({text:a,isFirst:s,isLast:i}){const c=a.split(`
119
+ `);return!s&&c[0]===""&&c.shift(),!i&&c.at(-1)===""&&c.pop(),c.join(`
120
+ `)}function PE({runId:a,record:s,callFile:i,answeredBy:c,showsFile:f,onShowsFileChange:d}){const m=XE({call:i}),h=p=>i.inputs.find(y=>y.placeholder===p);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"prompt-toolbar",children:[r.jsx(Zc,{label:"What of the prompt is shown",options:[{value:"prompt",label:"Prompt"},{value:"file",label:"Prompt file"}],value:f?"file":"prompt",onChoose:p=>d(p==="file")}),r.jsx("span",{className:"prompt-toolbar-size",children:f?i.promptFile.path:Ht({bytes:ZE(i.prompt)})}),r.jsx(Dx,{text:f?i.promptFile.text:i.prompt,className:"prompt-toolbar-end"})]}),r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The prompt",children:f?r.jsx($E,{promptFile:i.promptFile}):r.jsxs("div",{className:"prompt-view",children:[i.launcherInstruction&&r.jsxs("section",{className:"prompt-launcher",children:[r.jsxs("div",{className:"prompt-part-label",children:[r.jsx("span",{className:"prompt-part-name",children:"The launcher’s instruction"}),r.jsxs("span",{className:"prompt-part-detail",children:["written by the ",Ei[c]," launcher and sent beside the prompt"]})]}),r.jsx("div",{className:"prompt-text",children:r.jsx(Ps,{text:i.launcherInstruction})})]}),m.map((p,y)=>{const x=JE({text:i.prompt.slice(p.start,p.end),isFirst:y===0,isLast:y===m.length-1}),g=r.jsx("div",{className:"prompt-text",children:r.jsx(Ps,{text:x})});return p.kind==="input"?r.jsxs("section",{className:"prompt-input",children:[r.jsxs("div",{className:"prompt-input-label",children:[r.jsx("span",{className:"prompt-input-name",children:p.name}),r.jsxs("span",{className:"prompt-input-detail",children:["serializer ",h(p.name).serializer]}),r.jsx("span",{className:"prompt-input-detail",children:Ht({bytes:h(p.name).sizeInBytes})})]}),g]},p.start):p.kind==="template"?r.jsxs("section",{className:"prompt-template",children:[r.jsxs("div",{className:"prompt-template-label",children:[r.jsx("span",{className:"prompt-template-name",children:p.name}),r.jsx("span",{className:"prompt-input-detail",children:"text from this template"})]}),g]},p.start):x===""&&p.end-p.start<=1?null:r.jsx("div",{className:"prompt-text",children:r.jsx(Ps,{text:x})},p.start)}),i.attachedImages.map(({name:p,artifactId:y})=>{const x=s.artifacts.find(({artifact:S})=>S.id===y),g=(x==null?void 0:x.artifact)??s.start.artifacts[p],b=g?`${vm({runId:a,file:`artifacts/${y}/${p}`})}?type=${encodeURIComponent(g.mediaType)}`:void 0;return r.jsxs("figure",{className:"prompt-image",children:[r.jsxs("figcaption",{className:"prompt-part-label",children:[r.jsx("span",{className:"prompt-part-name",children:"Attached image"}),r.jsxs("span",{className:"prompt-part-detail",children:[p,g&&` · ${Ht({bytes:g.sizeInBytes})}`]})]}),r.jsx("div",{className:"prompt-image-frame",tabIndex:0,children:b&&r.jsx("img",{className:"artifact-image",src:b,alt:p})})]},y)})]})})]})}function WE({toolCall:a}){const[s,i]=X.useState(!1),c=a.status==="failed",f=["call-event","tool-call",s&&"is-open",c&&"is-error"];return r.jsxs("li",{className:f.filter(Boolean).join(" "),children:[r.jsx(Oe,{name:"tool",className:"call-event-icon"}),r.jsxs("div",{className:"call-event-body",children:[r.jsxs("div",{className:"tool-call-header",role:"button",tabIndex:0,"aria-expanded":s,onClick:()=>i(!s),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(!s))},children:[r.jsx(Oe,{name:s?"chevron-down":"chevron-right",className:"tool-call-toggle"}),r.jsx("span",{className:"tool-call-name",children:a.tool}),c?r.jsx(Tn,{kind:"returned-error"}):a.status==="asked"?r.jsx(Tn,{kind:"asked",label:"Asked the person"}):r.jsx(Tn,{kind:"finished",label:"Returned a result"}),r.jsx("span",{className:"tool-call-duration",children:Wt({ms:a.durationMs})})]}),c&&a.error&&r.jsx("p",{className:"tool-call-error",children:a.error}),s&&r.jsxs("div",{className:"tool-call-body",children:[r.jsxs("div",{className:"tool-call-part",children:[r.jsx("span",{className:"field-label",children:"Arguments"}),r.jsx("div",{className:"code-block",children:r.jsx(lb,{value:a.arguments})})]}),a.result!==void 0&&r.jsxs("div",{className:"tool-call-part",children:[r.jsx("span",{className:"field-label",children:"Result"}),r.jsx("div",{className:"code-block",children:r.jsx(lb,{value:a.result})})]})]})]})]})}function ew({reasoningTokens:a}){return r.jsxs("p",{className:"reasoning-none",children:[r.jsx(Oe,{name:"reasoning"}),a===void 0?r.jsx("span",{children:"Reasoning was not reported."}):a===0?r.jsx("span",{children:"The model did not reason."}):r.jsxs("span",{children:["The provider returned no reasoning summary."," ",r.jsxs("span",{className:"reasoning-none-detail",children:["The model used ",ls({count:a})," reasoning tokens."]})]})]})}function tw({callFile:a,ended:s}){var m;const{tools:i,toolCalls:c,reasoning:f}=a,d=[...c.flatMap((h,p)=>[...f.filter(y=>y.afterToolCalls===p),h]),...f.filter(h=>h.afterToolCalls>=c.length)];return r.jsxs(r.Fragment,{children:[i.length?r.jsxs("p",{className:"tools-offered",children:[r.jsx("span",{className:"tools-offered-label",children:"Tools offered"}),i.map(h=>r.jsxs("span",{className:"tool-offered",children:[r.jsx(Oe,{name:"tool"}),r.jsx("span",{className:"tool-offered-name",children:h.name}),r.jsx("span",{className:"tool-offered-description",children:h.description})]},h.name))]}):r.jsxs("p",{className:"reasoning-none",children:[r.jsx(Oe,{name:"tool"}),r.jsx("span",{children:"This agent was offered no tools."})]}),s&&!f.length&&r.jsx(ew,{reasoningTokens:(m=a.tokens)==null?void 0:m.reasoning}),d.length>0&&r.jsx("ol",{className:"call-events",children:d.map((h,p)=>"tool"in h?r.jsx(WE,{toolCall:h},p):r.jsxs("li",{className:"call-event reasoning-summary",children:[r.jsx(Oe,{name:"reasoning",className:"call-event-icon"}),r.jsxs("div",{className:"call-event-body",children:[r.jsx("h4",{className:"call-event-title",children:"Reasoning summary"}),r.jsx("p",{className:"reasoning-summary-text",children:h.text})]})]},p))})]})}const ib=50,cb=a=>JSON.stringify(a),Qh=a=>a!==null&&typeof a=="object",Yh=a=>Array.isArray(a)?a.map((s,i)=>[i,s]):Object.entries(a);function zx({state:a,search:s}){const i=s.trim().toLowerCase(),c=[];let f=0;const d=(m,h)=>{if(Qh(m))return Yh(m).forEach(([x,g])=>d(g,[...h,x]));const p=JSON.stringify(m).toLowerCase();let y=0;for(let x=p.indexOf(i);x>=0;x=p.indexOf(i,x+i.length))y+=1;y&&c.push({path:h,count:y,firstNumber:f}),f+=y};return i&&d(a,[]),{wanted:i,places:c,total:f}}function ub({matches:a,number:s}){return[...a.places].reverse().find(i=>i.firstNumber<=s)}function nw({text:a,wanted:s,firstNumber:i,currentNumber:c}){const f=[],d=a.toLowerCase();let m=0,h=i;for(let p=d.indexOf(s);p>=0;p=d.indexOf(s,m))f.push(a.slice(m,p),r.jsx("mark",{className:h===c?"state-match is-current":"state-match",children:a.slice(p,p+s.length)},p)),m=p+s.length,h+=1;return r.jsxs(r.Fragment,{children:[f,a.slice(m)]})}function Ux({state:a,matches:s,currentNumber:i,openPaths:c,onOpenPathsChange:f}){const[d,m]=X.useState({}),h=X.useMemo(()=>{const b=Object.create(null);for(const S of s.places)b[cb(S.path)]=S;return b},[s]),p=b=>s.places.filter(S=>b.every((j,T)=>S.path[T]===j)).reduce((S,j)=>S+j.count,0),y=(b,S)=>{const j={...c};S?j[b]=!0:delete j[b],f(j)},x=(b,S,j)=>{!j||b.key!=="ArrowRight"&&b.key!=="ArrowLeft"||(b.preventDefault(),y(S,b.key==="ArrowRight"))},g=(b,S,j)=>{const T=cb(j);if(!Qh(S)){const H=h[T],K=JSON.stringify(S);return r.jsx("li",{className:"state-node",children:r.jsxs("div",{className:"state-row",tabIndex:0,"data-row":!0,"data-path":T,children:[r.jsx("span",{className:"state-key",children:b}),r.jsx("span",{className:"state-value",children:H?r.jsx(nw,{text:K,wanted:s.wanted,firstNumber:H.firstNumber,currentNumber:i}):K})]})},T)}const E=Yh(S),q=!!c[T]&&E.length>0,O=ib+(d[T]??0),C=q?0:p(j);return r.jsxs("li",{className:"state-node",children:[r.jsxs("div",{className:"state-row",tabIndex:0,"data-row":!0,"data-path":T,"aria-expanded":E.length?q:void 0,onClick:()=>E.length&&y(T,!q),onKeyDown:H=>x(H,T,E.length>0),children:[E.length>0&&r.jsx(Oe,{name:q?"chevron-down":"chevron-right",className:"state-toggle"}),r.jsx("span",{className:"state-key",children:b}),r.jsx("span",{className:"state-summary",children:Array.isArray(S)?`list of ${E.length}`:`${E.length} ${E.length===1?"key":"keys"}`}),C>0&&r.jsxs("span",{className:"state-match-count",children:[C," ",C===1?"match":"matches"," inside"]})]}),q&&r.jsxs("ul",{className:"state-children",children:[E.slice(0,O).map(([H,K])=>g(H,K,[...j,H])),E.length>O&&r.jsx("li",{className:"state-node",children:r.jsx("div",{className:"state-row",tabIndex:0,"data-row":!0,onClick:()=>m({...d,[T]:(d[T]??0)+ib}),children:r.jsxs("span",{className:"state-more",children:[E.length-O," more"]})})})]})]},T)};return Qh(a)?r.jsx("ul",{className:"state-tree",onKeyDown:fs,children:Yh(a).map(([b,S])=>g(b,S,[b]))}):r.jsx("p",{className:"text-body",children:JSON.stringify(a)})}const aw=a=>new TextEncoder().encode(a).length,sw=zx({state:void 0,search:""});function lw({parsed:a}){if(Array.isArray(a))return`list of ${a.length}`;if(a!==null&&typeof a=="object"){const s=Object.keys(a).length;return`${s} ${s===1?"key":"keys"}`}return""}function iw({call:a,record:s,structure:i,runStatus:c}){var m;const f=ms({call:a,runStatus:c});if(f==="sent-back"){const h=s.callIdsOfAssignment[a.assignmentId].map(y=>s.calls[y]).filter(y=>y.agent===a.agent&&y.outcome==="sent-back"&&y.startedSeq<=a.startedSeq).length,p=(m=i.agents.find(y=>y.name===a.agent))==null?void 0:m.maxCorrections;return r.jsxs("div",{className:"correction",children:[r.jsxs("div",{className:"correction-header",children:[r.jsx(Tn,{kind:"sent-back"}),r.jsxs("span",{className:"correction-detail",children:["by the outcome · correction ",h,p!==void 0&&` of ${p}`]})]}),r.jsx("div",{className:"code-block",children:r.jsx(Ps,{text:a.correction??""})})]})}if(f!=="failed"&&f!=="failed-made-again"&&f!=="failed-accepted")return null;const d={failed:"the run failed","failed-made-again":"the call was made again","failed-accepted":"the assignment went on"}[f];return r.jsxs("div",{className:"correction",children:[r.jsxs("div",{className:"correction-header",children:[r.jsx(Tn,{kind:f}),r.jsxs("span",{className:"correction-detail",children:[a.durationMs!==void 0&&`after ${Wt({ms:a.durationMs})} · `,d]})]}),r.jsxs("p",{className:"failure-text",children:[f==="failed-accepted"?"The call failed for good. The agent’s rule for a failed call saved something in its place.":"The call failed."," ","What was reported:"]}),r.jsx("div",{className:"code-block",children:r.jsx(Ps,{text:a.failure??"Nothing."})})]})}function cw({call:a,callFile:s,record:i,structure:c,runStatus:f}){const[d,m]=X.useState(!1),[h,p]=X.useState({}),{replyText:y,replyParsed:x}=s,g=ms({call:a,runStatus:f}),b=r.jsx(iw,{call:a,record:i,structure:c,runStatus:f});return r.jsx(r.Fragment,{children:y===void 0?r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The reply",children:[r.jsx(Je,{children:g==="in-progress"?"The reply has not arrived yet.":"No reply arrived for this call."}),b]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"reply-toolbar",children:[r.jsx(Zc,{label:"How the reply is shown",options:[{value:"written",label:"As written"},{value:"parsed",label:"As parsed"}],value:d?"parsed":"written",onChoose:S=>m(S==="parsed")}),r.jsx("span",{className:"reply-toolbar-size",children:d?lw({parsed:x}):Ht({bytes:aw(y)})}),!d&&r.jsx(Dx,{text:y,className:"reply-toolbar-end"})]}),r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The reply",children:[d?x===void 0?r.jsx(Je,{children:a.outcome?"The reply was read as it was written; it has no parsed form.":"The reply has not been read yet."}):r.jsx(Ux,{state:x!==null&&typeof x=="object"?x:{reply:x},matches:sw,currentNumber:0,openPaths:h,onOpenPathsChange:p}):r.jsx("div",{className:"code-block code-block--reading",children:r.jsx(Ps,{text:y})}),b]})]})})}const rb=dm("/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId");function uw(){var T;const a=jt(),{runId:s,callId:i}=rb.useParams(),{tab:c="prompt",file:f}=rb.useSearch(),d=$c(),m=jx({runId:s}),{record:h,structure:p,problem:y}=jm({runId:s}),x=h==null?void 0:h.calls[i],g=x?x.toolCalls+(x.ended?1:0)+(x.outcome?1:0)+(x.failedAccepted?1:0):0,b=eE({runId:s,callId:i,savedTimes:g});if(y||d.data&&!m||h&&!x)return r.jsx(Zn,{tone:"error",title:`Call ${i} of run ${s} could not be read`,children:y??(h?"The run has no call with this name.":"There is no such run.")});if(!m||!h||!p||!x)return r.jsx(Je,{children:"Reading the call."});const S=m.summary.status,j=E=>void a({to:".",search:q=>({...q,...E}),replace:E.tab===void 0});return r.jsxs(r.Fragment,{children:[r.jsx(GE,{runId:s,call:x,record:h,structure:p,runStatus:S}),r.jsxs("div",{className:"panes",children:[r.jsx("div",{className:"pane",children:r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The calls of this assignment",children:r.jsx(VE,{runId:s,record:h,runStatus:S,current:x})})}),r.jsxs("div",{className:"pane",children:[r.jsx(hm,{label:"What is shown of the call",tabs:[{value:"prompt",label:"Prompt"},{value:"inputs",label:"Inputs",count:(T=b.data)==null?void 0:T.inputs.length},{value:"reasoning",label:"Reasoning and tools"},{value:"reply",label:"Reply"},{value:"changes",label:"Changes",count:x.change.length}],value:c,onChoose:E=>j({tab:E})}),b.isError?r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The call’s file",children:r.jsx(Zn,{tone:"error",title:"This call’s file could not be read",children:b.error.message})}):b.data?r.jsxs(r.Fragment,{children:[c==="prompt"&&r.jsx(PE,{runId:s,record:h,callFile:b.data,answeredBy:x.answeredBy,showsFile:!!f,onShowsFileChange:E=>j({file:E||void 0})}),c==="inputs"&&r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The call’s inputs",children:r.jsx(KE,{callFile:b.data,structure:p})}),c==="reasoning"&&r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Reasoning and tools",children:r.jsx(tw,{callFile:b.data,ended:x.ended!==void 0})}),c==="reply"&&r.jsx(cw,{call:x,callFile:b.data,record:h,structure:p,runStatus:S}),c==="changes"&&r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"What the call changed",children:r.jsx(HE,{runId:s,call:x,runStatus:S})})]}):r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The call’s file",children:r.jsx(Je,{children:"Reading the call’s file."})})]})]})]})}function rw(){return r.jsxs("div",{className:"connection-banner",role:"status",children:[r.jsx(Oe,{name:"warning",className:"connection-banner-icon"}),r.jsx("span",{className:"connection-banner-title",children:"The connection to the devtool is lost."}),r.jsx("span",{className:"connection-banner-text",children:"This page has stopped updating. Start the dev command again to reconnect."})]})}function ow(){var i;const a=Fc(),s=vx({select:c=>c.location.pathname.startsWith("/blueprint")});return r.jsxs("header",{className:"top-bar",children:[r.jsx("span",{className:"top-bar-name",children:((i=a.data)==null?void 0:i.structure.name)??"Dagma"}),r.jsxs("nav",{className:"top-bar-destinations",children:[r.jsx(at,{to:"/blueprint",className:`top-bar-destination${s?" is-selected":""}`,children:"Blueprint"}),r.jsx(at,{to:"/runs",className:`top-bar-destination${s?"":" is-selected"}`,children:"Runs"})]}),a.data&&r.jsxs("span",{className:"top-bar-loaded",title:"The blueprint’s files are read again each time this screen or a run is opened, each time a run starts, and when you return to this window.",children:["Blueprint loaded at ",CE({at:a.data.loadedAt})]})]})}function fw(){const a=W2();return J2(),r.jsxs(r.Fragment,{children:[r.jsx(O2,{}),!a&&r.jsx(rw,{}),r.jsx(ow,{}),r.jsx(gx,{})]})}const dw=1e6,hw={"text/html":"HTML page","text/plain":"Text file","text/markdown":"Markdown file","application/json":"JSON file","image/png":"PNG image","image/jpeg":"JPEG image","image/webp":"WebP image","image/svg+xml":"SVG image"},Lx=a=>`artifacts/${a.id}/${a.name}`,mw=({runId:a,artifact:s})=>`${vm({runId:a,file:Lx(s)})}?type=${encodeURIComponent(s.mediaType)}`,pw=({mediaType:a})=>a.startsWith("text/")||a==="application/json";function gw({runId:a,artifact:s}){const i=mw({runId:a,artifact:s}),c=pw(s)&&s.mediaType!=="text/html"&&s.sizeInBytes<=dw,f=ds({queryKey:["artifact-text",a,s.id],queryFn:()=>Bc({runId:a,file:Lx(s)}),enabled:c,staleTime:1/0});return r.jsxs("div",{className:"artifact-preview",children:[r.jsxs("div",{className:"artifact-preview-header",children:[r.jsx("span",{className:"artifact-preview-name",children:s.name}),r.jsx("span",{className:"artifact-preview-detail",children:Ht({bytes:s.sizeInBytes})}),r.jsx("a",{className:"link artifact-preview-open",href:i,target:"_blank",rel:"noreferrer",children:"Open"})]}),s.mediaType==="text/html"?r.jsx("iframe",{className:"artifact-preview-frame artifact-preview-frame--page",title:`Preview of ${s.name}`,sandbox:"",src:i}):s.mediaType.startsWith("image/")?r.jsx("div",{className:"artifact-preview-frame artifact-preview-frame--image",children:r.jsx("img",{className:"artifact-image",src:i,alt:s.name})}):c?r.jsx("pre",{className:"artifact-preview-frame artifact-preview-frame--text",tabIndex:0,role:"region","aria-label":`Preview of ${s.name}`,children:f.data??(f.isError?`It could not be read: ${f.error.message}`:"")}):r.jsx(Je,{children:"This kind of file has no preview here. Open shows it in its own tab."})]})}function yw({runId:a,record:s,shownPhase:i,chosenId:c,onChoose:f}){const d=i?s.artifacts.filter(p=>p.phase===i.phase):s.artifacts,m=i?[]:Object.values(s.start.artifacts).filter(p=>p.sourceRunId),h=d.find(({artifact:p})=>p.id===c)??d[0];return!d.length&&!m.length?r.jsx(Je,{children:i?`${en({place:i.phase})} ${i.finishedAt?"wrote":"has written"} no artifacts.`:"This run has written no artifacts yet."}):r.jsxs(r.Fragment,{children:[r.jsxs("table",{className:"table",onKeyDown:fs,children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Name"}),r.jsx("th",{className:"table-heading",children:"Type"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Size"}),r.jsx("th",{className:"table-heading",children:"Written by"})]})}),r.jsx("tbody",{children:d.map(({artifact:p,madeBy:y})=>r.jsxs("tr",{className:p.id===(h==null?void 0:h.artifact.id)?"table-row is-selected":"table-row",tabIndex:0,"data-row":!0,"aria-selected":p.id===(h==null?void 0:h.artifact.id),onClick:()=>f(p.id),children:[r.jsx("td",{className:"table-cell",children:r.jsxs("span",{className:"artifact-name",children:[r.jsx(Oe,{name:p.mediaType.startsWith("image/")?"image":"file"}),p.name]})}),r.jsx("td",{className:"table-cell",children:hw[p.mediaType]??p.mediaType}),r.jsx("td",{className:"table-cell table-cell--number",children:Ht({bytes:p.sizeInBytes})}),r.jsx("td",{className:"table-cell",children:r.jsx(Ox,{runId:a,record:s,madeBy:y})})]},p.id))})]}),m.length>0&&r.jsxs(Zn,{tone:"info",title:"Artifacts of the run this one started from",children:[m.map(p=>p.name).join(", "),". They are listed with the run that wrote them."]}),h&&r.jsx(gw,{runId:a,artifact:h.artifact})]})}const Bx={finished:"finished","nothing-to-do":"nothing-to-do",running:"running","waiting-for-person":"waiting-person",failed:"failed",stopped:"stopped"};function ro({sums:a}){return a.calls===0?null:a.callsNotReporting.input===a.calls&&a.callsNotReporting.output===a.calls?r.jsx(Ni,{}):ls({count:a.tokens.input+a.tokens.output})}function qx({shownPhase:a,record:s}){const i=a.assignmentIds.map(f=>s.progress.assignments[f]).filter(f=>f.status!=="dropped"),c=i.filter(f=>f.status==="finished").length;return{assignments:c===i.length?String(c):`${c} of ${i.length}`,duration:Wt({ms:a.clockMs}),sums:li({calls:a.callIds.map(f=>s.calls[f])})}}const so=a=>he({name:ll({name:a}).phase});function ob({entered:a}){return a.map(s=>r.jsxs("span",{className:"phase-enters",children:["→ ",he({name:s.name})]},s.name))}function vw({trunkRow:{row:a,entered:s},record:i,structure:c,stopClass:f}){var y;if(a.kind!=="ran")return r.jsxs(r.Fragment,{children:[r.jsx("td",{className:`table-cell ${f}`,children:r.jsxs("span",{className:"run-phase run-phase--not-reached",children:[r.jsx(Xn,{kind:a.kind==="from-run"?"from-run":"not-reached",alone:!0}),r.jsx("span",{className:"run-phase-name",children:so(a.phase)}),r.jsx(ob,{entered:s})]})}),r.jsx("td",{className:"table-cell table-cell--number",colSpan:3,children:a.kind==="from-run"?r.jsxs(at,{className:"link run-phase-note",to:"/runs/$runId",params:{runId:a.runId},children:["From run ",a.runId]}):r.jsx("span",{className:"run-phase-note",children:"Not reached"})})]});const{shownPhase:d,status:m}=a,h=qx({shownPhase:d,record:i}),p=((y=c.phases.find(x=>x.name===d.phase))==null?void 0:y.kind)==="code";return r.jsxs(r.Fragment,{children:[r.jsx("td",{className:`table-cell ${f}`,children:r.jsxs("span",{className:"run-phase",children:[r.jsx(Xn,{kind:Bx[m],alone:!0}),r.jsx("span",{className:"run-phase-name",children:so(d.phase)}),r.jsx(ob,{entered:s})]})}),m==="nothing-to-do"?r.jsx("td",{className:"table-cell table-cell--number",colSpan:3,children:r.jsx("span",{className:"run-phase-note",children:"Nothing to do"})}):r.jsxs(r.Fragment,{children:[r.jsx("td",{className:"table-cell table-cell--number",children:p?r.jsx("span",{className:"run-phase-note",children:"code phase"}):h.assignments}),r.jsx("td",{className:"table-cell table-cell--number",children:h.duration}),r.jsx("td",{className:"table-cell table-cell--number",children:r.jsx(ro,{sums:h.sums})})]})]})}function bw({runId:a,lane:{sideLine:s,standing:i,visits:c},record:f,selected:d}){const m=jt(),h=s.beside.map(p=>he({name:p})).join(" or ");return i!=="entered"?r.jsx("p",{className:"lane-words",title:s.description,children:i==="not-needed"?`Not needed. It is entered from ${h} only when: ${s.entersWhenDescription}`:`Entered from ${h}, only when: ${s.entersWhenDescription}`}):c.map(({visit:p,during:y,rows:x})=>r.jsxs("div",{className:"lane-visit",title:s.entersWhenDescription,children:[r.jsxs("p",{className:"lane-words",children:["Entered from ",he({name:y})]}),r.jsx("ol",{className:"lane-stops",children:x.map(g=>{if(g.kind!=="ran")return r.jsxs("li",{className:"lane-stop lane-stop--not-run",children:[r.jsx(Xn,{kind:g.kind==="from-run"?"from-run":"not-reached",alone:!0}),r.jsx("span",{className:"lane-stop-name",children:so(g.phase)}),r.jsx("span",{className:"lane-stop-detail",children:g.kind==="from-run"?`From run ${g.runId}`:"Not reached"})]},g.phase);const{shownPhase:b,status:S}=g,j=qx({shownPhase:b,record:f}),T=d===b.phase;return r.jsxs("li",{className:T?"lane-stop is-selected":"lane-stop",tabIndex:0,"data-row":!0,"aria-selected":T,title:`${j.assignments} assignments, ${j.duration}`,onClick:E=>{E.stopPropagation(),m({to:"/runs/$runId/phases/$phase",params:{runId:a,phase:b.phase}})},children:[r.jsx(Xn,{kind:Bx[S],alone:!0}),r.jsx("span",{className:"lane-stop-name",children:so(b.phase)}),r.jsx("span",{className:"lane-stop-detail",children:S==="nothing-to-do"?"Nothing to do":j.duration})]},b.phase)})})]},p))}function xw({runId:a,record:s,structure:i,runStatus:c,selected:f}){const d=jt(),{trunk:m,sideLanes:h}=OE({record:s,structure:i,runStatus:c}),p=s.phases.length,y=li({calls:s.callIds.map(x=>s.calls[x])});return r.jsxs("table",{className:"table",onKeyDown:fs,children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Phase"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Assignments"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Duration"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Tokens"}),h.map(({sideLine:x})=>r.jsx("th",{className:"table-heading lane-heading",children:he({name:x.name})},x.name))]})}),r.jsx("tbody",{children:m.map((x,g)=>{const{name:b,row:S}=x,j=["trunk-stop",g===0?"trunk-stop--first":"",g===m.length-1?"trunk-stop--last":""].filter(Boolean).join(" "),T=f===b,E=S.kind==="ran";return r.jsxs("tr",{className:T?"table-row is-selected":"table-row",...E?{tabIndex:0,"data-row":!0,"aria-selected":T}:{},onClick:E?()=>void d({to:"/runs/$runId/phases/$phase",params:{runId:a,phase:b}}):void 0,children:[r.jsx(vw,{trunkRow:x,record:s,structure:i,stopClass:j}),g===0&&h.map(q=>r.jsx("td",{className:"table-cell lane-cell",rowSpan:m.length,onClick:O=>O.stopPropagation(),children:r.jsx(bw,{runId:a,lane:q,record:s,selected:f})},q.sideLine.name))]},b)})}),r.jsx("tfoot",{children:r.jsxs("tr",{className:f?"table-row table-row--totals":"table-row table-row--totals is-selected",tabIndex:0,"data-row":!0,"aria-selected":!f,onClick:()=>void d({to:"/runs/$runId",params:{runId:a},search:{tab:"state"}}),children:[r.jsxs("td",{className:"table-cell",colSpan:2,children:["The whole run"," ",r.jsxs("span",{className:"table-cell-detail",children:[p," ",p===1?"phase":"phases"," run"]})]}),r.jsx("td",{className:"table-cell table-cell--number",children:Wt({ms:s.progress.totals.durationMs})}),r.jsx("td",{className:"table-cell table-cell--number",children:r.jsx(ro,{sums:y})}),h.map(({sideLine:x})=>r.jsx("td",{className:"table-cell lane-cell"},x.name))]})})]})}const $r={"waiting-for-condition":"waiting-condition","waiting-for-slot":"waiting-slot",running:"running","waiting-for-person":"waiting-person",finished:"finished",failed:"failed",stopped:"stopped",dropped:"dropped"};function Sw({runId:a,record:s,runStatus:i,assignment:c,lane:f}){const d=c.agents??(f==null?void 0:f.chain)??[],m=s.callIdsOfAssignment[c.id].map(h=>s.calls[h]);return r.jsx("span",{className:"chain",children:d.map((h,p)=>{const y=m.filter(x=>x.placeInChain===p);return r.jsxs(X.Fragment,{children:[p>0&&r.jsx(Oe,{name:"chevron-right",className:"chain-arrow"}),r.jsxs("span",{className:y.length?"chain-agent":"chain-agent is-not-started",children:[r.jsx("span",{className:"chain-agent-name",children:he({name:h})}),y.length>0&&r.jsx("span",{className:"attempts",children:y.map(x=>{const g=ms({call:x,runStatus:i});return r.jsx(at,{className:"attempt","aria-label":`Attempt ${x.attempt}, ${Si({kind:g}).toLowerCase()}`,title:`Attempt ${x.attempt}, ${Si({kind:g}).toLowerCase()}`,to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:c.phase,assignmentId:c.id,callId:x.callId},onClick:b=>b.stopPropagation(),children:r.jsx(Xn,{kind:g})},x.callId)})})]})]},h)})})}function jw({shown:a,record:s,runStatus:i,runReason:c,lane:f}){var h,p;const{assignment:d,status:m}=a;if(m==="waiting-for-condition"&&(f==null?void 0:f.assignments.kind)==="forEach")return f.assignments.startsWhenDescription;if(m==="failed")return c;if(m==="stopped")return i==="failed"?"The run failed while this assignment was in progress.":"The run stopped while this assignment was in progress.";if(m==="dropped")return"It was no longer listed when its turn came.";if(m==="waiting-for-person"){const y=(h=d.pendingAsk)==null?void 0:h.questionIds.map(g=>s.progress.questions[g]).find(g=>g.answer===void 0),x=(p=d.agents)==null?void 0:p[d.placeInChain];return y&&`${x?he({name:x}):"It"} asks: ${y.question.text}`}}function Nw({runId:a,record:s,runStatus:i,runReason:c,shown:f,lane:d}){const m=jt(),{assignment:h,status:p}=f,y=s.callIdsOfAssignment[h.id],x=li({calls:y.map(T=>s.calls[T])}),g=y.at(-1),b=(d==null?void 0:d.assignments.kind)==="forEach"?d.assignments.repeats:1,S=jw({shown:f,record:s,runStatus:i,runReason:c,lane:d}),j=y.length>0;return r.jsxs("tr",{className:"table-row assignment-row",...g?{tabIndex:0,"data-row":!0,onClick:()=>void m({to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:h.phase,assignmentId:h.id,callId:g}})}:{},children:[r.jsxs("td",{className:"table-cell",children:[(d==null?void 0:d.assignments.kind)==="once"?"The whole phase":h.label,b>1&&r.jsxs(r.Fragment,{children:[" ",r.jsxs("span",{className:"table-cell-detail",children:["repeat ",h.repeat," of ",b]})]})]}),r.jsxs("td",{className:"table-cell",children:[r.jsx(Tn,{kind:$r[p]}),S&&r.jsx("span",{className:"assignment-reason",children:S})]}),r.jsx("td",{className:"table-cell",children:p!=="dropped"&&r.jsx(Sw,{runId:a,record:s,runStatus:i,assignment:h,lane:d})}),r.jsx("td",{className:"table-cell table-cell--number",children:x.calls>0?Wt({ms:x.durationMs}):j&&r.jsx(el,{})}),r.jsx("td",{className:"table-cell table-cell--number",children:x.calls>0?r.jsx(ro,{sums:x}):j&&r.jsx(el,{})})]})}const Tw=["waiting-for-person","failed","running","waiting-for-slot","waiting-for-condition","stopped","finished","dropped"];function Ew({lane:a}){const{assignments:s}=a;return s.kind==="once"?s.onlyWhenDescription?`Once, only when: ${s.onlyWhenDescription}`:"Once.":`${s.description} ${s.concurrency} at once.`}function ww({runId:a,record:s,runStatus:i,runReason:c,shownPhase:f,phase:d,narrowedTo:m,onNarrow:h,above:p,below:y}){const x=f.assignmentIds.map(S=>{const j=s.progress.assignments[S];return{assignment:j,status:AE({assignment:j,record:s,runStatus:i})}}),g=x.filter(({status:S})=>!m||S===m),b=[...d.lanes.map(S=>S.name),...new Set(x.map(({assignment:S})=>S.lane).filter(S=>!d.lanes.some(j=>j.name===S)))];return x.length?r.jsxs(r.Fragment,{children:[r.jsx(D2,{label:"Assignments by status",counts:[{value:void 0,count:x.length,label:"in all"},...Tw.map(S=>({value:S,status:$r[S],count:x.filter(j=>j.status===S).length,label:Si({kind:$r[S]}).toLowerCase()})).filter(({count:S})=>S>0)],value:m,onChoose:h}),r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Assignments",children:[p,r.jsxs("table",{className:"table",onKeyDown:fs,children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Subject"}),r.jsx("th",{className:"table-heading",children:"Status"}),r.jsx("th",{className:"table-heading",children:"Agents and their attempts"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Duration"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Tokens"})]})}),r.jsx("tbody",{children:b.map(S=>{const j=d.lanes.find(E=>E.name===S),T=g.filter(({assignment:E})=>E.lane===S);return T.length?r.jsxs(X.Fragment,{children:[b.length>1&&r.jsx("tr",{className:"lane-divider",children:r.jsx("td",{className:"lane-divider-cell",colSpan:5,children:r.jsxs("span",{className:"lane-label",children:[r.jsx("svg",{className:"notation-mark","aria-hidden":"true",children:r.jsx("use",{href:"#n-lane"})}),r.jsx("span",{className:"lane-name",children:he({name:S})}),j&&r.jsx("span",{className:"lane-detail",children:Ew({lane:j})}),r.jsxs("span",{className:"lane-count",children:[T.length," ",T.length===1?"assignment":"assignments"]})]})})}),T.map(E=>r.jsx(Nw,{runId:a,record:s,runStatus:i,runReason:c,shown:E,lane:j},E.assignment.id))]},S):null})})]}),!g.length&&m&&r.jsxs(Je,{children:["No assignment is"," ",Si({kind:$r[m]}).toLowerCase()," now."," ",r.jsx("a",{className:"link",onClick:()=>h(void 0),children:"Show all assignments"})]}),y]})]}):r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Assignments",children:[p,r.jsx(Je,{children:f.finishedAt?"This phase had nothing to do: none of its lanes called for an assignment.":"No assignment has been created yet."}),y]})}const hh=100,Hx=({tokens:a})=>a&&(a.input!==void 0||a.output!==void 0)?(a.input??0)+(a.output??0):void 0,Tc={duration:a=>a.durationMs,tokens:Hx,"prompt-size":a=>a.promptSizeInBytes};function mh({figure:a,largest:s,inProgress:i,children:c}){return a===void 0?r.jsxs("span",{className:"figure-with-bar",children:[r.jsx("span",{className:"figure-bar-none"}),i?r.jsx("span",{className:"figure-value pending",children:"not yet"}):r.jsx("span",{className:"figure-value not-reported","aria-label":"Not reported",children:"—"})]}):r.jsxs("span",{className:"figure-with-bar",children:[r.jsxs("svg",{className:"figure-bar",viewBox:"0 0 100 3",preserveAspectRatio:"none","aria-hidden":"true",children:[r.jsx("rect",{className:"figure-bar-track",width:"100",height:"3"}),r.jsx("rect",{className:"figure-bar-fill",width:s?Math.round(100*a/s):0,height:"3"})]}),r.jsx("span",{className:"figure-value",children:c(a)})]})}function _w({runId:a,record:s,runStatus:i}){const c=jt(),[f,d]=X.useState("duration"),[m,h]=X.useState(hh),p=s.callIds.map(b=>s.calls[b]),y=b=>Math.max(0,...p.map(S=>b(S)??0)),x=[...p].sort((b,S)=>(Tc[f](S)??-1)-(Tc[f](b)??-1)),g=(b,S)=>r.jsx("th",{className:f===S?"table-heading table-heading--number is-sorted":"table-heading table-heading--number","aria-sort":f===S?"descending":void 0,children:r.jsxs("button",{type:"button",className:"table-sort",onClick:()=>d(S),children:[b,r.jsx(Oe,{name:"chevron-down"})]})});return r.jsxs(r.Fragment,{children:[r.jsxs("table",{className:"table",onKeyDown:fs,children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Agent"}),r.jsx("th",{className:"table-heading",children:"Phase"}),r.jsx("th",{className:"table-heading",children:"Subject"}),r.jsx("th",{className:"table-heading",children:"Outcome"}),g("Duration","duration"),g("Tokens","tokens"),g("Prompt size","prompt-size")]})}),r.jsx("tbody",{children:x.slice(0,m).map(b=>{const S=s.progress.assignments[b.assignmentId],j=b.ended===void 0&&i==="running";return r.jsxs("tr",{className:"table-row",tabIndex:0,"data-row":!0,onClick:()=>void c({to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:b.phase,assignmentId:b.assignmentId,callId:b.callId}}),children:[r.jsxs("td",{className:"table-cell",children:[he({name:b.agent})," ",r.jsxs("span",{className:"table-cell-detail",children:["attempt ",b.attempt]})]}),r.jsx("td",{className:"table-cell",children:en({place:b.phase})}),r.jsx("td",{className:"table-cell",children:S.key==="once"?"The whole phase":S.label}),r.jsx("td",{className:"table-cell",children:r.jsx(Tn,{kind:ms({call:b,runStatus:i})})}),r.jsx("td",{className:"table-cell table-cell--number",children:r.jsx(mh,{figure:b.durationMs,largest:y(Tc.duration),inProgress:j,children:T=>Wt({ms:T})})}),r.jsx("td",{className:"table-cell table-cell--number",children:r.jsx(mh,{figure:Hx(b),largest:y(Tc.tokens),inProgress:j,children:T=>ls({count:T})})}),r.jsx("td",{className:"table-cell table-cell--number",children:r.jsx(mh,{figure:b.promptSizeInBytes,largest:y(Tc["prompt-size"]),inProgress:!1,children:T=>Ht({bytes:T})})})]},b.callId)})})]}),x.length>m&&r.jsxs(kt,{look:"outline",small:!0,onPress:()=>h(m+hh),children:["Show ",Math.min(hh,x.length-m)," more of ",x.length-m]})]})}function Hr({sums:a,timeMs:s,answeredBy:i,runStatus:c}){const f=d=>r.jsx("td",{className:"table-cell table-cell--number",children:d});return a?r.jsxs(r.Fragment,{children:[f(a.calls),f(Wt({ms:s})),f(a.calls?r.jsx(ro,{sums:a}):c==="running"&&r.jsx(el,{})),f(_m({answeredBy:i})?ji({usd:a.costUsd}):r.jsx(Em,{})),f(a.programCostUsd>0?ji({usd:a.programCostUsd}):r.jsx(Ni,{}))]}):r.jsxs(r.Fragment,{children:[f(null),f(Wt({ms:s})),f(null),f(null),f(null)]})}function fb({sums:a}){const s=Math.max(a.callsNotReporting.input,a.callsNotReporting.output);return s?r.jsxs(r.Fragment,{children:[" ",r.jsxs("span",{className:"table-cell-detail",children:[s," ",s===1?"call":"calls"," did not report tokens"]})]}):null}const db=(a,s)=>r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:a}),r.jsx("th",{className:"table-heading table-heading--number",children:"Calls"}),r.jsx("th",{className:"table-heading table-heading--number",children:s}),r.jsx("th",{className:"table-heading table-heading--number",children:"Tokens"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Cost"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Program’s estimate"})]})});function Cw({runId:a,record:s,structure:i,runStatus:c,answeredBy:f}){const d=DE({record:s}),m=s.phases.map(p=>p.phase),h=p=>{var y;return((y=s.phases.find(x=>x.phase===p))==null?void 0:y.clockMs)??0};return s.phases.length?r.jsxs(r.Fragment,{children:[r.jsx("h3",{className:"text-heading",children:"Calls"}),s.callIds.length?r.jsx(_w,{runId:a,record:s,runStatus:c}):r.jsx(Je,{children:"This run has made no calls yet."}),r.jsx("h3",{className:"text-heading",children:"By phase"}),r.jsxs("table",{className:"table",children:[db("Phase","Clock time"),r.jsx("tbody",{children:m.map(p=>{var g,b;const y=((g=i.phases.find(S=>S.name===ll({name:p}).phase))==null?void 0:g.kind)==="code",x=[y&&"code phase, no calls"].filter(Boolean);return r.jsxs("tr",{className:"table-row",children:[r.jsxs("td",{className:"table-cell",children:[en({place:p}),x.length>0&&r.jsxs(r.Fragment,{children:[" ",r.jsx("span",{className:"table-cell-detail",children:x.join(" · ")})]})]}),r.jsx(Hr,{sums:y?void 0:((b=d.byPhase.find(S=>S.phase===p))==null?void 0:b.sums)??d.whole.calls===0?{...d.whole}:void 0,timeMs:h(p),answeredBy:f,runStatus:c})]},p)})}),r.jsx("tfoot",{children:r.jsxs("tr",{className:"table-row table-row--totals",children:[r.jsxs("td",{className:"table-cell",children:[m.length," ",m.length===1?"phase":"phases",r.jsx(fb,{sums:d.whole})]}),r.jsx(Hr,{sums:d.whole,timeMs:s.progress.totals.durationMs,answeredBy:f,runStatus:c})]})})]}),r.jsx("h3",{className:"text-heading",children:"By agent"}),r.jsxs("table",{className:"table",children:[db("Agent","Time in calls"),r.jsx("tbody",{children:d.byAgent.map(({agent:p,sums:y})=>r.jsxs("tr",{className:"table-row",children:[r.jsx("td",{className:"table-cell",children:he({name:p})}),r.jsx(Hr,{sums:y,timeMs:y.durationMs,answeredBy:f,runStatus:c})]},p))}),r.jsx("tfoot",{children:r.jsxs("tr",{className:"table-row table-row--totals",children:[r.jsxs("td",{className:"table-cell",children:[d.byAgent.length," ",d.byAgent.length===1?"agent":"agents",r.jsx(fb,{sums:d.whole})]}),r.jsx(Hr,{sums:d.whole,timeMs:d.whole.durationMs,answeredBy:f,runStatus:c})]})})]})]}):r.jsx(Je,{children:"No phase of this run has started yet."})}const Rw={finished:"finished","nothing-to-do":"nothing-to-do",running:"running","waiting-for-person":"waiting-person",failed:"failed",stopped:"stopped"};function Aw({runId:a,record:s,shownPhase:i,phase:c,status:f,runReason:d}){const m=({madeBy:g})=>"codePhase"in g&&g.codePhase===i.phase,h=s.changes.filter(m).reduce((g,b)=>g+b.entries.length,0),p=s.artifacts.filter(m),y={runId:a,phase:i.phase},x=f==="failed"||f==="stopped"?d:void 0;return r.jsxs("table",{className:"table",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"table-head",children:[r.jsx("th",{className:"table-heading",children:"Code phase"}),r.jsx("th",{className:"table-heading",children:"Status"}),r.jsx("th",{className:"table-heading table-heading--number",children:"Duration"}),r.jsx("th",{className:"table-heading",children:"Changed"}),r.jsx("th",{className:"table-heading",children:"Wrote"})]})}),r.jsx("tbody",{children:r.jsxs("tr",{className:x?"table-row assignment-row":"table-row",children:[r.jsx("td",{className:"table-cell table-cell--wrap",children:r.jsxs("span",{className:"run-phase",children:[r.jsx("svg",{className:"notation-mark code-phase-mark","aria-hidden":"true",children:r.jsx("use",{href:"#n-code-phase"})}),r.jsx("span",{children:c.description})]})}),r.jsxs("td",{className:"table-cell",children:[r.jsx(Tn,{kind:Rw[f]}),x&&r.jsx("span",{className:"assignment-reason",children:x})]}),r.jsx("td",{className:"table-cell table-cell--number",children:i.codePhase?Wt({ms:i.codePhase.durationMs}):f==="running"&&r.jsx(el,{})}),r.jsx("td",{className:"table-cell",children:i.codePhase&&(h?r.jsxs(at,{className:"link",to:"/runs/$runId/phases/$phase",params:y,search:{tab:"state",changes:!0},children:[h," ",h===1?"place":"places"," in the run state"]}):"Nothing in the run state")}),r.jsxs("td",{className:"table-cell",children:[p.map(({artifact:g},b)=>r.jsxs(X.Fragment,{children:[b>0&&", ",r.jsx(at,{className:"link",to:"/runs/$runId/phases/$phase",params:y,search:{tab:"artifacts",artifact:g.id},children:g.name})," ",r.jsx("span",{className:"table-cell-detail",children:Ht({bytes:g.sizeInBytes})})]},g.id)),i.codePhase&&!p.length&&"Nothing"]})]})})]})}function Qs({label:a,error:s,hint:i,className:c,children:f}){return r.jsxs("label",{className:c?`field ${c}`:"field",children:[r.jsx("span",{className:"field-label",children:a}),f,s&&r.jsxs("div",{className:"field-message",role:"alert",children:[r.jsx(Oe,{name:"error"}),r.jsx("span",{children:s})]}),!s&&i&&r.jsx("p",{className:"field-hint",children:i})]})}function Cm({value:a,placeholder:s,invalid:i=!1,onChange:c}){return r.jsx("div",{className:i?"input is-error":"input",children:r.jsx("input",{className:"field-value",value:a,placeholder:s,"aria-invalid":i,onChange:f=>c(f.target.value)})})}function Ow({value:a,code:s=!1,invalid:i=!1,onChange:c}){const f=["textarea",s&&"textarea--code",i&&"is-error"];return r.jsx("div",{className:f.filter(Boolean).join(" "),children:r.jsx("textarea",{className:"field-value",value:a,spellCheck:!s,"aria-invalid":i,onChange:d=>c(d.target.value)})})}function Mw({runId:a,asked:s,asker:i,phase:c,answeredAt:f}){var j,T;const{question:d}=s,[m,h]=X.useState((j=d.recommended)==null?void 0:j.choice),[p,y]=X.useState(""),x=p.trim()||m,g=Pr({mutationFn:()=>Lc({path:`/api/runs/${a}/answers`,body:{questionId:s.id,answer:x}})}),b=en({place:c}),S=i?he({name:i}):`The code phase ${b}`;if(s.answer!==void 0){const E=s.answeredBy==="run"&&((T=d.recommended)==null?void 0:T.choice)===s.answer?`: ${d.recommended.reason}`:".",q=f?`, ${Tm({at:f,now:new Date}).replace(/^Today /,"today at ")}`:"";return r.jsxs("section",{className:"question is-answered",children:[r.jsxs("p",{className:"question-source",children:[r.jsx(Xn,{kind:"finished"}),r.jsxs("span",{children:[S," asked, in the phase ",b]})]}),r.jsx("h3",{className:"question-text",children:d.text}),r.jsx("p",{className:"question-answer",children:s.answer}),r.jsxs("p",{className:"question-answered-by",children:["Answered by the ",s.answeredBy==="run"?"recommendation":"person",q,E]})]})}return r.jsxs("section",{className:"question",children:[r.jsxs("p",{className:"question-source",children:[r.jsx(Xn,{kind:"waiting-person"}),r.jsxs("span",{children:[S," asks, in the phase ",b]})]}),r.jsx("h3",{className:"question-text",children:d.text}),d.choices&&r.jsx("ul",{className:"question-choices",role:"radiogroup","aria-label":d.text,children:d.choices.map(E=>{var q;return r.jsxs("li",{className:"question-choice",children:[r.jsxs("label",{className:"choice",children:[r.jsx("input",{className:"visually-hidden",type:"radio",name:`question-${s.id}`,checked:E===m&&!p.trim(),onChange:()=>{h(E),y("")}}),r.jsx("span",{className:E===m&&!p.trim()?"radio is-on":"radio"}),r.jsx("span",{className:"choice-label",children:E})]}),((q=d.recommended)==null?void 0:q.choice)===E&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"question-recommended",children:"Recommended"}),r.jsx("p",{className:"question-reason",children:d.recommended.reason})]})]},E)})}),r.jsx(Qs,{label:d.choices?"Or type your own answer":"Your answer",children:r.jsx(Cm,{value:p,placeholder:"An answer of your own",onChange:y})}),g.isError&&r.jsx(Zn,{tone:"error",marked:!0,title:"The answer was not saved",children:g.error.message}),r.jsx("div",{className:"question-actions",children:r.jsx(kt,{look:"filled",disabled:!x,loading:g.isPending||g.isSuccess,onPress:()=>g.mutate(),children:g.isPending||g.isSuccess?"Answering":"Answer"})})]})}function kx({kind:a,labelledBy:s,onClose:i,children:c}){const f=X.useRef(null);return X.useEffect(()=>{var m;const d=document.activeElement;return(m=f.current)==null||m.focus(),()=>d==null?void 0:d.focus()},[]),r.jsx("div",{className:"modal",onMouseDown:d=>{d.target===d.currentTarget&&i()},onKeyDown:d=>{d.key==="Escape"&&(d.stopPropagation(),i())},children:r.jsx("div",{ref:f,className:a,role:a==="dialog"?"dialog":"alertdialog","aria-modal":"true","aria-labelledby":s,tabIndex:-1,children:c})})}function hb({title:a,text:s,destructive:i=!1,onConfirm:c,onCancel:f}){const d=X.useId();return r.jsxs(kx,{kind:"confirmation",labelledBy:d,onClose:f,children:[r.jsx("h3",{className:"confirmation-title",id:d,children:a}),r.jsx("p",{className:"confirmation-text",children:s}),r.jsxs("div",{className:"confirmation-actions",children:[r.jsx(kt,{look:"outline",onPress:f,children:"Cancel"}),r.jsx(kt,{look:"filled",destructive:i,onPress:c,children:"Confirm"})]})]})}const Ec=(a,s)=>`${a} ${s}${a===1?"":"s"}`;function Dw({runId:a,record:s,assignmentId:i,children:c}){var m;const f=s.progress.assignments[i],d=(m=s.callIdsOfAssignment[i])==null?void 0:m.at(-1);return!f||!d?null:r.jsx(at,{className:"link",to:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",params:{runId:a,phase:f.phase,assignmentId:i,callId:d},children:c})}function zw({runId:a,row:s,record:i}){var m;const{summary:c}=s,{progress:f}=i,d=Ax({record:i});if(c.status==="running"&&d){const h=f.assignmentIds.map(y=>f.assignments[y]).filter(y=>y.phase===d&&y.status!=="dropped"),p=h.filter(y=>y.status==="finished").length;return r.jsxs(r.Fragment,{children:[en({place:d}),h.length>0&&` · ${p} of ${Ec(h.length,"assignment")} finished`]})}if(c.status==="waiting"){const h=f.questionIds.map(b=>f.questions[b]).filter(b=>b.answer===void 0),p=h[0];if(!p)return"A question waits for an answer.";const y="assignmentId"in p.owner?f.assignments[p.owner.assignmentId]:void 0,x=y?((m=y.agents)==null?void 0:m[y.placeInChain])??y.label:"phase"in p.owner?p.owner.phase:"The run",g=y??("phase"in p.owner?p.owner:void 0);return r.jsxs(r.Fragment,{children:[he({name:x})," asks: ",p.question.text,h.length>1&&` (and ${Ec(h.length-1,"more question")})`," ",g&&r.jsx(at,{className:"link",to:"/runs/$runId/phases/$phase",params:{runId:a,phase:g.phase},search:{status:"waiting-for-person"},children:"Go to the question"})]})}if(c.status==="finished"){const{totals:h}=f;return[Ec(i.phases.length,"phase"),Ec(h.calls,"call"),Ec(h.corrections,"correction"),Wt({ms:h.durationMs})].join(" · ")}return r.jsxs(r.Fragment,{children:[c.reason," ",i.failedAssignmentId&&r.jsx(Dw,{runId:a,record:i,assignmentId:i.failedAssignmentId,children:"Open the call"})]})}function Uw({row:a,record:s,filesChanged:i}){const{summary:c}=a,{runId:f}=c,[d,m]=X.useState(),h=Pr({mutationFn:()=>Lc({path:`/api/runs/${f}/stop`})}),p=Pr({mutationFn:()=>Lc({path:`/api/runs/${f}/resume`})}),y=h.error??p.error,{reset:x}=h,{reset:g}=p;return X.useEffect(()=>{x(),g()},[c.status,x,g]),r.jsxs(r.Fragment,{children:[r.jsxs("header",{className:"run-header",children:[r.jsxs("h1",{className:"text-title",children:["Run ",f]}),r.jsx(Tn,{kind:wm[c.status]}),r.jsx("span",{className:"run-header-reason",children:r.jsx(zw,{runId:f,row:a,record:s})}),c.status==="running"&&a.connected&&r.jsx(kt,{look:"outline",destructive:!0,icon:"stop",className:"run-header-control",loading:h.isPending||h.isSuccess,onPress:()=>m("stop"),children:h.isPending||h.isSuccess?"Stopping":"Stop"}),(c.status==="stopped"||c.status==="failed")&&r.jsx(kt,{look:"outline",icon:"resume",className:"run-header-control",loading:p.isPending,onPress:()=>i?m("resume"):p.mutate(),children:p.isPending?"Resuming":"Resume"})]}),c.status==="running"&&!a.connected&&r.jsxs("p",{className:"files-changed",children:[r.jsx(Oe,{name:"info",className:"files-changed-icon"}),r.jsx("span",{children:"This run was started outside this page. It is read again when you return to this window, and it is stopped where it was started."})]}),i&&r.jsxs("p",{className:"files-changed",children:[r.jsx(Oe,{name:"info",className:"files-changed-icon"}),r.jsx("span",{children:"The files have changed since this run was made. This page shows the blueprint and prompts as the run saved them."}),r.jsx(at,{className:"link",to:"/blueprint",children:"Open the blueprint"})]}),y&&r.jsx(Zn,{tone:"error",marked:!0,title:h.error?"The run was not stopped":"The run was not resumed",children:y.message}),d==="stop"&&r.jsx(hb,{title:`Stop Run ${f}?`,text:"Calls in progress are cancelled and their work so far is not kept. Finished assignments are kept, and Resume continues the run.",destructive:!0,onCancel:()=>m(void 0),onConfirm:()=>{m(void 0),h.mutate()}}),d==="resume"&&r.jsx(hb,{title:`Resume Run ${f} with the changed files?`,text:"Finished assignments are kept. Everything the run does from here on uses the blueprint and prompts as they are now.",onCancel:()=>m(void 0),onConfirm:()=>{m(void 0),p.mutate()}})]})}function Lw({runId:a,record:s,shownPhase:i,showsChanges:c,search:f,onShowsChangesChange:d,onSearchChange:m}){var K;const h=jt(),p=X.useRef(null),[y,x]=X.useState({}),[g,b]=X.useState(0),S=tE({runId:a,name:i==null?void 0:i.checkpoint}),j=i!=null&&i.checkpoint?(K=S.data)==null?void 0:K.state:s.progress.state,T=i?s.changes.filter(k=>k.phase===i.phase):s.changes,E=T.reduce((k,Q)=>k+Q.entries.length,0),q=X.useMemo(()=>zx({state:j,search:f}),[j,f]),O=ub({matches:q,number:g}),C=k=>{if(!q.total)return;const Q=(g+k+q.total)%q.total,F=ub({matches:q,number:Q}),Y={...y};for(let $=1;$<F.path.length;$++)Y[JSON.stringify(F.path.slice(0,$))]=!0;x(Y),b(Q)};X.useEffect(()=>{var k,Q;O&&((Q=(k=p.current)==null?void 0:k.querySelector(`[data-path=${JSON.stringify(JSON.stringify(O.path))}]`))==null||Q.scrollIntoView({block:"nearest"}))},[O,y]);const H=()=>{var Q;const k=s.phases[s.phases.indexOf(i)-1];h({to:"/runs/new",search:{fromRun:a,checkpoint:((Q=k==null?void 0:k.checkpoint)==null?void 0:Q.split("-")[0])??"0",stopAfter:i.phase}})};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"state-toolbar",children:[r.jsx(Zc,{label:"What of the run state is shown",options:[{value:"state",label:"As it stood"},{value:"changes",label:"Changes"}],value:c?"changes":"state",onChoose:k=>d(k==="changes")}),c?r.jsxs("span",{className:"state-toolbar-count",children:[E," ",E===1?"change":"changes"]}):r.jsx(mm,{label:"Search the state",value:f,matches:{total:q.total,at:g},onChange:k=>{b(0),m(k)},onStep:C}),i&&r.jsx(kt,{look:"quiet",small:!0,onPress:H,children:"Run this phase again"})]}),r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The run state",children:c?E?r.jsx(qE,{runId:a,record:s,changes:T}):r.jsx(Je,{children:i?`${en({place:i.phase})} has changed nothing in the run state${i.finishedAt?"":" yet"}.`:"Nothing has changed the run state yet."}):S.isError?r.jsx(Zn,{tone:"error",title:"The run state after this phase could not be read",children:S.error.message}):j===void 0?r.jsx(Je,{children:"Reading the run state."}):r.jsxs("div",{ref:p,children:[r.jsx(Ux,{state:j,matches:q,currentNumber:g,openPaths:y,onOpenPathsChange:x}),f.trim()&&!q.total&&r.jsxs(Je,{children:["Nothing in the run state holds “",f.trim(),"”."]})]})})]})}function kr({runId:a,record:s,shownPhase:i,answered:c}){return s.progress.questionIds.map(d=>s.progress.questions[d]).filter(d=>UE({record:s,questionId:d.id})===i.phase&&d.answer!==void 0===c).map(d=>r.jsx(Mw,{runId:a,asked:d,asker:zE({record:s,questionId:d.id}),phase:i.phase,answeredAt:s.answeredAt[d.id]},d.id))}function Bw({row:a,record:s,structure:i,shownPhase:c,search:f}){const d=jt(),{runId:m,status:h,reason:p}=a.summary,y=c&&i.phases.find(S=>S.name===ll({name:c.phase}).phase),x=f.tab&&(c?f.tab!=="performance":f.tab!=="assignments")?f.tab:c?"assignments":"state",g=(S,{addsStep:j=!1}={})=>void d({to:".",search:T=>({...T,...S}),replace:!j}),b=c?s.artifacts.filter(S=>S.phase===c.phase):s.artifacts;return r.jsxs("div",{className:"pane",children:[c&&y&&r.jsxs("div",{className:"pane-heading",children:[r.jsx("h2",{className:"text-heading",children:en({place:c.phase})}),r.jsx("p",{className:"text-secondary",children:y.description})]}),r.jsx(hm,{label:c?`What is shown of ${en({place:c.phase})}`:"What is shown of the whole run",tabs:[...c?[{value:"assignments",label:(y==null?void 0:y.kind)==="code"?"Code phase":"Assignments",...(y==null?void 0:y.kind)==="code"?{}:{count:c.assignmentIds.length}}]:[],{value:"state",label:"State"},{value:"artifacts",label:"Artifacts",count:b.length},...c?[]:[{value:"performance",label:"Performance"}]],value:x,onChoose:S=>g({tab:S},{addsStep:!0})}),x==="assignments"&&c&&(y==null?void 0:y.kind)==="agents"&&r.jsx(ww,{runId:m,record:s,runStatus:h,runReason:p,shownPhase:c,phase:y,narrowedTo:f.status,onNarrow:S=>g({status:S}),above:r.jsx(kr,{runId:m,record:s,shownPhase:c,answered:!1}),below:r.jsx(kr,{runId:m,record:s,shownPhase:c,answered:!0})}),x==="assignments"&&c&&(y==null?void 0:y.kind)==="code"&&r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"The code phase",children:[r.jsx(kr,{runId:m,record:s,shownPhase:c,answered:!1}),r.jsx(Aw,{runId:m,record:s,shownPhase:c,phase:y,status:Rx({shownPhase:c,record:s,runStatus:h}),runReason:p}),r.jsx(kr,{runId:m,record:s,shownPhase:c,answered:!0})]}),x==="state"&&r.jsx(Lw,{runId:m,record:s,shownPhase:c,showsChanges:!!f.changes,search:f.search??"",onShowsChangesChange:S=>g({changes:S||void 0}),onSearchChange:S=>g({search:S||void 0})}),x==="artifacts"&&r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Artifacts",children:r.jsx(yw,{runId:m,record:s,shownPhase:c,chosenId:f.artifact,onChoose:S=>g({artifact:S})})}),x==="performance"&&r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Performance",children:r.jsx(Cw,{runId:m,record:s,structure:i,runStatus:h,answeredBy:a.summary.callsAnsweredBy})})]})}function Qx(){const a=jt(),s=co({strict:!1}),i=Xc({strict:!1}),c=s.runId,f=$c(),d=jx({runId:c}),{record:m,structure:h,problem:p}=jm({runId:c}),y=Fc(),x=s.phase,g=m==null?void 0:m.phases.find(j=>j.phase===x),b=m&&Ax({record:m}),S=!x&&!i.tab&&d&&d.summary.status!=="finished"&&b;return X.useEffect(()=>{S&&m.phases.some(j=>j.phase===b)&&a({to:"/runs/$runId/phases/$phase",params:{runId:c,phase:b},replace:!0})},[S,m,b,c,a]),p||f.data&&!d?r.jsxs(r.Fragment,{children:[r.jsx("header",{className:"run-header",children:r.jsxs("h1",{className:"text-title",children:["Run ",c]})}),r.jsx(Zn,{tone:"error",title:`Run ${c} could not be read`,children:p??"There is no run with this number."})]}):!d||!m||!h?r.jsxs(r.Fragment,{children:[r.jsx("header",{className:"run-header",children:r.jsxs("h1",{className:"text-title",children:["Run ",c]})}),r.jsx(Je,{children:"Reading the run."})]}):r.jsxs(r.Fragment,{children:[r.jsx(Uw,{row:d,record:m,filesChanged:y.data!==void 0&&y.data.hash!==m.progress.blueprintHash}),r.jsxs("div",{className:h.sideLines.length?"panes panes--lanes":"panes",children:[r.jsx("div",{className:"pane",children:r.jsx("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Phases",children:r.jsx(xw,{runId:c,record:m,structure:h,runStatus:d.summary.status,selected:g==null?void 0:g.phase})})}),x&&!g?r.jsx("div",{className:"pane",children:r.jsxs(Je,{children:["This run has not run ",en({place:x}),"."]})}):r.jsx(Bw,{row:d,record:m,structure:h,shownPhase:g,search:i})]})]})}function tl({label:a,options:s,value:i,emptyLabel:c,nothingMatches:f="Nothing matches.",onChoose:d}){const m=X.useId(),h=X.useRef(null),[p,y]=X.useState(),[x,g]=X.useState(0),b=p!==void 0,S=s.find(C=>C.value===i),T=[...c?[{value:void 0,label:c}]:[],...s].filter(C=>C.label.toLowerCase().includes((p??"").toLowerCase())),E=C=>{d(C.value),y(void 0)},q=C=>{if(C==="Escape")return y(void 0);if(!b)return C==="ArrowDown"||C==="Enter"?y(""):void 0;C==="ArrowDown"&&g(H=>Math.min(H+1,T.length-1)),C==="ArrowUp"&&g(H=>Math.max(H-1,0)),C==="Enter"&&T[x]&&E(T[x])},O=C=>{const H=p?C.toLowerCase().indexOf(p.toLowerCase()):-1;return H<0?C:r.jsxs(r.Fragment,{children:[C.slice(0,H),r.jsx("mark",{className:"combobox-match",children:C.slice(H,H+p.length)}),C.slice(H+p.length)]})};return r.jsxs("div",{className:"combobox",ref:h,onBlur:C=>{var H;(H=h.current)!=null&&H.contains(C.relatedTarget)||y(void 0)},children:[r.jsxs("div",{className:"combobox-control",children:[r.jsx("input",{className:"field-value",role:"combobox","aria-label":a,"aria-expanded":b,"aria-controls":m,value:p??(S==null?void 0:S.label)??"",placeholder:(S==null?void 0:S.label)??c,onFocus:C=>C.target.select(),onMouseDown:()=>{g(0),y(C=>C??"")},onChange:C=>{g(0),y(C.target.value)},onKeyDown:C=>{["ArrowDown","ArrowUp","Enter"].includes(C.key)&&C.preventDefault(),q(C.key)}}),r.jsx(Oe,{name:b?"chevron-up":"chevron-down",className:"combobox-chevron"})]}),b&&r.jsxs("div",{className:"combobox-menu",id:m,role:"listbox",children:[T.map((C,H)=>r.jsxs("div",{role:"option","aria-selected":C.value===i,className:["combobox-option",C.value===i&&"is-selected",H===x&&"is-active"].filter(Boolean).join(" "),onMouseDown:K=>{K.preventDefault(),E(C)},children:[r.jsx("span",{children:O(C.label)}),C.value===i&&r.jsx(Oe,{name:"check"})]},C.value??"")),!T.length&&r.jsx("div",{className:"combobox-empty",children:f})]})]})}const qw=[{value:"none",label:"None"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}];function Hw({rows:a,answeredBy:s}){return a.filter(i=>i.model.trim()||i.effort).map(i=>({...i.appliesTo.startsWith("agent:")?{agent:i.appliesTo.slice(6)}:{},...i.appliesTo.startsWith("phase:")?{phase:i.appliesTo.slice(6)}:{},modelSettings:{...i.effort?{effort:i.effort}:{},...i.model.trim()?{model:{[s]:i.model.trim()}}:{}}}))}function kw({structure:a,answeredBy:s,rows:i,onChange:c}){const f=[{value:"all",label:"Every agent"},...a.agents.map(h=>({value:`agent:${h.name}`,label:`The agent ${he({name:h.name})}`})),...a.phases.filter(h=>h.kind==="agents").map(h=>({value:`phase:${h.name}`,label:`Every agent of the phase ${he({name:h.name})}`}))],d=h=>{var y,x;if(s==="custom")return;const p=a.agents.find(g=>`agent:${g.name}`===h.appliesTo);return((y=p==null?void 0:p.modelSettings.model)==null?void 0:y[s])??((x=a.modelSettings.model)==null?void 0:x[s])},m=(h,p)=>c(i.map(y=>y.id===h?{...y,...p}:y));return r.jsxs("div",{className:"form-section",children:[r.jsx("span",{className:"field-label",children:"Model overrides"}),i.length>0&&r.jsxs("div",{className:"override-headings",children:[r.jsx("span",{className:"override-heading",children:"Applies to"}),r.jsxs("span",{className:"override-heading",children:["Model on ",Ei[s]]}),r.jsx("span",{className:"override-heading",children:"Effort"})]}),i.map(h=>r.jsxs("div",{className:"override-row",children:[r.jsx(tl,{label:"Applies to",options:f,value:h.appliesTo,onChoose:p=>m(h.id,{appliesTo:p??"all"})}),r.jsx(Cm,{value:h.model,placeholder:d(h)?`As declared: ${d(h)}`:"As declared",onChange:p=>m(h.id,{model:p})}),r.jsx(tl,{label:"Effort",options:qw,value:h.effort,emptyLabel:"As declared",onChoose:p=>m(h.id,{effort:p})}),r.jsx(kt,{look:"quiet",icon:"x",label:"Remove this override",onPress:()=>c(i.filter(p=>p.id!==h.id))})]},h.id)),r.jsx(kt,{look:"outline",small:!0,onPress:()=>c([...i,{id:Math.max(0,...i.map(h=>h.id))+1,appliesTo:"all",model:""}]),children:"Add an override"})]})}function mb({rows:a,runId:s,onChoose:i}){const c=new Date;return r.jsx(Qs,{label:"Run",className:"combobox",children:r.jsx(tl,{label:"Run",options:a.map(({summary:f,inputText:d})=>({value:f.runId,label:`Run ${f.runId} · ${d} · ${Tm({at:f.createdAt,now:c}).toLowerCase()}`})),value:s,emptyLabel:"Choose a run",nothingMatches:"No run matches.",onChoose:i})})}function Qw({runId:a,checkpoint:s,onChoose:i}){const{record:c,problem:f}=jm({runId:a}),d=((c==null?void 0:c.phases)??[]).filter(h=>h.checkpoint),m=d.find(h=>h.checkpoint.split("-")[0]===s);return r.jsx(Qs,{label:"Checkpoint",className:"combobox",error:f&&`Run ${a} could not be read: ${f}`,hint:m&&`The run starts after ${en({place:m.phase})}, with the run state Run ${a} had then.`,children:r.jsx(tl,{label:"Checkpoint",options:d.map(h=>({value:h.checkpoint.split("-")[0],label:`After ${en({place:h.phase})}`})),value:s,emptyLabel:c?"Choose a checkpoint":"Reading the run",nothingMatches:"No checkpoint matches.",onChoose:i})})}const Yw=dm("/runs/new"),Iw=["codex","claude-code","openai-api","anthropic-api","bedrock-api","gemini-api","scripted"];function Gw({inputSchema:a}){const{properties:s}=a??{},i={string:"",number:0,integer:0,boolean:!1,array:[],object:{}},c=Object.entries(s??{}).map(([f,{type:d}])=>[f,i[d]??null]);return JSON.stringify(Object.fromEntries(c),null,2)}function Vw({text:a}){try{return{input:JSON.parse(a)}}catch(s){return{notJson:s instanceof Error?s.message:String(s)}}}function Kw(){var me,ie,Z,W;const a=jt(),s=Yw.useSearch(),i=Fc(),c=F2(),f=$c(),[d,m]=X.useState(s.checkpoint?"checkpoint":s.fromRun?"earlier-input":"typed-input"),[h,p]=X.useState(),[y,x]=X.useState(s.fromRun),[g,b]=X.useState(s.checkpoint),[S,j]=X.useState(s.stopAfter),[T,E]=X.useState("scripted"),[q,O]=X.useState(),[C,H]=X.useState("person"),[K,k]=X.useState([]),Q=h??(i.data?Gw({inputSchema:i.data.inputSchema}):""),F=Vw({text:Q}),Y=nE({runId:d==="earlier-input"?y:void 0}),$=ds({queryKey:["input-check",Q],queryFn:()=>Lc({path:"/api/input-check",body:F.input}),enabled:d==="typed-input"&&"input"in F&&!!i.data,staleTime:0,retry:!1}),re="notJson"in F?`This is not JSON: ${F.notJson}`:(me=$.data)!=null&&me.problems.length?`The input does not fit the blueprint’s input shape. ${$.data.problems.join("; ")}`:void 0,oe=Pr({mutationFn:()=>{var we;const J={...d==="checkpoint"?{from:{runId:y,checkpoint:g}}:{input:d==="typed-input"?F.input:Y.data},...S?{stopAfter:S}:{},callsAnsweredBy:T==="custom"?"scripted":T,...T==="scripted"?{scriptedRepliesFile:q??((we=c.data)==null?void 0:we.scriptedRepliesFile)??""}:{overrides:Hw({rows:K,answeredBy:T})},questionsAnsweredBy:C};return Lc({path:"/api/runs",body:J})},onSuccess:({runId:J})=>void a({to:"/runs/$runId",params:{runId:J}})}),xe=d==="typed-input"?"input"in F&&((ie=$.data)==null?void 0:ie.problems.length)===0:d==="earlier-input"?Y.data!==void 0:!!y&&!!g;return r.jsx(kx,{kind:"dialog",labelledBy:"new-run-title",onClose:()=>void a({to:"/runs"}),children:r.jsxs("form",{className:"new-run",onSubmit:J=>{J.preventDefault(),oe.mutate()},children:[r.jsx("h3",{className:"text-heading new-run-title",id:"new-run-title",children:"New run"}),r.jsxs("div",{className:"form-section",children:[r.jsx("span",{className:"field-label",children:"Start from"}),r.jsx(Zc,{label:"Start from",options:[{value:"typed-input",label:"A typed input"},{value:"earlier-input",label:"The input of an earlier run"},{value:"checkpoint",label:"A checkpoint"}],value:d,onChoose:m})]}),d==="typed-input"&&r.jsxs(Qs,{label:"Run input, as JSON",className:"form-section",error:re,children:[r.jsx(Ow,{code:!0,value:Q,invalid:!!re,onChange:p}),!re&&$.data&&r.jsxs("div",{className:"input-check",children:[r.jsx(Oe,{name:"check"}),r.jsx("span",{children:"Matches the blueprint’s input shape."})]})]}),d==="earlier-input"&&r.jsx("div",{className:"form-section",children:r.jsx(mb,{rows:f.data??[],runId:y,onChoose:x})}),d==="checkpoint"&&r.jsxs("div",{className:"form-section form-columns",children:[r.jsx(mb,{rows:f.data??[],runId:y,onChoose:J=>{x(J),b(void 0)}}),y&&r.jsx(Qw,{runId:y,checkpoint:g,onChoose:b})]}),r.jsxs("div",{className:"form-section form-columns",children:[r.jsx(Qs,{label:"Stop after phase",className:"combobox",children:r.jsx(tl,{label:"Stop after phase",options:(((Z=i.data)==null?void 0:Z.structure.trunk)??[]).map(J=>({value:J,label:he({name:J})})),value:S,emptyLabel:"Run to the end",nothingMatches:"No phase has that name.",onChoose:j})}),r.jsx(Qs,{label:"Calls answered by",className:"combobox",error:T==="openai-api"&&c.data&&!c.data.openAiKeyIsSet?"No OpenAI key is set. Start the devtool with OPENAI_API_KEY set.":T==="anthropic-api"&&c.data&&!c.data.anthropicKeyIsSet?"No Anthropic key is set. Start the devtool with ANTHROPIC_API_KEY set.":void 0,children:r.jsx(tl,{label:"Calls answered by",options:Iw.map(J=>({value:J,label:Ei[J]})),value:T,onChoose:J=>E(J??"scripted")})})]}),T==="scripted"&&r.jsx(Qs,{label:"Replies file",className:"form-section",children:r.jsx(Cm,{value:q??((W=c.data)==null?void 0:W.scriptedRepliesFile)??"",placeholder:"Path to a file of scripted replies",onChange:O})}),r.jsx("div",{className:"form-section",children:r.jsx(M2,{label:"Questions answered by",name:"questions-answered-by",options:[{value:"person",label:"The person"},{value:"recommendation",label:"The recommendation, when a question has one"}],value:C,onChoose:H})}),T!=="scripted"&&i.data&&r.jsx(kw,{structure:i.data.structure,answeredBy:T,rows:K,onChange:k}),oe.isError&&r.jsx("div",{className:"form-section",children:r.jsx(Zn,{tone:"error",marked:!0,title:"The run cannot start",children:oe.error.message})}),r.jsxs("div",{className:"form-actions",children:[r.jsx(kt,{look:"filled",loading:oe.isPending,disabled:!xe,onPress:()=>oe.mutate(),children:oe.isPending?"Starting":"Start run"}),r.jsx(kt,{look:"quiet",onPress:()=>void a({to:"/runs"}),children:"Cancel"})]})]})})}const Yx=[{heading:"Run",number:!0},{heading:"Status"},{heading:"Input"},{heading:"Started from"},{heading:"Phase reached"},{heading:"When"},{heading:"Duration",number:!0},{heading:"Tokens",number:!0},{heading:"Cost",number:!0},{heading:"Program’s estimate",number:!0},{heading:"Calls answered by"}];function Ix(){return r.jsx("thead",{children:r.jsx("tr",{className:"table-head",children:Yx.map(({heading:a,number:s})=>r.jsx("th",{className:["table-heading",s&&"table-heading--number",a==="When"&&"is-sorted"].filter(Boolean).join(" "),children:a==="When"?r.jsxs("span",{className:"table-sort",children:["When",r.jsx(Oe,{name:"chevron-down"})]}):a},a))})})}function Xw({row:a,structure:s,now:i}){const c=jt(),{summary:f}=a,{totals:d,startedFrom:m,phaseReached:h}=f,p=(s==null?void 0:s.trunk)??[],y=h?p.indexOf(h)+1:0,x=f.status==="stopped"&&f.stopAfter===h,g=d.callsNotReporting.input===d.calls&&d.callsNotReporting.output===d.calls;return r.jsxs("tr",{className:"table-row",tabIndex:0,"data-row":!0,onClick:()=>void c({to:"/runs/$runId",params:{runId:f.runId}}),children:[r.jsx("td",{className:"table-cell table-cell--number",children:f.runId}),r.jsx("td",{className:"table-cell",children:r.jsx(Tn,{kind:wm[f.status]})}),r.jsx("td",{className:"table-cell table-cell--cut",title:a.inputText,children:a.inputText}),r.jsx("td",{className:"table-cell",children:m?r.jsxs(r.Fragment,{children:[r.jsxs(at,{className:"link",to:"/runs/$runId",params:{runId:m.runId},onClick:b=>b.stopPropagation(),children:["Run ",m.runId]})," ",m.checkpoint.startsWith("0-")?r.jsx("span",{className:"table-cell-detail",children:"its input"}):r.jsxs("span",{className:"table-cell-detail",children:["after ",he({name:kE(m)})]})]}):"Its own input"}),r.jsx("td",{className:"table-cell",children:h&&r.jsxs(r.Fragment,{children:[he({name:h}),y>0&&r.jsxs(r.Fragment,{children:[" ",r.jsxs("span",{className:"table-cell-detail",children:[y," of ",p.length,x&&", as asked"]})]})]})}),r.jsx("td",{className:"table-cell",children:Tm({at:f.createdAt,now:i})}),r.jsx("td",{className:"table-cell table-cell--number",children:Wt({ms:d.durationMs})}),r.jsx("td",{className:"table-cell table-cell--number",children:d.calls===0?f.status==="running"&&r.jsx(el,{}):g?r.jsx(Ni,{}):ls({count:d.tokens.input+d.tokens.output})}),r.jsx("td",{className:"table-cell table-cell--number",children:_m({answeredBy:f.callsAnsweredBy})?ji({usd:d.costUsd}):r.jsx(Em,{})}),r.jsx("td",{className:"table-cell table-cell--number",children:d.programCostUsd>0?ji({usd:d.programCostUsd}):r.jsx(Ni,{})}),r.jsx("td",{className:"table-cell",children:Ei[f.callsAnsweredBy]})]})}function Zw({rows:a,structure:s}){const i=new Date;return r.jsxs("table",{className:"table",children:[r.jsx(Ix,{}),r.jsx("tbody",{onKeyDown:fs,children:a.map(c=>r.jsx(Xw,{row:c,structure:s,now:i},c.summary.runId))})]})}const Fw=["running","waiting","stopped","failed","finished"],pb=a=>Si({kind:wm[a]});function Gx(){var y,x;const a=jt(),{search:s="",status:i}=Xc({strict:!1}),c=vx({select:g=>g.location.pathname==="/runs/new"}),f=$c(),d=Fc(),m=g=>void a({to:"/runs",search:{search:s||void 0,status:i,...g},replace:!0}),h=s.trim().toLowerCase(),p=(f.data??[]).filter(({summary:g,inputText:b})=>(!i||g.status===i)&&(!h||g.runId===h||b.toLowerCase().includes(h)));return r.jsxs(r.Fragment,{children:[r.jsxs("header",{className:"screen-header",children:[r.jsx("h1",{className:"text-title",children:"Runs"}),r.jsxs("div",{className:"screen-toolbar",children:[r.jsx(mm,{label:"Search runs",value:s,onChange:g=>m({search:g||void 0})}),r.jsx(tl,{label:"Status",options:Fw.map(g=>({value:g,label:pb(g)})),value:i,emptyLabel:"Any status",onChoose:g=>m({status:g})}),r.jsx(kt,{look:"filled",className:"screen-toolbar-end",onPress:()=>void a({to:"/runs/new"}),children:"New run"})]})]}),r.jsx("div",{className:"panes panes--one",children:r.jsx("div",{className:"pane",children:r.jsxs("div",{className:"pane-scroll",tabIndex:0,"aria-label":"Runs",children:[f.data&&p.length>0?r.jsx(Zw,{rows:p,structure:(y=d.data)==null?void 0:y.structure}):r.jsxs("table",{className:f.isPending?"table is-loading":"table",children:[r.jsx(Ix,{}),f.isPending&&r.jsx(z2,{columns:Yx.map(({number:g})=>g?"number":"text")})]}),f.isError&&r.jsx("div",{className:"empty-state",children:r.jsxs(Zn,{tone:"error",title:"The runs could not be read",children:[f.error.message," ",r.jsx("a",{className:"link notice-action",onClick:()=>void f.refetch(),children:"Try again"})]})}),((x=f.data)==null?void 0:x.length)===0&&r.jsx(Je,{children:"This blueprint has not been run yet. New run starts its first run."}),f.data&&f.data.length>0&&p.length===0&&r.jsxs(Je,{children:[i&&!h?`No run is ${pb(i).toLowerCase()}.`:"No run matches."," ",r.jsx("a",{className:"link",onClick:()=>m({search:void 0,status:void 0}),children:"Show all runs"})]})]})})}),c&&r.jsx(Kw,{})]})}const Nn=a=>typeof a=="number"?String(a):typeof a=="string"&&a?a:void 0,oo=(a,s)=>s.find(i=>i===a),$w=["running","waiting","stopped","failed","finished"],Jw=["assignments","state","artifacts","performance"],Pw=["prompt","inputs","reasoning","reply","changes"],Ww=["phases","serializers","templates"],ps=r2({component:fw}),e_=sl({getParentRoute:()=>ps,path:"/",beforeLoad:()=>{throw em({to:"/runs"})}}),t_=sl({getParentRoute:()=>ps,path:"/blueprint",component:wE,validateSearch:a=>({view:oo(a.view,Ww),phase:Nn(a.phase),agent:Nn(a.agent),sideLine:Nn(a.sideLine),search:Nn(a.search)})}),n_=sl({getParentRoute:()=>ps,path:"/runs",component:Gx,validateSearch:a=>({search:Nn(a.search),status:oo(a.status,$w)})}),a_=sl({getParentRoute:()=>ps,path:"/runs/new",component:Gx,validateSearch:a=>({fromRun:Nn(a.fromRun),checkpoint:Nn(a.checkpoint),stopAfter:Nn(a.stopAfter)})}),Vx=a=>({tab:oo(a.tab,Jw),status:Nn(a.status),search:Nn(a.search),changes:a.changes===!0||a.changes==="true"?!0:void 0,artifact:Nn(a.artifact)}),s_=sl({getParentRoute:()=>ps,path:"/runs/$runId",component:Qx,validateSearch:Vx}),l_=sl({getParentRoute:()=>ps,path:"/runs/$runId/phases/$phase",component:Qx,validateSearch:Vx}),i_=sl({getParentRoute:()=>ps,path:"/runs/$runId/phases/$phase/assignments/$assignmentId/calls/$callId",component:uw,validateSearch:a=>({tab:oo(a.tab,Pw),file:a.file===!0||a.file==="true"?!0:void 0})}),c_=v2({routeTree:ps.addChildren([e_,t_,n_,a_,s_,l_,i_])}),u_=new yN;C2.createRoot(document.body).render(r.jsx(Kj,{client:u_,children:r.jsx(S2,{router:c_})}));